Skip to main content

state_machines

Creates, updates, deletes or gets a state_machine resource or lists state_machines in a region

Overview

Namestate_machines
TypeResource
DescriptionResource schema for StateMachine
Idaws.stepfunctions.state_machines

Fields

NameDatatypeDescription
definition_substitutionsobject
definitionobject
role_arnstring
namestring
state_machine_typestring
tracing_configurationobject
definition_stringstring
logging_configurationobject
state_machine_revision_idstring
definition_s3_locationobject
arnstring
state_machine_namestring
tagsarray
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTRoleArn, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all state_machines in a region.

SELECT
region,
definition_substitutions,
definition,
role_arn,
name,
state_machine_type,
tracing_configuration,
definition_string,
logging_configuration,
state_machine_revision_id,
definition_s3_location,
arn,
state_machine_name,
tags
FROM aws.stepfunctions.state_machines
WHERE region = 'us-east-1';

Gets all properties from an individual state_machine.

SELECT
region,
definition_substitutions,
definition,
role_arn,
name,
state_machine_type,
tracing_configuration,
definition_string,
logging_configuration,
state_machine_revision_id,
definition_s3_location,
arn,
state_machine_name,
tags
FROM aws.stepfunctions.state_machines
WHERE region = 'us-east-1' AND data__Identifier = '<Arn>';

INSERT example

Use the following StackQL query and manifest file to create a new state_machine resource, using stack-deploy.

/*+ create */
INSERT INTO aws.stepfunctions.state_machines (
RoleArn,
region
)
SELECT
'{{ RoleArn }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.stepfunctions.state_machines
WHERE data__Identifier = '<Arn>'
AND region = 'us-east-1';

Permissions

To operate on the state_machines resource, the following permissions are required:

Read

states:DescribeStateMachine,
states:ListTagsForResource

Create

states:CreateStateMachine,
states:DescribeStateMachine,
states:TagResource,
iam:PassRole,
s3:GetObject

Update

states:UpdateStateMachine,
states:TagResource,
states:UntagResource,
states:ListTagsForResource,
iam:PassRole

List

states:ListStateMachines

Delete

states:DeleteStateMachine,
states:DescribeStateMachine