applyPendingMaintenanceAction method
Applies a pending maintenance action to a resource (for example, to a replication instance).
May throw ResourceNotFoundFault.
Parameter applyAction :
The pending maintenance action to apply to this resource.
Valid values: os-upgrade, system-update,
db-upgrade, os-patch
Parameter optInType :
A value that specifies the type of opt-in request, or undoes an opt-in
request. You can't undo an opt-in request of type immediate.
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 existingnext-maintenanceopt-in requests.
Parameter replicationInstanceArn :
The Amazon Resource Name (ARN) of the DMS resource that the pending
maintenance action applies to.
Implementation
Future<ApplyPendingMaintenanceActionResponse> applyPendingMaintenanceAction({
required String applyAction,
required String optInType,
required String replicationInstanceArn,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonDMSv20160101.ApplyPendingMaintenanceAction'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ApplyAction': applyAction,
'OptInType': optInType,
'ReplicationInstanceArn': replicationInstanceArn,
},
);
return ApplyPendingMaintenanceActionResponse.fromJson(jsonResponse.body);
}