class Google::Cloud::Compute::V1::Instances::Rest::ServiceStub
REST service stub for the Instances
service. Service stub contains baseline method implementations including transcoding, making the REST call, and deserialing the response.
Public Class Methods
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 33 def initialize endpoint:, credentials: # These require statements are intentionally placed here to initialize # the REST modules only when it's required. require "gapic/rest" @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials, numeric_enums: false end
Public Instance Methods
Baseline implementation for the add_access_config
REST call
@param request_pb [::Google::Cloud::Compute::V1::AddAccessConfigInstanceRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::Operation] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::Operation]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 55 def add_access_config request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_add_access_config_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the add_resource_policies
REST call
@param request_pb [::Google::Cloud::Compute::V1::AddResourcePoliciesInstanceRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::Operation] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::Operation]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 92 def add_resource_policies request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_add_resource_policies_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the aggregated_list
REST call
@param request_pb [::Google::Cloud::Compute::V1::AggregatedListInstancesRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::InstanceAggregatedList] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::InstanceAggregatedList]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 129 def aggregated_list request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_aggregated_list_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::InstanceAggregatedList.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the attach_disk
REST call
@param request_pb [::Google::Cloud::Compute::V1::AttachDiskInstanceRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::Operation] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::Operation]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 166 def attach_disk request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_attach_disk_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the bulk_insert
REST call
@param request_pb [::Google::Cloud::Compute::V1::BulkInsertInstanceRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::Operation] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::Operation]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 203 def bulk_insert request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_bulk_insert_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the delete REST call
@param request_pb [::Google::Cloud::Compute::V1::DeleteInstanceRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::Operation] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::Operation]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 240 def delete request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_delete_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the delete_access_config
REST call
@param request_pb [::Google::Cloud::Compute::V1::DeleteAccessConfigInstanceRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::Operation] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::Operation]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 277 def delete_access_config request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_delete_access_config_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the detach_disk
REST call
@param request_pb [::Google::Cloud::Compute::V1::DetachDiskInstanceRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::Operation] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::Operation]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 314 def detach_disk request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_detach_disk_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the get REST call
@param request_pb [::Google::Cloud::Compute::V1::GetInstanceRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::Instance] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::Instance]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 351 def get request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_get_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Instance.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the get_effective_firewalls
REST call
@param request_pb [::Google::Cloud::Compute::V1::GetEffectiveFirewallsInstanceRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::InstancesGetEffectiveFirewallsResponse] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::InstancesGetEffectiveFirewallsResponse]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 388 def get_effective_firewalls request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_get_effective_firewalls_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::InstancesGetEffectiveFirewallsResponse.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the get_guest_attributes
REST call
@param request_pb [::Google::Cloud::Compute::V1::GetGuestAttributesInstanceRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::GuestAttributes] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::GuestAttributes]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 425 def get_guest_attributes request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_get_guest_attributes_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::GuestAttributes.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the get_iam_policy
REST call
@param request_pb [::Google::Cloud::Compute::V1::GetIamPolicyInstanceRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::Policy] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::Policy]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 462 def get_iam_policy request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_get_iam_policy_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Policy.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the get_screenshot
REST call
@param request_pb [::Google::Cloud::Compute::V1::GetScreenshotInstanceRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::Screenshot] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::Screenshot]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 499 def get_screenshot request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_get_screenshot_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Screenshot.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the get_serial_port_output
REST call
@param request_pb [::Google::Cloud::Compute::V1::GetSerialPortOutputInstanceRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::SerialPortOutput] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::SerialPortOutput]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 536 def get_serial_port_output request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_get_serial_port_output_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::SerialPortOutput.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the get_shielded_instance_identity
REST call
@param request_pb [::Google::Cloud::Compute::V1::GetShieldedInstanceIdentityInstanceRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::ShieldedInstanceIdentity] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::ShieldedInstanceIdentity]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 573 def get_shielded_instance_identity request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_get_shielded_instance_identity_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::ShieldedInstanceIdentity.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the insert REST call
@param request_pb [::Google::Cloud::Compute::V1::InsertInstanceRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::Operation] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::Operation]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 610 def insert request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_insert_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the list REST call
@param request_pb [::Google::Cloud::Compute::V1::ListInstancesRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::InstanceList] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::InstanceList]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 647 def list request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_list_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::InstanceList.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the list_referrers
REST call
@param request_pb [::Google::Cloud::Compute::V1::ListReferrersInstancesRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::InstanceListReferrers] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::InstanceListReferrers]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 684 def list_referrers request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_list_referrers_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::InstanceListReferrers.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the remove_resource_policies
REST call
@param request_pb [::Google::Cloud::Compute::V1::RemoveResourcePoliciesInstanceRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::Operation] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::Operation]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 721 def remove_resource_policies request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_remove_resource_policies_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the reset REST call
@param request_pb [::Google::Cloud::Compute::V1::ResetInstanceRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::Operation] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::Operation]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 758 def reset request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_reset_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the resume REST call
@param request_pb [::Google::Cloud::Compute::V1::ResumeInstanceRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::Operation] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::Operation]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 795 def resume request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_resume_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the send_diagnostic_interrupt
REST call
@param request_pb [::Google::Cloud::Compute::V1::SendDiagnosticInterruptInstanceRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::SendDiagnosticInterruptInstanceResponse] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::SendDiagnosticInterruptInstanceResponse]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 832 def send_diagnostic_interrupt request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_send_diagnostic_interrupt_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::SendDiagnosticInterruptInstanceResponse.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the set_deletion_protection
REST call
@param request_pb [::Google::Cloud::Compute::V1::SetDeletionProtectionInstanceRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::Operation] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::Operation]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 869 def set_deletion_protection request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_set_deletion_protection_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the set_disk_auto_delete
REST call
@param request_pb [::Google::Cloud::Compute::V1::SetDiskAutoDeleteInstanceRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::Operation] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::Operation]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 906 def set_disk_auto_delete request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_set_disk_auto_delete_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the set_iam_policy
REST call
@param request_pb [::Google::Cloud::Compute::V1::SetIamPolicyInstanceRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::Policy] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::Policy]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 943 def set_iam_policy request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_set_iam_policy_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Policy.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the set_labels
REST call
@param request_pb [::Google::Cloud::Compute::V1::SetLabelsInstanceRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::Operation] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::Operation]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 980 def set_labels request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_set_labels_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the set_machine_resources
REST call
@param request_pb [::Google::Cloud::Compute::V1::SetMachineResourcesInstanceRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::Operation] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::Operation]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 1017 def set_machine_resources request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_set_machine_resources_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the set_machine_type
REST call
@param request_pb [::Google::Cloud::Compute::V1::SetMachineTypeInstanceRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::Operation] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::Operation]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 1054 def set_machine_type request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_set_machine_type_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the set_metadata
REST call
@param request_pb [::Google::Cloud::Compute::V1::SetMetadataInstanceRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::Operation] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::Operation]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 1091 def set_metadata request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_set_metadata_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the set_min_cpu_platform
REST call
@param request_pb [::Google::Cloud::Compute::V1::SetMinCpuPlatformInstanceRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::Operation] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::Operation]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 1128 def set_min_cpu_platform request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_set_min_cpu_platform_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the set_scheduling
REST call
@param request_pb [::Google::Cloud::Compute::V1::SetSchedulingInstanceRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::Operation] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::Operation]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 1165 def set_scheduling request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_set_scheduling_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the set_service_account
REST call
@param request_pb [::Google::Cloud::Compute::V1::SetServiceAccountInstanceRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::Operation] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::Operation]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 1202 def set_service_account request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_set_service_account_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the set_shielded_instance_integrity_policy
REST call
@param request_pb [::Google::Cloud::Compute::V1::SetShieldedInstanceIntegrityPolicyInstanceRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::Operation] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::Operation]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 1239 def set_shielded_instance_integrity_policy request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_set_shielded_instance_integrity_policy_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the simulate_maintenance_event
REST call
@param request_pb [::Google::Cloud::Compute::V1::SimulateMaintenanceEventInstanceRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::Operation] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::Operation]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 1313 def simulate_maintenance_event request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_simulate_maintenance_event_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the start REST call
@param request_pb [::Google::Cloud::Compute::V1::StartInstanceRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::Operation] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::Operation]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 1350 def start request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_start_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the start_with_encryption_key
REST call
@param request_pb [::Google::Cloud::Compute::V1::StartWithEncryptionKeyInstanceRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::Operation] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::Operation]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 1387 def start_with_encryption_key request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_start_with_encryption_key_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the stop REST call
@param request_pb [::Google::Cloud::Compute::V1::StopInstanceRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::Operation] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::Operation]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 1424 def stop request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_stop_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the suspend REST call
@param request_pb [::Google::Cloud::Compute::V1::SuspendInstanceRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::Operation] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::Operation]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 1461 def suspend request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_suspend_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the test_iam_permissions
REST call
@param request_pb [::Google::Cloud::Compute::V1::TestIamPermissionsInstanceRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::TestPermissionsResponse] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::TestPermissionsResponse]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 1498 def test_iam_permissions request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_test_iam_permissions_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::TestPermissionsResponse.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the update REST call
@param request_pb [::Google::Cloud::Compute::V1::UpdateInstanceRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::Operation] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::Operation]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 1535 def update request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_update_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the update_access_config
REST call
@param request_pb [::Google::Cloud::Compute::V1::UpdateAccessConfigInstanceRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::Operation] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::Operation]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 1572 def update_access_config request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_update_access_config_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the update_display_device
REST call
@param request_pb [::Google::Cloud::Compute::V1::UpdateDisplayDeviceInstanceRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::Operation] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::Operation]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 1609 def update_display_device request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_update_display_device_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the update_network_interface
REST call
@param request_pb [::Google::Cloud::Compute::V1::UpdateNetworkInterfaceInstanceRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::Operation] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::Operation]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 1646 def update_network_interface request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_update_network_interface_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the update_shielded_instance_config
REST call
@param request_pb [::Google::Cloud::Compute::V1::UpdateShieldedInstanceConfigInstanceRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::Operation] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::Operation]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 1683 def update_shielded_instance_config request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_update_shielded_instance_config_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Private Instance Methods
@private
GRPC transcoding helper method for the add_access_config
REST call
@param request_pb [::Google::Cloud::Compute::V1::AddAccessConfigInstanceRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 1718 def transcode_add_access_config_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/addAccessConfig", body: "access_config_resource", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end
@private
GRPC transcoding helper method for the add_resource_policies
REST call
@param request_pb [::Google::Cloud::Compute::V1::AddResourcePoliciesInstanceRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 1742 def transcode_add_resource_policies_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/addResourcePolicies", body: "instances_add_resource_policies_request_resource", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end
@private
GRPC transcoding helper method for the aggregated_list
REST call
@param request_pb [::Google::Cloud::Compute::V1::AggregatedListInstancesRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 1766 def transcode_aggregated_list_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/compute/v1/projects/{project}/aggregated/instances", matches: [ ["project", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end
@private
GRPC transcoding helper method for the attach_disk
REST call
@param request_pb [::Google::Cloud::Compute::V1::AttachDiskInstanceRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 1787 def transcode_attach_disk_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/attachDisk", body: "attached_disk_resource", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end
@private
GRPC transcoding helper method for the bulk_insert
REST call
@param request_pb [::Google::Cloud::Compute::V1::BulkInsertInstanceRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 1811 def transcode_bulk_insert_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/bulkInsert", body: "bulk_insert_instance_resource_resource", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end
@private
GRPC transcoding helper method for the delete_access_config
REST call
@param request_pb [::Google::Cloud::Compute::V1::DeleteAccessConfigInstanceRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 1857 def transcode_delete_access_config_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/deleteAccessConfig", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end
@private
GRPC transcoding helper method for the delete REST call
@param request_pb [::Google::Cloud::Compute::V1::DeleteInstanceRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 1834 def transcode_delete_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :delete, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end
@private
GRPC transcoding helper method for the detach_disk
REST call
@param request_pb [::Google::Cloud::Compute::V1::DetachDiskInstanceRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 1880 def transcode_detach_disk_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/detachDisk", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end
@private
GRPC transcoding helper method for the get_effective_firewalls
REST call
@param request_pb [::Google::Cloud::Compute::V1::GetEffectiveFirewallsInstanceRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 1926 def transcode_get_effective_firewalls_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/getEffectiveFirewalls", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end
@private
GRPC transcoding helper method for the get_guest_attributes
REST call
@param request_pb [::Google::Cloud::Compute::V1::GetGuestAttributesInstanceRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 1949 def transcode_get_guest_attributes_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/getGuestAttributes", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end
@private
GRPC transcoding helper method for the get_iam_policy
REST call
@param request_pb [::Google::Cloud::Compute::V1::GetIamPolicyInstanceRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 1972 def transcode_get_iam_policy_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{resource}/getIamPolicy", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["resource", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end
@private
GRPC transcoding helper method for the get REST call
@param request_pb [::Google::Cloud::Compute::V1::GetInstanceRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 1903 def transcode_get_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end
@private
GRPC transcoding helper method for the get_screenshot
REST call
@param request_pb [::Google::Cloud::Compute::V1::GetScreenshotInstanceRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 1995 def transcode_get_screenshot_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/screenshot", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end
@private
GRPC transcoding helper method for the get_serial_port_output
REST call
@param request_pb [::Google::Cloud::Compute::V1::GetSerialPortOutputInstanceRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 2018 def transcode_get_serial_port_output_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/serialPort", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end
@private
GRPC transcoding helper method for the get_shielded_instance_identity
REST call
@param request_pb [::Google::Cloud::Compute::V1::GetShieldedInstanceIdentityInstanceRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 2041 def transcode_get_shielded_instance_identity_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/getShieldedInstanceIdentity", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end
@private
GRPC transcoding helper method for the insert REST call
@param request_pb [::Google::Cloud::Compute::V1::InsertInstanceRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 2064 def transcode_insert_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances", body: "instance_resource", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end
@private
GRPC transcoding helper method for the list_referrers
REST call
@param request_pb [::Google::Cloud::Compute::V1::ListReferrersInstancesRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 2109 def transcode_list_referrers_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/referrers", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end
@private
GRPC transcoding helper method for the list REST call
@param request_pb [::Google::Cloud::Compute::V1::ListInstancesRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 2087 def transcode_list_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end
@private
GRPC transcoding helper method for the remove_resource_policies
REST call
@param request_pb [::Google::Cloud::Compute::V1::RemoveResourcePoliciesInstanceRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 2132 def transcode_remove_resource_policies_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/removeResourcePolicies", body: "instances_remove_resource_policies_request_resource", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end
@private
GRPC transcoding helper method for the reset REST call
@param request_pb [::Google::Cloud::Compute::V1::ResetInstanceRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 2156 def transcode_reset_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/reset", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end
@private
GRPC transcoding helper method for the resume REST call
@param request_pb [::Google::Cloud::Compute::V1::ResumeInstanceRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 2179 def transcode_resume_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/resume", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end
@private
GRPC transcoding helper method for the send_diagnostic_interrupt
REST call
@param request_pb [::Google::Cloud::Compute::V1::SendDiagnosticInterruptInstanceRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 2202 def transcode_send_diagnostic_interrupt_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/sendDiagnosticInterrupt", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end
@private
GRPC transcoding helper method for the set_deletion_protection
REST call
@param request_pb [::Google::Cloud::Compute::V1::SetDeletionProtectionInstanceRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 2225 def transcode_set_deletion_protection_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{resource}/setDeletionProtection", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["resource", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end
@private
GRPC transcoding helper method for the set_disk_auto_delete
REST call
@param request_pb [::Google::Cloud::Compute::V1::SetDiskAutoDeleteInstanceRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 2248 def transcode_set_disk_auto_delete_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setDiskAutoDelete", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end
@private
GRPC transcoding helper method for the set_iam_policy
REST call
@param request_pb [::Google::Cloud::Compute::V1::SetIamPolicyInstanceRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 2271 def transcode_set_iam_policy_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{resource}/setIamPolicy", body: "zone_set_policy_request_resource", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["resource", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end
@private
GRPC transcoding helper method for the set_labels
REST call
@param request_pb [::Google::Cloud::Compute::V1::SetLabelsInstanceRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 2295 def transcode_set_labels_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setLabels", body: "instances_set_labels_request_resource", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end
@private
GRPC transcoding helper method for the set_machine_resources
REST call
@param request_pb [::Google::Cloud::Compute::V1::SetMachineResourcesInstanceRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 2319 def transcode_set_machine_resources_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setMachineResources", body: "instances_set_machine_resources_request_resource", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end
@private
GRPC transcoding helper method for the set_machine_type
REST call
@param request_pb [::Google::Cloud::Compute::V1::SetMachineTypeInstanceRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 2343 def transcode_set_machine_type_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setMachineType", body: "instances_set_machine_type_request_resource", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end
@private
GRPC transcoding helper method for the set_metadata
REST call
@param request_pb [::Google::Cloud::Compute::V1::SetMetadataInstanceRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 2367 def transcode_set_metadata_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setMetadata", body: "metadata_resource", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end
@private
GRPC transcoding helper method for the set_min_cpu_platform
REST call
@param request_pb [::Google::Cloud::Compute::V1::SetMinCpuPlatformInstanceRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 2391 def transcode_set_min_cpu_platform_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setMinCpuPlatform", body: "instances_set_min_cpu_platform_request_resource", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end
@private
GRPC transcoding helper method for the set_scheduling
REST call
@param request_pb [::Google::Cloud::Compute::V1::SetSchedulingInstanceRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 2415 def transcode_set_scheduling_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setScheduling", body: "scheduling_resource", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end
@private
GRPC transcoding helper method for the set_service_account
REST call
@param request_pb [::Google::Cloud::Compute::V1::SetServiceAccountInstanceRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 2439 def transcode_set_service_account_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setServiceAccount", body: "instances_set_service_account_request_resource", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end
@private
GRPC transcoding helper method for the set_shielded_instance_integrity_policy
REST call
@param request_pb [::Google::Cloud::Compute::V1::SetShieldedInstanceIntegrityPolicyInstanceRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 2463 def transcode_set_shielded_instance_integrity_policy_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :patch, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setShieldedInstanceIntegrityPolicy", body: "shielded_instance_integrity_policy_resource", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end
@private
GRPC transcoding helper method for the simulate_maintenance_event
REST call
@param request_pb [::Google::Cloud::Compute::V1::SimulateMaintenanceEventInstanceRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 2511 def transcode_simulate_maintenance_event_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/simulateMaintenanceEvent", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end
@private
GRPC transcoding helper method for the start REST call
@param request_pb [::Google::Cloud::Compute::V1::StartInstanceRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 2534 def transcode_start_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/start", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end
@private
GRPC transcoding helper method for the start_with_encryption_key
REST call
@param request_pb [::Google::Cloud::Compute::V1::StartWithEncryptionKeyInstanceRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 2557 def transcode_start_with_encryption_key_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/startWithEncryptionKey", body: "instances_start_with_encryption_key_request_resource", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end
@private
GRPC transcoding helper method for the stop REST call
@param request_pb [::Google::Cloud::Compute::V1::StopInstanceRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 2581 def transcode_stop_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/stop", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end
@private
GRPC transcoding helper method for the suspend REST call
@param request_pb [::Google::Cloud::Compute::V1::SuspendInstanceRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 2604 def transcode_suspend_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/suspend", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end
@private
GRPC transcoding helper method for the test_iam_permissions
REST call
@param request_pb [::Google::Cloud::Compute::V1::TestIamPermissionsInstanceRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 2627 def transcode_test_iam_permissions_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{resource}/testIamPermissions", body: "test_permissions_request_resource", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["resource", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end
@private
GRPC transcoding helper method for the update_access_config
REST call
@param request_pb [::Google::Cloud::Compute::V1::UpdateAccessConfigInstanceRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 2675 def transcode_update_access_config_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/updateAccessConfig", body: "access_config_resource", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end
@private
GRPC transcoding helper method for the update_display_device
REST call
@param request_pb [::Google::Cloud::Compute::V1::UpdateDisplayDeviceInstanceRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 2699 def transcode_update_display_device_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :patch, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/updateDisplayDevice", body: "display_device_resource", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end
@private
GRPC transcoding helper method for the update_network_interface
REST call
@param request_pb [::Google::Cloud::Compute::V1::UpdateNetworkInterfaceInstanceRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 2723 def transcode_update_network_interface_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :patch, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/updateNetworkInterface", body: "network_interface_resource", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end
@private
GRPC transcoding helper method for the update REST call
@param request_pb [::Google::Cloud::Compute::V1::UpdateInstanceRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 2651 def transcode_update_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :put, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}", body: "instance_resource", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end
@private
GRPC transcoding helper method for the update_shielded_instance_config
REST call
@param request_pb [::Google::Cloud::Compute::V1::UpdateShieldedInstanceConfigInstanceRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instances/rest/service_stub.rb, line 2747 def transcode_update_shielded_instance_config_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :patch, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/updateShieldedInstanceConfig", body: "shielded_instance_config_resource", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end