class Fog::Compute::Google::TargetHttpProxy
Constants
- RUNNING_STATE
Public Instance Methods
destroy(async=true)
click to toggle source
# File lib/fog/google/models/compute/target_http_proxy.rb, line 30 def destroy(async=true) requires :name operation = service.delete_target_http_proxy(name) if not async # wait until "DONE" to ensure the operation doesn't fail, raises # exception on error Fog.wait_for do operation.body["status"] == "DONE" end end operation end
ready?()
click to toggle source
# File lib/fog/google/models/compute/target_http_proxy.rb, line 48 def ready? begin service.get_target_http_proxy(self.name) true rescue Fog::Errors::NotFound false end end
reload()
click to toggle source
# File lib/fog/google/models/compute/target_http_proxy.rb, line 57 def reload requires :name return unless data = begin collection.get(name) rescue Excon::Errors::SocketError nil end new_attributes = data.attributes merge_attributes(new_attributes) self end
save()
click to toggle source
# File lib/fog/google/models/compute/target_http_proxy.rb, line 16 def save requires :name options = { 'description' => description, 'urlMap' => urlMap } data = service.insert_target_http_proxy(name, options).body operation = Fog::Compute::Google::Operations.new(:service => service).get(data['name'], data['zone']) operation.wait_for { !pending? } reload end
set_url_map(urlMap)
click to toggle source
# File lib/fog/google/models/compute/target_http_proxy.rb, line 43 def set_url_map urlMap operation = service.set_target_http_proxy_url_map(self, urlMap) reload end