deregisterTaskFromMaintenanceWindow method
Removes a task from a maintenance window.
May throw DoesNotExistException. May throw InternalServerError.
Parameter windowId
:
The ID of the maintenance window the task should be removed from.
Parameter windowTaskId
:
The ID of the task to remove from the maintenance window.
Implementation
Future<DeregisterTaskFromMaintenanceWindowResult>
deregisterTaskFromMaintenanceWindow({
required String windowId,
required String windowTaskId,
}) async {
ArgumentError.checkNotNull(windowId, 'windowId');
_s.validateStringLength(
'windowId',
windowId,
20,
20,
isRequired: true,
);
ArgumentError.checkNotNull(windowTaskId, 'windowTaskId');
_s.validateStringLength(
'windowTaskId',
windowTaskId,
36,
36,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonSSM.DeregisterTaskFromMaintenanceWindow'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'WindowId': windowId,
'WindowTaskId': windowTaskId,
},
);
return DeregisterTaskFromMaintenanceWindowResult.fromJson(
jsonResponse.body);
}