AWS Step Functions

2019/02/22 - AWS Step Functions - 2 updated api methods

Changes  Update stepfunctions client to latest version

CreateActivity (updated) Link ¶
Changes (request)
{'tags': [{'key': 'string', 'value': 'string'}]}

Creates an activity. An activity is a task that you write in any programming language and host on any machine that has access to AWS Step Functions. Activities must poll Step Functions using the GetActivityTask API action and respond using SendTask* API actions. This function lets Step Functions know the existence of your activity and returns an identifier for use in a state machine and when polling from the activity.

See also: AWS API Documentation

Request Syntax

client.create_activity(
    name='string',
    tags=[
        {
            'key': 'string',
            'value': 'string'
        },
    ]
)
type name:

string

param name:

[REQUIRED]

The name of the activity to create. This name must be unique for your AWS account and region for 90 days. For more information, see Limits Related to State Machine Executions in the AWS Step Functions Developer Guide.

A name must not contain:

  • whitespace

  • brackets < > { } [ ]

  • wildcard characters ? *

  • special characters " # % \ ^ | ~ ` $ & , ; : /

  • control characters ( U+0000-001F, U+007F-009F)

type tags:

list

param tags:

The list of tags to add to a resource.

  • (dict) --

    Tags are key-value pairs that can be associated with Step Functions state machines and activities.

    • key (string) --

      The key of a tag.

    • value (string) --

      The value of a tag.

rtype:

dict

returns:

Response Syntax

{
    'activityArn': 'string',
    'creationDate': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • activityArn (string) --

      The Amazon Resource Name (ARN) that identifies the created activity.

    • creationDate (datetime) --

      The date the activity is created.

CreateStateMachine (updated) Link ¶
Changes (request)
{'tags': [{'key': 'string', 'value': 'string'}]}

Creates a state machine. A state machine consists of a collection of states that can do work ( Task states), determine to which states to transition next ( Choice states), stop an execution with an error ( Fail states), and so on. State machines are specified using a JSON-based, structured language.

See also: AWS API Documentation

Request Syntax

client.create_state_machine(
    name='string',
    definition='string',
    roleArn='string',
    tags=[
        {
            'key': 'string',
            'value': 'string'
        },
    ]
)
type name:

string

param name:

[REQUIRED]

The name of the state machine.

A name must not contain:

  • whitespace

  • brackets < > { } [ ]

  • wildcard characters ? *

  • special characters " # % \ ^ | ~ ` $ & , ; : /

  • control characters ( U+0000-001F, U+007F-009F)

type definition:

string

param definition:

[REQUIRED]

The Amazon States Language definition of the state machine. See Amazon States Language.

type roleArn:

string

param roleArn:

[REQUIRED]

The Amazon Resource Name (ARN) of the IAM role to use for this state machine.

type tags:

list

param tags:

Tags to be added when creating a state machine.

  • (dict) --

    Tags are key-value pairs that can be associated with Step Functions state machines and activities.

    • key (string) --

      The key of a tag.

    • value (string) --

      The value of a tag.

rtype:

dict

returns:

Response Syntax

{
    'stateMachineArn': 'string',
    'creationDate': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • stateMachineArn (string) --

      The Amazon Resource Name (ARN) that identifies the created state machine.

    • creationDate (datetime) --

      The date the state machine is created.