state_machines
Creates, updates, deletes or gets a state_machine
resource or lists state_machines
in a region
Overview
Name | state_machines |
Type | Resource |
Description | Resource schema for StateMachine |
Id | aws.stepfunctions.state_machines |
Fields
Name | Datatype | Description |
---|---|---|
definition_substitutions | object | |
definition | object | |
role_arn | string | |
name | string | |
state_machine_type | string | |
tracing_configuration | object | |
definition_string | string | |
logging_configuration | object | |
state_machine_revision_id | string | |
definition_s3_location | object | |
arn | string | |
state_machine_name | string | |
tags | array | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | RoleArn, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.stepfunctions.state_machines (
RoleArn,
region
)
SELECT
'{{ RoleArn }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.stepfunctions.state_machines (
DefinitionSubstitutions,
Definition,
RoleArn,
StateMachineType,
TracingConfiguration,
DefinitionString,
LoggingConfiguration,
DefinitionS3Location,
StateMachineName,
Tags,
region
)
SELECT
'{{ DefinitionSubstitutions }}',
'{{ Definition }}',
'{{ RoleArn }}',
'{{ StateMachineType }}',
'{{ TracingConfiguration }}',
'{{ DefinitionString }}',
'{{ LoggingConfiguration }}',
'{{ DefinitionS3Location }}',
'{{ StateMachineName }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: state_machine
props:
- name: DefinitionSubstitutions
value: {}
- name: Definition
value: {}
- name: RoleArn
value: '{{ RoleArn }}'
- name: StateMachineType
value: '{{ StateMachineType }}'
- name: TracingConfiguration
value:
Enabled: '{{ Enabled }}'
- name: DefinitionString
value: '{{ DefinitionString }}'
- name: LoggingConfiguration
value:
IncludeExecutionData: '{{ IncludeExecutionData }}'
Destinations:
- CloudWatchLogsLogGroup:
LogGroupArn: '{{ LogGroupArn }}'
Level: '{{ Level }}'
- name: DefinitionS3Location
value:
Bucket: '{{ Bucket }}'
Version: '{{ Version }}'
Key: '{{ Key }}'
- name: StateMachineName
value: '{{ StateMachineName }}'
- name: Tags
value:
- Value: '{{ Value }}'
Key: '{{ Key }}'
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