Cloud Storage v2 API - Class StorageControlClient (1.3.0)

public abstract class StorageControlClient

Reference documentation and code samples for the Cloud Storage v2 API class StorageControlClient.

StorageControl client wrapper, for convenient use.

Inheritance

object > StorageControlClient

Derived Types

Namespace

Google.Cloud.Storage.Control.V2

Assembly

Google.Cloud.Storage.Control.V2.dll

Remarks

StorageControl service includes selected control plane operations.

Properties

CreateAnywhereCacheOperationsClient

public virtual OperationsClient CreateAnywhereCacheOperationsClient { get; }

The long-running operations client for CreateAnywhereCache.

Property Value
Type Description
OperationsClient

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
Type Description
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default StorageControl scopes.

Property Value
Type Description
IReadOnlyListstring
Remarks

GrpcClient

public virtual StorageControl.StorageControlClient GrpcClient { get; }

The underlying gRPC StorageControl client

Property Value
Type Description
StorageControlStorageControlClient

RenameFolderOperationsClient

public virtual OperationsClient RenameFolderOperationsClient { get; }

The long-running operations client for RenameFolder.

Property Value
Type Description
OperationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
Type Description
ServiceMetadata

UpdateAnywhereCacheOperationsClient

public virtual OperationsClient UpdateAnywhereCacheOperationsClient { get; }

The long-running operations client for UpdateAnywhereCache.

Property Value
Type Description
OperationsClient

Methods

Create()

public static StorageControlClient Create()

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

Returns
Type Description
StorageControlClient

The created StorageControlClient.

CreateAnywhereCache(BucketName, AnywhereCache, CallSettings)

public virtual Operation<AnywhereCache, CreateAnywhereCacheMetadata> CreateAnywhereCache(BucketName parent, AnywhereCache anywhereCache, CallSettings callSettings = null)

Creates an Anywhere Cache instance.

Parameters
Name Description
parent BucketName

Required. The bucket to which this cache belongs. Format: projects/{project}/buckets/{bucket}

anywhereCache AnywhereCache

Required. Properties of the Anywhere Cache instance being created. The parent bucket name is specified in the parent field. Server uses the default value of ttl or admission_policy if not specified in request.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationAnywhereCacheCreateAnywhereCacheMetadata

The RPC response.

Example
// Create client
StorageControlClient storageControlClient = StorageControlClient.Create();
// Initialize request argument(s)
BucketName parent = BucketName.FromProjectBucket("[PROJECT]", "[BUCKET]");
AnywhereCache anywhereCache = new AnywhereCache();
// Make the request
Operation<AnywhereCache, CreateAnywhereCacheMetadata> response = storageControlClient.CreateAnywhereCache(parent, anywhereCache);

// Poll until the returned long-running operation is complete
Operation<AnywhereCache, CreateAnywhereCacheMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
AnywhereCache 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
Operation<AnywhereCache, CreateAnywhereCacheMetadata> retrievedResponse = storageControlClient.PollOnceCreateAnywhereCache(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    AnywhereCache retrievedResult = retrievedResponse.Result;
}

CreateAnywhereCache(CreateAnywhereCacheRequest, CallSettings)

public virtual Operation<AnywhereCache, CreateAnywhereCacheMetadata> CreateAnywhereCache(CreateAnywhereCacheRequest request, CallSettings callSettings = null)

Creates an Anywhere Cache instance.

Parameters
Name Description
request CreateAnywhereCacheRequest

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
OperationAnywhereCacheCreateAnywhereCacheMetadata

The RPC response.

Example
// Create client
StorageControlClient storageControlClient = StorageControlClient.Create();
// Initialize request argument(s)
CreateAnywhereCacheRequest request = new CreateAnywhereCacheRequest
{
    ParentAsBucketName = BucketName.FromProjectBucket("[PROJECT]", "[BUCKET]"),
    AnywhereCache = new AnywhereCache(),
};
// Make the request
Operation<AnywhereCache, CreateAnywhereCacheMetadata> response = storageControlClient.CreateAnywhereCache(request);

// Poll until the returned long-running operation is complete
Operation<AnywhereCache, CreateAnywhereCacheMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
AnywhereCache 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
Operation<AnywhereCache, CreateAnywhereCacheMetadata> retrievedResponse = storageControlClient.PollOnceCreateAnywhereCache(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    AnywhereCache retrievedResult = retrievedResponse.Result;
}

CreateAnywhereCache(string, AnywhereCache, CallSettings)

public virtual Operation<AnywhereCache, CreateAnywhereCacheMetadata> CreateAnywhereCache(string parent, AnywhereCache anywhereCache, CallSettings callSettings = null)

Creates an Anywhere Cache instance.

Parameters
Name Description
parent string

Required. The bucket to which this cache belongs. Format: projects/{project}/buckets/{bucket}

anywhereCache AnywhereCache

Required. Properties of the Anywhere Cache instance being created. The parent bucket name is specified in the parent field. Server uses the default value of ttl or admission_policy if not specified in request.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationAnywhereCacheCreateAnywhereCacheMetadata

The RPC response.

Example
// Create client
StorageControlClient storageControlClient = StorageControlClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/buckets/[BUCKET]";
AnywhereCache anywhereCache = new AnywhereCache();
// Make the request
Operation<AnywhereCache, CreateAnywhereCacheMetadata> response = storageControlClient.CreateAnywhereCache(parent, anywhereCache);

// Poll until the returned long-running operation is complete
Operation<AnywhereCache, CreateAnywhereCacheMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
AnywhereCache 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
Operation<AnywhereCache, CreateAnywhereCacheMetadata> retrievedResponse = storageControlClient.PollOnceCreateAnywhereCache(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    AnywhereCache retrievedResult = retrievedResponse.Result;
}

CreateAnywhereCacheAsync(BucketName, AnywhereCache, CallSettings)

public virtual Task<Operation<AnywhereCache, CreateAnywhereCacheMetadata>> CreateAnywhereCacheAsync(BucketName parent, AnywhereCache anywhereCache, CallSettings callSettings = null)

Creates an Anywhere Cache instance.

Parameters
Name Description
parent BucketName

Required. The bucket to which this cache belongs. Format: projects/{project}/buckets/{bucket}

anywhereCache AnywhereCache

Required. Properties of the Anywhere Cache instance being created. The parent bucket name is specified in the parent field. Server uses the default value of ttl or admission_policy if not specified in request.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationAnywhereCacheCreateAnywhereCacheMetadata

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
BucketName parent = BucketName.FromProjectBucket("[PROJECT]", "[BUCKET]");
AnywhereCache anywhereCache = new AnywhereCache();
// Make the request
Operation<AnywhereCache, CreateAnywhereCacheMetadata> response = await storageControlClient.CreateAnywhereCacheAsync(parent, anywhereCache);

// Poll until the returned long-running operation is complete
Operation<AnywhereCache, CreateAnywhereCacheMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AnywhereCache 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
Operation<AnywhereCache, CreateAnywhereCacheMetadata> retrievedResponse = await storageControlClient.PollOnceCreateAnywhereCacheAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    AnywhereCache retrievedResult = retrievedResponse.Result;
}

CreateAnywhereCacheAsync(BucketName, AnywhereCache, CancellationToken)

public virtual Task<Operation<AnywhereCache, CreateAnywhereCacheMetadata>> CreateAnywhereCacheAsync(BucketName parent, AnywhereCache anywhereCache, CancellationToken cancellationToken)

Creates an Anywhere Cache instance.

Parameters
Name Description
parent BucketName

Required. The bucket to which this cache belongs. Format: projects/{project}/buckets/{bucket}

anywhereCache AnywhereCache

Required. Properties of the Anywhere Cache instance being created. The parent bucket name is specified in the parent field. Server uses the default value of ttl or admission_policy if not specified in request.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationAnywhereCacheCreateAnywhereCacheMetadata

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
BucketName parent = BucketName.FromProjectBucket("[PROJECT]", "[BUCKET]");
AnywhereCache anywhereCache = new AnywhereCache();
// Make the request
Operation<AnywhereCache, CreateAnywhereCacheMetadata> response = await storageControlClient.CreateAnywhereCacheAsync(parent, anywhereCache);

// Poll until the returned long-running operation is complete
Operation<AnywhereCache, CreateAnywhereCacheMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AnywhereCache 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
Operation<AnywhereCache, CreateAnywhereCacheMetadata> retrievedResponse = await storageControlClient.PollOnceCreateAnywhereCacheAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    AnywhereCache retrievedResult = retrievedResponse.Result;
}

CreateAnywhereCacheAsync(CreateAnywhereCacheRequest, CallSettings)

public virtual Task<Operation<AnywhereCache, CreateAnywhereCacheMetadata>> CreateAnywhereCacheAsync(CreateAnywhereCacheRequest request, CallSettings callSettings = null)

Creates an Anywhere Cache instance.

Parameters
Name Description
request CreateAnywhereCacheRequest

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
TaskOperationAnywhereCacheCreateAnywhereCacheMetadata

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
CreateAnywhereCacheRequest request = new CreateAnywhereCacheRequest
{
    ParentAsBucketName = BucketName.FromProjectBucket("[PROJECT]", "[BUCKET]"),
    AnywhereCache = new AnywhereCache(),
};
// Make the request
Operation<AnywhereCache, CreateAnywhereCacheMetadata> response = await storageControlClient.CreateAnywhereCacheAsync(request);

// Poll until the returned long-running operation is complete
Operation<AnywhereCache, CreateAnywhereCacheMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AnywhereCache 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
Operation<AnywhereCache, CreateAnywhereCacheMetadata> retrievedResponse = await storageControlClient.PollOnceCreateAnywhereCacheAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    AnywhereCache retrievedResult = retrievedResponse.Result;
}

CreateAnywhereCacheAsync(CreateAnywhereCacheRequest, CancellationToken)

public virtual Task<Operation<AnywhereCache, CreateAnywhereCacheMetadata>> CreateAnywhereCacheAsync(CreateAnywhereCacheRequest request, CancellationToken cancellationToken)

Creates an Anywhere Cache instance.

Parameters
Name Description
request CreateAnywhereCacheRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationAnywhereCacheCreateAnywhereCacheMetadata

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
CreateAnywhereCacheRequest request = new CreateAnywhereCacheRequest
{
    ParentAsBucketName = BucketName.FromProjectBucket("[PROJECT]", "[BUCKET]"),
    AnywhereCache = new AnywhereCache(),
};
// Make the request
Operation<AnywhereCache, CreateAnywhereCacheMetadata> response = await storageControlClient.CreateAnywhereCacheAsync(request);

// Poll until the returned long-running operation is complete
Operation<AnywhereCache, CreateAnywhereCacheMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AnywhereCache 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
Operation<AnywhereCache, CreateAnywhereCacheMetadata> retrievedResponse = await storageControlClient.PollOnceCreateAnywhereCacheAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    AnywhereCache retrievedResult = retrievedResponse.Result;
}

CreateAnywhereCacheAsync(string, AnywhereCache, CallSettings)

public virtual Task<Operation<AnywhereCache, CreateAnywhereCacheMetadata>> CreateAnywhereCacheAsync(string parent, AnywhereCache anywhereCache, CallSettings callSettings = null)

Creates an Anywhere Cache instance.

Parameters
Name Description
parent string

Required. The bucket to which this cache belongs. Format: projects/{project}/buckets/{bucket}

anywhereCache AnywhereCache

Required. Properties of the Anywhere Cache instance being created. The parent bucket name is specified in the parent field. Server uses the default value of ttl or admission_policy if not specified in request.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationAnywhereCacheCreateAnywhereCacheMetadata

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/buckets/[BUCKET]";
AnywhereCache anywhereCache = new AnywhereCache();
// Make the request
Operation<AnywhereCache, CreateAnywhereCacheMetadata> response = await storageControlClient.CreateAnywhereCacheAsync(parent, anywhereCache);

// Poll until the returned long-running operation is complete
Operation<AnywhereCache, CreateAnywhereCacheMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AnywhereCache 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
Operation<AnywhereCache, CreateAnywhereCacheMetadata> retrievedResponse = await storageControlClient.PollOnceCreateAnywhereCacheAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    AnywhereCache retrievedResult = retrievedResponse.Result;
}

CreateAnywhereCacheAsync(string, AnywhereCache, CancellationToken)

public virtual Task<Operation<AnywhereCache, CreateAnywhereCacheMetadata>> CreateAnywhereCacheAsync(string parent, AnywhereCache anywhereCache, CancellationToken cancellationToken)

Creates an Anywhere Cache instance.

Parameters
Name Description
parent string

Required. The bucket to which this cache belongs. Format: projects/{project}/buckets/{bucket}

anywhereCache AnywhereCache

Required. Properties of the Anywhere Cache instance being created. The parent bucket name is specified in the parent field. Server uses the default value of ttl or admission_policy if not specified in request.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationAnywhereCacheCreateAnywhereCacheMetadata

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/buckets/[BUCKET]";
AnywhereCache anywhereCache = new AnywhereCache();
// Make the request
Operation<AnywhereCache, CreateAnywhereCacheMetadata> response = await storageControlClient.CreateAnywhereCacheAsync(parent, anywhereCache);

// Poll until the returned long-running operation is complete
Operation<AnywhereCache, CreateAnywhereCacheMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AnywhereCache 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
Operation<AnywhereCache, CreateAnywhereCacheMetadata> retrievedResponse = await storageControlClient.PollOnceCreateAnywhereCacheAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    AnywhereCache retrievedResult = retrievedResponse.Result;
}

CreateAsync(CancellationToken)

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

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

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskStorageControlClient

The task representing the created StorageControlClient.

CreateFolder(BucketName, Folder, string, CallSettings)

public virtual Folder CreateFolder(BucketName parent, Folder folder, string folderId, CallSettings callSettings = null)

Creates a new folder. This operation is only applicable to a hierarchical namespace enabled bucket.

Parameters
Name Description
parent BucketName

Required. Name of the bucket in which the folder will reside. The bucket must be a hierarchical namespace enabled bucket.

folder Folder

Required. Properties of the new folder being created. The bucket and name of the folder are specified in the parent and folder_id fields, respectively. Populating those fields in folder will result in an error.

folderId string

Required. The full name of a folder, including all its parent folders. Folders use single '/' characters as a delimiter. The folder_id must end with a slash. For example, the folder_id of "books/biographies/" would create a new "biographies/" folder under the "books/" folder.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Folder

The RPC response.

