Compute Engine v1 API - Class ImageFamilyViewsClient (2.10.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
TypeDescription
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default ImageFamilyViews scopes.

Property Value
TypeDescription
IReadOnlyListstring
Remarks

GrpcClient

public virtual ImageFamilyViews.ImageFamilyViewsClient GrpcClient { get; }

The underlying gRPC ImageFamilyViews client

Property Value
TypeDescription
ImageFamilyViewsImageFamilyViewsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
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
TypeDescription
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
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
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
NameDescription
requestGetImageFamilyViewRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
projectstring

Project ID for this request.

zonestring

The name of the zone for this request.

familystring

Name of the image family to search for.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestGetImageFamilyViewRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestGetImageFamilyViewRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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
NameDescription
projectstring

Project ID for this request.

zonestring

The name of the zone for this request.

familystring

Name of the image family to search for.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
projectstring

Project ID for this request.

zonestring

The name of the zone for this request.

familystring

Name of the image family to search for.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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
TypeDescription
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.