Skip to main content

state_machine_alias

Creates, updates, deletes, gets or lists a state_machine_alias resource.

Overview

Namestate_machine_alias
TypeResource
Idaws.stepfunctions.state_machine_alias

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringThe name of the state machine alias.
creation_datestring (date-time)The date the state machine alias was created.
descriptionstringA description of the alias.
routing_configurationarrayThe routing configuration of the alias.
state_machine_alias_arnstringThe Amazon Resource Name (ARN) of the state machine alias.
update_datestring (date-time)The date the state machine alias was last updated. For a newly created state machine, this is the same as the creation date.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_state_machine_aliasselectregionReturns details about a state machine alias. Related operations: CreateStateMachineAlias ListStateMachineAliases UpdateStateMachineAlias DeleteStateMachineAlias
create_state_machine_aliasinsertregion, name, routingConfigurationCreates an alias for a state machine that points to one or two versions of the same state machine. You can set your application to call StartExecution with an alias and update the version the alias uses without changing the client's code. You can also map an alias to split StartExecution requests between two versions of a state machine. To do this, add a second RoutingConfig object in the routingConfiguration parameter. You must also specify the percentage of execution run requests each version should receive in both RoutingConfig objects. Step Functions randomly chooses which version runs a given execution based on the percentage you specify. To create an alias that points to a single version, specify a single RoutingConfig object with a weight set to 100. You can create up to 100 aliases for each state machine. You must delete unused aliases using the DeleteStateMachineAlias API action. CreateStateMachineAlias is an idempotent API. Step Functions bases the idempotency check on the stateMachineArn, description, name, and routingConfiguration parameters. Requests that contain the same values for these parameters return a successful idempotent response without creating a duplicate resource. Related operations: DescribeStateMachineAlias ListStateMachineAliases UpdateStateMachineAlias DeleteStateMachineAlias
update_state_machine_aliasupdateregion, stateMachineAliasArnUpdates 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. 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. 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
delete_state_machine_aliasdeleteregionDeletes 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: CreateStateMachineAlias DescribeStateMachineAlias ListStateMachineAliases UpdateStateMachineAlias

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Returns details about a state machine alias. Related operations: CreateStateMachineAlias ListStateMachineAliases UpdateStateMachineAlias DeleteStateMachineAlias

SELECT
name,
creation_date,
description,
routing_configuration,
state_machine_alias_arn,
update_date
FROM aws.stepfunctions.state_machine_alias
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates an alias for a state machine that points to one or two versions of the same state machine. You can set your application to call StartExecution with an alias and update the version the alias uses without changing the client's code. You can also map an alias to split StartExecution requests between two versions of a state machine. To do this, add a second RoutingConfig object in the routingConfiguration parameter. You must also specify the percentage of execution run requests each version should receive in both RoutingConfig objects. Step Functions randomly chooses which version runs a given execution based on the percentage you specify. To create an alias that points to a single version, specify a single RoutingConfig object with a weight set to 100. You can create up to 100 aliases for each state machine. You must delete unused aliases using the DeleteStateMachineAlias API action. CreateStateMachineAlias is an idempotent API. Step Functions bases the idempotency check on the stateMachineArn, description, name, and routingConfiguration parameters. Requests that contain the same values for these parameters return a successful idempotent response without creating a duplicate resource. Related operations: DescribeStateMachineAlias ListStateMachineAliases UpdateStateMachineAlias DeleteStateMachineAlias

INSERT INTO aws.stepfunctions.state_machine_alias (
description,
name,
routingConfiguration,
region
)
SELECT
'{{ description }}',
'{{ name }}' /* required */,
'{{ routingConfiguration }}' /* required */,
'{{ region }}'
RETURNING
creation_date,
state_machine_alias_arn
;

UPDATE examples

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. 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. 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

UPDATE aws.stepfunctions.state_machine_alias
SET
stateMachineAliasArn = '{{ stateMachineAliasArn }}',
description = '{{ description }}',
routingConfiguration = '{{ routingConfiguration }}'
WHERE
region = '{{ region }}' --required
AND stateMachineAliasArn = '{{ stateMachineAliasArn }}' --required
RETURNING
update_date;

DELETE examples

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: CreateStateMachineAlias DescribeStateMachineAlias ListStateMachineAliases UpdateStateMachineAlias

DELETE FROM aws.stepfunctions.state_machine_alias
WHERE region = '{{ region }}' --required
;