Google Cloud Compute V1 API - Class Google::Cloud::Compute::V1::Instances::Rest::ServiceStub (v2.12.0)

Reference documentation and code samples for the Google Cloud Compute V1 API 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.

Inherits

  • Object

Methods

#add_access_config

def add_access_config(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Compute::V1::Operation

Baseline implementation for the add_access_config REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#add_resource_policies

def add_resource_policies(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Compute::V1::Operation

Baseline implementation for the add_resource_policies REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#aggregated_list

def aggregated_list(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Compute::V1::InstanceAggregatedList

Baseline implementation for the aggregated_list REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#attach_disk

def attach_disk(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Compute::V1::Operation

Baseline implementation for the attach_disk REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#bulk_insert

def bulk_insert(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Compute::V1::Operation

Baseline implementation for the bulk_insert REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#delete

def delete(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Compute::V1::Operation

Baseline implementation for the delete REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#delete_access_config

def delete_access_config(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Compute::V1::Operation

Baseline implementation for the delete_access_config REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#detach_disk

def detach_disk(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Compute::V1::Operation

Baseline implementation for the detach_disk REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#endpoint

def endpoint() -> String

The effective endpoint

Returns
  • (String)

#get

def get(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Compute::V1::Instance

Baseline implementation for the get REST call

Parameters
  • request_pb (::Google::Cloud::Compute::V1::GetInstanceRequest) — A request object representing the call parameters. Required.
  • options (::Gapic::CallOptions) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#get_effective_firewalls

def get_effective_firewalls(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Compute::V1::InstancesGetEffectiveFirewallsResponse

Baseline implementation for the get_effective_firewalls REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#get_guest_attributes

def get_guest_attributes(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Compute::V1::GuestAttributes

Baseline implementation for the get_guest_attributes REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#get_iam_policy

def get_iam_policy(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Compute::V1::Policy

Baseline implementation for the get_iam_policy REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#get_screenshot

def get_screenshot(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Compute::V1::Screenshot

Baseline implementation for the get_screenshot REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#get_serial_port_output

def get_serial_port_output(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Compute::V1::SerialPortOutput

Baseline implementation for the get_serial_port_output REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#get_shielded_instance_identity

def get_shielded_instance_identity(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Compute::V1::ShieldedInstanceIdentity

Baseline implementation for the get_shielded_instance_identity REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#initialize

def initialize(endpoint:, endpoint_template:, universe_domain:, credentials:) -> ServiceStub
Returns

#insert

def insert(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Compute::V1::Operation

Baseline implementation for the insert REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#list

def list(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Compute::V1::InstanceList

Baseline implementation for the list REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#list_referrers

def list_referrers(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Compute::V1::InstanceListReferrers

Baseline implementation for the list_referrers REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#perform_maintenance

def perform_maintenance(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Compute::V1::Operation

Baseline implementation for the perform_maintenance REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#remove_resource_policies

def remove_resource_policies(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Compute::V1::Operation

Baseline implementation for the remove_resource_policies REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#reset

def reset(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Compute::V1::Operation

Baseline implementation for the reset REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#resume

def resume(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Compute::V1::Operation

Baseline implementation for the resume REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#send_diagnostic_interrupt

def send_diagnostic_interrupt(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Compute::V1::SendDiagnosticInterruptInstanceResponse

Baseline implementation for the send_diagnostic_interrupt REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#set_deletion_protection

def set_deletion_protection(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Compute::V1::Operation

Baseline implementation for the set_deletion_protection REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#set_disk_auto_delete

def set_disk_auto_delete(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Compute::V1::Operation

Baseline implementation for the set_disk_auto_delete REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#set_iam_policy

def set_iam_policy(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Compute::V1::Policy

Baseline implementation for the set_iam_policy REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#set_labels

def set_labels(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Compute::V1::Operation

Baseline implementation for the set_labels REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#set_machine_resources

def set_machine_resources(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Compute::V1::Operation

Baseline implementation for the set_machine_resources REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#set_machine_type

def set_machine_type(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Compute::V1::Operation

Baseline implementation for the set_machine_type REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#set_metadata

def set_metadata(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Compute::V1::Operation

Baseline implementation for the set_metadata REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#set_min_cpu_platform

def set_min_cpu_platform(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Compute::V1::Operation

Baseline implementation for the set_min_cpu_platform REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#set_name

def set_name(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Compute::V1::Operation

Baseline implementation for the set_name REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#set_scheduling

def set_scheduling(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Compute::V1::Operation

Baseline implementation for the set_scheduling REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#set_security_policy

def set_security_policy(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Compute::V1::Operation

Baseline implementation for the set_security_policy REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#set_service_account

def set_service_account(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Compute::V1::Operation

Baseline implementation for the set_service_account REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#set_shielded_instance_integrity_policy

def set_shielded_instance_integrity_policy(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Compute::V1::Operation

Baseline implementation for the set_shielded_instance_integrity_policy REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#set_tags

def set_tags(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Compute::V1::Operation

Baseline implementation for the set_tags REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#simulate_maintenance_event

def simulate_maintenance_event(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Compute::V1::Operation

Baseline implementation for the simulate_maintenance_event REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#start

def start(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Compute::V1::Operation

Baseline implementation for the start REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#start_with_encryption_key

def start_with_encryption_key(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Compute::V1::Operation

Baseline implementation for the start_with_encryption_key REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#stop

def stop(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Compute::V1::Operation

Baseline implementation for the stop REST call

Parameters
  • request_pb (::Google::Cloud::Compute::V1::StopInstanceRequest) — A request object representing the call parameters. Required.
  • options (::Gapic::CallOptions) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#suspend

def suspend(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Compute::V1::Operation

Baseline implementation for the suspend REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#test_iam_permissions

def test_iam_permissions(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Compute::V1::TestPermissionsResponse

Baseline implementation for the test_iam_permissions REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#universe_domain

def universe_domain() -> String

The effective universe domain

Returns
  • (String)

#update

def update(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Compute::V1::Operation

Baseline implementation for the update REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#update_access_config

def update_access_config(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Compute::V1::Operation

Baseline implementation for the update_access_config REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#update_display_device

def update_display_device(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Compute::V1::Operation

Baseline implementation for the update_display_device REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#update_network_interface

def update_network_interface(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Compute::V1::Operation

Baseline implementation for the update_network_interface REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#update_shielded_instance_config

def update_shielded_instance_config(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Compute::V1::Operation

Baseline implementation for the update_shielded_instance_config REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)