Cloud Storage v2 API - Class StorageControlClient (1.1.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

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

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.

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

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

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;

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.

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

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.