Class CfnCluster
- All Implemented Interfaces:
IInspectable,ITaggableV2,IClusterRef,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
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")
.autoScaling(ClusterAutoScalingConfigProperty.builder()
.mode("mode")
// the properties below are optional
.autoScalerType("autoScalerType")
.build())
.clusterName("clusterName")
.clusterRole("clusterRole")
.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)
.imageId("imageId")
.instanceStorageConfigs(List.of(ClusterInstanceStorageConfigProperty.builder()
.ebsVolumeConfig(ClusterEbsVolumeConfigProperty.builder()
.rootVolume(false)
.volumeKmsKeyId("volumeKmsKeyId")
.volumeSizeInGb(123)
.build())
.build()))
.onStartDeepHealthChecks(List.of("onStartDeepHealthChecks"))
.overrideVpcConfig(VpcConfigProperty.builder()
.securityGroupIds(List.of("securityGroupIds"))
.subnets(List.of("subnets"))
.build())
.scheduledUpdateConfig(ScheduledUpdateConfigProperty.builder()
.scheduleExpression("scheduleExpression")
// the properties below are optional
.deploymentConfig(DeploymentConfigProperty.builder()
.autoRollbackConfiguration(List.of(AlarmDetailsProperty.builder()
.alarmName("alarmName")
.build()))
.rollingUpdatePolicy(RollingUpdatePolicyProperty.builder()
.maximumBatchSize(CapacitySizeConfigProperty.builder()
.type("type")
.value(123)
.build())
// the properties below are optional
.rollbackMaximumBatchSize(CapacitySizeConfigProperty.builder()
.type("type")
.value(123)
.build())
.build())
.waitIntervalInSeconds(123)
.build())
.build())
.threadsPerCore(123)
.trainingPlanArn("trainingPlanArn")
.build()))
.nodeProvisioningMode("nodeProvisioningMode")
.nodeRecovery("nodeRecovery")
.orchestrator(OrchestratorProperty.builder()
.eks(ClusterOrchestratorEksConfigProperty.builder()
.clusterArn("clusterArn")
.build())
.build())
.restrictedInstanceGroups(List.of(ClusterRestrictedInstanceGroupProperty.builder()
.environmentConfig(EnvironmentConfigProperty.builder()
.fSxLustreConfig(FSxLustreConfigProperty.builder()
.perUnitStorageThroughput(123)
.sizeInGiB(123)
.build())
.build())
.executionRole("executionRole")
.instanceCount(123)
.instanceGroupName("instanceGroupName")
.instanceType("instanceType")
// the properties below are optional
.currentCount(123)
.instanceStorageConfigs(List.of(ClusterInstanceStorageConfigProperty.builder()
.ebsVolumeConfig(ClusterEbsVolumeConfigProperty.builder()
.rootVolume(false)
.volumeKmsKeyId("volumeKmsKeyId")
.volumeSizeInGb(123)
.build())
.build()))
.onStartDeepHealthChecks(List.of("onStartDeepHealthChecks"))
.overrideVpcConfig(VpcConfigProperty.builder()
.securityGroupIds(List.of("securityGroupIds"))
.subnets(List.of("subnets"))
.build())
.threadsPerCore(123)
.trainingPlanArn("trainingPlanArn")
.build()))
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.tieredStorageConfig(TieredStorageConfigProperty.builder()
.mode("mode")
// the properties below are optional
.instanceMemoryAllocationPercentage(123)
.build())
.vpcConfig(VpcConfigProperty.builder()
.securityGroupIds(List.of("securityGroupIds"))
.subnets(List.of("subnets"))
.build())
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceThe details of the alarm to monitor during the AMI update.static final classA fluent builder forCfnCluster.static interfaceThe configuration of the size measurements of the AMI update.static interfaceSpecifies the autoscaling configuration for a HyperPod cluster.static interfaceDefines the configuration for attaching an additional Amazon Elastic Block Store (EBS) volume to each instance of the SageMaker HyperPod cluster instance group.static interfaceThe configuration information of the instance group within the HyperPod cluster.static interfaceDefines the configuration for attaching additional storage to the instances in the SageMaker HyperPod cluster instance group.static interfaceThe lifecycle configuration for a SageMaker HyperPod cluster.static interfaceThe configuration for the Amazon EKS cluster that is used as the orchestrator for the SageMaker HyperPod cluster.static interfaceDetails of a restricted instance group in a SageMaker HyperPod cluster.static interfaceThe deployment configuration for an endpoint, which contains the desired deployment strategy and rollback configurations.static interfaceThe configuration for the restricted instance groups (RIG) environment.static interfaceConfiguration settings for an Amazon FSx for Lustre file system to be used with the cluster.static interfaceThe orchestrator for a SageMaker HyperPod cluster.static interfaceSpecifies a rolling deployment strategy for updating a SageMaker endpoint.static interfaceThe configuration object of the schedule that SageMaker follows when updating the AMI.static interfaceConfiguration for tiered storage in the SageMaker HyperPod cluster.static interfaceSpecifies an Amazon Virtual Private Cloud (VPC) that your SageMaker jobs, hosted models, and compute resources have access to.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.services.sagemaker.IClusterRef
IClusterRef.Jsii$Default, IClusterRef.Jsii$ProxyNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggableV2
ITaggableV2.Jsii$Default, ITaggableV2.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnCluster(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnCluster(software.amazon.jsii.JsiiObjectRef objRef) CfnCluster(software.constructs.Construct scope, String id) CfnCluster(software.constructs.Construct scope, String id, CfnClusterProps props) -
Method Summary
Modifier and TypeMethodDescriptionThe Amazon Resource Name (ARN) of the SageMaker HyperPod cluster.The status of the SageMaker HyperPod cluster.The time when the SageMaker HyperPod cluster is created.The failure message of the SageMaker HyperPod cluster.Configuration for cluster auto-scaling.Tag Manager which manages the tags for this resource.The name of the SageMaker HyperPod cluster.A reference to a Cluster resource.The cluster role for the autoscaler to assume.The instance groups of the SageMaker HyperPod cluster.Determines the scaling strategy for the SageMaker HyperPod cluster.Specifies whether to enable or disable the automatic node recovery feature of SageMaker HyperPod.The orchestrator type for the SageMaker HyperPod cluster.The restricted instance groups of the SageMaker HyperPod cluster.getTags()A tag object that consists of a key and an optional value, used to manage metadata for SageMaker AWS resources.Configuration for tiered storage in the SageMaker HyperPod cluster.Specifies an Amazon Virtual Private Cloud (VPC) that your SageMaker jobs, hosted models, and compute resources have access to.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetAutoScaling(IResolvable value) Configuration for cluster auto-scaling.voidConfiguration for cluster auto-scaling.voidsetClusterName(String value) The name of the SageMaker HyperPod cluster.voidsetClusterRole(String value) The cluster role for the autoscaler to assume.voidsetInstanceGroups(List<Object> value) The instance groups of the SageMaker HyperPod cluster.voidsetInstanceGroups(IResolvable value) The instance groups of the SageMaker HyperPod cluster.voidsetNodeProvisioningMode(String value) Determines the scaling strategy for the SageMaker HyperPod cluster.voidsetNodeRecovery(String value) Specifies whether to enable or disable the automatic node recovery feature of SageMaker HyperPod.voidsetOrchestrator(IResolvable value) The orchestrator type for the SageMaker HyperPod cluster.voidThe orchestrator type for the SageMaker HyperPod cluster.voidsetRestrictedInstanceGroups(List<Object> value) The restricted instance groups of the SageMaker HyperPod cluster.voidThe restricted instance groups of the SageMaker HyperPod cluster.voidA tag object that consists of a key and an optional value, used to manage metadata for SageMaker AWS resources.voidConfiguration for tiered storage in the SageMaker HyperPod cluster.voidConfiguration for tiered storage in the SageMaker HyperPod cluster.voidsetVpcConfig(IResolvable value) Specifies an Amazon Virtual Private Cloud (VPC) that your SageMaker jobs, hosted models, and compute resources have access to.voidSpecifies an Amazon Virtual Private Cloud (VPC) that your SageMaker jobs, hosted models, and compute resources have access to.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
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, @Nullable 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.
-
CfnCluster
@Stability(Stable) public CfnCluster(@NotNull software.constructs.Construct scope, @NotNull String id) - 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.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- 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:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrClusterArn
The Amazon Resource Name (ARN) of the SageMaker HyperPod cluster. -
getAttrClusterStatus
The status of the SageMaker HyperPod cluster. -
getAttrCreationTime
The time when the SageMaker HyperPod cluster is created. -
getAttrFailureMessage
The failure message of the SageMaker HyperPod cluster. -
getCdkTagManager
Tag Manager which manages the tags for this resource.- Specified by:
getCdkTagManagerin interfaceITaggableV2
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getClusterRef
A reference to a Cluster resource.- Specified by:
getClusterRefin interfaceIClusterRef
-
getAutoScaling
Configuration for cluster auto-scaling.Returns union: either
IResolvableorCfnCluster.ClusterAutoScalingConfigProperty -
setAutoScaling
Configuration for cluster auto-scaling. -
setAutoScaling
@Stability(Stable) public void setAutoScaling(@Nullable CfnCluster.ClusterAutoScalingConfigProperty value) Configuration for cluster auto-scaling. -
getClusterName
The name of the SageMaker HyperPod cluster. -
setClusterName
The name of the SageMaker HyperPod cluster. -
getClusterRole
The cluster role for the autoscaler to assume. -
setClusterRole
The cluster role for the autoscaler to assume. -
getInstanceGroups
The instance groups of the SageMaker HyperPod cluster.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnCluster.ClusterInstanceGroupProperty> -
setInstanceGroups
The instance groups of the SageMaker HyperPod cluster. -
setInstanceGroups
The instance groups of the SageMaker HyperPod cluster. -
getNodeProvisioningMode
Determines the scaling strategy for the SageMaker HyperPod cluster. -
setNodeProvisioningMode
Determines the scaling strategy for the SageMaker HyperPod cluster. -
getNodeRecovery
Specifies whether to enable or disable the automatic node recovery feature of SageMaker HyperPod. -
setNodeRecovery
Specifies whether to enable or disable the automatic node recovery feature of SageMaker HyperPod. -
getOrchestrator
The orchestrator type for the SageMaker HyperPod cluster.Returns union: either
IResolvableorCfnCluster.OrchestratorProperty -
setOrchestrator
The orchestrator type for the SageMaker HyperPod cluster. -
setOrchestrator
The orchestrator type for the SageMaker HyperPod cluster. -
getRestrictedInstanceGroups
The restricted instance groups of the SageMaker HyperPod cluster.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnCluster.ClusterRestrictedInstanceGroupProperty> -
setRestrictedInstanceGroups
The restricted instance groups of the SageMaker HyperPod cluster. -
setRestrictedInstanceGroups
The restricted instance groups of the SageMaker HyperPod cluster. -
getTags
A tag object that consists of a key and an optional value, used to manage metadata for SageMaker AWS resources. -
setTags
A tag object that consists of a key and an optional value, used to manage metadata for SageMaker AWS resources. -
getTieredStorageConfig
Configuration for tiered storage in the SageMaker HyperPod cluster.Returns union: either
IResolvableorCfnCluster.TieredStorageConfigProperty -
setTieredStorageConfig
Configuration for tiered storage in the SageMaker HyperPod cluster. -
setTieredStorageConfig
@Stability(Stable) public void setTieredStorageConfig(@Nullable CfnCluster.TieredStorageConfigProperty value) Configuration for tiered storage in the SageMaker HyperPod cluster. -
getVpcConfig
Specifies an Amazon Virtual Private Cloud (VPC) that your SageMaker jobs, hosted models, and compute resources have access to.Returns union: either
IResolvableorCfnCluster.VpcConfigProperty -
setVpcConfig
Specifies an Amazon Virtual Private Cloud (VPC) that your SageMaker jobs, hosted models, and compute resources have access to. -
setVpcConfig
Specifies an Amazon Virtual Private Cloud (VPC) that your SageMaker jobs, hosted models, and compute resources have access to.
-