Google Cloud Compute V1 API - Class Google::Cloud::Compute::V1::SnapshotSettingsService::Rest::Client (v2.14.0)

Reference documentation and code samples for the Google Cloud Compute V1 API class Google::Cloud::Compute::V1::SnapshotSettingsService::Rest::Client.

REST client for the SnapshotSettingsService service.

The SnapshotSettings API.

Inherits

  • Object

Methods

.configure

def self.configure() { |config| ... } -> Client::Configuration

Configure the SnapshotSettingsService Client class.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter
Example
# Modify the configuration for all SnapshotSettingsService clients
::Google::Cloud::Compute::V1::SnapshotSettingsService::Rest::Client.configure do |config|
  config.timeout = 10.0
end

#configure

def configure() { |config| ... } -> Client::Configuration

Configure the SnapshotSettingsService 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.

Yields
  • (config) — Configure the Client client.
Yield Parameter

#get

def get(request, options = nil) -> ::Google::Cloud::Compute::V1::SnapshotSettings
def get(project: nil) -> ::Google::Cloud::Compute::V1::SnapshotSettings

Get snapshot settings.

Overloads
def get(request, options = nil) -> ::Google::Cloud::Compute::V1::SnapshotSettings
Pass arguments to get via a request object, either of type GetSnapshotSettingRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Compute::V1::GetSnapshotSettingRequest, ::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.
def get(project: nil) -> ::Google::Cloud::Compute::V1::SnapshotSettings
Pass arguments to get 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).
Parameter
  • project (::String) — Project ID for this request.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/compute/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Compute::V1::SnapshotSettingsService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Compute::V1::GetSnapshotSettingRequest.new

# Call the get method.
result = client.get request

# The returned object is of type Google::Cloud::Compute::V1::SnapshotSettings.
p result

#global_operations

def global_operations() -> ::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client

Get the associated client for long-running operations via GlobalOperations.

#initialize

def initialize() { |config| ... } -> Client

Create a new SnapshotSettingsService REST client object.

Yields
  • (config) — Configure the SnapshotSettingsService client.
Yield Parameter
Returns
  • (Client) — a new instance of Client
Example
# Create a client using the default configuration
client = ::Google::Cloud::Compute::V1::SnapshotSettingsService::Rest::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::Compute::V1::SnapshotSettingsService::Rest::Client.new do |config|
  config.timeout = 10.0
end

#patch

def patch(request, options = nil) -> ::Gapic::GenericLRO::Operation
def patch(project: nil, request_id: nil, snapshot_settings_resource: nil, update_mask: nil) -> ::Gapic::GenericLRO::Operation

Patch snapshot settings.

Overloads
def patch(request, options = nil) -> ::Gapic::GenericLRO::Operation
Pass arguments to patch via a request object, either of type PatchSnapshotSettingRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Compute::V1::PatchSnapshotSettingRequest, ::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.
def patch(project: nil, request_id: nil, snapshot_settings_resource: nil, update_mask: nil) -> ::Gapic::GenericLRO::Operation
Pass arguments to patch 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).
Parameters
  • project (::String) — Project ID 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).
  • snapshot_settings_resource (::Google::Cloud::Compute::V1::SnapshotSettings, ::Hash) — The body resource for this request
  • update_mask (::String) — update_mask indicates fields to be updated as part of this request.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::GenericLRO::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::GenericLRO::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/compute/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Compute::V1::SnapshotSettingsService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Compute::V1::PatchSnapshotSettingRequest.new

# Call the patch method.
result = client.patch request

# The returned object is of type Google::Cloud::Compute::V1::Operation.
p result

#universe_domain

def universe_domain() -> String

The effective universe domain

Returns
  • (String)