Class: AWSCDK::EMR::CfnCluster::VolumeSpecificationProperty

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

Overview

VolumeSpecification is a subproperty of the EbsBlockDeviceConfig property type.

VolumeSecification determines the volume type, IOPS, and size (GiB) for EBS volumes attached to EC2 instances.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(size_in_gb:, volume_type:, iops: nil, throughput: nil) ⇒ VolumeSpecificationProperty

Returns a new instance of VolumeSpecificationProperty.

Parameters:

  • size_in_gb (Numeric)

    The volume size, in gibibytes (GiB).

  • volume_type (String)

    The volume type.

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

    The number of I/O operations per second (IOPS) that the volume supports.

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

    The throughput, in mebibyte per second (MiB/s).



3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
# File 'emr/cfn_cluster.rb', line 3138

def initialize(size_in_gb:, volume_type:, iops: nil, throughput: nil)
  @size_in_gb = size_in_gb
  Jsii::Type.check_type(@size_in_gb, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "sizeInGb")
  @volume_type = volume_type
  Jsii::Type.check_type(@volume_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "volumeType")
  @iops = iops
  Jsii::Type.check_type(@iops, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "iops") unless @iops.nil?
  @throughput = throughput
  Jsii::Type.check_type(@throughput, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "throughput") unless @throughput.nil?
end

Instance Attribute Details

#iopsNumeric? (readonly)

The number of I/O operations per second (IOPS) that the volume supports.



3167
3168
3169
# File 'emr/cfn_cluster.rb', line 3167

def iops
  @iops
end

#size_in_gbNumeric (readonly)

The volume size, in gibibytes (GiB).

This can be a number from 1 - 1024. If the volume type is EBS-optimized, the minimum value is 10.



3155
3156
3157
# File 'emr/cfn_cluster.rb', line 3155

def size_in_gb
  @size_in_gb
end

#throughputNumeric? (readonly)

The throughput, in mebibyte per second (MiB/s).

This optional parameter can be a number from 125 - 1000 and is valid only for gp3 volumes.



3174
3175
3176
# File 'emr/cfn_cluster.rb', line 3174

def throughput
  @throughput
end

#volume_typeString (readonly)

The volume type.

Volume types supported are gp3, gp2, io1, st1, sc1, and standard.



3162
3163
3164
# File 'emr/cfn_cluster.rb', line 3162

def volume_type
  @volume_type
end

Class Method Details

.jsii_propertiesObject



3176
3177
3178
3179
3180
3181
3182
3183
# File 'emr/cfn_cluster.rb', line 3176

def self.jsii_properties
  {
    :size_in_gb => "sizeInGb",
    :volume_type => "volumeType",
    :iops => "iops",
    :throughput => "throughput",
  }
end

Instance Method Details

#to_jsiiObject



3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
# File 'emr/cfn_cluster.rb', line 3185

def to_jsii
  result = {}
  result.merge!({
    "sizeInGb" => @size_in_gb,
    "volumeType" => @volume_type,
    "iops" => @iops,
    "throughput" => @throughput,
  })
  result.compact
end