Class: AWSCDK::StepFunctionsTasks::TransformResources

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
step_functions_tasks/transform_resources.rb

Overview

ML compute instances for the transform job.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(instance_count:, instance_type:, volume_encryption_key: nil) ⇒ TransformResources

Returns a new instance of TransformResources.

Parameters:

  • instance_count (Numeric)

    Number of ML compute instances to use in the transform job.

  • instance_type (AWSCDK::EC2::InstanceType)

    ML compute instance type for the transform job.

  • volume_encryption_key (AWSCDK::Interfaces::AWSKMS::IKeyRef, nil) (defaults to: nil)

    AWS KMS key that Amazon SageMaker uses to encrypt data on the storage volume attached to the ML compute instance(s).



10
11
12
13
14
15
16
17
# File 'step_functions_tasks/transform_resources.rb', line 10

def initialize(instance_count:, instance_type:, volume_encryption_key: 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("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLkluc3RhbmNlVHlwZSJ9")), "instanceType")
  @volume_encryption_key = volume_encryption_key
  Jsii::Type.check_type(@volume_encryption_key, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19rbXMuSUtleVJlZiJ9")), "volumeEncryptionKey") unless @volume_encryption_key.nil?
end

Instance Attribute Details

#instance_countNumeric (readonly)

Number of ML compute instances to use in the transform job.

Returns:

  • (Numeric)


22
23
24
# File 'step_functions_tasks/transform_resources.rb', line 22

def instance_count
  @instance_count
end

#instance_typeAWSCDK::EC2::InstanceType (readonly)

ML compute instance type for the transform job.



26
27
28
# File 'step_functions_tasks/transform_resources.rb', line 26

def instance_type
  @instance_type
end

#volume_encryption_keyAWSCDK::Interfaces::AWSKMS::IKeyRef? (readonly)

Note:

Default: - None

AWS KMS key that Amazon SageMaker uses to encrypt data on the storage volume attached to the ML compute instance(s).



31
32
33
# File 'step_functions_tasks/transform_resources.rb', line 31

def volume_encryption_key
  @volume_encryption_key
end

Class Method Details

.jsii_propertiesObject



33
34
35
36
37
38
39
# File 'step_functions_tasks/transform_resources.rb', line 33

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

Instance Method Details

#to_jsiiObject



41
42
43
44
45
46
47
48
49
# File 'step_functions_tasks/transform_resources.rb', line 41

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