class Google::Cloud::Compute::V1::InstanceGroupManagers::Rest::ServiceStub
REST service stub for the InstanceGroupManagers
service. service stub contains baseline method implementations including transcoding, making the REST call and deserialing the response
Public Class Methods
# File lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb, line 33 def initialize endpoint:, credentials: # These require statements are intentionally placed here to initialize # the REST modules only when it's required. require "gapic/rest" @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials end
Public Instance Methods
Baseline implementation for the abandon_instances
REST call
@param request_pb [::Google::Cloud::Compute::V1::AbandonInstancesInstanceGroupManagerRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::Operation] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::Operation]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb, line 55 def abandon_instances request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, body, query_string_params = transcode_abandon_instances_request request_pb response = @client_stub.make_post_request( uri: uri, body: body, params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the aggregated_list
REST call
@param request_pb [::Google::Cloud::Compute::V1::AggregatedListInstanceGroupManagersRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::InstanceGroupManagerAggregatedList] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::InstanceGroupManagerAggregatedList]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb, line 101 def aggregated_list request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, _body, query_string_params = transcode_aggregated_list_request request_pb response = @client_stub.make_get_request( uri: uri, params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::InstanceGroupManagerAggregatedList.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the apply_updates_to_instances
REST call
@param request_pb [::Google::Cloud::Compute::V1::ApplyUpdatesToInstancesInstanceGroupManagerRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::Operation] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::Operation]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb, line 151 def apply_updates_to_instances request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, body, _query_string_params = transcode_apply_updates_to_instances_request request_pb response = @client_stub.make_post_request( uri: uri, body: body, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the create_instances
REST call
@param request_pb [::Google::Cloud::Compute::V1::CreateInstancesInstanceGroupManagerRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::Operation] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::Operation]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb, line 195 def create_instances request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, body, query_string_params = transcode_create_instances_request request_pb response = @client_stub.make_post_request( uri: uri, body: body, params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the delete REST call
@param request_pb [::Google::Cloud::Compute::V1::DeleteInstanceGroupManagerRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::Operation] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::Operation]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb, line 241 def delete request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, _body, query_string_params = transcode_delete_request request_pb response = @client_stub.make_delete_request( uri: uri, params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the delete_instances
REST call
@param request_pb [::Google::Cloud::Compute::V1::DeleteInstancesInstanceGroupManagerRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::Operation] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::Operation]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb, line 286 def delete_instances request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, body, query_string_params = transcode_delete_instances_request request_pb response = @client_stub.make_post_request( uri: uri, body: body, params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the delete_per_instance_configs
REST call
@param request_pb [::Google::Cloud::Compute::V1::DeletePerInstanceConfigsInstanceGroupManagerRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::Operation] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::Operation]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb, line 332 def delete_per_instance_configs request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, body, _query_string_params = transcode_delete_per_instance_configs_request request_pb response = @client_stub.make_post_request( uri: uri, body: body, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the get REST call
@param request_pb [::Google::Cloud::Compute::V1::GetInstanceGroupManagerRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::InstanceGroupManager] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::InstanceGroupManager]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb, line 376 def get request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, _body, _query_string_params = transcode_get_request request_pb response = @client_stub.make_get_request( uri: uri, options: options ) result = ::Google::Cloud::Compute::V1::InstanceGroupManager.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the insert REST call
@param request_pb [::Google::Cloud::Compute::V1::InsertInstanceGroupManagerRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::Operation] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::Operation]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb, line 419 def insert request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, body, query_string_params = transcode_insert_request request_pb response = @client_stub.make_post_request( uri: uri, body: body, params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the list REST call
@param request_pb [::Google::Cloud::Compute::V1::ListInstanceGroupManagersRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::InstanceGroupManagerList] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::InstanceGroupManagerList]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb, line 465 def list request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, _body, query_string_params = transcode_list_request request_pb response = @client_stub.make_get_request( uri: uri, params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::InstanceGroupManagerList.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the list_errors
REST call
@param request_pb [::Google::Cloud::Compute::V1::ListErrorsInstanceGroupManagersRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::InstanceGroupManagersListErrorsResponse] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::InstanceGroupManagersListErrorsResponse]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb, line 514 def list_errors request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, _body, query_string_params = transcode_list_errors_request request_pb response = @client_stub.make_get_request( uri: uri, params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::InstanceGroupManagersListErrorsResponse.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the list_managed_instances
REST call
@param request_pb [::Google::Cloud::Compute::V1::ListManagedInstancesInstanceGroupManagersRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::InstanceGroupManagersListManagedInstancesResponse] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::InstanceGroupManagersListManagedInstancesResponse]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb, line 563 def list_managed_instances request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, _body, query_string_params = transcode_list_managed_instances_request request_pb response = @client_stub.make_post_request( uri: uri, params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::InstanceGroupManagersListManagedInstancesResponse.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the list_per_instance_configs
REST call
@param request_pb [::Google::Cloud::Compute::V1::ListPerInstanceConfigsInstanceGroupManagersRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::InstanceGroupManagersListPerInstanceConfigsResp] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::InstanceGroupManagersListPerInstanceConfigsResp]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb, line 612 def list_per_instance_configs request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, _body, query_string_params = transcode_list_per_instance_configs_request request_pb response = @client_stub.make_post_request( uri: uri, params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::InstanceGroupManagersListPerInstanceConfigsResp.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the patch REST call
@param request_pb [::Google::Cloud::Compute::V1::PatchInstanceGroupManagerRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::Operation] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::Operation]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb, line 661 def patch request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, body, query_string_params = transcode_patch_request request_pb response = @client_stub.make_patch_request( uri: uri, body: body, params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the patch_per_instance_configs
REST call
@param request_pb [::Google::Cloud::Compute::V1::PatchPerInstanceConfigsInstanceGroupManagerRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::Operation] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::Operation]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb, line 707 def patch_per_instance_configs request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, body, query_string_params = transcode_patch_per_instance_configs_request request_pb response = @client_stub.make_post_request( uri: uri, body: body, params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the recreate_instances
REST call
@param request_pb [::Google::Cloud::Compute::V1::RecreateInstancesInstanceGroupManagerRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::Operation] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::Operation]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb, line 753 def recreate_instances request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, body, query_string_params = transcode_recreate_instances_request request_pb response = @client_stub.make_post_request( uri: uri, body: body, params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the resize REST call
@param request_pb [::Google::Cloud::Compute::V1::ResizeInstanceGroupManagerRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::Operation] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::Operation]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb, line 799 def resize request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, _body, query_string_params = transcode_resize_request request_pb response = @client_stub.make_post_request( uri: uri, params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the set_instance_template
REST call
@param request_pb [::Google::Cloud::Compute::V1::SetInstanceTemplateInstanceGroupManagerRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::Operation] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::Operation]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb, line 845 def set_instance_template request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, body, query_string_params = transcode_set_instance_template_request request_pb response = @client_stub.make_post_request( uri: uri, body: body, params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
Baseline implementation for the set_target_pools
REST call
@param request_pb [::Google::Cloud::Compute::V1::SetTargetPoolsInstanceGroupManagerRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::Operation] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::Operation]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb, line 891 def set_target_pools request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, body, query_string_params = transcode_set_target_pools_request request_pb response = @client_stub.make_post_request( uri: uri, body: body, params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end
GRPC transcoding helper method for the abandon_instances
REST call
@param request_pb [::Google::Cloud::Compute::V1::AbandonInstancesInstanceGroupManagerRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb, line 78 def transcode_abandon_instances_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instanceGroupManagers/#{request_pb.instance_group_manager}/abandonInstances" body = request_pb.instance_group_managers_abandon_instances_request_resource.to_json query_string_params = {} query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id? [uri, body, query_string_params] end
GRPC transcoding helper method for the aggregated_list
REST call
@param request_pb [::Google::Cloud::Compute::V1::AggregatedListInstanceGroupManagersRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb, line 123 def transcode_aggregated_list_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/aggregated/instanceGroupManagers" body = nil query_string_params = {} query_string_params["filter"] = request_pb.filter.to_s if request_pb.has_filter? query_string_params["includeAllScopes"] = request_pb.include_all_scopes.to_s if request_pb.has_include_all_scopes? query_string_params["maxResults"] = request_pb.max_results.to_s if request_pb.has_max_results? query_string_params["orderBy"] = request_pb.order_by.to_s if request_pb.has_order_by? query_string_params["pageToken"] = request_pb.page_token.to_s if request_pb.has_page_token? query_string_params["returnPartialSuccess"] = request_pb.return_partial_success.to_s if request_pb.has_return_partial_success? [uri, body, query_string_params] end
GRPC transcoding helper method for the apply_updates_to_instances
REST call
@param request_pb [::Google::Cloud::Compute::V1::ApplyUpdatesToInstancesInstanceGroupManagerRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb, line 173 def transcode_apply_updates_to_instances_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instanceGroupManagers/#{request_pb.instance_group_manager}/applyUpdatesToInstances" body = request_pb.instance_group_managers_apply_updates_request_resource.to_json query_string_params = {} [uri, body, query_string_params] end
GRPC transcoding helper method for the create_instances
REST call
@param request_pb [::Google::Cloud::Compute::V1::CreateInstancesInstanceGroupManagerRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb, line 218 def transcode_create_instances_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instanceGroupManagers/#{request_pb.instance_group_manager}/createInstances" body = request_pb.instance_group_managers_create_instances_request_resource.to_json query_string_params = {} query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id? [uri, body, query_string_params] end
GRPC transcoding helper method for the delete_instances
REST call
@param request_pb [::Google::Cloud::Compute::V1::DeleteInstancesInstanceGroupManagerRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb, line 309 def transcode_delete_instances_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instanceGroupManagers/#{request_pb.instance_group_manager}/deleteInstances" body = request_pb.instance_group_managers_delete_instances_request_resource.to_json query_string_params = {} query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id? [uri, body, query_string_params] end
GRPC transcoding helper method for the delete_per_instance_configs
REST call
@param request_pb [::Google::Cloud::Compute::V1::DeletePerInstanceConfigsInstanceGroupManagerRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb, line 354 def transcode_delete_per_instance_configs_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instanceGroupManagers/#{request_pb.instance_group_manager}/deletePerInstanceConfigs" body = request_pb.instance_group_managers_delete_per_instance_configs_req_resource.to_json query_string_params = {} [uri, body, query_string_params] end
GRPC transcoding helper method for the delete REST call
@param request_pb [::Google::Cloud::Compute::V1::DeleteInstanceGroupManagerRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb, line 263 def transcode_delete_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instanceGroupManagers/#{request_pb.instance_group_manager}" body = nil query_string_params = {} query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id? [uri, body, query_string_params] end
GRPC transcoding helper method for the get REST call
@param request_pb [::Google::Cloud::Compute::V1::GetInstanceGroupManagerRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb, line 397 def transcode_get_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instanceGroupManagers/#{request_pb.instance_group_manager}" body = nil query_string_params = {} [uri, body, query_string_params] end
GRPC transcoding helper method for the insert REST call
@param request_pb [::Google::Cloud::Compute::V1::InsertInstanceGroupManagerRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb, line 442 def transcode_insert_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instanceGroupManagers" body = request_pb.instance_group_manager_resource.to_json query_string_params = {} query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id? [uri, body, query_string_params] end
GRPC transcoding helper method for the list_errors
REST call
@param request_pb [::Google::Cloud::Compute::V1::ListErrorsInstanceGroupManagersRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb, line 536 def transcode_list_errors_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instanceGroupManagers/#{request_pb.instance_group_manager}/listErrors" body = nil query_string_params = {} query_string_params["filter"] = request_pb.filter.to_s if request_pb.has_filter? query_string_params["maxResults"] = request_pb.max_results.to_s if request_pb.has_max_results? query_string_params["orderBy"] = request_pb.order_by.to_s if request_pb.has_order_by? query_string_params["pageToken"] = request_pb.page_token.to_s if request_pb.has_page_token? query_string_params["returnPartialSuccess"] = request_pb.return_partial_success.to_s if request_pb.has_return_partial_success? [uri, body, query_string_params] end
GRPC transcoding helper method for the list_managed_instances
REST call
@param request_pb [::Google::Cloud::Compute::V1::ListManagedInstancesInstanceGroupManagersRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb, line 585 def transcode_list_managed_instances_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instanceGroupManagers/#{request_pb.instance_group_manager}/listManagedInstances" body = nil query_string_params = {} query_string_params["filter"] = request_pb.filter.to_s if request_pb.has_filter? query_string_params["maxResults"] = request_pb.max_results.to_s if request_pb.has_max_results? query_string_params["orderBy"] = request_pb.order_by.to_s if request_pb.has_order_by? query_string_params["pageToken"] = request_pb.page_token.to_s if request_pb.has_page_token? query_string_params["returnPartialSuccess"] = request_pb.return_partial_success.to_s if request_pb.has_return_partial_success? [uri, body, query_string_params] end
GRPC transcoding helper method for the list_per_instance_configs
REST call
@param request_pb [::Google::Cloud::Compute::V1::ListPerInstanceConfigsInstanceGroupManagersRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb, line 634 def transcode_list_per_instance_configs_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instanceGroupManagers/#{request_pb.instance_group_manager}/listPerInstanceConfigs" body = nil query_string_params = {} query_string_params["filter"] = request_pb.filter.to_s if request_pb.has_filter? query_string_params["maxResults"] = request_pb.max_results.to_s if request_pb.has_max_results? query_string_params["orderBy"] = request_pb.order_by.to_s if request_pb.has_order_by? query_string_params["pageToken"] = request_pb.page_token.to_s if request_pb.has_page_token? query_string_params["returnPartialSuccess"] = request_pb.return_partial_success.to_s if request_pb.has_return_partial_success? [uri, body, query_string_params] end
GRPC transcoding helper method for the list REST call
@param request_pb [::Google::Cloud::Compute::V1::ListInstanceGroupManagersRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb, line 487 def transcode_list_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instanceGroupManagers" body = nil query_string_params = {} query_string_params["filter"] = request_pb.filter.to_s if request_pb.has_filter? query_string_params["maxResults"] = request_pb.max_results.to_s if request_pb.has_max_results? query_string_params["orderBy"] = request_pb.order_by.to_s if request_pb.has_order_by? query_string_params["pageToken"] = request_pb.page_token.to_s if request_pb.has_page_token? query_string_params["returnPartialSuccess"] = request_pb.return_partial_success.to_s if request_pb.has_return_partial_success? [uri, body, query_string_params] end
GRPC transcoding helper method for the patch_per_instance_configs
REST call
@param request_pb [::Google::Cloud::Compute::V1::PatchPerInstanceConfigsInstanceGroupManagerRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb, line 730 def transcode_patch_per_instance_configs_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instanceGroupManagers/#{request_pb.instance_group_manager}/patchPerInstanceConfigs" body = request_pb.instance_group_managers_patch_per_instance_configs_req_resource.to_json query_string_params = {} query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id? [uri, body, query_string_params] end
GRPC transcoding helper method for the patch REST call
@param request_pb [::Google::Cloud::Compute::V1::PatchInstanceGroupManagerRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb, line 684 def transcode_patch_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instanceGroupManagers/#{request_pb.instance_group_manager}" body = request_pb.instance_group_manager_resource.to_json query_string_params = {} query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id? [uri, body, query_string_params] end
GRPC transcoding helper method for the recreate_instances
REST call
@param request_pb [::Google::Cloud::Compute::V1::RecreateInstancesInstanceGroupManagerRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb, line 776 def transcode_recreate_instances_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instanceGroupManagers/#{request_pb.instance_group_manager}/recreateInstances" body = request_pb.instance_group_managers_recreate_instances_request_resource.to_json query_string_params = {} query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id? [uri, body, query_string_params] end
GRPC transcoding helper method for the resize REST call
@param request_pb [::Google::Cloud::Compute::V1::ResizeInstanceGroupManagerRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb, line 821 def transcode_resize_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instanceGroupManagers/#{request_pb.instance_group_manager}/resize" body = nil query_string_params = {} query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id? query_string_params["size"] = request_pb.size.to_s [uri, body, query_string_params] end
GRPC transcoding helper method for the set_instance_template
REST call
@param request_pb [::Google::Cloud::Compute::V1::SetInstanceTemplateInstanceGroupManagerRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb, line 868 def transcode_set_instance_template_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instanceGroupManagers/#{request_pb.instance_group_manager}/setInstanceTemplate" body = request_pb.instance_group_managers_set_instance_template_request_resource.to_json query_string_params = {} query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id? [uri, body, query_string_params] end
GRPC transcoding helper method for the set_target_pools
REST call
@param request_pb [::Google::Cloud::Compute::V1::SetTargetPoolsInstanceGroupManagerRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb, line 914 def transcode_set_target_pools_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instanceGroupManagers/#{request_pb.instance_group_manager}/setTargetPools" body = request_pb.instance_group_managers_set_target_pools_request_resource.to_json query_string_params = {} query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id? [uri, body, query_string_params] end
GRPC transcoding helper method for the update_per_instance_configs
REST call
@param request_pb [::Google::Cloud::Compute::V1::UpdatePerInstanceConfigsInstanceGroupManagerRequest]
A request object representing the call parameters. Required.
@return [Array(String, [String, nil], Hash{String => String})]
Uri, Body, Query string parameters
# File lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb, line 960 def transcode_update_per_instance_configs_request request_pb uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instanceGroupManagers/#{request_pb.instance_group_manager}/updatePerInstanceConfigs" body = request_pb.instance_group_managers_update_per_instance_configs_req_resource.to_json query_string_params = {} query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id? [uri, body, query_string_params] end
Baseline implementation for the update_per_instance_configs
REST call
@param request_pb [::Google::Cloud::Compute::V1::UpdatePerInstanceConfigsInstanceGroupManagerRequest]
A request object representing the call parameters. Required.
@param options [::Gapic::CallOptions]
Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
@yield [result, response] Access the result along with the Faraday response object @yieldparam result [::Google::Cloud::Compute::V1::Operation] @yieldparam response [::Faraday::Response]
@return [::Google::Cloud::Compute::V1::Operation]
A result object deserialized from the server's reply
# File lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb, line 937 def update_per_instance_configs request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? uri, body, query_string_params = transcode_update_per_instance_configs_request request_pb response = @client_stub.make_post_request( uri: uri, body: body, params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end