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

@Generated(value="jsii-pacmak/1.138.0 (build 0ca7ee8)", date="2026-08-10T14:51:11.160Z") @Stability(Stable) public class CfnAction extends CfnResource implements IInspectable, IActionRef, ITaggableV2
Resource type definition for AWS::SageMaker::Action.

An action is a lineage tracking entity that represents an action or activity, such as a model deployment or an HPO job.

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.*;
 CfnAction cfnAction = CfnAction.Builder.create(this, "MyCfnAction")
         .actionName("actionName")
         .actionType("actionType")
         .source(ActionSourceProperty.builder()
                 .sourceUri("sourceUri")
                 // the properties below are optional
                 .sourceId("sourceId")
                 .sourceType("sourceType")
                 .build())
         // the properties below are optional
         .description("description")
         .metadataProperties(MetadataPropertiesProperty.builder()
                 .commitId("commitId")
                 .generatedBy("generatedBy")
                 .projectId("projectId")
                 .repository("repository")
                 .build())
         .properties(Map.of(
                 "propertiesKey", "properties"))
         .status("status")
         .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

    • CfnAction

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

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

      @Stability(Stable) public CfnAction(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnActionProps props)
      Create a new AWS::SageMaker::Action.

      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

    • arnForAction

      @Stability(Stable) @NotNull public static String arnForAction(@NotNull IActionRef resource)
      Parameters:
      resource - This parameter is required.
    • isCfnAction

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

      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.
    • getActionRef

      @Stability(Stable) @NotNull public ActionReference getActionRef()
      A reference to a Action resource.
      Specified by:
      getActionRef in interface IActionRef
    • getAttrArn

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

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

      @Stability(Stable) @NotNull public String getAttrLastModifiedTime()
      When the action 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
    • getActionName

      @Stability(Stable) @NotNull public String getActionName()
      The name of the action.
    • setActionName

      @Stability(Stable) public void setActionName(@NotNull String value)
      The name of the action.
    • getActionType

      @Stability(Stable) @NotNull public String getActionType()
      The action type.
    • setActionType

      @Stability(Stable) public void setActionType(@NotNull String value)
      The action type.
    • getSource

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

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

      @Stability(Stable) public void setSource(@NotNull CfnAction.ActionSourceProperty value)
    • getDescription

      @Stability(Stable) @Nullable public String getDescription()
      The description of the action.
    • setDescription

      @Stability(Stable) public void setDescription(@Nullable String value)
      The description of the action.
    • getMetadataProperties

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

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

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

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

      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 action.
    • setProperties

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

      @Stability(Stable) @Nullable public String getStatus()
      The status of the action.
    • setStatus

      @Stability(Stable) public void setStatus(@Nullable String value)
      The status of the action.
    • getTags

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

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