Class: AWS::EC2::CustomerGatewayCollection
- Inherits:
-
Collection
- Object
- Collection
- AWS::EC2::CustomerGatewayCollection
- Includes:
- Core::Collection::Simple, TaggedCollection
- Defined in:
- lib/aws/ec2/customer_gateway_collection.rb
Instance Attribute Summary
Attributes included from Core::Model
Instance Method Summary collapse
- #[](customer_gateway_id) ⇒ CustomerGateway
- #create(bgp_asn, ip_address, options = {}) ⇒ CustomerGateway
Methods included from Core::Collection::Simple
Methods included from Core::Collection
#each, #each_batch, #enum, #first, #in_groups_of, #page
Methods included from Core::Model
#client, #config_prefix, #initialize, #inspect
Methods included from TaggedCollection
Methods included from FilteredCollection
#filter, #filtered_request, #initialize
Instance Method Details
#[](customer_gateway_id) ⇒ CustomerGateway
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, = {} client_opts = {} client_opts[:bgp_asn] = bgp_asn client_opts[:public_ip] = ip_address client_opts[:type] = [: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 |