Compute Engine v1 API - Class StoragePoolsClient (2.17.0)

public abstract class StoragePoolsClient

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

StoragePools client wrapper, for convenient use.

Inheritance

object > StoragePoolsClient

Derived Types

Namespace

Google.Cloud.Compute.V1

Assembly

Google.Cloud.Compute.V1.dll

Remarks

The StoragePools API.

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
Type Description
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default StoragePools scopes.

Property Value
Type Description
IReadOnlyListstring
Remarks

DeleteOperationsClient

public virtual OperationsClient DeleteOperationsClient { get; }

The long-running operations client for Delete.

Property Value
Type Description
OperationsClient

GrpcClient

public virtual StoragePools.StoragePoolsClient GrpcClient { get; }

The underlying gRPC StoragePools client

Property Value
Type Description
StoragePoolsStoragePoolsClient

InsertOperationsClient

public virtual OperationsClient InsertOperationsClient { get; }

The long-running operations client for Insert.

Property Value
Type Description
OperationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
Type Description
ServiceMetadata

UpdateOperationsClient

public virtual OperationsClient UpdateOperationsClient { get; }

The long-running operations client for Update.

Property Value
Type Description
OperationsClient

Methods

AggregatedList(AggregatedListStoragePoolsRequest, CallSettings)

public virtual PagedEnumerable<StoragePoolAggregatedList, KeyValuePair<string, StoragePoolsScopedList>> AggregatedList(AggregatedListStoragePoolsRequest request, CallSettings callSettings = null)

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

Parameters
Name Description
request AggregatedListStoragePoolsRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableStoragePoolAggregatedListKeyValuePairstringStoragePoolsScopedList

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

Example
// Create client
StoragePoolsClient storagePoolsClient = StoragePoolsClient.Create();
// Initialize request argument(s)
AggregatedListStoragePoolsRequest request = new AggregatedListStoragePoolsRequest
{
    OrderBy = "",
    Project = "",
    ServiceProjectNumber = 0L,
    Filter = "",
    IncludeAllScopes = false,
    ReturnPartialSuccess = false,
};
// Make the request
PagedEnumerable<StoragePoolAggregatedList, KeyValuePair<string, StoragePoolsScopedList>> response = storagePoolsClient.AggregatedList(request);

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

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

Parameters
Name Description
project string

Project ID for this request.

pageToken string

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

pageSize int

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableStoragePoolAggregatedListKeyValuePairstringStoragePoolsScopedList

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

Example
// Create client
StoragePoolsClient storagePoolsClient = StoragePoolsClient.Create();
// Initialize request argument(s)
string project = "";
// Make the request
PagedEnumerable<StoragePoolAggregatedList, KeyValuePair<string, StoragePoolsScopedList>> response = storagePoolsClient.AggregatedList(project);

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

public virtual PagedAsyncEnumerable<StoragePoolAggregatedList, KeyValuePair<string, StoragePoolsScopedList>> AggregatedListAsync(AggregatedListStoragePoolsRequest request, CallSettings callSettings = null)

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

Parameters
Name Description
request AggregatedListStoragePoolsRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableStoragePoolAggregatedListKeyValuePairstringStoragePoolsScopedList

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

Example
// Create client
StoragePoolsClient storagePoolsClient = await StoragePoolsClient.CreateAsync();
// Initialize request argument(s)
AggregatedListStoragePoolsRequest request = new AggregatedListStoragePoolsRequest
{
    OrderBy = "",
    Project = "",
    ServiceProjectNumber = 0L,
    Filter = "",
    IncludeAllScopes = false,
    ReturnPartialSuccess = false,
};
// Make the request
PagedAsyncEnumerable<StoragePoolAggregatedList, KeyValuePair<string, StoragePoolsScopedList>> response = storagePoolsClient.AggregatedListAsync(request);

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

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

Parameters
Name Description
project string

Project ID for this request.

pageToken string

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

pageSize int

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableStoragePoolAggregatedListKeyValuePairstringStoragePoolsScopedList

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

