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

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

Instance Method Summary collapse

Instance Method Details

#allObject



7
8
9
10
# File 'lib/fog/compute/google/models/global_forwarding_rules.rb', line 7

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

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



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

def get(identity, region = "global")
  if global_forwarding_rule = service.get_global_forwarding_rule(identity, region).body
    new(global_forwarding_rule)
  end
rescue Fog::Errors::NotFound
  nil
end