class AWS::EC2::CustomerGateway

@attr_reader [Symbol] state Returns the gateway state (e.g.

:pending, :available, :deleting, :deleted)

@attr_reader [String] type The type of VPN connection the customer

gateway supports (e.g. 'ipsec.1').

@attr_reader [String] ip_address The Internet-routable IP address of

the customer gateway's outside interface.

@attr_reader [Integer] bgp_asn The customer gateway’s Border Gateway

Protocol (BGP) Autonomous System Number (ASN).

Attributes

customer_gateway_id[R]

@return [String]

id[R]

@return [String]

Public Class Methods

new(customer_gateway_id, options = {}) click to toggle source

@private

Calls superclass method
# File lib/aws/ec2/customer_gateway.rb, line 34
def initialize customer_gateway_id, options = {}
  @customer_gateway_id = customer_gateway_id
  super
end

Public Instance Methods

delete() click to toggle source

Deletes this customer gateway. @return [nil]

# File lib/aws/ec2/customer_gateway.rb, line 71
def delete
  client_opts = {}
  client_opts[:customer_gateway_id] = customer_gateway_id
  client.delete_customer_gateway(client_opts)
  nil
end
exists?() click to toggle source

@return [Boolean] Returns true if the gateway exists.

# File lib/aws/ec2/customer_gateway.rb, line 79
def exists?
  begin
    client.describe_customer_gateways(:customer_gateway_ids => [id])
    true
  rescue Errors::InvalidCustomerGatewayID::NotFound
    false
  end
end
vpn_connections() click to toggle source

@return [VPNConnectionCollection] Returns a collection

of VPC connections for this gateway.
# File lib/aws/ec2/customer_gateway.rb, line 64
def vpn_connections
  connections = VPNConnectionCollection.new(:config => config)
  connections.filter('customer-gateway-id', id)
end