Compute Engine v1 API - Class DisksClient (2.14.0)

public abstract class DisksClient

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

Disks client wrapper, for convenient use.

Inheritance

object > DisksClient

Derived Types

Namespace

Google.Cloud.Compute.V1

Assembly

Google.Cloud.Compute.V1.dll

Remarks

The Disks API.

Properties

AddResourcePoliciesOperationsClient

public virtual OperationsClient AddResourcePoliciesOperationsClient { get; }

The long-running operations client for AddResourcePolicies.

Property Value
TypeDescription
OperationsClient

BulkInsertOperationsClient

public virtual OperationsClient BulkInsertOperationsClient { get; }

The long-running operations client for BulkInsert.

Property Value
TypeDescription
OperationsClient

CreateSnapshotOperationsClient

public virtual OperationsClient CreateSnapshotOperationsClient { get; }

The long-running operations client for CreateSnapshot.

Property Value
TypeDescription
OperationsClient

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
TypeDescription
IReadOnlyListstring
Remarks

DeleteOperationsClient

public virtual OperationsClient DeleteOperationsClient { get; }

The long-running operations client for Delete.

Property Value
TypeDescription
OperationsClient

GrpcClient

public virtual Disks.DisksClient GrpcClient { get; }

The underlying gRPC Disks client

Property Value
TypeDescription
DisksDisksClient

InsertOperationsClient

public virtual OperationsClient InsertOperationsClient { get; }

The long-running operations client for Insert.

Property Value
TypeDescription
OperationsClient

RemoveResourcePoliciesOperationsClient

public virtual OperationsClient RemoveResourcePoliciesOperationsClient { get; }

The long-running operations client for RemoveResourcePolicies.

Property Value
TypeDescription
OperationsClient

ResizeOperationsClient

public virtual OperationsClient ResizeOperationsClient { get; }

The long-running operations client for Resize.

Property Value
TypeDescription
OperationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

SetLabelsOperationsClient

public virtual OperationsClient SetLabelsOperationsClient { get; }

The long-running operations client for SetLabels.

Property Value
TypeDescription
OperationsClient

StartAsyncReplicationOperationsClient

public virtual OperationsClient StartAsyncReplicationOperationsClient { get; }

The long-running operations client for StartAsyncReplication.

Property Value
TypeDescription
OperationsClient

StopAsyncReplicationOperationsClient

public virtual OperationsClient StopAsyncReplicationOperationsClient { get; }

The long-running operations client for StopAsyncReplication.

Property Value
TypeDescription
OperationsClient

StopGroupAsyncReplicationOperationsClient

public virtual OperationsClient StopGroupAsyncReplicationOperationsClient { get; }

The long-running operations client for StopGroupAsyncReplication.

Property Value
TypeDescription
OperationsClient

UpdateOperationsClient

public virtual OperationsClient UpdateOperationsClient { get; }

The long-running operations client for Update.

Property Value
TypeDescription
OperationsClient

Methods

AddResourcePolicies(AddResourcePoliciesDiskRequest, CallSettings)

public virtual Operation<Operation, Operation> AddResourcePolicies(AddResourcePoliciesDiskRequest request, CallSettings callSettings = null)

Adds existing resource policies to a disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation.

