Class: Fog::Compute::Google::GlobalForwardingRules

Inherits:
Fog::Collection
  • Object
show all
Defined in:
lib/fog/google/models/compute/global_forwarding_rules.rb

Instance Method Summary collapse

Instance Method Details

#allObject



10
11
12
13
# File 'lib/fog/google/models/compute/global_forwarding_rules.rb', line 10

def all
  data = service.list_global_forwarding_rules.body['items'] || []
  load(data)
end

#get(identity, region = 'global') ⇒ Object



15
16
17
18
19
# File 'lib/fog/google/models/compute/global_forwarding_rules.rb', line 15

def get(identity, region='global')
  response = service.get_global_forwarding_rule(identity, region)
  return nil if response.nil?
  new(response.body)
end