Class: AWSCDK::EC2::CfnLaunchTemplate::EbsProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EC2::CfnLaunchTemplate::EbsProperty
- Defined in:
- ec2/cfn_launch_template.rb
Overview
Parameters for a block device for an EBS volume in an Amazon EC2 launch template.
Ebs is a property of AWS::EC2::LaunchTemplate BlockDeviceMapping .
Instance Attribute Summary collapse
-
#delete_on_termination ⇒ Boolean, ...
readonly
Indicates whether the EBS volume is deleted on instance termination.
- #ebs_card_index ⇒ Numeric? readonly
-
#encrypted ⇒ Boolean, ...
readonly
Indicates whether the EBS volume is encrypted.
-
#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.
-
#throughput ⇒ Numeric?
readonly
The throughput to provision for a
gp3volume, with a maximum of 2,000 MiB/s. -
#volume_initialization_rate ⇒ Numeric?
readonly
Specifies the Amazon EBS Provisioned Rate for Volume Initialization (volume initialization rate), in MiB/s, at which to download the snapshot blocks from Amazon S3 to the volume.
-
#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, ebs_card_index: nil, encrypted: nil, iops: nil, kms_key_id: nil, snapshot_id: nil, throughput: nil, volume_initialization_rate: nil, volume_size: nil, volume_type: nil) ⇒ EbsProperty
constructor
A new instance of EbsProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(delete_on_termination: nil, ebs_card_index: nil, encrypted: nil, iops: nil, kms_key_id: nil, snapshot_id: nil, throughput: nil, volume_initialization_rate: nil, volume_size: nil, volume_type: nil) ⇒ EbsProperty
Returns a new instance of EbsProperty.
1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 |
# File 'ec2/cfn_launch_template.rb', line 1145 def initialize(delete_on_termination: nil, ebs_card_index: nil, encrypted: nil, iops: nil, kms_key_id: nil, snapshot_id: nil, throughput: nil, volume_initialization_rate: 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? @ebs_card_index = ebs_card_index Jsii::Type.check_type(@ebs_card_index, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "ebsCardIndex") unless @ebs_card_index.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? @throughput = throughput Jsii::Type.check_type(@throughput, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "throughput") unless @throughput.nil? @volume_initialization_rate = volume_initialization_rate Jsii::Type.check_type(@volume_initialization_rate, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "volumeInitializationRate") unless @volume_initialization_rate.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.
1172 1173 1174 |
# File 'ec2/cfn_launch_template.rb', line 1172 def delete_on_termination @delete_on_termination end |
#ebs_card_index ⇒ Numeric? (readonly)
1175 1176 1177 |
# File 'ec2/cfn_launch_template.rb', line 1175 def ebs_card_index @ebs_card_index end |
#encrypted ⇒ Boolean, ... (readonly)
Indicates whether the EBS volume is encrypted.
Encrypted volumes can only be attached to instances that support Amazon EBS encryption. If you are creating a volume from a snapshot, you can't specify an encryption value.
1182 1183 1184 |
# File 'ec2/cfn_launch_template.rb', line 1182 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 supported for io1 , io2 , and gp3 volumes only.
1199 1200 1201 |
# File 'ec2/cfn_launch_template.rb', line 1199 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.
1204 1205 1206 |
# File 'ec2/cfn_launch_template.rb', line 1204 def kms_key_id @kms_key_id end |
#snapshot_id ⇒ String? (readonly)
The ID of the snapshot.
1209 1210 1211 |
# File 'ec2/cfn_launch_template.rb', line 1209 def snapshot_id @snapshot_id end |
#throughput ⇒ Numeric? (readonly)
The throughput to provision for a gp3 volume, with a maximum of 2,000 MiB/s.
Valid Range: Minimum value of 125. Maximum value of 2,000.
1216 1217 1218 |
# File 'ec2/cfn_launch_template.rb', line 1216 def throughput @throughput end |
#volume_initialization_rate ⇒ Numeric? (readonly)
Specifies the Amazon EBS Provisioned Rate for Volume Initialization (volume initialization rate), in MiB/s, at which to download the snapshot blocks from Amazon S3 to the volume.
This is also known as volume initialization . Specifying a volume initialization rate ensures that the volume is initialized at a predictable and consistent rate after creation.
This parameter is supported only for volumes created from snapshots. Omit this parameter if:
- You want to create the volume using fast snapshot restore. You must specify a snapshot that is enabled for fast snapshot restore. In this case, the volume is fully initialized at creation.
If you specify a snapshot that is enabled for fast snapshot restore and a volume initialization rate, the volume will be initialized at the specified rate instead of fast snapshot restore.
- You want to create a volume that is initialized at the default rate.
For more information, see Initialize Amazon EBS volumes in the Amazon EC2 User Guide .
Valid range: 100 - 300 MiB/s
1235 1236 1237 |
# File 'ec2/cfn_launch_template.rb', line 1235 def volume_initialization_rate @volume_initialization_rate end |
#volume_size ⇒ Numeric? (readonly)
The size of the volume, in GiBs.
You must specify either a snapshot ID or a volume size. The following are the supported volumes 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
1249 1250 1251 |
# File 'ec2/cfn_launch_template.rb', line 1249 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 .
1256 1257 1258 |
# File 'ec2/cfn_launch_template.rb', line 1256 def volume_type @volume_type end |
Class Method Details
.jsii_properties ⇒ Object
1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 |
# File 'ec2/cfn_launch_template.rb', line 1258 def self.jsii_properties { :delete_on_termination => "deleteOnTermination", :ebs_card_index => "ebsCardIndex", :encrypted => "encrypted", :iops => "iops", :kms_key_id => "kmsKeyId", :snapshot_id => "snapshotId", :throughput => "throughput", :volume_initialization_rate => "volumeInitializationRate", :volume_size => "volumeSize", :volume_type => "volumeType", } end |
Instance Method Details
#to_jsii ⇒ Object
1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 |
# File 'ec2/cfn_launch_template.rb', line 1273 def to_jsii result = {} result.merge!({ "deleteOnTermination" => @delete_on_termination, "ebsCardIndex" => @ebs_card_index, "encrypted" => @encrypted, "iops" => @iops, "kmsKeyId" => @kms_key_id, "snapshotId" => @snapshot_id, "throughput" => @throughput, "volumeInitializationRate" => @volume_initialization_rate, "volumeSize" => @volume_size, "volumeType" => @volume_type, }) result.compact end |