AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Creates an activity. An activity is a task that you write in any programming language and host on any machine that has access to Step Functions. Activities must poll Step Functions using the GetActivityTask API action and respond using SendTask* API actions. 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.

This operation is eventually consistent. The results are best effort and may not reflect very recent updates and changes.

CreateActivity is an idempotent API. Subsequent requests won’t create a duplicate resource if it was already created. CreateActivity's idempotency check is based on the activity name. If a following request has different tags values, Step Functions will ignore these differences and treat it as an idempotent request of the previous. In this case, tags will not be updated, even if they are different.

Note:

This is an asynchronous operation using the standard naming convention for .NET 4.5 or higher. For .NET 3.5 the operation is implemented as a pair of methods using the standard naming convention of BeginCreateActivity and EndCreateActivity.

Namespace: Amazon.StepFunctions
Assembly: AWSSDK.StepFunctions.dll
Version: 3.x.y.z

Syntax

C#
public abstract Task<CreateActivityResponse> CreateActivityAsync(
         CreateActivityRequest request,
         CancellationToken cancellationToken
)

Parameters

request
Type: Amazon.StepFunctions.Model.CreateActivityRequest

Container for the necessary parameters to execute the CreateActivity service method.

cancellationToken
Type: System.Threading.CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Return Value


The response from the CreateActivity service method, as returned by StepFunctions.

Exceptions

ExceptionCondition
ActivityLimitExceededException The maximum number of activities has been reached. Existing activities must be deleted before a new activity can be created.
InvalidNameException The provided name is not valid.
TooManyTagsException You've exceeded the number of tags allowed for a resource. See the Limits Topic in the Step Functions Developer Guide.

Version Information

.NET Core App:
Supported in: 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.5

See Also