SFN / Client / update_state_machine_alias

update_state_machine_alias#

SFN.Client.update_state_machine_alias(**kwargs)#

Updates the configuration of an existing state machine alias by modifying its description or routingConfiguration.

You must specify at least one of the description or routingConfiguration parameters to update a state machine alias.

Note

UpdateStateMachineAlias is an idempotent API. Step Functions bases the idempotency check on the stateMachineAliasArn, description, and routingConfiguration parameters. Requests with the same parameters return an idempotent response.

Note

This operation is eventually consistent. All StartExecution requests made within a few seconds use the latest alias configuration. Executions started immediately after calling UpdateStateMachineAlias may use the previous routing configuration.

Related operations:

  • CreateStateMachineAlias

  • DescribeStateMachineAlias

  • ListStateMachineAliases

  • DeleteStateMachineAlias

See also: AWS API Documentation

Request Syntax

response = client.update_state_machine_alias(
    stateMachineAliasArn='string',
    description='string',
    routingConfiguration=[
        {
            'stateMachineVersionArn': 'string',
            'weight': 123
        },
    ]
)
Parameters:
  • stateMachineAliasArn (string) –

    [REQUIRED]

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

  • description (string) – A description of the state machine alias.

  • routingConfiguration (list) –

    The routing configuration of the state machine alias.

    An array of RoutingConfig objects that specifies up to two state machine versions that the alias starts executions for.

    • (dict) –

      Contains details about the routing configuration of a state machine alias. In a routing configuration, you define an array of objects that specify up to two state machine versions. You also specify the percentage of traffic to be routed to each version.

      • stateMachineVersionArn (string) – [REQUIRED]

        The Amazon Resource Name (ARN) that identifies one or two state machine versions defined in the routing configuration.

        If you specify the ARN of a second version, it must belong to the same state machine as the first version.

      • weight (integer) – [REQUIRED]

        The percentage of traffic you want to route to a state machine version. The sum of the weights in the routing configuration must be equal to 100.

Return type:

dict

Returns:

Response Syntax

{
    'updateDate': datetime(2015, 1, 1)
}

Response Structure

  • (dict) –

    • updateDate (datetime) –

      The date and time the state machine alias was updated.

Exceptions