Class: AWS::EC2::CustomerGatewayCollection
Instance Method Summary
collapse
#each, #each_batch, #enum, #first, #in_groups_of, #page
#tagged, #tagged_values
#filter, #initialize
Instance Method Details
53
54
55
|
# File 'lib/aws/ec2/customer_gateway_collection.rb', line 53
def [] customer_gateway_id
CustomerGateway.new(customer_gateway_id, :config => config)
end
|
#create(bgp_asn, ip_address, options = {}) ⇒ CustomerGateway
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
# File 'lib/aws/ec2/customer_gateway_collection.rb', line 35
def create bgp_asn, ip_address, options = {}
client_opts = {}
client_opts[:bgp_asn] = bgp_asn
client_opts[:public_ip] = ip_address
client_opts[:type] = options[:vpn_type] || 'ipsec.1'
resp = client.create_customer_gateway(client_opts)
CustomerGateway.new_from(:create_customer_gateway,
resp.customer_gateway,
resp.customer_gateway.customer_gateway_id,
:config => config)
end
|