Retrieves the details of a maintenance window task.
For maintenance window tasks without a specified target, you can't supply values for --max-errors and --max-concurrency. Instead, the system inserts a placeholder value of 1, which may be reported in the response to this command. These values don't affect the running of your task and can be ignored.
To retrieve a list of tasks in a maintenance window, instead use the DescribeMaintenanceWindowTasks command.
Parameters:
Raises:
Source code in docs_src/capo_ssm/_services/ssm.py
| def get_maintenance_window_task(
self,
window_id: "capo_ssm.types.maintenance_window_id.MaintenanceWindowId",
window_task_id: "capo_ssm.types.maintenance_window_task_id.MaintenanceWindowTaskId",
*,
config_overrides: Optional[SSMClientConfig] = None,
) -> "capo_ssm.types.get_maintenance_window_task_result.GetMaintenanceWindowTaskResult":
"""<p>Retrieves the details of a maintenance window task.</p> <note> <p>For maintenance window tasks without a specified target, you can't supply values for <code>--max-errors</code> and <code>--max-concurrency</code>. Instead, the system inserts a placeholder value of <code>1</code>, which may be reported in the response to this command. These values don't affect the running of your task and can be ignored.</p> </note> <p>To retrieve a list of tasks in a maintenance window, instead use the <a>DescribeMaintenanceWindowTasks</a> command.</p>
Args:
window_id: <p>The maintenance window ID that includes the task to retrieve.</p>
window_task_id: <p>The maintenance window task ID to retrieve.</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.get_maintenance_window_task_request.GetMaintenanceWindowTaskRequest]",
) -> OperationResponse[
"capo_ssm.types.get_maintenance_window_task_result.GetMaintenanceWindowTaskResult"
]:
import capo_ssm._operations.amazon_ssm.get_maintenance_window_task
output, http_response = (
capo_ssm._operations.amazon_ssm.get_maintenance_window_task.get_maintenance_window_task(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
def _redact_output(
output: "capo_ssm.types.get_maintenance_window_task_result.GetMaintenanceWindowTaskResult",
) -> dict[str, Any]:
import capo_ssm.types.get_maintenance_window_task_result
return capo_ssm.types.get_maintenance_window_task_result.redact_sensitive(
output
)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging("GetMaintenanceWindowTask", redact_output=_redact_output),
)
input_: capo_ssm.types.get_maintenance_window_task_request.GetMaintenanceWindowTaskRequest = {
"window_id": window_id,
"window_task_id": window_task_id,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|