Skip to content
v2.278.0

CfnCluster L1 construct ​

Creates an Amazon 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 ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_sagemaker as sagemaker } from 'aws-cdk-lib';

declare const onDemand: any;
declare const spot: any;
const cfnCluster = new sagemaker.CfnCluster(this, 'MyCfnCluster', /* all optional props */ {
  autoScaling: {
    mode: 'mode',

    // the properties below are optional
    autoScalerType: 'autoScalerType',
  },
  clusterName: 'clusterName',
  clusterRole: 'clusterRole',
  instanceGroups: [{
    executionRole: 'executionRole',
    instanceCount: 123,
    instanceGroupName: 'instanceGroupName',

    // the properties below are optional
    autoPatchConfig: {
      patchingStrategy: 'patchingStrategy',

      // the properties below are optional
      deploymentConfig: {
        autoRollbackConfiguration: [{
          alarmName: 'alarmName',
        }],
        rollingUpdatePolicy: {
          maximumBatchSize: {
            type: 'type',
            value: 123,
          },

          // the properties below are optional
          rollbackMaximumBatchSize: {
            type: 'type',
            value: 123,
          },
        },
        waitIntervalInSeconds: 123,
      },
      patchSchedule: {
        nextPatchDate: 'nextPatchDate',
      },
    },
    capacityRequirements: {
      onDemand: onDemand,
      spot: spot,
    },
    currentCount: 123,
    imageId: 'imageId',
    imageReleaseVersion: 'imageReleaseVersion',
    instanceRequirements: {
      instanceTypes: ['instanceTypes'],
    },
    instanceStorageConfigs: [{
      ebsVolumeConfig: {
        rootVolume: false,
        volumeKmsKeyId: 'volumeKmsKeyId',
        volumeSizeInGb: 123,
      },
      fsxLustreConfig: {
        dnsName: 'dnsName',
        mountName: 'mountName',

        // the properties below are optional
        mountPath: 'mountPath',
      },
      fsxOpenZfsConfig: {
        dnsName: 'dnsName',

        // the properties below are optional
        mountPath: 'mountPath',
      },
    }],
    instanceType: 'instanceType',
    kubernetesConfig: {
      labels: {
        labelsKey: 'labels',
      },
      taints: [{
        effect: 'effect',
        key: 'key',

        // the properties below are optional
        value: 'value',
      }],
    },
    lifeCycleConfig: {
      onCreate: 'onCreate',
      onInitComplete: 'onInitComplete',
      sourceS3Uri: 'sourceS3Uri',
    },
    minInstanceCount: 123,
    networkInterface: {
      interfaceType: 'interfaceType',
    },
    onStartDeepHealthChecks: ['onStartDeepHealthChecks'],
    overrideVpcConfig: {
      securityGroupIds: ['securityGroupIds'],
      subnets: ['subnets'],
    },
    scheduledUpdateConfig: {
      scheduleExpression: 'scheduleExpression',

      // the properties below are optional
      deploymentConfig: {
        autoRollbackConfiguration: [{
          alarmName: 'alarmName',
        }],
        rollingUpdatePolicy: {
          maximumBatchSize: {
            type: 'type',
            value: 123,
          },

          // the properties below are optional
          rollbackMaximumBatchSize: {
            type: 'type',
            value: 123,
          },
        },
        waitIntervalInSeconds: 123,
      },
    },
    slurmConfig: {
      nodeType: 'nodeType',

      // the properties below are optional
      partitionNames: ['partitionNames'],
    },
    threadsPerCore: 123,
    trainingPlanArn: 'trainingPlanArn',
  }],
  nodeProvisioningMode: 'nodeProvisioningMode',
  nodeRecovery: 'nodeRecovery',
  orchestrator: {
    eks: {
      clusterArn: 'clusterArn',
    },
    slurm: {
      accountingDatabase: {
        endpoint: 'endpoint',
        secretArn: 'secretArn',

        // the properties below are optional
        name: 'name',
        port: 123,
      },
      slurmConfigStrategy: 'slurmConfigStrategy',
    },
  },
  restrictedInstanceGroups: [{
    executionRole: 'executionRole',
    instanceCount: 123,
    instanceGroupName: 'instanceGroupName',
    instanceType: 'instanceType',

    // the properties below are optional
    currentCount: 123,
    environmentConfig: {
      fSxLustreConfig: {
        perUnitStorageThroughput: 123,
        sizeInGiB: 123,
      },
    },
    instanceStorageConfigs: [{
      ebsVolumeConfig: {
        rootVolume: false,
        volumeKmsKeyId: 'volumeKmsKeyId',
        volumeSizeInGb: 123,
      },
      fsxLustreConfig: {
        dnsName: 'dnsName',
        mountName: 'mountName',

        // the properties below are optional
        mountPath: 'mountPath',
      },
      fsxOpenZfsConfig: {
        dnsName: 'dnsName',

        // the properties below are optional
        mountPath: 'mountPath',
      },
    }],
    onStartDeepHealthChecks: ['onStartDeepHealthChecks'],
    overrideVpcConfig: {
      securityGroupIds: ['securityGroupIds'],
      subnets: ['subnets'],
    },
    threadsPerCore: 123,
    trainingPlanArn: 'trainingPlanArn',
  }],
  restrictedInstanceGroupsConfig: {
    sharedEnvironmentConfig: {
      fSxLustreDeletionPolicy: 'fSxLustreDeletionPolicy',

      // the properties below are optional
      fSxLustreConfig: {
        perUnitStorageThroughput: 123,
        sizeInGiB: 123,
      },
    },
  },
  tags: [{
    key: 'key',
    value: 'value',
  }],
  tieredStorageConfig: {
    mode: 'mode',

    // the properties below are optional
    instanceMemoryAllocationPercentage: 123,
  },
  vpcConfig: {
    securityGroupIds: ['securityGroupIds'],
    subnets: ['subnets'],
  },
});
python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_sagemaker as sagemaker

# on_demand: Any
# spot: Any

