Compute Engine v1 API - Class ImagesClient (3.2.0)

public abstract class ImagesClient

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

Images client wrapper, for convenient use.

Inheritance

object > ImagesClient

Derived Types

Namespace

Google.Cloud.Compute.V1

Assembly

Google.Cloud.Compute.V1.dll

Remarks

The Images API.

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
Type Description
IReadOnlyListstring
Remarks

DeleteOperationsClient

public virtual OperationsClient DeleteOperationsClient { get; }

The long-running operations client for Delete.

Property Value
Type Description
OperationsClient

DeprecateOperationsClient

public virtual OperationsClient DeprecateOperationsClient { get; }

The long-running operations client for Deprecate.

Property Value
Type Description
OperationsClient

GrpcClient

public virtual Images.ImagesClient GrpcClient { get; }

The underlying gRPC Images client

Property Value
Type Description
ImagesImagesClient

InsertOperationsClient

public virtual OperationsClient InsertOperationsClient { get; }

The long-running operations client for Insert.

Property Value
Type Description
OperationsClient

PatchOperationsClient

public virtual OperationsClient PatchOperationsClient { get; }

The long-running operations client for Patch.

Property Value
Type Description
OperationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
Type Description
ServiceMetadata

SetLabelsOperationsClient

public virtual OperationsClient SetLabelsOperationsClient { get; }

The long-running operations client for SetLabels.

Property Value
Type Description
OperationsClient

Methods

Create()

public static ImagesClient Create()

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

Returns
Type Description
ImagesClient

The created ImagesClient.

CreateAsync(CancellationToken)

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

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

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskImagesClient

The task representing the created ImagesClient.

Delete(DeleteImageRequest, CallSettings)

public virtual Operation<Operation, Operation> Delete(DeleteImageRequest request, CallSettings callSettings = null)

Deletes the specified image.

Parameters
Name Description
request DeleteImageRequest

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
OperationOperationOperation

The RPC response.

