CreateActionCommand

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 .

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { SageMakerClient, CreateActionCommand } from "@aws-sdk/client-sagemaker"; // ES Modules import
// const { SageMakerClient, CreateActionCommand } = require("@aws-sdk/client-sagemaker"); // CommonJS import
const client = new SageMakerClient(config);
const input = { // CreateActionRequest
  ActionName: "STRING_VALUE", // required
  Source: { // ActionSource
    SourceUri: "STRING_VALUE", // required
    SourceType: "STRING_VALUE",
    SourceId: "STRING_VALUE",
  },
  ActionType: "STRING_VALUE", // required
  Description: "STRING_VALUE",
  Status: "Unknown" || "InProgress" || "Completed" || "Failed" || "Stopping" || "Stopped",
  Properties: { // LineageEntityParameters
    "<keys>": "STRING_VALUE",
  },
  MetadataProperties: { // MetadataProperties
    CommitId: "STRING_VALUE",
    Repository: "STRING_VALUE",
    GeneratedBy: "STRING_VALUE",
    ProjectId: "STRING_VALUE",
  },
  Tags: [ // TagList
    { // Tag
      Key: "STRING_VALUE", // required
      Value: "STRING_VALUE", // required
    },
  ],
};
const command = new CreateActionCommand(input);
const response = await client.send(command);
// { // CreateActionResponse
//   ActionArn: "STRING_VALUE",
// };

CreateActionCommand Input

See CreateActionCommandInput for more details

Parameter
Type
Description
ActionName
Required
string | undefined

The name of the action. Must be unique to your account in an Amazon Web Services Region.

ActionType
Required
string | undefined

The action type.

Source
Required
ActionSource | undefined

The source type, ID, and URI.

Description
string | undefined

The description of the action.

MetadataProperties
MetadataProperties | undefined

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

Properties
Record<string, string> | undefined

A list of properties to add to the action.

Status
ActionStatus | undefined

The status of the action.

Tags
Tag[] | undefined

A list of tags to apply to the action.

CreateActionCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
ActionArn
string | undefined

The Amazon Resource Name (ARN) of the action.

Throws

Name
Fault
Details
ResourceLimitExceeded
client

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

SageMakerServiceException
Base exception class for all service exceptions from SageMaker service.