Parameters
NameDescription
requestAddResourcePoliciesDiskRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// Create client
DisksClient disksClient = DisksClient.Create();
// Initialize request argument(s)
AddResourcePoliciesDiskRequest request = new AddResourcePoliciesDiskRequest
{
    Disk = "",
    Zone = "",
    RequestId = "",
    Project = "",
    DisksAddResourcePoliciesRequestResource = new DisksAddResourcePoliciesRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = disksClient.AddResourcePolicies(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 = disksClient.PollOnceAddResourcePolicies(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;
}

AddResourcePolicies(string, string, string, DisksAddResourcePoliciesRequest, CallSettings)

public virtual Operation<Operation, Operation> AddResourcePolicies(string project, string zone, string disk, DisksAddResourcePoliciesRequest disksAddResourcePoliciesRequestResource, CallSettings callSettings = null)

Adds existing resource policies to a disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation.

Parameters
NameDescription
projectstring

Project ID for this request.

zonestring

The name of the zone for this request.

diskstring

The disk name for this request.

disksAddResourcePoliciesRequestResourceDisksAddResourcePoliciesRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// Create client
DisksClient disksClient = DisksClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string disk = "";
DisksAddResourcePoliciesRequest disksAddResourcePoliciesRequestResource = new DisksAddResourcePoliciesRequest();
// Make the request
lro::Operation<Operation, Operation> response = disksClient.AddResourcePolicies(project, zone, disk, disksAddResourcePoliciesRequestResource);

// 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 = disksClient.PollOnceAddResourcePolicies(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;
}

AddResourcePoliciesAsync(AddResourcePoliciesDiskRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> AddResourcePoliciesAsync(AddResourcePoliciesDiskRequest request, CallSettings callSettings = null)

Adds existing resource policies to a disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation.

Parameters
NameDescription
requestAddResourcePoliciesDiskRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
AddResourcePoliciesDiskRequest request = new AddResourcePoliciesDiskRequest
{
    Disk = "",
    Zone = "",
    RequestId = "",
    Project = "",
    DisksAddResourcePoliciesRequestResource = new DisksAddResourcePoliciesRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = await disksClient.AddResourcePoliciesAsync(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 disksClient.PollOnceAddResourcePoliciesAsync(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;
}

AddResourcePoliciesAsync(AddResourcePoliciesDiskRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> AddResourcePoliciesAsync(AddResourcePoliciesDiskRequest request, CancellationToken cancellationToken)

Adds existing resource policies to a disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation.

Parameters
NameDescription
requestAddResourcePoliciesDiskRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
AddResourcePoliciesDiskRequest request = new AddResourcePoliciesDiskRequest
{
    Disk = "",
    Zone = "",
    RequestId = "",
    Project = "",
    DisksAddResourcePoliciesRequestResource = new DisksAddResourcePoliciesRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = await disksClient.AddResourcePoliciesAsync(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 disksClient.PollOnceAddResourcePoliciesAsync(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;
}

AddResourcePoliciesAsync(string, string, string, DisksAddResourcePoliciesRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> AddResourcePoliciesAsync(string project, string zone, string disk, DisksAddResourcePoliciesRequest disksAddResourcePoliciesRequestResource, CallSettings callSettings = null)

Adds existing resource policies to a disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation.

Parameters
NameDescription
projectstring

Project ID for this request.

zonestring

The name of the zone for this request.

diskstring

The disk name for this request.

disksAddResourcePoliciesRequestResourceDisksAddResourcePoliciesRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string disk = "";
DisksAddResourcePoliciesRequest disksAddResourcePoliciesRequestResource = new DisksAddResourcePoliciesRequest();
// Make the request
lro::Operation<Operation, Operation> response = await disksClient.AddResourcePoliciesAsync(project, zone, disk, disksAddResourcePoliciesRequestResource);

// 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 disksClient.PollOnceAddResourcePoliciesAsync(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;
}

AddResourcePoliciesAsync(string, string, string, DisksAddResourcePoliciesRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> AddResourcePoliciesAsync(string project, string zone, string disk, DisksAddResourcePoliciesRequest disksAddResourcePoliciesRequestResource, CancellationToken cancellationToken)

Adds existing resource policies to a disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation.

Parameters
NameDescription
projectstring

Project ID for this request.

zonestring

The name of the zone for this request.

diskstring

The disk name for this request.

disksAddResourcePoliciesRequestResourceDisksAddResourcePoliciesRequest

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string disk = "";
DisksAddResourcePoliciesRequest disksAddResourcePoliciesRequestResource = new DisksAddResourcePoliciesRequest();
// Make the request
lro::Operation<Operation, Operation> response = await disksClient.AddResourcePoliciesAsync(project, zone, disk, disksAddResourcePoliciesRequestResource);

// 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 disksClient.PollOnceAddResourcePoliciesAsync(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;
}

AggregatedList(AggregatedListDisksRequest, CallSettings)

public virtual PagedEnumerable<DiskAggregatedList, KeyValuePair<string, DisksScopedList>> AggregatedList(AggregatedListDisksRequest request, CallSettings callSettings = null)

Retrieves an aggregated list of persistent disks. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true.

Parameters
NameDescription
requestAggregatedListDisksRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableDiskAggregatedListKeyValuePairstringDisksScopedList

A pageable sequence of KeyValuePair<TKey, TValue> resources.

Example
// Create client
DisksClient disksClient = DisksClient.Create();
// Initialize request argument(s)
AggregatedListDisksRequest request = new AggregatedListDisksRequest
{
    OrderBy = "",
    Project = "",
    ServiceProjectNumber = 0L,
    Filter = "",
    IncludeAllScopes = false,
    ReturnPartialSuccess = false,
};
// Make the request
PagedEnumerable<DiskAggregatedList, KeyValuePair<string, DisksScopedList>> response = disksClient.AggregatedList(request);

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

AggregatedList(string, string, int?, CallSettings)

public virtual PagedEnumerable<DiskAggregatedList, KeyValuePair<string, DisksScopedList>> AggregatedList(string project, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Retrieves an aggregated list of persistent disks. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true.

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.

pageSizeint

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
PagedEnumerableDiskAggregatedListKeyValuePairstringDisksScopedList

A pageable sequence of KeyValuePair<TKey, TValue> resources.

Example
// Create client
DisksClient disksClient = DisksClient.Create();
// Initialize request argument(s)
string project = "";
// Make the request
PagedEnumerable<DiskAggregatedList, KeyValuePair<string, DisksScopedList>> response = disksClient.AggregatedList(project);

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

AggregatedListAsync(AggregatedListDisksRequest, CallSettings)

public virtual PagedAsyncEnumerable<DiskAggregatedList, KeyValuePair<string, DisksScopedList>> AggregatedListAsync(AggregatedListDisksRequest request, CallSettings callSettings = null)

Retrieves an aggregated list of persistent disks. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true.

Parameters
NameDescription
requestAggregatedListDisksRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableDiskAggregatedListKeyValuePairstringDisksScopedList

A pageable asynchronous sequence of KeyValuePair<TKey, TValue> resources.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
AggregatedListDisksRequest request = new AggregatedListDisksRequest
{
    OrderBy = "",
    Project = "",
    ServiceProjectNumber = 0L,
    Filter = "",
    IncludeAllScopes = false,
    ReturnPartialSuccess = false,
};
// Make the request
PagedAsyncEnumerable<DiskAggregatedList, KeyValuePair<string, DisksScopedList>> response = disksClient.AggregatedListAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((KeyValuePair<string, DisksScopedList> 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((DiskAggregatedList page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (KeyValuePair<string, DisksScopedList> 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<KeyValuePair<string, DisksScopedList>> 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 (KeyValuePair<string, DisksScopedList> 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;

AggregatedListAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<DiskAggregatedList, KeyValuePair<string, DisksScopedList>> AggregatedListAsync(string project, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Retrieves an aggregated list of persistent disks. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true.

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.

pageSizeint

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
PagedAsyncEnumerableDiskAggregatedListKeyValuePairstringDisksScopedList

A pageable asynchronous sequence of KeyValuePair<TKey, TValue> resources.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
// Make the request
PagedAsyncEnumerable<DiskAggregatedList, KeyValuePair<string, DisksScopedList>> response = disksClient.AggregatedListAsync(project);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((KeyValuePair<string, DisksScopedList> 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((DiskAggregatedList page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (KeyValuePair<string, DisksScopedList> 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<KeyValuePair<string, DisksScopedList>> 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 (KeyValuePair<string, DisksScopedList> 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;

BulkInsert(BulkInsertDiskRequest, CallSettings)

public virtual Operation<Operation, Operation> BulkInsert(BulkInsertDiskRequest request, CallSettings callSettings = null)

Bulk create a set of disks.

Parameters
NameDescription
requestBulkInsertDiskRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// Create client
DisksClient disksClient = DisksClient.Create();
// Initialize request argument(s)
BulkInsertDiskRequest request = new BulkInsertDiskRequest
{
    Zone = "",
    RequestId = "",
    Project = "",
    BulkInsertDiskResourceResource = new BulkInsertDiskResource(),
};
// Make the request
lro::Operation<Operation, Operation> response = disksClient.BulkInsert(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 = disksClient.PollOnceBulkInsert(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;
}

BulkInsert(string, string, BulkInsertDiskResource, CallSettings)

public virtual Operation<Operation, Operation> BulkInsert(string project, string zone, BulkInsertDiskResource bulkInsertDiskResourceResource, CallSettings callSettings = null)

Bulk create a set of disks.

Parameters
NameDescription
projectstring

Project ID for this request.

zonestring

The name of the zone for this request.

bulkInsertDiskResourceResourceBulkInsertDiskResource

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// Create client
DisksClient disksClient = DisksClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
BulkInsertDiskResource bulkInsertDiskResourceResource = new BulkInsertDiskResource();
// Make the request
lro::Operation<Operation, Operation> response = disksClient.BulkInsert(project, zone, bulkInsertDiskResourceResource);

// 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 = disksClient.PollOnceBulkInsert(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;
}

BulkInsertAsync(BulkInsertDiskRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> BulkInsertAsync(BulkInsertDiskRequest request, CallSettings callSettings = null)

Bulk create a set of disks.

Parameters
NameDescription
requestBulkInsertDiskRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
BulkInsertDiskRequest request = new BulkInsertDiskRequest
{
    Zone = "",
    RequestId = "",
    Project = "",
    BulkInsertDiskResourceResource = new BulkInsertDiskResource(),
};
// Make the request
lro::Operation<Operation, Operation> response = await disksClient.BulkInsertAsync(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 disksClient.PollOnceBulkInsertAsync(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;
}

BulkInsertAsync(BulkInsertDiskRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> BulkInsertAsync(BulkInsertDiskRequest request, CancellationToken cancellationToken)

Bulk create a set of disks.

Parameters
NameDescription
requestBulkInsertDiskRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
BulkInsertDiskRequest request = new BulkInsertDiskRequest
{
    Zone = "",
    RequestId = "",
    Project = "",
    BulkInsertDiskResourceResource = new BulkInsertDiskResource(),
};
// Make the request
lro::Operation<Operation, Operation> response = await disksClient.BulkInsertAsync(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 disksClient.PollOnceBulkInsertAsync(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;
}

BulkInsertAsync(string, string, BulkInsertDiskResource, CallSettings)

public virtual Task<Operation<Operation, Operation>> BulkInsertAsync(string project, string zone, BulkInsertDiskResource bulkInsertDiskResourceResource, CallSettings callSettings = null)

Bulk create a set of disks.

Parameters
NameDescription
projectstring

Project ID for this request.

zonestring

The name of the zone for this request.

bulkInsertDiskResourceResourceBulkInsertDiskResource

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
BulkInsertDiskResource bulkInsertDiskResourceResource = new BulkInsertDiskResource();
// Make the request
lro::Operation<Operation, Operation> response = await disksClient.BulkInsertAsync(project, zone, bulkInsertDiskResourceResource);

// 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 disksClient.PollOnceBulkInsertAsync(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;
}

BulkInsertAsync(string, string, BulkInsertDiskResource, CancellationToken)

public virtual Task<Operation<Operation, Operation>> BulkInsertAsync(string project, string zone, BulkInsertDiskResource bulkInsertDiskResourceResource, CancellationToken cancellationToken)

Bulk create a set of disks.

Parameters
NameDescription
projectstring

Project ID for this request.

zonestring

The name of the zone for this request.

bulkInsertDiskResourceResourceBulkInsertDiskResource

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
BulkInsertDiskResource bulkInsertDiskResourceResource = new BulkInsertDiskResource();
// Make the request
lro::Operation<Operation, Operation> response = await disksClient.BulkInsertAsync(project, zone, bulkInsertDiskResourceResource);

// 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 disksClient.PollOnceBulkInsertAsync(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;
}

Create()

public static DisksClient Create()

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

Returns
TypeDescription
DisksClient

The created DisksClient.

CreateAsync(CancellationToken)

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

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

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
TaskDisksClient

The task representing the created DisksClient.

CreateSnapshot(CreateSnapshotDiskRequest, CallSettings)

public virtual Operation<Operation, Operation> CreateSnapshot(CreateSnapshotDiskRequest request, CallSettings callSettings = null)

Creates a snapshot of a specified persistent disk. For regular snapshot creation, consider using snapshots.insert instead, as that method supports more features, such as creating snapshots in a project different from the source disk project.

Parameters
NameDescription
requestCreateSnapshotDiskRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// Create client
DisksClient disksClient = DisksClient.Create();
// Initialize request argument(s)
CreateSnapshotDiskRequest request = new CreateSnapshotDiskRequest
{
    Disk = "",
    Zone = "",
    RequestId = "",
    Project = "",
    GuestFlush = false,
    SnapshotResource = new Snapshot(),
};
// Make the request
lro::Operation<Operation, Operation> response = disksClient.CreateSnapshot(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 = disksClient.PollOnceCreateSnapshot(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;
}

CreateSnapshot(string, string, string, Snapshot, CallSettings)

public virtual Operation<Operation, Operation> CreateSnapshot(string project, string zone, string disk, Snapshot snapshotResource, CallSettings callSettings = null)

Creates a snapshot of a specified persistent disk. For regular snapshot creation, consider using snapshots.insert instead, as that method supports more features, such as creating snapshots in a project different from the source disk project.

Parameters
NameDescription
projectstring

Project ID for this request.

zonestring

The name of the zone for this request.

diskstring

Name of the persistent disk to snapshot.

snapshotResourceSnapshot

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// Create client
DisksClient disksClient = DisksClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string disk = "";
Snapshot snapshotResource = new Snapshot();
// Make the request
lro::Operation<Operation, Operation> response = disksClient.CreateSnapshot(project, zone, disk, 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 = disksClient.PollOnceCreateSnapshot(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;
}

CreateSnapshotAsync(CreateSnapshotDiskRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> CreateSnapshotAsync(CreateSnapshotDiskRequest request, CallSettings callSettings = null)

Creates a snapshot of a specified persistent disk. For regular snapshot creation, consider using snapshots.insert instead, as that method supports more features, such as creating snapshots in a project different from the source disk project.

Parameters
NameDescription
requestCreateSnapshotDiskRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
CreateSnapshotDiskRequest request = new CreateSnapshotDiskRequest
{
    Disk = "",
    Zone = "",
    RequestId = "",
    Project = "",
    GuestFlush = false,
    SnapshotResource = new Snapshot(),
};
// Make the request
lro::Operation<Operation, Operation> response = await disksClient.CreateSnapshotAsync(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 disksClient.PollOnceCreateSnapshotAsync(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;
}

CreateSnapshotAsync(CreateSnapshotDiskRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> CreateSnapshotAsync(CreateSnapshotDiskRequest request, CancellationToken cancellationToken)

Creates a snapshot of a specified persistent disk. For regular snapshot creation, consider using snapshots.insert instead, as that method supports more features, such as creating snapshots in a project different from the source disk project.

Parameters
NameDescription
requestCreateSnapshotDiskRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
CreateSnapshotDiskRequest request = new CreateSnapshotDiskRequest
{
    Disk = "",
    Zone = "",
    RequestId = "",
    Project = "",
    GuestFlush = false,
    SnapshotResource = new Snapshot(),
};
// Make the request
lro::Operation<Operation, Operation> response = await disksClient.CreateSnapshotAsync(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 disksClient.PollOnceCreateSnapshotAsync(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;
}

CreateSnapshotAsync(string, string, string, Snapshot, CallSettings)

public virtual Task<Operation<Operation, Operation>> CreateSnapshotAsync(string project, string zone, string disk, Snapshot snapshotResource, CallSettings callSettings = null)

Creates a snapshot of a specified persistent disk. For regular snapshot creation, consider using snapshots.insert instead, as that method supports more features, such as creating snapshots in a project different from the source disk project.

Parameters
NameDescription
projectstring

Project ID for this request.

zonestring

The name of the zone for this request.

diskstring

Name of the persistent disk to snapshot.

snapshotResourceSnapshot

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string disk = "";
Snapshot snapshotResource = new Snapshot();
// Make the request
lro::Operation<Operation, Operation> response = await disksClient.CreateSnapshotAsync(project, zone, disk, 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 disksClient.PollOnceCreateSnapshotAsync(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;
}

CreateSnapshotAsync(string, string, string, Snapshot, CancellationToken)

public virtual Task<Operation<Operation, Operation>> CreateSnapshotAsync(string project, string zone, string disk, Snapshot snapshotResource, CancellationToken cancellationToken)

Creates a snapshot of a specified persistent disk. For regular snapshot creation, consider using snapshots.insert instead, as that method supports more features, such as creating snapshots in a project different from the source disk project.

Parameters
NameDescription
projectstring

Project ID for this request.

zonestring

The name of the zone for this request.

diskstring

Name of the persistent disk to snapshot.

snapshotResourceSnapshot

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string disk = "";
Snapshot snapshotResource = new Snapshot();
// Make the request
lro::Operation<Operation, Operation> response = await disksClient.CreateSnapshotAsync(project, zone, disk, 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 disksClient.PollOnceCreateSnapshotAsync(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(DeleteDiskRequest, CallSettings)

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

Deletes the specified persistent disk. Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots.

Parameters
NameDescription
requestDeleteDiskRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// Create client
DisksClient disksClient = DisksClient.Create();
// Initialize request argument(s)
DeleteDiskRequest request = new DeleteDiskRequest
{
    Disk = "",
    Zone = "",
    RequestId = "",
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = disksClient.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 = disksClient.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 zone, string disk, CallSettings callSettings = null)

Deletes the specified persistent disk. Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots.

Parameters
NameDescription
projectstring

Project ID for this request.

zonestring

The name of the zone for this request.

diskstring

Name of the persistent disk to delete.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// Create client
DisksClient disksClient = DisksClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string disk = "";
// Make the request
lro::Operation<Operation, Operation> response = disksClient.Delete(project, zone, disk);

// 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 = disksClient.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(DeleteDiskRequest, CallSettings)

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

Deletes the specified persistent disk. Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots.

Parameters
NameDescription
requestDeleteDiskRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
DeleteDiskRequest request = new DeleteDiskRequest
{
    Disk = "",
    Zone = "",
    RequestId = "",
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await disksClient.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 disksClient.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(DeleteDiskRequest, CancellationToken)

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

Deletes the specified persistent disk. Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots.

Parameters
NameDescription
requestDeleteDiskRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
DeleteDiskRequest request = new DeleteDiskRequest
{
    Disk = "",
    Zone = "",
    RequestId = "",
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await disksClient.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 disksClient.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 zone, string disk, CallSettings callSettings = null)

Deletes the specified persistent disk. Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots.

Parameters
NameDescription
projectstring

Project ID for this request.

zonestring

The name of the zone for this request.

diskstring

Name of the persistent disk to delete.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

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

// 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 disksClient.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 zone, string disk, CancellationToken cancellationToken)

Deletes the specified persistent disk. Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots.

Parameters
NameDescription
projectstring

Project ID for this request.

zonestring

The name of the zone for this request.

diskstring

Name of the persistent disk to delete.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

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

// 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 disksClient.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(GetDiskRequest, CallSettings)

public virtual Disk Get(GetDiskRequest request, CallSettings callSettings = null)

Returns the specified persistent disk.

Parameters
NameDescription
requestGetDiskRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Disk

The RPC response.

Example
// Create client
DisksClient disksClient = DisksClient.Create();
// Initialize request argument(s)
GetDiskRequest request = new GetDiskRequest
{
    Disk = "",
    Zone = "",
    Project = "",
};
// Make the request
Disk response = disksClient.Get(request);

Get(string, string, string, CallSettings)

public virtual Disk Get(string project, string zone, string disk, CallSettings callSettings = null)

Returns the specified persistent disk.

Parameters
NameDescription
projectstring

Project ID for this request.

zonestring

The name of the zone for this request.

diskstring

Name of the persistent disk to return.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Disk

The RPC response.

Example
// Create client
DisksClient disksClient = DisksClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string disk = "";
// Make the request
Disk response = disksClient.Get(project, zone, disk);

GetAsync(GetDiskRequest, CallSettings)

public virtual Task<Disk> GetAsync(GetDiskRequest request, CallSettings callSettings = null)

Returns the specified persistent disk.

Parameters
NameDescription
requestGetDiskRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskDisk

A Task containing the RPC response.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
GetDiskRequest request = new GetDiskRequest
{
    Disk = "",
    Zone = "",
    Project = "",
};
// Make the request
Disk response = await disksClient.GetAsync(request);

GetAsync(GetDiskRequest, CancellationToken)

public virtual Task<Disk> GetAsync(GetDiskRequest request, CancellationToken cancellationToken)

Returns the specified persistent disk.

Parameters
NameDescription
requestGetDiskRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskDisk

A Task containing the RPC response.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
GetDiskRequest request = new GetDiskRequest
{
    Disk = "",
    Zone = "",
    Project = "",
};
// Make the request
Disk response = await disksClient.GetAsync(request);

GetAsync(string, string, string, CallSettings)

public virtual Task<Disk> GetAsync(string project, string zone, string disk, CallSettings callSettings = null)

Returns the specified persistent disk.

Parameters
NameDescription
projectstring

Project ID for this request.

zonestring

The name of the zone for this request.

diskstring

Name of the persistent disk to return.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskDisk

A Task containing the RPC response.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string disk = "";
// Make the request
Disk response = await disksClient.GetAsync(project, zone, disk);

GetAsync(string, string, string, CancellationToken)

public virtual Task<Disk> GetAsync(string project, string zone, string disk, CancellationToken cancellationToken)

Returns the specified persistent disk.

Parameters
NameDescription
projectstring

Project ID for this request.

zonestring

The name of the zone for this request.

diskstring

Name of the persistent disk to return.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskDisk

A Task containing the RPC response.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string disk = "";
// Make the request
Disk response = await disksClient.GetAsync(project, zone, disk);

GetIamPolicy(GetIamPolicyDiskRequest, CallSettings)

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

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

Parameters
NameDescription
requestGetIamPolicyDiskRequest

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
DisksClient disksClient = DisksClient.Create();
// Initialize request argument(s)
GetIamPolicyDiskRequest request = new GetIamPolicyDiskRequest
{
    Zone = "",
    Resource = "",
    Project = "",
    OptionsRequestedPolicyVersion = 0,
};
// Make the request
Policy response = disksClient.GetIamPolicy(request);

GetIamPolicy(string, string, string, CallSettings)

public virtual Policy GetIamPolicy(string project, string zone, 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.

zonestring

The name of the zone 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
DisksClient disksClient = DisksClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string resource = "";
// Make the request
Policy response = disksClient.GetIamPolicy(project, zone, resource);

GetIamPolicyAsync(GetIamPolicyDiskRequest, CallSettings)

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

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

Parameters
NameDescription
requestGetIamPolicyDiskRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskPolicy

A Task containing the RPC response.

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

GetIamPolicyAsync(GetIamPolicyDiskRequest, CancellationToken)

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

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

Parameters
NameDescription
requestGetIamPolicyDiskRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskPolicy

A Task containing the RPC response.

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

GetIamPolicyAsync(string, string, string, CallSettings)

public virtual Task<Policy> GetIamPolicyAsync(string project, string zone, 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.

zonestring

The name of the zone 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
TaskPolicy

A Task containing the RPC response.

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

GetIamPolicyAsync(string, string, string, CancellationToken)

public virtual Task<Policy> GetIamPolicyAsync(string project, string zone, 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.

zonestring

The name of the zone for this request.

resourcestring

Name or id of the resource for this request.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskPolicy

A Task containing the RPC response.

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

Insert(InsertDiskRequest, CallSettings)

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

Creates a persistent disk in the specified project using the data in the request. You can create a disk from a source (sourceImage, sourceSnapshot, or sourceDisk) or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property.

Parameters
NameDescription
requestInsertDiskRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// Create client
DisksClient disksClient = DisksClient.Create();
// Initialize request argument(s)
InsertDiskRequest request = new InsertDiskRequest
{
    Zone = "",
    DiskResource = new Disk(),
    RequestId = "",
    SourceImage = "",
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = disksClient.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 = disksClient.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, Disk, CallSettings)

public virtual Operation<Operation, Operation> Insert(string project, string zone, Disk diskResource, CallSettings callSettings = null)

Creates a persistent disk in the specified project using the data in the request. You can create a disk from a source (sourceImage, sourceSnapshot, or sourceDisk) or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property.

Parameters
NameDescription
projectstring

Project ID for this request.

zonestring

The name of the zone for this request.

diskResourceDisk

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// Create client
DisksClient disksClient = DisksClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
Disk diskResource = new Disk();
// Make the request
lro::Operation<Operation, Operation> response = disksClient.Insert(project, zone, diskResource);

// 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 = disksClient.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(InsertDiskRequest, CallSettings)

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

Creates a persistent disk in the specified project using the data in the request. You can create a disk from a source (sourceImage, sourceSnapshot, or sourceDisk) or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property.

Parameters
NameDescription
requestInsertDiskRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
InsertDiskRequest request = new InsertDiskRequest
{
    Zone = "",
    DiskResource = new Disk(),
    RequestId = "",
    SourceImage = "",
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await disksClient.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 disksClient.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(InsertDiskRequest, CancellationToken)

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

Creates a persistent disk in the specified project using the data in the request. You can create a disk from a source (sourceImage, sourceSnapshot, or sourceDisk) or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property.

Parameters
NameDescription
requestInsertDiskRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
InsertDiskRequest request = new InsertDiskRequest
{
    Zone = "",
    DiskResource = new Disk(),
    RequestId = "",
    SourceImage = "",
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await disksClient.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 disksClient.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, Disk, CallSettings)

public virtual Task<Operation<Operation, Operation>> InsertAsync(string project, string zone, Disk diskResource, CallSettings callSettings = null)

Creates a persistent disk in the specified project using the data in the request. You can create a disk from a source (sourceImage, sourceSnapshot, or sourceDisk) or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property.

Parameters
NameDescription
projectstring

Project ID for this request.

zonestring

The name of the zone for this request.

diskResourceDisk

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
Disk diskResource = new Disk();
// Make the request
lro::Operation<Operation, Operation> response = await disksClient.InsertAsync(project, zone, diskResource);

// 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 disksClient.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, Disk, CancellationToken)

public virtual Task<Operation<Operation, Operation>> InsertAsync(string project, string zone, Disk diskResource, CancellationToken cancellationToken)

Creates a persistent disk in the specified project using the data in the request. You can create a disk from a source (sourceImage, sourceSnapshot, or sourceDisk) or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property.

Parameters
NameDescription
projectstring

Project ID for this request.

zonestring

The name of the zone for this request.

diskResourceDisk

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
Disk diskResource = new Disk();
// Make the request
lro::Operation<Operation, Operation> response = await disksClient.InsertAsync(project, zone, diskResource);

// 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 disksClient.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(ListDisksRequest, CallSettings)

public virtual PagedEnumerable<DiskList, Disk> List(ListDisksRequest request, CallSettings callSettings = null)

Retrieves a list of persistent disks contained within the specified zone.

Parameters
NameDescription
requestListDisksRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableDiskListDisk

A pageable sequence of Disk resources.

Example
// Create client
DisksClient disksClient = DisksClient.Create();
// Initialize request argument(s)
ListDisksRequest request = new ListDisksRequest
{
    Zone = "",
    OrderBy = "",
    Project = "",
    Filter = "",
    ReturnPartialSuccess = false,
};
// Make the request
PagedEnumerable<DiskList, Disk> response = disksClient.List(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (Disk 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 (DiskList page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Disk 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<Disk> 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 (Disk 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<DiskList, Disk> List(string project, string zone, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Retrieves a list of persistent disks contained within the specified zone.

Parameters
NameDescription
projectstring

Project ID for this request.

zonestring

The name of the zone for this request.

pageTokenstring

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

pageSizeint

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
PagedEnumerableDiskListDisk

A pageable sequence of Disk resources.

Example
// Create client
DisksClient disksClient = DisksClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
// Make the request
PagedEnumerable<DiskList, Disk> response = disksClient.List(project, zone);

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

public virtual PagedAsyncEnumerable<DiskList, Disk> ListAsync(ListDisksRequest request, CallSettings callSettings = null)

Retrieves a list of persistent disks contained within the specified zone.

Parameters
NameDescription
requestListDisksRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableDiskListDisk

A pageable asynchronous sequence of Disk resources.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
ListDisksRequest request = new ListDisksRequest
{
    Zone = "",
    OrderBy = "",
    Project = "",
    Filter = "",
    ReturnPartialSuccess = false,
};
// Make the request
PagedAsyncEnumerable<DiskList, Disk> response = disksClient.ListAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Disk 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((DiskList page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Disk 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<Disk> 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 (Disk 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<DiskList, Disk> ListAsync(string project, string zone, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Retrieves a list of persistent disks contained within the specified zone.

Parameters
NameDescription
projectstring

Project ID for this request.

zonestring

The name of the zone for this request.

pageTokenstring

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

pageSizeint

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
PagedAsyncEnumerableDiskListDisk

A pageable asynchronous sequence of Disk resources.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
// Make the request
PagedAsyncEnumerable<DiskList, Disk> response = disksClient.ListAsync(project, zone);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Disk 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((DiskList page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Disk 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<Disk> 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 (Disk 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;

PollOnceAddResourcePolicies(string, CallSettings)

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

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

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
OperationOperationOperation

The result of polling the operation.

PollOnceAddResourcePoliciesAsync(string, CallSettings)

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

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

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
TaskOperationOperationOperation

A task representing the result of polling the operation.

PollOnceBulkInsert(string, CallSettings)

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

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

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
OperationOperationOperation

The result of polling the operation.

PollOnceBulkInsertAsync(string, CallSettings)

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

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

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
TaskOperationOperationOperation

A task representing the result of polling the operation.

PollOnceCreateSnapshot(string, CallSettings)

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

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

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
OperationOperationOperation

The result of polling the operation.

PollOnceCreateSnapshotAsync(string, CallSettings)

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

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

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
TaskOperationOperationOperation

A task representing the result of polling the operation.

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
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
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
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
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
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
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
TaskOperationOperationOperation

A task representing the result of polling the operation.

PollOnceRemoveResourcePolicies(string, CallSettings)

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

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

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
OperationOperationOperation

The result of polling the operation.

PollOnceRemoveResourcePoliciesAsync(string, CallSettings)

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

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

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
TaskOperationOperationOperation

A task representing the result of polling the operation.

PollOnceResize(string, CallSettings)

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

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

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
OperationOperationOperation

The result of polling the operation.

PollOnceResizeAsync(string, CallSettings)

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

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

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
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
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
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
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
TaskOperationOperationOperation

A task representing the result of polling the operation.

PollOnceStartAsyncReplication(string, CallSettings)

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

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

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
OperationOperationOperation

The result of polling the operation.

PollOnceStartAsyncReplicationAsync(string, CallSettings)

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

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

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
TaskOperationOperationOperation

A task representing the result of polling the operation.

PollOnceStopAsyncReplication(string, CallSettings)

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

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

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
OperationOperationOperation

The result of polling the operation.

PollOnceStopAsyncReplicationAsync(string, CallSettings)

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

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

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
TaskOperationOperationOperation

A task representing the result of polling the operation.

PollOnceStopGroupAsyncReplication(string, CallSettings)

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

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

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
OperationOperationOperation

The result of polling the operation.

PollOnceStopGroupAsyncReplicationAsync(string, CallSettings)

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

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

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
TaskOperationOperationOperation

A task representing the result of polling the operation.

PollOnceUpdate(string, CallSettings)

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

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

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
OperationOperationOperation

The result of polling the operation.

PollOnceUpdateAsync(string, CallSettings)

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

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

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
TaskOperationOperationOperation

A task representing the result of polling the operation.

RemoveResourcePolicies(RemoveResourcePoliciesDiskRequest, CallSettings)

public virtual Operation<Operation, Operation> RemoveResourcePolicies(RemoveResourcePoliciesDiskRequest request, CallSettings callSettings = null)

Removes resource policies from a disk.

Parameters
NameDescription
requestRemoveResourcePoliciesDiskRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// Create client
DisksClient disksClient = DisksClient.Create();
// Initialize request argument(s)
RemoveResourcePoliciesDiskRequest request = new RemoveResourcePoliciesDiskRequest
{
    Disk = "",
    Zone = "",
    RequestId = "",
    Project = "",
    DisksRemoveResourcePoliciesRequestResource = new DisksRemoveResourcePoliciesRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = disksClient.RemoveResourcePolicies(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 = disksClient.PollOnceRemoveResourcePolicies(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;
}

RemoveResourcePolicies(string, string, string, DisksRemoveResourcePoliciesRequest, CallSettings)

public virtual Operation<Operation, Operation> RemoveResourcePolicies(string project, string zone, string disk, DisksRemoveResourcePoliciesRequest disksRemoveResourcePoliciesRequestResource, CallSettings callSettings = null)

Removes resource policies from a disk.

Parameters
NameDescription
projectstring

Project ID for this request.

zonestring

The name of the zone for this request.

diskstring

The disk name for this request.

disksRemoveResourcePoliciesRequestResourceDisksRemoveResourcePoliciesRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// Create client
DisksClient disksClient = DisksClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string disk = "";
DisksRemoveResourcePoliciesRequest disksRemoveResourcePoliciesRequestResource = new DisksRemoveResourcePoliciesRequest();
// Make the request
lro::Operation<Operation, Operation> response = disksClient.RemoveResourcePolicies(project, zone, disk, disksRemoveResourcePoliciesRequestResource);

// 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 = disksClient.PollOnceRemoveResourcePolicies(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;
}

RemoveResourcePoliciesAsync(RemoveResourcePoliciesDiskRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> RemoveResourcePoliciesAsync(RemoveResourcePoliciesDiskRequest request, CallSettings callSettings = null)

Removes resource policies from a disk.

Parameters
NameDescription
requestRemoveResourcePoliciesDiskRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
RemoveResourcePoliciesDiskRequest request = new RemoveResourcePoliciesDiskRequest
{
    Disk = "",
    Zone = "",
    RequestId = "",
    Project = "",
    DisksRemoveResourcePoliciesRequestResource = new DisksRemoveResourcePoliciesRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = await disksClient.RemoveResourcePoliciesAsync(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 disksClient.PollOnceRemoveResourcePoliciesAsync(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;
}

RemoveResourcePoliciesAsync(RemoveResourcePoliciesDiskRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> RemoveResourcePoliciesAsync(RemoveResourcePoliciesDiskRequest request, CancellationToken cancellationToken)

Removes resource policies from a disk.

Parameters
NameDescription
requestRemoveResourcePoliciesDiskRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
RemoveResourcePoliciesDiskRequest request = new RemoveResourcePoliciesDiskRequest
{
    Disk = "",
    Zone = "",
    RequestId = "",
    Project = "",
    DisksRemoveResourcePoliciesRequestResource = new DisksRemoveResourcePoliciesRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = await disksClient.RemoveResourcePoliciesAsync(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 disksClient.PollOnceRemoveResourcePoliciesAsync(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;
}

RemoveResourcePoliciesAsync(string, string, string, DisksRemoveResourcePoliciesRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> RemoveResourcePoliciesAsync(string project, string zone, string disk, DisksRemoveResourcePoliciesRequest disksRemoveResourcePoliciesRequestResource, CallSettings callSettings = null)

Removes resource policies from a disk.

Parameters
NameDescription
projectstring

Project ID for this request.

zonestring

The name of the zone for this request.

diskstring

The disk name for this request.

disksRemoveResourcePoliciesRequestResourceDisksRemoveResourcePoliciesRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string disk = "";
DisksRemoveResourcePoliciesRequest disksRemoveResourcePoliciesRequestResource = new DisksRemoveResourcePoliciesRequest();
// Make the request
lro::Operation<Operation, Operation> response = await disksClient.RemoveResourcePoliciesAsync(project, zone, disk, disksRemoveResourcePoliciesRequestResource);

// 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 disksClient.PollOnceRemoveResourcePoliciesAsync(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;
}

RemoveResourcePoliciesAsync(string, string, string, DisksRemoveResourcePoliciesRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> RemoveResourcePoliciesAsync(string project, string zone, string disk, DisksRemoveResourcePoliciesRequest disksRemoveResourcePoliciesRequestResource, CancellationToken cancellationToken)

Removes resource policies from a disk.

Parameters
NameDescription
projectstring

Project ID for this request.

zonestring

The name of the zone for this request.

diskstring

The disk name for this request.

disksRemoveResourcePoliciesRequestResourceDisksRemoveResourcePoliciesRequest

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string disk = "";
DisksRemoveResourcePoliciesRequest disksRemoveResourcePoliciesRequestResource = new DisksRemoveResourcePoliciesRequest();
// Make the request
lro::Operation<Operation, Operation> response = await disksClient.RemoveResourcePoliciesAsync(project, zone, disk, disksRemoveResourcePoliciesRequestResource);

// 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 disksClient.PollOnceRemoveResourcePoliciesAsync(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;
}

Resize(ResizeDiskRequest, CallSettings)

public virtual Operation<Operation, Operation> Resize(ResizeDiskRequest request, CallSettings callSettings = null)

Resizes the specified persistent disk. You can only increase the size of the disk.

Parameters
NameDescription
requestResizeDiskRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// Create client
DisksClient disksClient = DisksClient.Create();
// Initialize request argument(s)
ResizeDiskRequest request = new ResizeDiskRequest
{
    Disk = "",
    Zone = "",
    RequestId = "",
    DisksResizeRequestResource = new DisksResizeRequest(),
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = disksClient.Resize(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 = disksClient.PollOnceResize(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;
}

Resize(string, string, string, DisksResizeRequest, CallSettings)

public virtual Operation<Operation, Operation> Resize(string project, string zone, string disk, DisksResizeRequest disksResizeRequestResource, CallSettings callSettings = null)

Resizes the specified persistent disk. You can only increase the size of the disk.

Parameters
NameDescription
projectstring

Project ID for this request.

zonestring

The name of the zone for this request.

diskstring

The name of the persistent disk.

disksResizeRequestResourceDisksResizeRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// Create client
DisksClient disksClient = DisksClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string disk = "";
DisksResizeRequest disksResizeRequestResource = new DisksResizeRequest();
// Make the request
lro::Operation<Operation, Operation> response = disksClient.Resize(project, zone, disk, disksResizeRequestResource);

// 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 = disksClient.PollOnceResize(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;
}

ResizeAsync(ResizeDiskRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> ResizeAsync(ResizeDiskRequest request, CallSettings callSettings = null)

Resizes the specified persistent disk. You can only increase the size of the disk.

Parameters
NameDescription
requestResizeDiskRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
ResizeDiskRequest request = new ResizeDiskRequest
{
    Disk = "",
    Zone = "",
    RequestId = "",
    DisksResizeRequestResource = new DisksResizeRequest(),
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await disksClient.ResizeAsync(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 disksClient.PollOnceResizeAsync(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;
}

ResizeAsync(ResizeDiskRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> ResizeAsync(ResizeDiskRequest request, CancellationToken cancellationToken)

Resizes the specified persistent disk. You can only increase the size of the disk.

Parameters
NameDescription
requestResizeDiskRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
ResizeDiskRequest request = new ResizeDiskRequest
{
    Disk = "",
    Zone = "",
    RequestId = "",
    DisksResizeRequestResource = new DisksResizeRequest(),
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await disksClient.ResizeAsync(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 disksClient.PollOnceResizeAsync(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;
}

ResizeAsync(string, string, string, DisksResizeRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> ResizeAsync(string project, string zone, string disk, DisksResizeRequest disksResizeRequestResource, CallSettings callSettings = null)

Resizes the specified persistent disk. You can only increase the size of the disk.

Parameters
NameDescription
projectstring

Project ID for this request.

zonestring

The name of the zone for this request.

diskstring

The name of the persistent disk.

disksResizeRequestResourceDisksResizeRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string disk = "";
DisksResizeRequest disksResizeRequestResource = new DisksResizeRequest();
// Make the request
lro::Operation<Operation, Operation> response = await disksClient.ResizeAsync(project, zone, disk, disksResizeRequestResource);

// 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 disksClient.PollOnceResizeAsync(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;
}

ResizeAsync(string, string, string, DisksResizeRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> ResizeAsync(string project, string zone, string disk, DisksResizeRequest disksResizeRequestResource, CancellationToken cancellationToken)

Resizes the specified persistent disk. You can only increase the size of the disk.

Parameters
NameDescription
projectstring

Project ID for this request.

zonestring

The name of the zone for this request.

diskstring

The name of the persistent disk.

disksResizeRequestResourceDisksResizeRequest

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string disk = "";
DisksResizeRequest disksResizeRequestResource = new DisksResizeRequest();
// Make the request
lro::Operation<Operation, Operation> response = await disksClient.ResizeAsync(project, zone, disk, disksResizeRequestResource);

// 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 disksClient.PollOnceResizeAsync(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;
}

SetIamPolicy(SetIamPolicyDiskRequest, CallSettings)

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

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

Parameters
NameDescription
requestSetIamPolicyDiskRequest

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
DisksClient disksClient = DisksClient.Create();
// Initialize request argument(s)
SetIamPolicyDiskRequest request = new SetIamPolicyDiskRequest
{
    Zone = "",
    Resource = "",
    Project = "",
    ZoneSetPolicyRequestResource = new ZoneSetPolicyRequest(),
};
// Make the request
Policy response = disksClient.SetIamPolicy(request);

SetIamPolicy(string, string, string, ZoneSetPolicyRequest, CallSettings)

public virtual Policy SetIamPolicy(string project, string zone, string resource, ZoneSetPolicyRequest zoneSetPolicyRequestResource, CallSettings callSettings = null)

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

Parameters
NameDescription
projectstring

Project ID for this request.

zonestring

The name of the zone for this request.

resourcestring

Name or id of the resource for this request.

zoneSetPolicyRequestResourceZoneSetPolicyRequest

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
DisksClient disksClient = DisksClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string resource = "";
ZoneSetPolicyRequest zoneSetPolicyRequestResource = new ZoneSetPolicyRequest();
// Make the request
Policy response = disksClient.SetIamPolicy(project, zone, resource, zoneSetPolicyRequestResource);

SetIamPolicyAsync(SetIamPolicyDiskRequest, CallSettings)

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

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

Parameters
NameDescription
requestSetIamPolicyDiskRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskPolicy

A Task containing the RPC response.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
SetIamPolicyDiskRequest request = new SetIamPolicyDiskRequest
{
    Zone = "",
    Resource = "",
    Project = "",
    ZoneSetPolicyRequestResource = new ZoneSetPolicyRequest(),
};
// Make the request
Policy response = await disksClient.SetIamPolicyAsync(request);

SetIamPolicyAsync(SetIamPolicyDiskRequest, CancellationToken)

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

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

Parameters
NameDescription
requestSetIamPolicyDiskRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskPolicy

A Task containing the RPC response.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
SetIamPolicyDiskRequest request = new SetIamPolicyDiskRequest
{
    Zone = "",
    Resource = "",
    Project = "",
    ZoneSetPolicyRequestResource = new ZoneSetPolicyRequest(),
};
// Make the request
Policy response = await disksClient.SetIamPolicyAsync(request);

SetIamPolicyAsync(string, string, string, ZoneSetPolicyRequest, CallSettings)

public virtual Task<Policy> SetIamPolicyAsync(string project, string zone, string resource, ZoneSetPolicyRequest zoneSetPolicyRequestResource, CallSettings callSettings = null)

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

Parameters
NameDescription
projectstring

Project ID for this request.

zonestring

The name of the zone for this request.

resourcestring

Name or id of the resource for this request.

zoneSetPolicyRequestResourceZoneSetPolicyRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskPolicy

A Task containing the RPC response.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string resource = "";
ZoneSetPolicyRequest zoneSetPolicyRequestResource = new ZoneSetPolicyRequest();
// Make the request
Policy response = await disksClient.SetIamPolicyAsync(project, zone, resource, zoneSetPolicyRequestResource);

SetIamPolicyAsync(string, string, string, ZoneSetPolicyRequest, CancellationToken)

public virtual Task<Policy> SetIamPolicyAsync(string project, string zone, string resource, ZoneSetPolicyRequest zoneSetPolicyRequestResource, CancellationToken cancellationToken)

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

Parameters
NameDescription
projectstring

Project ID for this request.

zonestring

The name of the zone for this request.

resourcestring

Name or id of the resource for this request.

zoneSetPolicyRequestResourceZoneSetPolicyRequest

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskPolicy

A Task containing the RPC response.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string resource = "";
ZoneSetPolicyRequest zoneSetPolicyRequestResource = new ZoneSetPolicyRequest();
// Make the request
Policy response = await disksClient.SetIamPolicyAsync(project, zone, resource, zoneSetPolicyRequestResource);

SetLabels(SetLabelsDiskRequest, CallSettings)

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

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

Parameters
NameDescription
requestSetLabelsDiskRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// Create client
DisksClient disksClient = DisksClient.Create();
// Initialize request argument(s)
SetLabelsDiskRequest request = new SetLabelsDiskRequest
{
    Zone = "",
    RequestId = "",
    Resource = "",
    Project = "",
    ZoneSetLabelsRequestResource = new ZoneSetLabelsRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = disksClient.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 = disksClient.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, ZoneSetLabelsRequest, CallSettings)

public virtual Operation<Operation, Operation> SetLabels(string project, string zone, string resource, ZoneSetLabelsRequest zoneSetLabelsRequestResource, CallSettings callSettings = null)

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

Parameters
NameDescription
projectstring

Project ID for this request.

zonestring

The name of the zone for this request.

resourcestring

Name or id of the resource for this request.

zoneSetLabelsRequestResourceZoneSetLabelsRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// Create client
DisksClient disksClient = DisksClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string resource = "";
ZoneSetLabelsRequest zoneSetLabelsRequestResource = new ZoneSetLabelsRequest();
// Make the request
lro::Operation<Operation, Operation> response = disksClient.SetLabels(project, zone, resource, zoneSetLabelsRequestResource);

// 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 = disksClient.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(SetLabelsDiskRequest, CallSettings)

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

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

Parameters
NameDescription
requestSetLabelsDiskRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
SetLabelsDiskRequest request = new SetLabelsDiskRequest
{
    Zone = "",
    RequestId = "",
    Resource = "",
    Project = "",
    ZoneSetLabelsRequestResource = new ZoneSetLabelsRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = await disksClient.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 disksClient.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(SetLabelsDiskRequest, CancellationToken)

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

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

Parameters
NameDescription
requestSetLabelsDiskRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
SetLabelsDiskRequest request = new SetLabelsDiskRequest
{
    Zone = "",
    RequestId = "",
    Resource = "",
    Project = "",
    ZoneSetLabelsRequestResource = new ZoneSetLabelsRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = await disksClient.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 disksClient.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, ZoneSetLabelsRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> SetLabelsAsync(string project, string zone, string resource, ZoneSetLabelsRequest zoneSetLabelsRequestResource, CallSettings callSettings = null)

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

Parameters
NameDescription
projectstring

Project ID for this request.

zonestring

The name of the zone for this request.

resourcestring

Name or id of the resource for this request.

zoneSetLabelsRequestResourceZoneSetLabelsRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string resource = "";
ZoneSetLabelsRequest zoneSetLabelsRequestResource = new ZoneSetLabelsRequest();
// Make the request
lro::Operation<Operation, Operation> response = await disksClient.SetLabelsAsync(project, zone, resource, zoneSetLabelsRequestResource);

// 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 disksClient.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, ZoneSetLabelsRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> SetLabelsAsync(string project, string zone, string resource, ZoneSetLabelsRequest zoneSetLabelsRequestResource, CancellationToken cancellationToken)

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

Parameters
NameDescription
projectstring

Project ID for this request.

zonestring

The name of the zone for this request.

resourcestring

Name or id of the resource for this request.

zoneSetLabelsRequestResourceZoneSetLabelsRequest

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string resource = "";
ZoneSetLabelsRequest zoneSetLabelsRequestResource = new ZoneSetLabelsRequest();
// Make the request
lro::Operation<Operation, Operation> response = await disksClient.SetLabelsAsync(project, zone, resource, zoneSetLabelsRequestResource);

// 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 disksClient.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.

StartAsyncReplication(StartAsyncReplicationDiskRequest, CallSettings)

public virtual Operation<Operation, Operation> StartAsyncReplication(StartAsyncReplicationDiskRequest request, CallSettings callSettings = null)

Starts asynchronous replication. Must be invoked on the primary disk.

Parameters
NameDescription
requestStartAsyncReplicationDiskRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// Create client
DisksClient disksClient = DisksClient.Create();
// Initialize request argument(s)
StartAsyncReplicationDiskRequest request = new StartAsyncReplicationDiskRequest
{
    Disk = "",
    Zone = "",
    RequestId = "",
    Project = "",
    DisksStartAsyncReplicationRequestResource = new DisksStartAsyncReplicationRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = disksClient.StartAsyncReplication(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 = disksClient.PollOnceStartAsyncReplication(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;
}

StartAsyncReplication(string, string, string, DisksStartAsyncReplicationRequest, CallSettings)

public virtual Operation<Operation, Operation> StartAsyncReplication(string project, string zone, string disk, DisksStartAsyncReplicationRequest disksStartAsyncReplicationRequestResource, CallSettings callSettings = null)

Starts asynchronous replication. Must be invoked on the primary disk.

Parameters
NameDescription
projectstring

Project ID for this request.

zonestring

The name of the zone for this request.

diskstring

The name of the persistent disk.

disksStartAsyncReplicationRequestResourceDisksStartAsyncReplicationRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// Create client
DisksClient disksClient = DisksClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string disk = "";
DisksStartAsyncReplicationRequest disksStartAsyncReplicationRequestResource = new DisksStartAsyncReplicationRequest();
// Make the request
lro::Operation<Operation, Operation> response = disksClient.StartAsyncReplication(project, zone, disk, disksStartAsyncReplicationRequestResource);

// 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 = disksClient.PollOnceStartAsyncReplication(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;
}

StartAsyncReplicationAsync(StartAsyncReplicationDiskRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> StartAsyncReplicationAsync(StartAsyncReplicationDiskRequest request, CallSettings callSettings = null)

Starts asynchronous replication. Must be invoked on the primary disk.

Parameters
NameDescription
requestStartAsyncReplicationDiskRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
StartAsyncReplicationDiskRequest request = new StartAsyncReplicationDiskRequest
{
    Disk = "",
    Zone = "",
    RequestId = "",
    Project = "",
    DisksStartAsyncReplicationRequestResource = new DisksStartAsyncReplicationRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = await disksClient.StartAsyncReplicationAsync(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 disksClient.PollOnceStartAsyncReplicationAsync(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;
}

StartAsyncReplicationAsync(StartAsyncReplicationDiskRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> StartAsyncReplicationAsync(StartAsyncReplicationDiskRequest request, CancellationToken cancellationToken)

Starts asynchronous replication. Must be invoked on the primary disk.

Parameters
NameDescription
requestStartAsyncReplicationDiskRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
StartAsyncReplicationDiskRequest request = new StartAsyncReplicationDiskRequest
{
    Disk = "",
    Zone = "",
    RequestId = "",
    Project = "",
    DisksStartAsyncReplicationRequestResource = new DisksStartAsyncReplicationRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = await disksClient.StartAsyncReplicationAsync(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 disksClient.PollOnceStartAsyncReplicationAsync(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;
}

StartAsyncReplicationAsync(string, string, string, DisksStartAsyncReplicationRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> StartAsyncReplicationAsync(string project, string zone, string disk, DisksStartAsyncReplicationRequest disksStartAsyncReplicationRequestResource, CallSettings callSettings = null)

Starts asynchronous replication. Must be invoked on the primary disk.

Parameters
NameDescription
projectstring

Project ID for this request.

zonestring

The name of the zone for this request.

diskstring

The name of the persistent disk.

disksStartAsyncReplicationRequestResourceDisksStartAsyncReplicationRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string disk = "";
DisksStartAsyncReplicationRequest disksStartAsyncReplicationRequestResource = new DisksStartAsyncReplicationRequest();
// Make the request
lro::Operation<Operation, Operation> response = await disksClient.StartAsyncReplicationAsync(project, zone, disk, disksStartAsyncReplicationRequestResource);

// 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 disksClient.PollOnceStartAsyncReplicationAsync(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;
}

StartAsyncReplicationAsync(string, string, string, DisksStartAsyncReplicationRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> StartAsyncReplicationAsync(string project, string zone, string disk, DisksStartAsyncReplicationRequest disksStartAsyncReplicationRequestResource, CancellationToken cancellationToken)

Starts asynchronous replication. Must be invoked on the primary disk.

Parameters
NameDescription
projectstring

Project ID for this request.

zonestring

The name of the zone for this request.

diskstring

The name of the persistent disk.

disksStartAsyncReplicationRequestResourceDisksStartAsyncReplicationRequest

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string disk = "";
DisksStartAsyncReplicationRequest disksStartAsyncReplicationRequestResource = new DisksStartAsyncReplicationRequest();
// Make the request
lro::Operation<Operation, Operation> response = await disksClient.StartAsyncReplicationAsync(project, zone, disk, disksStartAsyncReplicationRequestResource);

// 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 disksClient.PollOnceStartAsyncReplicationAsync(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;
}

StopAsyncReplication(StopAsyncReplicationDiskRequest, CallSettings)

public virtual Operation<Operation, Operation> StopAsyncReplication(StopAsyncReplicationDiskRequest request, CallSettings callSettings = null)

Stops asynchronous replication. Can be invoked either on the primary or on the secondary disk.

Parameters
NameDescription
requestStopAsyncReplicationDiskRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// Create client
DisksClient disksClient = DisksClient.Create();
// Initialize request argument(s)
StopAsyncReplicationDiskRequest request = new StopAsyncReplicationDiskRequest
{
    Disk = "",
    Zone = "",
    RequestId = "",
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = disksClient.StopAsyncReplication(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 = disksClient.PollOnceStopAsyncReplication(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;
}

StopAsyncReplication(string, string, string, CallSettings)

public virtual Operation<Operation, Operation> StopAsyncReplication(string project, string zone, string disk, CallSettings callSettings = null)

Stops asynchronous replication. Can be invoked either on the primary or on the secondary disk.

Parameters
NameDescription
projectstring

Project ID for this request.

zonestring

The name of the zone for this request.

diskstring

The name of the persistent disk.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// Create client
DisksClient disksClient = DisksClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string disk = "";
// Make the request
lro::Operation<Operation, Operation> response = disksClient.StopAsyncReplication(project, zone, disk);

// 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 = disksClient.PollOnceStopAsyncReplication(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;
}

StopAsyncReplicationAsync(StopAsyncReplicationDiskRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> StopAsyncReplicationAsync(StopAsyncReplicationDiskRequest request, CallSettings callSettings = null)

Stops asynchronous replication. Can be invoked either on the primary or on the secondary disk.

Parameters
NameDescription
requestStopAsyncReplicationDiskRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
StopAsyncReplicationDiskRequest request = new StopAsyncReplicationDiskRequest
{
    Disk = "",
    Zone = "",
    RequestId = "",
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await disksClient.StopAsyncReplicationAsync(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 disksClient.PollOnceStopAsyncReplicationAsync(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;
}

StopAsyncReplicationAsync(StopAsyncReplicationDiskRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> StopAsyncReplicationAsync(StopAsyncReplicationDiskRequest request, CancellationToken cancellationToken)

Stops asynchronous replication. Can be invoked either on the primary or on the secondary disk.

Parameters
NameDescription
requestStopAsyncReplicationDiskRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
StopAsyncReplicationDiskRequest request = new StopAsyncReplicationDiskRequest
{
    Disk = "",
    Zone = "",
    RequestId = "",
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await disksClient.StopAsyncReplicationAsync(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 disksClient.PollOnceStopAsyncReplicationAsync(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;
}

StopAsyncReplicationAsync(string, string, string, CallSettings)

public virtual Task<Operation<Operation, Operation>> StopAsyncReplicationAsync(string project, string zone, string disk, CallSettings callSettings = null)

Stops asynchronous replication. Can be invoked either on the primary or on the secondary disk.

Parameters
NameDescription
projectstring

Project ID for this request.

zonestring

The name of the zone for this request.

diskstring

The name of the persistent disk.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string disk = "";
// Make the request
lro::Operation<Operation, Operation> response = await disksClient.StopAsyncReplicationAsync(project, zone, disk);

// 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 disksClient.PollOnceStopAsyncReplicationAsync(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;
}

StopAsyncReplicationAsync(string, string, string, CancellationToken)

public virtual Task<Operation<Operation, Operation>> StopAsyncReplicationAsync(string project, string zone, string disk, CancellationToken cancellationToken)

Stops asynchronous replication. Can be invoked either on the primary or on the secondary disk.

Parameters
NameDescription
projectstring

Project ID for this request.

zonestring

The name of the zone for this request.

diskstring

The name of the persistent disk.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string disk = "";
// Make the request
lro::Operation<Operation, Operation> response = await disksClient.StopAsyncReplicationAsync(project, zone, disk);

// 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 disksClient.PollOnceStopAsyncReplicationAsync(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;
}

StopGroupAsyncReplication(StopGroupAsyncReplicationDiskRequest, CallSettings)

public virtual Operation<Operation, Operation> StopGroupAsyncReplication(StopGroupAsyncReplicationDiskRequest request, CallSettings callSettings = null)

Stops asynchronous replication for a consistency group of disks. Can be invoked either in the primary or secondary scope.

Parameters
NameDescription
requestStopGroupAsyncReplicationDiskRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// Create client
DisksClient disksClient = DisksClient.Create();
// Initialize request argument(s)
StopGroupAsyncReplicationDiskRequest request = new StopGroupAsyncReplicationDiskRequest
{
    Zone = "",
    RequestId = "",
    Project = "",
    DisksStopGroupAsyncReplicationResourceResource = new DisksStopGroupAsyncReplicationResource(),
};
// Make the request
lro::Operation<Operation, Operation> response = disksClient.StopGroupAsyncReplication(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 = disksClient.PollOnceStopGroupAsyncReplication(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;
}

StopGroupAsyncReplication(string, string, DisksStopGroupAsyncReplicationResource, CallSettings)

public virtual Operation<Operation, Operation> StopGroupAsyncReplication(string project, string zone, DisksStopGroupAsyncReplicationResource disksStopGroupAsyncReplicationResourceResource, CallSettings callSettings = null)

Stops asynchronous replication for a consistency group of disks. Can be invoked either in the primary or secondary scope.

Parameters
NameDescription
projectstring

Project ID for this request.

zonestring

The name of the zone for this request. This must be the zone of the primary or secondary disks in the consistency group.

disksStopGroupAsyncReplicationResourceResourceDisksStopGroupAsyncReplicationResource

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// Create client
DisksClient disksClient = DisksClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
DisksStopGroupAsyncReplicationResource disksStopGroupAsyncReplicationResourceResource = new DisksStopGroupAsyncReplicationResource();
// Make the request
lro::Operation<Operation, Operation> response = disksClient.StopGroupAsyncReplication(project, zone, disksStopGroupAsyncReplicationResourceResource);

// 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 = disksClient.PollOnceStopGroupAsyncReplication(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;
}

StopGroupAsyncReplicationAsync(StopGroupAsyncReplicationDiskRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> StopGroupAsyncReplicationAsync(StopGroupAsyncReplicationDiskRequest request, CallSettings callSettings = null)

Stops asynchronous replication for a consistency group of disks. Can be invoked either in the primary or secondary scope.

Parameters
NameDescription
requestStopGroupAsyncReplicationDiskRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
StopGroupAsyncReplicationDiskRequest request = new StopGroupAsyncReplicationDiskRequest
{
    Zone = "",
    RequestId = "",
    Project = "",
    DisksStopGroupAsyncReplicationResourceResource = new DisksStopGroupAsyncReplicationResource(),
};
// Make the request
lro::Operation<Operation, Operation> response = await disksClient.StopGroupAsyncReplicationAsync(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 disksClient.PollOnceStopGroupAsyncReplicationAsync(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;
}

StopGroupAsyncReplicationAsync(StopGroupAsyncReplicationDiskRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> StopGroupAsyncReplicationAsync(StopGroupAsyncReplicationDiskRequest request, CancellationToken cancellationToken)

Stops asynchronous replication for a consistency group of disks. Can be invoked either in the primary or secondary scope.

Parameters
NameDescription
requestStopGroupAsyncReplicationDiskRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
StopGroupAsyncReplicationDiskRequest request = new StopGroupAsyncReplicationDiskRequest
{
    Zone = "",
    RequestId = "",
    Project = "",
    DisksStopGroupAsyncReplicationResourceResource = new DisksStopGroupAsyncReplicationResource(),
};
// Make the request
lro::Operation<Operation, Operation> response = await disksClient.StopGroupAsyncReplicationAsync(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 disksClient.PollOnceStopGroupAsyncReplicationAsync(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;
}

StopGroupAsyncReplicationAsync(string, string, DisksStopGroupAsyncReplicationResource, CallSettings)

public virtual Task<Operation<Operation, Operation>> StopGroupAsyncReplicationAsync(string project, string zone, DisksStopGroupAsyncReplicationResource disksStopGroupAsyncReplicationResourceResource, CallSettings callSettings = null)

Stops asynchronous replication for a consistency group of disks. Can be invoked either in the primary or secondary scope.

Parameters
NameDescription
projectstring

Project ID for this request.

zonestring

The name of the zone for this request. This must be the zone of the primary or secondary disks in the consistency group.

disksStopGroupAsyncReplicationResourceResourceDisksStopGroupAsyncReplicationResource

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
DisksStopGroupAsyncReplicationResource disksStopGroupAsyncReplicationResourceResource = new DisksStopGroupAsyncReplicationResource();
// Make the request
lro::Operation<Operation, Operation> response = await disksClient.StopGroupAsyncReplicationAsync(project, zone, disksStopGroupAsyncReplicationResourceResource);

// 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 disksClient.PollOnceStopGroupAsyncReplicationAsync(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;
}

StopGroupAsyncReplicationAsync(string, string, DisksStopGroupAsyncReplicationResource, CancellationToken)

public virtual Task<Operation<Operation, Operation>> StopGroupAsyncReplicationAsync(string project, string zone, DisksStopGroupAsyncReplicationResource disksStopGroupAsyncReplicationResourceResource, CancellationToken cancellationToken)

Stops asynchronous replication for a consistency group of disks. Can be invoked either in the primary or secondary scope.

Parameters
NameDescription
projectstring

Project ID for this request.

zonestring

The name of the zone for this request. This must be the zone of the primary or secondary disks in the consistency group.

disksStopGroupAsyncReplicationResourceResourceDisksStopGroupAsyncReplicationResource

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
DisksStopGroupAsyncReplicationResource disksStopGroupAsyncReplicationResourceResource = new DisksStopGroupAsyncReplicationResource();
// Make the request
lro::Operation<Operation, Operation> response = await disksClient.StopGroupAsyncReplicationAsync(project, zone, disksStopGroupAsyncReplicationResourceResource);

// 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 disksClient.PollOnceStopGroupAsyncReplicationAsync(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;
}

TestIamPermissions(TestIamPermissionsDiskRequest, CallSettings)

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

Returns permissions that a caller has on the specified resource.

Parameters
NameDescription
requestTestIamPermissionsDiskRequest

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
DisksClient disksClient = DisksClient.Create();
// Initialize request argument(s)
TestIamPermissionsDiskRequest request = new TestIamPermissionsDiskRequest
{
    Zone = "",
    Resource = "",
    Project = "",
    TestPermissionsRequestResource = new TestPermissionsRequest(),
};
// Make the request
TestPermissionsResponse response = disksClient.TestIamPermissions(request);

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

public virtual TestPermissionsResponse TestIamPermissions(string project, string zone, 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.

zonestring

The name of the zone 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
DisksClient disksClient = DisksClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string resource = "";
TestPermissionsRequest testPermissionsRequestResource = new TestPermissionsRequest();
// Make the request
TestPermissionsResponse response = disksClient.TestIamPermissions(project, zone, resource, testPermissionsRequestResource);

TestIamPermissionsAsync(TestIamPermissionsDiskRequest, CallSettings)

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

Returns permissions that a caller has on the specified resource.

Parameters
NameDescription
requestTestIamPermissionsDiskRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskTestPermissionsResponse

A Task containing the RPC response.

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

TestIamPermissionsAsync(TestIamPermissionsDiskRequest, CancellationToken)

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

Returns permissions that a caller has on the specified resource.

Parameters
NameDescription
requestTestIamPermissionsDiskRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskTestPermissionsResponse

A Task containing the RPC response.

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

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

public virtual Task<TestPermissionsResponse> TestIamPermissionsAsync(string project, string zone, 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.

zonestring

The name of the zone 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
TaskTestPermissionsResponse

A Task containing the RPC response.

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

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

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

Returns permissions that a caller has on the specified resource.

Parameters
NameDescription
projectstring

Project ID for this request.

zonestring

The name of the zone 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
TaskTestPermissionsResponse

A Task containing the RPC response.

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

Update(UpdateDiskRequest, CallSettings)

public virtual Operation<Operation, Operation> Update(UpdateDiskRequest request, CallSettings callSettings = null)

Updates the specified disk with the data included in the request. The update is performed only on selected fields included as part of update-mask. Only the following fields can be modified: user_license.

Parameters
NameDescription
requestUpdateDiskRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// Create client
DisksClient disksClient = DisksClient.Create();
// Initialize request argument(s)
UpdateDiskRequest request = new UpdateDiskRequest
{
    Disk = "",
    Zone = "",
    DiskResource = new Disk(),
    RequestId = "",
    Paths = "",
    Project = "",
    UpdateMask = "",
};
// Make the request
lro::Operation<Operation, Operation> response = disksClient.Update(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 = disksClient.PollOnceUpdate(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;
}

Update(string, string, string, Disk, CallSettings)

public virtual Operation<Operation, Operation> Update(string project, string zone, string disk, Disk diskResource, CallSettings callSettings = null)

Updates the specified disk with the data included in the request. The update is performed only on selected fields included as part of update-mask. Only the following fields can be modified: user_license.

Parameters
NameDescription
projectstring

Project ID for this request.

zonestring

The name of the zone for this request.

diskstring

The disk name for this request.

diskResourceDisk

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// Create client
DisksClient disksClient = DisksClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string disk = "";
Disk diskResource = new Disk();
// Make the request
lro::Operation<Operation, Operation> response = disksClient.Update(project, zone, disk, diskResource);

// 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 = disksClient.PollOnceUpdate(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;
}

UpdateAsync(UpdateDiskRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> UpdateAsync(UpdateDiskRequest request, CallSettings callSettings = null)

Updates the specified disk with the data included in the request. The update is performed only on selected fields included as part of update-mask. Only the following fields can be modified: user_license.

Parameters
NameDescription
requestUpdateDiskRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
UpdateDiskRequest request = new UpdateDiskRequest
{
    Disk = "",
    Zone = "",
    DiskResource = new Disk(),
    RequestId = "",
    Paths = "",
    Project = "",
    UpdateMask = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await disksClient.UpdateAsync(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 disksClient.PollOnceUpdateAsync(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;
}

UpdateAsync(UpdateDiskRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> UpdateAsync(UpdateDiskRequest request, CancellationToken cancellationToken)

Updates the specified disk with the data included in the request. The update is performed only on selected fields included as part of update-mask. Only the following fields can be modified: user_license.

Parameters
NameDescription
requestUpdateDiskRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
UpdateDiskRequest request = new UpdateDiskRequest
{
    Disk = "",
    Zone = "",
    DiskResource = new Disk(),
    RequestId = "",
    Paths = "",
    Project = "",
    UpdateMask = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await disksClient.UpdateAsync(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 disksClient.PollOnceUpdateAsync(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;
}

UpdateAsync(string, string, string, Disk, CallSettings)

public virtual Task<Operation<Operation, Operation>> UpdateAsync(string project, string zone, string disk, Disk diskResource, CallSettings callSettings = null)

Updates the specified disk with the data included in the request. The update is performed only on selected fields included as part of update-mask. Only the following fields can be modified: user_license.

Parameters
NameDescription
projectstring

Project ID for this request.

zonestring

The name of the zone for this request.

diskstring

The disk name for this request.

diskResourceDisk

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string disk = "";
Disk diskResource = new Disk();
// Make the request
lro::Operation<Operation, Operation> response = await disksClient.UpdateAsync(project, zone, disk, diskResource);

// 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 disksClient.PollOnceUpdateAsync(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;
}

UpdateAsync(string, string, string, Disk, CancellationToken)

public virtual Task<Operation<Operation, Operation>> UpdateAsync(string project, string zone, string disk, Disk diskResource, CancellationToken cancellationToken)

Updates the specified disk with the data included in the request. The update is performed only on selected fields included as part of update-mask. Only the following fields can be modified: user_license.

Parameters
NameDescription
projectstring

Project ID for this request.

zonestring

The name of the zone for this request.

diskstring

The disk name for this request.

diskResourceDisk

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
DisksClient disksClient = await DisksClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string disk = "";
Disk diskResource = new Disk();
// Make the request
lro::Operation<Operation, Operation> response = await disksClient.UpdateAsync(project, zone, disk, diskResource);

// 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 disksClient.PollOnceUpdateAsync(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;
}