Class: Serverspec::Type::AWS::EC2::Volume
- Inherits:
-
Base
- Object
- Base
- Serverspec::Type::AWS::EC2::Volume
- Defined in:
- lib/resources/ec2/image.rb
Overview
The Volume class exposes the image root volume as Aws::EC2::Types::BlockDeviceMapping
Instance Attribute Summary collapse
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #device_name ⇒ Object
- #encrypted? ⇒ Boolean
-
#initialize(vol, volume_type) ⇒ Volume
constructor
A new instance of Volume.
- #snapshot_id ⇒ Object
-
#to_s ⇒ String
Returns the string representation of EC2::RootVolume.
Constructor Details
#initialize(vol, volume_type) ⇒ Volume
Returns a new instance of Volume
73 74 75 76 |
# File 'lib/resources/ec2/image.rb', line 73 def initialize(vol, volume_type) @volume = vol @type = volume_type end |
Instance Attribute Details
#type ⇒ Object (readonly)
Returns the value of attribute type
90 91 92 |
# File 'lib/resources/ec2/image.rb', line 90 def type @type end |
Instance Method Details
#device_name ⇒ Object
86 87 88 |
# File 'lib/resources/ec2/image.rb', line 86 def device_name @volume.device_name end |
#encrypted? ⇒ Boolean
78 79 80 |
# File 'lib/resources/ec2/image.rb', line 78 def encrypted? @volume.ebs.encrypted end |
#snapshot_id ⇒ Object
82 83 84 |
# File 'lib/resources/ec2/image.rb', line 82 def snapshot_id @volume.ebs.snapshot_id end |
#to_s ⇒ String
Returns the string representation of EC2::RootVolume
94 95 96 |
# File 'lib/resources/ec2/image.rb', line 94 def to_s "EC2 Image Root Volume: #{@volume.ebs.snapshot_id}" end |