Skip to content

delete_state_machine_alias async

delete_state_machine_alias(
    state_machine_alias_arn: Arn,
    *,
    config_overrides: Optional[AsyncSFNClientConfig] = None,
) -> DeleteStateMachineAliasOutput

Deletes a state machine alias.

After you delete a state machine alias, you can't use it to start executions. When you delete a state machine alias, Step Functions doesn't delete the state machine versions that alias references.

Related operations:

Parameters:

  • state_machine_alias_arn (Arn) –

    The Amazon Resource Name (ARN) of the state machine alias to delete.

Raises:

Source code in docs_src/capo_sfn/_services/async_sfn.py
async def delete_state_machine_alias(
    self,
    state_machine_alias_arn: "capo_sfn.types.arn.Arn",
    *,
    config_overrides: Optional[AsyncSFNClientConfig] = None,
) -> (
    "capo_sfn.types.delete_state_machine_alias_output.DeleteStateMachineAliasOutput"
):
    """<p>Deletes a state machine <a href="https://docs.aws.amazon.com/step-functions/latest/dg/concepts-state-machine-alias.html">alias</a>.</p> <p>After you delete a state machine alias, you can't use it to start executions. When you delete a state machine alias, Step Functions doesn't delete the state machine versions that alias references.</p> <p> <b>Related operations:</b> </p> <ul> <li> <p> <a>CreateStateMachineAlias</a> </p> </li> <li> <p> <a>DescribeStateMachineAlias</a> </p> </li> <li> <p> <a>ListStateMachineAliases</a> </p> </li> <li> <p> <a>UpdateStateMachineAlias</a> </p> </li> </ul>

    Args:
        state_machine_alias_arn: <p>The Amazon Resource Name (ARN) of the state machine alias to delete.</p>

    Raises:
        capo_sfn.errors.conflict_exception.ConflictException: <p>Updating or deleting a resource can cause an inconsistent state. This error occurs when there're concurrent requests for <a>DeleteStateMachineVersion</a>, <a>PublishStateMachineVersion</a>, or <a>UpdateStateMachine</a> with the <code>publish</code> parameter set to <code>true</code>.</p> <p>HTTP Status Code: 409</p>
        capo_sfn.errors.invalid_arn.InvalidArn: <p>The provided Amazon Resource Name (ARN) is not valid.</p>
        capo_sfn.errors.resource_not_found.ResourceNotFound: <p>Could not find the referenced resource.</p>
        capo_sfn.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_sfn.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_sfn.types.delete_state_machine_alias_input.DeleteStateMachineAliasInput]",
    ) -> AsyncOperationResponse[
        "capo_sfn.types.delete_state_machine_alias_output.DeleteStateMachineAliasOutput"
    ]:
        import capo_sfn._operations.aws_step_functions.delete_state_machine_alias

        (
            output,
            http_response,
        ) = await capo_sfn._operations.aws_step_functions.delete_state_machine_alias.async_delete_state_machine_alias(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteStateMachineAlias")
    )
    input_: capo_sfn.types.delete_state_machine_alias_input.DeleteStateMachineAliasInput = {
        "state_machine_alias_arn": state_machine_alias_arn
    }

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