class AWS::EC2::VPNConnectionCollection

def [] vpn_connection_id

Returns:
  • (VPNConnection) -

Parameters:
  • vpn_connection_id (String) --
def [] vpn_connection_id
  VPNConnection.new(vpn_connection_id, :config => config)
end

def _each_item options = {}, &block

def _each_item options = {}, &block
  response = filtered_request(:describe_vpn_connections, options, &block)
  response.vpn_connection_set.each do |c|
    vpn_connection = VPNConnection.new_from(:describe_vpn_connections,
      c, c.vpn_connection_id, :config => config)
    yield(vpn_connection)
  end
end

def create options = {}

Returns:
  • (VPNConnection) -

Options Hash: (**options)
  • :vpn_type (String) --
  • :vpn_gateway (VPNGateway, String) --
  • :customer_gateway (CustomerGateway, String) --

Parameters:
  • options (Hash) --
def create options = {}
  client_opts = {}
  client_opts[:customer_gateway_id] = customer_gateway_id(options)
  client_opts[:vpn_gateway_id] = vpn_gateway_id(options)
  client_opts[:type] = options[:vpn_type] || 'ipsec.1'
  resp = client.create_vpn_connection(client_opts)
  VPNConnection.new_from(:create_vpn_connection, resp,
    resp.vpn_connection.vpn_connection_id, :config => config)
end

def customer_gateway_id options

def customer_gateway_id options
  gateway_id = options.delete(:customer_gateway)
  gateway_id ||= options[:customer_gateway_id]
  gateway_id ||= filter_value_for('customer-gateway-id')
  gateway_id = gateway_id.id if gateway_id.is_a?(CustomerGateway)
  gateway_id
end

def vpn_gateway_id options

def vpn_gateway_id options
  gateway_id = options.delete(:vpn_gateway)
  gateway_id ||= options[:vpn_gateway_id]
  gateway_id ||= filter_value_for('vpn-gateway-id')
  gateway_id = gateway_id.id if gateway_id.is_a?(VPNGateway)
  gateway_id
end