Example
// Create client
StoragePoolsClient storagePoolsClient = await StoragePoolsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
// Make the request
PagedAsyncEnumerable<StoragePoolAggregatedList, KeyValuePair<string, StoragePoolsScopedList>> response = storagePoolsClient.AggregatedListAsync(project);

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

Create()

public static StoragePoolsClient Create()

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

Returns
Type Description
StoragePoolsClient

The created StoragePoolsClient.

CreateAsync(CancellationToken)

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

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

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskStoragePoolsClient

The task representing the created StoragePoolsClient.

Delete(DeleteStoragePoolRequest, CallSettings)

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

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

Parameters
Name Description
request DeleteStoragePoolRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The RPC response.

Example
// Create client
StoragePoolsClient storagePoolsClient = StoragePoolsClient.Create();
// Initialize request argument(s)
DeleteStoragePoolRequest request = new DeleteStoragePoolRequest
{
    Zone = "",
    RequestId = "",
    Project = "",
    StoragePool = "",
};
// Make the request
lro::Operation<Operation, Operation> response = storagePoolsClient.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 = storagePoolsClient.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 storagePool, CallSettings callSettings = null)

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

Parameters
Name Description
project string

Project ID for this request.

zone string

The name of the zone for this request.

storagePool string

Name of the storage pool to delete.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The RPC response.

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

// 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 = storagePoolsClient.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(DeleteStoragePoolRequest, CallSettings)

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

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

Parameters
Name Description
request DeleteStoragePoolRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

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

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

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

Parameters
Name Description
request DeleteStoragePoolRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
StoragePoolsClient storagePoolsClient = await StoragePoolsClient.CreateAsync();
// Initialize request argument(s)
DeleteStoragePoolRequest request = new DeleteStoragePoolRequest
{
    Zone = "",
    RequestId = "",
    Project = "",
    StoragePool = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await storagePoolsClient.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 storagePoolsClient.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 storagePool, CallSettings callSettings = null)

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

Parameters
Name Description
project string

Project ID for this request.

zone string

The name of the zone for this request.

storagePool string

Name of the storage pool to delete.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

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

// 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 storagePoolsClient.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 storagePool, CancellationToken cancellationToken)

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

Parameters
Name Description
project string

Project ID for this request.

zone string

The name of the zone for this request.

storagePool string

Name of the storage pool to delete.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

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

// 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 storagePoolsClient.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(GetStoragePoolRequest, CallSettings)

public virtual StoragePool Get(GetStoragePoolRequest request, CallSettings callSettings = null)

Returns a specified storage pool. Gets a list of available storage pools by making a list() request.

Parameters
Name Description
request GetStoragePoolRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
StoragePool

The RPC response.

Example
// Create client
StoragePoolsClient storagePoolsClient = StoragePoolsClient.Create();
// Initialize request argument(s)
GetStoragePoolRequest request = new GetStoragePoolRequest
{
    Zone = "",
    Project = "",
    StoragePool = "",
};
// Make the request
StoragePool response = storagePoolsClient.Get(request);

Get(string, string, string, CallSettings)

public virtual StoragePool Get(string project, string zone, string storagePool, CallSettings callSettings = null)

Returns a specified storage pool. Gets a list of available storage pools by making a list() request.

Parameters
Name Description
project string

Project ID for this request.

zone string

The name of the zone for this request.

storagePool string

Name of the storage pool to return.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
StoragePool

The RPC response.

Example
// Create client
StoragePoolsClient storagePoolsClient = StoragePoolsClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string storagePool = "";
// Make the request
StoragePool response = storagePoolsClient.Get(project, zone, storagePool);

GetAsync(GetStoragePoolRequest, CallSettings)

public virtual Task<StoragePool> GetAsync(GetStoragePoolRequest request, CallSettings callSettings = null)

Returns a specified storage pool. Gets a list of available storage pools by making a list() request.

Parameters
Name Description
request GetStoragePoolRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskStoragePool

A Task containing the RPC response.

