Skip to content

get_maintenance_window_execution_task_invocation

get_maintenance_window_execution_task_invocation(
    window_execution_id: MaintenanceWindowExecutionId,
    task_id: MaintenanceWindowExecutionTaskId,
    invocation_id: MaintenanceWindowExecutionTaskInvocationId,
    *,
    config_overrides: Optional[SSMClientConfig] = None,
) -> GetMaintenanceWindowExecutionTaskInvocationResult

Retrieves information about a specific task running on a specific target.

Parameters:

Raises:

  • DoesNotExistException –

    Error returned when the ID specified for a resource, such as a maintenance window or patch baseline, doesn't exist.

    For information about resource quotas in Amazon Web Services Systems Manager, see Systems Manager service quotas in the Amazon Web Services General Reference.

  • InternalServerError –

    An error occurred on the server side.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_ssm/_services/ssm.py
def get_maintenance_window_execution_task_invocation(
    self,
    window_execution_id: "capo_ssm.types.maintenance_window_execution_id.MaintenanceWindowExecutionId",
    task_id: "capo_ssm.types.maintenance_window_execution_task_id.MaintenanceWindowExecutionTaskId",
    invocation_id: "capo_ssm.types.maintenance_window_execution_task_invocation_id.MaintenanceWindowExecutionTaskInvocationId",
    *,
    config_overrides: Optional[SSMClientConfig] = None,
) -> "capo_ssm.types.get_maintenance_window_execution_task_invocation_result.GetMaintenanceWindowExecutionTaskInvocationResult":
    """<p>Retrieves information about a specific task running on a specific target.</p>

    Args:
        window_execution_id: <p>The ID of the maintenance window execution for which the task is a part.</p>
        task_id: <p>The ID of the specific task in the maintenance window task that should be retrieved. </p>
        invocation_id: <p>The invocation 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_execution_task_invocation_request.GetMaintenanceWindowExecutionTaskInvocationRequest]",
    ) -> OperationResponse[
        "capo_ssm.types.get_maintenance_window_execution_task_invocation_result.GetMaintenanceWindowExecutionTaskInvocationResult"
    ]:
        import capo_ssm._operations.amazon_ssm.get_maintenance_window_execution_task_invocation

        output, http_response = (
            capo_ssm._operations.amazon_ssm.get_maintenance_window_execution_task_invocation.get_maintenance_window_execution_task_invocation(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_ssm.types.get_maintenance_window_execution_task_invocation_result.GetMaintenanceWindowExecutionTaskInvocationResult",
    ) -> dict[str, Any]:
        import capo_ssm.types.get_maintenance_window_execution_task_invocation_result

        return capo_ssm.types.get_maintenance_window_execution_task_invocation_result.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "GetMaintenanceWindowExecutionTaskInvocation",
            redact_output=_redact_output,
        ),
    )
    input_: capo_ssm.types.get_maintenance_window_execution_task_invocation_request.GetMaintenanceWindowExecutionTaskInvocationRequest = {
        "window_execution_id": window_execution_id,
        "task_id": task_id,
        "invocation_id": invocation_id,
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output