AWS Step Functions

2017/11/15 - AWS Step Functions - 2 new api methods

Changes  You can now use the UpdateStateMachine API to update your state machine definition and role ARN. Existing executions will continue to use the previous definition and role ARN. You can use the DescribeStateMachineForExecution API to determine which state machine definition and role ARN is associated with an execution

UpdateStateMachine (new) Link ¶

Updates an existing state machine by modifying its definition and/or roleArn . Running executions will continue to use the previous definition and roleArn .

Note

All StartExecution calls within a few seconds will use the updated definition and roleArn . Executions started immediately after calling UpdateStateMachine may use the previous state machine definition and roleArn . You must include at least one of definition or roleArn or you will receive a MissingRequiredParameter error.

See also: AWS API Documentation

Request Syntax

client.update_state_machine(
    stateMachineArn='string',
    definition='string',
    roleArn='string'
)
type stateMachineArn

string

param stateMachineArn

[REQUIRED]

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

type definition

string

param definition

The Amazon States Language definition of the state machine.

type roleArn

string

param roleArn

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

rtype

dict

returns

Response Syntax

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

Response Structure

  • (dict) --

    • updateDate (datetime) --

      The date and time the state machine was updated.

DescribeStateMachineForExecution (new) Link ¶

Describes the state machine associated with a specific execution.

See also: AWS API Documentation

Request Syntax

client.describe_state_machine_for_execution(
    executionArn='string'
)
type executionArn

string

param executionArn

[REQUIRED]

The Amazon Resource Name (ARN) of the execution you want state machine information for.

rtype

dict

returns

Response Syntax

{
    'stateMachineArn': 'string',
    'name': 'string',
    'definition': 'string',
    'roleArn': 'string',
    'updateDate': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • stateMachineArn (string) --

      The Amazon Resource Name (ARN) of the state machine associated with the execution.

    • name (string) --

      The name of the state machine associated with the execution.

    • definition (string) --

      The Amazon States Language definition of the state machine.

    • roleArn (string) --

      The Amazon Resource Name (ARN) of the IAM role of the State Machine for the execution.

    • updateDate (datetime) --

      The date and time the state machine associated with an execution was updated. For a newly created state machine, this is the creation date.