Example
// Create client
StoragePoolsClient storagePoolsClient = await StoragePoolsClient.CreateAsync();
// Initialize request argument(s)
GetStoragePoolRequest request = new GetStoragePoolRequest
{
    Zone = "",
    Project = "",
    StoragePool = "",
};
// Make the request
StoragePool response = await storagePoolsClient.GetAsync(request);

GetAsync(GetStoragePoolRequest, CancellationToken)

public virtual Task<StoragePool> GetAsync(GetStoragePoolRequest request, CancellationToken cancellationToken)

Returns a specified storage pool. Gets a list of available storage pools by making a list() request.

Parameters
Name Description
request GetStoragePoolRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskStoragePool

A Task containing the RPC response.

Example
// Create client
StoragePoolsClient storagePoolsClient = await StoragePoolsClient.CreateAsync();
// Initialize request argument(s)
GetStoragePoolRequest request = new GetStoragePoolRequest
{
    Zone = "",
    Project = "",
    StoragePool = "",
};
// Make the request
StoragePool response = await storagePoolsClient.GetAsync(request);

GetAsync(string, string, string, CallSettings)

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

Returns a specified storage pool. Gets a list of available storage pools by making a list() request.

Parameters
Name Description
project string

Project ID for this request.

zone string

The name of the zone for this request.

storagePool string

Name of the storage pool to return.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskStoragePool

A Task containing the RPC response.

Example
// Create client
StoragePoolsClient storagePoolsClient = await StoragePoolsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string storagePool = "";
// Make the request
StoragePool response = await storagePoolsClient.GetAsync(project, zone, storagePool);

GetAsync(string, string, string, CancellationToken)

public virtual Task<StoragePool> GetAsync(string project, string zone, string storagePool, CancellationToken cancellationToken)

Returns a specified storage pool. Gets a list of available storage pools by making a list() request.

Parameters
Name Description
project string

Project ID for this request.

zone string

The name of the zone for this request.

storagePool string

Name of the storage pool to return.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskStoragePool

A Task containing the RPC response.

Example
// Create client
StoragePoolsClient storagePoolsClient = await StoragePoolsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string storagePool = "";
// Make the request
StoragePool response = await storagePoolsClient.GetAsync(project, zone, storagePool);

GetIamPolicy(GetIamPolicyStoragePoolRequest, CallSettings)

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

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

Parameters
Name Description
request GetIamPolicyStoragePoolRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Policy

The RPC response.

Example
// Create client
StoragePoolsClient storagePoolsClient = StoragePoolsClient.Create();
// Initialize request argument(s)
GetIamPolicyStoragePoolRequest request = new GetIamPolicyStoragePoolRequest
{
    Zone = "",
    Resource = "",
    Project = "",
    OptionsRequestedPolicyVersion = 0,
};
// Make the request
Policy response = storagePoolsClient.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
Name Description
project string

Project ID for this request.

zone string

The name of the zone for this request.

resource string

Name or id of the resource for this request.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Policy

The RPC response.

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

GetIamPolicyAsync(GetIamPolicyStoragePoolRequest, CallSettings)

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

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

Parameters
Name Description
request GetIamPolicyStoragePoolRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskPolicy

A Task containing the RPC response.

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

GetIamPolicyAsync(GetIamPolicyStoragePoolRequest, CancellationToken)

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

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

Parameters
Name Description
request GetIamPolicyStoragePoolRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskPolicy

A Task containing the RPC response.

Example
// Create client
StoragePoolsClient storagePoolsClient = await StoragePoolsClient.CreateAsync();
// Initialize request argument(s)
GetIamPolicyStoragePoolRequest request = new GetIamPolicyStoragePoolRequest
{
    Zone = "",
    Resource = "",
    Project = "",
    OptionsRequestedPolicyVersion = 0,
};
// Make the request
Policy response = await storagePoolsClient.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
Name Description
project string

Project ID for this request.

zone string

The name of the zone for this request.

resource string

Name or id of the resource for this request.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskPolicy

A Task containing the RPC response.