Example
// Create client
StorageControlClient storageControlClient = StorageControlClient.Create();
// Initialize request argument(s)
BucketName parent = BucketName.FromProjectBucket("[PROJECT]", "[BUCKET]");
Folder folder = new Folder();
string folderId = "";
// Make the request
Folder response = storageControlClient.CreateFolder(parent, folder, folderId);

CreateFolder(CreateFolderRequest, CallSettings)

public virtual Folder CreateFolder(CreateFolderRequest request, CallSettings callSettings = null)

Creates a new folder. This operation is only applicable to a hierarchical namespace enabled bucket.

Parameters
Name Description
request CreateFolderRequest

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
Folder

The RPC response.

Example
// Create client
StorageControlClient storageControlClient = StorageControlClient.Create();
// Initialize request argument(s)
CreateFolderRequest request = new CreateFolderRequest
{
    ParentAsBucketName = BucketName.FromProjectBucket("[PROJECT]", "[BUCKET]"),
    Folder = new Folder(),
    FolderId = "",
    Recursive = false,
};
// Make the request
Folder response = storageControlClient.CreateFolder(request);

CreateFolder(string, Folder, string, CallSettings)

public virtual Folder CreateFolder(string parent, Folder folder, string folderId, CallSettings callSettings = null)

Creates a new folder. This operation is only applicable to a hierarchical namespace enabled bucket.

Parameters
Name Description
parent string

Required. Name of the bucket in which the folder will reside. The bucket must be a hierarchical namespace enabled bucket.

folder Folder

Required. Properties of the new folder being created. The bucket and name of the folder are specified in the parent and folder_id fields, respectively. Populating those fields in folder will result in an error.

folderId string

Required. The full name of a folder, including all its parent folders. Folders use single '/' characters as a delimiter. The folder_id must end with a slash. For example, the folder_id of "books/biographies/" would create a new "biographies/" folder under the "books/" folder.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Folder

The RPC response.

Example
// Create client
StorageControlClient storageControlClient = StorageControlClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/buckets/[BUCKET]";
Folder folder = new Folder();
string folderId = "";
// Make the request
Folder response = storageControlClient.CreateFolder(parent, folder, folderId);

CreateFolderAsync(BucketName, Folder, string, CallSettings)

public virtual Task<Folder> CreateFolderAsync(BucketName parent, Folder folder, string folderId, CallSettings callSettings = null)

Creates a new folder. This operation is only applicable to a hierarchical namespace enabled bucket.

Parameters
Name Description
parent BucketName

Required. Name of the bucket in which the folder will reside. The bucket must be a hierarchical namespace enabled bucket.

folder Folder

Required. Properties of the new folder being created. The bucket and name of the folder are specified in the parent and folder_id fields, respectively. Populating those fields in folder will result in an error.

folderId string

Required. The full name of a folder, including all its parent folders. Folders use single '/' characters as a delimiter. The folder_id must end with a slash. For example, the folder_id of "books/biographies/" would create a new "biographies/" folder under the "books/" folder.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskFolder

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
BucketName parent = BucketName.FromProjectBucket("[PROJECT]", "[BUCKET]");
Folder folder = new Folder();
string folderId = "";
// Make the request
Folder response = await storageControlClient.CreateFolderAsync(parent, folder, folderId);

CreateFolderAsync(BucketName, Folder, string, CancellationToken)

public virtual Task<Folder> CreateFolderAsync(BucketName parent, Folder folder, string folderId, CancellationToken cancellationToken)

Creates a new folder. This operation is only applicable to a hierarchical namespace enabled bucket.

Parameters
Name Description
parent BucketName

Required. Name of the bucket in which the folder will reside. The bucket must be a hierarchical namespace enabled bucket.

folder Folder

Required. Properties of the new folder being created. The bucket and name of the folder are specified in the parent and folder_id fields, respectively. Populating those fields in folder will result in an error.

folderId string

Required. The full name of a folder, including all its parent folders. Folders use single '/' characters as a delimiter. The folder_id must end with a slash. For example, the folder_id of "books/biographies/" would create a new "biographies/" folder under the "books/" folder.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskFolder

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
BucketName parent = BucketName.FromProjectBucket("[PROJECT]", "[BUCKET]");
Folder folder = new Folder();
string folderId = "";
// Make the request
Folder response = await storageControlClient.CreateFolderAsync(parent, folder, folderId);

CreateFolderAsync(CreateFolderRequest, CallSettings)

public virtual Task<Folder> CreateFolderAsync(CreateFolderRequest request, CallSettings callSettings = null)

Creates a new folder. This operation is only applicable to a hierarchical namespace enabled bucket.

Parameters
Name Description
request CreateFolderRequest

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
TaskFolder

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
CreateFolderRequest request = new CreateFolderRequest
{
    ParentAsBucketName = BucketName.FromProjectBucket("[PROJECT]", "[BUCKET]"),
    Folder = new Folder(),
    FolderId = "",
    Recursive = false,
};
// Make the request
Folder response = await storageControlClient.CreateFolderAsync(request);

CreateFolderAsync(CreateFolderRequest, CancellationToken)

public virtual Task<Folder> CreateFolderAsync(CreateFolderRequest request, CancellationToken cancellationToken)

Creates a new folder. This operation is only applicable to a hierarchical namespace enabled bucket.

Parameters
Name Description
request CreateFolderRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskFolder

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
CreateFolderRequest request = new CreateFolderRequest
{
    ParentAsBucketName = BucketName.FromProjectBucket("[PROJECT]", "[BUCKET]"),
    Folder = new Folder(),
    FolderId = "",
    Recursive = false,
};
// Make the request
Folder response = await storageControlClient.CreateFolderAsync(request);

CreateFolderAsync(string, Folder, string, CallSettings)

public virtual Task<Folder> CreateFolderAsync(string parent, Folder folder, string folderId, CallSettings callSettings = null)

Creates a new folder. This operation is only applicable to a hierarchical namespace enabled bucket.

Parameters
Name Description
parent string

Required. Name of the bucket in which the folder will reside. The bucket must be a hierarchical namespace enabled bucket.

folder Folder

Required. Properties of the new folder being created. The bucket and name of the folder are specified in the parent and folder_id fields, respectively. Populating those fields in folder will result in an error.

folderId string

Required. The full name of a folder, including all its parent folders. Folders use single '/' characters as a delimiter. The folder_id must end with a slash. For example, the folder_id of "books/biographies/" would create a new "biographies/" folder under the "books/" folder.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskFolder

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/buckets/[BUCKET]";
Folder folder = new Folder();
string folderId = "";
// Make the request
Folder response = await storageControlClient.CreateFolderAsync(parent, folder, folderId);

CreateFolderAsync(string, Folder, string, CancellationToken)

public virtual Task<Folder> CreateFolderAsync(string parent, Folder folder, string folderId, CancellationToken cancellationToken)

Creates a new folder. This operation is only applicable to a hierarchical namespace enabled bucket.

Parameters
Name Description
parent string

Required. Name of the bucket in which the folder will reside. The bucket must be a hierarchical namespace enabled bucket.

folder Folder

Required. Properties of the new folder being created. The bucket and name of the folder are specified in the parent and folder_id fields, respectively. Populating those fields in folder will result in an error.

folderId string

Required. The full name of a folder, including all its parent folders. Folders use single '/' characters as a delimiter. The folder_id must end with a slash. For example, the folder_id of "books/biographies/" would create a new "biographies/" folder under the "books/" folder.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskFolder

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/buckets/[BUCKET]";
Folder folder = new Folder();
string folderId = "";
// Make the request
Folder response = await storageControlClient.CreateFolderAsync(parent, folder, folderId);

CreateManagedFolder(BucketName, ManagedFolder, string, CallSettings)

public virtual ManagedFolder CreateManagedFolder(BucketName parent, ManagedFolder managedFolder, string managedFolderId, CallSettings callSettings = null)

Creates a new managed folder.

Parameters
Name Description
parent BucketName

Required. Name of the bucket this managed folder belongs to.

managedFolder ManagedFolder

Required. Properties of the managed folder being created. The bucket and managed folder names are specified in the parent and managed_folder_id fields. Populating these fields in managed_folder will result in an error.

managedFolderId string

Required. The name of the managed folder. It uses a single / as delimiter and leading and trailing / are allowed.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
ManagedFolder

The RPC response.

Example
// Create client
StorageControlClient storageControlClient = StorageControlClient.Create();
// Initialize request argument(s)
BucketName parent = BucketName.FromProjectBucket("[PROJECT]", "[BUCKET]");
ManagedFolder managedFolder = new ManagedFolder();
string managedFolderId = "";
// Make the request
ManagedFolder response = storageControlClient.CreateManagedFolder(parent, managedFolder, managedFolderId);

CreateManagedFolder(CreateManagedFolderRequest, CallSettings)

public virtual ManagedFolder CreateManagedFolder(CreateManagedFolderRequest request, CallSettings callSettings = null)

Creates a new managed folder.

Parameters
Name Description
request CreateManagedFolderRequest

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
ManagedFolder

The RPC response.

Example
// Create client
StorageControlClient storageControlClient = StorageControlClient.Create();
// Initialize request argument(s)
CreateManagedFolderRequest request = new CreateManagedFolderRequest
{
    ParentAsBucketName = BucketName.FromProjectBucket("[PROJECT]", "[BUCKET]"),
    ManagedFolder = new ManagedFolder(),
    ManagedFolderId = "",
};
// Make the request
ManagedFolder response = storageControlClient.CreateManagedFolder(request);

CreateManagedFolder(string, ManagedFolder, string, CallSettings)

public virtual ManagedFolder CreateManagedFolder(string parent, ManagedFolder managedFolder, string managedFolderId, CallSettings callSettings = null)

Creates a new managed folder.

Parameters
Name Description
parent string

Required. Name of the bucket this managed folder belongs to.

managedFolder ManagedFolder

Required. Properties of the managed folder being created. The bucket and managed folder names are specified in the parent and managed_folder_id fields. Populating these fields in managed_folder will result in an error.

managedFolderId string

Required. The name of the managed folder. It uses a single / as delimiter and leading and trailing / are allowed.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
ManagedFolder

The RPC response.

Example
// Create client
StorageControlClient storageControlClient = StorageControlClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/buckets/[BUCKET]";
ManagedFolder managedFolder = new ManagedFolder();
string managedFolderId = "";
// Make the request
ManagedFolder response = storageControlClient.CreateManagedFolder(parent, managedFolder, managedFolderId);

CreateManagedFolderAsync(BucketName, ManagedFolder, string, CallSettings)

public virtual Task<ManagedFolder> CreateManagedFolderAsync(BucketName parent, ManagedFolder managedFolder, string managedFolderId, CallSettings callSettings = null)

Creates a new managed folder.

Parameters
Name Description
parent BucketName

Required. Name of the bucket this managed folder belongs to.

managedFolder ManagedFolder

Required. Properties of the managed folder being created. The bucket and managed folder names are specified in the parent and managed_folder_id fields. Populating these fields in managed_folder will result in an error.

managedFolderId string

Required. The name of the managed folder. It uses a single / as delimiter and leading and trailing / are allowed.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskManagedFolder

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
BucketName parent = BucketName.FromProjectBucket("[PROJECT]", "[BUCKET]");
ManagedFolder managedFolder = new ManagedFolder();
string managedFolderId = "";
// Make the request
ManagedFolder response = await storageControlClient.CreateManagedFolderAsync(parent, managedFolder, managedFolderId);

CreateManagedFolderAsync(BucketName, ManagedFolder, string, CancellationToken)

public virtual Task<ManagedFolder> CreateManagedFolderAsync(BucketName parent, ManagedFolder managedFolder, string managedFolderId, CancellationToken cancellationToken)

Creates a new managed folder.

Parameters
Name Description
parent BucketName

Required. Name of the bucket this managed folder belongs to.

managedFolder ManagedFolder

Required. Properties of the managed folder being created. The bucket and managed folder names are specified in the parent and managed_folder_id fields. Populating these fields in managed_folder will result in an error.

managedFolderId string

Required. The name of the managed folder. It uses a single / as delimiter and leading and trailing / are allowed.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskManagedFolder

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
BucketName parent = BucketName.FromProjectBucket("[PROJECT]", "[BUCKET]");
ManagedFolder managedFolder = new ManagedFolder();
string managedFolderId = "";
// Make the request
ManagedFolder response = await storageControlClient.CreateManagedFolderAsync(parent, managedFolder, managedFolderId);

CreateManagedFolderAsync(CreateManagedFolderRequest, CallSettings)

public virtual Task<ManagedFolder> CreateManagedFolderAsync(CreateManagedFolderRequest request, CallSettings callSettings = null)

Creates a new managed folder.

Parameters
Name Description
request CreateManagedFolderRequest

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
TaskManagedFolder

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
CreateManagedFolderRequest request = new CreateManagedFolderRequest
{
    ParentAsBucketName = BucketName.FromProjectBucket("[PROJECT]", "[BUCKET]"),
    ManagedFolder = new ManagedFolder(),
    ManagedFolderId = "",
};
// Make the request
ManagedFolder response = await storageControlClient.CreateManagedFolderAsync(request);

CreateManagedFolderAsync(CreateManagedFolderRequest, CancellationToken)

public virtual Task<ManagedFolder> CreateManagedFolderAsync(CreateManagedFolderRequest request, CancellationToken cancellationToken)

Creates a new managed folder.

Parameters
Name Description
request CreateManagedFolderRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskManagedFolder

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
CreateManagedFolderRequest request = new CreateManagedFolderRequest
{
    ParentAsBucketName = BucketName.FromProjectBucket("[PROJECT]", "[BUCKET]"),
    ManagedFolder = new ManagedFolder(),
    ManagedFolderId = "",
};
// Make the request
ManagedFolder response = await storageControlClient.CreateManagedFolderAsync(request);

CreateManagedFolderAsync(string, ManagedFolder, string, CallSettings)

public virtual Task<ManagedFolder> CreateManagedFolderAsync(string parent, ManagedFolder managedFolder, string managedFolderId, CallSettings callSettings = null)

Creates a new managed folder.

Parameters
Name Description
parent string

Required. Name of the bucket this managed folder belongs to.

managedFolder ManagedFolder

Required. Properties of the managed folder being created. The bucket and managed folder names are specified in the parent and managed_folder_id fields. Populating these fields in managed_folder will result in an error.

managedFolderId string

