Menu
AWS Step Functions
API Reference (API Version 2016-11-23)

CreateActivity

Creates an activity. An Activity is a task which you write, in any language and hosted on any machine which has access to AWS Step Functions. Activities must poll Step Functions using the GetActivityTask and respond using SendTask* API calls. This function lets Step Functions know the existence of your activity and returns an identifier for use in a state machine and when polling from the activity.

Request Syntax

Copy
{ "name": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

name

The name of the activity to create. This name must be unique for your AWS account and region 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:

  • whitespace

  • brackets < > { } [ ]

  • wildcard characters ? *

  • special characters " # % \ ^ | ~ ` $ & , ; : /

  • control characters (U+0000-001F, U+007F-009F)

Type: String

Length Constraints: Minimum length of 1. Maximum length of 80.

Required: Yes

Response Syntax

Copy
{ "activityArn": "string", "creationDate": number }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

activityArn

The Amazon Resource Name (ARN) that identifies the created activity.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 256.

creationDate

The date the activity was created.

Type: Timestamp

Errors

For information about the errors that are common to all actions, see Common Errors.

ActivityLimitExceeded

The maximum number of activities has been reached. Existing activities must be deleted before a new activity can be created.

HTTP Status Code: 400

InvalidName

The provided name is invalid.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: