Class: AWSCDK::Sagemaker::CfnCluster::ClusterEbsVolumeConfigProperty

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

Overview

Defines the configuration for attaching an additional Amazon Elastic Block Store (EBS) volume to each instance of the SageMaker HyperPod cluster instance group.

To learn more, see SageMaker HyperPod release notes: June 20, 2024 .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(root_volume: nil, volume_kms_key_id: nil, volume_size_in_gb: nil) ⇒ ClusterEbsVolumeConfigProperty

Returns a new instance of ClusterEbsVolumeConfigProperty.

Parameters:

  • root_volume (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    Specifies whether the configuration is for the cluster's root or secondary Amazon EBS volume.

  • volume_kms_key_id (String, nil) (defaults to: nil)

    The ID of a KMS key to encrypt the Amazon EBS volume.

  • volume_size_in_gb (Numeric, nil) (defaults to: nil)

    The size in gigabytes (GB) of the additional EBS volume to be attached to the instances in the SageMaker HyperPod cluster instance group.



864
865
866
867
868
869
870
871
# File 'sagemaker/cfn_cluster.rb', line 864

def initialize(root_volume: nil, volume_kms_key_id: nil, volume_size_in_gb: nil)
  @root_volume = root_volume
  Jsii::Type.check_type(@root_volume, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "rootVolume") unless @root_volume.nil?
  @volume_kms_key_id = volume_kms_key_id
  Jsii::Type.check_type(@volume_kms_key_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "volumeKmsKeyId") unless @volume_kms_key_id.nil?
  @volume_size_in_gb = volume_size_in_gb
  Jsii::Type.check_type(@volume_size_in_gb, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "volumeSizeInGb") unless @volume_size_in_gb.nil?
end

Instance Attribute Details

#root_volumeBoolean, ... (readonly)

Specifies whether the configuration is for the cluster's root or secondary Amazon EBS volume.

You can specify two ClusterEbsVolumeConfig fields to configure both the root and secondary volumes. Set the value to True if you'd like to provide your own customer managed AWS KMS key to encrypt the root volume. When True :

  • The configuration is applied to the root volume.
  • You can't specify the VolumeSizeInGB field. The size of the root volume is determined for you.
  • You must specify a KMS key ID for VolumeKmsKeyId to encrypt the root volume with your own KMS key instead of an AWS owned KMS key.

Otherwise, by default, the value is False , and the following applies:

  • The configuration is applied to the secondary volume, while the root volume is encrypted with an AWS owned key.
  • You must specify the VolumeSizeInGB field.
  • You can optionally specify the VolumeKmsKeyId to encrypt the secondary volume with your own KMS key instead of an AWS owned KMS key.


889
890
891
# File 'sagemaker/cfn_cluster.rb', line 889

def root_volume
  @root_volume
end

#volume_kms_key_idString? (readonly)

The ID of a KMS key to encrypt the Amazon EBS volume.



894
895
896
# File 'sagemaker/cfn_cluster.rb', line 894

def volume_kms_key_id
  @volume_kms_key_id
end

#volume_size_in_gbNumeric? (readonly)

The size in gigabytes (GB) of the additional EBS volume to be attached to the instances in the SageMaker HyperPod cluster instance group.

The additional EBS volume is attached to each instance within the SageMaker HyperPod cluster instance group and mounted to /opt/sagemaker .



901
902
903
# File 'sagemaker/cfn_cluster.rb', line 901

def volume_size_in_gb
  @volume_size_in_gb
end

Class Method Details

.jsii_propertiesObject



903
904
905
906
907
908
909
# File 'sagemaker/cfn_cluster.rb', line 903

def self.jsii_properties
  {
    :root_volume => "rootVolume",
    :volume_kms_key_id => "volumeKmsKeyId",
    :volume_size_in_gb => "volumeSizeInGb",
  }
end

Instance Method Details

#to_jsiiObject



911
912
913
914
915
916
917
918
919
# File 'sagemaker/cfn_cluster.rb', line 911

def to_jsii
  result = {}
  result.merge!({
    "rootVolume" => @root_volume,
    "volumeKmsKeyId" => @volume_kms_key_id,
    "volumeSizeInGb" => @volume_size_in_gb,
  })
  result.compact
end