Class CfnCluster

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

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-12-27T17:02:09.540Z") @Stability(Stable) public class CfnCluster extends CfnResource implements IInspectable, ITaggableV2
Creates a SageMaker HyperPod cluster.

SageMaker HyperPod is a capability of SageMaker for creating and managing persistent clusters for developing large machine learning models, such as large language models (LLMs) and diffusion models. To learn more, see Amazon SageMaker HyperPod in the Amazon SageMaker Developer Guide .

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.*;
 CfnCluster cfnCluster = CfnCluster.Builder.create(this, "MyCfnCluster")
         .instanceGroups(List.of(ClusterInstanceGroupProperty.builder()
                 .executionRole("executionRole")
                 .instanceCount(123)
                 .instanceGroupName("instanceGroupName")
                 .instanceType("instanceType")
                 .lifeCycleConfig(ClusterLifeCycleConfigProperty.builder()
                         .onCreate("onCreate")
                         .sourceS3Uri("sourceS3Uri")
                         .build())
                 // the properties below are optional
                 .currentCount(123)
                 .instanceStorageConfigs(List.of(ClusterInstanceStorageConfigProperty.builder()
                         .ebsVolumeConfig(ClusterEbsVolumeConfigProperty.builder()
                                 .volumeSizeInGb(123)
                                 .build())
                         .build()))
                 .onStartDeepHealthChecks(List.of("onStartDeepHealthChecks"))
                 .overrideVpcConfig(VpcConfigProperty.builder()
                         .securityGroupIds(List.of("securityGroupIds"))
                         .subnets(List.of("subnets"))
                         .build())
                 .threadsPerCore(123)
                 .build()))
         // the properties below are optional
         .clusterName("clusterName")
         .nodeRecovery("nodeRecovery")
         .orchestrator(OrchestratorProperty.builder()
                 .eks(ClusterOrchestratorEksConfigProperty.builder()
                         .clusterArn("clusterArn")
                         .build())
                 .build())
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .vpcConfig(VpcConfigProperty.builder()
                 .securityGroupIds(List.of("securityGroupIds"))
                 .subnets(List.of("subnets"))
                 .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

    • CfnCluster

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

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

      @Stability(Stable) public CfnCluster(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnClusterProps props)
      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

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

      @Stability(Stable) @NotNull public String getAttrClusterArn()
      The Amazon Resource Name (ARN) of the SageMaker HyperPod cluster.
    • getAttrClusterStatus

      @Stability(Stable) @NotNull public String getAttrClusterStatus()
      The status of the SageMaker HyperPod cluster.
    • getAttrCreationTime

      @Stability(Stable) @NotNull public String getAttrCreationTime()
      The time when the SageMaker HyperPod cluster is created.
    • getAttrFailureMessage

      @Stability(Stable) @NotNull public String getAttrFailureMessage()
      The failure message of the SageMaker HyperPod cluster.
    • 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
    • getInstanceGroups

      @Stability(Stable) @NotNull public Object getInstanceGroups()
      The instance groups of the SageMaker HyperPod cluster.
    • setInstanceGroups

      @Stability(Stable) public void setInstanceGroups(@NotNull IResolvable value)
      The instance groups of the SageMaker HyperPod cluster.
    • setInstanceGroups

      @Stability(Stable) public void setInstanceGroups(@NotNull List<Object> value)
      The instance groups of the SageMaker HyperPod cluster.
    • getClusterName

      @Stability(Stable) @Nullable public String getClusterName()
      The name of the SageMaker HyperPod cluster.
    • setClusterName

      @Stability(Stable) public void setClusterName(@Nullable String value)
      The name of the SageMaker HyperPod cluster.
    • getNodeRecovery

      @Stability(Stable) @Nullable public String getNodeRecovery()
      Specifies whether to enable or disable the automatic node recovery feature of SageMaker HyperPod.
    • setNodeRecovery

      @Stability(Stable) public void setNodeRecovery(@Nullable String value)
      Specifies whether to enable or disable the automatic node recovery feature of SageMaker HyperPod.
    • getOrchestrator

      @Stability(Stable) @Nullable public Object getOrchestrator()
      The orchestrator type for the SageMaker HyperPod cluster.
    • setOrchestrator

      @Stability(Stable) public void setOrchestrator(@Nullable IResolvable value)
      The orchestrator type for the SageMaker HyperPod cluster.
    • setOrchestrator

      @Stability(Stable) public void setOrchestrator(@Nullable CfnCluster.OrchestratorProperty value)
      The orchestrator type for the SageMaker HyperPod cluster.
    • getTags

      @Stability(Stable) @Nullable public List<CfnTag> getTags()
      A tag object that consists of a key and an optional value, used to manage metadata for SageMaker AWS resources.
    • setTags

      @Stability(Stable) public void setTags(@Nullable List<CfnTag> value)
      A tag object that consists of a key and an optional value, used to manage metadata for SageMaker AWS resources.
    • getVpcConfig

      @Stability(Stable) @Nullable public Object getVpcConfig()
      Specifies an Amazon Virtual Private Cloud (VPC) that your SageMaker jobs, hosted models, and compute resources have access to.
    • setVpcConfig

      @Stability(Stable) public void setVpcConfig(@Nullable IResolvable value)
      Specifies an Amazon Virtual Private Cloud (VPC) that your SageMaker jobs, hosted models, and compute resources have access to.
    • setVpcConfig

      @Stability(Stable) public void setVpcConfig(@Nullable CfnCluster.VpcConfigProperty value)
      Specifies an Amazon Virtual Private Cloud (VPC) that your SageMaker jobs, hosted models, and compute resources have access to.