Class: AWSCDK::EC2::VolumeAttributes
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EC2::VolumeAttributes
- Defined in:
- ec2/volume_attributes.rb
Overview
Attributes required to import an existing EBS Volume into the Stack.
Instance Attribute Summary collapse
-
#availability_zone ⇒ String
readonly
The availability zone that the EBS Volume is contained within (ex: us-west-2a).
-
#encryption_key ⇒ AWSCDK::KMS::IKey?
readonly
The customer-managed encryption key that is used to encrypt the Volume.
-
#volume_id ⇒ String
readonly
The EBS Volume's ID.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(availability_zone:, volume_id:, encryption_key: nil) ⇒ VolumeAttributes
constructor
A new instance of VolumeAttributes.
- #to_jsii ⇒ Object
Constructor Details
#initialize(availability_zone:, volume_id:, encryption_key: nil) ⇒ VolumeAttributes
Returns a new instance of VolumeAttributes.
10 11 12 13 14 15 16 17 |
# File 'ec2/volume_attributes.rb', line 10 def initialize(availability_zone:, volume_id:, encryption_key: nil) @availability_zone = availability_zone Jsii::Type.check_type(@availability_zone, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "availabilityZone") @volume_id = volume_id Jsii::Type.check_type(@volume_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "volumeId") @encryption_key = encryption_key Jsii::Type.check_type(@encryption_key, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfa21zLklLZXkifQ==")), "encryptionKey") unless @encryption_key.nil? end |
Instance Attribute Details
#availability_zone ⇒ String (readonly)
The availability zone that the EBS Volume is contained within (ex: us-west-2a).
22 23 24 |
# File 'ec2/volume_attributes.rb', line 22 def availability_zone @availability_zone end |
#encryption_key ⇒ AWSCDK::KMS::IKey? (readonly)
Note:
Default: None -- The EBS Volume is not using a customer-managed KMS key for encryption.
The customer-managed encryption key that is used to encrypt the Volume.
31 32 33 |
# File 'ec2/volume_attributes.rb', line 31 def encryption_key @encryption_key end |
#volume_id ⇒ String (readonly)
The EBS Volume's ID.
26 27 28 |
# File 'ec2/volume_attributes.rb', line 26 def volume_id @volume_id end |
Class Method Details
.jsii_properties ⇒ Object
33 34 35 36 37 38 39 |
# File 'ec2/volume_attributes.rb', line 33 def self.jsii_properties { :availability_zone => "availabilityZone", :volume_id => "volumeId", :encryption_key => "encryptionKey", } end |
Instance Method Details
#to_jsii ⇒ Object
41 42 43 44 45 46 47 48 49 |
# File 'ec2/volume_attributes.rb', line 41 def to_jsii result = {} result.merge!({ "availabilityZone" => @availability_zone, "volumeId" => @volume_id, "encryptionKey" => @encryption_key, }) result.compact end |