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
arnstring
namestring
definition_stringstring
role_arnstring
state_machine_namestring
state_machine_typestring
state_machine_revision_idstring
logging_configurationobject
tracing_configurationobject
encryption_configurationobject
definition_s3_locationobject
definition_substitutionsobject
definitionobject
tagsarray
regionstringAWS region.

For more information, see AWS::StepFunctions::StateMachine.

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,
arn,
name,
definition_string,
role_arn,
state_machine_name,
state_machine_type,
state_machine_revision_id,
logging_configuration,
tracing_configuration,
encryption_configuration,
definition_s3_location,
definition_substitutions,
definition,
tags
FROM aws.stepfunctions.state_machines
WHERE region = 'us-east-1';

Gets all properties from an individual state_machine.

SELECT
region,
arn,
name,
definition_string,
role_arn,
state_machine_name,
state_machine_type,
state_machine_revision_id,
logging_configuration,
tracing_configuration,
encryption_configuration,
definition_s3_location,
definition_substitutions,
definition,
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:

Create

states:CreateStateMachine,
states:DescribeStateMachine,
states:TagResource,
iam:PassRole,
s3:GetObject,
kms:DescribeKey,
kms:GenerateDataKey

Read

states:DescribeStateMachine,
states:ListTagsForResource,
kms:Decrypt

Update

states:UpdateStateMachine,
states:TagResource,
states:UntagResource,
states:ListTagsForResource,
iam:PassRole,
kms:DescribeKey,
kms:GenerateDataKey

Delete

states:DeleteStateMachine,
states:DescribeStateMachine

List

states:ListStateMachines