Google Cloud Compute V1 API - Class Google::Cloud::Compute::V1::RegionInstances::Rest::Client::Configuration (v1.4.0)

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

Configuration class for the RegionInstances REST API.

This class represents the configuration for RegionInstances REST, providing control over credentials, timeouts, retry behavior, logging.

Configuration can be applied globally to all clients, or to a single client on construction.

Examples

To modify the global config, setting the timeout for all calls to 10 seconds:

::Google::Cloud::Compute::V1::RegionInstances::Client.configure do |config|
  config.timeout = 10.0
end

To apply the above configuration only to a new client:

client = ::Google::Cloud::Compute::V1::RegionInstances::Client.new do |config|
  config.timeout = 10.0
end

Inherits

  • Object

Extended By

  • Gapic::Config

Methods

#credentials

def credentials() -> ::Object

Credentials to send with calls. You may provide any of the following types:

  • (String) The path to a service account key file in JSON format
  • (Hash) A service account key as a Hash
  • (Google::Auth::Credentials) A googleauth credentials object (see the googleauth docs)
  • (Signet::OAuth2::Client) A signet oauth2 client object (see the signet docs)
  • (nil) indicating no credentials
Returns
  • (::Object)

#credentials=

def credentials=(value) -> ::Object

Credentials to send with calls. You may provide any of the following types:

  • (String) The path to a service account key file in JSON format
  • (Hash) A service account key as a Hash
  • (Google::Auth::Credentials) A googleauth credentials object (see the googleauth docs)
  • (Signet::OAuth2::Client) A signet oauth2 client object (see the signet docs)
  • (nil) indicating no credentials
Parameter
  • value (::Object)
Returns
  • (::Object)

#endpoint

def endpoint() -> ::String

The hostname or hostname:port of the service endpoint. Defaults to "compute.googleapis.com".

Returns
  • (::String)

#endpoint=

def endpoint=(value) -> ::String

The hostname or hostname:port of the service endpoint. Defaults to "compute.googleapis.com".

Parameter
  • value (::String)
Returns
  • (::String)

#lib_name

def lib_name() -> ::String

The library name as recorded in instrumentation and logging

Returns
  • (::String)

#lib_name=

def lib_name=(value) -> ::String

The library name as recorded in instrumentation and logging

Parameter
  • value (::String)
Returns
  • (::String)

#lib_version

def lib_version() -> ::String

The library version as recorded in instrumentation and logging

Returns
  • (::String)

#lib_version=

def lib_version=(value) -> ::String

The library version as recorded in instrumentation and logging

Parameter
  • value (::String)
Returns
  • (::String)

#metadata

def metadata() -> ::Hash{::Symbol=>::String}

Additional REST headers to be sent with the call.

Returns
  • (::Hash{::Symbol=>::String})

#metadata=

def metadata=(value) -> ::Hash{::Symbol=>::String}

Additional REST headers to be sent with the call.

Parameter
  • value (::Hash{::Symbol=>::String})
Returns
  • (::Hash{::Symbol=>::String})

#rpcs

def rpcs() -> Rpcs

Configurations for individual RPCs

Returns

#scope

def scope() -> ::Array<::String>

The OAuth scopes

Returns
  • (::Array<::String>)

#scope=

def scope=(value) -> ::Array<::String>

The OAuth scopes

Parameter
  • value (::Array<::String>)
Returns
  • (::Array<::String>)

#timeout

def timeout() -> ::Numeric

The call timeout in seconds.

Returns
  • (::Numeric)

#timeout=

def timeout=(value) -> ::Numeric

The call timeout in seconds.

Parameter
  • value (::Numeric)
Returns
  • (::Numeric)