Skip to content

send_automation_signal

send_automation_signal(
    automation_execution_id: AutomationExecutionId,
    signal_type: SignalType,
    *,
    config_overrides: Optional[SSMClientConfig] = None,
    payload: Optional[AutomationParameterMap] = None,
) -> SendAutomationSignalResult

Sends a signal to an Automation execution to change the current behavior or status of the execution.

Parameters:

  • automation_execution_id (AutomationExecutionId) –

    The unique identifier for an existing Automation execution that you want to send the signal to.

  • signal_type (SignalType) –

    The type of signal to send to an Automation execution.

  • payload (Optional[AutomationParameterMap], default: None ) –

    The data sent with the signal. The data schema depends on the type of signal used in the request.

    For Approve and Reject signal types, the payload is an optional comment that you can send with the signal type. For example:

    Comment="Looks good"

    For StartStep and Resume signal types, you must send the name of the Automation step to start or resume as the payload. For example:

    StepName="step1"

    For the StopStep signal type, you must send the step execution ID as the payload. For example:

    StepExecutionId="97fff367-fc5a-4299-aed8-0123456789ab"

Raises:

Source code in docs_src/capo_ssm/_services/ssm.py
def send_automation_signal(
    self,
    automation_execution_id: "capo_ssm.types.automation_execution_id.AutomationExecutionId",
    signal_type: "capo_ssm.types.signal_type.SignalType",
    *,
    config_overrides: Optional[SSMClientConfig] = None,
    payload: Optional[
        "capo_ssm.types.automation_parameter_map.AutomationParameterMap"
    ] = None,
) -> "capo_ssm.types.send_automation_signal_result.SendAutomationSignalResult":
    """<p>Sends a signal to an Automation execution to change the current behavior or status of the execution. </p>

    Args:
        automation_execution_id: <p>The unique identifier for an existing Automation execution that you want to send the signal to.</p>
        signal_type: <p>The type of signal to send to an Automation execution. </p>
        payload: <p>The data sent with the signal. The data schema depends on the type of signal used in the request.</p> <p>For <code>Approve</code> and <code>Reject</code> signal types, the payload is an optional comment that you can send with the signal type. For example:</p> <p> <code>Comment="Looks good"</code> </p> <p>For <code>StartStep</code> and <code>Resume</code> signal types, you must send the name of the Automation step to start or resume as the payload. For example:</p> <p> <code>StepName="step1"</code> </p> <p>For the <code>StopStep</code> signal type, you must send the step execution ID as the payload. For example:</p> <p> <code>StepExecutionId="97fff367-fc5a-4299-aed8-0123456789ab"</code> </p>

    Raises:
        capo_ssm.errors.automation_execution_not_found_exception.AutomationExecutionNotFoundException: <p>There is no automation execution information for the requested automation execution ID.</p>
        capo_ssm.errors.automation_step_not_found_exception.AutomationStepNotFoundException: <p>The specified step name and execution ID don't exist. Verify the information and try again.</p>
        capo_ssm.errors.internal_server_error.InternalServerError: <p>An error occurred on the server side.</p>
        capo_ssm.errors.invalid_automation_signal_exception.InvalidAutomationSignalException: <p>The signal isn't valid for the current Automation execution.</p>
        capo_ssm.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_ssm.types.send_automation_signal_request.SendAutomationSignalRequest]",
    ) -> OperationResponse[
        "capo_ssm.types.send_automation_signal_result.SendAutomationSignalResult"
    ]:
        import capo_ssm._operations.amazon_ssm.send_automation_signal

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("SendAutomationSignal")
    )
    input_: capo_ssm.types.send_automation_signal_request.SendAutomationSignalRequest = {
        "automation_execution_id": automation_execution_id,
        "signal_type": signal_type,
    }
    if payload is not None:
        input_["payload"] = payload

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