Skip to content

send_pipeline_execution_step_failure async

send_pipeline_execution_step_failure(
    *,
    config_overrides: Optional[AsyncSageMakerClientConfig] = None,
    callback_token: Optional[CallbackToken] = None,
    failure_reason: Optional[String256] = None,
    client_request_token: Optional[IdempotencyToken] = None,
) -> SendPipelineExecutionStepFailureResponse

Notifies the pipeline that the execution of a callback step failed, along with a message describing why. When a callback step is run, the pipeline generates a callback token and includes the token in a message sent to Amazon Simple Queue Service (Amazon SQS).

Parameters:

  • callback_token (Optional[CallbackToken], default: None ) –

    The pipeline generated token from the Amazon SQS queue.

  • failure_reason (Optional[String256], default: None ) –

    A message describing why the step failed.

  • client_request_token (Optional[IdempotencyToken], default: None ) –

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the operation. An idempotent operation completes no more than one time.

Raises:

  • ConflictException –

    There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact.

  • ResourceLimitExceeded –

    You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created.

  • ResourceNotFound –

    Resource being access is not found.

  • UnknownServiceError –

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

Source code in docs_src/capo_sagemaker/_services/async_sage_maker.py
async def send_pipeline_execution_step_failure(
    self,
    *,
    config_overrides: Optional[AsyncSageMakerClientConfig] = None,
    callback_token: Optional[
        "capo_sagemaker.types.callback_token.CallbackToken"
    ] = None,
    failure_reason: Optional["capo_sagemaker.types.string256.String256"] = None,
    client_request_token: Optional[
        "capo_sagemaker.types.idempotency_token.IdempotencyToken"
    ] = None,
) -> "capo_sagemaker.types.send_pipeline_execution_step_failure_response.SendPipelineExecutionStepFailureResponse":
    """<p>Notifies the pipeline that the execution of a callback step failed, along with a message describing why. When a callback step is run, the pipeline generates a callback token and includes the token in a message sent to Amazon Simple Queue Service (Amazon SQS).</p>

    Args:
        callback_token: <p>The pipeline generated token from the Amazon SQS queue.</p>
        failure_reason: <p>A message describing why the step failed.</p>
        client_request_token: <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the operation. An idempotent operation completes no more than one time.</p>

    Raises:
        capo_sagemaker.errors.conflict_exception.ConflictException: <p>There was a conflict when you attempted to modify a SageMaker entity such as an <code>Experiment</code> or <code>Artifact</code>.</p>
        capo_sagemaker.errors.resource_limit_exceeded.ResourceLimitExceeded: <p> You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. </p>
        capo_sagemaker.errors.resource_not_found.ResourceNotFound: <p>Resource being access is not found.</p>
        capo_sagemaker.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_sagemaker.types.send_pipeline_execution_step_failure_request.SendPipelineExecutionStepFailureRequest]",
    ) -> AsyncOperationResponse[
        "capo_sagemaker.types.send_pipeline_execution_step_failure_response.SendPipelineExecutionStepFailureResponse"
    ]:
        import capo_sagemaker._operations.sage_maker.send_pipeline_execution_step_failure

        (
            output,
            http_response,
        ) = await capo_sagemaker._operations.sage_maker.send_pipeline_execution_step_failure.async_send_pipeline_execution_step_failure(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("SendPipelineExecutionStepFailure")
    )
    input_: capo_sagemaker.types.send_pipeline_execution_step_failure_request.SendPipelineExecutionStepFailureRequest = {}
    if callback_token is not None:
        input_["callback_token"] = callback_token
    if failure_reason is not None:
        input_["failure_reason"] = failure_reason
    if client_request_token is None:
        client_request_token = str(uuid.uuid4())
    input_["client_request_token"] = client_request_token

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output