Class: AWS::EC2::VPNGateway::Attachment

Inherits:
Object
  • Object
show all
Defined in:
lib/aws/ec2/vpn_gateway/attachment.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(vpn_gateway, details) ⇒ Attachment

Returns a new instance of Attachment.



20
21
22
23
24
# File 'lib/aws/ec2/vpn_gateway/attachment.rb', line 20

def initialize vpn_gateway, details
  @vpn_gateway = vpn_gateway
  @vpc = VPC.new(details.vpc_id, :config => vpn_gateway.config)
  @state = details.state.to_sym
end

Instance Attribute Details

#stateSymbol (readonly)

Returns:

  • (Symbol)


33
34
35
# File 'lib/aws/ec2/vpn_gateway/attachment.rb', line 33

def state
  @state
end

#vpcVPC (readonly)

Returns:



30
31
32
# File 'lib/aws/ec2/vpn_gateway/attachment.rb', line 30

def vpc
  @vpc
end

#vpn_gatewayVPNGateway (readonly)

Returns:



27
28
29
# File 'lib/aws/ec2/vpn_gateway/attachment.rb', line 27

def vpn_gateway
  @vpn_gateway
end

Instance Method Details

#deletenil Also known as: detach

Deletes this attachment.

Returns:

  • (nil)


37
38
39
# File 'lib/aws/ec2/vpn_gateway/attachment.rb', line 37

def delete
  vpn_gateway.detach(vpc)
end