Class: AWSCDK::Sagemaker::CfnModelPackage::TransformResourcesProperty

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

Overview

Describes the resources, including ML instance types and ML instance count, to use for transform job.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(instance_count:, instance_type:, volume_kms_key_id: nil) ⇒ TransformResourcesProperty

Returns a new instance of TransformResourcesProperty.

Parameters:

  • instance_count (Numeric)

    The number of ML compute instances to use in the transform job.

  • instance_type (String)

    The ML compute instance type for the transform job.

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

    The AWS Key Management Service ( AWS KMS) key that Amazon SageMaker uses to encrypt model data on the storage volume attached to the ML compute instance(s) that run the batch transform job.



2694
2695
2696
2697
2698
2699
2700
2701
# File 'sagemaker/cfn_model_package.rb', line 2694

def initialize(instance_count:, instance_type:, volume_kms_key_id: nil)
  @instance_count = instance_count
  Jsii::Type.check_type(@instance_count, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "instanceCount")
  @instance_type = instance_type
  Jsii::Type.check_type(@instance_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "instanceType")
  @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?
end

Instance Attribute Details

#instance_countNumeric (readonly)

The number of ML compute instances to use in the transform job.

The default value is 1 , and the maximum is 100 . For distributed transform jobs, specify a value greater than 1 .



2709
2710
2711
# File 'sagemaker/cfn_model_package.rb', line 2709

def instance_count
  @instance_count
end

#instance_typeString (readonly)

The ML compute instance type for the transform job.

If you are using built-in algorithms to transform moderately sized datasets, we recommend using ml.m4.xlarge or ml.m5.large instance types.



2716
2717
2718
# File 'sagemaker/cfn_model_package.rb', line 2716

def instance_type
  @instance_type
end

#volume_kms_key_idString? (readonly)

The AWS Key Management Service ( AWS KMS) key that Amazon SageMaker uses to encrypt model data on the storage volume attached to the ML compute instance(s) that run the batch transform job.

Certain Nitro-based instances include local storage, dependent on the instance type. Local storage volumes are encrypted using a hardware module on the instance. You can't request a VolumeKmsKeyId when using an instance type with local storage.

For a list of instance types that support local instance storage, see Instance Store Volumes .

For more information about local instance storage encryption, see SSD Instance Store Volumes .

The VolumeKmsKeyId can be any of the following formats:

  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
  • Key ARN: arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
  • Alias name: alias/ExampleAlias
  • Alias name ARN: arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias


2734
2735
2736
# File 'sagemaker/cfn_model_package.rb', line 2734

def volume_kms_key_id
  @volume_kms_key_id
end

Class Method Details

.jsii_propertiesObject



2736
2737
2738
2739
2740
2741
2742
# File 'sagemaker/cfn_model_package.rb', line 2736

def self.jsii_properties
  {
    :instance_count => "instanceCount",
    :instance_type => "instanceType",
    :volume_kms_key_id => "volumeKmsKeyId",
  }
end

Instance Method Details

#to_jsiiObject



2744
2745
2746
2747
2748
2749
2750
2751
2752
# File 'sagemaker/cfn_model_package.rb', line 2744

def to_jsii
  result = {}
  result.merge!({
    "instanceCount" => @instance_count,
    "instanceType" => @instance_type,
    "volumeKmsKeyId" => @volume_kms_key_id,
  })
  result.compact
end