cfn_cluster = sagemaker.CfnCluster(self, "MyCfnCluster",
    auto_scaling=sagemaker.CfnCluster.ClusterAutoScalingConfigProperty(
        mode="mode",

        # the properties below are optional
        auto_scaler_type="autoScalerType"
    ),
    cluster_name="clusterName",
    cluster_role="clusterRole",
    instance_groups=[sagemaker.CfnCluster.ClusterInstanceGroupProperty(
        execution_role="executionRole",
        instance_count=123,
        instance_group_name="instanceGroupName",

        # the properties below are optional
        auto_patch_config=sagemaker.CfnCluster.AutoPatchConfigProperty(
            patching_strategy="patchingStrategy",

            # the properties below are optional
            deployment_config=sagemaker.CfnCluster.DeploymentConfigProperty(
                auto_rollback_configuration=[sagemaker.CfnCluster.AlarmDetailsProperty(
                    alarm_name="alarmName"
                )],
                rolling_update_policy=sagemaker.CfnCluster.RollingUpdatePolicyProperty(
                    maximum_batch_size=sagemaker.CfnCluster.CapacitySizeConfigProperty(
                        type="type",
                        value=123
                    ),

                    # the properties below are optional
                    rollback_maximum_batch_size=sagemaker.CfnCluster.CapacitySizeConfigProperty(
                        type="type",
                        value=123
                    )
                ),
                wait_interval_in_seconds=123
            ),
            patch_schedule=sagemaker.CfnCluster.PatchScheduleProperty(
                next_patch_date="nextPatchDate"
            )
        ),
        capacity_requirements=sagemaker.CfnCluster.ClusterCapacityRequirementsProperty(
            on_demand=on_demand,
            spot=spot
        ),
        current_count=123,
        image_id="imageId",
        image_release_version="imageReleaseVersion",
        instance_requirements=sagemaker.CfnCluster.InstanceRequirementsProperty(
            instance_types=["instanceTypes"]
        ),
        instance_storage_configs=[sagemaker.CfnCluster.ClusterInstanceStorageConfigProperty(
            ebs_volume_config=sagemaker.CfnCluster.ClusterEbsVolumeConfigProperty(
                root_volume=False,
                volume_kms_key_id="volumeKmsKeyId",
                volume_size_in_gb=123
            ),
            fsx_lustre_config=sagemaker.CfnCluster.ClusterFsxLustreConfigProperty(
                dns_name="dnsName",
                mount_name="mountName",

                # the properties below are optional
                mount_path="mountPath"
            ),
            fsx_open_zfs_config=sagemaker.CfnCluster.ClusterFsxOpenZfsConfigProperty(
                dns_name="dnsName",

                # the properties below are optional
                mount_path="mountPath"
            )
        )],
        instance_type="instanceType",
        kubernetes_config=sagemaker.CfnCluster.ClusterKubernetesConfigProperty(
            labels={
                "labels_key": "labels"
            },
            taints=[sagemaker.CfnCluster.ClusterKubernetesTaintProperty(
                effect="effect",
                key="key",

                # the properties below are optional
                value="value"
            )]
        ),
        life_cycle_config=sagemaker.CfnCluster.ClusterLifeCycleConfigProperty(
            on_create="onCreate",
            on_init_complete="onInitComplete",
            source_s3_uri="sourceS3Uri"
        ),
        min_instance_count=123,
        network_interface=sagemaker.CfnCluster.ClusterNetworkInterfaceProperty(
            interface_type="interfaceType"
        ),
        on_start_deep_health_checks=["onStartDeepHealthChecks"],
        override_vpc_config=sagemaker.CfnCluster.VpcConfigProperty(
            security_group_ids=["securityGroupIds"],
            subnets=["subnets"]
        ),
        scheduled_update_config=sagemaker.CfnCluster.ScheduledUpdateConfigProperty(
            schedule_expression="scheduleExpression",

            # the properties below are optional
            deployment_config=sagemaker.CfnCluster.DeploymentConfigProperty(
                auto_rollback_configuration=[sagemaker.CfnCluster.AlarmDetailsProperty(
                    alarm_name="alarmName"
                )],
                rolling_update_policy=sagemaker.CfnCluster.RollingUpdatePolicyProperty(
                    maximum_batch_size=sagemaker.CfnCluster.CapacitySizeConfigProperty(
                        type="type",
                        value=123
                    ),

                    # the properties below are optional
                    rollback_maximum_batch_size=sagemaker.CfnCluster.CapacitySizeConfigProperty(
                        type="type",
                        value=123
                    )
                ),
                wait_interval_in_seconds=123
            )
        ),
        slurm_config=sagemaker.CfnCluster.ClusterSlurmConfigProperty(
            node_type="nodeType",

            # the properties below are optional
            partition_names=["partitionNames"]
        ),
        threads_per_core=123,
        training_plan_arn="trainingPlanArn"
    )],
    node_provisioning_mode="nodeProvisioningMode",
    node_recovery="nodeRecovery",
    orchestrator=sagemaker.CfnCluster.OrchestratorProperty(
        eks=sagemaker.CfnCluster.ClusterOrchestratorEksConfigProperty(
            cluster_arn="clusterArn"
        ),
        slurm=sagemaker.CfnCluster.ClusterOrchestratorSlurmConfigProperty(
            accounting_database=sagemaker.CfnCluster.ClusterAccountingDatabaseProperty(
                endpoint="endpoint",
                secret_arn="secretArn",

                # the properties below are optional
                name="name",
                port=123
            ),
            slurm_config_strategy="slurmConfigStrategy"
        )
    ),
    restricted_instance_groups=[sagemaker.CfnCluster.ClusterRestrictedInstanceGroupProperty(
        execution_role="executionRole",
        instance_count=123,
        instance_group_name="instanceGroupName",
        instance_type="instanceType",

        # the properties below are optional
        current_count=123,
        environment_config=sagemaker.CfnCluster.EnvironmentConfigProperty(
            f_sx_lustre_config=sagemaker.CfnCluster.FSxLustreConfigProperty(
                per_unit_storage_throughput=123,
                size_in_gi_b=123
            )
        ),
        instance_storage_configs=[sagemaker.CfnCluster.ClusterInstanceStorageConfigProperty(
            ebs_volume_config=sagemaker.CfnCluster.ClusterEbsVolumeConfigProperty(
                root_volume=False,
                volume_kms_key_id="volumeKmsKeyId",
                volume_size_in_gb=123
            ),
            fsx_lustre_config=sagemaker.CfnCluster.ClusterFsxLustreConfigProperty(
                dns_name="dnsName",
                mount_name="mountName",

                # the properties below are optional
                mount_path="mountPath"
            ),
            fsx_open_zfs_config=sagemaker.CfnCluster.ClusterFsxOpenZfsConfigProperty(
                dns_name="dnsName",

                # the properties below are optional
                mount_path="mountPath"
            )
        )],
        on_start_deep_health_checks=["onStartDeepHealthChecks"],
        override_vpc_config=sagemaker.CfnCluster.VpcConfigProperty(
            security_group_ids=["securityGroupIds"],
            subnets=["subnets"]
        ),
        threads_per_core=123,
        training_plan_arn="trainingPlanArn"
    )],
    restricted_instance_groups_config=sagemaker.CfnCluster.RestrictedInstanceGroupsConfigProperty(
        shared_environment_config=sagemaker.CfnCluster.SharedEnvironmentConfigProperty(
            f_sx_lustre_deletion_policy="fSxLustreDeletionPolicy",

            # the properties below are optional
            f_sx_lustre_config=sagemaker.CfnCluster.FSxLustreConfigProperty(
                per_unit_storage_throughput=123,
                size_in_gi_b=123
            )
        )
    ),
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    tiered_storage_config=sagemaker.CfnCluster.TieredStorageConfigProperty(
        mode="mode",

        # the properties below are optional
        instance_memory_allocation_percentage=123
    ),
    vpc_config=sagemaker.CfnCluster.VpcConfigProperty(
        security_group_ids=["securityGroupIds"],
        subnets=["subnets"]
    )
)
java
// 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.*;

