Menu
AWS CloudFormation
User Guide (API Version 2010-05-15)

AWS::StepFunctions::Activity

Use the AWS::StepFunctions::Activity resource to create an AWS Step Functions activity.

For information about creating an activity and creating a state machine with an activity, see Tutorial: An Activity State Machine in the AWS Step Functions Developer Guide and CreateActivity in the AWS Step Functions API Reference.

Syntax

JSON

Copy
{ "Type": "AWS::StepFunctions::Activity", "Properties": { "Name": String } }

YAML

Copy
Type: "AWS::StepFunctions::Activity" Properties: Name: String

Properties

Name

The name of the activity to create. This name must be unique for your AWS account and region.

Required: Yes

Type: String

Update requires: Replacement

Return Values

Ref

When you provide the logical ID of this resource to the Ref intrinsic function, Ref returns the ARN of the created activity. For example:

Copy
{ "Ref": "MyActivity" }

Returns a value similar to the following:

Copy
arn:aws:states:us-east-1:111122223333:activity:myActivity

For more information about using the Ref function, see Ref.

Fn::GetAtt

Fn::GetAtt returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

Name

Returns the name of the activity. For example:

Copy
{ "Fn::GetAtt": ["MyActivity", "Name"] }

Returns a value similar to the following:

Copy
myActivity

For more information about using Fn::GetAtt, see Fn::GetAtt.

Example

The following example creates a Step Functions activity.

JSON

Copy
{ "AWSTemplateFormatVersion" : "2010-09-09", "Description" : "An example template for a Step Functions activity.", "Resources" : { "MyActivity" : { "Type" : "AWS::StepFunctions::Activity", "Properties" : { "Name" : "myActivity" } } } }

YAML

Copy
AWSTemplateFormatVersion: "2010-09-09" Description: "A sample template for a Step Functions activity" Resources: MyActivity: Type: "AWS::StepFunctions::Activity" Properties: Name: myActivity