# Connect Gateway V1beta1 API - Class Google::Cloud::GkeConnect::Gateway::V1beta1::GatewayControl::Rest::Client (v0.14.0)

0.14.0 (latest) 0.13.1 0.12.0 0.11.0 0.10.0 0.9.1 0.8.0 0.7.1 0.6.0 0.5.2 0.4.0 0.3.0 0.2.0 0.1.5 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.


<br />

GatewayControl is the control plane API for Connect Gateway.

## Inherits

- Object

## Methods

### .configure

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

Configure the GatewayControl Client class.


<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gke_connect-gateway-v1beta1/latest/Google-Cloud-GkeConnect-Gateway-V1beta1-GatewayControl-Rest-Client-Configuration "Google::Cloud::GkeConnect::Gateway::V1beta1::GatewayControl::Rest::Client::Configuration (class)")
for a description of the configuration fields.
**Yields**

- (config) --- Configure the Client client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gke_connect-gateway-v1beta1/latest/Google-Cloud-GkeConnect-Gateway-V1beta1-GatewayControl-Rest-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gke_connect-gateway-v1beta1/latest/Google-Cloud-GkeConnect-Gateway-V1beta1-GatewayControl-Rest-Client-Configuration))
**Example**

```ruby
# 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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gke_connect-gateway-v1beta1/latest/Google-Cloud-GkeConnect-Gateway-V1beta1-GatewayControl-Rest-Client#Google__Cloud__GkeConnect__Gateway__V1beta1__GatewayControl__Rest__Client_configure_class_ "Google::Cloud::GkeConnect::Gateway::V1beta1::GatewayControl::Rest::Client.configure (method)").

<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gke_connect-gateway-v1beta1/latest/Google-Cloud-GkeConnect-Gateway-V1beta1-GatewayControl-Rest-Client-Configuration "Google::Cloud::GkeConnect::Gateway::V1beta1::GatewayControl::Rest::Client::Configuration (class)")
for a description of the configuration fields.
**Yields**

- (config) --- Configure the Client client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gke_connect-gateway-v1beta1/latest/Google-Cloud-GkeConnect-Gateway-V1beta1-GatewayControl-Rest-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gke_connect-gateway-v1beta1/latest/Google-Cloud-GkeConnect-Gateway-V1beta1-GatewayControl-Rest-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.
**Overloads**

    def generate_credentials(request, options = nil) -> ::Google::Cloud::GkeConnect::Gateway::V1beta1::GenerateCredentialsResponse

Pass arguments to `generate_credentials` via a request object, either of type [Google::Cloud::GkeConnect::Gateway::V1beta1::GenerateCredentialsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gke_connect-gateway-v1beta1/latest/Google-Cloud-GkeConnect-Gateway-V1beta1-GenerateCredentialsRequest "Google::Cloud::GkeConnect::Gateway::V1beta1::GenerateCredentialsRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::GkeConnect::Gateway::V1beta1::GenerateCredentialsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gke_connect-gateway-v1beta1/latest/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

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::V1beta1::GenerateCredentialsRequest::OperatingSystem](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gke_connect-gateway-v1beta1/latest/Google-Cloud-GkeConnect-Gateway-V1beta1-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**

- **result** ([::Google::Cloud::GkeConnect::Gateway::V1beta1::GenerateCredentialsResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gke_connect-gateway-v1beta1/latest/Google-Cloud-GkeConnect-Gateway-V1beta1-GenerateCredentialsResponse))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Cloud::GkeConnect::Gateway::V1beta1::GenerateCredentialsResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gke_connect-gateway-v1beta1/latest/Google-Cloud-GkeConnect-Gateway-V1beta1-GenerateCredentialsResponse))
**Raises**

- (::Google::Cloud::Error) --- if the REST call is aborted.
**Example**

Basic example

```ruby
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.
**Yields**

- (config) --- Configure the GatewayControl client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gke_connect-gateway-v1beta1/latest/Google-Cloud-GkeConnect-Gateway-V1beta1-GatewayControl-Rest-Client-Configuration))
**Returns**

- ([Client](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gke_connect-gateway-v1beta1/latest/Google-Cloud-GkeConnect-Gateway-V1beta1-GatewayControl-Rest-Client)) --- a new instance of Client
**Example**

```ruby
# 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.
**Returns**

- (Logger)

### #universe_domain

    def universe_domain() -> String

The effective universe domain
**Returns**

- (String)