CreateAction - Amazon SageMaker


Creates an action. An action is a lineage tracking entity that represents an action or activity. For example, a model deployment or an HPO job. Generally, an action involves at least one input or output artifact. For more information, see Amazon SageMaker ML Lineage Tracking.


CreateAction can only be invoked from within an SageMaker managed environment. This includes SageMaker training jobs, processing jobs, transform jobs, and SageMaker notebooks. A call to CreateAction from outside one of these environments results in an error.

Request Syntax

{ "ActionName": "string", "ActionType": "string", "Description": "string", "MetadataProperties": { "CommitId": "string", "GeneratedBy": "string", "ProjectId": "string", "Repository": "string" }, "Properties": { "string" : "string" }, "Source": { "SourceId": "string", "SourceType": "string", "SourceUri": "string" }, "Status": "string", "Tags": [ { "Key": "string", "Value": "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.


The name of the action. Must be unique to your account in an AWS Region.

Type: String

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

Pattern: ^[a-zA-Z0-9](-*[a-zA-Z0-9]){0,119}

Required: Yes


The action type.

Type: String

Length Constraints: Maximum length of 256.

Required: Yes


The description of the action.

Type: String

Length Constraints: Maximum length of 3072.

Pattern: .*

Required: No


Metadata properties of the tracking entity, trial, or trial component.

Type: MetadataProperties object

Required: No


A list of properties to add to the action.

Type: String to string map

Map Entries: Maximum number of 30 items.

Key Length Constraints: Maximum length of 256.

Key Pattern: .*

Value Length Constraints: Maximum length of 256.

Value Pattern: .*

Required: No


The source type, ID, and URI.

Type: ActionSource object

Required: Yes


The status of the action.

Type: String

Valid Values: Unknown | InProgress | Completed | Failed | Stopping | Stopped

Required: No


A list of tags to apply to the action.

Type: Array of Tag objects

Array Members: Minimum number of 0 items. Maximum number of 50 items.

Required: No

Response Syntax

{ "ActionArn": "string" }

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.


The Amazon Resource Name (ARN) of the action.

Type: String

Length Constraints: Maximum length of 256.

Pattern: arn:aws[a-z\-]*:sagemaker:[a-z0-9\-]*:[0-9]{12}:action/.*


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


You have exceeded an Amazon SageMaker resource limit. For example, you might have too many training jobs created.

HTTP Status Code: 400

See Also

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