Class: AWSCDK::EC2::CfnSpotFleet::EbsBlockDeviceProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ec2/cfn_spot_fleet.rb

Overview

Describes a block device for an EBS volume.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(delete_on_termination: nil, encrypted: nil, iops: nil, snapshot_id: nil, volume_size: nil, volume_type: nil) ⇒ EbsBlockDeviceProperty

Returns a new instance of EbsBlockDeviceProperty.

Parameters:

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

    Indicates whether the EBS volume is deleted on instance termination.

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

    Indicates whether the encryption state of an EBS volume is changed while being restored from a backing snapshot.

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

    The number of I/O operations per second (IOPS).

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

    The ID of the snapshot.

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

    The size of the volume, in GiBs.

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

    The volume type.



894
895
896
897
898
899
900
901
902
903
904
905
906
907
# File 'ec2/cfn_spot_fleet.rb', line 894

def initialize(delete_on_termination: nil, encrypted: nil, iops: nil, snapshot_id: nil, volume_size: nil, volume_type: nil)
  @delete_on_termination = delete_on_termination
  Jsii::Type.check_type(@delete_on_termination, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "deleteOnTermination") unless @delete_on_termination.nil?
  @encrypted = encrypted
  Jsii::Type.check_type(@encrypted, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "encrypted") unless @encrypted.nil?
  @iops = iops
  Jsii::Type.check_type(@iops, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "iops") unless @iops.nil?
  @snapshot_id = snapshot_id
  Jsii::Type.check_type(@snapshot_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "snapshotId") unless @snapshot_id.nil?
  @volume_size = volume_size
  Jsii::Type.check_type(@volume_size, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "volumeSize") unless @volume_size.nil?
  @volume_type = volume_type
  Jsii::Type.check_type(@volume_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "volumeType") unless @volume_type.nil?
end

Instance Attribute Details

#delete_on_terminationBoolean, ... (readonly)

Indicates whether the EBS volume is deleted on instance termination.

For more information, see Preserving Amazon EBS volumes on instance termination in the Amazon EC2 User Guide .



915
916
917
# File 'ec2/cfn_spot_fleet.rb', line 915

def delete_on_termination
  @delete_on_termination
end

#encryptedBoolean, ... (readonly)

Indicates whether the encryption state of an EBS volume is changed while being restored from a backing snapshot.

The effect of setting the encryption state to true depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see Amazon EBS Encryption in the Amazon EC2 User Guide .

In no case can you remove encryption from an encrypted volume.

Encrypted volumes can only be attached to instances that support Amazon EBS encryption. For more information, see Supported Instance Types .

This parameter is not returned by DescribeImageAttribute .



928
929
930
# File 'ec2/cfn_spot_fleet.rb', line 928

def encrypted
  @encrypted
end

#iopsNumeric? (readonly)

The number of I/O operations per second (IOPS).

For gp3 , io1 , and io2 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.

The following are the supported values for each volume type:

  • gp3 : 3,000 - 80,000 IOPS
  • io1 : 100 - 64,000 IOPS
  • io2 : 100 - 256,000 IOPS

For io2 volumes, you can achieve up to 256,000 IOPS on instances built on the Nitro System . On other instances, you can achieve performance up to 32,000 IOPS.

This parameter is required for io1 and io2 volumes. The default for gp3 volumes is 3,000 IOPS.



945
946
947
# File 'ec2/cfn_spot_fleet.rb', line 945

def iops
  @iops
end

#snapshot_idString? (readonly)

The ID of the snapshot.



950
951
952
# File 'ec2/cfn_spot_fleet.rb', line 950

def snapshot_id
  @snapshot_id
end

#volume_sizeNumeric? (readonly)

The size of the volume, in GiBs.

You must specify either a snapshot ID or a volume size. If you specify a snapshot, the default is the snapshot size. You can specify a volume size that is equal to or larger than the snapshot size.

The following are the supported sizes for each volume type:

  • gp2 : 1 - 16,384 GiB
  • gp3 : 1 - 65,536 GiB
  • io1 : 4 - 16,384 GiB
  • io2 : 4 - 65,536 GiB
  • st1 and sc1 : 125 - 16,384 GiB
  • standard : 1 - 1024 GiB


966
967
968
# File 'ec2/cfn_spot_fleet.rb', line 966

def volume_size
  @volume_size
end

#volume_typeString? (readonly)

The volume type.

For more information, see Amazon EBS volume types in the Amazon EBS User Guide .



973
974
975
# File 'ec2/cfn_spot_fleet.rb', line 973

def volume_type
  @volume_type
end

Class Method Details

.jsii_propertiesObject



975
976
977
978
979
980
981
982
983
984
# File 'ec2/cfn_spot_fleet.rb', line 975

def self.jsii_properties
  {
    :delete_on_termination => "deleteOnTermination",
    :encrypted => "encrypted",
    :iops => "iops",
    :snapshot_id => "snapshotId",
    :volume_size => "volumeSize",
    :volume_type => "volumeType",
  }
end

Instance Method Details

#to_jsiiObject



986
987
988
989
990
991
992
993
994
995
996
997
# File 'ec2/cfn_spot_fleet.rb', line 986

def to_jsii
  result = {}
  result.merge!({
    "deleteOnTermination" => @delete_on_termination,
    "encrypted" => @encrypted,
    "iops" => @iops,
    "snapshotId" => @snapshot_id,
    "volumeSize" => @volume_size,
    "volumeType" => @volume_type,
  })
  result.compact
end