class Awspec::Type::Ebs
Constants
- STATES
Public Class Methods
Source
# File lib/awspec/type/ebs.rb, line 8 def initialize(name) super @display_name = name end
Calls superclass method
Public Instance Methods
Source
# File lib/awspec/type/ebs.rb, line 31 def attached_to?(instance_id) instance = find_ec2(instance_id) return false unless instance return false unless resource_via_client.attachments resource_via_client.attachments.first.instance_id == instance.instance_id && \ resource_via_client.attachments.first.state == 'attached' end
Source
# File lib/awspec/type/ebs.rb, line 17 def id @id ||= resource_via_client.volume_id if resource_via_client end
Source
# File lib/awspec/type/ebs.rb, line 13 def resource_via_client @resource_via_client ||= find_ebs(@display_name) end