Class ImagesClient (1.0.0)

public abstract 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
TypeDescription
String

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default Images scopes.

Property Value
TypeDescription
IReadOnlyList<String>
Remarks

DeleteOperationsClient

public virtual OperationsClient DeleteOperationsClient { get; }

The long-running operations client for Delete.

Property Value
TypeDescription
OperationsClient

DeprecateOperationsClient

public virtual OperationsClient DeprecateOperationsClient { get; }

The long-running operations client for Deprecate.

Property Value
TypeDescription
OperationsClient

GrpcClient

public virtual Images.ImagesClient GrpcClient { get; }

The underlying gRPC Images client

Property Value
TypeDescription
Images.ImagesClient

InsertOperationsClient

public virtual OperationsClient InsertOperationsClient { get; }

The long-running operations client for Insert.

Property Value
TypeDescription
OperationsClient

PatchOperationsClient

public virtual OperationsClient PatchOperationsClient { get; }

The long-running operations client for Patch.

Property Value
TypeDescription
OperationsClient

SetLabelsOperationsClient

public virtual OperationsClient SetLabelsOperationsClient { get; }

The long-running operations client for SetLabels.

Property Value
TypeDescription
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
TypeDescription
ImagesClient

The created ImagesClient.

CreateAsync(CancellationToken)

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

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

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
Task<ImagesClient>

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
NameDescription
requestDeleteImageRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
projectString

Project ID for this request.

imageString

Name of the image resource to delete.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
requestDeleteImageRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
requestDeleteImageRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
projectString

Project ID for this request.

imageString

Name of the image resource to delete.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
projectString

Project ID for this request.

imageString

Name of the image resource to delete.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
requestDeprecateImageRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
projectString

Project ID for this request.

imageString

Image name.

deprecationStatusResourceDeprecationStatus

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
requestDeprecateImageRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
requestDeprecateImageRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
projectString

Project ID for this request.

imageString

Image name.

deprecationStatusResourceDeprecationStatus

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
projectString

Project ID for this request.

imageString

Image name.

deprecationStatusResourceDeprecationStatus

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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. Gets a list of available images by making a list() request.

Parameters
NameDescription
requestGetImageRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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. Gets a list of available images by making a list() request.

Parameters
NameDescription
projectString

Project ID for this request.

imageString

Name of the image resource to return.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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. Gets a list of available images by making a list() request.

Parameters
NameDescription
requestGetImageRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Image>

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. Gets a list of available images by making a list() request.

Parameters
NameDescription
requestGetImageRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Image>

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. Gets a list of available images by making a list() request.

Parameters
NameDescription
projectString

Project ID for this request.

imageString

Name of the image resource to return.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Image>

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. Gets a list of available images by making a list() request.

Parameters
NameDescription
projectString

Project ID for this request.

imageString

Name of the image resource to return.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Image>

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.

Parameters
NameDescription
requestGetFromFamilyImageRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

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

Parameters
NameDescription
projectString

Project ID for this request.

familyString

Name of the image family to search for.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

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

Parameters
NameDescription
requestGetFromFamilyImageRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Image>

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.

Parameters
NameDescription
requestGetFromFamilyImageRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Image>

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.

Parameters
NameDescription
projectString

Project ID for this request.

familyString

Name of the image family to search for.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Image>

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.

Parameters
NameDescription
projectString

Project ID for this request.

familyString

Name of the image family to search for.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Image>

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
NameDescription
requestGetIamPolicyImageRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

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

Project ID for this request.

resourceString

Name or id of the resource for this request.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

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

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Policy>

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
NameDescription
requestGetIamPolicyImageRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Policy>

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
NameDescription
projectString

Project ID for this request.

resourceString

Name or id of the resource for this request.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Policy>

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
NameDescription
projectString

Project ID for this request.

resourceString

Name or id of the resource for this request.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Policy>

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
NameDescription
requestInsertImageRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
projectString

Project ID for this request.

imageResourceImage

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
requestInsertImageRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
requestInsertImageRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
projectString

Project ID for this request.

imageResourceImage

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
projectString

Project ID for this request.

imageResourceImage

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
requestListImagesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ImageList, Image>

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, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ImageList, Image> List(string project, string pageToken = null, int? pageSize = default(int? ), 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
NameDescription
projectString

Project ID for this request.

pageTokenString

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

pageSizeNullable<Int32>

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ImageList, Image>

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
NameDescription
requestListImagesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ImageList, Image>

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, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ImageList, Image> ListAsync(string project, string pageToken = null, int? pageSize = default(int? ), 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
NameDescription
projectString

Project ID for this request.

pageTokenString

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

pageSizeNullable<Int32>

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ImageList, Image>

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
NameDescription
requestPatchImageRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
projectString

Project ID for this request.

imageString

Name of the image resource to patch.

imageResourceImage

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
requestPatchImageRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
requestPatchImageRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
projectString

Project ID for this request.

imageString

Name of the image resource to patch.

imageResourceImage

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
projectString

Project ID for this request.

imageString

Name of the image resource to patch.

imageResourceImage

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
requestSetIamPolicyImageRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

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

Project ID for this request.

resourceString

Name or id of the resource for this request.

globalSetPolicyRequestResourceGlobalSetPolicyRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

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

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Policy>

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
NameDescription
requestSetIamPolicyImageRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Policy>

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
NameDescription
projectString

Project ID for this request.

resourceString

Name or id of the resource for this request.

globalSetPolicyRequestResourceGlobalSetPolicyRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Policy>

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
NameDescription
projectString

Project ID for this request.

resourceString

Name or id of the resource for this request.

globalSetPolicyRequestResourceGlobalSetPolicyRequest

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Policy>

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
NameDescription
requestSetLabelsImageRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
projectString

Project ID for this request.

resourceString

Name or id of the resource for this request.

globalSetLabelsRequestResourceGlobalSetLabelsRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
requestSetLabelsImageRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
requestSetLabelsImageRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
projectString

Project ID for this request.

resourceString

Name or id of the resource for this request.

globalSetLabelsRequestResourceGlobalSetLabelsRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
projectString

Project ID for this request.

resourceString

Name or id of the resource for this request.

globalSetLabelsRequestResourceGlobalSetLabelsRequest

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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

A task representing the asynchronous shutdown operation.

Remarks

After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.

TestIamPermissions(TestIamPermissionsImageRequest, CallSettings)

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

Returns permissions that a caller has on the specified resource.

Parameters
NameDescription
requestTestIamPermissionsImageRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

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

Project ID for this request.

resourceString

Name or id of the resource for this request.

testPermissionsRequestResourceTestPermissionsRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

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

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<TestPermissionsResponse>

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
NameDescription
requestTestIamPermissionsImageRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<TestPermissionsResponse>

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
NameDescription
projectString

Project ID for this request.

resourceString

Name or id of the resource for this request.

testPermissionsRequestResourceTestPermissionsRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<TestPermissionsResponse>

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
NameDescription
projectString

Project ID for this request.

resourceString

Name or id of the resource for this request.

testPermissionsRequestResourceTestPermissionsRequest

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<TestPermissionsResponse>

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);