Reference documentation and code samples for the Google Cloud Compute V1 API class Google::Cloud::Compute::V1::RegionInstances::Rest::Client.
REST client for the RegionInstances service.
The RegionInstances API.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the RegionInstances Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all RegionInstances clients ::Google::Cloud::Compute::V1::RegionInstances::Rest::Client.configure do |config| config.timeout = 10.0 end
#bulk_insert
def bulk_insert(request, options = nil) -> ::Gapic::GenericLRO::Operation
def bulk_insert(bulk_insert_instance_resource_resource: nil, project: nil, region: nil, request_id: nil) -> ::Gapic::GenericLRO::Operation
Creates multiple instances in a given region. Count specifies the number of instances to create.
def bulk_insert(request, options = nil) -> ::Gapic::GenericLRO::Operation
bulk_insert
via a request object, either of type
BulkInsertRegionInstanceRequest or an equivalent Hash.
- request (::Google::Cloud::Compute::V1::BulkInsertRegionInstanceRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional. Note: currently retry functionality is not implemented. While it is possible to set it using ::Gapic::CallOptions, it will not be applied
def bulk_insert(bulk_insert_instance_resource_resource: nil, project: nil, region: nil, request_id: nil) -> ::Gapic::GenericLRO::Operation
bulk_insert
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- bulk_insert_instance_resource_resource (::Google::Cloud::Compute::V1::BulkInsertInstanceResource, ::Hash) — The body resource for this request
- project (::String) — Project ID for this request.
- region (::String) — The name of the region for this request.
- request_id (::String) — An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
- (result, response) — Access the result along with the Faraday response object
- result (::Gapic::GenericLRO::Operation)
- response (::Faraday::Response)
- (::Gapic::GenericLRO::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the RegionInstances Client instance.
The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on Client.configure.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
#initialize
def initialize() { |config| ... } -> Client
Create a new RegionInstances REST client object.
- (config) — Configure the RegionInstances client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::Compute::V1::RegionInstances::Rest::Client.new # Create a client using a custom configuration client = ::Google::Cloud::Compute::V1::RegionInstances::Rest::Client.new do |config| config.timeout = 10.0 end
#region_operations
def region_operations() -> ::Google::Cloud::Compute::V1::RegionOperations::Rest::Client
Get the associated client for long-running operations via RegionOperations.