Connect Gateway v1beta1 API - Class GatewayServiceClient (2.0.0-beta04)

public abstract class GatewayServiceClient

Reference documentation and code samples for the Connect Gateway v1beta1 API class GatewayServiceClient.

GatewayService client wrapper, for convenient use.

Inheritance

object > GatewayServiceClient

Derived Types

Namespace

Google.Cloud.GkeConnect.Gateway.V1Beta1

Assembly

Google.Cloud.GkeConnect.Gateway.V1Beta1.dll

Remarks

Gateway service is a public API which works as a Kubernetes resource model proxy between end users and registered Kubernetes clusters. Each RPC in this service matches with an HTTP verb. End user will initiate kubectl commands against the Gateway service, and Gateway service will forward user requests to clusters.

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

The default endpoint for the GatewayService 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 GatewayService scopes.

Property Value
Type Description
IReadOnlyListstring
Remarks

The default GatewayService scopes are:

GrpcClient

public virtual GatewayService.GatewayServiceClient GrpcClient { get; }

The underlying gRPC GatewayService client

Property Value
Type Description
GatewayServiceGatewayServiceClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
Type Description
ServiceMetadata

Methods

Create()

public static GatewayServiceClient Create()

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

Returns
Type Description
GatewayServiceClient

The created GatewayServiceClient.

CreateAsync(CancellationToken)

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

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

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskGatewayServiceClient

The task representing the created GatewayServiceClient.

DeleteResource(HttpBody, CallSettings)

public virtual HttpBody DeleteResource(HttpBody request, CallSettings callSettings = null)

DeleteResource performs an HTTP DELETE on the Kubernetes API Server.

Parameters
Name Description
request HttpBody

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
HttpBody

The RPC response.

Example
// Create client
GatewayServiceClient gatewayServiceClient = GatewayServiceClient.Create();
// Initialize request argument(s)
HttpBody request = new HttpBody
{
    ContentType = "",
    Data = ByteString.Empty,
    Extensions = { new Any(), },
};
// Make the request
HttpBody response = gatewayServiceClient.DeleteResource(request);

DeleteResourceAsync(HttpBody, CallSettings)

public virtual Task<HttpBody> DeleteResourceAsync(HttpBody request, CallSettings callSettings = null)

DeleteResource performs an HTTP DELETE on the Kubernetes API Server.

Parameters
Name Description
request HttpBody

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
TaskHttpBody

A Task containing the RPC response.

Example
// Create client
GatewayServiceClient gatewayServiceClient = await GatewayServiceClient.CreateAsync();
// Initialize request argument(s)
HttpBody request = new HttpBody
{
    ContentType = "",
    Data = ByteString.Empty,
    Extensions = { new Any(), },
};
// Make the request
HttpBody response = await gatewayServiceClient.DeleteResourceAsync(request);

DeleteResourceAsync(HttpBody, CancellationToken)

public virtual Task<HttpBody> DeleteResourceAsync(HttpBody request, CancellationToken cancellationToken)

DeleteResource performs an HTTP DELETE on the Kubernetes API Server.

Parameters
Name Description
request HttpBody

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskHttpBody

A Task containing the RPC response.

Example
// Create client
GatewayServiceClient gatewayServiceClient = await GatewayServiceClient.CreateAsync();
// Initialize request argument(s)
HttpBody request = new HttpBody
{
    ContentType = "",
    Data = ByteString.Empty,
    Extensions = { new Any(), },
};
// Make the request
HttpBody response = await gatewayServiceClient.DeleteResourceAsync(request);

GetResource(HttpBody, CallSettings)

public virtual HttpBody GetResource(HttpBody request, CallSettings callSettings = null)

GetResource performs an HTTP GET request on the Kubernetes API Server.

Parameters
Name Description
request HttpBody

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
HttpBody

The RPC response.

