CfnClusterProps Struct
Properties for defining a CfnCluster.
| Source | |
|---|---|
| Type last changed |
Example
// 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 cfnClusterProps: sagemaker.CfnClusterProps = {
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'],
},
};
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_props = sagemaker.CfnClusterProps(
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"]
)
)
// 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;
CfnClusterProps cfnClusterProps = CfnClusterProps.builder()
.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();
// 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 cfnClusterProps = 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" }
}
};
// 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{}
cfnClusterProps := &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"),
},
},
}
Properties
autoScalingoptionalIResolvable | CfnCluster.auto_scalingoptionaltyping.Union[IResolvable, ClusterAutoScalingConfigProperty]autoScalingoptionalIResolvableAutoScalingoptionalIResolvableAutoScalingoptionalinterface{} #clusterNameoptionalstringcluster_nameoptionalstrclusterNameoptionalStringClusterNameoptionalstringClusterNameoptional*string #clusterRoleoptionalstringcluster_roleoptionalstrclusterRoleoptionalStringClusterRoleoptionalstringClusterRoleoptional*string #instanceGroupsoptionalIResolvable | IResolvable | CfnCluster.instance_groupsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ClusterInstanceGroupProperty]]]instanceGroupsoptionalIResolvableInstanceGroupsoptionalIResolvableInstanceGroupsoptionalinterface{} #To delete an instance group, remove it from the array.
nodeProvisioningModeoptionalstringnode_provisioning_modeoptionalstrnodeProvisioningModeoptionalStringNodeProvisioningModeoptionalstringNodeProvisioningModeoptional*string #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 #Available values are Automatic for enabling and None for disabling.
orchestratoroptionalIResolvable | CfnCluster.OrchestratorPropertyorchestratoroptionaltyping.Union[IResolvable, OrchestratorProperty]orchestratoroptionalIResolvableOrchestratoroptionalIResolvableOrchestratoroptionalinterface{} #Currently, 'eks' is the only available option.
restrictedInstanceGroupsoptionalIResolvable | IResolvable | CfnCluster.restricted_instance_groupsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ClusterRestrictedInstanceGroupProperty]]]restrictedInstanceGroupsoptionalIResolvableRestrictedInstanceGroupsoptionalIResolvableRestrictedInstanceGroupsoptionalinterface{} #restrictedInstanceGroupsConfigoptionalIResolvable | CfnCluster.restricted_instance_groups_configoptionaltyping.Union[IResolvable, RestrictedInstanceGroupsConfigProperty]restrictedInstanceGroupsConfigoptionalIResolvableRestrictedInstanceGroupsConfigoptionalIResolvableRestrictedInstanceGroupsConfigoptionalinterface{} #tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #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.tiered_storage_configoptionaltyping.Union[IResolvable, TieredStorageConfigProperty]tieredStorageConfigoptionalIResolvableTieredStorageConfigoptionalIResolvableTieredStorageConfigoptionalinterface{} #vpcConfigoptionalIResolvable | CfnCluster.VpcConfigPropertyvpc_configoptionaltyping.Union[IResolvable, VpcConfigProperty]vpcConfigoptionalIResolvableVpcConfigoptionalIResolvableVpcConfigoptionalinterface{} #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 .