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 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? uri, body, query_string_params = transcode_add_access_config_request request_pb response = @client_stub.make_post_request( 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 102 def add_resource_policies request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, body, query_string_params = transcode_add_resource_policies_request request_pb response = @client_stub.make_post_request( 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 148 def aggregated_list request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, _body, query_string_params = transcode_aggregated_list_request request_pb response = @client_stub.make_get_request( uri: uri, 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 198 def attach_disk request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, body, query_string_params = transcode_attach_disk_request request_pb response = @client_stub.make_post_request( 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 245 def bulk_insert request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, body, query_string_params = transcode_bulk_insert_request request_pb response = @client_stub.make_post_request( 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 291 def delete request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, _body, query_string_params = transcode_delete_request request_pb response = @client_stub.make_delete_request( uri: uri, 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 336 def delete_access_config request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, _body, query_string_params = transcode_delete_access_config_request request_pb response = @client_stub.make_post_request( uri: uri, 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 383 def detach_disk request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, _body, query_string_params = transcode_detach_disk_request request_pb response = @client_stub.make_post_request( uri: uri, 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 429 def get request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, _body, _query_string_params = transcode_get_request request_pb response = @client_stub.make_get_request( uri: uri, 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 472 def get_effective_firewalls request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, _body, query_string_params = transcode_get_effective_firewalls_request request_pb response = @client_stub.make_get_request( uri: uri, 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 517 def get_guest_attributes request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, _body, query_string_params = transcode_get_guest_attributes_request request_pb response = @client_stub.make_get_request( uri: uri, 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 563 def get_iam_policy request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, _body, query_string_params = transcode_get_iam_policy_request request_pb response = @client_stub.make_get_request( uri: uri, 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 608 def get_screenshot request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, _body, _query_string_params = transcode_get_screenshot_request request_pb response = @client_stub.make_get_request( uri: uri, 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 651 def get_serial_port_output request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, _body, query_string_params = transcode_get_serial_port_output_request request_pb response = @client_stub.make_get_request( uri: uri, 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 697 def get_shielded_instance_identity request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, _body, _query_string_params = transcode_get_shielded_instance_identity_request request_pb response = @client_stub.make_get_request( uri: uri, 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 740 def insert request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, body, query_string_params = transcode_insert_request request_pb response = @client_stub.make_post_request( 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 787 def list request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, _body, query_string_params = transcode_list_request request_pb response = @client_stub.make_get_request( uri: uri, 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 836 def list_referrers request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, _body, query_string_params = transcode_list_referrers_request request_pb response = @client_stub.make_get_request( uri: uri, 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 885 def remove_resource_policies request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, body, query_string_params = transcode_remove_resource_policies_request request_pb response = @client_stub.make_post_request( 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 931 def reset request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, _body, query_string_params = transcode_reset_request request_pb response = @client_stub.make_post_request( uri: uri, 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_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 976 def set_deletion_protection request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, _body, query_string_params = transcode_set_deletion_protection_request request_pb response = @client_stub.make_post_request( uri: uri, 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 1022 def set_disk_auto_delete request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, _body, query_string_params = transcode_set_disk_auto_delete_request request_pb response = @client_stub.make_post_request( uri: uri, 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 1069 def set_iam_policy request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, body, _query_string_params = transcode_set_iam_policy_request request_pb response = @client_stub.make_post_request( uri: uri, body: body, 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 1113 def set_labels request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, body, query_string_params = transcode_set_labels_request request_pb response = @client_stub.make_post_request( 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 1159 def set_machine_resources request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, body, query_string_params = transcode_set_machine_resources_request request_pb response = @client_stub.make_post_request( 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 1205 def set_machine_type request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, body, query_string_params = transcode_set_machine_type_request request_pb response = @client_stub.make_post_request( 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 1251 def set_metadata request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, body, query_string_params = transcode_set_metadata_request request_pb response = @client_stub.make_post_request( 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 1297 def set_min_cpu_platform request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, body, query_string_params = transcode_set_min_cpu_platform_request request_pb response = @client_stub.make_post_request( 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 1343 def set_scheduling request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, body, query_string_params = transcode_set_scheduling_request request_pb response = @client_stub.make_post_request( 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 1389 def set_service_account request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, body, query_string_params = transcode_set_service_account_request request_pb response = @client_stub.make_post_request( 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 1435 def set_shielded_instance_integrity_policy request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, body, query_string_params = transcode_set_shielded_instance_integrity_policy_request request_pb response = @client_stub.make_patch_request( 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 1527 def simulate_maintenance_event request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, _body, _query_string_params = transcode_simulate_maintenance_event_request request_pb response = @client_stub.make_post_request( uri: uri, 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 1570 def start request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, _body, query_string_params = transcode_start_request request_pb response = @client_stub.make_post_request( uri: uri, 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 1615 def start_with_encryption_key request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, body, query_string_params = transcode_start_with_encryption_key_request request_pb response = @client_stub.make_post_request( 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 1661 def stop request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, _body, query_string_params = transcode_stop_request request_pb response = @client_stub.make_post_request( uri: uri, 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 1706 def test_iam_permissions request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, body, _query_string_params = transcode_test_iam_permissions_request request_pb response = @client_stub.make_post_request( uri: uri, body: body, options: options ) result = ::Google::Cloud::Compute::V1::TestPermissionsResponse.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
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 78 def transcode_add_access_config_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/addAccessConfig" body = request_pb.access_config_resource.to_json query_string_params = {} query_string_params["networkInterface"] = request_pb.network_interface.to_s query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id? [uri, body, query_string_params] end
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 125 def transcode_add_resource_policies_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/addResourcePolicies" body = request_pb.instances_add_resource_policies_request_resource.to_json query_string_params = {} query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id? [uri, body, query_string_params] end
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 170 def transcode_aggregated_list_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/aggregated/instances" body = nil query_string_params = {} query_string_params["filter"] = request_pb.filter.to_s if request_pb.has_filter? query_string_params["includeAllScopes"] = request_pb.include_all_scopes.to_s if request_pb.has_include_all_scopes? query_string_params["maxResults"] = request_pb.max_results.to_s if request_pb.has_max_results? query_string_params["orderBy"] = request_pb.order_by.to_s if request_pb.has_order_by? query_string_params["pageToken"] = request_pb.page_token.to_s if request_pb.has_page_token? query_string_params["returnPartialSuccess"] = request_pb.return_partial_success.to_s if request_pb.has_return_partial_success? [uri, body, query_string_params] end
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 221 def transcode_attach_disk_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/attachDisk" body = request_pb.attached_disk_resource.to_json query_string_params = {} query_string_params["forceAttach"] = request_pb.force_attach.to_s if request_pb.has_force_attach? query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id? [uri, body, query_string_params] end
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 268 def transcode_bulk_insert_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/bulkInsert" body = request_pb.bulk_insert_instance_resource_resource.to_json query_string_params = {} query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id? [uri, body, query_string_params] end
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 358 def transcode_delete_access_config_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/deleteAccessConfig" body = nil query_string_params = {} query_string_params["accessConfig"] = request_pb.access_config.to_s query_string_params["networkInterface"] = request_pb.network_interface.to_s query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id? [uri, body, query_string_params] end
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 313 def transcode_delete_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}" body = nil query_string_params = {} query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id? [uri, body, query_string_params] end
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 405 def transcode_detach_disk_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/detachDisk" body = nil query_string_params = {} query_string_params["deviceName"] = request_pb.device_name.to_s query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id? [uri, body, query_string_params] end
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 494 def transcode_get_effective_firewalls_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/getEffectiveFirewalls" body = nil query_string_params = {} query_string_params["networkInterface"] = request_pb.network_interface.to_s [uri, body, query_string_params] end
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 539 def transcode_get_guest_attributes_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/getGuestAttributes" body = nil query_string_params = {} query_string_params["queryPath"] = request_pb.query_path.to_s if request_pb.has_query_path? query_string_params["variableKey"] = request_pb.variable_key.to_s if request_pb.has_variable_key? [uri, body, query_string_params] end
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 585 def transcode_get_iam_policy_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.resource}/getIamPolicy" body = nil query_string_params = {} query_string_params["optionsRequestedPolicyVersion"] = request_pb.options_requested_policy_version.to_s if request_pb.has_options_requested_policy_version? [uri, body, query_string_params] end
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 450 def transcode_get_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}" body = nil query_string_params = {} [uri, body, query_string_params] end
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 629 def transcode_get_screenshot_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/screenshot" body = nil query_string_params = {} [uri, body, query_string_params] end
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 673 def transcode_get_serial_port_output_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/serialPort" body = nil query_string_params = {} query_string_params["port"] = request_pb.port.to_s if request_pb.has_port? query_string_params["start"] = request_pb.start.to_s if request_pb.has_start? [uri, body, query_string_params] end
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 718 def transcode_get_shielded_instance_identity_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/getShieldedInstanceIdentity" body = nil query_string_params = {} [uri, body, query_string_params] end
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 763 def transcode_insert_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances" body = request_pb.instance_resource.to_json query_string_params = {} query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id? query_string_params["sourceInstanceTemplate"] = request_pb.source_instance_template.to_s if request_pb.has_source_instance_template? [uri, body, query_string_params] end
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 858 def transcode_list_referrers_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/referrers" body = nil query_string_params = {} query_string_params["filter"] = request_pb.filter.to_s if request_pb.has_filter? query_string_params["maxResults"] = request_pb.max_results.to_s if request_pb.has_max_results? query_string_params["orderBy"] = request_pb.order_by.to_s if request_pb.has_order_by? query_string_params["pageToken"] = request_pb.page_token.to_s if request_pb.has_page_token? query_string_params["returnPartialSuccess"] = request_pb.return_partial_success.to_s if request_pb.has_return_partial_success? [uri, body, query_string_params] end
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 809 def transcode_list_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances" body = nil query_string_params = {} query_string_params["filter"] = request_pb.filter.to_s if request_pb.has_filter? query_string_params["maxResults"] = request_pb.max_results.to_s if request_pb.has_max_results? query_string_params["orderBy"] = request_pb.order_by.to_s if request_pb.has_order_by? query_string_params["pageToken"] = request_pb.page_token.to_s if request_pb.has_page_token? query_string_params["returnPartialSuccess"] = request_pb.return_partial_success.to_s if request_pb.has_return_partial_success? [uri, body, query_string_params] end
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 908 def transcode_remove_resource_policies_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/removeResourcePolicies" body = request_pb.instances_remove_resource_policies_request_resource.to_json query_string_params = {} query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id? [uri, body, query_string_params] end
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 953 def transcode_reset_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/reset" body = nil query_string_params = {} query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id? [uri, body, query_string_params] end
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 998 def transcode_set_deletion_protection_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.resource}/setDeletionProtection" body = nil query_string_params = {} query_string_params["deletionProtection"] = request_pb.deletion_protection.to_s if request_pb.has_deletion_protection? query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id? [uri, body, query_string_params] end
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 1044 def transcode_set_disk_auto_delete_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/setDiskAutoDelete" body = nil query_string_params = {} query_string_params["autoDelete"] = request_pb.auto_delete.to_s query_string_params["deviceName"] = request_pb.device_name.to_s query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id? [uri, body, query_string_params] end
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 1091 def transcode_set_iam_policy_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.resource}/setIamPolicy" body = request_pb.zone_set_policy_request_resource.to_json query_string_params = {} [uri, body, query_string_params] end
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 1136 def transcode_set_labels_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/setLabels" body = request_pb.instances_set_labels_request_resource.to_json query_string_params = {} query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id? [uri, body, query_string_params] end
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 1182 def transcode_set_machine_resources_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/setMachineResources" body = request_pb.instances_set_machine_resources_request_resource.to_json query_string_params = {} query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id? [uri, body, query_string_params] end
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 1228 def transcode_set_machine_type_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/setMachineType" body = request_pb.instances_set_machine_type_request_resource.to_json query_string_params = {} query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id? [uri, body, query_string_params] end
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 1274 def transcode_set_metadata_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/setMetadata" body = request_pb.metadata_resource.to_json query_string_params = {} query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id? [uri, body, query_string_params] end
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 1320 def transcode_set_min_cpu_platform_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/setMinCpuPlatform" body = request_pb.instances_set_min_cpu_platform_request_resource.to_json query_string_params = {} query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id? [uri, body, query_string_params] end
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 1366 def transcode_set_scheduling_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/setScheduling" body = request_pb.scheduling_resource.to_json query_string_params = {} query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id? [uri, body, query_string_params] end
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 1412 def transcode_set_service_account_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/setServiceAccount" body = request_pb.instances_set_service_account_request_resource.to_json query_string_params = {} query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id? [uri, body, query_string_params] end
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 1458 def transcode_set_shielded_instance_integrity_policy_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/setShieldedInstanceIntegrityPolicy" body = request_pb.shielded_instance_integrity_policy_resource.to_json query_string_params = {} query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id? [uri, body, query_string_params] end
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 1548 def transcode_simulate_maintenance_event_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/simulateMaintenanceEvent" body = nil query_string_params = {} [uri, body, query_string_params] end
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 1592 def transcode_start_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/start" body = nil query_string_params = {} query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id? [uri, body, query_string_params] end
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 1638 def transcode_start_with_encryption_key_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/startWithEncryptionKey" body = request_pb.instances_start_with_encryption_key_request_resource.to_json query_string_params = {} query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id? [uri, body, query_string_params] end
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 1683 def transcode_stop_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/stop" body = nil query_string_params = {} query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id? [uri, body, query_string_params] end
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 1728 def transcode_test_iam_permissions_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.resource}/testIamPermissions" body = request_pb.test_permissions_request_resource.to_json query_string_params = {} [uri, body, query_string_params] end
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 1821 def transcode_update_access_config_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/updateAccessConfig" body = request_pb.access_config_resource.to_json query_string_params = {} query_string_params["networkInterface"] = request_pb.network_interface.to_s query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id? [uri, body, query_string_params] end
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 1868 def transcode_update_display_device_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/updateDisplayDevice" body = request_pb.display_device_resource.to_json query_string_params = {} query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id? [uri, body, query_string_params] end
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 1914 def transcode_update_network_interface_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/updateNetworkInterface" body = request_pb.network_interface_resource.to_json query_string_params = {} query_string_params["networkInterface"] = request_pb.network_interface.to_s query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id? [uri, body, query_string_params] end
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 1773 def transcode_update_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}" body = request_pb.instance_resource.to_json query_string_params = {} query_string_params["minimalAction"] = request_pb.minimal_action.to_s if request_pb.has_minimal_action? query_string_params["mostDisruptiveAllowedAction"] = request_pb.most_disruptive_allowed_action.to_s if request_pb.has_most_disruptive_allowed_action? query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id? [uri, body, query_string_params] end
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 1961 def transcode_update_shielded_instance_config_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/updateShieldedInstanceConfig" body = request_pb.shielded_instance_config_resource.to_json query_string_params = {} query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id? [uri, body, query_string_params] 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 1750 def update request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, body, query_string_params = transcode_update_request request_pb response = @client_stub.make_put_request( 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 1798 def update_access_config request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, body, query_string_params = transcode_update_access_config_request request_pb response = @client_stub.make_post_request( 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 1845 def update_display_device request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, body, query_string_params = transcode_update_display_device_request request_pb response = @client_stub.make_patch_request( 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 1891 def update_network_interface request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, body, query_string_params = transcode_update_network_interface_request request_pb response = @client_stub.make_patch_request( 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 1938 def update_shielded_instance_config request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, body, query_string_params = transcode_update_shielded_instance_config_request request_pb response = @client_stub.make_patch_request( 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