Methods

Class/Module Index [+]

Quicksearch

Fog::Compute::AWS::InternetGateways

Public Class Methods

new(attributes) click to toggle source
Creates a new internet gateway

AWS.internet_gateways.new

==== Returns

Returns the details of the new InternetGateway

>> AWS.internet_gateways.new

> <Fog::Compute::AWS::InternetGateway

id=nil, attachment_set=nil, tag_set=nil >

# File lib/fog/aws/models/compute/internet_gateways.rb, line 30
def initialize(attributes)
  self.filters ||= {}
  super
end

Public Instance Methods

all(filters = filters) click to toggle source
Returns an array of all InternetGateways that have been created

AWS.internet_gateways.all

==== Returns

Returns an array of all InternetGateways

>> AWS.internet_gateways.all <Fog::Compute::AWS::InternetGateways filters={} [ <Fog::Compute::AWS::InternetGateway id="igw-some-id", attachment_set={"vpcId"=>"vpc-some-id", "state"=>"available"}, tag_set={} > ] >

# File lib/fog/aws/models/compute/internet_gateways.rb, line 56
def all(filters = filters)
  unless filters.is_a?(Hash)
    Fog::Logger.warning("all with #{filters.class} param is deprecated, use all('internet-gateway-id' => []) instead [light_black](#{caller.first})[/]")
    filters = {'internet-gateway-id' => [*filters]}
  end
  self.filters = filters
  data = service.describe_internet_gateways(filters).body
  load(data['internetGatewaySet'])
end
get(internet_gateway_id) click to toggle source
Used to retrieve an InternetGateway

You can run the following command to get the details:
AWS.internet_gateways.get("igw-12345678")

==== Returns

>> AWS.internet_gateways.get("igw-12345678")

> <Fog::Compute::AWS::InternetGateway

id="igw-12345678", attachment_set={"vpcId"=>"vpc-12345678", "state"=>"available"}, tag_set={} >

# File lib/fog/aws/models/compute/internet_gateways.rb, line 81
def get(internet_gateway_id)
  if internet_gateway_id
    self.class.new(:service => service).all('internet-gateway-id' => internet_gateway_id).first
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.