Object onDemand;
Object spot;

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")

                // the properties below are optional
                .autoPatchConfig(AutoPatchConfigProperty.builder()
                        .patchingStrategy("patchingStrategy")

                        // 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())
                        .patchSchedule(PatchScheduleProperty.builder()
                                .nextPatchDate("nextPatchDate")
                                .build())
                        .build())
                .capacityRequirements(ClusterCapacityRequirementsProperty.builder()
                        .onDemand(onDemand)
                        .spot(spot)
                        .build())
                .currentCount(123)
                .imageId("imageId")
                .imageReleaseVersion("imageReleaseVersion")
                .instanceRequirements(InstanceRequirementsProperty.builder()
                        .instanceTypes(List.of("instanceTypes"))
                        .build())
                .instanceStorageConfigs(List.of(ClusterInstanceStorageConfigProperty.builder()
                        .ebsVolumeConfig(ClusterEbsVolumeConfigProperty.builder()
                                .rootVolume(false)
                                .volumeKmsKeyId("volumeKmsKeyId")
                                .volumeSizeInGb(123)
                                .build())
                        .fsxLustreConfig(ClusterFsxLustreConfigProperty.builder()
                                .dnsName("dnsName")
                                .mountName("mountName")

                                // the properties below are optional
                                .mountPath("mountPath")
                                .build())
                        .fsxOpenZfsConfig(ClusterFsxOpenZfsConfigProperty.builder()
                                .dnsName("dnsName")

                                // the properties below are optional
                                .mountPath("mountPath")
                                .build())
                        .build()))
                .instanceType("instanceType")
                .kubernetesConfig(ClusterKubernetesConfigProperty.builder()
                        .labels(Map.of(
                                "labelsKey", "labels"))
                        .taints(List.of(ClusterKubernetesTaintProperty.builder()
                                .effect("effect")
                                .key("key")

                                // the properties below are optional
                                .value("value")
                                .build()))
                        .build())
                .lifeCycleConfig(ClusterLifeCycleConfigProperty.builder()
                        .onCreate("onCreate")
                        .onInitComplete("onInitComplete")
                        .sourceS3Uri("sourceS3Uri")
                        .build())
                .minInstanceCount(123)
                .networkInterface(ClusterNetworkInterfaceProperty.builder()
                        .interfaceType("interfaceType")
                        .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())
                .slurmConfig(ClusterSlurmConfigProperty.builder()
                        .nodeType("nodeType")

                        // the properties below are optional
                        .partitionNames(List.of("partitionNames"))
                        .build())
                .threadsPerCore(123)
                .trainingPlanArn("trainingPlanArn")
                .build()))
        .nodeProvisioningMode("nodeProvisioningMode")
        .nodeRecovery("nodeRecovery")
        .orchestrator(OrchestratorProperty.builder()
                .eks(ClusterOrchestratorEksConfigProperty.builder()
                        .clusterArn("clusterArn")
                        .build())
                .slurm(ClusterOrchestratorSlurmConfigProperty.builder()
                        .accountingDatabase(ClusterAccountingDatabaseProperty.builder()
                                .endpoint("endpoint")
                                .secretArn("secretArn")

                                // the properties below are optional
                                .name("name")
                                .port(123)
                                .build())
                        .slurmConfigStrategy("slurmConfigStrategy")
                        .build())
                .build())
        .restrictedInstanceGroups(List.of(ClusterRestrictedInstanceGroupProperty.builder()
                .executionRole("executionRole")
                .instanceCount(123)
                .instanceGroupName("instanceGroupName")
                .instanceType("instanceType")

                // the properties below are optional
                .currentCount(123)
                .environmentConfig(EnvironmentConfigProperty.builder()
                        .fSxLustreConfig(FSxLustreConfigProperty.builder()
                                .perUnitStorageThroughput(123)
                                .sizeInGiB(123)
                                .build())
                        .build())
                .instanceStorageConfigs(List.of(ClusterInstanceStorageConfigProperty.builder()
                        .ebsVolumeConfig(ClusterEbsVolumeConfigProperty.builder()
                                .rootVolume(false)
                                .volumeKmsKeyId("volumeKmsKeyId")
                                .volumeSizeInGb(123)
                                .build())
                        .fsxLustreConfig(ClusterFsxLustreConfigProperty.builder()
                                .dnsName("dnsName")
                                .mountName("mountName")

                                // the properties below are optional
                                .mountPath("mountPath")
                                .build())
                        .fsxOpenZfsConfig(ClusterFsxOpenZfsConfigProperty.builder()
                                .dnsName("dnsName")

                                // the properties below are optional
                                .mountPath("mountPath")
                                .build())
                        .build()))
                .onStartDeepHealthChecks(List.of("onStartDeepHealthChecks"))
                .overrideVpcConfig(VpcConfigProperty.builder()
                        .securityGroupIds(List.of("securityGroupIds"))
                        .subnets(List.of("subnets"))
                        .build())
                .threadsPerCore(123)
                .trainingPlanArn("trainingPlanArn")
                .build()))
        .restrictedInstanceGroupsConfig(RestrictedInstanceGroupsConfigProperty.builder()
                .sharedEnvironmentConfig(SharedEnvironmentConfigProperty.builder()
                        .fSxLustreDeletionPolicy("fSxLustreDeletionPolicy")

                        // the properties below are optional
                        .fSxLustreConfig(FSxLustreConfigProperty.builder()
                                .perUnitStorageThroughput(123)
                                .sizeInGiB(123)
                                .build())
                        .build())
                .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();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Sagemaker;

var onDemand;
var spot;

var cfnCluster = new CfnCluster(this, "MyCfnCluster", new CfnClusterProps {
    AutoScaling = new ClusterAutoScalingConfigProperty {
        Mode = "mode",

        // the properties below are optional
        AutoScalerType = "autoScalerType"
    },
    ClusterName = "clusterName",
    ClusterRole = "clusterRole",
    InstanceGroups = new [] { new ClusterInstanceGroupProperty {
        ExecutionRole = "executionRole",
        InstanceCount = 123,
        InstanceGroupName = "instanceGroupName",

        // the properties below are optional
        AutoPatchConfig = new AutoPatchConfigProperty {
            PatchingStrategy = "patchingStrategy",

            // the properties below are optional
            DeploymentConfig = new DeploymentConfigProperty {
                AutoRollbackConfiguration = new [] { new AlarmDetailsProperty {
                    AlarmName = "alarmName"
                } },
                RollingUpdatePolicy = new RollingUpdatePolicyProperty {
                    MaximumBatchSize = new CapacitySizeConfigProperty {
                        Type = "type",
                        Value = 123
                    },

                    // the properties below are optional
                    RollbackMaximumBatchSize = new CapacitySizeConfigProperty {
                        Type = "type",
                        Value = 123
                    }
                },
                WaitIntervalInSeconds = 123
            },
            PatchSchedule = new PatchScheduleProperty {
                NextPatchDate = "nextPatchDate"
            }
        },
        CapacityRequirements = new ClusterCapacityRequirementsProperty {
            OnDemand = onDemand,
            Spot = spot
        },
        CurrentCount = 123,
        ImageId = "imageId",
        ImageReleaseVersion = "imageReleaseVersion",
        InstanceRequirements = new InstanceRequirementsProperty {
            InstanceTypes = new [] { "instanceTypes" }
        },
        InstanceStorageConfigs = new [] { new ClusterInstanceStorageConfigProperty {
            EbsVolumeConfig = new ClusterEbsVolumeConfigProperty {
                RootVolume = false,
                VolumeKmsKeyId = "volumeKmsKeyId",
                VolumeSizeInGb = 123
            },
            FsxLustreConfig = new ClusterFsxLustreConfigProperty {
                DnsName = "dnsName",
                MountName = "mountName",

                // the properties below are optional
                MountPath = "mountPath"
            },
            FsxOpenZfsConfig = new ClusterFsxOpenZfsConfigProperty {
                DnsName = "dnsName",

                // the properties below are optional
                MountPath = "mountPath"
            }
        } },
        InstanceType = "instanceType",
        KubernetesConfig = new ClusterKubernetesConfigProperty {
            Labels = new Dictionary<string, string> {
                { "labelsKey", "labels" }
            },
            Taints = new [] { new ClusterKubernetesTaintProperty {
                Effect = "effect",
                Key = "key",

                // the properties below are optional
                Value = "value"
            } }
        },
        LifeCycleConfig = new ClusterLifeCycleConfigProperty {
            OnCreate = "onCreate",
            OnInitComplete = "onInitComplete",
            SourceS3Uri = "sourceS3Uri"
        },
        MinInstanceCount = 123,
        NetworkInterface = new ClusterNetworkInterfaceProperty {
            InterfaceType = "interfaceType"
        },
        OnStartDeepHealthChecks = new [] { "onStartDeepHealthChecks" },
        OverrideVpcConfig = new VpcConfigProperty {
            SecurityGroupIds = new [] { "securityGroupIds" },
            Subnets = new [] { "subnets" }
        },
        ScheduledUpdateConfig = new ScheduledUpdateConfigProperty {
            ScheduleExpression = "scheduleExpression",

            // the properties below are optional
            DeploymentConfig = new DeploymentConfigProperty {
                AutoRollbackConfiguration = new [] { new AlarmDetailsProperty {
                    AlarmName = "alarmName"
                } },
                RollingUpdatePolicy = new RollingUpdatePolicyProperty {
                    MaximumBatchSize = new CapacitySizeConfigProperty {
                        Type = "type",
                        Value = 123
                    },

                    // the properties below are optional
                    RollbackMaximumBatchSize = new CapacitySizeConfigProperty {
                        Type = "type",
                        Value = 123
                    }
                },
                WaitIntervalInSeconds = 123
            }
        },
        SlurmConfig = new ClusterSlurmConfigProperty {
            NodeType = "nodeType",

            // the properties below are optional
            PartitionNames = new [] { "partitionNames" }
        },
        ThreadsPerCore = 123,
        TrainingPlanArn = "trainingPlanArn"
    } },
    NodeProvisioningMode = "nodeProvisioningMode",
    NodeRecovery = "nodeRecovery",
    Orchestrator = new OrchestratorProperty {
        Eks = new ClusterOrchestratorEksConfigProperty {
            ClusterArn = "clusterArn"
        },
        Slurm = new ClusterOrchestratorSlurmConfigProperty {
            AccountingDatabase = new ClusterAccountingDatabaseProperty {
                Endpoint = "endpoint",
                SecretArn = "secretArn",

                // the properties below are optional
                Name = "name",
                Port = 123
            },
            SlurmConfigStrategy = "slurmConfigStrategy"
        }
    },
    RestrictedInstanceGroups = new [] { new ClusterRestrictedInstanceGroupProperty {
        ExecutionRole = "executionRole",
        InstanceCount = 123,
        InstanceGroupName = "instanceGroupName",
        InstanceType = "instanceType",

        // the properties below are optional
        CurrentCount = 123,
        EnvironmentConfig = new EnvironmentConfigProperty {
            FSxLustreConfig = new FSxLustreConfigProperty {
                PerUnitStorageThroughput = 123,
                SizeInGiB = 123
            }
        },
        InstanceStorageConfigs = new [] { new ClusterInstanceStorageConfigProperty {
            EbsVolumeConfig = new ClusterEbsVolumeConfigProperty {
                RootVolume = false,
                VolumeKmsKeyId = "volumeKmsKeyId",
                VolumeSizeInGb = 123
            },
            FsxLustreConfig = new ClusterFsxLustreConfigProperty {
                DnsName = "dnsName",
                MountName = "mountName",

                // the properties below are optional
                MountPath = "mountPath"
            },
            FsxOpenZfsConfig = new ClusterFsxOpenZfsConfigProperty {
                DnsName = "dnsName",

                // the properties below are optional
                MountPath = "mountPath"
            }
        } },
        OnStartDeepHealthChecks = new [] { "onStartDeepHealthChecks" },
        OverrideVpcConfig = new VpcConfigProperty {
            SecurityGroupIds = new [] { "securityGroupIds" },
            Subnets = new [] { "subnets" }
        },
        ThreadsPerCore = 123,
        TrainingPlanArn = "trainingPlanArn"
    } },
    RestrictedInstanceGroupsConfig = new RestrictedInstanceGroupsConfigProperty {
        SharedEnvironmentConfig = new SharedEnvironmentConfigProperty {
            FSxLustreDeletionPolicy = "fSxLustreDeletionPolicy",

            // the properties below are optional
            FSxLustreConfig = new FSxLustreConfigProperty {
                PerUnitStorageThroughput = 123,
                SizeInGiB = 123
            }
        }
    },
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } },
    TieredStorageConfig = new TieredStorageConfigProperty {
        Mode = "mode",

        // the properties below are optional
        InstanceMemoryAllocationPercentage = 123
    },
    VpcConfig = new VpcConfigProperty {
        SecurityGroupIds = new [] { "securityGroupIds" },
        Subnets = new [] { "subnets" }
    }
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var onDemand interface{}
var spot interface{}

cfnCluster := awscdk.Aws_sagemaker.NewCfnCluster(this, jsii.String("MyCfnCluster"), &CfnClusterProps{
	AutoScaling: &ClusterAutoScalingConfigProperty{
		Mode: jsii.String("mode"),

		// the properties below are optional
		AutoScalerType: jsii.String("autoScalerType"),
	},
	ClusterName: jsii.String("clusterName"),
	ClusterRole: jsii.String("clusterRole"),
	InstanceGroups: []interface{}{
		&ClusterInstanceGroupProperty{
			ExecutionRole: jsii.String("executionRole"),
			InstanceCount: jsii.Number(123),
			InstanceGroupName: jsii.String("instanceGroupName"),

			// the properties below are optional
			AutoPatchConfig: &AutoPatchConfigProperty{
				PatchingStrategy: jsii.String("patchingStrategy"),

				// the properties below are optional
				DeploymentConfig: &DeploymentConfigProperty{
					AutoRollbackConfiguration: []interface{}{
						&AlarmDetailsProperty{
							AlarmName: jsii.String("alarmName"),
						},
					},
					RollingUpdatePolicy: &RollingUpdatePolicyProperty{
						MaximumBatchSize: &CapacitySizeConfigProperty{
							Type: jsii.String("type"),
							Value: jsii.Number(123),
						},

						// the properties below are optional
						RollbackMaximumBatchSize: &CapacitySizeConfigProperty{
							Type: jsii.String("type"),
							Value: jsii.Number(123),
						},
					},
					WaitIntervalInSeconds: jsii.Number(123),
				},
				PatchSchedule: &PatchScheduleProperty{
					NextPatchDate: jsii.String("nextPatchDate"),
				},
			},
			CapacityRequirements: &ClusterCapacityRequirementsProperty{
				OnDemand: onDemand,
				Spot: spot,
			},
			CurrentCount: jsii.Number(123),
			ImageId: jsii.String("imageId"),
			ImageReleaseVersion: jsii.String("imageReleaseVersion"),
			InstanceRequirements: &InstanceRequirementsProperty{
				InstanceTypes: []*string{
					jsii.String("instanceTypes"),
				},
			},
			InstanceStorageConfigs: []interface{}{
				&ClusterInstanceStorageConfigProperty{
					EbsVolumeConfig: &ClusterEbsVolumeConfigProperty{
						RootVolume: jsii.Boolean(false),
						VolumeKmsKeyId: jsii.String("volumeKmsKeyId"),
						VolumeSizeInGb: jsii.Number(123),
					},
					FsxLustreConfig: &ClusterFsxLustreConfigProperty{
						DnsName: jsii.String("dnsName"),
						MountName: jsii.String("mountName"),

						// the properties below are optional
						MountPath: jsii.String("mountPath"),
					},
					FsxOpenZfsConfig: &ClusterFsxOpenZfsConfigProperty{
						DnsName: jsii.String("dnsName"),

						// the properties below are optional
						MountPath: jsii.String("mountPath"),
					},
				},
			},
			InstanceType: jsii.String("instanceType"),
			KubernetesConfig: &ClusterKubernetesConfigProperty{
				Labels: map[string]*string{
					"labelsKey": jsii.String("labels"),
				},
				Taints: []interface{}{
					&ClusterKubernetesTaintProperty{
						Effect: jsii.String("effect"),
						Key: jsii.String("key"),

						// the properties below are optional
						Value: jsii.String("value"),
					},
				},
			},
			LifeCycleConfig: &ClusterLifeCycleConfigProperty{
				OnCreate: jsii.String("onCreate"),
				OnInitComplete: jsii.String("onInitComplete"),
				SourceS3Uri: jsii.String("sourceS3Uri"),
			},
			MinInstanceCount: jsii.Number(123),
			NetworkInterface: &ClusterNetworkInterfaceProperty{
				InterfaceType: jsii.String("interfaceType"),
			},
			OnStartDeepHealthChecks: []*string{
				jsii.String("onStartDeepHealthChecks"),
			},
			OverrideVpcConfig: &VpcConfigProperty{
				SecurityGroupIds: []*string{
					jsii.String("securityGroupIds"),
				},
				Subnets: []*string{
					jsii.String("subnets"),
				},
			},
			ScheduledUpdateConfig: &ScheduledUpdateConfigProperty{
				ScheduleExpression: jsii.String("scheduleExpression"),

				// the properties below are optional
				DeploymentConfig: &DeploymentConfigProperty{
					AutoRollbackConfiguration: []interface{}{
						&AlarmDetailsProperty{
							AlarmName: jsii.String("alarmName"),
						},
					},
					RollingUpdatePolicy: &RollingUpdatePolicyProperty{
						MaximumBatchSize: &CapacitySizeConfigProperty{
							Type: jsii.String("type"),
							Value: jsii.Number(123),
						},

						// the properties below are optional
						RollbackMaximumBatchSize: &CapacitySizeConfigProperty{
							Type: jsii.String("type"),
							Value: jsii.Number(123),
						},
					},
					WaitIntervalInSeconds: jsii.Number(123),
				},
			},
			SlurmConfig: &ClusterSlurmConfigProperty{
				NodeType: jsii.String("nodeType"),

				// the properties below are optional
				PartitionNames: []*string{
					jsii.String("partitionNames"),
				},
			},
			ThreadsPerCore: jsii.Number(123),
			TrainingPlanArn: jsii.String("trainingPlanArn"),
		},
	},
	NodeProvisioningMode: jsii.String("nodeProvisioningMode"),
	NodeRecovery: jsii.String("nodeRecovery"),
	Orchestrator: &OrchestratorProperty{
		Eks: &ClusterOrchestratorEksConfigProperty{
			ClusterArn: jsii.String("clusterArn"),
		},
		Slurm: &ClusterOrchestratorSlurmConfigProperty{
			AccountingDatabase: &ClusterAccountingDatabaseProperty{
				Endpoint: jsii.String("endpoint"),
				SecretArn: jsii.String("secretArn"),

				// the properties below are optional
				Name: jsii.String("name"),
				Port: jsii.Number(123),
			},
			SlurmConfigStrategy: jsii.String("slurmConfigStrategy"),
		},
	},
	RestrictedInstanceGroups: []interface{}{
		&ClusterRestrictedInstanceGroupProperty{
			ExecutionRole: jsii.String("executionRole"),
			InstanceCount: jsii.Number(123),
			InstanceGroupName: jsii.String("instanceGroupName"),
			InstanceType: jsii.String("instanceType"),

			// the properties below are optional
			CurrentCount: jsii.Number(123),
			EnvironmentConfig: &EnvironmentConfigProperty{
				FSxLustreConfig: &FSxLustreConfigProperty{
					PerUnitStorageThroughput: jsii.Number(123),
					SizeInGiB: jsii.Number(123),
				},
			},
			InstanceStorageConfigs: []interface{}{
				&ClusterInstanceStorageConfigProperty{
					EbsVolumeConfig: &ClusterEbsVolumeConfigProperty{
						RootVolume: jsii.Boolean(false),
						VolumeKmsKeyId: jsii.String("volumeKmsKeyId"),
						VolumeSizeInGb: jsii.Number(123),
					},
					FsxLustreConfig: &ClusterFsxLustreConfigProperty{
						DnsName: jsii.String("dnsName"),
						MountName: jsii.String("mountName"),

						// the properties below are optional
						MountPath: jsii.String("mountPath"),
					},
					FsxOpenZfsConfig: &ClusterFsxOpenZfsConfigProperty{
						DnsName: jsii.String("dnsName"),

						// the properties below are optional
						MountPath: jsii.String("mountPath"),
					},
				},
			},
			OnStartDeepHealthChecks: []*string{
				jsii.String("onStartDeepHealthChecks"),
			},
			OverrideVpcConfig: &VpcConfigProperty{
				SecurityGroupIds: []*string{
					jsii.String("securityGroupIds"),
				},
				Subnets: []*string{
					jsii.String("subnets"),
				},
			},
			ThreadsPerCore: jsii.Number(123),
			TrainingPlanArn: jsii.String("trainingPlanArn"),
		},
	},
	RestrictedInstanceGroupsConfig: &RestrictedInstanceGroupsConfigProperty{
		SharedEnvironmentConfig: &SharedEnvironmentConfigProperty{
			FSxLustreDeletionPolicy: jsii.String("fSxLustreDeletionPolicy"),

			// the properties below are optional
			FSxLustreConfig: &FSxLustreConfigProperty{
				PerUnitStorageThroughput: jsii.Number(123),
				SizeInGiB: jsii.Number(123),
			},
		},
	},
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
	TieredStorageConfig: &TieredStorageConfigProperty{
		Mode: jsii.String("mode"),

		// the properties below are optional
		InstanceMemoryAllocationPercentage: jsii.Number(123),
	},
	VpcConfig: &VpcConfigProperty{
		SecurityGroupIds: []*string{
			jsii.String("securityGroupIds"),
		},
		Subnets: []*string{
			jsii.String("subnets"),
		},
	},
})

Initializer ​

ts
new CfnCluster(scope: Construct, id: string, props?: CfnClusterProps)
python
CfnCluster(scope: Construct, id: str, props: typing.Optional[CfnClusterProps] = None)
java
new CfnCluster(Construct scope, String id, CfnClusterProps props)
csharp
new CfnCluster(Construct scope, string id, CfnClusterProps? props = null)
go
NewCfnCluster(Scope Construct, Id *string, Props CfnClusterProps)

Construct Props ​

autoScalingoptionalIResolvable | CfnCluster.ClusterAutoScalingConfigPropertyauto_scalingoptionaltyping.Union[IResolvable, ClusterAutoScalingConfigProperty]autoScalingoptionalIResolvableAutoScalingoptionalIResolvableAutoScalingoptionalinterface{} #
Configuration for cluster auto-scaling.
clusterNameoptionalstringcluster_nameoptionalstrclusterNameoptionalStringClusterNameoptionalstringClusterNameoptional*string #
The name of the SageMaker HyperPod cluster.
clusterRoleoptionalstringcluster_roleoptionalstrclusterRoleoptionalStringClusterRoleoptionalstringClusterRoleoptional*string #
The cluster role for the autoscaler to assume.
instanceGroupsoptionalIResolvable | IResolvable | CfnCluster.ClusterInstanceGroupProperty[]instance_groupsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ClusterInstanceGroupProperty]]]instanceGroupsoptionalIResolvableInstanceGroupsoptionalIResolvableInstanceGroupsoptionalinterface{} #
The instance groups of the SageMaker HyperPod cluster.

