2020/09/14 - AWS Step Functions - 6 updated api methods
Changes Update stepfunctions client to latest version
{'tracingConfiguration': {'enabled': 'boolean'}}
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. For more information, see Amazon States Language in the AWS Step Functions User Guide.
See also: AWS API Documentation
Request Syntax
client.create_state_machine( name='string', definition='string', roleArn='string', type='STANDARD'|'EXPRESS', loggingConfiguration={ 'level': 'ALL'|'ERROR'|'FATAL'|'OFF', 'includeExecutionData': True|False, 'destinations': [ { 'cloudWatchLogsLogGroup': { 'logGroupArn': 'string' } }, ] }, tags=[ { 'key': 'string', 'value': 'string' }, ], tracingConfiguration={ 'enabled': True|False } )
string
[REQUIRED]
The name of the state machine.
A name must not contain:
white space
brackets < > { } [ ]
wildcard characters ? *
special characters " # % \ ^ | ~ ` $ & , ; : /
control characters ( U+0000-001F, U+007F-009F)
To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z, - and _.
string
[REQUIRED]
The Amazon States Language definition of the state machine. See Amazon States Language.
string
[REQUIRED]
The Amazon Resource Name (ARN) of the IAM role to use for this state machine.
string
Determines whether a Standard or Express state machine is created. The default is STANDARD. You cannot update the type of a state machine once it has been created.
dict
Defines what execution history events are logged and where they are logged.
level (string) --
Defines which category of execution history events are logged.
includeExecutionData (boolean) --
Determines whether execution data is included in your log. When set to false, data is excluded.
destinations (list) --
An array of objects that describes where your execution history events will be logged. Limited to size 1. Required, if your log level is not set to OFF.
(dict) --
cloudWatchLogsLogGroup (dict) --
An object describing a CloudWatch log group. For more information, see AWS::Logs::LogGroup in the AWS CloudFormation User Guide.
logGroupArn (string) --
The ARN of the the CloudWatch log group to which you want your logs emitted to. The ARN must end with :*
list
Tags to be added when creating a state machine.
An array of key-value pairs. For more information, see Using Cost Allocation Tags in the AWS Billing and Cost Management User Guide, and Controlling Access Using IAM Tags.
Tags may only contain Unicode letters, digits, white space, or these symbols: _ . : / = + - @.
(dict) --
Tags are key-value pairs that can be associated with Step Functions state machines and activities.
An array of key-value pairs. For more information, see Using Cost Allocation Tags in the AWS Billing and Cost Management User Guide, and Controlling Access Using IAM Tags.
Tags may only contain Unicode letters, digits, white space, or these symbols: _ . : / = + - @.
key (string) --
The key of a tag.
value (string) --
The value of a tag.
dict
Selects whether AWS X-Ray tracing is enabled.
enabled (boolean) --
When set to true, AWS X-Ray tracing is enabled.
dict
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.
{'traceHeader': 'string'}
Describes an execution.
This API action is not supported by EXPRESS state machines.
See also: AWS API Documentation
Request Syntax
client.describe_execution( executionArn='string' )
string
[REQUIRED]
The Amazon Resource Name (ARN) of the execution to describe.
dict
Response Syntax
{ 'executionArn': 'string', 'stateMachineArn': 'string', 'name': 'string', 'status': 'RUNNING'|'SUCCEEDED'|'FAILED'|'TIMED_OUT'|'ABORTED', 'startDate': datetime(2015, 1, 1), 'stopDate': datetime(2015, 1, 1), 'input': 'string', 'inputDetails': { 'included': True|False }, 'output': 'string', 'outputDetails': { 'included': True|False }, 'traceHeader': 'string' }
Response Structure
(dict) --
executionArn (string) --
The Amazon Resource Name (ARN) that id entifies the execution.
stateMachineArn (string) --
The Amazon Resource Name (ARN) of the executed stated machine.
name (string) --
The name of the execution.
A name must not contain:
white space
brackets < > { } [ ]
wildcard characters ? *
special characters " # % \ ^ | ~ ` $ & , ; : /
control characters ( U+0000-001F, U+007F-009F)
To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z, - and _.
status (string) --
The current status of the execution.
startDate (datetime) --
The date the execution is started.
stopDate (datetime) --
If the execution has already ended, the date the execution stopped.
input (string) --
The string that contains the JSON input data of the execution. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.
inputDetails (dict) --
Provides details about execution input or output.
included (boolean) --
Indicates whether input or output was included in the response. Always true for API calls.
output (string) --
The JSON output data of the execution. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.
outputDetails (dict) --
Provides details about execution input or output.
included (boolean) --
Indicates whether input or output was included in the response. Always true for API calls.
traceHeader (string) --
The AWS X-Ray trace header which was passed to the execution.
{'tracingConfiguration': {'enabled': 'boolean'}}
Describes a state machine.
See also: AWS API Documentation
Request Syntax
client.describe_state_machine( stateMachineArn='string' )
string
[REQUIRED]
The Amazon Resource Name (ARN) of the state machine to describe.
dict
Response Syntax
{ 'stateMachineArn': 'string', 'name': 'string', 'status': 'ACTIVE'|'DELETING', 'definition': 'string', 'roleArn': 'string', 'type': 'STANDARD'|'EXPRESS', 'creationDate': datetime(2015, 1, 1), 'loggingConfiguration': { 'level': 'ALL'|'ERROR'|'FATAL'|'OFF', 'includeExecutionData': True|False, 'destinations': [ { 'cloudWatchLogsLogGroup': { 'logGroupArn': 'string' } }, ] }, 'tracingConfiguration': { 'enabled': True|False } }
Response Structure
(dict) --
stateMachineArn (string) --
The Amazon Resource Name (ARN) that identifies the state machine.
name (string) --
The name of the state machine.
A name must not contain:
white space
brackets < > { } [ ]
wildcard characters ? *
special characters " # % \ ^ | ~ ` $ & , ; : /
control characters ( U+0000-001F, U+007F-009F)
To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z, - and _.
status (string) --
The current status of the state machine.
definition (string) --
The Amazon States Language definition of the state machine. See Amazon States Language.
roleArn (string) --
The Amazon Resource Name (ARN) of the IAM role used when creating this state machine. (The IAM role maintains security by granting Step Functions access to AWS resources.)
type (string) --
The type of the state machine ( STANDARD or EXPRESS).
creationDate (datetime) --
The date the state machine is created.
loggingConfiguration (dict) --
The LoggingConfiguration data type is used to set CloudWatch Logs options.
level (string) --
Defines which category of execution history events are logged.
includeExecutionData (boolean) --
Determines whether execution data is included in your log. When set to false, data is excluded.
destinations (list) --
An array of objects that describes where your execution history events will be logged. Limited to size 1. Required, if your log level is not set to OFF.
(dict) --
cloudWatchLogsLogGroup (dict) --
An object describing a CloudWatch log group. For more information, see AWS::Logs::LogGroup in the AWS CloudFormation User Guide.
logGroupArn (string) --
The ARN of the the CloudWatch log group to which you want your logs emitted to. The ARN must end with :*
tracingConfiguration (dict) --
Selects whether AWS X-Ray tracing is enabled.
enabled (boolean) --
When set to true, AWS X-Ray tracing is enabled.
{'tracingConfiguration': {'enabled': 'boolean'}}
Describes the state machine associated with a specific execution.
This API action is not supported by EXPRESS state machines.
See also: AWS API Documentation
Request Syntax
client.describe_state_machine_for_execution( executionArn='string' )
string
[REQUIRED]
The Amazon Resource Name (ARN) of the execution you want state machine information for.
dict
Response Syntax
{ 'stateMachineArn': 'string', 'name': 'string', 'definition': 'string', 'roleArn': 'string', 'updateDate': datetime(2015, 1, 1), 'loggingConfiguration': { 'level': 'ALL'|'ERROR'|'FATAL'|'OFF', 'includeExecutionData': True|False, 'destinations': [ { 'cloudWatchLogsLogGroup': { 'logGroupArn': 'string' } }, ] }, 'tracingConfiguration': { 'enabled': True|False } }
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. See Amazon States Language.
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.
loggingConfiguration (dict) --
The LoggingConfiguration data type is used to set CloudWatch Logs options.
level (string) --
Defines which category of execution history events are logged.
includeExecutionData (boolean) --
Determines whether execution data is included in your log. When set to false, data is excluded.
destinations (list) --
An array of objects that describes where your execution history events will be logged. Limited to size 1. Required, if your log level is not set to OFF.
(dict) --
cloudWatchLogsLogGroup (dict) --
An object describing a CloudWatch log group. For more information, see AWS::Logs::LogGroup in the AWS CloudFormation User Guide.
logGroupArn (string) --
The ARN of the the CloudWatch log group to which you want your logs emitted to. The ARN must end with :*
tracingConfiguration (dict) --
Selects whether AWS X-Ray tracing is enabled.
enabled (boolean) --
When set to true, AWS X-Ray tracing is enabled.
{'traceHeader': 'string'}
Starts a state machine execution.
See also: AWS API Documentation
Request Syntax
client.start_execution( stateMachineArn='string', name='string', input='string', traceHeader='string' )
string
[REQUIRED]
The Amazon Resource Name (ARN) of the state machine to execute.
string
The name of the execution. This name must be unique for your AWS account, region, and state machine 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:
white space
brackets < > { } [ ]
wildcard characters ? *
special characters " # % \ ^ | ~ ` $ & , ; : /
control characters ( U+0000-001F, U+007F-009F)
To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z, - and _.
string
The string that contains the JSON input data for the execution, for example:
"input": "{\"first_name\" : \"test\"}"
Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.
string
Passes the AWS X-Ray trace header. The trace header can also be passed in the request payload.
dict
Response Syntax
{ 'executionArn': 'string', 'startDate': datetime(2015, 1, 1) }
Response Structure
(dict) --
executionArn (string) --
The Amazon Resource Name (ARN) that id entifies the execution.
startDate (datetime) --
The date the execution is started.
{'tracingConfiguration': {'enabled': 'boolean'}}
Updates an existing state machine by modifying its definition, roleArn, or loggingConfiguration. Running executions will continue to use the previous 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', loggingConfiguration={ 'level': 'ALL'|'ERROR'|'FATAL'|'OFF', 'includeExecutionData': True|False, 'destinations': [ { 'cloudWatchLogsLogGroup': { 'logGroupArn': 'string' } }, ] }, tracingConfiguration={ 'enabled': True|False } )
string
[REQUIRED]
The Amazon Resource Name (ARN) of the state machine.
string
The Amazon States Language definition of the state machine. See Amazon States Language.
string
The Amazon Resource Name (ARN) of the IAM role of the state machine.
dict
The LoggingConfiguration data type is used to set CloudWatch Logs options.
level (string) --
Defines which category of execution history events are logged.
includeExecutionData (boolean) --
Determines whether execution data is included in your log. When set to false, data is excluded.
destinations (list) --
An array of objects that describes where your execution history events will be logged. Limited to size 1. Required, if your log level is not set to OFF.
(dict) --
cloudWatchLogsLogGroup (dict) --
An object describing a CloudWatch log group. For more information, see AWS::Logs::LogGroup in the AWS CloudFormation User Guide.
logGroupArn (string) --
The ARN of the the CloudWatch log group to which you want your logs emitted to. The ARN must end with :*
dict
Selects whether AWS X-Ray tracing is enabled.
enabled (boolean) --
When set to true, AWS X-Ray tracing is enabled.
dict
Response Syntax
{ 'updateDate': datetime(2015, 1, 1) }
Response Structure
(dict) --
updateDate (datetime) --
The date and time the state machine was updated.