Example
// Create client
StoragePoolsClient storagePoolsClient = await StoragePoolsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string resource = "";
// Make the request
Policy response = await storagePoolsClient.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
Name Description
project string

Project ID for this request.

zone string

The name of the zone for this request.

resource string

Name or id of the resource for this request.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskPolicy

A Task containing the RPC response.

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

Insert(InsertStoragePoolRequest, CallSettings)

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

Creates a storage pool in the specified project using the data in the request.

Parameters
Name Description
request InsertStoragePoolRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The RPC response.

Example
// Create client
StoragePoolsClient storagePoolsClient = StoragePoolsClient.Create();
// Initialize request argument(s)
InsertStoragePoolRequest request = new InsertStoragePoolRequest
{
    Zone = "",
    RequestId = "",
    StoragePoolResource = new StoragePool(),
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = storagePoolsClient.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 = storagePoolsClient.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, StoragePool, CallSettings)

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

Creates a storage pool in the specified project using the data in the request.

Parameters
Name Description
project string

Project ID for this request.

zone string

The name of the zone for this request.

storagePoolResource StoragePool

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The RPC response.

Example
// Create client
StoragePoolsClient storagePoolsClient = StoragePoolsClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
StoragePool storagePoolResource = new StoragePool();
// Make the request
lro::Operation<Operation, Operation> response = storagePoolsClient.Insert(project, zone, storagePoolResource);

// 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 = storagePoolsClient.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(InsertStoragePoolRequest, CallSettings)

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

Creates a storage pool in the specified project using the data in the request.

Parameters
Name Description
request InsertStoragePoolRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

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

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

Creates a storage pool in the specified project using the data in the request.

Parameters
Name Description
request InsertStoragePoolRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
StoragePoolsClient storagePoolsClient = await StoragePoolsClient.CreateAsync();
// Initialize request argument(s)
InsertStoragePoolRequest request = new InsertStoragePoolRequest
{
    Zone = "",
    RequestId = "",
    StoragePoolResource = new StoragePool(),
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await storagePoolsClient.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 storagePoolsClient.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, StoragePool, CallSettings)

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

Creates a storage pool in the specified project using the data in the request.

Parameters
Name Description
project string

Project ID for this request.

zone string

The name of the zone for this request.

storagePoolResource StoragePool

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
StoragePoolsClient storagePoolsClient = await StoragePoolsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
StoragePool storagePoolResource = new StoragePool();
// Make the request
lro::Operation<Operation, Operation> response = await storagePoolsClient.InsertAsync(project, zone, storagePoolResource);

// 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 storagePoolsClient.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, StoragePool, CancellationToken)

public virtual Task<Operation<Operation, Operation>> InsertAsync(string project, string zone, StoragePool storagePoolResource, CancellationToken cancellationToken)

Creates a storage pool in the specified project using the data in the request.

Parameters
Name Description
project string

Project ID for this request.

zone string

The name of the zone for this request.

storagePoolResource StoragePool

The body resource for this request

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
StoragePoolsClient storagePoolsClient = await StoragePoolsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
StoragePool storagePoolResource = new StoragePool();
// Make the request
lro::Operation<Operation, Operation> response = await storagePoolsClient.InsertAsync(project, zone, storagePoolResource);

// 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 storagePoolsClient.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(ListStoragePoolsRequest, CallSettings)

public virtual PagedEnumerable<StoragePoolList, StoragePool> List(ListStoragePoolsRequest request, CallSettings callSettings = null)

Retrieves a list of storage pools contained within the specified zone.

Parameters
Name Description
request ListStoragePoolsRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableStoragePoolListStoragePool

A pageable sequence of StoragePool resources.

Example
// Create client
StoragePoolsClient storagePoolsClient = StoragePoolsClient.Create();
// Initialize request argument(s)
ListStoragePoolsRequest request = new ListStoragePoolsRequest
{
    Zone = "",
    OrderBy = "",
    Project = "",
    Filter = "",
    ReturnPartialSuccess = false,
};
// Make the request
PagedEnumerable<StoragePoolList, StoragePool> response = storagePoolsClient.List(request);

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