Required. The name of the managed folder. It uses a single / as delimiter and leading and trailing / are allowed.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskManagedFolder

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/buckets/[BUCKET]";
ManagedFolder managedFolder = new ManagedFolder();
string managedFolderId = "";
// Make the request
ManagedFolder response = await storageControlClient.CreateManagedFolderAsync(parent, managedFolder, managedFolderId);

CreateManagedFolderAsync(string, ManagedFolder, string, CancellationToken)

public virtual Task<ManagedFolder> CreateManagedFolderAsync(string parent, ManagedFolder managedFolder, string managedFolderId, CancellationToken cancellationToken)

Creates a new managed folder.

Parameters
Name Description
parent string

Required. Name of the bucket this managed folder belongs to.

managedFolder ManagedFolder

Required. Properties of the managed folder being created. The bucket and managed folder names are specified in the parent and managed_folder_id fields. Populating these fields in managed_folder will result in an error.

managedFolderId string

Required. The name of the managed folder. It uses a single / as delimiter and leading and trailing / are allowed.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskManagedFolder

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/buckets/[BUCKET]";
ManagedFolder managedFolder = new ManagedFolder();
string managedFolderId = "";
// Make the request
ManagedFolder response = await storageControlClient.CreateManagedFolderAsync(parent, managedFolder, managedFolderId);

DeleteFolder(DeleteFolderRequest, CallSettings)

public virtual void DeleteFolder(DeleteFolderRequest request, CallSettings callSettings = null)

Permanently deletes an empty folder. This operation is only applicable to a hierarchical namespace enabled bucket.

Parameters
Name Description
request DeleteFolderRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
StorageControlClient storageControlClient = StorageControlClient.Create();
// Initialize request argument(s)
DeleteFolderRequest request = new DeleteFolderRequest
{
    IfMetagenerationMatch = 0L,
    IfMetagenerationNotMatch = 0L,
    FolderName = FolderName.FromProjectBucketFolder("[PROJECT]", "[BUCKET]", "[FOLDER]"),
};
// Make the request
storageControlClient.DeleteFolder(request);

DeleteFolder(FolderName, CallSettings)

public virtual void DeleteFolder(FolderName name, CallSettings callSettings = null)

Permanently deletes an empty folder. This operation is only applicable to a hierarchical namespace enabled bucket.

Parameters
Name Description
name FolderName

Required. Name of the folder. Format: projects/{project}/buckets/{bucket}/folders/{folder}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
StorageControlClient storageControlClient = StorageControlClient.Create();
// Initialize request argument(s)
FolderName name = FolderName.FromProjectBucketFolder("[PROJECT]", "[BUCKET]", "[FOLDER]");
// Make the request
storageControlClient.DeleteFolder(name);

DeleteFolder(string, CallSettings)

public virtual void DeleteFolder(string name, CallSettings callSettings = null)

Permanently deletes an empty folder. This operation is only applicable to a hierarchical namespace enabled bucket.

Parameters
Name Description
name string

Required. Name of the folder. Format: projects/{project}/buckets/{bucket}/folders/{folder}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
StorageControlClient storageControlClient = StorageControlClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/buckets/[BUCKET]/folders/[FOLDER]";
// Make the request
storageControlClient.DeleteFolder(name);

DeleteFolderAsync(DeleteFolderRequest, CallSettings)

public virtual Task DeleteFolderAsync(DeleteFolderRequest request, CallSettings callSettings = null)

Permanently deletes an empty folder. This operation is only applicable to a hierarchical namespace enabled bucket.

Parameters
Name Description
request DeleteFolderRequest

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
Task

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
DeleteFolderRequest request = new DeleteFolderRequest
{
    IfMetagenerationMatch = 0L,
    IfMetagenerationNotMatch = 0L,
    FolderName = FolderName.FromProjectBucketFolder("[PROJECT]", "[BUCKET]", "[FOLDER]"),
};
// Make the request
await storageControlClient.DeleteFolderAsync(request);

DeleteFolderAsync(DeleteFolderRequest, CancellationToken)

public virtual Task DeleteFolderAsync(DeleteFolderRequest request, CancellationToken cancellationToken)

Permanently deletes an empty folder. This operation is only applicable to a hierarchical namespace enabled bucket.

Parameters
Name Description
request DeleteFolderRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
DeleteFolderRequest request = new DeleteFolderRequest
{
    IfMetagenerationMatch = 0L,
    IfMetagenerationNotMatch = 0L,
    FolderName = FolderName.FromProjectBucketFolder("[PROJECT]", "[BUCKET]", "[FOLDER]"),
};
// Make the request
await storageControlClient.DeleteFolderAsync(request);

DeleteFolderAsync(FolderName, CallSettings)

public virtual Task DeleteFolderAsync(FolderName name, CallSettings callSettings = null)

Permanently deletes an empty folder. This operation is only applicable to a hierarchical namespace enabled bucket.

Parameters
Name Description
name FolderName

Required. Name of the folder. Format: projects/{project}/buckets/{bucket}/folders/{folder}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
FolderName name = FolderName.FromProjectBucketFolder("[PROJECT]", "[BUCKET]", "[FOLDER]");
// Make the request
await storageControlClient.DeleteFolderAsync(name);

DeleteFolderAsync(FolderName, CancellationToken)

public virtual Task DeleteFolderAsync(FolderName name, CancellationToken cancellationToken)

Permanently deletes an empty folder. This operation is only applicable to a hierarchical namespace enabled bucket.

Parameters
Name Description
name FolderName

Required. Name of the folder. Format: projects/{project}/buckets/{bucket}/folders/{folder}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
FolderName name = FolderName.FromProjectBucketFolder("[PROJECT]", "[BUCKET]", "[FOLDER]");
// Make the request
await storageControlClient.DeleteFolderAsync(name);

DeleteFolderAsync(string, CallSettings)

public virtual Task DeleteFolderAsync(string name, CallSettings callSettings = null)

Permanently deletes an empty folder. This operation is only applicable to a hierarchical namespace enabled bucket.

Parameters
Name Description
name string

Required. Name of the folder. Format: projects/{project}/buckets/{bucket}/folders/{folder}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/buckets/[BUCKET]/folders/[FOLDER]";
// Make the request
await storageControlClient.DeleteFolderAsync(name);

DeleteFolderAsync(string, CancellationToken)

public virtual Task DeleteFolderAsync(string name, CancellationToken cancellationToken)

Permanently deletes an empty folder. This operation is only applicable to a hierarchical namespace enabled bucket.

Parameters
Name Description
name string

Required. Name of the folder. Format: projects/{project}/buckets/{bucket}/folders/{folder}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/buckets/[BUCKET]/folders/[FOLDER]";
// Make the request
await storageControlClient.DeleteFolderAsync(name);

DeleteManagedFolder(DeleteManagedFolderRequest, CallSettings)

public virtual void DeleteManagedFolder(DeleteManagedFolderRequest request, CallSettings callSettings = null)

Permanently deletes an empty managed folder.

Parameters
Name Description
request DeleteManagedFolderRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
StorageControlClient storageControlClient = StorageControlClient.Create();
// Initialize request argument(s)
DeleteManagedFolderRequest request = new DeleteManagedFolderRequest
{
    IfMetagenerationMatch = 0L,
    IfMetagenerationNotMatch = 0L,
    AllowNonEmpty = false,
    ManagedFolderName = ManagedFolderName.FromProjectBucketManagedFolder("[PROJECT]", "[BUCKET]", "[MANAGED_FOLDER]"),
};
// Make the request
storageControlClient.DeleteManagedFolder(request);

DeleteManagedFolder(ManagedFolderName, CallSettings)

public virtual void DeleteManagedFolder(ManagedFolderName name, CallSettings callSettings = null)

Permanently deletes an empty managed folder.

Parameters
Name Description
name ManagedFolderName

Required. Name of the managed folder. Format: projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
StorageControlClient storageControlClient = StorageControlClient.Create();
// Initialize request argument(s)
ManagedFolderName name = ManagedFolderName.FromProjectBucketManagedFolder("[PROJECT]", "[BUCKET]", "[MANAGED_FOLDER]");
// Make the request
storageControlClient.DeleteManagedFolder(name);

DeleteManagedFolder(string, CallSettings)

public virtual void DeleteManagedFolder(string name, CallSettings callSettings = null)

Permanently deletes an empty managed folder.

Parameters
Name Description
name string

Required. Name of the managed folder. Format: projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
StorageControlClient storageControlClient = StorageControlClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/buckets/[BUCKET]/managedFolders/[MANAGED_FOLDER]";
// Make the request
storageControlClient.DeleteManagedFolder(name);

DeleteManagedFolderAsync(DeleteManagedFolderRequest, CallSettings)

public virtual Task DeleteManagedFolderAsync(DeleteManagedFolderRequest request, CallSettings callSettings = null)

Permanently deletes an empty managed folder.

Parameters
Name Description
request DeleteManagedFolderRequest

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
Task

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
DeleteManagedFolderRequest request = new DeleteManagedFolderRequest
{
    IfMetagenerationMatch = 0L,
    IfMetagenerationNotMatch = 0L,
    AllowNonEmpty = false,
    ManagedFolderName = ManagedFolderName.FromProjectBucketManagedFolder("[PROJECT]", "[BUCKET]", "[MANAGED_FOLDER]"),
};
// Make the request
await storageControlClient.DeleteManagedFolderAsync(request);

DeleteManagedFolderAsync(DeleteManagedFolderRequest, CancellationToken)

public virtual Task DeleteManagedFolderAsync(DeleteManagedFolderRequest request, CancellationToken cancellationToken)

Permanently deletes an empty managed folder.

Parameters
Name Description
request DeleteManagedFolderRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
DeleteManagedFolderRequest request = new DeleteManagedFolderRequest
{
    IfMetagenerationMatch = 0L,
    IfMetagenerationNotMatch = 0L,
    AllowNonEmpty = false,
    ManagedFolderName = ManagedFolderName.FromProjectBucketManagedFolder("[PROJECT]", "[BUCKET]", "[MANAGED_FOLDER]"),
};
// Make the request
await storageControlClient.DeleteManagedFolderAsync(request);

DeleteManagedFolderAsync(ManagedFolderName, CallSettings)

public virtual Task DeleteManagedFolderAsync(ManagedFolderName name, CallSettings callSettings = null)

Permanently deletes an empty managed folder.

Parameters
Name Description
name ManagedFolderName

Required. Name of the managed folder. Format: projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
ManagedFolderName name = ManagedFolderName.FromProjectBucketManagedFolder("[PROJECT]", "[BUCKET]", "[MANAGED_FOLDER]");
// Make the request
await storageControlClient.DeleteManagedFolderAsync(name);

DeleteManagedFolderAsync(ManagedFolderName, CancellationToken)

public virtual Task DeleteManagedFolderAsync(ManagedFolderName name, CancellationToken cancellationToken)

Permanently deletes an empty managed folder.

Parameters
Name Description
name ManagedFolderName

Required. Name of the managed folder. Format: projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
ManagedFolderName name = ManagedFolderName.FromProjectBucketManagedFolder("[PROJECT]", "[BUCKET]", "[MANAGED_FOLDER]");
// Make the request
await storageControlClient.DeleteManagedFolderAsync(name);

DeleteManagedFolderAsync(string, CallSettings)

public virtual Task DeleteManagedFolderAsync(string name, CallSettings callSettings = null)

Permanently deletes an empty managed folder.

Parameters
Name Description
name string

Required. Name of the managed folder. Format: projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/buckets/[BUCKET]/managedFolders/[MANAGED_FOLDER]";
// Make the request
await storageControlClient.DeleteManagedFolderAsync(name);

DeleteManagedFolderAsync(string, CancellationToken)

public virtual Task DeleteManagedFolderAsync(string name, CancellationToken cancellationToken)

Permanently deletes an empty managed folder.

Parameters
Name Description
name string

Required. Name of the managed folder. Format: projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/buckets/[BUCKET]/managedFolders/[MANAGED_FOLDER]";
// Make the request
await storageControlClient.DeleteManagedFolderAsync(name);

DisableAnywhereCache(AnywhereCacheName, CallSettings)

public virtual AnywhereCache DisableAnywhereCache(AnywhereCacheName name, CallSettings callSettings = null)

Disables an Anywhere Cache instance. A disabled instance is read-only. The disablement could be revoked by calling ResumeAnywhereCache. The cache instance will be deleted automatically if it remains in the disabled state for at least one hour.

Parameters
Name Description
name AnywhereCacheName

Required. The name field in the request should be: projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
AnywhereCache

The RPC response.

Example
// Create client
StorageControlClient storageControlClient = StorageControlClient.Create();
// Initialize request argument(s)
AnywhereCacheName name = AnywhereCacheName.FromProjectBucketAnywhereCache("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]");
// Make the request
AnywhereCache response = storageControlClient.DisableAnywhereCache(name);

DisableAnywhereCache(DisableAnywhereCacheRequest, CallSettings)

public virtual AnywhereCache DisableAnywhereCache(DisableAnywhereCacheRequest request, CallSettings callSettings = null)

Disables an Anywhere Cache instance. A disabled instance is read-only. The disablement could be revoked by calling ResumeAnywhereCache. The cache instance will be deleted automatically if it remains in the disabled state for at least one hour.

Parameters
Name Description
request DisableAnywhereCacheRequest

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
AnywhereCache

The RPC response.

Example
// Create client
StorageControlClient storageControlClient = StorageControlClient.Create();
// Initialize request argument(s)
DisableAnywhereCacheRequest request = new DisableAnywhereCacheRequest
{
    AnywhereCacheName = AnywhereCacheName.FromProjectBucketAnywhereCache("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]"),
};
// Make the request
AnywhereCache response = storageControlClient.DisableAnywhereCache(request);

DisableAnywhereCache(string, CallSettings)

public virtual AnywhereCache DisableAnywhereCache(string name, CallSettings callSettings = null)

Disables an Anywhere Cache instance. A disabled instance is read-only. The disablement could be revoked by calling ResumeAnywhereCache. The cache instance will be deleted automatically if it remains in the disabled state for at least one hour.

Parameters
Name Description
name string

Required. The name field in the request should be: projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
AnywhereCache

The RPC response.

Example
// Create client
StorageControlClient storageControlClient = StorageControlClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/buckets/[BUCKET]/anywhereCaches/[ANYWHERE_CACHE]";
// Make the request
AnywhereCache response = storageControlClient.DisableAnywhereCache(name);

DisableAnywhereCacheAsync(AnywhereCacheName, CallSettings)

public virtual Task<AnywhereCache> DisableAnywhereCacheAsync(AnywhereCacheName name, CallSettings callSettings = null)

Disables an Anywhere Cache instance. A disabled instance is read-only. The disablement could be revoked by calling ResumeAnywhereCache. The cache instance will be deleted automatically if it remains in the disabled state for at least one hour.

Parameters
Name Description
name AnywhereCacheName

Required. The name field in the request should be: projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskAnywhereCache

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
AnywhereCacheName name = AnywhereCacheName.FromProjectBucketAnywhereCache("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]");
// Make the request
AnywhereCache response = await storageControlClient.DisableAnywhereCacheAsync(name);

DisableAnywhereCacheAsync(AnywhereCacheName, CancellationToken)

public virtual Task<AnywhereCache> DisableAnywhereCacheAsync(AnywhereCacheName name, CancellationToken cancellationToken)

Disables an Anywhere Cache instance. A disabled instance is read-only. The disablement could be revoked by calling ResumeAnywhereCache. The cache instance will be deleted automatically if it remains in the disabled state for at least one hour.

Parameters
Name Description
name AnywhereCacheName

Required. The name field in the request should be: projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskAnywhereCache

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
AnywhereCacheName name = AnywhereCacheName.FromProjectBucketAnywhereCache("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]");
// Make the request
AnywhereCache response = await storageControlClient.DisableAnywhereCacheAsync(name);

DisableAnywhereCacheAsync(DisableAnywhereCacheRequest, CallSettings)

public virtual Task<AnywhereCache> DisableAnywhereCacheAsync(DisableAnywhereCacheRequest request, CallSettings callSettings = null)

Disables an Anywhere Cache instance. A disabled instance is read-only. The disablement could be revoked by calling ResumeAnywhereCache. The cache instance will be deleted automatically if it remains in the disabled state for at least one hour.

Parameters
Name Description
request DisableAnywhereCacheRequest

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
TaskAnywhereCache

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
DisableAnywhereCacheRequest request = new DisableAnywhereCacheRequest
{
    AnywhereCacheName = AnywhereCacheName.FromProjectBucketAnywhereCache("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]"),
};
// Make the request
AnywhereCache response = await storageControlClient.DisableAnywhereCacheAsync(request);

DisableAnywhereCacheAsync(DisableAnywhereCacheRequest, CancellationToken)

public virtual Task<AnywhereCache> DisableAnywhereCacheAsync(DisableAnywhereCacheRequest request, CancellationToken cancellationToken)

Disables an Anywhere Cache instance. A disabled instance is read-only. The disablement could be revoked by calling ResumeAnywhereCache. The cache instance will be deleted automatically if it remains in the disabled state for at least one hour.

Parameters
Name Description
request DisableAnywhereCacheRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskAnywhereCache

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
DisableAnywhereCacheRequest request = new DisableAnywhereCacheRequest
{
    AnywhereCacheName = AnywhereCacheName.FromProjectBucketAnywhereCache("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]"),
};
// Make the request
AnywhereCache response = await storageControlClient.DisableAnywhereCacheAsync(request);

DisableAnywhereCacheAsync(string, CallSettings)

public virtual Task<AnywhereCache> DisableAnywhereCacheAsync(string name, CallSettings callSettings = null)

Disables an Anywhere Cache instance. A disabled instance is read-only. The disablement could be revoked by calling ResumeAnywhereCache. The cache instance will be deleted automatically if it remains in the disabled state for at least one hour.

Parameters
Name Description
name string

Required. The name field in the request should be: projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskAnywhereCache

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/buckets/[BUCKET]/anywhereCaches/[ANYWHERE_CACHE]";
// Make the request
AnywhereCache response = await storageControlClient.DisableAnywhereCacheAsync(name);

DisableAnywhereCacheAsync(string, CancellationToken)

public virtual Task<AnywhereCache> DisableAnywhereCacheAsync(string name, CancellationToken cancellationToken)

Disables an Anywhere Cache instance. A disabled instance is read-only. The disablement could be revoked by calling ResumeAnywhereCache. The cache instance will be deleted automatically if it remains in the disabled state for at least one hour.

Parameters
Name Description
name string

Required. The name field in the request should be: projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskAnywhereCache

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/buckets/[BUCKET]/anywhereCaches/[ANYWHERE_CACHE]";
// Make the request
AnywhereCache response = await storageControlClient.DisableAnywhereCacheAsync(name);

GetAnywhereCache(AnywhereCacheName, CallSettings)

public virtual AnywhereCache GetAnywhereCache(AnywhereCacheName name, CallSettings callSettings = null)

Gets an Anywhere Cache instance.

Parameters
Name Description
name AnywhereCacheName

Required. The name field in the request should be: projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
AnywhereCache

The RPC response.

Example
// Create client
StorageControlClient storageControlClient = StorageControlClient.Create();
// Initialize request argument(s)
AnywhereCacheName name = AnywhereCacheName.FromProjectBucketAnywhereCache("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]");
// Make the request
AnywhereCache response = storageControlClient.GetAnywhereCache(name);

GetAnywhereCache(GetAnywhereCacheRequest, CallSettings)

public virtual AnywhereCache GetAnywhereCache(GetAnywhereCacheRequest request, CallSettings callSettings = null)

Gets an Anywhere Cache instance.

Parameters
Name Description
request GetAnywhereCacheRequest

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
AnywhereCache

The RPC response.

Example
// Create client
StorageControlClient storageControlClient = StorageControlClient.Create();
// Initialize request argument(s)
GetAnywhereCacheRequest request = new GetAnywhereCacheRequest
{
    AnywhereCacheName = AnywhereCacheName.FromProjectBucketAnywhereCache("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]"),
};
// Make the request
AnywhereCache response = storageControlClient.GetAnywhereCache(request);

GetAnywhereCache(string, CallSettings)

public virtual AnywhereCache GetAnywhereCache(string name, CallSettings callSettings = null)

Gets an Anywhere Cache instance.

Parameters
Name Description
name string

Required. The name field in the request should be: projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
AnywhereCache

The RPC response.

Example
// Create client
StorageControlClient storageControlClient = StorageControlClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/buckets/[BUCKET]/anywhereCaches/[ANYWHERE_CACHE]";
// Make the request
AnywhereCache response = storageControlClient.GetAnywhereCache(name);

GetAnywhereCacheAsync(AnywhereCacheName, CallSettings)

public virtual Task<AnywhereCache> GetAnywhereCacheAsync(AnywhereCacheName name, CallSettings callSettings = null)

Gets an Anywhere Cache instance.

Parameters
Name Description
name AnywhereCacheName

Required. The name field in the request should be: projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskAnywhereCache

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
AnywhereCacheName name = AnywhereCacheName.FromProjectBucketAnywhereCache("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]");
// Make the request
AnywhereCache response = await storageControlClient.GetAnywhereCacheAsync(name);

GetAnywhereCacheAsync(AnywhereCacheName, CancellationToken)

public virtual Task<AnywhereCache> GetAnywhereCacheAsync(AnywhereCacheName name, CancellationToken cancellationToken)

Gets an Anywhere Cache instance.

Parameters
Name Description
name AnywhereCacheName

Required. The name field in the request should be: projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskAnywhereCache

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
AnywhereCacheName name = AnywhereCacheName.FromProjectBucketAnywhereCache("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]");
// Make the request
AnywhereCache response = await storageControlClient.GetAnywhereCacheAsync(name);

GetAnywhereCacheAsync(GetAnywhereCacheRequest, CallSettings)

public virtual Task<AnywhereCache> GetAnywhereCacheAsync(GetAnywhereCacheRequest request, CallSettings callSettings = null)

Gets an Anywhere Cache instance.

Parameters
Name Description
request GetAnywhereCacheRequest

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
TaskAnywhereCache

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
GetAnywhereCacheRequest request = new GetAnywhereCacheRequest
{
    AnywhereCacheName = AnywhereCacheName.FromProjectBucketAnywhereCache("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]"),
};
// Make the request
AnywhereCache response = await storageControlClient.GetAnywhereCacheAsync(request);

GetAnywhereCacheAsync(GetAnywhereCacheRequest, CancellationToken)

public virtual Task<AnywhereCache> GetAnywhereCacheAsync(GetAnywhereCacheRequest request, CancellationToken cancellationToken)

Gets an Anywhere Cache instance.

Parameters
Name Description
request GetAnywhereCacheRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskAnywhereCache

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
GetAnywhereCacheRequest request = new GetAnywhereCacheRequest
{
    AnywhereCacheName = AnywhereCacheName.FromProjectBucketAnywhereCache("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]"),
};
// Make the request
AnywhereCache response = await storageControlClient.GetAnywhereCacheAsync(request);

GetAnywhereCacheAsync(string, CallSettings)

public virtual Task<AnywhereCache> GetAnywhereCacheAsync(string name, CallSettings callSettings = null)

Gets an Anywhere Cache instance.

Parameters
Name Description
name string

Required. The name field in the request should be: projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskAnywhereCache

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/buckets/[BUCKET]/anywhereCaches/[ANYWHERE_CACHE]";
// Make the request
AnywhereCache response = await storageControlClient.GetAnywhereCacheAsync(name);

GetAnywhereCacheAsync(string, CancellationToken)

public virtual Task<AnywhereCache> GetAnywhereCacheAsync(string name, CancellationToken cancellationToken)

Gets an Anywhere Cache instance.

Parameters
Name Description
name string

Required. The name field in the request should be: projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskAnywhereCache

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/buckets/[BUCKET]/anywhereCaches/[ANYWHERE_CACHE]";
// Make the request
AnywhereCache response = await storageControlClient.GetAnywhereCacheAsync(name);

GetFolder(FolderName, CallSettings)

public virtual Folder GetFolder(FolderName name, CallSettings callSettings = null)

Returns metadata for the specified folder. This operation is only applicable to a hierarchical namespace enabled bucket.

Parameters
Name Description
name FolderName

Required. Name of the folder. Format: projects/{project}/buckets/{bucket}/folders/{folder}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Folder

The RPC response.

Example
// Create client
StorageControlClient storageControlClient = StorageControlClient.Create();
// Initialize request argument(s)
FolderName name = FolderName.FromProjectBucketFolder("[PROJECT]", "[BUCKET]", "[FOLDER]");
// Make the request
Folder response = storageControlClient.GetFolder(name);

GetFolder(GetFolderRequest, CallSettings)

public virtual Folder GetFolder(GetFolderRequest request, CallSettings callSettings = null)

Returns metadata for the specified folder. This operation is only applicable to a hierarchical namespace enabled bucket.

Parameters
Name Description
request GetFolderRequest

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
Folder

The RPC response.

Example
// Create client
StorageControlClient storageControlClient = StorageControlClient.Create();
// Initialize request argument(s)
GetFolderRequest request = new GetFolderRequest
{
    IfMetagenerationMatch = 0L,
    IfMetagenerationNotMatch = 0L,
    FolderName = FolderName.FromProjectBucketFolder("[PROJECT]", "[BUCKET]", "[FOLDER]"),
};
// Make the request
Folder response = storageControlClient.GetFolder(request);

GetFolder(string, CallSettings)

public virtual Folder GetFolder(string name, CallSettings callSettings = null)

Returns metadata for the specified folder. This operation is only applicable to a hierarchical namespace enabled bucket.

Parameters
Name Description
name string

Required. Name of the folder. Format: projects/{project}/buckets/{bucket}/folders/{folder}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Folder

The RPC response.

Example
// Create client
StorageControlClient storageControlClient = StorageControlClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/buckets/[BUCKET]/folders/[FOLDER]";
// Make the request
Folder response = storageControlClient.GetFolder(name);

GetFolderAsync(FolderName, CallSettings)

public virtual Task<Folder> GetFolderAsync(FolderName name, CallSettings callSettings = null)

Returns metadata for the specified folder. This operation is only applicable to a hierarchical namespace enabled bucket.

Parameters
Name Description
name FolderName

Required. Name of the folder. Format: projects/{project}/buckets/{bucket}/folders/{folder}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskFolder

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
FolderName name = FolderName.FromProjectBucketFolder("[PROJECT]", "[BUCKET]", "[FOLDER]");
// Make the request
Folder response = await storageControlClient.GetFolderAsync(name);

GetFolderAsync(FolderName, CancellationToken)

public virtual Task<Folder> GetFolderAsync(FolderName name, CancellationToken cancellationToken)

Returns metadata for the specified folder. This operation is only applicable to a hierarchical namespace enabled bucket.

Parameters
Name Description
name FolderName

Required. Name of the folder. Format: projects/{project}/buckets/{bucket}/folders/{folder}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskFolder

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
FolderName name = FolderName.FromProjectBucketFolder("[PROJECT]", "[BUCKET]", "[FOLDER]");
// Make the request
Folder response = await storageControlClient.GetFolderAsync(name);

GetFolderAsync(GetFolderRequest, CallSettings)

public virtual Task<Folder> GetFolderAsync(GetFolderRequest request, CallSettings callSettings = null)

Returns metadata for the specified folder. This operation is only applicable to a hierarchical namespace enabled bucket.

Parameters
Name Description
request GetFolderRequest

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
TaskFolder

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
GetFolderRequest request = new GetFolderRequest
{
    IfMetagenerationMatch = 0L,
    IfMetagenerationNotMatch = 0L,
    FolderName = FolderName.FromProjectBucketFolder("[PROJECT]", "[BUCKET]", "[FOLDER]"),
};
// Make the request
Folder response = await storageControlClient.GetFolderAsync(request);

GetFolderAsync(GetFolderRequest, CancellationToken)

public virtual Task<Folder> GetFolderAsync(GetFolderRequest request, CancellationToken cancellationToken)

Returns metadata for the specified folder. This operation is only applicable to a hierarchical namespace enabled bucket.

Parameters
Name Description
request GetFolderRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskFolder

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
GetFolderRequest request = new GetFolderRequest
{
    IfMetagenerationMatch = 0L,
    IfMetagenerationNotMatch = 0L,
    FolderName = FolderName.FromProjectBucketFolder("[PROJECT]", "[BUCKET]", "[FOLDER]"),
};
// Make the request
Folder response = await storageControlClient.GetFolderAsync(request);

GetFolderAsync(string, CallSettings)

public virtual Task<Folder> GetFolderAsync(string name, CallSettings callSettings = null)

Returns metadata for the specified folder. This operation is only applicable to a hierarchical namespace enabled bucket.