To delete an instance group, remove it from the array.

nodeProvisioningModeoptionalstringnode_provisioning_modeoptionalstrnodeProvisioningModeoptionalStringNodeProvisioningModeoptionalstringNodeProvisioningModeoptional*string #
Determines the scaling strategy for the SageMaker HyperPod cluster.

When set to 'Continuous', enables continuous scaling which dynamically manages node provisioning. If the parameter is omitted, uses the standard scaling approach in previous release.

nodeRecoveryoptionalstringnode_recoveryoptionalstrnodeRecoveryoptionalStringNodeRecoveryoptionalstringNodeRecoveryoptional*string #
Specifies whether to enable or disable the automatic node recovery feature of SageMaker HyperPod.

Available values are Automatic for enabling and None for disabling.

orchestratoroptionalIResolvable | CfnCluster.OrchestratorPropertyorchestratoroptionaltyping.Union[IResolvable, OrchestratorProperty]orchestratoroptionalIResolvableOrchestratoroptionalIResolvableOrchestratoroptionalinterface{} #
The orchestrator type for the SageMaker HyperPod cluster.

Currently, 'eks' is the only available option.

restrictedInstanceGroupsoptionalIResolvable | IResolvable | CfnCluster.ClusterRestrictedInstanceGroupProperty[]restricted_instance_groupsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ClusterRestrictedInstanceGroupProperty]]]restrictedInstanceGroupsoptionalIResolvableRestrictedInstanceGroupsoptionalIResolvableRestrictedInstanceGroupsoptionalinterface{} #
The restricted instance groups of the SageMaker HyperPod cluster.
restrictedInstanceGroupsConfigoptionalIResolvable | CfnCluster.RestrictedInstanceGroupsConfigPropertyrestricted_instance_groups_configoptionaltyping.Union[IResolvable, RestrictedInstanceGroupsConfigProperty]restrictedInstanceGroupsConfigoptionalIResolvableRestrictedInstanceGroupsConfigoptionalIResolvableRestrictedInstanceGroupsConfigoptionalinterface{} #
The cluster-level configuration for restricted instance groups, including shared environment settings for inter-RIG communication and FSx Lustre sharing.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #
A tag object that consists of a key and an optional value, used to manage metadata for SageMaker AWS resources.
notes

