Class: Google::Cloud::Compute::V1::Instances::Rest::ServiceStub
- Inherits:
-
Object
- Object
- Google::Cloud::Compute::V1::Instances::Rest::ServiceStub
- Defined in:
- lib/google/cloud/compute/v1/instances/rest/service_stub.rb
Overview
REST service stub for the Instances service. service stub contains baseline method implementations including transcoding, making the REST call and deserialing the response
Instance Method Summary collapse
-
#add_access_config(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the add_access_config REST call.
-
#add_resource_policies(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the add_resource_policies REST call.
-
#aggregated_list(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::InstanceAggregatedList
Baseline implementation for the aggregated_list REST call.
-
#attach_disk(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the attach_disk REST call.
-
#bulk_insert(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the bulk_insert REST call.
-
#delete(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the delete REST call.
-
#delete_access_config(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the delete_access_config REST call.
-
#detach_disk(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the detach_disk REST call.
-
#get(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Instance
Baseline implementation for the get REST call.
-
#get_effective_firewalls(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::InstancesGetEffectiveFirewallsResponse
Baseline implementation for the get_effective_firewalls REST call.
-
#get_guest_attributes(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::GuestAttributes
Baseline implementation for the get_guest_attributes REST call.
-
#get_iam_policy(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Policy
Baseline implementation for the get_iam_policy REST call.
-
#get_screenshot(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Screenshot
Baseline implementation for the get_screenshot REST call.
-
#get_serial_port_output(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::SerialPortOutput
Baseline implementation for the get_serial_port_output REST call.
-
#get_shielded_instance_identity(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::ShieldedInstanceIdentity
Baseline implementation for the get_shielded_instance_identity REST call.
-
#initialize(endpoint:, credentials:) ⇒ ServiceStub
constructor
A new instance of ServiceStub.
-
#insert(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the insert REST call.
-
#list(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::InstanceList
Baseline implementation for the list REST call.
-
#list_referrers(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::InstanceListReferrers
Baseline implementation for the list_referrers REST call.
-
#remove_resource_policies(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the remove_resource_policies REST call.
-
#reset(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the reset REST call.
-
#resume(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the resume REST call.
-
#send_diagnostic_interrupt(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::SendDiagnosticInterruptInstanceResponse
Baseline implementation for the send_diagnostic_interrupt REST call.
-
#set_deletion_protection(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the set_deletion_protection REST call.
-
#set_disk_auto_delete(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the set_disk_auto_delete REST call.
-
#set_iam_policy(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Policy
Baseline implementation for the set_iam_policy REST call.
-
#set_labels(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the set_labels REST call.
-
#set_machine_resources(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the set_machine_resources REST call.
-
#set_machine_type(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the set_machine_type REST call.
-
#set_metadata(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the set_metadata REST call.
-
#set_min_cpu_platform(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the set_min_cpu_platform REST call.
-
#set_scheduling(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the set_scheduling REST call.
-
#set_service_account(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the set_service_account REST call.
-
#set_shielded_instance_integrity_policy(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the set_shielded_instance_integrity_policy REST call.
-
#set_tags(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the set_tags REST call.
-
#simulate_maintenance_event(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the simulate_maintenance_event REST call.
-
#start(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the start REST call.
-
#start_with_encryption_key(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the start_with_encryption_key REST call.
-
#stop(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the stop REST call.
-
#suspend(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the suspend REST call.
-
#test_iam_permissions(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::TestPermissionsResponse
Baseline implementation for the test_iam_permissions REST call.
-
#transcode_add_access_config_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the add_access_config REST call.
-
#transcode_add_resource_policies_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the add_resource_policies REST call.
-
#transcode_aggregated_list_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the aggregated_list REST call.
-
#transcode_attach_disk_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the attach_disk REST call.
-
#transcode_bulk_insert_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the bulk_insert REST call.
-
#transcode_delete_access_config_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the delete_access_config REST call.
-
#transcode_delete_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the delete REST call.
-
#transcode_detach_disk_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the detach_disk REST call.
-
#transcode_get_effective_firewalls_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the get_effective_firewalls REST call.
-
#transcode_get_guest_attributes_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the get_guest_attributes REST call.
-
#transcode_get_iam_policy_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the get_iam_policy REST call.
-
#transcode_get_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the get REST call.
-
#transcode_get_screenshot_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the get_screenshot REST call.
-
#transcode_get_serial_port_output_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the get_serial_port_output REST call.
-
#transcode_get_shielded_instance_identity_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the get_shielded_instance_identity REST call.
-
#transcode_insert_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the insert REST call.
-
#transcode_list_referrers_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the list_referrers REST call.
-
#transcode_list_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the list REST call.
-
#transcode_remove_resource_policies_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the remove_resource_policies REST call.
-
#transcode_reset_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the reset REST call.
-
#transcode_resume_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the resume REST call.
-
#transcode_send_diagnostic_interrupt_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the send_diagnostic_interrupt REST call.
-
#transcode_set_deletion_protection_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the set_deletion_protection REST call.
-
#transcode_set_disk_auto_delete_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the set_disk_auto_delete REST call.
-
#transcode_set_iam_policy_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the set_iam_policy REST call.
-
#transcode_set_labels_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the set_labels REST call.
-
#transcode_set_machine_resources_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the set_machine_resources REST call.
-
#transcode_set_machine_type_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the set_machine_type REST call.
-
#transcode_set_metadata_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the set_metadata REST call.
-
#transcode_set_min_cpu_platform_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the set_min_cpu_platform REST call.
-
#transcode_set_scheduling_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the set_scheduling REST call.
-
#transcode_set_service_account_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the set_service_account REST call.
-
#transcode_set_shielded_instance_integrity_policy_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the set_shielded_instance_integrity_policy REST call.
-
#transcode_set_tags_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the set_tags REST call.
-
#transcode_simulate_maintenance_event_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the simulate_maintenance_event REST call.
-
#transcode_start_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the start REST call.
-
#transcode_start_with_encryption_key_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the start_with_encryption_key REST call.
-
#transcode_stop_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the stop REST call.
-
#transcode_suspend_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the suspend REST call.
-
#transcode_test_iam_permissions_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the test_iam_permissions REST call.
-
#transcode_update_access_config_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the update_access_config REST call.
-
#transcode_update_display_device_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the update_display_device REST call.
-
#transcode_update_network_interface_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the update_network_interface REST call.
-
#transcode_update_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the update REST call.
-
#transcode_update_shielded_instance_config_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the update_shielded_instance_config REST call.
-
#update(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the update REST call.
-
#update_access_config(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the update_access_config REST call.
-
#update_display_device(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the update_display_device REST call.
-
#update_network_interface(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the update_network_interface REST call.
-
#update_shielded_instance_config(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the update_shielded_instance_config REST call.
Constructor Details
#initialize(endpoint:, credentials:) ⇒ ServiceStub
Returns a new instance of ServiceStub.
33 34 35 36 37 38 39 |
# 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 |
Instance Method Details
#add_access_config(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the add_access_config REST call
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 55 def add_access_config request_pb, = 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: ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end |
#add_resource_policies(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the add_resource_policies REST call
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 102 def add_resource_policies request_pb, = 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: ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end |
#aggregated_list(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::InstanceAggregatedList
Baseline implementation for the aggregated_list REST call
148 149 150 151 152 153 154 155 156 157 158 159 160 161 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 148 def aggregated_list request_pb, = 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: ) result = ::Google::Cloud::Compute::V1::InstanceAggregatedList.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end |
#attach_disk(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the attach_disk REST call
198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 198 def attach_disk request_pb, = 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: ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end |
#bulk_insert(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the bulk_insert REST call
245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 245 def bulk_insert request_pb, = 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: ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end |
#delete(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the delete REST call
291 292 293 294 295 296 297 298 299 300 301 302 303 304 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 291 def delete request_pb, = 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: ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end |
#delete_access_config(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the delete_access_config REST call
336 337 338 339 340 341 342 343 344 345 346 347 348 349 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 336 def delete_access_config request_pb, = 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: ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end |
#detach_disk(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the detach_disk REST call
383 384 385 386 387 388 389 390 391 392 393 394 395 396 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 383 def detach_disk request_pb, = 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: ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end |
#get(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Instance
Baseline implementation for the get REST call
429 430 431 432 433 434 435 436 437 438 439 440 441 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 429 def get request_pb, = 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: ) result = ::Google::Cloud::Compute::V1::Instance.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end |
#get_effective_firewalls(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::InstancesGetEffectiveFirewallsResponse
Baseline implementation for the get_effective_firewalls REST call
472 473 474 475 476 477 478 479 480 481 482 483 484 485 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 472 def get_effective_firewalls request_pb, = 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: ) result = ::Google::Cloud::Compute::V1::InstancesGetEffectiveFirewallsResponse.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end |
#get_guest_attributes(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::GuestAttributes
Baseline implementation for the get_guest_attributes REST call
517 518 519 520 521 522 523 524 525 526 527 528 529 530 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 517 def get_guest_attributes request_pb, = 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: ) result = ::Google::Cloud::Compute::V1::GuestAttributes.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end |
#get_iam_policy(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Policy
Baseline implementation for the get_iam_policy REST call
563 564 565 566 567 568 569 570 571 572 573 574 575 576 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 563 def get_iam_policy request_pb, = 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: ) result = ::Google::Cloud::Compute::V1::Policy.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end |
#get_screenshot(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Screenshot
Baseline implementation for the get_screenshot REST call
608 609 610 611 612 613 614 615 616 617 618 619 620 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 608 def get_screenshot request_pb, = 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: ) result = ::Google::Cloud::Compute::V1::Screenshot.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end |
#get_serial_port_output(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::SerialPortOutput
Baseline implementation for the get_serial_port_output REST call
651 652 653 654 655 656 657 658 659 660 661 662 663 664 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 651 def get_serial_port_output request_pb, = 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: ) result = ::Google::Cloud::Compute::V1::SerialPortOutput.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end |
#get_shielded_instance_identity(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::ShieldedInstanceIdentity
Baseline implementation for the get_shielded_instance_identity REST call
697 698 699 700 701 702 703 704 705 706 707 708 709 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 697 def get_shielded_instance_identity request_pb, = 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: ) result = ::Google::Cloud::Compute::V1::ShieldedInstanceIdentity.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end |
#insert(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the insert REST call
740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 740 def insert request_pb, = 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: ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end |
#list(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::InstanceList
Baseline implementation for the list REST call
788 789 790 791 792 793 794 795 796 797 798 799 800 801 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 788 def list request_pb, = 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: ) result = ::Google::Cloud::Compute::V1::InstanceList.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end |
#list_referrers(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::InstanceListReferrers
Baseline implementation for the list_referrers REST call
837 838 839 840 841 842 843 844 845 846 847 848 849 850 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 837 def list_referrers request_pb, = 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: ) result = ::Google::Cloud::Compute::V1::InstanceListReferrers.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end |
#remove_resource_policies(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the remove_resource_policies REST call
886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 886 def remove_resource_policies request_pb, = 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: ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end |
#reset(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the reset REST call
932 933 934 935 936 937 938 939 940 941 942 943 944 945 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 932 def reset request_pb, = 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: ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end |
#resume(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the resume REST call
977 978 979 980 981 982 983 984 985 986 987 988 989 990 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 977 def resume request_pb, = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, _body, query_string_params = transcode_resume_request request_pb response = @client_stub.make_post_request( uri: uri, params: query_string_params, options: ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end |
#send_diagnostic_interrupt(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::SendDiagnosticInterruptInstanceResponse
Baseline implementation for the send_diagnostic_interrupt REST call
1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 1022 def send_diagnostic_interrupt request_pb, = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, _body, _query_string_params = transcode_send_diagnostic_interrupt_request request_pb response = @client_stub.make_post_request( uri: uri, options: ) result = ::Google::Cloud::Compute::V1::SendDiagnosticInterruptInstanceResponse.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end |
#set_deletion_protection(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the set_deletion_protection REST call
1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 1065 def set_deletion_protection request_pb, = 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: ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end |
#set_disk_auto_delete(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the set_disk_auto_delete REST call
1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 1111 def set_disk_auto_delete request_pb, = 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: ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end |
#set_iam_policy(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Policy
Baseline implementation for the set_iam_policy REST call
1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 1158 def set_iam_policy request_pb, = 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: ) result = ::Google::Cloud::Compute::V1::Policy.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end |
#set_labels(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the set_labels REST call
1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 1202 def set_labels request_pb, = 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: ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end |
#set_machine_resources(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the set_machine_resources REST call
1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 1248 def set_machine_resources request_pb, = 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: ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end |
#set_machine_type(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the set_machine_type REST call
1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 1294 def set_machine_type request_pb, = 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: ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end |
#set_metadata(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the set_metadata REST call
1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 1340 def request_pb, = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, body, query_string_params = request_pb response = @client_stub.make_post_request( uri: uri, body: body, params: query_string_params, options: ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end |
#set_min_cpu_platform(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the set_min_cpu_platform REST call
1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 1386 def set_min_cpu_platform request_pb, = 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: ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end |
#set_scheduling(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the set_scheduling REST call
1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 1432 def set_scheduling request_pb, = 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: ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end |
#set_service_account(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the set_service_account REST call
1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 1478 def set_service_account request_pb, = 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: ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end |
#set_shielded_instance_integrity_policy(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the set_shielded_instance_integrity_policy REST call
1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 1524 def set_shielded_instance_integrity_policy request_pb, = 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: ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end |
#set_tags(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the set_tags REST call
1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 1570 def request_pb, = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, body, query_string_params = request_pb response = @client_stub.make_post_request( uri: uri, body: body, params: query_string_params, options: ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end |
#simulate_maintenance_event(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the simulate_maintenance_event REST call
1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 1616 def simulate_maintenance_event request_pb, = 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: ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end |
#start(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the start REST call
1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 1659 def start request_pb, = 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: ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end |
#start_with_encryption_key(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the start_with_encryption_key REST call
1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 1704 def start_with_encryption_key request_pb, = 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: ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end |
#stop(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the stop REST call
1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 1750 def stop request_pb, = 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: ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end |
#suspend(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the suspend REST call
1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 1795 def suspend request_pb, = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, _body, query_string_params = transcode_suspend_request request_pb response = @client_stub.make_post_request( uri: uri, params: query_string_params, options: ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end |
#test_iam_permissions(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::TestPermissionsResponse
Baseline implementation for the test_iam_permissions REST call
1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 1840 def request_pb, = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, body, _query_string_params = request_pb response = @client_stub.make_post_request( uri: uri, body: body, options: ) result = ::Google::Cloud::Compute::V1::TestPermissionsResponse.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end |
#transcode_add_access_config_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the add_access_config REST call
78 79 80 81 82 83 84 85 86 |
# 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 |
#transcode_add_resource_policies_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the add_resource_policies REST call
125 126 127 128 129 130 131 132 |
# 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 |
#transcode_aggregated_list_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the aggregated_list REST call
170 171 172 173 174 175 176 177 178 179 180 181 182 |
# 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 |
#transcode_attach_disk_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the attach_disk REST call
221 222 223 224 225 226 227 228 229 |
# 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 |
#transcode_bulk_insert_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the bulk_insert REST call
268 269 270 271 272 273 274 275 |
# 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 |
#transcode_delete_access_config_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the delete_access_config REST call
358 359 360 361 362 363 364 365 366 367 |
# 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 |
#transcode_delete_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the delete REST call
313 314 315 316 317 318 319 320 |
# 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 |
#transcode_detach_disk_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the detach_disk REST call
405 406 407 408 409 410 411 412 413 |
# 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 |
#transcode_get_effective_firewalls_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the get_effective_firewalls REST call
494 495 496 497 498 499 500 501 |
# 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 |
#transcode_get_guest_attributes_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the get_guest_attributes REST call
539 540 541 542 543 544 545 546 547 |
# 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 |
#transcode_get_iam_policy_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the get_iam_policy REST call
585 586 587 588 589 590 591 592 |
# 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..to_s if request_pb. [uri, body, query_string_params] end |
#transcode_get_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the get REST call
450 451 452 453 454 455 456 |
# 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 |
#transcode_get_screenshot_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the get_screenshot REST call
629 630 631 632 633 634 635 |
# 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 |
#transcode_get_serial_port_output_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the get_serial_port_output REST call
673 674 675 676 677 678 679 680 681 |
# 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 |
#transcode_get_shielded_instance_identity_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the get_shielded_instance_identity REST call
718 719 720 721 722 723 724 |
# 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 |
#transcode_insert_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the insert REST call
763 764 765 766 767 768 769 770 771 772 |
# 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? query_string_params["sourceMachineImage"] = request_pb.source_machine_image.to_s if request_pb.has_source_machine_image? [uri, body, query_string_params] end |
#transcode_list_referrers_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the list_referrers REST call
859 860 861 862 863 864 865 866 867 868 869 870 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 859 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 |
#transcode_list_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the list REST call
810 811 812 813 814 815 816 817 818 819 820 821 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 810 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 |
#transcode_remove_resource_policies_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the remove_resource_policies REST call
909 910 911 912 913 914 915 916 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 909 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 |
#transcode_reset_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the reset REST call
954 955 956 957 958 959 960 961 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 954 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 |
#transcode_resume_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the resume REST call
999 1000 1001 1002 1003 1004 1005 1006 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 999 def transcode_resume_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/resume" 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 |
#transcode_send_diagnostic_interrupt_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the send_diagnostic_interrupt REST call
1043 1044 1045 1046 1047 1048 1049 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 1043 def transcode_send_diagnostic_interrupt_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/sendDiagnosticInterrupt" body = nil query_string_params = {} [uri, body, query_string_params] end |
#transcode_set_deletion_protection_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the set_deletion_protection REST call
1087 1088 1089 1090 1091 1092 1093 1094 1095 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 1087 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 |
#transcode_set_disk_auto_delete_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the set_disk_auto_delete REST call
1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 1133 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 |
#transcode_set_iam_policy_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the set_iam_policy REST call
1180 1181 1182 1183 1184 1185 1186 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 1180 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 |
#transcode_set_labels_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the set_labels REST call
1225 1226 1227 1228 1229 1230 1231 1232 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 1225 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 |
#transcode_set_machine_resources_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the set_machine_resources REST call
1271 1272 1273 1274 1275 1276 1277 1278 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 1271 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 |
#transcode_set_machine_type_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the set_machine_type REST call
1317 1318 1319 1320 1321 1322 1323 1324 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 1317 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 |
#transcode_set_metadata_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the set_metadata REST call
1363 1364 1365 1366 1367 1368 1369 1370 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 1363 def request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/setMetadata" body = request_pb..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 |
#transcode_set_min_cpu_platform_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the set_min_cpu_platform REST call
1409 1410 1411 1412 1413 1414 1415 1416 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 1409 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 |
#transcode_set_scheduling_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the set_scheduling REST call
1455 1456 1457 1458 1459 1460 1461 1462 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 1455 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 |
#transcode_set_service_account_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the set_service_account REST call
1501 1502 1503 1504 1505 1506 1507 1508 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 1501 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 |
#transcode_set_shielded_instance_integrity_policy_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the set_shielded_instance_integrity_policy REST call
1547 1548 1549 1550 1551 1552 1553 1554 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 1547 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 |
#transcode_set_tags_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the set_tags REST call
1593 1594 1595 1596 1597 1598 1599 1600 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 1593 def request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/setTags" body = request_pb..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 |
#transcode_simulate_maintenance_event_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the simulate_maintenance_event REST call
1637 1638 1639 1640 1641 1642 1643 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 1637 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 |
#transcode_start_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the start REST call
1681 1682 1683 1684 1685 1686 1687 1688 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 1681 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 |
#transcode_start_with_encryption_key_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the start_with_encryption_key REST call
1727 1728 1729 1730 1731 1732 1733 1734 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 1727 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 |
#transcode_stop_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the stop REST call
1772 1773 1774 1775 1776 1777 1778 1779 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 1772 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 |
#transcode_suspend_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the suspend REST call
1817 1818 1819 1820 1821 1822 1823 1824 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 1817 def transcode_suspend_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/suspend" 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 |
#transcode_test_iam_permissions_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the test_iam_permissions REST call
1862 1863 1864 1865 1866 1867 1868 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 1862 def request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.resource}/testIamPermissions" body = request_pb..to_json query_string_params = {} [uri, body, query_string_params] end |
#transcode_update_access_config_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the update_access_config REST call
1955 1956 1957 1958 1959 1960 1961 1962 1963 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 1955 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 |
#transcode_update_display_device_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the update_display_device REST call
2002 2003 2004 2005 2006 2007 2008 2009 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 2002 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 |
#transcode_update_network_interface_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the update_network_interface REST call
2048 2049 2050 2051 2052 2053 2054 2055 2056 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 2048 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 |
#transcode_update_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the update REST call
1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 1907 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 |
#transcode_update_shielded_instance_config_request(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})
GRPC transcoding helper method for the update_shielded_instance_config REST call
2095 2096 2097 2098 2099 2100 2101 2102 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 2095 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 |
#update(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the update REST call
1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 1884 def update request_pb, = 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: ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end |
#update_access_config(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the update_access_config REST call
1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 1932 def update_access_config request_pb, = 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: ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end |
#update_display_device(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the update_display_device REST call
1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 1979 def update_display_device request_pb, = 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: ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end |
#update_network_interface(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the update_network_interface REST call
2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 2025 def update_network_interface request_pb, = 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: ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end |
#update_shielded_instance_config(request_pb, options = nil) {|result, response| ... } ⇒ ::Google::Cloud::Compute::V1::Operation
Baseline implementation for the update_shielded_instance_config REST call
2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 |
# File 'lib/google/cloud/compute/v1/instances/rest/service_stub.rb', line 2072 def update_shielded_instance_config request_pb, = 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: ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end |