public abstract class ImageViewsClientReference documentation and code samples for the Compute Engine v1 API class ImageViewsClient.
ImageViews 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 ImageViews API.
Properties
DefaultEndpoint
public static string DefaultEndpoint { get; }The default endpoint for the ImageViews 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 ImageViews scopes.
| Property Value | |
|---|---|
| Type | Description |
IReadOnlyListstring |
|
The default ImageViews scopes are:
GrpcClient
public virtual ImageViews.ImageViewsClient GrpcClient { get; }The underlying gRPC ImageViews client
| Property Value | |
|---|---|
| Type | Description |
ImageViewsImageViewsClient |
|
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }The service metadata associated with this client type.
| Property Value | |
|---|---|
| Type | Description |
ServiceMetadata |
|
Methods
Create()
public static ImageViewsClient Create()Synchronously creates a ImageViewsClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ImageViewsClientBuilder.
| Returns | |
|---|---|
| Type | Description |
ImageViewsClient |
The created ImageViewsClient. |
CreateAsync(CancellationToken)
public static Task<ImageViewsClient> CreateAsync(CancellationToken cancellationToken = default)Asynchronously creates a ImageViewsClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ImageViewsClientBuilder.
| Parameter | |
|---|---|
| Name | Description |
cancellationToken |
CancellationTokenThe CancellationToken to use while creating the client. |
| Returns | |
|---|---|
| Type | Description |
TaskImageViewsClient |
The task representing the created ImageViewsClient. |
Get(GetImageViewRequest, CallSettings)
public virtual ImageView Get(GetImageViewRequest request, CallSettings callSettings = null)Returns the specified global ImageView resource, with a regional context.
| Parameters | |
|---|---|
| Name | Description |
request |
GetImageViewRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
ImageView |
The RPC response. |
// Create client
ImageViewsClient imageViewsClient = ImageViewsClient.Create();
// Initialize request argument(s)
GetImageViewRequest request = new GetImageViewRequest
{
Region = "",
ResourceId = "",
Project = "",
};
// Make the request
ImageView response = imageViewsClient.Get(request);
Get(string, string, string, CallSettings)
public virtual ImageView Get(string project, string region, string resourceId, CallSettings callSettings = null)Returns the specified global ImageView resource, with a regional context.
| Parameters | |
|---|---|
| Name | Description |
project |
stringRequired. Project ID for this request. |
region |
stringRequired. Name of the region for this request. |
resourceId |
stringName of the image resource to return. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
ImageView |
The RPC response. |
// Create client
ImageViewsClient imageViewsClient = ImageViewsClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
string resourceId = "";
// Make the request
ImageView response = imageViewsClient.Get(project, region, resourceId);
GetAsync(GetImageViewRequest, CallSettings)
public virtual Task<ImageView> GetAsync(GetImageViewRequest request, CallSettings callSettings = null)Returns the specified global ImageView resource, with a regional context.
| Parameters | |
|---|---|
| Name | Description |
request |
GetImageViewRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskImageView |
A Task containing the RPC response. |
// Create client
ImageViewsClient imageViewsClient = await ImageViewsClient.CreateAsync();
// Initialize request argument(s)
GetImageViewRequest request = new GetImageViewRequest
{
Region = "",
ResourceId = "",
Project = "",
};
// Make the request
ImageView response = await imageViewsClient.GetAsync(request);
GetAsync(GetImageViewRequest, CancellationToken)
public virtual Task<ImageView> GetAsync(GetImageViewRequest request, CancellationToken cancellationToken)Returns the specified global ImageView resource, with a regional context.
| Parameters | |
|---|---|
| Name | Description |
request |
GetImageViewRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskImageView |
A Task containing the RPC response. |
// Create client
ImageViewsClient imageViewsClient = await ImageViewsClient.CreateAsync();
// Initialize request argument(s)
GetImageViewRequest request = new GetImageViewRequest
{
Region = "",
ResourceId = "",
Project = "",
};
// Make the request
ImageView response = await imageViewsClient.GetAsync(request);
GetAsync(string, string, string, CallSettings)
public virtual Task<ImageView> GetAsync(string project, string region, string resourceId, CallSettings callSettings = null)Returns the specified global ImageView resource, with a regional context.
| Parameters | |
|---|---|
| Name | Description |
project |
stringRequired. Project ID for this request. |
region |
stringRequired. Name of the region for this request. |
resourceId |
stringName of the image resource to return. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskImageView |
A Task containing the RPC response. |
// Create client
ImageViewsClient imageViewsClient = await ImageViewsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string resourceId = "";
// Make the request
ImageView response = await imageViewsClient.GetAsync(project, region, resourceId);
GetAsync(string, string, string, CancellationToken)
public virtual Task<ImageView> GetAsync(string project, string region, string resourceId, CancellationToken cancellationToken)Returns the specified global ImageView resource, with a regional context.
| Parameters | |
|---|---|
| Name | Description |
project |
stringRequired. Project ID for this request. |
region |
stringRequired. Name of the region for this request. |
resourceId |
stringName of the image resource to return. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskImageView |
A Task containing the RPC response. |
// Create client
ImageViewsClient imageViewsClient = await ImageViewsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string resourceId = "";
// Make the request
ImageView response = await imageViewsClient.GetAsync(project, region, resourceId);
List(ListImageViewsRequest, CallSettings)
public virtual PagedEnumerable<ImageViewsListResponse, ImageView> List(ListImageViewsRequest request, CallSettings callSettings = null)Returns a list of global ImageView resources, with a regional context.
| Parameters | |
|---|---|
| Name | Description |
request |
ListImageViewsRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableImageViewsListResponseImageView |
A pageable sequence of ImageView resources. |
// Create client
ImageViewsClient imageViewsClient = ImageViewsClient.Create();
// Initialize request argument(s)
ListImageViewsRequest request = new ListImageViewsRequest
{
Region = "",
OrderBy = "",
Project = "",
Filter = "",
};
// Make the request
PagedEnumerable<ImageViewsListResponse, ImageView> response = imageViewsClient.List(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (ImageView item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ImageViewsListResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (ImageView item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ImageView> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ImageView item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
List(string, string, string, int?, CallSettings)
public virtual PagedEnumerable<ImageViewsListResponse, ImageView> List(string project, string region, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)Returns a list of global ImageView resources, with a regional context.
| Parameters | |
|---|---|
| Name | Description |
project |
stringRequired. Project ID for this request. |
region |
stringRequired. Name of the region for this request. |
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableImageViewsListResponseImageView |
A pageable sequence of ImageView resources. |
// Create client
ImageViewsClient imageViewsClient = ImageViewsClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
// Make the request
PagedEnumerable<ImageViewsListResponse, ImageView> response = imageViewsClient.List(project, region);
// Iterate over all response items, lazily performing RPCs as required
foreach (ImageView item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ImageViewsListResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (ImageView item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ImageView> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ImageView item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListAsync(ListImageViewsRequest, CallSettings)
public virtual PagedAsyncEnumerable<ImageViewsListResponse, ImageView> ListAsync(ListImageViewsRequest request, CallSettings callSettings = null)Returns a list of global ImageView resources, with a regional context.
| Parameters | |
|---|---|
| Name | Description |
request |
ListImageViewsRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableImageViewsListResponseImageView |
A pageable asynchronous sequence of ImageView resources. |
// Create client
ImageViewsClient imageViewsClient = await ImageViewsClient.CreateAsync();
// Initialize request argument(s)
ListImageViewsRequest request = new ListImageViewsRequest
{
Region = "",
OrderBy = "",
Project = "",
Filter = "",
};
// Make the request
PagedAsyncEnumerable<ImageViewsListResponse, ImageView> response = imageViewsClient.ListAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await foreach (ImageView item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ImageViewsListResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (ImageView item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ImageView> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ImageView item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListAsync(string, string, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ImageViewsListResponse, ImageView> ListAsync(string project, string region, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)Returns a list of global ImageView resources, with a regional context.
| Parameters | |
|---|---|
| Name | Description |
project |
stringRequired. Project ID for this request. |
region |
stringRequired. Name of the region for this request. |
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableImageViewsListResponseImageView |
A pageable asynchronous sequence of ImageView resources. |
// Create client
ImageViewsClient imageViewsClient = await ImageViewsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
// Make the request
PagedAsyncEnumerable<ImageViewsListResponse, ImageView> response = imageViewsClient.ListAsync(project, region);
// Iterate over all response items, lazily performing RPCs as required
await foreach (ImageView item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ImageViewsListResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (ImageView item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ImageView> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ImageView item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
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.