Class: AWSCDK::Sagemaker::CfnClusterProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
sagemaker/cfn_cluster_props.rb

Overview

Properties for defining a CfnCluster.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(auto_scaling: nil, cluster_name: nil, cluster_role: nil, instance_groups: nil, node_provisioning_mode: nil, node_recovery: nil, orchestrator: nil, restricted_instance_groups: nil, restricted_instance_groups_config: nil, tags: nil, tiered_storage_config: nil, vpc_config: nil) ⇒ CfnClusterProps

Returns a new instance of CfnClusterProps.

Parameters:



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'sagemaker/cfn_cluster_props.rb', line 21

def initialize(auto_scaling: nil, cluster_name: nil, cluster_role: nil, instance_groups: nil, node_provisioning_mode: nil, node_recovery: nil, orchestrator: nil, restricted_instance_groups: nil, restricted_instance_groups_config: nil, tags: nil, tiered_storage_config: nil, vpc_config: nil)
  @auto_scaling = auto_scaling.is_a?(Hash) ? ::AWSCDK::Sagemaker::CfnCluster::ClusterAutoScalingConfigProperty.new(**auto_scaling.transform_keys(&:to_sym)) : auto_scaling
  Jsii::Type.check_type(@auto_scaling, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zYWdlbWFrZXIuQ2ZuQ2x1c3Rlci5DbHVzdGVyQXV0b1NjYWxpbmdDb25maWdQcm9wZXJ0eSJ9XX19")), "autoScaling") unless @auto_scaling.nil?
  @cluster_name = cluster_name
  Jsii::Type.check_type(@cluster_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "clusterName") unless @cluster_name.nil?
  @cluster_role = cluster_role
  Jsii::Type.check_type(@cluster_role, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "clusterRole") unless @cluster_role.nil?
  @instance_groups = instance_groups
  Jsii::Type.check_type(@instance_groups, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2FnZW1ha2VyLkNmbkNsdXN0ZXIuQ2x1c3Rlckluc3RhbmNlR3JvdXBQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "instanceGroups") unless @instance_groups.nil?
  @node_provisioning_mode = node_provisioning_mode
  Jsii::Type.check_type(@node_provisioning_mode, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "nodeProvisioningMode") unless @node_provisioning_mode.nil?
  @node_recovery = node_recovery
  Jsii::Type.check_type(@node_recovery, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "nodeRecovery") unless @node_recovery.nil?
  @orchestrator = orchestrator.is_a?(Hash) ? ::AWSCDK::Sagemaker::CfnCluster::OrchestratorProperty.new(**orchestrator.transform_keys(&:to_sym)) : orchestrator
  Jsii::Type.check_type(@orchestrator, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zYWdlbWFrZXIuQ2ZuQ2x1c3Rlci5PcmNoZXN0cmF0b3JQcm9wZXJ0eSJ9XX19")), "orchestrator") unless @orchestrator.nil?
  @restricted_instance_groups = restricted_instance_groups
  Jsii::Type.check_type(@restricted_instance_groups, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2FnZW1ha2VyLkNmbkNsdXN0ZXIuQ2x1c3RlclJlc3RyaWN0ZWRJbnN0YW5jZUdyb3VwUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "restrictedInstanceGroups") unless @restricted_instance_groups.nil?
  @restricted_instance_groups_config = restricted_instance_groups_config.is_a?(Hash) ? ::AWSCDK::Sagemaker::CfnCluster::RestrictedInstanceGroupsConfigProperty.new(**restricted_instance_groups_config.transform_keys(&:to_sym)) : restricted_instance_groups_config
  Jsii::Type.check_type(@restricted_instance_groups_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zYWdlbWFrZXIuQ2ZuQ2x1c3Rlci5SZXN0cmljdGVkSW5zdGFuY2VHcm91cHNDb25maWdQcm9wZXJ0eSJ9XX19")), "restrictedInstanceGroupsConfig") unless @restricted_instance_groups_config.nil?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
  @tiered_storage_config = tiered_storage_config.is_a?(Hash) ? ::AWSCDK::Sagemaker::CfnCluster::TieredStorageConfigProperty.new(**tiered_storage_config.transform_keys(&:to_sym)) : tiered_storage_config
  Jsii::Type.check_type(@tiered_storage_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zYWdlbWFrZXIuQ2ZuQ2x1c3Rlci5UaWVyZWRTdG9yYWdlQ29uZmlnUHJvcGVydHkifV19fQ==")), "tieredStorageConfig") unless @tiered_storage_config.nil?
  @vpc_config = vpc_config.is_a?(Hash) ? ::AWSCDK::Sagemaker::CfnCluster::VPCConfigProperty.new(**vpc_config.transform_keys(&:to_sym)) : vpc_config
  Jsii::Type.check_type(@vpc_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zYWdlbWFrZXIuQ2ZuQ2x1c3Rlci5WcGNDb25maWdQcm9wZXJ0eSJ9XX19")), "vpcConfig") unless @vpc_config.nil?
end

Instance Attribute Details

#auto_scalingAWSCDK::IResolvable, ... (readonly)

Configuration for cluster auto-scaling.



52
53
54
# File 'sagemaker/cfn_cluster_props.rb', line 52

def auto_scaling
  @auto_scaling
end

#cluster_nameString? (readonly)

The name of the SageMaker HyperPod cluster.



57
58
59
# File 'sagemaker/cfn_cluster_props.rb', line 57

def cluster_name
  @cluster_name
end

#cluster_roleString? (readonly)

The cluster role for the autoscaler to assume.



62
63
64
# File 'sagemaker/cfn_cluster_props.rb', line 62

def cluster_role
  @cluster_role
end

#instance_groupsAWSCDK::IResolvable, ... (readonly)

The instance groups of the SageMaker HyperPod cluster.

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



69
70
71
# File 'sagemaker/cfn_cluster_props.rb', line 69

def instance_groups
  @instance_groups
end

#node_provisioning_modeString? (readonly)

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.



76
77
78
# File 'sagemaker/cfn_cluster_props.rb', line 76

def node_provisioning_mode
  @node_provisioning_mode
end

#node_recoveryString? (readonly)

Specifies whether to enable or disable the automatic node recovery feature of SageMaker HyperPod.

Available values are Automatic for enabling and None for disabling.



83
84
85
# File 'sagemaker/cfn_cluster_props.rb', line 83

def node_recovery
  @node_recovery
end

#orchestratorAWSCDK::IResolvable, ... (readonly)

The orchestrator type for the SageMaker HyperPod cluster.

Currently, 'eks' is the only available option.



90
91
92
# File 'sagemaker/cfn_cluster_props.rb', line 90

def orchestrator
  @orchestrator
end

#restricted_instance_groupsAWSCDK::IResolvable, ... (readonly)

The restricted instance groups of the SageMaker HyperPod cluster.



95
96
97
# File 'sagemaker/cfn_cluster_props.rb', line 95

def restricted_instance_groups
  @restricted_instance_groups
end

#restricted_instance_groups_configAWSCDK::IResolvable, ... (readonly)

The cluster-level configuration for restricted instance groups, including shared environment settings for inter-RIG communication and FSx Lustre sharing.



100
101
102
# File 'sagemaker/cfn_cluster_props.rb', line 100

def restricted_instance_groups_config
  @restricted_instance_groups_config
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

A tag object that consists of a key and an optional value, used to manage metadata for SageMaker AWS resources.

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 .



109
110
111
# File 'sagemaker/cfn_cluster_props.rb', line 109

def tags
  @tags
end

#tiered_storage_configAWSCDK::IResolvable, ... (readonly)

Configuration for tiered storage in the SageMaker HyperPod cluster.



114
115
116
# File 'sagemaker/cfn_cluster_props.rb', line 114

def tiered_storage_config
  @tiered_storage_config
end

#vpc_configAWSCDK::IResolvable, ... (readonly)

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 .



121
122
123
# File 'sagemaker/cfn_cluster_props.rb', line 121

def vpc_config
  @vpc_config
end

Class Method Details

.jsii_propertiesObject



123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
# File 'sagemaker/cfn_cluster_props.rb', line 123

def self.jsii_properties
  {
    :auto_scaling => "autoScaling",
    :cluster_name => "clusterName",
    :cluster_role => "clusterRole",
    :instance_groups => "instanceGroups",
    :node_provisioning_mode => "nodeProvisioningMode",
    :node_recovery => "nodeRecovery",
    :orchestrator => "orchestrator",
    :restricted_instance_groups => "restrictedInstanceGroups",
    :restricted_instance_groups_config => "restrictedInstanceGroupsConfig",
    :tags => "tags",
    :tiered_storage_config => "tieredStorageConfig",
    :vpc_config => "vpcConfig",
  }
end

Instance Method Details

#to_jsiiObject



140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
# File 'sagemaker/cfn_cluster_props.rb', line 140

def to_jsii
  result = {}
  result.merge!({
    "autoScaling" => @auto_scaling,
    "clusterName" => @cluster_name,
    "clusterRole" => @cluster_role,
    "instanceGroups" => @instance_groups,
    "nodeProvisioningMode" => @node_provisioning_mode,
    "nodeRecovery" => @node_recovery,
    "orchestrator" => @orchestrator,
    "restrictedInstanceGroups" => @restricted_instance_groups,
    "restrictedInstanceGroupsConfig" => @restricted_instance_groups_config,
    "tags" => @tags,
    "tieredStorageConfig" => @tiered_storage_config,
    "vpcConfig" => @vpc_config,
  })
  result.compact
end