You can add tags to notebook instances, training jobs, hyperparameter tuning jobs, batch transform jobs, models, labeling jobs, work teams, endpoint configurations, and endpoints. For more information on adding tags to SageMaker resources, see AddTags .

For more information on adding metadata to your AWS resources with tagging, see Tagging AWS resources . For advice on best practices for managing AWS resources with tagging, see Tagging Best Practices: Implement an Effective AWS Resource Tagging Strategy .

tieredStorageConfigoptionalIResolvable | CfnCluster.TieredStorageConfigPropertytiered_storage_configoptionaltyping.Union[IResolvable, TieredStorageConfigProperty]tieredStorageConfigoptionalIResolvableTieredStorageConfigoptionalIResolvableTieredStorageConfigoptionalinterface{} #
Configuration for tiered storage in the SageMaker HyperPod cluster.
vpcConfigoptionalIResolvable | CfnCluster.VpcConfigPropertyvpc_configoptionaltyping.Union[IResolvable, VpcConfigProperty]vpcConfigoptionalIResolvableVpcConfigoptionalIResolvableVpcConfigoptionalinterface{} #
Specifies an Amazon Virtual Private Cloud (VPC) that your SageMaker jobs, hosted models, and compute resources have access to.

You can control access to and from your resources by configuring a VPC. For more information, see Give SageMaker Access to Resources in your Amazon VPC .

