Class: AWSCDK::EC2::CfnInstance::VolumeProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EC2::CfnInstance::VolumeProperty
- Defined in:
- ec2/cfn_instance.rb
Overview
Specifies a volume to attach to an instance.
Volume is an embedded property of the AWS::EC2::Instance resource.
Instance Attribute Summary collapse
-
#device ⇒ String
readonly
The device name (for example,
/dev/sdhorxvdh). -
#volume_id ⇒ String
readonly
The ID of the EBS volume.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(device:, volume_id:) ⇒ VolumeProperty
constructor
A new instance of VolumeProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(device:, volume_id:) ⇒ VolumeProperty
Returns a new instance of VolumeProperty.
2402 2403 2404 2405 2406 2407 |
# File 'ec2/cfn_instance.rb', line 2402 def initialize(device:, volume_id:) @device = device Jsii::Type.check_type(@device, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "device") @volume_id = volume_id Jsii::Type.check_type(@volume_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "volumeId") end |
Instance Attribute Details
#device ⇒ String (readonly)
The device name (for example, /dev/sdh or xvdh ).
2413 2414 2415 |
# File 'ec2/cfn_instance.rb', line 2413 def device @device end |
#volume_id ⇒ String (readonly)
The ID of the EBS volume.
The volume and instance must be within the same Availability Zone.
2420 2421 2422 |
# File 'ec2/cfn_instance.rb', line 2420 def volume_id @volume_id end |
Class Method Details
.jsii_properties ⇒ Object
2422 2423 2424 2425 2426 2427 |
# File 'ec2/cfn_instance.rb', line 2422 def self.jsii_properties { :device => "device", :volume_id => "volumeId", } end |
Instance Method Details
#to_jsii ⇒ Object
2429 2430 2431 2432 2433 2434 2435 2436 |
# File 'ec2/cfn_instance.rb', line 2429 def to_jsii result = {} result.merge!({ "device" => @device, "volumeId" => @volume_id, }) result.compact end |