Class: Fog::Compute::Google::HttpHealthChecks
- Inherits:
-
Fog::Collection
- Object
- Fog::Collection
- Fog::Compute::Google::HttpHealthChecks
- Defined in:
- lib/fog/compute/google/models/http_health_checks.rb
Instance Method Summary collapse
Instance Method Details
#all(opts = {}) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/fog/compute/google/models/http_health_checks.rb', line 7 def all(opts = {}) items = [] next_page_token = nil loop do data = service.list_http_health_checks(**opts) next_items = data.to_h[:items] || [] items.concat(next_items) next_page_token = data.next_page_token break if next_page_token.nil? || next_page_token.empty? opts[:page_token] = next_page_token end load(items) end |
#get(identity) ⇒ Object
21 22 23 24 25 26 27 28 29 |
# File 'lib/fog/compute/google/models/http_health_checks.rb', line 21 def get(identity) if identity http_health_check = service.get_http_health_check(identity).to_h return new(http_health_check) end rescue ::Google::Apis::ClientError => e raise e unless e.status_code == 404 nil end |