Class CfnArtifact

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, IEnvironmentAware, IArtifactRef, ITaggableV2, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.139.0 (build 26a6b54)", date="2026-09-02T11:03:18.384Z") @Stability(Stable) public class CfnArtifact extends CfnResource implements IInspectable, IArtifactRef, ITaggableV2
Resource type definition for AWS::SageMaker::Artifact.

An artifact is a lineage tracking entity that represents a URI addressable object or data, such as an S3 URI of a dataset or the ECR registry path of an image.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.sagemaker.*;
 CfnArtifact cfnArtifact = CfnArtifact.Builder.create(this, "MyCfnArtifact")
         .artifactType("artifactType")
         .source(ArtifactSourceProperty.builder()
                 .sourceUri("sourceUri")
                 // the properties below are optional
                 .sourceTypes(List.of(ArtifactSourceTypeProperty.builder()
                         .sourceIdType("sourceIdType")
                         .value("value")
                         .build()))
                 .build())
         // the properties below are optional
         .artifactName("artifactName")
         .metadataProperties(MetadataPropertiesProperty.builder()
                 .commitId("commitId")
                 .generatedBy("generatedBy")
                 .projectId("projectId")
                 .repository("repository")
                 .build())
         .properties(Map.of(
                 "propertiesKey", "properties"))
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnArtifact

      protected CfnArtifact(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnArtifact

      protected CfnArtifact(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnArtifact

      @Stability(Stable) public CfnArtifact(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnArtifactProps props)
      Create a new AWS::SageMaker::Artifact.

      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • arnForArtifact

      @Stability(Stable) @NotNull public static String arnForArtifact(@NotNull IArtifactRef resource)
      Parameters:
      resource - This parameter is required.
    • isCfnArtifact

      @Stability(Stable) @NotNull public static Boolean isCfnArtifact(@NotNull Object x)
      Checks whether the given object is a CfnArtifact.

      Parameters:
      x - This parameter is required.
    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getArtifactRef

      @Stability(Stable) @NotNull public ArtifactReference getArtifactRef()
      A reference to a Artifact resource.
      Specified by:
      getArtifactRef in interface IArtifactRef
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      The Amazon Resource Name (ARN) of the artifact.
    • getAttrCreationTime

      @Stability(Stable) @NotNull public String getAttrCreationTime()
      When the artifact was created.
    • getAttrLastModifiedTime

      @Stability(Stable) @NotNull public String getAttrLastModifiedTime()
      When the artifact was last modified.
    • getCdkTagManager

      @Stability(Stable) @NotNull public TagManager getCdkTagManager()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getCdkTagManager in interface ITaggableV2
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getCfnPropertyNames

      @Stability(Stable) @NotNull protected Map<String,String> getCfnPropertyNames()
      Overrides:
      getCfnPropertyNames in class CfnResource
    • getArtifactType

      @Stability(Stable) @NotNull public String getArtifactType()
      The artifact type.
    • setArtifactType

      @Stability(Stable) public void setArtifactType(@NotNull String value)
      The artifact type.
    • getSource

      @Stability(Stable) @NotNull public Object getSource()
    • setSource

      @Stability(Stable) public void setSource(@NotNull IResolvable value)
    • setSource

      @Stability(Stable) public void setSource(@NotNull CfnArtifact.ArtifactSourceProperty value)
    • getArtifactName

      @Stability(Stable) @Nullable public String getArtifactName()
      The name of the artifact.
    • setArtifactName

      @Stability(Stable) public void setArtifactName(@Nullable String value)
      The name of the artifact.
    • getMetadataProperties

      @Stability(Stable) @Nullable public Object getMetadataProperties()
    • setMetadataProperties

      @Stability(Stable) public void setMetadataProperties(@Nullable IResolvable value)
    • setMetadataProperties

      @Stability(Stable) public void setMetadataProperties(@Nullable CfnArtifact.MetadataPropertiesProperty value)
    • getProperties

      @Stability(Stable) @Nullable public Object getProperties()
      A list of properties to add to the artifact.

      Returns union: either IResolvable or Mapinvalid input: '<'String, String>

    • setProperties

      @Stability(Stable) public void setProperties(@Nullable IResolvable value)
      A list of properties to add to the artifact.
    • setProperties

      @Stability(Stable) public void setProperties(@Nullable Map<String,String> value)
      A list of properties to add to the artifact.
    • getTags

      @Stability(Stable) @Nullable public List<CfnTag> getTags()
      A list of tags to apply to the artifact.
    • setTags

      @Stability(Stable) public void setTags(@Nullable List<CfnTag> value)
      A list of tags to apply to the artifact.