Reference documentation and code samples for the Connect Gateway V1beta1 API class Google::Cloud::GkeConnect::Gateway::V1beta1::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.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all GatewayControl clients ::Google::Cloud::GkeConnect::Gateway::V1beta1::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.
- (config) — Configure the Client client.
- config (Client::Configuration)
#generate_credentials
def generate_credentials(request, options = nil) -> ::Google::Cloud::GkeConnect::Gateway::V1beta1::GenerateCredentialsResponse
def generate_credentials(name: nil, force_use_agent: nil, version: nil, kubernetes_namespace: nil, operating_system: nil) -> ::Google::Cloud::GkeConnect::Gateway::V1beta1::GenerateCredentialsResponse
GenerateCredentials provides connection information that allows a user to access the specified membership using Connect Gateway.
def generate_credentials(request, options = nil) -> ::Google::Cloud::GkeConnect::Gateway::V1beta1::GenerateCredentialsResponse
generate_credentials
via a request object, either of type
Google::Cloud::GkeConnect::Gateway::V1beta1::GenerateCredentialsRequest or an equivalent Hash.
- request (::Google::Cloud::GkeConnect::Gateway::V1beta1::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::V1beta1::GenerateCredentialsResponse
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).
- 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, thenamespace
field is omitted. - operating_system (::Google::Cloud::GkeConnect::Gateway::V1beta1::GenerateCredentialsRequest::OperatingSystem) — Optional. The operating system where the kubeconfig will be used.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::GkeConnect::Gateway::V1beta1::GenerateCredentialsResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/gke_connect/gateway/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::GkeConnect::Gateway::V1beta1::GatewayControl::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::GkeConnect::Gateway::V1beta1::GenerateCredentialsRequest.new # Call the generate_credentials method. result = client.generate_credentials request # The returned object is of type Google::Cloud::GkeConnect::Gateway::V1beta1::GenerateCredentialsResponse. p result
#initialize
def initialize() { |config| ... } -> Client
Create a new GatewayControl REST client object.
- (config) — Configure the GatewayControl client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::GkeConnect::Gateway::V1beta1::GatewayControl::Rest::Client.new # Create a client using a custom configuration client = ::Google::Cloud::GkeConnect::Gateway::V1beta1::GatewayControl::Rest::Client.new do |config| config.timeout = 10.0 end
#logger
def logger() -> Logger
The logger used for request/response debug logging.
- (Logger)
#universe_domain
def universe_domain() -> String
The effective universe domain
- (String)