Properties ​

attrClusterArnstringattr_cluster_arnstrattrClusterArnStringAttrClusterArnstringAttrClusterArn*string #
The Amazon Resource Name (ARN) of the SageMaker HyperPod cluster.
attrClusterStatusstringattr_cluster_statusstrattrClusterStatusStringAttrClusterStatusstringAttrClusterStatus*string #
The status of the SageMaker HyperPod cluster.
attrCreationTimestringattr_creation_timestrattrCreationTimeStringAttrCreationTimestringAttrCreationTime*string #
The time when the SageMaker HyperPod cluster is created.
attrFailureMessagestringattr_failure_messagestrattrFailureMessageStringAttrFailureMessagestringAttrFailureMessage*string #
The failure message of the SageMaker HyperPod cluster.
autoScalingmay be undefinedIResolvable | CfnCluster.ClusterAutoScalingConfigPropertyauto_scalingmay be undefinedtyping.Union[IResolvable, ClusterAutoScalingConfigProperty]autoScalingmay be undefinedIResolvableAutoScalingmay be undefinedIResolvableAutoScalingmay be undefinedinterface{} #
Configuration for cluster auto-scaling.
cdkTagManagerTagManagercdk_tag_managerTagManagercdkTagManagerTagManagerCdkTagManagerTagManagerCdkTagManagerTagManager #
Tag Manager which manages the tags for this resource.
CFN_RESOURCE_TYPE_NAMEstringCFN_RESOURCE_TYPE_NAMEstrCFN_RESOURCE_TYPE_NAMEStringCFN_RESOURCE_TYPE_NAMEstringCFN_RESOURCE_TYPE_NAME*string static #
The CloudFormation resource type name for this resource class.
Options for this resource, such as condition, update policy etc.
cfnResourceTypestringcfn_resource_typestrcfnResourceTypeStringCfnResourceTypestringCfnResourceType*string #
AWS resource type.
clusterNamemay be undefinedstringcluster_namemay be undefinedstrclusterNamemay be undefinedStringClusterNamemay be undefinedstringClusterNamemay be undefined*string #
The name of the SageMaker HyperPod cluster.
A reference to a Cluster resource.
clusterRolemay be undefinedstringcluster_rolemay be undefinedstrclusterRolemay be undefinedStringClusterRolemay be undefinedstringClusterRolemay be undefined*string #
The cluster role for the autoscaler to assume.
creationStackstring[]creation_stacktyping.List[str]creationStackList<String>CreationStackstring[]CreationStack*[]*string #
instanceGroupsmay be undefinedIResolvable | IResolvable | CfnCluster.ClusterInstanceGroupProperty[]instance_groupsmay be undefinedtyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ClusterInstanceGroupProperty]]]instanceGroupsmay be undefinedIResolvableInstanceGroupsmay be undefinedIResolvableInstanceGroupsmay be undefinedinterface{} #
The instance groups of the SageMaker HyperPod cluster.
logicalIdstringlogical_idstrlogicalIdStringLogicalIdstringLogicalId*string #
The logical ID for this CloudFormation stack element.

The logical ID of the element is calculated from the path of the resource node in the construct tree.

To override this value, use overrideLogicalId(newLogicalId).