Parameters
Name Description
name string

Required. Name of the folder. Format: projects/{project}/buckets/{bucket}/folders/{folder}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskFolder

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/buckets/[BUCKET]/folders/[FOLDER]";
// Make the request
Folder response = await storageControlClient.GetFolderAsync(name);

GetFolderAsync(string, CancellationToken)

public virtual Task<Folder> GetFolderAsync(string name, CancellationToken cancellationToken)

Returns metadata for the specified folder. This operation is only applicable to a hierarchical namespace enabled bucket.

Parameters
Name Description
name string

Required. Name of the folder. Format: projects/{project}/buckets/{bucket}/folders/{folder}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskFolder

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/buckets/[BUCKET]/folders/[FOLDER]";
// Make the request
Folder response = await storageControlClient.GetFolderAsync(name);

GetManagedFolder(GetManagedFolderRequest, CallSettings)

public virtual ManagedFolder GetManagedFolder(GetManagedFolderRequest request, CallSettings callSettings = null)

Returns metadata for the specified managed folder.

Parameters
Name Description
request GetManagedFolderRequest

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
ManagedFolder

The RPC response.

Example
// Create client
StorageControlClient storageControlClient = StorageControlClient.Create();
// Initialize request argument(s)
GetManagedFolderRequest request = new GetManagedFolderRequest
{
    IfMetagenerationMatch = 0L,
    IfMetagenerationNotMatch = 0L,
    ManagedFolderName = ManagedFolderName.FromProjectBucketManagedFolder("[PROJECT]", "[BUCKET]", "[MANAGED_FOLDER]"),
};
// Make the request
ManagedFolder response = storageControlClient.GetManagedFolder(request);

GetManagedFolder(ManagedFolderName, CallSettings)

public virtual ManagedFolder GetManagedFolder(ManagedFolderName name, CallSettings callSettings = null)

Returns metadata for the specified managed folder.

Parameters
Name Description
name ManagedFolderName

Required. Name of the managed folder. Format: projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
ManagedFolder

The RPC response.

Example
// Create client
StorageControlClient storageControlClient = StorageControlClient.Create();
// Initialize request argument(s)
ManagedFolderName name = ManagedFolderName.FromProjectBucketManagedFolder("[PROJECT]", "[BUCKET]", "[MANAGED_FOLDER]");
// Make the request
ManagedFolder response = storageControlClient.GetManagedFolder(name);

GetManagedFolder(string, CallSettings)

public virtual ManagedFolder GetManagedFolder(string name, CallSettings callSettings = null)

Returns metadata for the specified managed folder.

Parameters
Name Description
name string

Required. Name of the managed folder. Format: projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
ManagedFolder

The RPC response.

Example
// Create client
StorageControlClient storageControlClient = StorageControlClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/buckets/[BUCKET]/managedFolders/[MANAGED_FOLDER]";
// Make the request
ManagedFolder response = storageControlClient.GetManagedFolder(name);

GetManagedFolderAsync(GetManagedFolderRequest, CallSettings)

public virtual Task<ManagedFolder> GetManagedFolderAsync(GetManagedFolderRequest request, CallSettings callSettings = null)

Returns metadata for the specified managed folder.

Parameters
Name Description
request GetManagedFolderRequest

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
TaskManagedFolder

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
GetManagedFolderRequest request = new GetManagedFolderRequest
{
    IfMetagenerationMatch = 0L,
    IfMetagenerationNotMatch = 0L,
    ManagedFolderName = ManagedFolderName.FromProjectBucketManagedFolder("[PROJECT]", "[BUCKET]", "[MANAGED_FOLDER]"),
};
// Make the request
ManagedFolder response = await storageControlClient.GetManagedFolderAsync(request);

GetManagedFolderAsync(GetManagedFolderRequest, CancellationToken)

public virtual Task<ManagedFolder> GetManagedFolderAsync(GetManagedFolderRequest request, CancellationToken cancellationToken)

Returns metadata for the specified managed folder.

Parameters
Name Description
request GetManagedFolderRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskManagedFolder

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
GetManagedFolderRequest request = new GetManagedFolderRequest
{
    IfMetagenerationMatch = 0L,
    IfMetagenerationNotMatch = 0L,
    ManagedFolderName = ManagedFolderName.FromProjectBucketManagedFolder("[PROJECT]", "[BUCKET]", "[MANAGED_FOLDER]"),
};
// Make the request
ManagedFolder response = await storageControlClient.GetManagedFolderAsync(request);

GetManagedFolderAsync(ManagedFolderName, CallSettings)

public virtual Task<ManagedFolder> GetManagedFolderAsync(ManagedFolderName name, CallSettings callSettings = null)

Returns metadata for the specified managed folder.

Parameters
Name Description
name ManagedFolderName

Required. Name of the managed folder. Format: projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskManagedFolder

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
ManagedFolderName name = ManagedFolderName.FromProjectBucketManagedFolder("[PROJECT]", "[BUCKET]", "[MANAGED_FOLDER]");
// Make the request
ManagedFolder response = await storageControlClient.GetManagedFolderAsync(name);

GetManagedFolderAsync(ManagedFolderName, CancellationToken)

public virtual Task<ManagedFolder> GetManagedFolderAsync(ManagedFolderName name, CancellationToken cancellationToken)

Returns metadata for the specified managed folder.

Parameters
Name Description
name ManagedFolderName

Required. Name of the managed folder. Format: projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskManagedFolder

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
ManagedFolderName name = ManagedFolderName.FromProjectBucketManagedFolder("[PROJECT]", "[BUCKET]", "[MANAGED_FOLDER]");
// Make the request
ManagedFolder response = await storageControlClient.GetManagedFolderAsync(name);

GetManagedFolderAsync(string, CallSettings)

public virtual Task<ManagedFolder> GetManagedFolderAsync(string name, CallSettings callSettings = null)

Returns metadata for the specified managed folder.

Parameters
Name Description
name string

Required. Name of the managed folder. Format: projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskManagedFolder

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/buckets/[BUCKET]/managedFolders/[MANAGED_FOLDER]";
// Make the request
ManagedFolder response = await storageControlClient.GetManagedFolderAsync(name);

GetManagedFolderAsync(string, CancellationToken)

public virtual Task<ManagedFolder> GetManagedFolderAsync(string name, CancellationToken cancellationToken)

Returns metadata for the specified managed folder.

Parameters
Name Description
name string

Required. Name of the managed folder. Format: projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskManagedFolder

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/buckets/[BUCKET]/managedFolders/[MANAGED_FOLDER]";
// Make the request
ManagedFolder response = await storageControlClient.GetManagedFolderAsync(name);

GetStorageLayout(GetStorageLayoutRequest, CallSettings)

public virtual StorageLayout GetStorageLayout(GetStorageLayoutRequest request, CallSettings callSettings = null)

Returns the storage layout configuration for a given bucket.

Parameters
Name Description
request GetStorageLayoutRequest

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
StorageLayout

The RPC response.

Example
// Create client
StorageControlClient storageControlClient = StorageControlClient.Create();
// Initialize request argument(s)
GetStorageLayoutRequest request = new GetStorageLayoutRequest
{
    StorageLayoutName = StorageLayoutName.FromProjectBucket("[PROJECT]", "[BUCKET]"),
    Prefix = "",
};
// Make the request
StorageLayout response = storageControlClient.GetStorageLayout(request);

GetStorageLayout(StorageLayoutName, CallSettings)

public virtual StorageLayout GetStorageLayout(StorageLayoutName name, CallSettings callSettings = null)

Returns the storage layout configuration for a given bucket.

Parameters
Name Description
name StorageLayoutName

Required. The name of the StorageLayout resource. Format: projects/{project}/buckets/{bucket}/storageLayout

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
StorageLayout

The RPC response.

Example
// Create client
StorageControlClient storageControlClient = StorageControlClient.Create();
// Initialize request argument(s)
StorageLayoutName name = StorageLayoutName.FromProjectBucket("[PROJECT]", "[BUCKET]");
// Make the request
StorageLayout response = storageControlClient.GetStorageLayout(name);

GetStorageLayout(string, CallSettings)

public virtual StorageLayout GetStorageLayout(string name, CallSettings callSettings = null)

Returns the storage layout configuration for a given bucket.

Parameters
Name Description
name string

Required. The name of the StorageLayout resource. Format: projects/{project}/buckets/{bucket}/storageLayout

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
StorageLayout

The RPC response.

Example
// Create client
StorageControlClient storageControlClient = StorageControlClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/buckets/[BUCKET]/storageLayout";
// Make the request
StorageLayout response = storageControlClient.GetStorageLayout(name);

GetStorageLayoutAsync(GetStorageLayoutRequest, CallSettings)

public virtual Task<StorageLayout> GetStorageLayoutAsync(GetStorageLayoutRequest request, CallSettings callSettings = null)

Returns the storage layout configuration for a given bucket.

Parameters
Name Description
request GetStorageLayoutRequest

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
TaskStorageLayout

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
GetStorageLayoutRequest request = new GetStorageLayoutRequest
{
    StorageLayoutName = StorageLayoutName.FromProjectBucket("[PROJECT]", "[BUCKET]"),
    Prefix = "",
};
// Make the request
StorageLayout response = await storageControlClient.GetStorageLayoutAsync(request);

GetStorageLayoutAsync(GetStorageLayoutRequest, CancellationToken)

public virtual Task<StorageLayout> GetStorageLayoutAsync(GetStorageLayoutRequest request, CancellationToken cancellationToken)

Returns the storage layout configuration for a given bucket.

Parameters
Name Description
request GetStorageLayoutRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskStorageLayout

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
GetStorageLayoutRequest request = new GetStorageLayoutRequest
{
    StorageLayoutName = StorageLayoutName.FromProjectBucket("[PROJECT]", "[BUCKET]"),
    Prefix = "",
};
// Make the request
StorageLayout response = await storageControlClient.GetStorageLayoutAsync(request);

GetStorageLayoutAsync(StorageLayoutName, CallSettings)

public virtual Task<StorageLayout> GetStorageLayoutAsync(StorageLayoutName name, CallSettings callSettings = null)

Returns the storage layout configuration for a given bucket.

Parameters
Name Description
name StorageLayoutName

Required. The name of the StorageLayout resource. Format: projects/{project}/buckets/{bucket}/storageLayout

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskStorageLayout

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
StorageLayoutName name = StorageLayoutName.FromProjectBucket("[PROJECT]", "[BUCKET]");
// Make the request
StorageLayout response = await storageControlClient.GetStorageLayoutAsync(name);

GetStorageLayoutAsync(StorageLayoutName, CancellationToken)

public virtual Task<StorageLayout> GetStorageLayoutAsync(StorageLayoutName name, CancellationToken cancellationToken)

Returns the storage layout configuration for a given bucket.

Parameters
Name Description
name StorageLayoutName

Required. The name of the StorageLayout resource. Format: projects/{project}/buckets/{bucket}/storageLayout

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskStorageLayout

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
StorageLayoutName name = StorageLayoutName.FromProjectBucket("[PROJECT]", "[BUCKET]");
// Make the request
StorageLayout response = await storageControlClient.GetStorageLayoutAsync(name);

GetStorageLayoutAsync(string, CallSettings)

public virtual Task<StorageLayout> GetStorageLayoutAsync(string name, CallSettings callSettings = null)

Returns the storage layout configuration for a given bucket.

Parameters
Name Description
name string

Required. The name of the StorageLayout resource. Format: projects/{project}/buckets/{bucket}/storageLayout

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskStorageLayout

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/buckets/[BUCKET]/storageLayout";
// Make the request
StorageLayout response = await storageControlClient.GetStorageLayoutAsync(name);

GetStorageLayoutAsync(string, CancellationToken)

public virtual Task<StorageLayout> GetStorageLayoutAsync(string name, CancellationToken cancellationToken)

Returns the storage layout configuration for a given bucket.

Parameters
Name Description
name string

Required. The name of the StorageLayout resource. Format: projects/{project}/buckets/{bucket}/storageLayout

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskStorageLayout

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/buckets/[BUCKET]/storageLayout";
// Make the request
StorageLayout response = await storageControlClient.GetStorageLayoutAsync(name);

ListAnywhereCaches(BucketName, string, int?, CallSettings)

