Connect Gateway v1 API - Class GatewayControlClient (1.0.0)

public abstract class GatewayControlClient

Reference documentation and code samples for the Connect Gateway v1 API class GatewayControlClient.

GatewayControl client wrapper, for convenient use.

Inheritance

object > GatewayControlClient

Derived Types

Namespace

Google.Cloud.GkeConnect.Gateway.V1

Assembly

Google.Cloud.GkeConnect.Gateway.V1.dll

Remarks

GatewayControl is the control plane API for Connect Gateway.

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

The default endpoint for the GatewayControl service, which is a host of "connectgateway.googleapis.com" and a port of 443.

Property Value
Type Description
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default GatewayControl scopes.

Property Value
Type Description
IReadOnlyListstring
Remarks

The default GatewayControl scopes are:

GrpcClient

public virtual GatewayControl.GatewayControlClient GrpcClient { get; }

The underlying gRPC GatewayControl client

Property Value
Type Description
GatewayControlGatewayControlClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
Type Description
ServiceMetadata

Methods

Create()

public static GatewayControlClient Create()

Synchronously creates a GatewayControlClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use GatewayControlClientBuilder.

Returns
Type Description
GatewayControlClient

The created GatewayControlClient.

CreateAsync(CancellationToken)

public static Task<GatewayControlClient> CreateAsync(CancellationToken cancellationToken = default)

Asynchronously creates a GatewayControlClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use GatewayControlClientBuilder.

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskGatewayControlClient

The task representing the created GatewayControlClient.

GenerateCredentials(GenerateCredentialsRequest, CallSettings)

public virtual GenerateCredentialsResponse GenerateCredentials(GenerateCredentialsRequest request, CallSettings callSettings = null)

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

Parameters
Name Description
request GenerateCredentialsRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
GenerateCredentialsResponse

The RPC response.

Example
// Create client
GatewayControlClient gatewayControlClient = GatewayControlClient.Create();
// Initialize request argument(s)
GenerateCredentialsRequest request = new GenerateCredentialsRequest
{
    Name = "",
    ForceUseAgent = false,
    Version = "",
    KubernetesNamespace = "",
    OperatingSystem = GenerateCredentialsRequest.Types.OperatingSystem.Unspecified,
};
// Make the request
GenerateCredentialsResponse response = gatewayControlClient.GenerateCredentials(request);

GenerateCredentialsAsync(GenerateCredentialsRequest, CallSettings)

public virtual Task<GenerateCredentialsResponse> GenerateCredentialsAsync(GenerateCredentialsRequest request, CallSettings callSettings = null)

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

Parameters
Name Description
request GenerateCredentialsRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskGenerateCredentialsResponse

A Task containing the RPC response.

Example
// Create client
GatewayControlClient gatewayControlClient = await GatewayControlClient.CreateAsync();
// Initialize request argument(s)
GenerateCredentialsRequest request = new GenerateCredentialsRequest
{
    Name = "",
    ForceUseAgent = false,
    Version = "",
    KubernetesNamespace = "",
    OperatingSystem = GenerateCredentialsRequest.Types.OperatingSystem.Unspecified,
};
// Make the request
GenerateCredentialsResponse response = await gatewayControlClient.GenerateCredentialsAsync(request);

GenerateCredentialsAsync(GenerateCredentialsRequest, CancellationToken)

public virtual Task<GenerateCredentialsResponse> GenerateCredentialsAsync(GenerateCredentialsRequest request, CancellationToken cancellationToken)

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

Parameters
Name Description
request GenerateCredentialsRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskGenerateCredentialsResponse

A Task containing the RPC response.

Example
// Create client
GatewayControlClient gatewayControlClient = await GatewayControlClient.CreateAsync();
// Initialize request argument(s)
GenerateCredentialsRequest request = new GenerateCredentialsRequest
{
    Name = "",
    ForceUseAgent = false,
    Version = "",
    KubernetesNamespace = "",
    OperatingSystem = GenerateCredentialsRequest.Types.OperatingSystem.Unspecified,
};
// Make the request
GenerateCredentialsResponse response = await gatewayControlClient.GenerateCredentialsAsync(request);

ShutdownDefaultChannelsAsync()

public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.

Returns
Type Description
Task

A task representing the asynchronous shutdown operation.

Remarks

After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.