nodeNodenodeNodenodeNodeNodeNodeNodeNode #
The tree node.
nodeProvisioningModemay be undefinedstringnode_provisioning_modemay be undefinedstrnodeProvisioningModemay be undefinedStringNodeProvisioningModemay be undefinedstringNodeProvisioningModemay be undefined*string #
Determines the scaling strategy for the SageMaker HyperPod cluster.
nodeRecoverymay be undefinedstringnode_recoverymay be undefinedstrnodeRecoverymay be undefinedStringNodeRecoverymay be undefinedstringNodeRecoverymay be undefined*string #
Specifies whether to enable or disable the automatic node recovery feature of SageMaker HyperPod.
orchestratormay be undefinedIResolvable | CfnCluster.OrchestratorPropertyorchestratormay be undefinedtyping.Union[IResolvable, OrchestratorProperty]orchestratormay be undefinedIResolvableOrchestratormay be undefinedIResolvableOrchestratormay be undefinedinterface{} #
The orchestrator type for the SageMaker HyperPod cluster.
refstringrefstrrefStringRefstringRef*string #
Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.

If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through Lazy.any({ produce: resource.ref }).

restrictedInstanceGroupsmay be undefinedIResolvable | IResolvable | CfnCluster.ClusterRestrictedInstanceGroupProperty[]restricted_instance_groupsmay be undefinedtyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ClusterRestrictedInstanceGroupProperty]]]restrictedInstanceGroupsmay be undefinedIResolvableRestrictedInstanceGroupsmay be undefinedIResolvableRestrictedInstanceGroupsmay be undefinedinterface{} #
The restricted instance groups of the SageMaker HyperPod cluster.
restrictedInstanceGroupsConfigmay be undefinedIResolvable | CfnCluster.RestrictedInstanceGroupsConfigPropertyrestricted_instance_groups_configmay be undefinedtyping.Union[IResolvable, RestrictedInstanceGroupsConfigProperty]restrictedInstanceGroupsConfigmay be undefinedIResolvableRestrictedInstanceGroupsConfigmay be undefinedIResolvableRestrictedInstanceGroupsConfigmay be undefinedinterface{} #
The cluster-level configuration for restricted instance groups, including shared environment settings for inter-RIG communication and FSx Lustre sharing.
stackStackstackStackstackStackStackStackStackStack #
The stack in which this element is defined.

CfnElements must be defined within a stack scope (directly or indirectly).

tagsmay be undefinedCfnTag[]tagsmay be undefinedtyping.List[CfnTag]tagsmay be undefinedList<CfnTag>Tagsmay be undefinedCfnTag[]Tagsmay be undefined*[]CfnTag #
A tag object that consists of a key and an optional value, used to manage metadata for SageMaker AWS resources.
tieredStorageConfigmay be undefinedIResolvable | CfnCluster.TieredStorageConfigPropertytiered_storage_configmay be undefinedtyping.Union[IResolvable, TieredStorageConfigProperty]tieredStorageConfigmay be undefinedIResolvableTieredStorageConfigmay be undefinedIResolvableTieredStorageConfigmay be undefinedinterface{} #
Configuration for tiered storage in the SageMaker HyperPod cluster.
vpcConfigmay be undefinedIResolvable | CfnCluster.VpcConfigPropertyvpc_configmay be undefinedtyping.Union[IResolvable, VpcConfigProperty]vpcConfigmay be undefinedIResolvableVpcConfigmay be undefinedIResolvableVpcConfigmay be undefinedinterface{} #
Specifies an Amazon Virtual Private Cloud (VPC) that your SageMaker jobs, hosted models, and compute resources have access to.

Methods ​

addDeletionOverride(path: string): voiddef add_deletion_override(self, path: str) -> Nonepublic void addDeletionOverride(String path)public void AddDeletionOverride(string path)func AddDeletionOverride(Path *string) #
Syntactic sugar for `addOverride(path, undefined)`.
1 parameter

Parameters

  • pathpathpathpathPath — The path of the value to delete.
addDependency(target: CfnResource): voiddef add_dependency(self, target: CfnResource) -> Nonepublic void addDependency(CfnResource target)public void AddDependency(CfnResource target)func AddDependency(Target CfnResource) deprecated #
Use `addResourceDependency` instead.

This method has been renamed to addResourceDependency to more clearly set it apart from construct.node.addDependency. See the documentation of that function for more details.

addDependsOn(target: CfnResource): voiddef add_depends_on(self, target: CfnResource) -> Nonepublic void addDependsOn(CfnResource target)public void AddDependsOn(CfnResource target)func AddDependsOn(Target CfnResource) deprecated #
Use `addResourceDependency` instead.
notes

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

This method has been renamed to addResourceDependency, which makes it more clear that this method operates at a different level from the construct-level construct.node.addDependency() mechanism.

addMetadata(key: string, value: any): voiddef add_metadata(self, key: str, value: Any) -> Nonepublic void addMetadata(String key, Object value)public void AddMetadata(string key, object value)func AddMetadata(Key *string, Value interface{}) #
Add a value to the CloudFormation Resource Metadata.
addOverride(path: string, value: any): voiddef add_override(self, path: str, value: Any) -> Nonepublic void addOverride(String path, Object value)public void AddOverride(string path, object value)func AddOverride(Path *string, Value interface{}) #
Adds an override to the synthesized CloudFormation resource.
notes · 2 parameters

To add a property override, either use addPropertyOverride or prefix path with "Properties." (i.e. Properties.TopicName).

If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.

To include a literal . in the property name, prefix with a \. In most programming languages you will need to write this as "\\." because the \ itself will need to be escaped.

For example,

typescript
cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');

would add the overrides

json
"Properties": {
  "GlobalSecondaryIndexes": [
    {
      "Projection": {
        "NonKeyAttributes": [ "myattribute" ]
        ...
      }
      ...
    },
    {
      "ProjectionType": "INCLUDE"
      ...
    },
  ]
  ...
}

The value argument to addOverride will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.

Parameters

  • pathpathpathpathPath — - The path of the property, you can use dot notation to override values in complex types.
  • valuevaluevaluevalueValue — - The value.
addPropertyDeletionOverride(propertyPath: string): voiddef add_property_deletion_override(self, property_path: str) -> Nonepublic void addPropertyDeletionOverride(String propertyPath)public void AddPropertyDeletionOverride(string propertyPath)func AddPropertyDeletionOverride(PropertyPath *string) #
Adds an override that deletes the value of a property from the resource definition.
1 parameter

Parameters

  • propertyPathproperty_pathpropertyPathpropertyPathPropertyPath — The path to the property.
addPropertyOverride(propertyPath: string, value: any): voiddef add_property_override(self, property_path: str, value: Any) -> Nonepublic void addPropertyOverride(String propertyPath, Object value)public void AddPropertyOverride(string propertyPath, object value)func AddPropertyOverride(PropertyPath *string, Value interface{}) #
Adds an override to a resource property.

Syntactic sugar for addOverride("Properties.<...>", value).

2 parameters

Parameters

  • propertyPathproperty_pathpropertyPathpropertyPathPropertyPath — The path of the property.
  • valuevaluevaluevalueValue — The value.
addResourceDependency(target: CfnResource, reason?: string): voiddef add_resource_dependency(self, target: CfnResource, reason: typing.Optional[str] = None) -> Nonepublic void addResourceDependency(CfnResource target, String reason)public void AddResourceDependency(CfnResource target, string? reason = null)func AddResourceDependency(Target CfnResource, Reason *string) #
Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
notes

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

