Compute Engine v1 API - Class ImageFamilyViewsClient (3.1.0)

public abstract class ImageFamilyViewsClient

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

ImageFamilyViews client wrapper, for convenient use.

Inheritance

object > ImageFamilyViewsClient

Namespace

Google.Cloud.Compute.V1

Assembly

Google.Cloud.Compute.V1.dll

Remarks

The ImageFamilyViews API.

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

The default endpoint for the ImageFamilyViews 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 ImageFamilyViews scopes.

Property Value
Type Description
IReadOnlyListstring
Remarks

GrpcClient

public virtual ImageFamilyViews.ImageFamilyViewsClient GrpcClient { get; }

The underlying gRPC ImageFamilyViews client

Property Value
Type Description
ImageFamilyViewsImageFamilyViewsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
Type Description
ServiceMetadata

Methods

Create()

public static ImageFamilyViewsClient Create()

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

Returns
Type Description
ImageFamilyViewsClient

The created ImageFamilyViewsClient.

CreateAsync(CancellationToken)

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

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

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskImageFamilyViewsClient

The task representing the created ImageFamilyViewsClient.

Get(GetImageFamilyViewRequest, CallSettings)

public virtual ImageFamilyView Get(GetImageFamilyViewRequest request, CallSettings callSettings = null)

Returns the latest image that is part of an image family, is not deprecated and is rolled out in the specified zone.

Parameters
Name Description
request GetImageFamilyViewRequest

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
ImageFamilyView

The RPC response.

Example
// Create client
ImageFamilyViewsClient imageFamilyViewsClient = ImageFamilyViewsClient.Create();
// Initialize request argument(s)
GetImageFamilyViewRequest request = new GetImageFamilyViewRequest
{
    Zone = "",
    Project = "",
    Family = "",
};
// Make the request
ImageFamilyView response = imageFamilyViewsClient.Get(request);

Get(string, string, string, CallSettings)

public virtual ImageFamilyView Get(string project, string zone, string family, CallSettings callSettings = null)

Returns the latest image that is part of an image family, is not deprecated and is rolled out in the specified zone.

Parameters
Name Description
project string

Project ID for this request.

zone string

The name of the zone for this request.

family string

Name of the image family to search for.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
ImageFamilyView

The RPC response.

Example
// Create client
ImageFamilyViewsClient imageFamilyViewsClient = ImageFamilyViewsClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string family = "";
// Make the request
ImageFamilyView response = imageFamilyViewsClient.Get(project, zone, family);

GetAsync(GetImageFamilyViewRequest, CallSettings)

public virtual Task<ImageFamilyView> GetAsync(GetImageFamilyViewRequest request, CallSettings callSettings = null)

Returns the latest image that is part of an image family, is not deprecated and is rolled out in the specified zone.

Parameters
Name Description
request GetImageFamilyViewRequest

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
TaskImageFamilyView

A Task containing the RPC response.

Example
// Create client
ImageFamilyViewsClient imageFamilyViewsClient = await ImageFamilyViewsClient.CreateAsync();
// Initialize request argument(s)
GetImageFamilyViewRequest request = new GetImageFamilyViewRequest
{
    Zone = "",
    Project = "",
    Family = "",
};
// Make the request
ImageFamilyView response = await imageFamilyViewsClient.GetAsync(request);

GetAsync(GetImageFamilyViewRequest, CancellationToken)

public virtual Task<ImageFamilyView> GetAsync(GetImageFamilyViewRequest request, CancellationToken cancellationToken)

Returns the latest image that is part of an image family, is not deprecated and is rolled out in the specified zone.

Parameters
Name Description
request GetImageFamilyViewRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskImageFamilyView

A Task containing the RPC response.

Example
// Create client
ImageFamilyViewsClient imageFamilyViewsClient = await ImageFamilyViewsClient.CreateAsync();
// Initialize request argument(s)
GetImageFamilyViewRequest request = new GetImageFamilyViewRequest
{
    Zone = "",
    Project = "",
    Family = "",
};
// Make the request
ImageFamilyView response = await imageFamilyViewsClient.GetAsync(request);

GetAsync(string, string, string, CallSettings)

public virtual Task<ImageFamilyView> GetAsync(string project, string zone, string family, CallSettings callSettings = null)

Returns the latest image that is part of an image family, is not deprecated and is rolled out in the specified zone.

Parameters
Name Description
project string

Project ID for this request.

zone string

The name of the zone for this request.

family string

Name of the image family to search for.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskImageFamilyView

A Task containing the RPC response.

Example
// Create client
ImageFamilyViewsClient imageFamilyViewsClient = await ImageFamilyViewsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string family = "";
// Make the request
ImageFamilyView response = await imageFamilyViewsClient.GetAsync(project, zone, family);

GetAsync(string, string, string, CancellationToken)

public virtual Task<ImageFamilyView> GetAsync(string project, string zone, string family, CancellationToken cancellationToken)

Returns the latest image that is part of an image family, is not deprecated and is rolled out in the specified zone.

Parameters
Name Description
project string

Project ID for this request.

zone string

The name of the zone for this request.

family string

Name of the image family to search for.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskImageFamilyView

A Task containing the RPC response.

Example
// Create client
ImageFamilyViewsClient imageFamilyViewsClient = await ImageFamilyViewsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string family = "";
// Make the request
ImageFamilyView response = await imageFamilyViewsClient.GetAsync(project, zone, family);

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.