Example
// Create client
GatewayServiceClient gatewayServiceClient = GatewayServiceClient.Create();
// Initialize request argument(s)
HttpBody request = new HttpBody
{
    ContentType = "",
    Data = ByteString.Empty,
    Extensions = { new Any(), },
};
// Make the request
HttpBody response = gatewayServiceClient.GetResource(request);

GetResourceAsync(HttpBody, CallSettings)

public virtual Task<HttpBody> GetResourceAsync(HttpBody request, CallSettings callSettings = null)

GetResource performs an HTTP GET request on the Kubernetes API Server.

Parameters
Name Description
request HttpBody

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
TaskHttpBody

A Task containing the RPC response.

Example
// Create client
GatewayServiceClient gatewayServiceClient = await GatewayServiceClient.CreateAsync();
// Initialize request argument(s)
HttpBody request = new HttpBody
{
    ContentType = "",
    Data = ByteString.Empty,
    Extensions = { new Any(), },
};
// Make the request
HttpBody response = await gatewayServiceClient.GetResourceAsync(request);

GetResourceAsync(HttpBody, CancellationToken)

public virtual Task<HttpBody> GetResourceAsync(HttpBody request, CancellationToken cancellationToken)

GetResource performs an HTTP GET request on the Kubernetes API Server.

Parameters
Name Description
request HttpBody

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskHttpBody

A Task containing the RPC response.

Example
// Create client
GatewayServiceClient gatewayServiceClient = await GatewayServiceClient.CreateAsync();
// Initialize request argument(s)
HttpBody request = new HttpBody
{
    ContentType = "",
    Data = ByteString.Empty,
    Extensions = { new Any(), },
};
// Make the request
HttpBody response = await gatewayServiceClient.GetResourceAsync(request);

PatchResource(HttpBody, CallSettings)

public virtual HttpBody PatchResource(HttpBody request, CallSettings callSettings = null)

PatchResource performs an HTTP PATCH on the Kubernetes API Server.

Parameters
Name Description
request HttpBody

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
HttpBody

The RPC response.

Example
// Create client
GatewayServiceClient gatewayServiceClient = GatewayServiceClient.Create();
// Initialize request argument(s)
HttpBody request = new HttpBody
{
    ContentType = "",
    Data = ByteString.Empty,
    Extensions = { new Any(), },
};
// Make the request
HttpBody response = gatewayServiceClient.PatchResource(request);

PatchResourceAsync(HttpBody, CallSettings)

public virtual Task<HttpBody> PatchResourceAsync(HttpBody request, CallSettings callSettings = null)

PatchResource performs an HTTP PATCH on the Kubernetes API Server.

Parameters
Name Description
request HttpBody

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
TaskHttpBody

A Task containing the RPC response.

Example
// Create client
GatewayServiceClient gatewayServiceClient = await GatewayServiceClient.CreateAsync();
// Initialize request argument(s)
HttpBody request = new HttpBody
{
    ContentType = "",
    Data = ByteString.Empty,
    Extensions = { new Any(), },
};
// Make the request
HttpBody response = await gatewayServiceClient.PatchResourceAsync(request);

PatchResourceAsync(HttpBody, CancellationToken)

public virtual Task<HttpBody> PatchResourceAsync(HttpBody request, CancellationToken cancellationToken)

PatchResource performs an HTTP PATCH on the Kubernetes API Server.

Parameters
Name Description
request HttpBody

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskHttpBody

A Task containing the RPC response.

Example
// Create client
GatewayServiceClient gatewayServiceClient = await GatewayServiceClient.CreateAsync();
// Initialize request argument(s)
HttpBody request = new HttpBody
{
    ContentType = "",
    Data = ByteString.Empty,
    Extensions = { new Any(), },
};
// Make the request
HttpBody response = await gatewayServiceClient.PatchResourceAsync(request);

PostResource(HttpBody, CallSettings)

public virtual HttpBody PostResource(HttpBody request, CallSettings callSettings = null)

