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

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
TypeDescription
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default GatewayService scopes.

Property Value
TypeDescription
IReadOnlyListstring
Remarks

The default GatewayService scopes are:

GrpcClient

public virtual GatewayService.GatewayServiceClient GrpcClient { get; }

The underlying gRPC GatewayService client

Property Value
TypeDescription
GatewayServiceGatewayServiceClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
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
TypeDescription
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
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
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
NameDescription
requestHttpBody

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestHttpBody

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestHttpBody

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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
NameDescription
requestHttpBody

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestHttpBody

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestHttpBody

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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
NameDescription
requestHttpBody

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestHttpBody

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestHttpBody

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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
NameDescription
requestHttpBody

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestHttpBody

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestHttpBody

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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
NameDescription
requestHttpBody

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestHttpBody

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestHttpBody

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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
TypeDescription
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.