Compute Engine v1 API - Class ProjectViewsClient (4.0.0)

public abstract class ProjectViewsClient

Reference documentation and code samples for the Compute Engine v1 API class ProjectViewsClient.

ProjectViews client wrapper, for convenient use. This client implements API version 2026-09-01.

Inheritance

object > ProjectViewsClient

Derived Types

Namespace

Google.Cloud.Compute.V1

Assembly

Google.Cloud.Compute.V1.dll

Remarks

The ProjectViews API.

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
Type Description
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default ProjectViews scopes.

Property Value
Type Description
IReadOnlyListstring
Remarks

GrpcClient

public virtual ProjectViews.ProjectViewsClient GrpcClient { get; }

The underlying gRPC ProjectViews client

Property Value
Type Description
ProjectViewsProjectViewsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
Type Description
ServiceMetadata

Methods

Create()

public static ProjectViewsClient Create()

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

Returns
Type Description
ProjectViewsClient

The created ProjectViewsClient.

CreateAsync(CancellationToken)

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

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

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskProjectViewsClient

The task representing the created ProjectViewsClient.

Get(GetProjectViewRequest, CallSettings)

public virtual ProjectView Get(GetProjectViewRequest request, CallSettings callSettings = null)

Returns the specified global ProjectViews resource, with a regional context. This regional API endpoint reads resource metadata from regional read-only replicas. Because changes are copied to these regional replicas asynchronously, for real-time resource reads or any write operations (creating, updating, or deleting resources), use the global projects.get endpoint.

Parameters
Name Description
request GetProjectViewRequest

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
ProjectView

The RPC response.

Example
// Create client
ProjectViewsClient projectViewsClient = ProjectViewsClient.Create();
// Initialize request argument(s)
GetProjectViewRequest request = new GetProjectViewRequest
{
    Region = "",
    Project = "",
};
// Make the request
ProjectView response = projectViewsClient.Get(request);

Get(string, string, CallSettings)

public virtual ProjectView Get(string project, string region, CallSettings callSettings = null)

Returns the specified global ProjectViews resource, with a regional context. This regional API endpoint reads resource metadata from regional read-only replicas. Because changes are copied to these regional replicas asynchronously, for real-time resource reads or any write operations (creating, updating, or deleting resources), use the global projects.get endpoint.

Parameters
Name Description
project string

Required. Project ID for this request. This is part of the URL path.

region string

Required. Name of the region for this request. This is part of the URL path.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
ProjectView

The RPC response.

Example
// Create client
ProjectViewsClient projectViewsClient = ProjectViewsClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
// Make the request
ProjectView response = projectViewsClient.Get(project, region);

GetAsync(GetProjectViewRequest, CallSettings)

public virtual Task<ProjectView> GetAsync(GetProjectViewRequest request, CallSettings callSettings = null)

Returns the specified global ProjectViews resource, with a regional context. This regional API endpoint reads resource metadata from regional read-only replicas. Because changes are copied to these regional replicas asynchronously, for real-time resource reads or any write operations (creating, updating, or deleting resources), use the global projects.get endpoint.

Parameters
Name Description
request GetProjectViewRequest

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
TaskProjectView

A Task containing the RPC response.

Example
// Create client
ProjectViewsClient projectViewsClient = await ProjectViewsClient.CreateAsync();
// Initialize request argument(s)
GetProjectViewRequest request = new GetProjectViewRequest
{
    Region = "",
    Project = "",
};
// Make the request
ProjectView response = await projectViewsClient.GetAsync(request);

GetAsync(GetProjectViewRequest, CancellationToken)

public virtual Task<ProjectView> GetAsync(GetProjectViewRequest request, CancellationToken cancellationToken)

Returns the specified global ProjectViews resource, with a regional context. This regional API endpoint reads resource metadata from regional read-only replicas. Because changes are copied to these regional replicas asynchronously, for real-time resource reads or any write operations (creating, updating, or deleting resources), use the global projects.get endpoint.

Parameters
Name Description
request GetProjectViewRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskProjectView

A Task containing the RPC response.

Example
// Create client
ProjectViewsClient projectViewsClient = await ProjectViewsClient.CreateAsync();
// Initialize request argument(s)
GetProjectViewRequest request = new GetProjectViewRequest
{
    Region = "",
    Project = "",
};
// Make the request
ProjectView response = await projectViewsClient.GetAsync(request);

GetAsync(string, string, CallSettings)

public virtual Task<ProjectView> GetAsync(string project, string region, CallSettings callSettings = null)

Returns the specified global ProjectViews resource, with a regional context. This regional API endpoint reads resource metadata from regional read-only replicas. Because changes are copied to these regional replicas asynchronously, for real-time resource reads or any write operations (creating, updating, or deleting resources), use the global projects.get endpoint.

Parameters
Name Description
project string

Required. Project ID for this request. This is part of the URL path.

region string

Required. Name of the region for this request. This is part of the URL path.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskProjectView

A Task containing the RPC response.

Example
// Create client
ProjectViewsClient projectViewsClient = await ProjectViewsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
// Make the request
ProjectView response = await projectViewsClient.GetAsync(project, region);

GetAsync(string, string, CancellationToken)

public virtual Task<ProjectView> GetAsync(string project, string region, CancellationToken cancellationToken)

Returns the specified global ProjectViews resource, with a regional context. This regional API endpoint reads resource metadata from regional read-only replicas. Because changes are copied to these regional replicas asynchronously, for real-time resource reads or any write operations (creating, updating, or deleting resources), use the global projects.get endpoint.

Parameters
Name Description
project string

Required. Project ID for this request. This is part of the URL path.

region string

Required. Name of the region for this request. This is part of the URL path.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskProjectView

A Task containing the RPC response.

Example
// Create client
ProjectViewsClient projectViewsClient = await ProjectViewsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
// Make the request
ProjectView response = await projectViewsClient.GetAsync(project, region);

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.