public abstract class ProjectViewsClientReference 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.
Derived Types
Namespace
Google.Cloud.Compute.V1Assembly
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 |
|
The default ProjectViews scopes are:
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 |
CancellationTokenThe 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 |
GetProjectViewRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
ProjectView |
The RPC response. |
// 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 |
stringRequired. Project ID for this request. This is part of the URL path. |
region |
stringRequired. Name of the region for this request. This is part of the URL path. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
ProjectView |
The RPC response. |
// 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 |
GetProjectViewRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskProjectView |
A Task containing the RPC response. |
// 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 |
GetProjectViewRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskProjectView |
A Task containing the RPC response. |
// 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 |
stringRequired. Project ID for this request. This is part of the URL path. |
region |
stringRequired. Name of the region for this request. This is part of the URL path. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskProjectView |
A Task containing the RPC response. |
// 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 |
stringRequired. Project ID for this request. This is part of the URL path. |
region |
stringRequired. Name of the region for this request. This is part of the URL path. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskProjectView |
A Task containing the RPC response. |
// 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. |
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.