Compute Engine v1 API - Class ImageFamilyViewsClient (2.3.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
IReadOnlyList<String>
Remarks

GrpcClient

public virtual ImageFamilyViews.ImageFamilyViewsClient GrpcClient { get; }

The underlying gRPC ImageFamilyViews client

Property Value
TypeDescription
ImageFamilyViews.ImageFamilyViewsClient

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(CancellationToken))

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
Task<ImageFamilyViewsClient>

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
Task<ImageFamilyView>

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
Task<ImageFamilyView>

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
Task<ImageFamilyView>

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
Task<ImageFamilyView>

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.