Class: AWSCDK::EC2::CfnSpotFleet::EbsBlockDeviceProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EC2::CfnSpotFleet::EbsBlockDeviceProperty
- Defined in:
- ec2/cfn_spot_fleet.rb
Overview
Describes a block device for an EBS volume.
Instance Attribute Summary collapse
-
#delete_on_termination ⇒ Boolean, ...
readonly
Indicates whether the EBS volume is deleted on instance termination.
-
#encrypted ⇒ Boolean, ...
readonly
Indicates whether the encryption state of an EBS volume is changed while being restored from a backing snapshot.
-
#iops ⇒ Numeric?
readonly
The number of I/O operations per second (IOPS).
-
#snapshot_id ⇒ String?
readonly
The ID of the snapshot.
-
#volume_size ⇒ Numeric?
readonly
The size of the volume, in GiBs.
-
#volume_type ⇒ String?
readonly
The volume type.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(delete_on_termination: nil, encrypted: nil, iops: nil, snapshot_id: nil, volume_size: nil, volume_type: nil) ⇒ EbsBlockDeviceProperty
constructor
A new instance of EbsBlockDeviceProperty.
- #to_jsii ⇒ Object
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.
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_termination ⇒ Boolean, ... (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 |
#encrypted ⇒ Boolean, ... (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 |
#iops ⇒ Numeric? (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 IOPSio1: 100 - 64,000 IOPSio2: 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_id ⇒ String? (readonly)
The ID of the snapshot.
950 951 952 |
# File 'ec2/cfn_spot_fleet.rb', line 950 def snapshot_id @snapshot_id end |
#volume_size ⇒ Numeric? (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 GiBgp3: 1 - 65,536 GiBio1: 4 - 16,384 GiBio2: 4 - 65,536 GiBst1andsc1: 125 - 16,384 GiBstandard: 1 - 1024 GiB
966 967 968 |
# File 'ec2/cfn_spot_fleet.rb', line 966 def volume_size @volume_size end |
#volume_type ⇒ String? (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_properties ⇒ Object
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_jsii ⇒ Object
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 |