Stops a maintenance window execution that is already in progress and cancels any tasks in the window that haven't already starting running. Tasks already in progress will continue to completion.
Parameters:
Raises:
Source code in docs_src/capo_ssm/_services/ssm.py
| def cancel_maintenance_window_execution(
self,
window_execution_id: "capo_ssm.types.maintenance_window_execution_id.MaintenanceWindowExecutionId",
*,
config_overrides: Optional[SSMClientConfig] = None,
) -> "capo_ssm.types.cancel_maintenance_window_execution_result.CancelMaintenanceWindowExecutionResult":
"""<p>Stops a maintenance window execution that is already in progress and cancels any tasks in the window that haven't already starting running. Tasks already in progress will continue to completion.</p>
Args:
window_execution_id: <p>The ID of the maintenance window execution to stop.</p>
Raises:
capo_ssm.errors.does_not_exist_exception.DoesNotExistException: <p>Error returned when the ID specified for a resource, such as a maintenance window or patch baseline, doesn't exist.</p> <p>For information about resource quotas in Amazon Web Services Systems Manager, see <a href="https://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm">Systems Manager service quotas</a> in the <i>Amazon Web Services General Reference</i>.</p>
capo_ssm.errors.internal_server_error.InternalServerError: <p>An error occurred on the server side.</p>
capo_ssm.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_ssm.types.cancel_maintenance_window_execution_request.CancelMaintenanceWindowExecutionRequest]",
) -> OperationResponse[
"capo_ssm.types.cancel_maintenance_window_execution_result.CancelMaintenanceWindowExecutionResult"
]:
import capo_ssm._operations.amazon_ssm.cancel_maintenance_window_execution
output, http_response = (
capo_ssm._operations.amazon_ssm.cancel_maintenance_window_execution.cancel_maintenance_window_execution(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("CancelMaintenanceWindowExecution")
)
input_: capo_ssm.types.cancel_maintenance_window_execution_request.CancelMaintenanceWindowExecutionRequest = {
"window_execution_id": window_execution_id
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|