Connect Gateway V1 API - Class Google::Cloud::GkeConnect::Gateway::V1::GatewayControl::Rest::Client (v0.3.0)

Reference documentation and code samples for the Connect Gateway V1 API class Google::Cloud::GkeConnect::Gateway::V1::GatewayControl::Rest::Client.

REST client for the GatewayControl service.

GatewayControl is the control plane API for Connect Gateway.

Inherits

  • Object

Methods

.configure

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

Configure the GatewayControl 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 GatewayControl clients
::Google::Cloud::GkeConnect::Gateway::V1::GatewayControl::Rest::Client.configure do |config|
  config.timeout = 10.0
end

#configure

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

Configure the GatewayControl 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

#generate_credentials

def generate_credentials(request, options = nil) -> ::Google::Cloud::GkeConnect::Gateway::V1::GenerateCredentialsResponse
def generate_credentials(name: nil, force_use_agent: nil, version: nil, kubernetes_namespace: nil, operating_system: nil) -> ::Google::Cloud::GkeConnect::Gateway::V1::GenerateCredentialsResponse

GenerateCredentials provides connection information that allows a user to access the specified membership using Connect Gateway.

Overloads
def generate_credentials(request, options = nil) -> ::Google::Cloud::GkeConnect::Gateway::V1::GenerateCredentialsResponse
Pass arguments to generate_credentials via a request object, either of type Google::Cloud::GkeConnect::Gateway::V1::GenerateCredentialsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::GkeConnect::Gateway::V1::GenerateCredentialsRequest, ::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 generate_credentials(name: nil, force_use_agent: nil, version: nil, kubernetes_namespace: nil, operating_system: nil) -> ::Google::Cloud::GkeConnect::Gateway::V1::GenerateCredentialsResponse
Pass arguments to generate_credentials 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
  • name (::String) — Required. The Fleet membership resource.
  • force_use_agent (::Boolean) — Optional. Whether to force the use of Connect Agent-based transport.

    This will return a configuration that uses Connect Agent as the underlying transport mechanism for cluster types that would otherwise have used a different transport. Requires that Connect Agent be installed on the cluster. Setting this field to false is equivalent to not setting it.

  • version (::String) — Optional. The Connect Gateway version to be used in the resulting configuration.

    Leave this field blank to let the server choose the version (recommended).

  • kubernetes_namespace (::String) — Optional. The namespace to use in the kubeconfig context.

    If this field is specified, the server will set the namespace field in kubeconfig context. If not specified, the namespace field is omitted.

  • operating_system (::Google::Cloud::GkeConnect::Gateway::V1::GenerateCredentialsRequest::OperatingSystem) — Optional. The operating system where the kubeconfig will be used.
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/gke_connect/gateway/v1"

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

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GkeConnect::Gateway::V1::GenerateCredentialsRequest.new

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

# The returned object is of type Google::Cloud::GkeConnect::Gateway::V1::GenerateCredentialsResponse.
p result

#initialize

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

Create a new GatewayControl REST client object.

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

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

#logger

def logger() -> Logger

The logger used for request/response debug logging.

Returns
  • (Logger)

#universe_domain

def universe_domain() -> String

The effective universe domain

Returns
  • (String)