CreateArtifact - Amazon SageMaker

CreateArtifact

Creates an artifact. An artifact is a lineage tracking entity that represents a URI addressable object or data. Some examples are the S3 URI of a dataset and the ECR registry path of an image. For more information, see Amazon SageMaker ML Lineage Tracking.

Note

CreateArtifact 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 CreateArtifact from outside one of these environments results in an error.

Request Syntax

{ "ArtifactName": "string", "ArtifactType": "string", "MetadataProperties": { "CommitId": "string", "GeneratedBy": "string", "ProjectId": "string", "Repository": "string" }, "Properties": { "string" : "string" }, "Source": { "SourceTypes": [ { "SourceIdType": "string", "Value": "string" } ], "SourceUri": "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.

ArtifactName

The name of the artifact. 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: No

ArtifactType

The artifact type.

Type: String

Length Constraints: Maximum length of 256.

Required: Yes

MetadataProperties

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

Type: MetadataProperties object

Required: No

Properties

A list of properties to add to the artifact.

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

Source

The ID, ID type, and URI of the source.

Type: ArtifactSource object

Required: Yes

Tags

A list of tags to apply to the artifact.

Type: Array of Tag objects

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

Required: No

Response Syntax

{ "ArtifactArn": "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.

ArtifactArn

The Amazon Resource Name (ARN) of the artifact.

Type: String

Length Constraints: Maximum length of 256.

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

Errors

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

ResourceLimitExceeded

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: