Compute Engine v1 API - Class RegionSnapshotsClient (3.27.0)

public abstract class RegionSnapshotsClient

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

RegionSnapshots client wrapper, for convenient use.

Inheritance

object > RegionSnapshotsClient

Namespace

Google.Cloud.Compute.V1

Assembly

Google.Cloud.Compute.V1.dll

Remarks

The RegionSnapshots API.

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

The default endpoint for the RegionSnapshots service, which is a host of "compute.googleapis.com" and a port of 443.

Property Value
Type Description
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default RegionSnapshots scopes.

Property Value
Type Description
IReadOnlyListstring
Remarks

DeleteOperationsClient

public virtual OperationsClient DeleteOperationsClient { get; }

The long-running operations client for Delete.

Property Value
Type Description
OperationsClient

GrpcClient

public virtual RegionSnapshots.RegionSnapshotsClient GrpcClient { get; }

The underlying gRPC RegionSnapshots client

Property Value
Type Description
RegionSnapshotsRegionSnapshotsClient

InsertOperationsClient

public virtual OperationsClient InsertOperationsClient { get; }

The long-running operations client for Insert.

Property Value
Type Description
OperationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
Type Description
ServiceMetadata

SetLabelsOperationsClient

public virtual OperationsClient SetLabelsOperationsClient { get; }

The long-running operations client for SetLabels.

Property Value
Type Description
OperationsClient

UpdateKmsKeyOperationsClient

public virtual OperationsClient UpdateKmsKeyOperationsClient { get; }

The long-running operations client for UpdateKmsKey.

Property Value
Type Description
OperationsClient

Methods

Create()

public static RegionSnapshotsClient Create()

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

Returns
Type Description
RegionSnapshotsClient

The created RegionSnapshotsClient.

CreateAsync(CancellationToken)

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

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

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskRegionSnapshotsClient

The task representing the created RegionSnapshotsClient.

Delete(DeleteRegionSnapshotRequest, CallSettings)

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

Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot.

For more information, seeDeleting snapshots.

Parameters
Name Description
request DeleteRegionSnapshotRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The RPC response.

Example
// Create client
RegionSnapshotsClient regionSnapshotsClient = RegionSnapshotsClient.Create();
// Initialize request argument(s)
DeleteRegionSnapshotRequest request = new DeleteRegionSnapshotRequest
{
    RequestId = "",
    Region = "",
    Project = "",
    Snapshot = "",
};
// Make the request
lro::Operation<Operation, Operation> response = regionSnapshotsClient.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 = regionSnapshotsClient.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, string, CallSettings)

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

Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot.

For more information, seeDeleting snapshots.

Parameters
Name Description
project string

Project ID for this request.

region string

The name of the region for this request.

snapshot string

Name of the snapshot resource to delete.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The RPC response.

Example
// Create client
RegionSnapshotsClient regionSnapshotsClient = RegionSnapshotsClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
string snapshot = "";
// Make the request
lro::Operation<Operation, Operation> response = regionSnapshotsClient.Delete(project, region, snapshot);

// 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 = regionSnapshotsClient.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(DeleteRegionSnapshotRequest, CallSettings)

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

Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot.

For more information, seeDeleting snapshots.

Parameters
Name Description
request DeleteRegionSnapshotRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
RegionSnapshotsClient regionSnapshotsClient = await RegionSnapshotsClient.CreateAsync();
// Initialize request argument(s)
DeleteRegionSnapshotRequest request = new DeleteRegionSnapshotRequest
{
    RequestId = "",
    Region = "",
    Project = "",
    Snapshot = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await regionSnapshotsClient.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 regionSnapshotsClient.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(DeleteRegionSnapshotRequest, CancellationToken)

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

Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot.

For more information, seeDeleting snapshots.

Parameters
Name Description
request DeleteRegionSnapshotRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
RegionSnapshotsClient regionSnapshotsClient = await RegionSnapshotsClient.CreateAsync();
// Initialize request argument(s)
DeleteRegionSnapshotRequest request = new DeleteRegionSnapshotRequest
{
    RequestId = "",
    Region = "",
    Project = "",
    Snapshot = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await regionSnapshotsClient.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 regionSnapshotsClient.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, string, CallSettings)

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

Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot.

For more information, seeDeleting snapshots.

Parameters
Name Description
project string

Project ID for this request.

region string

The name of the region for this request.

snapshot string

Name of the snapshot resource to delete.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

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

// 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 regionSnapshotsClient.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, string, CancellationToken)

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

Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot.

For more information, seeDeleting snapshots.

Parameters
Name Description
project string

Project ID for this request.

region string

The name of the region for this request.

snapshot string

Name of the snapshot resource to delete.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

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

// 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 regionSnapshotsClient.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;
}

Get(GetRegionSnapshotRequest, CallSettings)

public virtual Snapshot Get(GetRegionSnapshotRequest request, CallSettings callSettings = null)

Returns the specified Snapshot resource.

Parameters
Name Description
request GetRegionSnapshotRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Snapshot

The RPC response.

Example
// Create client
RegionSnapshotsClient regionSnapshotsClient = RegionSnapshotsClient.Create();
// Initialize request argument(s)
GetRegionSnapshotRequest request = new GetRegionSnapshotRequest
{
    Region = "",
    Project = "",
    Snapshot = "",
};
// Make the request
Snapshot response = regionSnapshotsClient.Get(request);

Get(string, string, string, CallSettings)

public virtual Snapshot Get(string project, string region, string snapshot, CallSettings callSettings = null)

Returns the specified Snapshot resource.

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region for this request.

snapshot string

Name of the Snapshot resource to return.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Snapshot

The RPC response.

Example
// Create client
RegionSnapshotsClient regionSnapshotsClient = RegionSnapshotsClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
string snapshot = "";
// Make the request
Snapshot response = regionSnapshotsClient.Get(project, region, snapshot);

GetAsync(GetRegionSnapshotRequest, CallSettings)

public virtual Task<Snapshot> GetAsync(GetRegionSnapshotRequest request, CallSettings callSettings = null)

Returns the specified Snapshot resource.

Parameters
Name Description
request GetRegionSnapshotRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskSnapshot

A Task containing the RPC response.

Example
// Create client
RegionSnapshotsClient regionSnapshotsClient = await RegionSnapshotsClient.CreateAsync();
// Initialize request argument(s)
GetRegionSnapshotRequest request = new GetRegionSnapshotRequest
{
    Region = "",
    Project = "",
    Snapshot = "",
};
// Make the request
Snapshot response = await regionSnapshotsClient.GetAsync(request);

GetAsync(GetRegionSnapshotRequest, CancellationToken)

public virtual Task<Snapshot> GetAsync(GetRegionSnapshotRequest request, CancellationToken cancellationToken)

Returns the specified Snapshot resource.

Parameters
Name Description
request GetRegionSnapshotRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSnapshot

A Task containing the RPC response.

Example
// Create client
RegionSnapshotsClient regionSnapshotsClient = await RegionSnapshotsClient.CreateAsync();
// Initialize request argument(s)
GetRegionSnapshotRequest request = new GetRegionSnapshotRequest
{
    Region = "",
    Project = "",
    Snapshot = "",
};
// Make the request
Snapshot response = await regionSnapshotsClient.GetAsync(request);

GetAsync(string, string, string, CallSettings)

public virtual Task<Snapshot> GetAsync(string project, string region, string snapshot, CallSettings callSettings = null)

Returns the specified Snapshot resource.

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region for this request.

snapshot string

Name of the Snapshot resource to return.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskSnapshot

A Task containing the RPC response.

Example
// Create client
RegionSnapshotsClient regionSnapshotsClient = await RegionSnapshotsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string snapshot = "";
// Make the request
Snapshot response = await regionSnapshotsClient.GetAsync(project, region, snapshot);

GetAsync(string, string, string, CancellationToken)

public virtual Task<Snapshot> GetAsync(string project, string region, string snapshot, CancellationToken cancellationToken)

Returns the specified Snapshot resource.

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region for this request.

snapshot string

Name of the Snapshot resource to return.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSnapshot

A Task containing the RPC response.

Example
// Create client
RegionSnapshotsClient regionSnapshotsClient = await RegionSnapshotsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string snapshot = "";
// Make the request
Snapshot response = await regionSnapshotsClient.GetAsync(project, region, snapshot);

GetIamPolicy(GetIamPolicyRegionSnapshotRequest, CallSettings)

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

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

Parameters
Name Description
request GetIamPolicyRegionSnapshotRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Policy

The RPC response.

Example
// Create client
RegionSnapshotsClient regionSnapshotsClient = RegionSnapshotsClient.Create();
// Initialize request argument(s)
GetIamPolicyRegionSnapshotRequest request = new GetIamPolicyRegionSnapshotRequest
{
    Region = "",
    Resource = "",
    Project = "",
    OptionsRequestedPolicyVersion = 0,
};
// Make the request
Policy response = regionSnapshotsClient.GetIamPolicy(request);

GetIamPolicy(string, string, string, CallSettings)

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

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

Parameters
Name Description
project string

Project ID for this request.

region string

The name of the region for this request.

resource string

Name or id of the resource for this request.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Policy

The RPC response.

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

GetIamPolicyAsync(GetIamPolicyRegionSnapshotRequest, CallSettings)

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

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

Parameters
Name Description
request GetIamPolicyRegionSnapshotRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskPolicy

A Task containing the RPC response.

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

GetIamPolicyAsync(GetIamPolicyRegionSnapshotRequest, CancellationToken)

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

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

Parameters
Name Description
request GetIamPolicyRegionSnapshotRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskPolicy

A Task containing the RPC response.

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

GetIamPolicyAsync(string, string, string, CallSettings)

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

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

Parameters
Name Description
project string

Project ID for this request.

region string

The name of the region for this request.

resource string

Name or id of the resource for this request.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskPolicy

A Task containing the RPC response.

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

GetIamPolicyAsync(string, string, string, CancellationToken)

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

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

Parameters
Name Description
project string

Project ID for this request.

region string

The name of the region for this request.

resource string

Name or id of the resource for this request.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskPolicy

A Task containing the RPC response.

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

Insert(InsertRegionSnapshotRequest, CallSettings)

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

Creates a snapshot in the specified region using the data included in the request.

Parameters
Name Description
request InsertRegionSnapshotRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The RPC response.

Example
// Create client
RegionSnapshotsClient regionSnapshotsClient = RegionSnapshotsClient.Create();
// Initialize request argument(s)
InsertRegionSnapshotRequest request = new InsertRegionSnapshotRequest
{
    RequestId = "",
    Region = "",
    Project = "",
    SnapshotResource = new Snapshot(),
};
// Make the request
lro::Operation<Operation, Operation> response = regionSnapshotsClient.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 = regionSnapshotsClient.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, string, Snapshot, CallSettings)

public virtual Operation<Operation, Operation> Insert(string project, string region, Snapshot snapshotResource, CallSettings callSettings = null)

Creates a snapshot in the specified region using the data included in the request.

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region for this request.

snapshotResource Snapshot

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The RPC response.

Example
// Create client
RegionSnapshotsClient regionSnapshotsClient = RegionSnapshotsClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
Snapshot snapshotResource = new Snapshot();
// Make the request
lro::Operation<Operation, Operation> response = regionSnapshotsClient.Insert(project, region, snapshotResource);

// 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 = regionSnapshotsClient.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(InsertRegionSnapshotRequest, CallSettings)

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

Creates a snapshot in the specified region using the data included in the request.

Parameters
Name Description
request InsertRegionSnapshotRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
RegionSnapshotsClient regionSnapshotsClient = await RegionSnapshotsClient.CreateAsync();
// Initialize request argument(s)
InsertRegionSnapshotRequest request = new InsertRegionSnapshotRequest
{
    RequestId = "",
    Region = "",
    Project = "",
    SnapshotResource = new Snapshot(),
};
// Make the request
lro::Operation<Operation, Operation> response = await regionSnapshotsClient.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 regionSnapshotsClient.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(InsertRegionSnapshotRequest, CancellationToken)

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

Creates a snapshot in the specified region using the data included in the request.

Parameters
Name Description
request InsertRegionSnapshotRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
RegionSnapshotsClient regionSnapshotsClient = await RegionSnapshotsClient.CreateAsync();
// Initialize request argument(s)
InsertRegionSnapshotRequest request = new InsertRegionSnapshotRequest
{
    RequestId = "",
    Region = "",
    Project = "",
    SnapshotResource = new Snapshot(),
};
// Make the request
lro::Operation<Operation, Operation> response = await regionSnapshotsClient.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 regionSnapshotsClient.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, string, Snapshot, CallSettings)

public virtual Task<Operation<Operation, Operation>> InsertAsync(string project, string region, Snapshot snapshotResource, CallSettings callSettings = null)

Creates a snapshot in the specified region using the data included in the request.

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region for this request.

snapshotResource Snapshot

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
RegionSnapshotsClient regionSnapshotsClient = await RegionSnapshotsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
Snapshot snapshotResource = new Snapshot();
// Make the request
lro::Operation<Operation, Operation> response = await regionSnapshotsClient.InsertAsync(project, region, snapshotResource);

// 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 regionSnapshotsClient.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, string, Snapshot, CancellationToken)

public virtual Task<Operation<Operation, Operation>> InsertAsync(string project, string region, Snapshot snapshotResource, CancellationToken cancellationToken)

Creates a snapshot in the specified region using the data included in the request.

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region for this request.

snapshotResource Snapshot

The body resource for this request

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
RegionSnapshotsClient regionSnapshotsClient = await RegionSnapshotsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
Snapshot snapshotResource = new Snapshot();
// Make the request
lro::Operation<Operation, Operation> response = await regionSnapshotsClient.InsertAsync(project, region, snapshotResource);

// 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 regionSnapshotsClient.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(ListRegionSnapshotsRequest, CallSettings)

public virtual PagedEnumerable<SnapshotList, Snapshot> List(ListRegionSnapshotsRequest request, CallSettings callSettings = null)

Retrieves the list of Snapshot resources contained within the specified region.

Parameters
Name Description
request ListRegionSnapshotsRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableSnapshotListSnapshot

A pageable sequence of Snapshot resources.

Example
// Create client
RegionSnapshotsClient regionSnapshotsClient = RegionSnapshotsClient.Create();
// Initialize request argument(s)
ListRegionSnapshotsRequest request = new ListRegionSnapshotsRequest
{
    Region = "",
    OrderBy = "",
    Project = "",
    Filter = "",
    ReturnPartialSuccess = false,
};
// Make the request
PagedEnumerable<SnapshotList, Snapshot> response = regionSnapshotsClient.List(request);

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

public virtual PagedEnumerable<SnapshotList, Snapshot> List(string project, string region, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Retrieves the list of Snapshot resources contained within the specified region.

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region for this request.

pageToken string

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

pageSize int

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableSnapshotListSnapshot

A pageable sequence of Snapshot resources.

Example
// Create client
RegionSnapshotsClient regionSnapshotsClient = RegionSnapshotsClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
// Make the request
PagedEnumerable<SnapshotList, Snapshot> response = regionSnapshotsClient.List(project, region);

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

public virtual PagedAsyncEnumerable<SnapshotList, Snapshot> ListAsync(ListRegionSnapshotsRequest request, CallSettings callSettings = null)

Retrieves the list of Snapshot resources contained within the specified region.

Parameters
Name Description
request ListRegionSnapshotsRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableSnapshotListSnapshot

A pageable asynchronous sequence of Snapshot resources.

Example
// Create client
RegionSnapshotsClient regionSnapshotsClient = await RegionSnapshotsClient.CreateAsync();
// Initialize request argument(s)
ListRegionSnapshotsRequest request = new ListRegionSnapshotsRequest
{
    Region = "",
    OrderBy = "",
    Project = "",
    Filter = "",
    ReturnPartialSuccess = false,
};
// Make the request
PagedAsyncEnumerable<SnapshotList, Snapshot> response = regionSnapshotsClient.ListAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await foreach (Snapshot item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

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

public virtual PagedAsyncEnumerable<SnapshotList, Snapshot> ListAsync(string project, string region, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Retrieves the list of Snapshot resources contained within the specified region.

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region for this request.

pageToken string

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

pageSize int

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableSnapshotListSnapshot

A pageable asynchronous sequence of Snapshot resources.

Example
// Create client
RegionSnapshotsClient regionSnapshotsClient = await RegionSnapshotsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
// Make the request
PagedAsyncEnumerable<SnapshotList, Snapshot> response = regionSnapshotsClient.ListAsync(project, region);

// Iterate over all response items, lazily performing RPCs as required
await foreach (Snapshot item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

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

PollOnceDelete(string, CallSettings)

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

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The result of polling the operation.

PollOnceDeleteAsync(string, CallSettings)

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

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A task representing the result of polling the operation.

PollOnceInsert(string, CallSettings)

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

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The result of polling the operation.

PollOnceInsertAsync(string, CallSettings)

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

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A task representing the result of polling the operation.

PollOnceSetLabels(string, CallSettings)

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

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The result of polling the operation.

PollOnceSetLabelsAsync(string, CallSettings)

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

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A task representing the result of polling the operation.

PollOnceUpdateKmsKey(string, CallSettings)

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

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The result of polling the operation.

PollOnceUpdateKmsKeyAsync(string, CallSettings)

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

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A task representing the result of polling the operation.

SetIamPolicy(SetIamPolicyRegionSnapshotRequest, CallSettings)

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

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

Parameters
Name Description
request SetIamPolicyRegionSnapshotRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Policy

The RPC response.

Example
// Create client
RegionSnapshotsClient regionSnapshotsClient = RegionSnapshotsClient.Create();
// Initialize request argument(s)
SetIamPolicyRegionSnapshotRequest request = new SetIamPolicyRegionSnapshotRequest
{
    Region = "",
    Resource = "",
    Project = "",
    RegionSetPolicyRequestResource = new RegionSetPolicyRequest(),
};
// Make the request
Policy response = regionSnapshotsClient.SetIamPolicy(request);

SetIamPolicy(string, string, string, RegionSetPolicyRequest, CallSettings)

public virtual Policy SetIamPolicy(string project, string region, string resource, RegionSetPolicyRequest regionSetPolicyRequestResource, CallSettings callSettings = null)

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

Parameters
Name Description
project string

Project ID for this request.

region string

The name of the region for this request.

resource string

Name or id of the resource for this request.

regionSetPolicyRequestResource RegionSetPolicyRequest

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Policy

The RPC response.

Example
// Create client
RegionSnapshotsClient regionSnapshotsClient = RegionSnapshotsClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
string resource = "";
RegionSetPolicyRequest regionSetPolicyRequestResource = new RegionSetPolicyRequest();
// Make the request
Policy response = regionSnapshotsClient.SetIamPolicy(project, region, resource, regionSetPolicyRequestResource);

SetIamPolicyAsync(SetIamPolicyRegionSnapshotRequest, CallSettings)

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

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

Parameters
Name Description
request SetIamPolicyRegionSnapshotRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskPolicy

A Task containing the RPC response.

Example
// Create client
RegionSnapshotsClient regionSnapshotsClient = await RegionSnapshotsClient.CreateAsync();
// Initialize request argument(s)
SetIamPolicyRegionSnapshotRequest request = new SetIamPolicyRegionSnapshotRequest
{
    Region = "",
    Resource = "",
    Project = "",
    RegionSetPolicyRequestResource = new RegionSetPolicyRequest(),
};
// Make the request
Policy response = await regionSnapshotsClient.SetIamPolicyAsync(request);

SetIamPolicyAsync(SetIamPolicyRegionSnapshotRequest, CancellationToken)

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

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

Parameters
Name Description
request SetIamPolicyRegionSnapshotRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskPolicy

A Task containing the RPC response.

Example
// Create client
RegionSnapshotsClient regionSnapshotsClient = await RegionSnapshotsClient.CreateAsync();
// Initialize request argument(s)
SetIamPolicyRegionSnapshotRequest request = new SetIamPolicyRegionSnapshotRequest
{
    Region = "",
    Resource = "",
    Project = "",
    RegionSetPolicyRequestResource = new RegionSetPolicyRequest(),
};
// Make the request
Policy response = await regionSnapshotsClient.SetIamPolicyAsync(request);

SetIamPolicyAsync(string, string, string, RegionSetPolicyRequest, CallSettings)

public virtual Task<Policy> SetIamPolicyAsync(string project, string region, string resource, RegionSetPolicyRequest regionSetPolicyRequestResource, CallSettings callSettings = null)

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

Parameters
Name Description
project string

Project ID for this request.

region string

The name of the region for this request.

resource string

Name or id of the resource for this request.

regionSetPolicyRequestResource RegionSetPolicyRequest

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskPolicy

A Task containing the RPC response.

Example
// Create client
RegionSnapshotsClient regionSnapshotsClient = await RegionSnapshotsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string resource = "";
RegionSetPolicyRequest regionSetPolicyRequestResource = new RegionSetPolicyRequest();
// Make the request
Policy response = await regionSnapshotsClient.SetIamPolicyAsync(project, region, resource, regionSetPolicyRequestResource);

SetIamPolicyAsync(string, string, string, RegionSetPolicyRequest, CancellationToken)

public virtual Task<Policy> SetIamPolicyAsync(string project, string region, string resource, RegionSetPolicyRequest regionSetPolicyRequestResource, CancellationToken cancellationToken)

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

Parameters
Name Description
project string

Project ID for this request.

region string

The name of the region for this request.

resource string

Name or id of the resource for this request.

regionSetPolicyRequestResource RegionSetPolicyRequest

The body resource for this request

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskPolicy

A Task containing the RPC response.

Example
// Create client
RegionSnapshotsClient regionSnapshotsClient = await RegionSnapshotsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string resource = "";
RegionSetPolicyRequest regionSetPolicyRequestResource = new RegionSetPolicyRequest();
// Make the request
Policy response = await regionSnapshotsClient.SetIamPolicyAsync(project, region, resource, regionSetPolicyRequestResource);

SetLabels(SetLabelsRegionSnapshotRequest, CallSettings)

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

Sets the labels on a regional snapshot. To learn more about labels, read the Labeling Resources documentation.

Parameters
Name Description
request SetLabelsRegionSnapshotRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The RPC response.

Example
// Create client
RegionSnapshotsClient regionSnapshotsClient = RegionSnapshotsClient.Create();
// Initialize request argument(s)
SetLabelsRegionSnapshotRequest request = new SetLabelsRegionSnapshotRequest
{
    RequestId = "",
    Region = "",
    Resource = "",
    Project = "",
    RegionSetLabelsRequestResource = new RegionSetLabelsRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = regionSnapshotsClient.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 = regionSnapshotsClient.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, string, RegionSetLabelsRequest, CallSettings)

public virtual Operation<Operation, Operation> SetLabels(string project, string region, string resource, RegionSetLabelsRequest regionSetLabelsRequestResource, CallSettings callSettings = null)

Sets the labels on a regional snapshot. To learn more about labels, read the Labeling Resources documentation.

Parameters
Name Description
project string

Project ID for this request.

region string

The region for this request.

resource string

Name or id of the resource for this request.

regionSetLabelsRequestResource RegionSetLabelsRequest

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The RPC response.

Example
// Create client
RegionSnapshotsClient regionSnapshotsClient = RegionSnapshotsClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
string resource = "";
RegionSetLabelsRequest regionSetLabelsRequestResource = new RegionSetLabelsRequest();
// Make the request
lro::Operation<Operation, Operation> response = regionSnapshotsClient.SetLabels(project, region, resource, regionSetLabelsRequestResource);

// 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 = regionSnapshotsClient.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(SetLabelsRegionSnapshotRequest, CallSettings)

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

Sets the labels on a regional snapshot. To learn more about labels, read the Labeling Resources documentation.

Parameters
Name Description
request SetLabelsRegionSnapshotRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
RegionSnapshotsClient regionSnapshotsClient = await RegionSnapshotsClient.CreateAsync();
// Initialize request argument(s)
SetLabelsRegionSnapshotRequest request = new SetLabelsRegionSnapshotRequest
{
    RequestId = "",
    Region = "",
    Resource = "",
    Project = "",
    RegionSetLabelsRequestResource = new RegionSetLabelsRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = await regionSnapshotsClient.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 regionSnapshotsClient.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(SetLabelsRegionSnapshotRequest, CancellationToken)

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

Sets the labels on a regional snapshot. To learn more about labels, read the Labeling Resources documentation.

Parameters
Name Description
request SetLabelsRegionSnapshotRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
RegionSnapshotsClient regionSnapshotsClient = await RegionSnapshotsClient.CreateAsync();
// Initialize request argument(s)
SetLabelsRegionSnapshotRequest request = new SetLabelsRegionSnapshotRequest
{
    RequestId = "",
    Region = "",
    Resource = "",
    Project = "",
    RegionSetLabelsRequestResource = new RegionSetLabelsRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = await regionSnapshotsClient.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 regionSnapshotsClient.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, string, RegionSetLabelsRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> SetLabelsAsync(string project, string region, string resource, RegionSetLabelsRequest regionSetLabelsRequestResource, CallSettings callSettings = null)

Sets the labels on a regional snapshot. To learn more about labels, read the Labeling Resources documentation.

Parameters
Name Description
project string

Project ID for this request.

region string

The region for this request.

resource string

Name or id of the resource for this request.

regionSetLabelsRequestResource RegionSetLabelsRequest

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
RegionSnapshotsClient regionSnapshotsClient = await RegionSnapshotsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string resource = "";
RegionSetLabelsRequest regionSetLabelsRequestResource = new RegionSetLabelsRequest();
// Make the request
lro::Operation<Operation, Operation> response = await regionSnapshotsClient.SetLabelsAsync(project, region, resource, regionSetLabelsRequestResource);

// 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 regionSnapshotsClient.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, string, RegionSetLabelsRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> SetLabelsAsync(string project, string region, string resource, RegionSetLabelsRequest regionSetLabelsRequestResource, CancellationToken cancellationToken)

Sets the labels on a regional snapshot. To learn more about labels, read the Labeling Resources documentation.

Parameters
Name Description
project string

Project ID for this request.

region string

The region for this request.

resource string

Name or id of the resource for this request.

regionSetLabelsRequestResource RegionSetLabelsRequest

The body resource for this request

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
RegionSnapshotsClient regionSnapshotsClient = await RegionSnapshotsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string resource = "";
RegionSetLabelsRequest regionSetLabelsRequestResource = new RegionSetLabelsRequest();
// Make the request
lro::Operation<Operation, Operation> response = await regionSnapshotsClient.SetLabelsAsync(project, region, resource, regionSetLabelsRequestResource);

// 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 regionSnapshotsClient.PollOnceSetLabelsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

ShutdownDefaultChannelsAsync()

public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.

Returns
Type Description
Task

A task representing the asynchronous shutdown operation.

Remarks

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

TestIamPermissions(TestIamPermissionsRegionSnapshotRequest, CallSettings)

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

Returns permissions that a caller has on the specified resource.

Parameters
Name Description
request TestIamPermissionsRegionSnapshotRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TestPermissionsResponse

The RPC response.

Example
// Create client
RegionSnapshotsClient regionSnapshotsClient = RegionSnapshotsClient.Create();
// Initialize request argument(s)
TestIamPermissionsRegionSnapshotRequest request = new TestIamPermissionsRegionSnapshotRequest
{
    Region = "",
    Resource = "",
    Project = "",
    TestPermissionsRequestResource = new TestPermissionsRequest(),
};
// Make the request
TestPermissionsResponse response = regionSnapshotsClient.TestIamPermissions(request);

TestIamPermissions(string, string, string, TestPermissionsRequest, CallSettings)

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

Returns permissions that a caller has on the specified resource.

Parameters
Name Description
project string

Project ID for this request.

region string

The name of the region for this request.

resource string

Name or id of the resource for this request.

testPermissionsRequestResource TestPermissionsRequest

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TestPermissionsResponse

The RPC response.

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

TestIamPermissionsAsync(TestIamPermissionsRegionSnapshotRequest, CallSettings)

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

Returns permissions that a caller has on the specified resource.

Parameters
Name Description
request TestIamPermissionsRegionSnapshotRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskTestPermissionsResponse

A Task containing the RPC response.

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

TestIamPermissionsAsync(TestIamPermissionsRegionSnapshotRequest, CancellationToken)

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

Returns permissions that a caller has on the specified resource.

Parameters
Name Description
request TestIamPermissionsRegionSnapshotRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskTestPermissionsResponse

A Task containing the RPC response.

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

TestIamPermissionsAsync(string, string, string, TestPermissionsRequest, CallSettings)

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

Returns permissions that a caller has on the specified resource.

Parameters
Name Description
project string

Project ID for this request.

region string

The name of the region for this request.

resource string

Name or id of the resource for this request.

testPermissionsRequestResource TestPermissionsRequest

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskTestPermissionsResponse

A Task containing the RPC response.

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

TestIamPermissionsAsync(string, string, string, TestPermissionsRequest, CancellationToken)

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

Returns permissions that a caller has on the specified resource.

Parameters
Name Description
project string

Project ID for this request.

region string

The name of the region for this request.

resource string

Name or id of the resource for this request.

testPermissionsRequestResource TestPermissionsRequest

The body resource for this request

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskTestPermissionsResponse

A Task containing the RPC response.

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

UpdateKmsKey(UpdateKmsKeyRegionSnapshotRequest, CallSettings)

public virtual Operation<Operation, Operation> UpdateKmsKey(UpdateKmsKeyRegionSnapshotRequest request, CallSettings callSettings = null)

Rotates the customer-managed encryption key to the latest version for the specified snapshot.

Parameters
Name Description
request UpdateKmsKeyRegionSnapshotRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The RPC response.

Example
// Create client
RegionSnapshotsClient regionSnapshotsClient = RegionSnapshotsClient.Create();
// Initialize request argument(s)
UpdateKmsKeyRegionSnapshotRequest request = new UpdateKmsKeyRegionSnapshotRequest
{
    RequestId = "",
    Region = "",
    Project = "",
    RegionSnapshotUpdateKmsKeyRequestResource = new RegionSnapshotUpdateKmsKeyRequest(),
    Snapshot = "",
};
// Make the request
lro::Operation<Operation, Operation> response = regionSnapshotsClient.UpdateKmsKey(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 = regionSnapshotsClient.PollOnceUpdateKmsKey(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;
}

UpdateKmsKey(string, string, string, RegionSnapshotUpdateKmsKeyRequest, CallSettings)

public virtual Operation<Operation, Operation> UpdateKmsKey(string project, string region, string snapshot, RegionSnapshotUpdateKmsKeyRequest regionSnapshotUpdateKmsKeyRequestResource, CallSettings callSettings = null)

Rotates the customer-managed encryption key to the latest version for the specified snapshot.

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region for this request.

snapshot string

Name of the snapshot resource to update. Should conform to RFC1035.

regionSnapshotUpdateKmsKeyRequestResource RegionSnapshotUpdateKmsKeyRequest

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The RPC response.

Example
// Create client
RegionSnapshotsClient regionSnapshotsClient = RegionSnapshotsClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
string snapshot = "";
RegionSnapshotUpdateKmsKeyRequest regionSnapshotUpdateKmsKeyRequestResource = new RegionSnapshotUpdateKmsKeyRequest();
// Make the request
lro::Operation<Operation, Operation> response = regionSnapshotsClient.UpdateKmsKey(project, region, snapshot, regionSnapshotUpdateKmsKeyRequestResource);

// 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 = regionSnapshotsClient.PollOnceUpdateKmsKey(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;
}

UpdateKmsKeyAsync(UpdateKmsKeyRegionSnapshotRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> UpdateKmsKeyAsync(UpdateKmsKeyRegionSnapshotRequest request, CallSettings callSettings = null)

Rotates the customer-managed encryption key to the latest version for the specified snapshot.

Parameters
Name Description
request UpdateKmsKeyRegionSnapshotRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
RegionSnapshotsClient regionSnapshotsClient = await RegionSnapshotsClient.CreateAsync();
// Initialize request argument(s)
UpdateKmsKeyRegionSnapshotRequest request = new UpdateKmsKeyRegionSnapshotRequest
{
    RequestId = "",
    Region = "",
    Project = "",
    RegionSnapshotUpdateKmsKeyRequestResource = new RegionSnapshotUpdateKmsKeyRequest(),
    Snapshot = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await regionSnapshotsClient.UpdateKmsKeyAsync(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 regionSnapshotsClient.PollOnceUpdateKmsKeyAsync(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;
}

UpdateKmsKeyAsync(UpdateKmsKeyRegionSnapshotRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> UpdateKmsKeyAsync(UpdateKmsKeyRegionSnapshotRequest request, CancellationToken cancellationToken)

Rotates the customer-managed encryption key to the latest version for the specified snapshot.

Parameters
Name Description
request UpdateKmsKeyRegionSnapshotRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
RegionSnapshotsClient regionSnapshotsClient = await RegionSnapshotsClient.CreateAsync();
// Initialize request argument(s)
UpdateKmsKeyRegionSnapshotRequest request = new UpdateKmsKeyRegionSnapshotRequest
{
    RequestId = "",
    Region = "",
    Project = "",
    RegionSnapshotUpdateKmsKeyRequestResource = new RegionSnapshotUpdateKmsKeyRequest(),
    Snapshot = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await regionSnapshotsClient.UpdateKmsKeyAsync(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 regionSnapshotsClient.PollOnceUpdateKmsKeyAsync(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;
}

UpdateKmsKeyAsync(string, string, string, RegionSnapshotUpdateKmsKeyRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> UpdateKmsKeyAsync(string project, string region, string snapshot, RegionSnapshotUpdateKmsKeyRequest regionSnapshotUpdateKmsKeyRequestResource, CallSettings callSettings = null)

Rotates the customer-managed encryption key to the latest version for the specified snapshot.

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region for this request.

snapshot string

Name of the snapshot resource to update. Should conform to RFC1035.

regionSnapshotUpdateKmsKeyRequestResource RegionSnapshotUpdateKmsKeyRequest

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
RegionSnapshotsClient regionSnapshotsClient = await RegionSnapshotsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string snapshot = "";
RegionSnapshotUpdateKmsKeyRequest regionSnapshotUpdateKmsKeyRequestResource = new RegionSnapshotUpdateKmsKeyRequest();
// Make the request
lro::Operation<Operation, Operation> response = await regionSnapshotsClient.UpdateKmsKeyAsync(project, region, snapshot, regionSnapshotUpdateKmsKeyRequestResource);

// 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 regionSnapshotsClient.PollOnceUpdateKmsKeyAsync(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;
}

UpdateKmsKeyAsync(string, string, string, RegionSnapshotUpdateKmsKeyRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> UpdateKmsKeyAsync(string project, string region, string snapshot, RegionSnapshotUpdateKmsKeyRequest regionSnapshotUpdateKmsKeyRequestResource, CancellationToken cancellationToken)

Rotates the customer-managed encryption key to the latest version for the specified snapshot.

Parameters
Name Description
project string

Project ID for this request.

region string

Name of the region for this request.

snapshot string

Name of the snapshot resource to update. Should conform to RFC1035.

regionSnapshotUpdateKmsKeyRequestResource RegionSnapshotUpdateKmsKeyRequest

The body resource for this request

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
RegionSnapshotsClient regionSnapshotsClient = await RegionSnapshotsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string snapshot = "";
RegionSnapshotUpdateKmsKeyRequest regionSnapshotUpdateKmsKeyRequestResource = new RegionSnapshotUpdateKmsKeyRequest();
// Make the request
lro::Operation<Operation, Operation> response = await regionSnapshotsClient.UpdateKmsKeyAsync(project, region, snapshot, regionSnapshotUpdateKmsKeyRequestResource);

// 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 regionSnapshotsClient.PollOnceUpdateKmsKeyAsync(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;
}