Retrieves a list of storage pools contained within the specified zone.

Parameters
Name Description
project string

Project ID for this request.

zone string

The name of the zone for this request.

pageToken string

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

pageSize int

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableStoragePoolListStoragePool

A pageable sequence of StoragePool resources.

Example
// Create client
StoragePoolsClient storagePoolsClient = StoragePoolsClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
// Make the request
PagedEnumerable<StoragePoolList, StoragePool> response = storagePoolsClient.List(project, zone);

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

public virtual PagedAsyncEnumerable<StoragePoolList, StoragePool> ListAsync(ListStoragePoolsRequest request, CallSettings callSettings = null)

Retrieves a list of storage pools contained within the specified zone.

Parameters
Name Description
request ListStoragePoolsRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableStoragePoolListStoragePool

A pageable asynchronous sequence of StoragePool resources.

Example
// Create client
StoragePoolsClient storagePoolsClient = await StoragePoolsClient.CreateAsync();
// Initialize request argument(s)
ListStoragePoolsRequest request = new ListStoragePoolsRequest
{
    Zone = "",
    OrderBy = "",
    Project = "",
    Filter = "",
    ReturnPartialSuccess = false,
};
// Make the request
PagedAsyncEnumerable<StoragePoolList, StoragePool> response = storagePoolsClient.ListAsync(request);

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

Retrieves a list of storage pools contained within the specified zone.

Parameters
Name Description
project string

Project ID for this request.

zone string

The name of the zone for this request.

pageToken string

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

pageSize int

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableStoragePoolListStoragePool

A pageable asynchronous sequence of StoragePool resources.

Example
// Create client
StoragePoolsClient storagePoolsClient = await StoragePoolsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
// Make the request
PagedAsyncEnumerable<StoragePoolList, StoragePool> response = storagePoolsClient.ListAsync(project, zone);

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

ListDisks(ListDisksStoragePoolsRequest, CallSettings)

public virtual PagedEnumerable<StoragePoolListDisks, StoragePoolDisk> ListDisks(ListDisksStoragePoolsRequest request, CallSettings callSettings = null)

Lists the disks in a specified storage pool.

Parameters
Name Description
request ListDisksStoragePoolsRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableStoragePoolListDisksStoragePoolDisk

A pageable sequence of StoragePoolDisk resources.

Example
// Create client
StoragePoolsClient storagePoolsClient = StoragePoolsClient.Create();
// Initialize request argument(s)
ListDisksStoragePoolsRequest request = new ListDisksStoragePoolsRequest
{
    Zone = "",
    OrderBy = "",
    Project = "",
    Filter = "",
    StoragePool = "",
    ReturnPartialSuccess = false,
};
// Make the request
PagedEnumerable<StoragePoolListDisks, StoragePoolDisk> response = storagePoolsClient.ListDisks(request);

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

ListDisks(string, string, string, string, int?, CallSettings)

