Class: Fog::Compute::Google::TargetHttpsProxies

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

Instance Method Summary collapse

Instance Method Details

#all(_filters = {}) ⇒ Object


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

def all(_filters = {})
  data = service.list_target_https_proxies.to_h[:items] || []
  load(data)
end

#get(identity) ⇒ Object


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

def get(identity)
  if target_https_proxy = service.get_target_https_proxy(identity).to_h
    new(target_https_proxy)
  end
rescue ::Google::Apis::ClientError => e
  raise e unless e.status_code == 404
  nil
end