This method only adds dependencies between L1 resources. If you are looking for a generic construct-to-construct dependency mechanism that works for all constructs including L2s, use construct.node.addDependency instead.

applyCrossStackReferenceStrength(strength: ReferenceStrength): voiddef apply_cross_stack_reference_strength(self, strength: ReferenceStrength) -> Nonepublic void applyCrossStackReferenceStrength(ReferenceStrength strength)public void ApplyCrossStackReferenceStrength(ReferenceStrength strength)func ApplyCrossStackReferenceStrength(Strength ReferenceStrength) #
Sets the cross-stack reference strength for this resource.

When set, any cross-stack reference to this resource will use the specified strength instead of the global default from the consuming stack's context.

1 parameter

Parameters

  • strengthstrengthstrengthstrengthStrength — - The reference strength to use for this resource.
applyRemovalPolicy(policy?: RemovalPolicy, options?: RemovalPolicyOptions): voiddef apply_removal_policy(self, policy: typing.Optional[RemovalPolicy] = None, options: typing.Optional[RemovalPolicyOptions] = None) -> Nonepublic void applyRemovalPolicy(RemovalPolicy policy, RemovalPolicyOptions options)public void ApplyRemovalPolicy(RemovalPolicy? policy = null, RemovalPolicyOptions? options = null)func ApplyRemovalPolicy(Policy RemovalPolicy, Options RemovalPolicyOptions) #
Sets the deletion policy of the resource based on the removal policy specified.
notes

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN). In some cases, a snapshot can be taken of the resource prior to deletion (RemovalPolicy.SNAPSHOT). A list of resources that support this policy can be found in the following link:

arnForCluster(resource: IClusterRef): string@staticmethod def arn_for_cluster(resource: IClusterRef) -> strpublic static String arnForCluster(IClusterRef resource)public static string ArnForCluster(IClusterRef resource)func ArnForCluster(Resource IClusterRef) *string static #
cfnPropertyName(cdkPropertyName: string): stringdef cfn_property_name(self, cdk_property_name: str) -> strpublic String cfnPropertyName(String cdkPropertyName)public string CfnPropertyName(string cdkPropertyName)func CfnPropertyName(CdkPropertyName *string) *string #
getAtt(attributeName: string, typeHint?: ResolutionTypeHint): Referencedef get_att(self, attribute_name: str, type_hint: typing.Optional[ResolutionTypeHint] = None) -> Referencepublic Reference getAtt(String attributeName, ResolutionTypeHint typeHint)public Reference GetAtt(string attributeName, ResolutionTypeHint? typeHint = null)func GetAtt(AttributeName *string, TypeHint ResolutionTypeHint) Reference #
Returns a token for an runtime attribute of this resource.

Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility in case there is no generated attribute.

1 parameter

Parameters

  • attributeNameattribute_nameattributeNameattributeNameAttributeName — The name of the attribute.
getMetadata(key: string): anydef get_metadata(self, key: str) -> Anypublic Object getMetadata(String key)public object GetMetadata(string key)func GetMetadata(Key *string) interface{} #
Retrieve a value value from the CloudFormation Resource Metadata.
inspect(inspector: TreeInspector): voiddef inspect(self, inspector: TreeInspector) -> Nonepublic void inspect(TreeInspector inspector)public void Inspect(TreeInspector inspector)func Inspect(Inspector TreeInspector) #
Examines the CloudFormation resource and discloses attributes.
1 parameter

Parameters

  • inspectorinspectorinspectorinspectorInspector — tree inspector to collect and process attributes.
isCfnCluster(x: any): boolean@staticmethod def is_cfn_cluster(x: Any) -> boolpublic static Boolean isCfnCluster(Object x)public static bool IsCfnCluster(object x)func IsCfnCluster(X interface{}) *bool static #
Checks whether the given object is a CfnCluster.
isCfnElement(x: any): boolean@staticmethod def is_cfn_element(x: Any) -> boolpublic static Boolean isCfnElement(Object x)public static bool IsCfnElement(object x)func IsCfnElement(X interface{}) *bool static #
Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of instanceof to allow stack elements from different versions of this library to be included in the same stack.

returns

Returns: The construct as a stack element or undefined if it is not a stack element.

isCfnResource(x: any): boolean@staticmethod def is_cfn_resource(x: Any) -> boolpublic static Boolean isCfnResource(Object x)public static bool IsCfnResource(object x)func IsCfnResource(X interface{}) *bool static #
Check whether the given object is a CfnResource.
isConstruct(x: any): boolean@staticmethod def is_construct(x: Any) -> boolpublic static Boolean isConstruct(Object x)public static bool IsConstruct(object x)func IsConstruct(X interface{}) *bool static #
Checks if `x` is a construct.
notes · 1 parameter · returns

Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

Parameters

  • xxxxX — Any object.

Returns: true if x is an object created from a class which extends Construct.

obtainDependencies(): Stack | CfnResource[]def obtain_dependencies(self, ) -> typing.List[typing.Union[Stack, CfnResource]]public List<Stack> obtainDependencies()public Stack[] ObtainDependencies()func ObtainDependencies() *[]interface{} #
Retrieves an array of resources and stacks this resource depends on.

For resources depended on directly, returns the CfnResource object. For dependencies on other stacks, returns the Stack object. The order of the array is not guaranteed.

overrideLogicalId(newLogicalId: string): voiddef override_logical_id(self, new_logical_id: str) -> Nonepublic void overrideLogicalId(String newLogicalId)public void OverrideLogicalId(string newLogicalId)func OverrideLogicalId(NewLogicalId *string) #
Overrides the auto-generated logical ID with a specific ID.
1 parameter

Parameters

  • newLogicalIdnew_logical_idnewLogicalIdnewLogicalIdNewLogicalId — The new logical ID to use for this stack element.
removeDependency(target: CfnResource): voiddef remove_dependency(self, target: CfnResource) -> Nonepublic void removeDependency(CfnResource target)public void RemoveDependency(CfnResource target)func RemoveDependency(Target CfnResource) deprecated #
Use `removeResourceDependency` instead

This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.

removeResourceDependency(target: CfnResource): voiddef remove_resource_dependency(self, target: CfnResource) -> Nonepublic void removeResourceDependency(CfnResource target)public void RemoveResourceDependency(CfnResource target)func RemoveResourceDependency(Target CfnResource) #
Indicates that this resource no longer depends on another resource.

This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.

replaceDependency(target: CfnResource, newTarget: CfnResource): voiddef replace_dependency(self, target: CfnResource, new_target: CfnResource) -> Nonepublic void replaceDependency(CfnResource target, CfnResource newTarget)public void ReplaceDependency(CfnResource target, CfnResource newTarget)func ReplaceDependency(Target CfnResource, NewTarget CfnResource) #
Replaces one dependency with another.
2 parameters

Parameters

  • targettargettargettargetTarget — The dependency to replace.
  • newTargetnew_targetnewTargetnewTargetNewTarget — The new dependency to add.
toString(): stringdef to_string(self, ) -> strpublic String toString()public string ToString()func ToString() *string #
Returns a string representation of this construct.
returns

Returns: a string representation of this resource

with(...mixins: IMixin[]): IConstructdef with(self, mixins: IMixin) -> IConstructpublic IConstruct with(IMixin mixins)public IConstruct With(IMixin mixins)func With(Mixins IMixin) IConstruct #
Applies one or more mixins to this construct.

Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited. Use multiple with() calls if subsequent mixins should apply to added constructs.