public virtual PagedEnumerable<StoragePoolListDisks, StoragePoolDisk> ListDisks(string project, string zone, string storagePool, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the disks in a specified storage pool.

Parameters
Name Description
project string

Project ID for this request.

zone string

The name of the zone for this request.

storagePool string

Name of the storage pool to list disks of.

pageToken string

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

pageSize int

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableStoragePoolListDisksStoragePoolDisk

A pageable sequence of StoragePoolDisk resources.

Example
// Create client
StoragePoolsClient storagePoolsClient = StoragePoolsClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string storagePool = "";
// Make the request
PagedEnumerable<StoragePoolListDisks, StoragePoolDisk> response = storagePoolsClient.ListDisks(project, zone, storagePool);

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

ListDisksAsync(ListDisksStoragePoolsRequest, CallSettings)

public virtual PagedAsyncEnumerable<StoragePoolListDisks, StoragePoolDisk> ListDisksAsync(ListDisksStoragePoolsRequest request, CallSettings callSettings = null)

Lists the disks in a specified storage pool.

Parameters
Name Description
request ListDisksStoragePoolsRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableStoragePoolListDisksStoragePoolDisk

A pageable asynchronous sequence of StoragePoolDisk resources.

Example
// Create client
StoragePoolsClient storagePoolsClient = await StoragePoolsClient.CreateAsync();
// Initialize request argument(s)
ListDisksStoragePoolsRequest request = new ListDisksStoragePoolsRequest
{
    Zone = "",
    OrderBy = "",
    Project = "",
    Filter = "",
    StoragePool = "",
    ReturnPartialSuccess = false,
};
// Make the request
PagedAsyncEnumerable<StoragePoolListDisks, StoragePoolDisk> response = storagePoolsClient.ListDisksAsync(request);

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

ListDisksAsync(string, string, string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<StoragePoolListDisks, StoragePoolDisk> ListDisksAsync(string project, string zone, string storagePool, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the disks in a specified storage pool.

Parameters
Name Description
project string

Project ID for this request.

zone string

The name of the zone for this request.

storagePool string

Name of the storage pool to list disks of.

pageToken string

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

pageSize int

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableStoragePoolListDisksStoragePoolDisk

A pageable asynchronous sequence of StoragePoolDisk resources.

Example
// Create client
StoragePoolsClient storagePoolsClient = await StoragePoolsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string storagePool = "";
// Make the request
PagedAsyncEnumerable<StoragePoolListDisks, StoragePoolDisk> response = storagePoolsClient.ListDisksAsync(project, zone, storagePool);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((StoragePoolDisk 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((StoragePoolListDisks page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (StoragePoolDisk 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<StoragePoolDisk> 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 (StoragePoolDisk item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

PollOnceDelete(string, CallSettings)

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

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The result of polling the operation.

PollOnceDeleteAsync(string, CallSettings)

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

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A task representing the result of polling the operation.

PollOnceInsert(string, CallSettings)

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

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The result of polling the operation.

PollOnceInsertAsync(string, CallSettings)

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

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A task representing the result of polling the operation.

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
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The result of polling the operation.

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
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A task representing the result of polling the operation.

SetIamPolicy(SetIamPolicyStoragePoolRequest, CallSettings)

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

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

Parameters
Name Description
request SetIamPolicyStoragePoolRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Policy

The RPC response.

Example
// Create client
StoragePoolsClient storagePoolsClient = StoragePoolsClient.Create();
// Initialize request argument(s)
SetIamPolicyStoragePoolRequest request = new SetIamPolicyStoragePoolRequest
{
    Zone = "",
    Resource = "",
    Project = "",
    ZoneSetPolicyRequestResource = new ZoneSetPolicyRequest(),
};
// Make the request
Policy response = storagePoolsClient.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
Name Description
project string

Project ID for this request.

zone string

The name of the zone for this request.

resource string

Name or id of the resource for this request.

zoneSetPolicyRequestResource ZoneSetPolicyRequest

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Policy

The RPC response.

Example
// Create client
StoragePoolsClient storagePoolsClient = StoragePoolsClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string resource = "";
ZoneSetPolicyRequest zoneSetPolicyRequestResource = new ZoneSetPolicyRequest();
// Make the request
Policy response = storagePoolsClient.SetIamPolicy(project, zone, resource, zoneSetPolicyRequestResource);

SetIamPolicyAsync(SetIamPolicyStoragePoolRequest, CallSettings)

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

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

Parameters
Name Description
request SetIamPolicyStoragePoolRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskPolicy

A Task containing the RPC response.

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

SetIamPolicyAsync(SetIamPolicyStoragePoolRequest, CancellationToken)

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

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

Parameters
Name Description
request SetIamPolicyStoragePoolRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskPolicy

A Task containing the RPC response.

Example
// Create client
StoragePoolsClient storagePoolsClient = await StoragePoolsClient.CreateAsync();
// Initialize request argument(s)
SetIamPolicyStoragePoolRequest request = new SetIamPolicyStoragePoolRequest
{
    Zone = "",
    Resource = "",
    Project = "",
    ZoneSetPolicyRequestResource = new ZoneSetPolicyRequest(),
};
// Make the request
Policy response = await storagePoolsClient.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
Name Description
project string

Project ID for this request.

zone string

The name of the zone for this request.

resource string

Name or id of the resource for this request.

zoneSetPolicyRequestResource ZoneSetPolicyRequest

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskPolicy

A Task containing the RPC response.

Example
// Create client
StoragePoolsClient storagePoolsClient = await StoragePoolsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string resource = "";
ZoneSetPolicyRequest zoneSetPolicyRequestResource = new ZoneSetPolicyRequest();
// Make the request
Policy response = await storagePoolsClient.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
Name Description
project string

Project ID for this request.

zone string

The name of the zone for this request.

resource string

Name or id of the resource for this request.

zoneSetPolicyRequestResource ZoneSetPolicyRequest

The body resource for this request

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskPolicy

A Task containing the RPC response.

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

ShutdownDefaultChannelsAsync()

public static Task ShutdownDefaultChannelsAsync()

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

Returns
Type Description
Task

A task representing the asynchronous shutdown operation.

Remarks

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

TestIamPermissions(TestIamPermissionsStoragePoolRequest, CallSettings)

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

Returns permissions that a caller has on the specified resource.

Parameters
Name Description
request TestIamPermissionsStoragePoolRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TestPermissionsResponse

The RPC response.

Example
// Create client
StoragePoolsClient storagePoolsClient = StoragePoolsClient.Create();
// Initialize request argument(s)
TestIamPermissionsStoragePoolRequest request = new TestIamPermissionsStoragePoolRequest
{
    Zone = "",
    Resource = "",
    Project = "",
    TestPermissionsRequestResource = new TestPermissionsRequest(),
};
// Make the request
TestPermissionsResponse response = storagePoolsClient.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
Name Description
project string

Project ID for this request.

zone string

The name of the zone for this request.

resource string

Name or id of the resource for this request.

testPermissionsRequestResource TestPermissionsRequest

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TestPermissionsResponse

The RPC response.

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

TestIamPermissionsAsync(TestIamPermissionsStoragePoolRequest, CallSettings)

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

Returns permissions that a caller has on the specified resource.

Parameters
Name Description
request TestIamPermissionsStoragePoolRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskTestPermissionsResponse

A Task containing the RPC response.

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

TestIamPermissionsAsync(TestIamPermissionsStoragePoolRequest, CancellationToken)

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

Returns permissions that a caller has on the specified resource.

Parameters
Name Description
request TestIamPermissionsStoragePoolRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskTestPermissionsResponse

A Task containing the RPC response.

Example
// Create client
StoragePoolsClient storagePoolsClient = await StoragePoolsClient.CreateAsync();
// Initialize request argument(s)
TestIamPermissionsStoragePoolRequest request = new TestIamPermissionsStoragePoolRequest
{
    Zone = "",
    Resource = "",
    Project = "",
    TestPermissionsRequestResource = new TestPermissionsRequest(),
};
// Make the request
TestPermissionsResponse response = await storagePoolsClient.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
Name Description
project string

Project ID for this request.

zone string

The name of the zone for this request.

resource string

Name or id of the resource for this request.

testPermissionsRequestResource TestPermissionsRequest

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskTestPermissionsResponse

A Task containing the RPC response.

Example
// Create client
StoragePoolsClient storagePoolsClient = await StoragePoolsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string resource = "";
TestPermissionsRequest testPermissionsRequestResource = new TestPermissionsRequest();
// Make the request
TestPermissionsResponse response = await storagePoolsClient.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
Name Description
project string

Project ID for this request.

zone string

The name of the zone for this request.

resource string

Name or id of the resource for this request.

testPermissionsRequestResource TestPermissionsRequest

The body resource for this request

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskTestPermissionsResponse

A Task containing the RPC response.

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

Update(UpdateStoragePoolRequest, CallSettings)

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

Updates the specified storagePool 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: size_tb and provisioned_iops.

Parameters
Name Description
request UpdateStoragePoolRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The RPC response.

Example
// Create client
StoragePoolsClient storagePoolsClient = StoragePoolsClient.Create();
// Initialize request argument(s)
UpdateStoragePoolRequest request = new UpdateStoragePoolRequest
{
    Zone = "",
    RequestId = "",
    StoragePoolResource = new StoragePool(),
    Project = "",
    StoragePool = "",
    UpdateMask = "",
};
// Make the request
lro::Operation<Operation, Operation> response = storagePoolsClient.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 = storagePoolsClient.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, StoragePool, CallSettings)

public virtual Operation<Operation, Operation> Update(string project, string zone, string storagePool, StoragePool storagePoolResource, CallSettings callSettings = null)

Updates the specified storagePool 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: size_tb and provisioned_iops.

Parameters
Name Description
project string

Project ID for this request.

zone string

The name of the zone for this request.

storagePool string

The storagePool name for this request.

storagePoolResource StoragePool

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The RPC response.

Example
// Create client
StoragePoolsClient storagePoolsClient = StoragePoolsClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string storagePool = "";
StoragePool storagePoolResource = new StoragePool();
// Make the request
lro::Operation<Operation, Operation> response = storagePoolsClient.Update(project, zone, storagePool, storagePoolResource);

// 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 = storagePoolsClient.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(UpdateStoragePoolRequest, CallSettings)

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

Updates the specified storagePool 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: size_tb and provisioned_iops.

Parameters
Name Description
request UpdateStoragePoolRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
StoragePoolsClient storagePoolsClient = await StoragePoolsClient.CreateAsync();
// Initialize request argument(s)
UpdateStoragePoolRequest request = new UpdateStoragePoolRequest
{
    Zone = "",
    RequestId = "",
    StoragePoolResource = new StoragePool(),
    Project = "",
    StoragePool = "",
    UpdateMask = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await storagePoolsClient.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 storagePoolsClient.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(UpdateStoragePoolRequest, CancellationToken)

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

Updates the specified storagePool 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: size_tb and provisioned_iops.

Parameters
Name Description
request UpdateStoragePoolRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
StoragePoolsClient storagePoolsClient = await StoragePoolsClient.CreateAsync();
// Initialize request argument(s)
UpdateStoragePoolRequest request = new UpdateStoragePoolRequest
{
    Zone = "",
    RequestId = "",
    StoragePoolResource = new StoragePool(),
    Project = "",
    StoragePool = "",
    UpdateMask = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await storagePoolsClient.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 storagePoolsClient.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, StoragePool, CallSettings)

public virtual Task<Operation<Operation, Operation>> UpdateAsync(string project, string zone, string storagePool, StoragePool storagePoolResource, CallSettings callSettings = null)

Updates the specified storagePool 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: size_tb and provisioned_iops.

Parameters
Name Description
project string

Project ID for this request.

zone string

The name of the zone for this request.

storagePool string

The storagePool name for this request.

storagePoolResource StoragePool

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
StoragePoolsClient storagePoolsClient = await StoragePoolsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string storagePool = "";
StoragePool storagePoolResource = new StoragePool();
// Make the request
lro::Operation<Operation, Operation> response = await storagePoolsClient.UpdateAsync(project, zone, storagePool, storagePoolResource);

// 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 storagePoolsClient.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, StoragePool, CancellationToken)

public virtual Task<Operation<Operation, Operation>> UpdateAsync(string project, string zone, string storagePool, StoragePool storagePoolResource, CancellationToken cancellationToken)

Updates the specified storagePool 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: size_tb and provisioned_iops.

Parameters
Name Description
project string

Project ID for this request.

zone string

The name of the zone for this request.

storagePool string

The storagePool name for this request.

storagePoolResource StoragePool

The body resource for this request

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
StoragePoolsClient storagePoolsClient = await StoragePoolsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string storagePool = "";
StoragePool storagePoolResource = new StoragePool();
// Make the request
lro::Operation<Operation, Operation> response = await storagePoolsClient.UpdateAsync(project, zone, storagePool, storagePoolResource);

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