Example
// Create client
ImagesClient imagesClient = ImagesClient.Create();
// Initialize request argument(s)
DeleteImageRequest request = new DeleteImageRequest
{
    RequestId = "",
    Image = "",
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = imagesClient.Delete(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = imagesClient.PollOnceDelete(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

Delete(string, string, CallSettings)

public virtual Operation<Operation, Operation> Delete(string project, string image, CallSettings callSettings = null)

Deletes the specified image.

Parameters
Name Description
project string

Project ID for this request.

image string

Name of the image resource to delete.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The RPC response.

Example
// Create client
ImagesClient imagesClient = ImagesClient.Create();
// Initialize request argument(s)
string project = "";
string image = "";
// Make the request
lro::Operation<Operation, Operation> response = imagesClient.Delete(project, image);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = imagesClient.PollOnceDelete(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

DeleteAsync(DeleteImageRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> DeleteAsync(DeleteImageRequest request, CallSettings callSettings = null)

Deletes the specified image.

Parameters
Name Description
request DeleteImageRequest

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
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ImagesClient imagesClient = await ImagesClient.CreateAsync();
// Initialize request argument(s)
DeleteImageRequest request = new DeleteImageRequest
{
    RequestId = "",
    Image = "",
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await imagesClient.DeleteAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await imagesClient.PollOnceDeleteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

DeleteAsync(DeleteImageRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> DeleteAsync(DeleteImageRequest request, CancellationToken cancellationToken)

Deletes the specified image.

Parameters
Name Description
request DeleteImageRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ImagesClient imagesClient = await ImagesClient.CreateAsync();
// Initialize request argument(s)
DeleteImageRequest request = new DeleteImageRequest
{
    RequestId = "",
    Image = "",
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await imagesClient.DeleteAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await imagesClient.PollOnceDeleteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

DeleteAsync(string, string, CallSettings)

public virtual Task<Operation<Operation, Operation>> DeleteAsync(string project, string image, CallSettings callSettings = null)

Deletes the specified image.

Parameters
Name Description
project string

Project ID for this request.

image string

Name of the image resource to delete.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ImagesClient imagesClient = await ImagesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string image = "";
// Make the request
lro::Operation<Operation, Operation> response = await imagesClient.DeleteAsync(project, image);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await imagesClient.PollOnceDeleteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

DeleteAsync(string, string, CancellationToken)

public virtual Task<Operation<Operation, Operation>> DeleteAsync(string project, string image, CancellationToken cancellationToken)

Deletes the specified image.

Parameters
Name Description
project string

Project ID for this request.

image string

Name of the image resource to delete.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ImagesClient imagesClient = await ImagesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string image = "";
// Make the request
lro::Operation<Operation, Operation> response = await imagesClient.DeleteAsync(project, image);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await imagesClient.PollOnceDeleteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

Deprecate(DeprecateImageRequest, CallSettings)

public virtual Operation<Operation, Operation> Deprecate(DeprecateImageRequest request, CallSettings callSettings = null)

Sets the deprecation status of an image. If an empty request body is given, clears the deprecation status instead.

Parameters
Name Description
request DeprecateImageRequest

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
OperationOperationOperation

The RPC response.

Example
// Create client
ImagesClient imagesClient = ImagesClient.Create();
// Initialize request argument(s)
DeprecateImageRequest request = new DeprecateImageRequest
{
    RequestId = "",
    Image = "",
    Project = "",
    DeprecationStatusResource = new DeprecationStatus(),
};
// Make the request
lro::Operation<Operation, Operation> response = imagesClient.Deprecate(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = imagesClient.PollOnceDeprecate(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

Deprecate(string, string, DeprecationStatus, CallSettings)

public virtual Operation<Operation, Operation> Deprecate(string project, string image, DeprecationStatus deprecationStatusResource, CallSettings callSettings = null)

Sets the deprecation status of an image. If an empty request body is given, clears the deprecation status instead.

Parameters
Name Description
project string

Project ID for this request.

image string

Image name.

deprecationStatusResource DeprecationStatus

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The RPC response.

Example
// Create client
ImagesClient imagesClient = ImagesClient.Create();
// Initialize request argument(s)
string project = "";
string image = "";
DeprecationStatus deprecationStatusResource = new DeprecationStatus();
// Make the request
lro::Operation<Operation, Operation> response = imagesClient.Deprecate(project, image, deprecationStatusResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = imagesClient.PollOnceDeprecate(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

DeprecateAsync(DeprecateImageRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> DeprecateAsync(DeprecateImageRequest request, CallSettings callSettings = null)

Sets the deprecation status of an image. If an empty request body is given, clears the deprecation status instead.

Parameters
Name Description
request DeprecateImageRequest

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
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ImagesClient imagesClient = await ImagesClient.CreateAsync();
// Initialize request argument(s)
DeprecateImageRequest request = new DeprecateImageRequest
{
    RequestId = "",
    Image = "",
    Project = "",
    DeprecationStatusResource = new DeprecationStatus(),
};
// Make the request
lro::Operation<Operation, Operation> response = await imagesClient.DeprecateAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await imagesClient.PollOnceDeprecateAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

DeprecateAsync(DeprecateImageRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> DeprecateAsync(DeprecateImageRequest request, CancellationToken cancellationToken)

Sets the deprecation status of an image. If an empty request body is given, clears the deprecation status instead.

Parameters
Name Description
request DeprecateImageRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ImagesClient imagesClient = await ImagesClient.CreateAsync();
// Initialize request argument(s)
DeprecateImageRequest request = new DeprecateImageRequest
{
    RequestId = "",
    Image = "",
    Project = "",
    DeprecationStatusResource = new DeprecationStatus(),
};
// Make the request
lro::Operation<Operation, Operation> response = await imagesClient.DeprecateAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await imagesClient.PollOnceDeprecateAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

DeprecateAsync(string, string, DeprecationStatus, CallSettings)

public virtual Task<Operation<Operation, Operation>> DeprecateAsync(string project, string image, DeprecationStatus deprecationStatusResource, CallSettings callSettings = null)

Sets the deprecation status of an image. If an empty request body is given, clears the deprecation status instead.

Parameters
Name Description
project string

Project ID for this request.

image string

Image name.

deprecationStatusResource DeprecationStatus

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ImagesClient imagesClient = await ImagesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string image = "";
DeprecationStatus deprecationStatusResource = new DeprecationStatus();
// Make the request
lro::Operation<Operation, Operation> response = await imagesClient.DeprecateAsync(project, image, deprecationStatusResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await imagesClient.PollOnceDeprecateAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

DeprecateAsync(string, string, DeprecationStatus, CancellationToken)

public virtual Task<Operation<Operation, Operation>> DeprecateAsync(string project, string image, DeprecationStatus deprecationStatusResource, CancellationToken cancellationToken)

Sets the deprecation status of an image. If an empty request body is given, clears the deprecation status instead.

Parameters
Name Description
project string

Project ID for this request.

image string

Image name.

deprecationStatusResource DeprecationStatus

The body resource for this request

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ImagesClient imagesClient = await ImagesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string image = "";
DeprecationStatus deprecationStatusResource = new DeprecationStatus();
// Make the request
lro::Operation<Operation, Operation> response = await imagesClient.DeprecateAsync(project, image, deprecationStatusResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await imagesClient.PollOnceDeprecateAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

Get(GetImageRequest, CallSettings)

public virtual Image Get(GetImageRequest request, CallSettings callSettings = null)

Returns the specified image.

Parameters
Name Description
request GetImageRequest

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
Image

The RPC response.

Example
// Create client
ImagesClient imagesClient = ImagesClient.Create();
// Initialize request argument(s)
GetImageRequest request = new GetImageRequest
{
    Image = "",
    Project = "",
};
// Make the request
Image response = imagesClient.Get(request);

Get(string, string, CallSettings)

public virtual Image Get(string project, string image, CallSettings callSettings = null)

Returns the specified image.

Parameters
Name Description
project string

Project ID for this request.

image string

Name of the image resource to return.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Image

The RPC response.

Example
// Create client
ImagesClient imagesClient = ImagesClient.Create();
// Initialize request argument(s)
string project = "";
string image = "";
// Make the request
Image response = imagesClient.Get(project, image);

GetAsync(GetImageRequest, CallSettings)

public virtual Task<Image> GetAsync(GetImageRequest request, CallSettings callSettings = null)

Returns the specified image.

Parameters
Name Description
request GetImageRequest

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
TaskImage

A Task containing the RPC response.

Example
// Create client
ImagesClient imagesClient = await ImagesClient.CreateAsync();
// Initialize request argument(s)
GetImageRequest request = new GetImageRequest
{
    Image = "",
    Project = "",
};
// Make the request
Image response = await imagesClient.GetAsync(request);

GetAsync(GetImageRequest, CancellationToken)

public virtual Task<Image> GetAsync(GetImageRequest request, CancellationToken cancellationToken)

Returns the specified image.

Parameters
Name Description
request GetImageRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskImage

A Task containing the RPC response.

Example
// Create client
ImagesClient imagesClient = await ImagesClient.CreateAsync();
// Initialize request argument(s)
GetImageRequest request = new GetImageRequest
{
    Image = "",
    Project = "",
};
// Make the request
Image response = await imagesClient.GetAsync(request);

GetAsync(string, string, CallSettings)

public virtual Task<Image> GetAsync(string project, string image, CallSettings callSettings = null)

Returns the specified image.

Parameters
Name Description
project string

Project ID for this request.

image string

Name of the image resource to return.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskImage

A Task containing the RPC response.

Example
// Create client
ImagesClient imagesClient = await ImagesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string image = "";
// Make the request
Image response = await imagesClient.GetAsync(project, image);

GetAsync(string, string, CancellationToken)

public virtual Task<Image> GetAsync(string project, string image, CancellationToken cancellationToken)

Returns the specified image.

Parameters
Name Description
project string

Project ID for this request.

image string

Name of the image resource to return.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskImage

A Task containing the RPC response.

Example
// Create client
ImagesClient imagesClient = await ImagesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string image = "";
// Make the request
Image response = await imagesClient.GetAsync(project, image);

GetFromFamily(GetFromFamilyImageRequest, CallSettings)

public virtual Image GetFromFamily(GetFromFamilyImageRequest request, CallSettings callSettings = null)

Returns the latest image that is part of an image family and is not deprecated. For more information on image families, see Public image families documentation.

Parameters
Name Description
request GetFromFamilyImageRequest

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
Image

The RPC response.

Example
// Create client
ImagesClient imagesClient = ImagesClient.Create();
// Initialize request argument(s)
GetFromFamilyImageRequest request = new GetFromFamilyImageRequest
{
    Project = "",
    Family = "",
};
// Make the request
Image response = imagesClient.GetFromFamily(request);

GetFromFamily(string, string, CallSettings)

public virtual Image GetFromFamily(string project, string family, CallSettings callSettings = null)

Returns the latest image that is part of an image family and is not deprecated. For more information on image families, see Public image families documentation.

Parameters
Name Description
project string

The image project that the image belongs to. For example, to get a CentOS image, specify centos-cloud as the image project.

family string

Name of the image family to search for.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Image

The RPC response.

Example
// Create client
ImagesClient imagesClient = ImagesClient.Create();
// Initialize request argument(s)
string project = "";
string family = "";
// Make the request
Image response = imagesClient.GetFromFamily(project, family);

GetFromFamilyAsync(GetFromFamilyImageRequest, CallSettings)

public virtual Task<Image> GetFromFamilyAsync(GetFromFamilyImageRequest request, CallSettings callSettings = null)

Returns the latest image that is part of an image family and is not deprecated. For more information on image families, see Public image families documentation.

Parameters
Name Description
request GetFromFamilyImageRequest

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
TaskImage

A Task containing the RPC response.

Example
// Create client
ImagesClient imagesClient = await ImagesClient.CreateAsync();
// Initialize request argument(s)
GetFromFamilyImageRequest request = new GetFromFamilyImageRequest
{
    Project = "",
    Family = "",
};
// Make the request
Image response = await imagesClient.GetFromFamilyAsync(request);

GetFromFamilyAsync(GetFromFamilyImageRequest, CancellationToken)

public virtual Task<Image> GetFromFamilyAsync(GetFromFamilyImageRequest request, CancellationToken cancellationToken)

Returns the latest image that is part of an image family and is not deprecated. For more information on image families, see Public image families documentation.

Parameters
Name Description
request GetFromFamilyImageRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskImage

A Task containing the RPC response.

Example
// Create client
ImagesClient imagesClient = await ImagesClient.CreateAsync();
// Initialize request argument(s)
GetFromFamilyImageRequest request = new GetFromFamilyImageRequest
{
    Project = "",
    Family = "",
};
// Make the request
Image response = await imagesClient.GetFromFamilyAsync(request);

GetFromFamilyAsync(string, string, CallSettings)

public virtual Task<Image> GetFromFamilyAsync(string project, string family, CallSettings callSettings = null)

Returns the latest image that is part of an image family and is not deprecated. For more information on image families, see Public image families documentation.

Parameters
Name Description
project string

The image project that the image belongs to. For example, to get a CentOS image, specify centos-cloud as the image project.

family string

Name of the image family to search for.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskImage

A Task containing the RPC response.

Example
// Create client
ImagesClient imagesClient = await ImagesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string family = "";
// Make the request
Image response = await imagesClient.GetFromFamilyAsync(project, family);

GetFromFamilyAsync(string, string, CancellationToken)

public virtual Task<Image> GetFromFamilyAsync(string project, string family, CancellationToken cancellationToken)

Returns the latest image that is part of an image family and is not deprecated. For more information on image families, see Public image families documentation.

Parameters
Name Description
project string

The image project that the image belongs to. For example, to get a CentOS image, specify centos-cloud as the image project.

family string

Name of the image family to search for.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskImage

A Task containing the RPC response.

Example
// Create client
ImagesClient imagesClient = await ImagesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string family = "";
// Make the request
Image response = await imagesClient.GetFromFamilyAsync(project, family);

GetIamPolicy(GetIamPolicyImageRequest, CallSettings)

public virtual Policy GetIamPolicy(GetIamPolicyImageRequest request, CallSettings callSettings = null)

Gets the access control policy for a resource. May be empty if no such policy or resource exists.

Parameters
Name Description
request GetIamPolicyImageRequest

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
Policy

The RPC response.

Example
// Create client
ImagesClient imagesClient = ImagesClient.Create();
// Initialize request argument(s)
GetIamPolicyImageRequest request = new GetIamPolicyImageRequest
{
    Resource = "",
    Project = "",
    OptionsRequestedPolicyVersion = 0,
};
// Make the request
Policy response = imagesClient.GetIamPolicy(request);

GetIamPolicy(string, string, CallSettings)

public virtual Policy GetIamPolicy(string project, string resource, CallSettings callSettings = null)

Gets the access control policy for a resource. May be empty if no such policy or resource exists.

Parameters
Name Description
project string

Project ID for this request.

resource string

Name or id of the resource for this request.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Policy

The RPC response.

Example
// Create client
ImagesClient imagesClient = ImagesClient.Create();
// Initialize request argument(s)
string project = "";
string resource = "";
// Make the request
Policy response = imagesClient.GetIamPolicy(project, resource);

GetIamPolicyAsync(GetIamPolicyImageRequest, CallSettings)

public virtual Task<Policy> GetIamPolicyAsync(GetIamPolicyImageRequest request, CallSettings callSettings = null)

Gets the access control policy for a resource. May be empty if no such policy or resource exists.

Parameters
Name Description
request GetIamPolicyImageRequest

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
TaskPolicy

A Task containing the RPC response.

Example
// Create client
ImagesClient imagesClient = await ImagesClient.CreateAsync();
// Initialize request argument(s)
GetIamPolicyImageRequest request = new GetIamPolicyImageRequest
{
    Resource = "",
    Project = "",
    OptionsRequestedPolicyVersion = 0,
};
// Make the request
Policy response = await imagesClient.GetIamPolicyAsync(request);

GetIamPolicyAsync(GetIamPolicyImageRequest, CancellationToken)

public virtual Task<Policy> GetIamPolicyAsync(GetIamPolicyImageRequest request, CancellationToken cancellationToken)

Gets the access control policy for a resource. May be empty if no such policy or resource exists.

Parameters
Name Description
request GetIamPolicyImageRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskPolicy

A Task containing the RPC response.

Example
// Create client
ImagesClient imagesClient = await ImagesClient.CreateAsync();
// Initialize request argument(s)
GetIamPolicyImageRequest request = new GetIamPolicyImageRequest
{
    Resource = "",
    Project = "",
    OptionsRequestedPolicyVersion = 0,
};
// Make the request
Policy response = await imagesClient.GetIamPolicyAsync(request);

GetIamPolicyAsync(string, string, CallSettings)

public virtual Task<Policy> GetIamPolicyAsync(string project, string resource, CallSettings callSettings = null)

Gets the access control policy for a resource. May be empty if no such policy or resource exists.

Parameters
Name Description
project string

Project ID for this request.

resource string

Name or id of the resource for this request.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskPolicy

A Task containing the RPC response.

Example
// Create client
ImagesClient imagesClient = await ImagesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string resource = "";
// Make the request
Policy response = await imagesClient.GetIamPolicyAsync(project, resource);

GetIamPolicyAsync(string, string, CancellationToken)

public virtual Task<Policy> GetIamPolicyAsync(string project, string resource, CancellationToken cancellationToken)

Gets the access control policy for a resource. May be empty if no such policy or resource exists.

Parameters
Name Description
project string

Project ID for this request.

resource string

Name or id of the resource for this request.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskPolicy

A Task containing the RPC response.

Example
// Create client
ImagesClient imagesClient = await ImagesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string resource = "";
// Make the request
Policy response = await imagesClient.GetIamPolicyAsync(project, resource);

Insert(InsertImageRequest, CallSettings)

public virtual Operation<Operation, Operation> Insert(InsertImageRequest request, CallSettings callSettings = null)

Creates an image in the specified project using the data included in the request.

Parameters
Name Description
request InsertImageRequest

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
OperationOperationOperation

The RPC response.

Example
// Create client
ImagesClient imagesClient = ImagesClient.Create();
// Initialize request argument(s)
InsertImageRequest request = new InsertImageRequest
{
    RequestId = "",
    ForceCreate = false,
    Project = "",
    ImageResource = new Image(),
};
// Make the request
lro::Operation<Operation, Operation> response = imagesClient.Insert(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = imagesClient.PollOnceInsert(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

Insert(string, Image, CallSettings)

public virtual Operation<Operation, Operation> Insert(string project, Image imageResource, CallSettings callSettings = null)

Creates an image in the specified project using the data included in the request.

Parameters
Name Description
project string

Project ID for this request.

imageResource Image

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The RPC response.

Example
// Create client
ImagesClient imagesClient = ImagesClient.Create();
// Initialize request argument(s)
string project = "";
Image imageResource = new Image();
// Make the request
lro::Operation<Operation, Operation> response = imagesClient.Insert(project, imageResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = imagesClient.PollOnceInsert(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

InsertAsync(InsertImageRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> InsertAsync(InsertImageRequest request, CallSettings callSettings = null)

Creates an image in the specified project using the data included in the request.

Parameters
Name Description
request InsertImageRequest

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
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ImagesClient imagesClient = await ImagesClient.CreateAsync();
// Initialize request argument(s)
InsertImageRequest request = new InsertImageRequest
{
    RequestId = "",
    ForceCreate = false,
    Project = "",
    ImageResource = new Image(),
};
// Make the request
lro::Operation<Operation, Operation> response = await imagesClient.InsertAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await imagesClient.PollOnceInsertAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

InsertAsync(InsertImageRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> InsertAsync(InsertImageRequest request, CancellationToken cancellationToken)

Creates an image in the specified project using the data included in the request.

Parameters
Name Description
request InsertImageRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ImagesClient imagesClient = await ImagesClient.CreateAsync();
// Initialize request argument(s)
InsertImageRequest request = new InsertImageRequest
{
    RequestId = "",
    ForceCreate = false,
    Project = "",
    ImageResource = new Image(),
};
// Make the request
lro::Operation<Operation, Operation> response = await imagesClient.InsertAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await imagesClient.PollOnceInsertAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

InsertAsync(string, Image, CallSettings)

public virtual Task<Operation<Operation, Operation>> InsertAsync(string project, Image imageResource, CallSettings callSettings = null)

Creates an image in the specified project using the data included in the request.

Parameters
Name Description
project string

Project ID for this request.

imageResource Image

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ImagesClient imagesClient = await ImagesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
Image imageResource = new Image();
// Make the request
lro::Operation<Operation, Operation> response = await imagesClient.InsertAsync(project, imageResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await imagesClient.PollOnceInsertAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

InsertAsync(string, Image, CancellationToken)

public virtual Task<Operation<Operation, Operation>> InsertAsync(string project, Image imageResource, CancellationToken cancellationToken)

Creates an image in the specified project using the data included in the request.

Parameters
Name Description
project string

Project ID for this request.

imageResource Image

The body resource for this request

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ImagesClient imagesClient = await ImagesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
Image imageResource = new Image();
// Make the request
lro::Operation<Operation, Operation> response = await imagesClient.InsertAsync(project, imageResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await imagesClient.PollOnceInsertAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

List(ListImagesRequest, CallSettings)

public virtual PagedEnumerable<ImageList, Image> List(ListImagesRequest request, CallSettings callSettings = null)

Retrieves the list of custom images available to the specified project. Custom images are images you create that belong to your project. This method does not get any images that belong to other projects, including publicly-available images, like Debian 8. If you want to get a list of publicly-available images, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud.

Parameters
Name Description
request ListImagesRequest

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
PagedEnumerableImageListImage

A pageable sequence of Image resources.

Example
// Create client
ImagesClient imagesClient = ImagesClient.Create();
// Initialize request argument(s)
ListImagesRequest request = new ListImagesRequest
{
    OrderBy = "",
    Project = "",
    Filter = "",
    ReturnPartialSuccess = false,
};
// Make the request
PagedEnumerable<ImageList, Image> response = imagesClient.List(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (Image 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 (ImageList page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Image 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<Image> 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 (Image 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, int?, CallSettings)

public virtual PagedEnumerable<ImageList, Image> List(string project, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Retrieves the list of custom images available to the specified project. Custom images are images you create that belong to your project. This method does not get any images that belong to other projects, including publicly-available images, like Debian 8. If you want to get a list of publicly-available images, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud.

Parameters
Name Description
project string

Project ID for this request.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableImageListImage

A pageable sequence of Image resources.

Example
// Create client
ImagesClient imagesClient = ImagesClient.Create();
// Initialize request argument(s)
string project = "";
// Make the request
PagedEnumerable<ImageList, Image> response = imagesClient.List(project);

// Iterate over all response items, lazily performing RPCs as required
foreach (Image 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 (ImageList page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Image 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<Image> 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 (Image 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(ListImagesRequest, CallSettings)

public virtual PagedAsyncEnumerable<ImageList, Image> ListAsync(ListImagesRequest request, CallSettings callSettings = null)

Retrieves the list of custom images available to the specified project. Custom images are images you create that belong to your project. This method does not get any images that belong to other projects, including publicly-available images, like Debian 8. If you want to get a list of publicly-available images, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud.

Parameters
Name Description
request ListImagesRequest

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
PagedAsyncEnumerableImageListImage

A pageable asynchronous sequence of Image resources.

Example
// Create client
ImagesClient imagesClient = await ImagesClient.CreateAsync();
// Initialize request argument(s)
ListImagesRequest request = new ListImagesRequest
{
    OrderBy = "",
    Project = "",
    Filter = "",
    ReturnPartialSuccess = false,
};
// Make the request
PagedAsyncEnumerable<ImageList, Image> response = imagesClient.ListAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Image item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ImageList page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Image 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<Image> 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 (Image 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, int?, CallSettings)

public virtual PagedAsyncEnumerable<ImageList, Image> ListAsync(string project, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Retrieves the list of custom images available to the specified project. Custom images are images you create that belong to your project. This method does not get any images that belong to other projects, including publicly-available images, like Debian 8. If you want to get a list of publicly-available images, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud.

Parameters
Name Description
project string

Project ID for this request.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableImageListImage

A pageable asynchronous sequence of Image resources.

Example
// Create client
ImagesClient imagesClient = await ImagesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
// Make the request
PagedAsyncEnumerable<ImageList, Image> response = imagesClient.ListAsync(project);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Image item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ImageList page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Image 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<Image> 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 (Image 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;

Patch(PatchImageRequest, CallSettings)

public virtual Operation<Operation, Operation> Patch(PatchImageRequest request, CallSettings callSettings = null)

Patches the specified image with the data included in the request. Only the following fields can be modified: family, description, deprecation status.

Parameters
Name Description
request PatchImageRequest

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
OperationOperationOperation

The RPC response.

Example
// Create client
ImagesClient imagesClient = ImagesClient.Create();
// Initialize request argument(s)
PatchImageRequest request = new PatchImageRequest
{
    RequestId = "",
    Image = "",
    Project = "",
    ImageResource = new Image(),
};
// Make the request
lro::Operation<Operation, Operation> response = imagesClient.Patch(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = imagesClient.PollOncePatch(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

Patch(string, string, Image, CallSettings)

public virtual Operation<Operation, Operation> Patch(string project, string image, Image imageResource, CallSettings callSettings = null)

Patches the specified image with the data included in the request. Only the following fields can be modified: family, description, deprecation status.

Parameters
Name Description
project string

Project ID for this request.

image string

Name of the image resource to patch.

imageResource Image

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The RPC response.

Example
// Create client
ImagesClient imagesClient = ImagesClient.Create();
// Initialize request argument(s)
string project = "";
string image = "";
Image imageResource = new Image();
// Make the request
lro::Operation<Operation, Operation> response = imagesClient.Patch(project, image, imageResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = imagesClient.PollOncePatch(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

PatchAsync(PatchImageRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> PatchAsync(PatchImageRequest request, CallSettings callSettings = null)

Patches the specified image with the data included in the request. Only the following fields can be modified: family, description, deprecation status.

Parameters
Name Description
request PatchImageRequest

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
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ImagesClient imagesClient = await ImagesClient.CreateAsync();
// Initialize request argument(s)
PatchImageRequest request = new PatchImageRequest
{
    RequestId = "",
    Image = "",
    Project = "",
    ImageResource = new Image(),
};
// Make the request
lro::Operation<Operation, Operation> response = await imagesClient.PatchAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await imagesClient.PollOncePatchAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

PatchAsync(PatchImageRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> PatchAsync(PatchImageRequest request, CancellationToken cancellationToken)

Patches the specified image with the data included in the request. Only the following fields can be modified: family, description, deprecation status.

Parameters
Name Description
request PatchImageRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ImagesClient imagesClient = await ImagesClient.CreateAsync();
// Initialize request argument(s)
PatchImageRequest request = new PatchImageRequest
{
    RequestId = "",
    Image = "",
    Project = "",
    ImageResource = new Image(),
};
// Make the request
lro::Operation<Operation, Operation> response = await imagesClient.PatchAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await imagesClient.PollOncePatchAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

PatchAsync(string, string, Image, CallSettings)

public virtual Task<Operation<Operation, Operation>> PatchAsync(string project, string image, Image imageResource, CallSettings callSettings = null)

Patches the specified image with the data included in the request. Only the following fields can be modified: family, description, deprecation status.

Parameters
Name Description
project string

Project ID for this request.

image string

Name of the image resource to patch.

imageResource Image

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ImagesClient imagesClient = await ImagesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string image = "";
Image imageResource = new Image();
// Make the request
lro::Operation<Operation, Operation> response = await imagesClient.PatchAsync(project, image, imageResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await imagesClient.PollOncePatchAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

PatchAsync(string, string, Image, CancellationToken)

public virtual Task<Operation<Operation, Operation>> PatchAsync(string project, string image, Image imageResource, CancellationToken cancellationToken)

Patches the specified image with the data included in the request. Only the following fields can be modified: family, description, deprecation status.

Parameters
Name Description
project string

Project ID for this request.

image string

Name of the image resource to patch.

imageResource Image

The body resource for this request

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ImagesClient imagesClient = await ImagesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string image = "";
Image imageResource = new Image();
// Make the request
lro::Operation<Operation, Operation> response = await imagesClient.PatchAsync(project, image, imageResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await imagesClient.PollOncePatchAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

PollOnceDelete(string, CallSettings)

public virtual Operation<Operation, Operation> PollOnceDelete(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of Delete.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The result of polling the operation.

PollOnceDeleteAsync(string, CallSettings)

public virtual Task<Operation<Operation, Operation>> PollOnceDeleteAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of Delete .

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A task representing the result of polling the operation.

PollOnceDeprecate(string, CallSettings)

public virtual Operation<Operation, Operation> PollOnceDeprecate(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of Deprecate.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The result of polling the operation.

PollOnceDeprecateAsync(string, CallSettings)

public virtual Task<Operation<Operation, Operation>> PollOnceDeprecateAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of Deprecate.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A task representing the result of polling the operation.

PollOnceInsert(string, CallSettings)

public virtual Operation<Operation, Operation> PollOnceInsert(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of Insert.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The result of polling the operation.

PollOnceInsertAsync(string, CallSettings)

public virtual Task<Operation<Operation, Operation>> PollOnceInsertAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of Insert .

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A task representing the result of polling the operation.

PollOncePatch(string, CallSettings)

public virtual Operation<Operation, Operation> PollOncePatch(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of Patch.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The result of polling the operation.

PollOncePatchAsync(string, CallSettings)

public virtual Task<Operation<Operation, Operation>> PollOncePatchAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of Patch .

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A task representing the result of polling the operation.

PollOnceSetLabels(string, CallSettings)

public virtual Operation<Operation, Operation> PollOnceSetLabels(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of SetLabels.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The result of polling the operation.

PollOnceSetLabelsAsync(string, CallSettings)

public virtual Task<Operation<Operation, Operation>> PollOnceSetLabelsAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of SetLabels.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A task representing the result of polling the operation.

SetIamPolicy(SetIamPolicyImageRequest, CallSettings)

public virtual Policy SetIamPolicy(SetIamPolicyImageRequest request, CallSettings callSettings = null)

Sets the access control policy on the specified resource. Replaces any existing policy.

Parameters
Name Description
request SetIamPolicyImageRequest

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
Policy

The RPC response.

Example
// Create client
ImagesClient imagesClient = ImagesClient.Create();
// Initialize request argument(s)
SetIamPolicyImageRequest request = new SetIamPolicyImageRequest
{
    Resource = "",
    Project = "",
    GlobalSetPolicyRequestResource = new GlobalSetPolicyRequest(),
};
// Make the request
Policy response = imagesClient.SetIamPolicy(request);

SetIamPolicy(string, string, GlobalSetPolicyRequest, CallSettings)

public virtual Policy SetIamPolicy(string project, string resource, GlobalSetPolicyRequest globalSetPolicyRequestResource, CallSettings callSettings = null)

Sets the access control policy on the specified resource. Replaces any existing policy.

Parameters
Name Description
project string

Project ID for this request.

resource string

Name or id of the resource for this request.

globalSetPolicyRequestResource GlobalSetPolicyRequest

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Policy

The RPC response.

Example
// Create client
ImagesClient imagesClient = ImagesClient.Create();
// Initialize request argument(s)
string project = "";
string resource = "";
GlobalSetPolicyRequest globalSetPolicyRequestResource = new GlobalSetPolicyRequest();
// Make the request
Policy response = imagesClient.SetIamPolicy(project, resource, globalSetPolicyRequestResource);

SetIamPolicyAsync(SetIamPolicyImageRequest, CallSettings)

public virtual Task<Policy> SetIamPolicyAsync(SetIamPolicyImageRequest request, CallSettings callSettings = null)

Sets the access control policy on the specified resource. Replaces any existing policy.

Parameters
Name Description
request SetIamPolicyImageRequest

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
TaskPolicy

A Task containing the RPC response.

Example
// Create client
ImagesClient imagesClient = await ImagesClient.CreateAsync();
// Initialize request argument(s)
SetIamPolicyImageRequest request = new SetIamPolicyImageRequest
{
    Resource = "",
    Project = "",
    GlobalSetPolicyRequestResource = new GlobalSetPolicyRequest(),
};
// Make the request
Policy response = await imagesClient.SetIamPolicyAsync(request);

SetIamPolicyAsync(SetIamPolicyImageRequest, CancellationToken)

public virtual Task<Policy> SetIamPolicyAsync(SetIamPolicyImageRequest request, CancellationToken cancellationToken)

Sets the access control policy on the specified resource. Replaces any existing policy.

Parameters
Name Description
request SetIamPolicyImageRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskPolicy

A Task containing the RPC response.

Example
// Create client
ImagesClient imagesClient = await ImagesClient.CreateAsync();
// Initialize request argument(s)
SetIamPolicyImageRequest request = new SetIamPolicyImageRequest
{
    Resource = "",
    Project = "",
    GlobalSetPolicyRequestResource = new GlobalSetPolicyRequest(),
};
// Make the request
Policy response = await imagesClient.SetIamPolicyAsync(request);

SetIamPolicyAsync(string, string, GlobalSetPolicyRequest, CallSettings)

public virtual Task<Policy> SetIamPolicyAsync(string project, string resource, GlobalSetPolicyRequest globalSetPolicyRequestResource, CallSettings callSettings = null)

Sets the access control policy on the specified resource. Replaces any existing policy.

Parameters
Name Description
project string

Project ID for this request.

resource string

Name or id of the resource for this request.

globalSetPolicyRequestResource GlobalSetPolicyRequest

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskPolicy

A Task containing the RPC response.

Example
// Create client
ImagesClient imagesClient = await ImagesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string resource = "";
GlobalSetPolicyRequest globalSetPolicyRequestResource = new GlobalSetPolicyRequest();
// Make the request
Policy response = await imagesClient.SetIamPolicyAsync(project, resource, globalSetPolicyRequestResource);

SetIamPolicyAsync(string, string, GlobalSetPolicyRequest, CancellationToken)

public virtual Task<Policy> SetIamPolicyAsync(string project, string resource, GlobalSetPolicyRequest globalSetPolicyRequestResource, CancellationToken cancellationToken)

Sets the access control policy on the specified resource. Replaces any existing policy.

Parameters
Name Description
project string

Project ID for this request.

resource string

Name or id of the resource for this request.

globalSetPolicyRequestResource GlobalSetPolicyRequest

The body resource for this request

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskPolicy

A Task containing the RPC response.

Example
// Create client
ImagesClient imagesClient = await ImagesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string resource = "";
GlobalSetPolicyRequest globalSetPolicyRequestResource = new GlobalSetPolicyRequest();
// Make the request
Policy response = await imagesClient.SetIamPolicyAsync(project, resource, globalSetPolicyRequestResource);

SetLabels(SetLabelsImageRequest, CallSettings)

public virtual Operation<Operation, Operation> SetLabels(SetLabelsImageRequest request, CallSettings callSettings = null)

Sets the labels on an image. To learn more about labels, read the Labeling Resources documentation.

Parameters
Name Description
request SetLabelsImageRequest

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
OperationOperationOperation

The RPC response.

Example
// Create client
ImagesClient imagesClient = ImagesClient.Create();
// Initialize request argument(s)
SetLabelsImageRequest request = new SetLabelsImageRequest
{
    Resource = "",
    Project = "",
    GlobalSetLabelsRequestResource = new GlobalSetLabelsRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = imagesClient.SetLabels(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = imagesClient.PollOnceSetLabels(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

SetLabels(string, string, GlobalSetLabelsRequest, CallSettings)

public virtual Operation<Operation, Operation> SetLabels(string project, string resource, GlobalSetLabelsRequest globalSetLabelsRequestResource, CallSettings callSettings = null)

Sets the labels on an image. To learn more about labels, read the Labeling Resources documentation.

Parameters
Name Description
project string

Project ID for this request.

resource string

Name or id of the resource for this request.

globalSetLabelsRequestResource GlobalSetLabelsRequest

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The RPC response.

Example
// Create client
ImagesClient imagesClient = ImagesClient.Create();
// Initialize request argument(s)
string project = "";
string resource = "";
GlobalSetLabelsRequest globalSetLabelsRequestResource = new GlobalSetLabelsRequest();
// Make the request
lro::Operation<Operation, Operation> response = imagesClient.SetLabels(project, resource, globalSetLabelsRequestResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = imagesClient.PollOnceSetLabels(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

SetLabelsAsync(SetLabelsImageRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> SetLabelsAsync(SetLabelsImageRequest request, CallSettings callSettings = null)

Sets the labels on an image. To learn more about labels, read the Labeling Resources documentation.

Parameters
Name Description
request SetLabelsImageRequest

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
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ImagesClient imagesClient = await ImagesClient.CreateAsync();
// Initialize request argument(s)
SetLabelsImageRequest request = new SetLabelsImageRequest
{
    Resource = "",
    Project = "",
    GlobalSetLabelsRequestResource = new GlobalSetLabelsRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = await imagesClient.SetLabelsAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await imagesClient.PollOnceSetLabelsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

SetLabelsAsync(SetLabelsImageRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> SetLabelsAsync(SetLabelsImageRequest request, CancellationToken cancellationToken)

Sets the labels on an image. To learn more about labels, read the Labeling Resources documentation.

Parameters
Name Description
request SetLabelsImageRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ImagesClient imagesClient = await ImagesClient.CreateAsync();
// Initialize request argument(s)
SetLabelsImageRequest request = new SetLabelsImageRequest
{
    Resource = "",
    Project = "",
    GlobalSetLabelsRequestResource = new GlobalSetLabelsRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = await imagesClient.SetLabelsAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await imagesClient.PollOnceSetLabelsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

SetLabelsAsync(string, string, GlobalSetLabelsRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> SetLabelsAsync(string project, string resource, GlobalSetLabelsRequest globalSetLabelsRequestResource, CallSettings callSettings = null)

Sets the labels on an image. To learn more about labels, read the Labeling Resources documentation.

Parameters
Name Description
project string

Project ID for this request.

resource string

Name or id of the resource for this request.

globalSetLabelsRequestResource GlobalSetLabelsRequest

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ImagesClient imagesClient = await ImagesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string resource = "";
GlobalSetLabelsRequest globalSetLabelsRequestResource = new GlobalSetLabelsRequest();
// Make the request
lro::Operation<Operation, Operation> response = await imagesClient.SetLabelsAsync(project, resource, globalSetLabelsRequestResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await imagesClient.PollOnceSetLabelsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

SetLabelsAsync(string, string, GlobalSetLabelsRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> SetLabelsAsync(string project, string resource, GlobalSetLabelsRequest globalSetLabelsRequestResource, CancellationToken cancellationToken)

Sets the labels on an image. To learn more about labels, read the Labeling Resources documentation.

Parameters
Name Description
project string

Project ID for this request.

resource string

Name or id of the resource for this request.

globalSetLabelsRequestResource GlobalSetLabelsRequest

The body resource for this request

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ImagesClient imagesClient = await ImagesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string resource = "";
GlobalSetLabelsRequest globalSetLabelsRequestResource = new GlobalSetLabelsRequest();
// Make the request
lro::Operation<Operation, Operation> response = await imagesClient.SetLabelsAsync(project, resource, globalSetLabelsRequestResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await imagesClient.PollOnceSetLabelsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

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.

TestIamPermissions(TestIamPermissionsImageRequest, CallSettings)

public virtual TestPermissionsResponse TestIamPermissions(TestIamPermissionsImageRequest request, CallSettings callSettings = null)

Returns permissions that a caller has on the specified resource.

Parameters
Name Description
request TestIamPermissionsImageRequest

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
TestPermissionsResponse

The RPC response.

Example
// Create client
ImagesClient imagesClient = ImagesClient.Create();
// Initialize request argument(s)
TestIamPermissionsImageRequest request = new TestIamPermissionsImageRequest
{
    Resource = "",
    Project = "",
    TestPermissionsRequestResource = new TestPermissionsRequest(),
};
// Make the request
TestPermissionsResponse response = imagesClient.TestIamPermissions(request);

TestIamPermissions(string, string, TestPermissionsRequest, CallSettings)

public virtual TestPermissionsResponse TestIamPermissions(string project, string resource, TestPermissionsRequest testPermissionsRequestResource, CallSettings callSettings = null)

Returns permissions that a caller has on the specified resource.

Parameters
Name Description
project string

Project ID for this request.

resource string

Name or id of the resource for this request.

testPermissionsRequestResource TestPermissionsRequest

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TestPermissionsResponse

The RPC response.

Example
// Create client
ImagesClient imagesClient = ImagesClient.Create();
// Initialize request argument(s)
string project = "";
string resource = "";
TestPermissionsRequest testPermissionsRequestResource = new TestPermissionsRequest();
// Make the request
TestPermissionsResponse response = imagesClient.TestIamPermissions(project, resource, testPermissionsRequestResource);

TestIamPermissionsAsync(TestIamPermissionsImageRequest, CallSettings)

public virtual Task<TestPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsImageRequest request, CallSettings callSettings = null)

Returns permissions that a caller has on the specified resource.

Parameters
Name Description
request TestIamPermissionsImageRequest

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
TaskTestPermissionsResponse

A Task containing the RPC response.

Example
// Create client
ImagesClient imagesClient = await ImagesClient.CreateAsync();
// Initialize request argument(s)
TestIamPermissionsImageRequest request = new TestIamPermissionsImageRequest
{
    Resource = "",
    Project = "",
    TestPermissionsRequestResource = new TestPermissionsRequest(),
};
// Make the request
TestPermissionsResponse response = await imagesClient.TestIamPermissionsAsync(request);

TestIamPermissionsAsync(TestIamPermissionsImageRequest, CancellationToken)

public virtual Task<TestPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsImageRequest request, CancellationToken cancellationToken)

Returns permissions that a caller has on the specified resource.

Parameters
Name Description
request TestIamPermissionsImageRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskTestPermissionsResponse

A Task containing the RPC response.

Example
// Create client
ImagesClient imagesClient = await ImagesClient.CreateAsync();
// Initialize request argument(s)
TestIamPermissionsImageRequest request = new TestIamPermissionsImageRequest
{
    Resource = "",
    Project = "",
    TestPermissionsRequestResource = new TestPermissionsRequest(),
};
// Make the request
TestPermissionsResponse response = await imagesClient.TestIamPermissionsAsync(request);

TestIamPermissionsAsync(string, string, TestPermissionsRequest, CallSettings)

public virtual Task<TestPermissionsResponse> TestIamPermissionsAsync(string project, string resource, TestPermissionsRequest testPermissionsRequestResource, CallSettings callSettings = null)

Returns permissions that a caller has on the specified resource.

Parameters
Name Description
project string

Project ID for this request.

resource string

Name or id of the resource for this request.

testPermissionsRequestResource TestPermissionsRequest

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskTestPermissionsResponse

A Task containing the RPC response.

Example
// Create client
ImagesClient imagesClient = await ImagesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string resource = "";
TestPermissionsRequest testPermissionsRequestResource = new TestPermissionsRequest();
// Make the request
TestPermissionsResponse response = await imagesClient.TestIamPermissionsAsync(project, resource, testPermissionsRequestResource);

TestIamPermissionsAsync(string, string, TestPermissionsRequest, CancellationToken)

public virtual Task<TestPermissionsResponse> TestIamPermissionsAsync(string project, string resource, TestPermissionsRequest testPermissionsRequestResource, CancellationToken cancellationToken)

Returns permissions that a caller has on the specified resource.

Parameters
Name Description
project string

Project ID for this request.

resource string

Name or id of the resource for this request.

testPermissionsRequestResource TestPermissionsRequest

The body resource for this request

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskTestPermissionsResponse

A Task containing the RPC response.

Example
// Create client
ImagesClient imagesClient = await ImagesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string resource = "";
TestPermissionsRequest testPermissionsRequestResource = new TestPermissionsRequest();
// Make the request
TestPermissionsResponse response = await imagesClient.TestIamPermissionsAsync(project, resource, testPermissionsRequestResource);