Class: AWSCDK::EC2::CfnEC2Fleet::EbsBlockDeviceProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EC2::CfnEC2Fleet::EbsBlockDeviceProperty
- Defined in:
- ec2/cfn_ec2_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).
-
#kms_key_id ⇒ String?
readonly
Identifier (key ID, key alias, key ARN, or alias ARN) of the customer managed KMS key to use for EBS encryption.
-
#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, kms_key_id: 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, kms_key_id: nil, snapshot_id: nil, volume_size: nil, volume_type: nil) ⇒ EbsBlockDeviceProperty
Returns a new instance of EbsBlockDeviceProperty.
1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 |
# File 'ec2/cfn_ec2_fleet.rb', line 1078 def initialize(delete_on_termination: nil, encrypted: nil, iops: nil, kms_key_id: 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? @kms_key_id = kms_key_id Jsii::Type.check_type(@kms_key_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "kmsKeyId") unless @kms_key_id.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 .
1101 1102 1103 |
# File 'ec2/cfn_ec2_fleet.rb', line 1101 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 EBS 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 .
- If you are creating a block device mapping for a new (empty) volume , you can include this parameter, and specify either
truefor an encrypted volume, orfalsefor an unencrypted volume. If you omit this parameter, it defaults tofalse(unencrypted). - If you are creating a block device mapping from an existing encrypted or unencrypted snapshot , you must omit this parameter. If you include this parameter, the request will fail, regardless of the value that you specify.
- If you are creating a block device mapping from an existing unencrypted volume , you can include this parameter, but you must specify
false. If you specifytrue, the request will fail. In this case, we recommend that you omit the parameter. - If you are creating a block device mapping from an existing encrypted volume , you can include this parameter, and specify either
trueorfalse. However, if you specifyfalse, the parameter is ignored and the block device mapping is always encrypted. In this case, we recommend that you omit the parameter.
1117 1118 1119 |
# File 'ec2/cfn_ec2_fleet.rb', line 1117 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.
1134 1135 1136 |
# File 'ec2/cfn_ec2_fleet.rb', line 1134 def iops @iops end |
#kms_key_id ⇒ String? (readonly)
Identifier (key ID, key alias, key ARN, or alias ARN) of the customer managed KMS key to use for EBS encryption.
This parameter is only supported on BlockDeviceMapping objects called by RunInstances , RequestSpotFleet , and RequestSpotInstances .
1141 1142 1143 |
# File 'ec2/cfn_ec2_fleet.rb', line 1141 def kms_key_id @kms_key_id end |
#snapshot_id ⇒ String? (readonly)
The ID of the snapshot.
1146 1147 1148 |
# File 'ec2/cfn_ec2_fleet.rb', line 1146 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
1162 1163 1164 |
# File 'ec2/cfn_ec2_fleet.rb', line 1162 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 .
1169 1170 1171 |
# File 'ec2/cfn_ec2_fleet.rb', line 1169 def volume_type @volume_type end |
Class Method Details
.jsii_properties ⇒ Object
1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 |
# File 'ec2/cfn_ec2_fleet.rb', line 1171 def self.jsii_properties { :delete_on_termination => "deleteOnTermination", :encrypted => "encrypted", :iops => "iops", :kms_key_id => "kmsKeyId", :snapshot_id => "snapshotId", :volume_size => "volumeSize", :volume_type => "volumeType", } end |
Instance Method Details
#to_jsii ⇒ Object
1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 |
# File 'ec2/cfn_ec2_fleet.rb', line 1183 def to_jsii result = {} result.merge!({ "deleteOnTermination" => @delete_on_termination, "encrypted" => @encrypted, "iops" => @iops, "kmsKeyId" => @kms_key_id, "snapshotId" => @snapshot_id, "volumeSize" => @volume_size, "volumeType" => @volume_type, }) result.compact end |