PostResource performs an HTTP POST on the Kubernetes API Server.

Parameters
Name Description
request HttpBody

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
HttpBody

The RPC response.

Example
// Create client
GatewayServiceClient gatewayServiceClient = GatewayServiceClient.Create();
// Initialize request argument(s)
HttpBody request = new HttpBody
{
    ContentType = "",
    Data = ByteString.Empty,
    Extensions = { new Any(), },
};
// Make the request
HttpBody response = gatewayServiceClient.PostResource(request);

PostResourceAsync(HttpBody, CallSettings)

public virtual Task<HttpBody> PostResourceAsync(HttpBody request, CallSettings callSettings = null)

PostResource performs an HTTP POST on the Kubernetes API Server.

Parameters
Name Description
request HttpBody

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
TaskHttpBody

A Task containing the RPC response.

Example
// Create client
GatewayServiceClient gatewayServiceClient = await GatewayServiceClient.CreateAsync();
// Initialize request argument(s)
HttpBody request = new HttpBody
{
    ContentType = "",
    Data = ByteString.Empty,
    Extensions = { new Any(), },
};
// Make the request
HttpBody response = await gatewayServiceClient.PostResourceAsync(request);

PostResourceAsync(HttpBody, CancellationToken)

public virtual Task<HttpBody> PostResourceAsync(HttpBody request, CancellationToken cancellationToken)

PostResource performs an HTTP POST on the Kubernetes API Server.

Parameters
Name Description
request HttpBody

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskHttpBody

A Task containing the RPC response.

Example
// Create client
GatewayServiceClient gatewayServiceClient = await GatewayServiceClient.CreateAsync();
// Initialize request argument(s)
HttpBody request = new HttpBody
{
    ContentType = "",
    Data = ByteString.Empty,
    Extensions = { new Any(), },
};
// Make the request
HttpBody response = await gatewayServiceClient.PostResourceAsync(request);

PutResource(HttpBody, CallSettings)

public virtual HttpBody PutResource(HttpBody request, CallSettings callSettings = null)

PutResource performs an HTTP PUT on the Kubernetes API Server.

Parameters
Name Description
request HttpBody

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
HttpBody

The RPC response.

Example
// Create client
GatewayServiceClient gatewayServiceClient = GatewayServiceClient.Create();
// Initialize request argument(s)
HttpBody request = new HttpBody
{
    ContentType = "",
    Data = ByteString.Empty,
    Extensions = { new Any(), },
};
// Make the request
HttpBody response = gatewayServiceClient.PutResource(request);

PutResourceAsync(HttpBody, CallSettings)

public virtual Task<HttpBody> PutResourceAsync(HttpBody request, CallSettings callSettings = null)

PutResource performs an HTTP PUT on the Kubernetes API Server.

Parameters
Name Description
request HttpBody

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
TaskHttpBody

A Task containing the RPC response.

Example
// Create client
GatewayServiceClient gatewayServiceClient = await GatewayServiceClient.CreateAsync();
// Initialize request argument(s)
HttpBody request = new HttpBody
{
    ContentType = "",
    Data = ByteString.Empty,
    Extensions = { new Any(), },
};
// Make the request
HttpBody response = await gatewayServiceClient.PutResourceAsync(request);

PutResourceAsync(HttpBody, CancellationToken)

public virtual Task<HttpBody> PutResourceAsync(HttpBody request, CancellationToken cancellationToken)

PutResource performs an HTTP PUT on the Kubernetes API Server.

Parameters
Name Description
request HttpBody

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskHttpBody

A Task containing the RPC response.

Example
// Create client
GatewayServiceClient gatewayServiceClient = await GatewayServiceClient.CreateAsync();
// Initialize request argument(s)
HttpBody request = new HttpBody
{
    ContentType = "",
    Data = ByteString.Empty,
    Extensions = { new Any(), },
};
// Make the request
HttpBody response = await gatewayServiceClient.PutResourceAsync(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.