applyPendingMaintenanceAction method

Future<ApplyPendingMaintenanceActionOutput> applyPendingMaintenanceAction({
  1. required String applyAction,
  2. required OptInType optInType,
  3. required String resourceArn,
  4. String? applyOn,
})

The type of pending maintenance action to be applied to the resource.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

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

Valid actions are:

  • ENGINE_UPDATE
  • ENGINE_UPGRADE
  • SECURITY_UPDATE
  • OS_UPDATE
  • MASTER_USER_PASSWORD_UPDATE

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.

Parameter resourceArn : The Amazon DocumentDB Amazon Resource Name (ARN) of the resource to which the pending maintenance action applies.

Parameter applyOn : A specific date to apply the pending maintenance action. Required if opt-in-type is APPLY_ON. Format: yyyy/MM/dd HH:mm-yyyy/MM/dd HH:mm

Implementation

Future<ApplyPendingMaintenanceActionOutput> applyPendingMaintenanceAction({
  required String applyAction,
  required OptInType optInType,
  required String resourceArn,
  String? applyOn,
}) async {
  final $payload = <String, dynamic>{
    'applyAction': applyAction,
    'optInType': optInType.value,
    'resourceArn': resourceArn,
    if (applyOn != null) 'applyOn': applyOn,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/pending-action',
    exceptionFnMap: _exceptionFns,
  );
  return ApplyPendingMaintenanceActionOutput.fromJson(response);
}