state_machine_alias
Creates, updates, deletes, gets or lists a state_machine_alias resource.
Overview
| Name | state_machine_alias |
| Type | Resource |
| Id | aws.stepfunctions.state_machine_alias |
Fields
The following fields are returned by SELECT queries:
- describe_state_machine_alias
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the state machine alias. |
creation_date | string (date-time) | The date the state machine alias was created. |
description | string | A description of the alias. |
routing_configuration | array | The routing configuration of the alias. |
state_machine_alias_arn | string | The Amazon Resource Name (ARN) of the state machine alias. |
update_date | string (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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_state_machine_alias | select | region | Returns details about a state machine alias. Related operations: CreateStateMachineAlias ListStateMachineAliases UpdateStateMachineAlias DeleteStateMachineAlias | |
create_state_machine_alias | insert | region, name, routingConfiguration | 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 | |
update_state_machine_alias | update | region, stateMachineAliasArn | 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 | |
delete_state_machine_alias | delete | region | 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 |
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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_state_machine_alias
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
- create_state_machine_alias
- Manifest
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
;
# Description fields are for documentation purposes
- name: state_machine_alias
props:
- name: region
value: "{{ region }}"
description: Required parameter for the state_machine_alias resource.
- name: description
value: "{{ description }}"
description: |
A description for the state machine alias.
- name: name
value: "{{ name }}"
description: |
The name of the state machine alias. To avoid conflict with version ARNs, don't use an integer in the name of the alias.
- name: routingConfiguration
description: |
The routing configuration of a state machine alias. The routing configuration shifts execution traffic between two state machine versions. routingConfiguration contains an array of RoutingConfig objects that specify up to two state machine versions. Step Functions then randomly choses which version to run an execution with based on the weight assigned to each RoutingConfig.
value:
- stateMachineVersionArn: "{{ stateMachineVersionArn }}"
weight: {{ weight }}
UPDATE examples
- update_state_machine_alias
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
- delete_state_machine_alias
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
;