class Google::Cloud::Shell::V1::CloudShellService::Operations::Configuration
Configuration
class for the Operations
API.
This class represents the configuration for Operations
, providing control over timeouts, retry behavior, logging, transport parameters, and other low-level controls. Certain parameters can also be applied individually to specific RPCs. See {::Google::Longrunning::Operations::Client::Configuration::Rpcs} for a list of RPCs that can be configured independently.
Configuration
can be applied globally to all clients, or to a single client on construction.
@example
# Modify the global config, setting the timeout for # list_operations to 20 seconds, # and all remaining timeouts to 10 seconds. ::Google::Longrunning::Operations::Client.configure do |config| config.timeout = 10.0 config.rpcs.list_operations.timeout = 20.0 end # Apply the above configuration only to a new client. client = ::Google::Longrunning::Operations::Client.new do |config| config.timeout = 10.0 config.rpcs.list_operations.timeout = 20.0 end
@!attribute [rw] endpoint
The hostname or hostname:port of the service endpoint. Defaults to `"cloudshell.googleapis.com"`. @return [::String]
@!attribute [rw] credentials
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](https://googleapis.dev/ruby/googleauth/latest/index.html)) * (`Signet::OAuth2::Client`) A signet oauth2 client object (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html)) * (`GRPC::Core::Channel`) a gRPC channel with included credentials * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object * (`nil`) indicating no credentials @return [::Object]
@!attribute [rw] scope
The OAuth scopes @return [::Array<::String>]
@!attribute [rw] lib_name
The library name as recorded in instrumentation and logging @return [::String]
@!attribute [rw] lib_version
The library version as recorded in instrumentation and logging @return [::String]
@!attribute [rw] channel_args
Extra parameters passed to the gRPC channel. Note: this is ignored if a `GRPC::Core::Channel` object is provided as the credential. @return [::Hash]
@!attribute [rw] interceptors
An array of interceptors that are run before calls are executed. @return [::Array<::GRPC::ClientInterceptor>]
@!attribute [rw] timeout
The call timeout in seconds. @return [::Numeric]
@!attribute [rw] metadata
Additional gRPC headers to be sent with the call. @return [::Hash{::Symbol=>::String}]
@!attribute [rw] retry_policy
The retry policy. The value is a hash with the following keys: * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. * `:retry_codes` (*type:* `Array<String>`) - The error codes that should trigger a retry. @return [::Hash]
@!attribute [rw] quota_project
A separate project against which to charge quota. @return [::String]
Public Class Methods
@private
# File lib/google/cloud/shell/v1/cloud_shell_service/operations.rb, line 580 def initialize parent_config = nil @parent_config = parent_config unless parent_config.nil? yield self if block_given? end
Public Instance Methods
Configurations for individual RPCs @return [Rpcs]
# File lib/google/cloud/shell/v1/cloud_shell_service/operations.rb, line 590 def rpcs @rpcs ||= begin parent_rpcs = nil parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) Rpcs.new parent_rpcs end end