applyPendingMaintenanceAction method

Future<ApplyPendingMaintenanceActionResult> applyPendingMaintenanceAction({
  1. required String applyAction,
  2. required String optInType,
  3. required String resourceIdentifier,
})

Applies a pending maintenance action to a resource (for example, to a DB instance).

May throw ResourceNotFoundFault. May throw InvalidDBClusterStateFault. May throw InvalidDBInstanceStateFault.

Parameter applyAction : The pending maintenance action to apply to this resource.

Valid values: system-update, db-upgrade, hardware-maintenance, ca-certificate-rotation

Parameter optInType : A value that specifies the type of opt-in request, or undoes an opt-in request. An opt-in request of type immediate can't be undone.

Valid values:

  • immediate - Apply the maintenance action immediately.
  • next-maintenance - Apply the maintenance action during the next maintenance window for the resource.
  • undo-opt-in - Cancel any existing next-maintenance opt-in requests.

Parameter resourceIdentifier : The RDS Amazon Resource Name (ARN) of the resource that the pending maintenance action applies to. For information about creating an ARN, see Constructing an RDS Amazon Resource Name (ARN).

Implementation

Future<ApplyPendingMaintenanceActionResult> applyPendingMaintenanceAction({
  required String applyAction,
  required String optInType,
  required String resourceIdentifier,
}) async {
  ArgumentError.checkNotNull(applyAction, 'applyAction');
  ArgumentError.checkNotNull(optInType, 'optInType');
  ArgumentError.checkNotNull(resourceIdentifier, 'resourceIdentifier');
  final $request = <String, dynamic>{};
  $request['ApplyAction'] = applyAction;
  $request['OptInType'] = optInType;
  $request['ResourceIdentifier'] = resourceIdentifier;
  final $result = await _protocol.send(
    $request,
    action: 'ApplyPendingMaintenanceAction',
    version: '2014-10-31',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['ApplyPendingMaintenanceActionMessage'],
    shapes: shapes,
    resultWrapper: 'ApplyPendingMaintenanceActionResult',
  );
  return ApplyPendingMaintenanceActionResult.fromXml($result);
}