Vision AI v1 API - Class HealthCheckServiceClient (1.0.0-beta01)

public abstract class HealthCheckServiceClient

Reference documentation and code samples for the Vision AI v1 API class HealthCheckServiceClient.

HealthCheckService client wrapper, for convenient use.

Inheritance

object > HealthCheckServiceClient

Namespace

Google.Cloud.VisionAI.V1

Assembly

Google.Cloud.VisionAI.V1.dll

Remarks

HealthCheckService provides an interface for Vertex AI Vision Cluster Health Check.

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
Type Description
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default HealthCheckService scopes.

Property Value
Type Description
IReadOnlyListstring
Remarks

The default HealthCheckService scopes are:

GrpcClient

public virtual HealthCheckService.HealthCheckServiceClient GrpcClient { get; }

The underlying gRPC HealthCheckService client

Property Value
Type Description
HealthCheckServiceHealthCheckServiceClient

IAMPolicyClient

public virtual IAMPolicyClient IAMPolicyClient { get; }

The IAMPolicyClient associated with this client.

Property Value
Type Description
IAMPolicyClient

LocationsClient

public virtual LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
Type Description
LocationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
Type Description
ServiceMetadata

Methods

Create()

public static HealthCheckServiceClient Create()

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

Returns
Type Description
HealthCheckServiceClient

The created HealthCheckServiceClient.

CreateAsync(CancellationToken)

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

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

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskHealthCheckServiceClient

The task representing the created HealthCheckServiceClient.

HealthCheck(HealthCheckRequest, CallSettings)

public virtual HealthCheckResponse HealthCheck(HealthCheckRequest request, CallSettings callSettings = null)

HealthCheck method checks the health status of the cluster.

Parameters
Name Description
request HealthCheckRequest

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
HealthCheckResponse

The RPC response.

Example
// Create client
HealthCheckServiceClient healthCheckServiceClient = HealthCheckServiceClient.Create();
// Initialize request argument(s)
HealthCheckRequest request = new HealthCheckRequest
{
    ClusterAsClusterName = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]"),
};
// Make the request
HealthCheckResponse response = healthCheckServiceClient.HealthCheck(request);

HealthCheckAsync(HealthCheckRequest, CallSettings)

public virtual Task<HealthCheckResponse> HealthCheckAsync(HealthCheckRequest request, CallSettings callSettings = null)

HealthCheck method checks the health status of the cluster.

Parameters
Name Description
request HealthCheckRequest

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
TaskHealthCheckResponse

A Task containing the RPC response.

Example
// Create client
HealthCheckServiceClient healthCheckServiceClient = await HealthCheckServiceClient.CreateAsync();
// Initialize request argument(s)
HealthCheckRequest request = new HealthCheckRequest
{
    ClusterAsClusterName = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]"),
};
// Make the request
HealthCheckResponse response = await healthCheckServiceClient.HealthCheckAsync(request);

HealthCheckAsync(HealthCheckRequest, CancellationToken)

public virtual Task<HealthCheckResponse> HealthCheckAsync(HealthCheckRequest request, CancellationToken cancellationToken)

HealthCheck method checks the health status of the cluster.

Parameters
Name Description
request HealthCheckRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskHealthCheckResponse

A Task containing the RPC response.

Example
// Create client
HealthCheckServiceClient healthCheckServiceClient = await HealthCheckServiceClient.CreateAsync();
// Initialize request argument(s)
HealthCheckRequest request = new HealthCheckRequest
{
    ClusterAsClusterName = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]"),
};
// Make the request
HealthCheckResponse response = await healthCheckServiceClient.HealthCheckAsync(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.