public virtual PagedEnumerable<ListAnywhereCachesResponse, AnywhereCache> ListAnywhereCaches(BucketName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Anywhere Cache instances for a given bucket.

Parameters
Name Description
parent BucketName

Required. The bucket to which this cache belongs.

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
PagedEnumerableListAnywhereCachesResponseAnywhereCache

A pageable sequence of AnywhereCache resources.

Example
// Create client
StorageControlClient storageControlClient = StorageControlClient.Create();
// Initialize request argument(s)
BucketName parent = BucketName.FromProjectBucket("[PROJECT]", "[BUCKET]");
// Make the request
PagedEnumerable<ListAnywhereCachesResponse, AnywhereCache> response = storageControlClient.ListAnywhereCaches(parent);

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

ListAnywhereCaches(ListAnywhereCachesRequest, CallSettings)

public virtual PagedEnumerable<ListAnywhereCachesResponse, AnywhereCache> ListAnywhereCaches(ListAnywhereCachesRequest request, CallSettings callSettings = null)

Lists Anywhere Cache instances for a given bucket.

Parameters
Name Description
request ListAnywhereCachesRequest

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
PagedEnumerableListAnywhereCachesResponseAnywhereCache

A pageable sequence of AnywhereCache resources.

Example
// Create client
StorageControlClient storageControlClient = StorageControlClient.Create();
// Initialize request argument(s)
ListAnywhereCachesRequest request = new ListAnywhereCachesRequest
{
    ParentAsBucketName = BucketName.FromProjectBucket("[PROJECT]", "[BUCKET]"),
};
// Make the request
PagedEnumerable<ListAnywhereCachesResponse, AnywhereCache> response = storageControlClient.ListAnywhereCaches(request);

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

ListAnywhereCaches(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListAnywhereCachesResponse, AnywhereCache> ListAnywhereCaches(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Anywhere Cache instances for a given bucket.

Parameters
Name Description
parent string

Required. The bucket to which this cache belongs.

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
PagedEnumerableListAnywhereCachesResponseAnywhereCache

A pageable sequence of AnywhereCache resources.

Example
// Create client
StorageControlClient storageControlClient = StorageControlClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/buckets/[BUCKET]";
// Make the request
PagedEnumerable<ListAnywhereCachesResponse, AnywhereCache> response = storageControlClient.ListAnywhereCaches(parent);

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

ListAnywhereCachesAsync(BucketName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListAnywhereCachesResponse, AnywhereCache> ListAnywhereCachesAsync(BucketName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Anywhere Cache instances for a given bucket.

Parameters
Name Description
parent BucketName

Required. The bucket to which this cache belongs.

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
PagedAsyncEnumerableListAnywhereCachesResponseAnywhereCache

A pageable asynchronous sequence of AnywhereCache resources.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
BucketName parent = BucketName.FromProjectBucket("[PROJECT]", "[BUCKET]");
// Make the request
PagedAsyncEnumerable<ListAnywhereCachesResponse, AnywhereCache> response = storageControlClient.ListAnywhereCachesAsync(parent);

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

ListAnywhereCachesAsync(ListAnywhereCachesRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListAnywhereCachesResponse, AnywhereCache> ListAnywhereCachesAsync(ListAnywhereCachesRequest request, CallSettings callSettings = null)

Lists Anywhere Cache instances for a given bucket.

Parameters
Name Description
request ListAnywhereCachesRequest

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
PagedAsyncEnumerableListAnywhereCachesResponseAnywhereCache

A pageable asynchronous sequence of AnywhereCache resources.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
ListAnywhereCachesRequest request = new ListAnywhereCachesRequest
{
    ParentAsBucketName = BucketName.FromProjectBucket("[PROJECT]", "[BUCKET]"),
};
// Make the request
PagedAsyncEnumerable<ListAnywhereCachesResponse, AnywhereCache> response = storageControlClient.ListAnywhereCachesAsync(request);

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

ListAnywhereCachesAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListAnywhereCachesResponse, AnywhereCache> ListAnywhereCachesAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Anywhere Cache instances for a given bucket.

Parameters
Name Description
parent string

Required. The bucket to which this cache belongs.

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
PagedAsyncEnumerableListAnywhereCachesResponseAnywhereCache

A pageable asynchronous sequence of AnywhereCache resources.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/buckets/[BUCKET]";
// Make the request
PagedAsyncEnumerable<ListAnywhereCachesResponse, AnywhereCache> response = storageControlClient.ListAnywhereCachesAsync(parent);

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

ListFolders(BucketName, string, int?, CallSettings)

public virtual PagedEnumerable<ListFoldersResponse, Folder> ListFolders(BucketName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Retrieves a list of folders. This operation is only applicable to a hierarchical namespace enabled bucket.

Parameters
Name Description
parent BucketName

Required. Name of the bucket in which to look for folders. The bucket must be a hierarchical namespace enabled bucket.

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
PagedEnumerableListFoldersResponseFolder

A pageable sequence of Folder resources.

Example
// Create client
StorageControlClient storageControlClient = StorageControlClient.Create();
// Initialize request argument(s)
BucketName parent = BucketName.FromProjectBucket("[PROJECT]", "[BUCKET]");
// Make the request
PagedEnumerable<ListFoldersResponse, Folder> response = storageControlClient.ListFolders(parent);

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

ListFolders(ListFoldersRequest, CallSettings)

public virtual PagedEnumerable<ListFoldersResponse, Folder> ListFolders(ListFoldersRequest request, CallSettings callSettings = null)

Retrieves a list of folders. This operation is only applicable to a hierarchical namespace enabled bucket.

Parameters
Name Description
request ListFoldersRequest

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
PagedEnumerableListFoldersResponseFolder

A pageable sequence of Folder resources.

Example
// Create client
StorageControlClient storageControlClient = StorageControlClient.Create();
// Initialize request argument(s)
ListFoldersRequest request = new ListFoldersRequest
{
    ParentAsBucketName = BucketName.FromProjectBucket("[PROJECT]", "[BUCKET]"),
    Prefix = "",
    LexicographicStart = "",
    LexicographicEnd = "",
    Delimiter = "",
    RequestId = "",
};
// Make the request
PagedEnumerable<ListFoldersResponse, Folder> response = storageControlClient.ListFolders(request);

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

ListFolders(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListFoldersResponse, Folder> ListFolders(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Retrieves a list of folders. This operation is only applicable to a hierarchical namespace enabled bucket.

Parameters
Name Description
parent string

Required. Name of the bucket in which to look for folders. The bucket must be a hierarchical namespace enabled bucket.

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
PagedEnumerableListFoldersResponseFolder

A pageable sequence of Folder resources.

Example
// Create client
StorageControlClient storageControlClient = StorageControlClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/buckets/[BUCKET]";
// Make the request
PagedEnumerable<ListFoldersResponse, Folder> response = storageControlClient.ListFolders(parent);

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

ListFoldersAsync(BucketName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListFoldersResponse, Folder> ListFoldersAsync(BucketName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Retrieves a list of folders. This operation is only applicable to a hierarchical namespace enabled bucket.

Parameters
Name Description
parent BucketName

Required. Name of the bucket in which to look for folders. The bucket must be a hierarchical namespace enabled bucket.

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
PagedAsyncEnumerableListFoldersResponseFolder

A pageable asynchronous sequence of Folder resources.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
BucketName parent = BucketName.FromProjectBucket("[PROJECT]", "[BUCKET]");
// Make the request
PagedAsyncEnumerable<ListFoldersResponse, Folder> response = storageControlClient.ListFoldersAsync(parent);

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

ListFoldersAsync(ListFoldersRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListFoldersResponse, Folder> ListFoldersAsync(ListFoldersRequest request, CallSettings callSettings = null)

Retrieves a list of folders. This operation is only applicable to a hierarchical namespace enabled bucket.

Parameters
Name Description
request ListFoldersRequest

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
PagedAsyncEnumerableListFoldersResponseFolder

A pageable asynchronous sequence of Folder resources.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
ListFoldersRequest request = new ListFoldersRequest
{
    ParentAsBucketName = BucketName.FromProjectBucket("[PROJECT]", "[BUCKET]"),
    Prefix = "",
    LexicographicStart = "",
    LexicographicEnd = "",
    Delimiter = "",
    RequestId = "",
};
// Make the request
PagedAsyncEnumerable<ListFoldersResponse, Folder> response = storageControlClient.ListFoldersAsync(request);

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

ListFoldersAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListFoldersResponse, Folder> ListFoldersAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Retrieves a list of folders. This operation is only applicable to a hierarchical namespace enabled bucket.

Parameters
Name Description
parent string

Required. Name of the bucket in which to look for folders. The bucket must be a hierarchical namespace enabled bucket.

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
PagedAsyncEnumerableListFoldersResponseFolder

A pageable asynchronous sequence of Folder resources.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/buckets/[BUCKET]";
// Make the request
PagedAsyncEnumerable<ListFoldersResponse, Folder> response = storageControlClient.ListFoldersAsync(parent);

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

ListManagedFolders(BucketName, string, int?, CallSettings)

public virtual PagedEnumerable<ListManagedFoldersResponse, ManagedFolder> ListManagedFolders(BucketName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Retrieves a list of managed folders for a given bucket.

Parameters
Name Description
parent BucketName

Required. Name of the bucket this managed folder belongs to.

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
PagedEnumerableListManagedFoldersResponseManagedFolder

A pageable sequence of ManagedFolder resources.

Example
// Create client
StorageControlClient storageControlClient = StorageControlClient.Create();
// Initialize request argument(s)
BucketName parent = BucketName.FromProjectBucket("[PROJECT]", "[BUCKET]");
// Make the request
PagedEnumerable<ListManagedFoldersResponse, ManagedFolder> response = storageControlClient.ListManagedFolders(parent);

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

ListManagedFolders(ListManagedFoldersRequest, CallSettings)

public virtual PagedEnumerable<ListManagedFoldersResponse, ManagedFolder> ListManagedFolders(ListManagedFoldersRequest request, CallSettings callSettings = null)

Retrieves a list of managed folders for a given bucket.

Parameters
Name Description
request ListManagedFoldersRequest

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
PagedEnumerableListManagedFoldersResponseManagedFolder

A pageable sequence of ManagedFolder resources.

Example
// Create client
StorageControlClient storageControlClient = StorageControlClient.Create();
// Initialize request argument(s)
ListManagedFoldersRequest request = new ListManagedFoldersRequest
{
    ParentAsBucketName = BucketName.FromProjectBucket("[PROJECT]", "[BUCKET]"),
    Prefix = "",
};
// Make the request
PagedEnumerable<ListManagedFoldersResponse, ManagedFolder> response = storageControlClient.ListManagedFolders(request);

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

ListManagedFolders(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListManagedFoldersResponse, ManagedFolder> ListManagedFolders(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Retrieves a list of managed folders for a given bucket.

Parameters
Name Description
parent string

Required. Name of the bucket this managed folder belongs to.

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
PagedEnumerableListManagedFoldersResponseManagedFolder

A pageable sequence of ManagedFolder resources.

Example
// Create client
StorageControlClient storageControlClient = StorageControlClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/buckets/[BUCKET]";
// Make the request
PagedEnumerable<ListManagedFoldersResponse, ManagedFolder> response = storageControlClient.ListManagedFolders(parent);

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

ListManagedFoldersAsync(BucketName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListManagedFoldersResponse, ManagedFolder> ListManagedFoldersAsync(BucketName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Retrieves a list of managed folders for a given bucket.

Parameters
Name Description
parent BucketName

Required. Name of the bucket this managed folder belongs to.

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
PagedAsyncEnumerableListManagedFoldersResponseManagedFolder

A pageable asynchronous sequence of ManagedFolder resources.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
BucketName parent = BucketName.FromProjectBucket("[PROJECT]", "[BUCKET]");
// Make the request
PagedAsyncEnumerable<ListManagedFoldersResponse, ManagedFolder> response = storageControlClient.ListManagedFoldersAsync(parent);

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

ListManagedFoldersAsync(ListManagedFoldersRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListManagedFoldersResponse, ManagedFolder> ListManagedFoldersAsync(ListManagedFoldersRequest request, CallSettings callSettings = null)

Retrieves a list of managed folders for a given bucket.

Parameters
Name Description
request ListManagedFoldersRequest

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
PagedAsyncEnumerableListManagedFoldersResponseManagedFolder

A pageable asynchronous sequence of ManagedFolder resources.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
ListManagedFoldersRequest request = new ListManagedFoldersRequest
{
    ParentAsBucketName = BucketName.FromProjectBucket("[PROJECT]", "[BUCKET]"),
    Prefix = "",
};
// Make the request
PagedAsyncEnumerable<ListManagedFoldersResponse, ManagedFolder> response = storageControlClient.ListManagedFoldersAsync(request);

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

ListManagedFoldersAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListManagedFoldersResponse, ManagedFolder> ListManagedFoldersAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Retrieves a list of managed folders for a given bucket.

Parameters
Name Description
parent string

Required. Name of the bucket this managed folder belongs to.

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
PagedAsyncEnumerableListManagedFoldersResponseManagedFolder

A pageable asynchronous sequence of ManagedFolder resources.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/buckets/[BUCKET]";
// Make the request
PagedAsyncEnumerable<ListManagedFoldersResponse, ManagedFolder> response = storageControlClient.ListManagedFoldersAsync(parent);

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

PauseAnywhereCache(AnywhereCacheName, CallSettings)

public virtual AnywhereCache PauseAnywhereCache(AnywhereCacheName name, CallSettings callSettings = null)

Pauses an Anywhere Cache instance.

Parameters
Name Description
name AnywhereCacheName

Required. The name field in the request should be: projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
AnywhereCache

The RPC response.

Example
// Create client
StorageControlClient storageControlClient = StorageControlClient.Create();
// Initialize request argument(s)
AnywhereCacheName name = AnywhereCacheName.FromProjectBucketAnywhereCache("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]");
// Make the request
AnywhereCache response = storageControlClient.PauseAnywhereCache(name);

PauseAnywhereCache(PauseAnywhereCacheRequest, CallSettings)

public virtual AnywhereCache PauseAnywhereCache(PauseAnywhereCacheRequest request, CallSettings callSettings = null)

Pauses an Anywhere Cache instance.

Parameters
Name Description
request PauseAnywhereCacheRequest

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
AnywhereCache

The RPC response.

Example
// Create client
StorageControlClient storageControlClient = StorageControlClient.Create();
// Initialize request argument(s)
PauseAnywhereCacheRequest request = new PauseAnywhereCacheRequest
{
    AnywhereCacheName = AnywhereCacheName.FromProjectBucketAnywhereCache("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]"),
};
// Make the request
AnywhereCache response = storageControlClient.PauseAnywhereCache(request);

PauseAnywhereCache(string, CallSettings)

public virtual AnywhereCache PauseAnywhereCache(string name, CallSettings callSettings = null)

Pauses an Anywhere Cache instance.

Parameters
Name Description
name string

Required. The name field in the request should be: projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
AnywhereCache

The RPC response.

Example
// Create client
StorageControlClient storageControlClient = StorageControlClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/buckets/[BUCKET]/anywhereCaches/[ANYWHERE_CACHE]";
// Make the request
AnywhereCache response = storageControlClient.PauseAnywhereCache(name);

PauseAnywhereCacheAsync(AnywhereCacheName, CallSettings)

public virtual Task<AnywhereCache> PauseAnywhereCacheAsync(AnywhereCacheName name, CallSettings callSettings = null)

Pauses an Anywhere Cache instance.

Parameters
Name Description
name AnywhereCacheName

Required. The name field in the request should be: projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskAnywhereCache

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
AnywhereCacheName name = AnywhereCacheName.FromProjectBucketAnywhereCache("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]");
// Make the request
AnywhereCache response = await storageControlClient.PauseAnywhereCacheAsync(name);

PauseAnywhereCacheAsync(AnywhereCacheName, CancellationToken)

public virtual Task<AnywhereCache> PauseAnywhereCacheAsync(AnywhereCacheName name, CancellationToken cancellationToken)

Pauses an Anywhere Cache instance.

Parameters
Name Description
name AnywhereCacheName

Required. The name field in the request should be: projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskAnywhereCache

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
AnywhereCacheName name = AnywhereCacheName.FromProjectBucketAnywhereCache("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]");
// Make the request
AnywhereCache response = await storageControlClient.PauseAnywhereCacheAsync(name);

PauseAnywhereCacheAsync(PauseAnywhereCacheRequest, CallSettings)

public virtual Task<AnywhereCache> PauseAnywhereCacheAsync(PauseAnywhereCacheRequest request, CallSettings callSettings = null)

Pauses an Anywhere Cache instance.

Parameters
Name Description
request PauseAnywhereCacheRequest

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
TaskAnywhereCache

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
PauseAnywhereCacheRequest request = new PauseAnywhereCacheRequest
{
    AnywhereCacheName = AnywhereCacheName.FromProjectBucketAnywhereCache("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]"),
};
// Make the request
AnywhereCache response = await storageControlClient.PauseAnywhereCacheAsync(request);

PauseAnywhereCacheAsync(PauseAnywhereCacheRequest, CancellationToken)

public virtual Task<AnywhereCache> PauseAnywhereCacheAsync(PauseAnywhereCacheRequest request, CancellationToken cancellationToken)

Pauses an Anywhere Cache instance.

Parameters
Name Description
request PauseAnywhereCacheRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskAnywhereCache

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
PauseAnywhereCacheRequest request = new PauseAnywhereCacheRequest
{
    AnywhereCacheName = AnywhereCacheName.FromProjectBucketAnywhereCache("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]"),
};
// Make the request
AnywhereCache response = await storageControlClient.PauseAnywhereCacheAsync(request);

PauseAnywhereCacheAsync(string, CallSettings)

public virtual Task<AnywhereCache> PauseAnywhereCacheAsync(string name, CallSettings callSettings = null)

Pauses an Anywhere Cache instance.

Parameters
Name Description
name string

Required. The name field in the request should be: projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskAnywhereCache

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/buckets/[BUCKET]/anywhereCaches/[ANYWHERE_CACHE]";
// Make the request
AnywhereCache response = await storageControlClient.PauseAnywhereCacheAsync(name);

PauseAnywhereCacheAsync(string, CancellationToken)

public virtual Task<AnywhereCache> PauseAnywhereCacheAsync(string name, CancellationToken cancellationToken)

Pauses an Anywhere Cache instance.

Parameters
Name Description
name string

Required. The name field in the request should be: projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskAnywhereCache

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/buckets/[BUCKET]/anywhereCaches/[ANYWHERE_CACHE]";
// Make the request
AnywhereCache response = await storageControlClient.PauseAnywhereCacheAsync(name);

PollOnceCreateAnywhereCache(string, CallSettings)

public virtual Operation<AnywhereCache, CreateAnywhereCacheMetadata> PollOnceCreateAnywhereCache(string operationName, CallSettings callSettings = null)

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

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
OperationAnywhereCacheCreateAnywhereCacheMetadata

The result of polling the operation.

PollOnceCreateAnywhereCacheAsync(string, CallSettings)

public virtual Task<Operation<AnywhereCache, CreateAnywhereCacheMetadata>> PollOnceCreateAnywhereCacheAsync(string operationName, CallSettings callSettings = null)

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

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
TaskOperationAnywhereCacheCreateAnywhereCacheMetadata

A task representing the result of polling the operation.

PollOnceRenameFolder(string, CallSettings)

public virtual Operation<Folder, RenameFolderMetadata> PollOnceRenameFolder(string operationName, CallSettings callSettings = null)

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

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
OperationFolderRenameFolderMetadata

The result of polling the operation.

PollOnceRenameFolderAsync(string, CallSettings)

public virtual Task<Operation<Folder, RenameFolderMetadata>> PollOnceRenameFolderAsync(string operationName, CallSettings callSettings = null)

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

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
TaskOperationFolderRenameFolderMetadata

A task representing the result of polling the operation.

PollOnceUpdateAnywhereCache(string, CallSettings)

public virtual Operation<AnywhereCache, UpdateAnywhereCacheMetadata> PollOnceUpdateAnywhereCache(string operationName, CallSettings callSettings = null)

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

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
OperationAnywhereCacheUpdateAnywhereCacheMetadata

The result of polling the operation.

PollOnceUpdateAnywhereCacheAsync(string, CallSettings)

public virtual Task<Operation<AnywhereCache, UpdateAnywhereCacheMetadata>> PollOnceUpdateAnywhereCacheAsync(string operationName, CallSettings callSettings = null)

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

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
TaskOperationAnywhereCacheUpdateAnywhereCacheMetadata

A task representing the result of polling the operation.

RenameFolder(FolderName, string, CallSettings)

public virtual Operation<Folder, RenameFolderMetadata> RenameFolder(FolderName name, string destinationFolderId, CallSettings callSettings = null)

Renames a source folder to a destination folder. This operation is only applicable to a hierarchical namespace enabled bucket. During a rename, the source and destination folders are locked until the long running operation completes.

Parameters
Name Description
name FolderName

Required. Name of the source folder being renamed. Format: projects/{project}/buckets/{bucket}/folders/{folder}

destinationFolderId string

Required. The destination folder ID, e.g. foo/bar/.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationFolderRenameFolderMetadata

The RPC response.

Example
// Create client
StorageControlClient storageControlClient = StorageControlClient.Create();
// Initialize request argument(s)
FolderName name = FolderName.FromProjectBucketFolder("[PROJECT]", "[BUCKET]", "[FOLDER]");
string destinationFolderId = "";
// Make the request
Operation<Folder, RenameFolderMetadata> response = storageControlClient.RenameFolder(name, destinationFolderId);

// Poll until the returned long-running operation is complete
Operation<Folder, RenameFolderMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Folder 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
Operation<Folder, RenameFolderMetadata> retrievedResponse = storageControlClient.PollOnceRenameFolder(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Folder retrievedResult = retrievedResponse.Result;
}

RenameFolder(RenameFolderRequest, CallSettings)

public virtual Operation<Folder, RenameFolderMetadata> RenameFolder(RenameFolderRequest request, CallSettings callSettings = null)

Renames a source folder to a destination folder. This operation is only applicable to a hierarchical namespace enabled bucket. During a rename, the source and destination folders are locked until the long running operation completes.

Parameters
Name Description
request RenameFolderRequest

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
OperationFolderRenameFolderMetadata

The RPC response.

Example
// Create client
StorageControlClient storageControlClient = StorageControlClient.Create();
// Initialize request argument(s)
RenameFolderRequest request = new RenameFolderRequest
{
    IfMetagenerationMatch = 0L,
    IfMetagenerationNotMatch = 0L,
    FolderName = FolderName.FromProjectBucketFolder("[PROJECT]", "[BUCKET]", "[FOLDER]"),
    DestinationFolderId = "",
};
// Make the request
Operation<Folder, RenameFolderMetadata> response = storageControlClient.RenameFolder(request);

// Poll until the returned long-running operation is complete
Operation<Folder, RenameFolderMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Folder 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
Operation<Folder, RenameFolderMetadata> retrievedResponse = storageControlClient.PollOnceRenameFolder(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Folder retrievedResult = retrievedResponse.Result;
}

RenameFolder(string, string, CallSettings)

public virtual Operation<Folder, RenameFolderMetadata> RenameFolder(string name, string destinationFolderId, CallSettings callSettings = null)

Renames a source folder to a destination folder. This operation is only applicable to a hierarchical namespace enabled bucket. During a rename, the source and destination folders are locked until the long running operation completes.

Parameters
Name Description
name string

Required. Name of the source folder being renamed. Format: projects/{project}/buckets/{bucket}/folders/{folder}

destinationFolderId string

Required. The destination folder ID, e.g. foo/bar/.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationFolderRenameFolderMetadata

The RPC response.

Example
// Create client
StorageControlClient storageControlClient = StorageControlClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/buckets/[BUCKET]/folders/[FOLDER]";
string destinationFolderId = "";
// Make the request
Operation<Folder, RenameFolderMetadata> response = storageControlClient.RenameFolder(name, destinationFolderId);

// Poll until the returned long-running operation is complete
Operation<Folder, RenameFolderMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Folder 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
Operation<Folder, RenameFolderMetadata> retrievedResponse = storageControlClient.PollOnceRenameFolder(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Folder retrievedResult = retrievedResponse.Result;
}

RenameFolderAsync(FolderName, string, CallSettings)

public virtual Task<Operation<Folder, RenameFolderMetadata>> RenameFolderAsync(FolderName name, string destinationFolderId, CallSettings callSettings = null)

Renames a source folder to a destination folder. This operation is only applicable to a hierarchical namespace enabled bucket. During a rename, the source and destination folders are locked until the long running operation completes.

Parameters
Name Description
name FolderName

Required. Name of the source folder being renamed. Format: projects/{project}/buckets/{bucket}/folders/{folder}

destinationFolderId string

Required. The destination folder ID, e.g. foo/bar/.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationFolderRenameFolderMetadata

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
FolderName name = FolderName.FromProjectBucketFolder("[PROJECT]", "[BUCKET]", "[FOLDER]");
string destinationFolderId = "";
// Make the request
Operation<Folder, RenameFolderMetadata> response = await storageControlClient.RenameFolderAsync(name, destinationFolderId);

// Poll until the returned long-running operation is complete
Operation<Folder, RenameFolderMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Folder 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
Operation<Folder, RenameFolderMetadata> retrievedResponse = await storageControlClient.PollOnceRenameFolderAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Folder retrievedResult = retrievedResponse.Result;
}

RenameFolderAsync(FolderName, string, CancellationToken)

public virtual Task<Operation<Folder, RenameFolderMetadata>> RenameFolderAsync(FolderName name, string destinationFolderId, CancellationToken cancellationToken)

Renames a source folder to a destination folder. This operation is only applicable to a hierarchical namespace enabled bucket. During a rename, the source and destination folders are locked until the long running operation completes.

Parameters
Name Description
name FolderName

Required. Name of the source folder being renamed. Format: projects/{project}/buckets/{bucket}/folders/{folder}

destinationFolderId string

Required. The destination folder ID, e.g. foo/bar/.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationFolderRenameFolderMetadata

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
FolderName name = FolderName.FromProjectBucketFolder("[PROJECT]", "[BUCKET]", "[FOLDER]");
string destinationFolderId = "";
// Make the request
Operation<Folder, RenameFolderMetadata> response = await storageControlClient.RenameFolderAsync(name, destinationFolderId);

// Poll until the returned long-running operation is complete
Operation<Folder, RenameFolderMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Folder 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
Operation<Folder, RenameFolderMetadata> retrievedResponse = await storageControlClient.PollOnceRenameFolderAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Folder retrievedResult = retrievedResponse.Result;
}

RenameFolderAsync(RenameFolderRequest, CallSettings)

public virtual Task<Operation<Folder, RenameFolderMetadata>> RenameFolderAsync(RenameFolderRequest request, CallSettings callSettings = null)

Renames a source folder to a destination folder. This operation is only applicable to a hierarchical namespace enabled bucket. During a rename, the source and destination folders are locked until the long running operation completes.

Parameters
Name Description
request RenameFolderRequest

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
TaskOperationFolderRenameFolderMetadata

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
RenameFolderRequest request = new RenameFolderRequest
{
    IfMetagenerationMatch = 0L,
    IfMetagenerationNotMatch = 0L,
    FolderName = FolderName.FromProjectBucketFolder("[PROJECT]", "[BUCKET]", "[FOLDER]"),
    DestinationFolderId = "",
};
// Make the request
Operation<Folder, RenameFolderMetadata> response = await storageControlClient.RenameFolderAsync(request);

// Poll until the returned long-running operation is complete
Operation<Folder, RenameFolderMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Folder 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
Operation<Folder, RenameFolderMetadata> retrievedResponse = await storageControlClient.PollOnceRenameFolderAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Folder retrievedResult = retrievedResponse.Result;
}

RenameFolderAsync(RenameFolderRequest, CancellationToken)

public virtual Task<Operation<Folder, RenameFolderMetadata>> RenameFolderAsync(RenameFolderRequest request, CancellationToken cancellationToken)

Renames a source folder to a destination folder. This operation is only applicable to a hierarchical namespace enabled bucket. During a rename, the source and destination folders are locked until the long running operation completes.

Parameters
Name Description
request RenameFolderRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationFolderRenameFolderMetadata

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
RenameFolderRequest request = new RenameFolderRequest
{
    IfMetagenerationMatch = 0L,
    IfMetagenerationNotMatch = 0L,
    FolderName = FolderName.FromProjectBucketFolder("[PROJECT]", "[BUCKET]", "[FOLDER]"),
    DestinationFolderId = "",
};
// Make the request
Operation<Folder, RenameFolderMetadata> response = await storageControlClient.RenameFolderAsync(request);

// Poll until the returned long-running operation is complete
Operation<Folder, RenameFolderMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Folder 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
Operation<Folder, RenameFolderMetadata> retrievedResponse = await storageControlClient.PollOnceRenameFolderAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Folder retrievedResult = retrievedResponse.Result;
}

RenameFolderAsync(string, string, CallSettings)

public virtual Task<Operation<Folder, RenameFolderMetadata>> RenameFolderAsync(string name, string destinationFolderId, CallSettings callSettings = null)

Renames a source folder to a destination folder. This operation is only applicable to a hierarchical namespace enabled bucket. During a rename, the source and destination folders are locked until the long running operation completes.

Parameters
Name Description
name string

Required. Name of the source folder being renamed. Format: projects/{project}/buckets/{bucket}/folders/{folder}

destinationFolderId string

Required. The destination folder ID, e.g. foo/bar/.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationFolderRenameFolderMetadata

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/buckets/[BUCKET]/folders/[FOLDER]";
string destinationFolderId = "";
// Make the request
Operation<Folder, RenameFolderMetadata> response = await storageControlClient.RenameFolderAsync(name, destinationFolderId);

// Poll until the returned long-running operation is complete
Operation<Folder, RenameFolderMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Folder 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
Operation<Folder, RenameFolderMetadata> retrievedResponse = await storageControlClient.PollOnceRenameFolderAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Folder retrievedResult = retrievedResponse.Result;
}

RenameFolderAsync(string, string, CancellationToken)

public virtual Task<Operation<Folder, RenameFolderMetadata>> RenameFolderAsync(string name, string destinationFolderId, CancellationToken cancellationToken)

Renames a source folder to a destination folder. This operation is only applicable to a hierarchical namespace enabled bucket. During a rename, the source and destination folders are locked until the long running operation completes.

Parameters
Name Description
name string

Required. Name of the source folder being renamed. Format: projects/{project}/buckets/{bucket}/folders/{folder}

destinationFolderId string

Required. The destination folder ID, e.g. foo/bar/.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationFolderRenameFolderMetadata

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/buckets/[BUCKET]/folders/[FOLDER]";
string destinationFolderId = "";
// Make the request
Operation<Folder, RenameFolderMetadata> response = await storageControlClient.RenameFolderAsync(name, destinationFolderId);

// Poll until the returned long-running operation is complete
Operation<Folder, RenameFolderMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Folder 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
Operation<Folder, RenameFolderMetadata> retrievedResponse = await storageControlClient.PollOnceRenameFolderAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Folder retrievedResult = retrievedResponse.Result;
}

ResumeAnywhereCache(AnywhereCacheName, CallSettings)

public virtual AnywhereCache ResumeAnywhereCache(AnywhereCacheName name, CallSettings callSettings = null)

Resumes a disabled or paused Anywhere Cache instance.

Parameters
Name Description
name AnywhereCacheName

Required. The name field in the request should be: projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
AnywhereCache

The RPC response.

Example
// Create client
StorageControlClient storageControlClient = StorageControlClient.Create();
// Initialize request argument(s)
AnywhereCacheName name = AnywhereCacheName.FromProjectBucketAnywhereCache("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]");
// Make the request
AnywhereCache response = storageControlClient.ResumeAnywhereCache(name);

ResumeAnywhereCache(ResumeAnywhereCacheRequest, CallSettings)

public virtual AnywhereCache ResumeAnywhereCache(ResumeAnywhereCacheRequest request, CallSettings callSettings = null)

Resumes a disabled or paused Anywhere Cache instance.

Parameters
Name Description
request ResumeAnywhereCacheRequest

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
AnywhereCache

The RPC response.

Example
// Create client
StorageControlClient storageControlClient = StorageControlClient.Create();
// Initialize request argument(s)
ResumeAnywhereCacheRequest request = new ResumeAnywhereCacheRequest
{
    AnywhereCacheName = AnywhereCacheName.FromProjectBucketAnywhereCache("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]"),
};
// Make the request
AnywhereCache response = storageControlClient.ResumeAnywhereCache(request);

ResumeAnywhereCache(string, CallSettings)

public virtual AnywhereCache ResumeAnywhereCache(string name, CallSettings callSettings = null)

Resumes a disabled or paused Anywhere Cache instance.

Parameters
Name Description
name string

Required. The name field in the request should be: projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
AnywhereCache

The RPC response.

Example
// Create client
StorageControlClient storageControlClient = StorageControlClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/buckets/[BUCKET]/anywhereCaches/[ANYWHERE_CACHE]";
// Make the request
AnywhereCache response = storageControlClient.ResumeAnywhereCache(name);

ResumeAnywhereCacheAsync(AnywhereCacheName, CallSettings)

public virtual Task<AnywhereCache> ResumeAnywhereCacheAsync(AnywhereCacheName name, CallSettings callSettings = null)

Resumes a disabled or paused Anywhere Cache instance.

Parameters
Name Description
name AnywhereCacheName

Required. The name field in the request should be: projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskAnywhereCache

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
AnywhereCacheName name = AnywhereCacheName.FromProjectBucketAnywhereCache("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]");
// Make the request
AnywhereCache response = await storageControlClient.ResumeAnywhereCacheAsync(name);

ResumeAnywhereCacheAsync(AnywhereCacheName, CancellationToken)

public virtual Task<AnywhereCache> ResumeAnywhereCacheAsync(AnywhereCacheName name, CancellationToken cancellationToken)

Resumes a disabled or paused Anywhere Cache instance.

Parameters
Name Description
name AnywhereCacheName

Required. The name field in the request should be: projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskAnywhereCache

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
AnywhereCacheName name = AnywhereCacheName.FromProjectBucketAnywhereCache("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]");
// Make the request
AnywhereCache response = await storageControlClient.ResumeAnywhereCacheAsync(name);

ResumeAnywhereCacheAsync(ResumeAnywhereCacheRequest, CallSettings)

public virtual Task<AnywhereCache> ResumeAnywhereCacheAsync(ResumeAnywhereCacheRequest request, CallSettings callSettings = null)

Resumes a disabled or paused Anywhere Cache instance.

Parameters
Name Description
request ResumeAnywhereCacheRequest

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
TaskAnywhereCache

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
ResumeAnywhereCacheRequest request = new ResumeAnywhereCacheRequest
{
    AnywhereCacheName = AnywhereCacheName.FromProjectBucketAnywhereCache("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]"),
};
// Make the request
AnywhereCache response = await storageControlClient.ResumeAnywhereCacheAsync(request);

ResumeAnywhereCacheAsync(ResumeAnywhereCacheRequest, CancellationToken)

public virtual Task<AnywhereCache> ResumeAnywhereCacheAsync(ResumeAnywhereCacheRequest request, CancellationToken cancellationToken)

Resumes a disabled or paused Anywhere Cache instance.

Parameters
Name Description
request ResumeAnywhereCacheRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskAnywhereCache

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
ResumeAnywhereCacheRequest request = new ResumeAnywhereCacheRequest
{
    AnywhereCacheName = AnywhereCacheName.FromProjectBucketAnywhereCache("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]"),
};
// Make the request
AnywhereCache response = await storageControlClient.ResumeAnywhereCacheAsync(request);

ResumeAnywhereCacheAsync(string, CallSettings)

public virtual Task<AnywhereCache> ResumeAnywhereCacheAsync(string name, CallSettings callSettings = null)

Resumes a disabled or paused Anywhere Cache instance.

Parameters
Name Description
name string

Required. The name field in the request should be: projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskAnywhereCache

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/buckets/[BUCKET]/anywhereCaches/[ANYWHERE_CACHE]";
// Make the request
AnywhereCache response = await storageControlClient.ResumeAnywhereCacheAsync(name);

ResumeAnywhereCacheAsync(string, CancellationToken)

public virtual Task<AnywhereCache> ResumeAnywhereCacheAsync(string name, CancellationToken cancellationToken)

Resumes a disabled or paused Anywhere Cache instance.

Parameters
Name Description
name string

Required. The name field in the request should be: projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskAnywhereCache

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/buckets/[BUCKET]/anywhereCaches/[ANYWHERE_CACHE]";
// Make the request
AnywhereCache response = await storageControlClient.ResumeAnywhereCacheAsync(name);

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.

UpdateAnywhereCache(AnywhereCache, FieldMask, CallSettings)

public virtual Operation<AnywhereCache, UpdateAnywhereCacheMetadata> UpdateAnywhereCache(AnywhereCache anywhereCache, FieldMask updateMask, CallSettings callSettings = null)

Updates an Anywhere Cache instance. Mutable fields include ttl and admission_policy.

Parameters
Name Description
anywhereCache AnywhereCache

Required. The Anywhere Cache instance to be updated.

updateMask FieldMask

Required. List of fields to be updated. Mutable fields of AnywhereCache include ttl and admission_policy.

To specify ALL fields, specify a single field with the value *. Note: We recommend against doing this. If a new field is introduced at a later time, an older client updating with the * may accidentally reset the new field's value.

Not specifying any fields is an error.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationAnywhereCacheUpdateAnywhereCacheMetadata

The RPC response.

Example
// Create client
StorageControlClient storageControlClient = StorageControlClient.Create();
// Initialize request argument(s)
AnywhereCache anywhereCache = new AnywhereCache();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<AnywhereCache, UpdateAnywhereCacheMetadata> response = storageControlClient.UpdateAnywhereCache(anywhereCache, updateMask);

// Poll until the returned long-running operation is complete
Operation<AnywhereCache, UpdateAnywhereCacheMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
AnywhereCache 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
Operation<AnywhereCache, UpdateAnywhereCacheMetadata> retrievedResponse = storageControlClient.PollOnceUpdateAnywhereCache(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    AnywhereCache retrievedResult = retrievedResponse.Result;
}

UpdateAnywhereCache(UpdateAnywhereCacheRequest, CallSettings)

public virtual Operation<AnywhereCache, UpdateAnywhereCacheMetadata> UpdateAnywhereCache(UpdateAnywhereCacheRequest request, CallSettings callSettings = null)

Updates an Anywhere Cache instance. Mutable fields include ttl and admission_policy.

Parameters
Name Description
request UpdateAnywhereCacheRequest

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
OperationAnywhereCacheUpdateAnywhereCacheMetadata

The RPC response.

Example
// Create client
StorageControlClient storageControlClient = StorageControlClient.Create();
// Initialize request argument(s)
UpdateAnywhereCacheRequest request = new UpdateAnywhereCacheRequest
{
    AnywhereCache = new AnywhereCache(),
    UpdateMask = new FieldMask(),
};
// Make the request
Operation<AnywhereCache, UpdateAnywhereCacheMetadata> response = storageControlClient.UpdateAnywhereCache(request);

// Poll until the returned long-running operation is complete
Operation<AnywhereCache, UpdateAnywhereCacheMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
AnywhereCache 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
Operation<AnywhereCache, UpdateAnywhereCacheMetadata> retrievedResponse = storageControlClient.PollOnceUpdateAnywhereCache(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    AnywhereCache retrievedResult = retrievedResponse.Result;
}

UpdateAnywhereCacheAsync(AnywhereCache, FieldMask, CallSettings)

public virtual Task<Operation<AnywhereCache, UpdateAnywhereCacheMetadata>> UpdateAnywhereCacheAsync(AnywhereCache anywhereCache, FieldMask updateMask, CallSettings callSettings = null)

Updates an Anywhere Cache instance. Mutable fields include ttl and admission_policy.

Parameters
Name Description
anywhereCache AnywhereCache

Required. The Anywhere Cache instance to be updated.

updateMask FieldMask

Required. List of fields to be updated. Mutable fields of AnywhereCache include ttl and admission_policy.

To specify ALL fields, specify a single field with the value *. Note: We recommend against doing this. If a new field is introduced at a later time, an older client updating with the * may accidentally reset the new field's value.

Not specifying any fields is an error.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationAnywhereCacheUpdateAnywhereCacheMetadata

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
AnywhereCache anywhereCache = new AnywhereCache();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<AnywhereCache, UpdateAnywhereCacheMetadata> response = await storageControlClient.UpdateAnywhereCacheAsync(anywhereCache, updateMask);

// Poll until the returned long-running operation is complete
Operation<AnywhereCache, UpdateAnywhereCacheMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AnywhereCache 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
Operation<AnywhereCache, UpdateAnywhereCacheMetadata> retrievedResponse = await storageControlClient.PollOnceUpdateAnywhereCacheAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    AnywhereCache retrievedResult = retrievedResponse.Result;
}

UpdateAnywhereCacheAsync(AnywhereCache, FieldMask, CancellationToken)

public virtual Task<Operation<AnywhereCache, UpdateAnywhereCacheMetadata>> UpdateAnywhereCacheAsync(AnywhereCache anywhereCache, FieldMask updateMask, CancellationToken cancellationToken)

Updates an Anywhere Cache instance. Mutable fields include ttl and admission_policy.

Parameters
Name Description
anywhereCache AnywhereCache

Required. The Anywhere Cache instance to be updated.

updateMask FieldMask

Required. List of fields to be updated. Mutable fields of AnywhereCache include ttl and admission_policy.

To specify ALL fields, specify a single field with the value *. Note: We recommend against doing this. If a new field is introduced at a later time, an older client updating with the * may accidentally reset the new field's value.

Not specifying any fields is an error.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationAnywhereCacheUpdateAnywhereCacheMetadata

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
AnywhereCache anywhereCache = new AnywhereCache();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<AnywhereCache, UpdateAnywhereCacheMetadata> response = await storageControlClient.UpdateAnywhereCacheAsync(anywhereCache, updateMask);

// Poll until the returned long-running operation is complete
Operation<AnywhereCache, UpdateAnywhereCacheMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AnywhereCache 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
Operation<AnywhereCache, UpdateAnywhereCacheMetadata> retrievedResponse = await storageControlClient.PollOnceUpdateAnywhereCacheAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    AnywhereCache retrievedResult = retrievedResponse.Result;
}

UpdateAnywhereCacheAsync(UpdateAnywhereCacheRequest, CallSettings)

public virtual Task<Operation<AnywhereCache, UpdateAnywhereCacheMetadata>> UpdateAnywhereCacheAsync(UpdateAnywhereCacheRequest request, CallSettings callSettings = null)

Updates an Anywhere Cache instance. Mutable fields include ttl and admission_policy.

Parameters
Name Description
request UpdateAnywhereCacheRequest

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
TaskOperationAnywhereCacheUpdateAnywhereCacheMetadata

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
UpdateAnywhereCacheRequest request = new UpdateAnywhereCacheRequest
{
    AnywhereCache = new AnywhereCache(),
    UpdateMask = new FieldMask(),
};
// Make the request
Operation<AnywhereCache, UpdateAnywhereCacheMetadata> response = await storageControlClient.UpdateAnywhereCacheAsync(request);

// Poll until the returned long-running operation is complete
Operation<AnywhereCache, UpdateAnywhereCacheMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AnywhereCache 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
Operation<AnywhereCache, UpdateAnywhereCacheMetadata> retrievedResponse = await storageControlClient.PollOnceUpdateAnywhereCacheAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    AnywhereCache retrievedResult = retrievedResponse.Result;
}

UpdateAnywhereCacheAsync(UpdateAnywhereCacheRequest, CancellationToken)

public virtual Task<Operation<AnywhereCache, UpdateAnywhereCacheMetadata>> UpdateAnywhereCacheAsync(UpdateAnywhereCacheRequest request, CancellationToken cancellationToken)

Updates an Anywhere Cache instance. Mutable fields include ttl and admission_policy.

Parameters
Name Description
request UpdateAnywhereCacheRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationAnywhereCacheUpdateAnywhereCacheMetadata

A Task containing the RPC response.

Example
// Create client
StorageControlClient storageControlClient = await StorageControlClient.CreateAsync();
// Initialize request argument(s)
UpdateAnywhereCacheRequest request = new UpdateAnywhereCacheRequest
{
    AnywhereCache = new AnywhereCache(),
    UpdateMask = new FieldMask(),
};
// Make the request
Operation<AnywhereCache, UpdateAnywhereCacheMetadata> response = await storageControlClient.UpdateAnywhereCacheAsync(request);

// Poll until the returned long-running operation is complete
Operation<AnywhereCache, UpdateAnywhereCacheMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AnywhereCache 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
Operation<AnywhereCache, UpdateAnywhereCacheMetadata> retrievedResponse = await storageControlClient.PollOnceUpdateAnywhereCacheAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    AnywhereCache retrievedResult = retrievedResponse.Result;
}