Package google.storage.control.v2

Index

StorageControl

StorageControl service includes selected control plane operations.

CreateFolder

rpc CreateFolder(CreateFolderRequest) returns (Folder)

Creates a folder within a bucket with hierarchical namespace enabled.

IAM Permissions:

Requires storage.folders.create IAM permission on the bucket.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/devstorage.full_control
  • https://www.googleapis.com/auth/devstorage.read_only
  • https://www.googleapis.com/auth/devstorage.read_write
  • https://www.googleapis.com/auth/devstorage.write_only
  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/cloud-platform.read-only

For more information, see the Authentication Overview.

CreateManagedFolder

rpc CreateManagedFolder(CreateManagedFolderRequest) returns (ManagedFolder)

Create a managed folder within a bucket.

IAM Permissions:

Requires storage.managedFolders.create IAM permission on the bucket.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/devstorage.full_control
  • https://www.googleapis.com/auth/devstorage.read_only
  • https://www.googleapis.com/auth/devstorage.read_write
  • https://www.googleapis.com/auth/devstorage.write_only
  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/cloud-platform.read-only

For more information, see the Authentication Overview.

DeleteFolder

rpc DeleteFolder(DeleteFolderRequest) returns (Empty)

Deletes a folder within a bucket with hierarchical namespace enabled. You can only delete an empty folder with no folders or objects. This method also deletes any managed folder attached to the folder that you are deleting. Deleting managed folders follows the same rules and permission checks as deleting managed folders explicitly. For more information about deleting managed folders, see Delete a managed folder.

IAM Permissions:

Requires storage.folders.delete IAM permission on the bucket.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/devstorage.full_control
  • https://www.googleapis.com/auth/devstorage.read_only
  • https://www.googleapis.com/auth/devstorage.read_write
  • https://www.googleapis.com/auth/devstorage.write_only
  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/cloud-platform.read-only

For more information, see the Authentication Overview.

DeleteManagedFolder

rpc DeleteManagedFolder(DeleteManagedFolderRequest) returns (Empty)

Delete a managed folder within a bucket.

IAM Permissions:

Requires storage.managedFolders.delete IAM permission on the bucket. To use allowNonEmpty, the user must also have the storage.managedFolders.setIamPolicy permission.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/devstorage.full_control
  • https://www.googleapis.com/auth/devstorage.read_only
  • https://www.googleapis.com/auth/devstorage.read_write
  • https://www.googleapis.com/auth/devstorage.write_only
  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/cloud-platform.read-only

For more information, see the Authentication Overview.

GetFolder

rpc GetFolder(GetFolderRequest) returns (Folder)

Retrieves metadata of a folder within a bucket with hierarchical namespace enabled.

IAM Permissions:

Requires storage.folders.get IAM permission on the bucket.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/devstorage.full_control
  • https://www.googleapis.com/auth/devstorage.read_only
  • https://www.googleapis.com/auth/devstorage.read_write
  • https://www.googleapis.com/auth/devstorage.write_only
  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/cloud-platform.read-only

For more information, see the Authentication Overview.

GetManagedFolder

rpc GetManagedFolder(GetManagedFolderRequest) returns (ManagedFolder)

Returns metadata for the specified managed folder.

IAM Permissions:

Requires storage.managedFolders.get IAM permission on the bucket.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/devstorage.full_control
  • https://www.googleapis.com/auth/devstorage.read_only
  • https://www.googleapis.com/auth/devstorage.read_write
  • https://www.googleapis.com/auth/devstorage.write_only
  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/cloud-platform.read-only

For more information, see the Authentication Overview.

GetStorageLayout

rpc GetStorageLayout(GetStorageLayoutRequest) returns (StorageLayout)

Returns the storage layout of the specified bucket. View the folders within a bucket with hierarchical namespace enabled.

IAM Permissions:

Requires storage.objects.list IAM permission on the bucket.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/devstorage.full_control
  • https://www.googleapis.com/auth/devstorage.read_only
  • https://www.googleapis.com/auth/devstorage.read_write
  • https://www.googleapis.com/auth/devstorage.write_only
  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/cloud-platform.read-only

For more information, see the Authentication Overview.

ListFolders

rpc ListFolders(ListFoldersRequest) returns (ListFoldersResponse)

View the folders within a bucket with hierarchical namespace enabled. IAM Permissions:

Requires storage.folders.list IAM permission on the bucket.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/devstorage.full_control
  • https://www.googleapis.com/auth/devstorage.read_only
  • https://www.googleapis.com/auth/devstorage.read_write
  • https://www.googleapis.com/auth/devstorage.write_only
  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/cloud-platform.read-only

For more information, see the Authentication Overview.

ListManagedFolders

rpc ListManagedFolders(ListManagedFoldersRequest) returns (ListManagedFoldersResponse)

Retrieves a list of managed folders for a given bucket.

IAM Permissions:

Requires storage.managedFolders.list IAM permission on the bucket.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/devstorage.full_control
  • https://www.googleapis.com/auth/devstorage.read_only
  • https://www.googleapis.com/auth/devstorage.read_write
  • https://www.googleapis.com/auth/devstorage.write_only
  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/cloud-platform.read-only

For more information, see the Authentication Overview.

RenameFolder

rpc RenameFolder(RenameFolderRequest) returns (Operation)

Renames a folder within a bucket with hierarchical namespace enabled. For details about how the rename operation works, see Rename folders.

IAM Permissions:

The authenticated user must have the following IAM permissions to use this method: - storage.folders.rename: This permission is needed to rename the source folder. - storage.folders.create: This permission is needed to create the destination folder.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/devstorage.full_control
  • https://www.googleapis.com/auth/devstorage.read_only
  • https://www.googleapis.com/auth/devstorage.read_write
  • https://www.googleapis.com/auth/devstorage.write_only
  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/cloud-platform.read-only

For more information, see the Authentication Overview.

CommonLongRunningOperationMetadata

The message contains metadata that is common to all Storage Control long-running operations, present in its google.longrunning.Operation messages, and accessible via metadata.common_metadata.

Fields
create_time

Timestamp

Output only. The time the operation was created.

end_time

Timestamp

Output only. The time the operation finished running.

update_time

Timestamp

Output only. The time the operation was last modified.

type

string

Output only. The type of operation invoked.

requested_cancellation

bool

Output only. Identifies whether the user has requested cancellation.

progress_percent

int32

Output only. The estimated progress of the operation in percentage [0, 100]. The value -1 means the progress is unknown.

CreateFolderRequest

Request message for CreateFolder. This operation is only applicable to a hierarchical namespace enabled bucket.

Fields
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.

folder_id

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.

recursive

bool

Optional. If set to true, the method creates all the non-existing parent folders. If not set or set to false, the request fails if any parent folder doesn't exist.

request_id

string

Optional. A unique identifier for this request. UUID is the recommended format, but other formats are still accepted.

CreateManagedFolderRequest

Request message for CreateManagedFolder.

Fields
parent

string

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

managed_folder

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.

managed_folder_id

string

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

request_id

string

Optional. A unique identifier for this request. UUID is the recommended format, but other formats are still accepted.

DeleteFolderRequest

Request message for DeleteFolder. This operation is only applicable to a hierarchical namespace enabled bucket.

Fields
name

string

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

request_id

string

Optional. A unique identifier for this request. UUID is the recommended format, but other formats are still accepted.

if_metageneration_match

int64

Makes the operation only succeed conditional on whether the folder's current metageneration matches the given value.

if_metageneration_not_match

int64

Makes the operation only succeed conditional on whether the folder's current metageneration does not match the given value.

DeleteManagedFolderRequest

DeleteManagedFolder RPC request message.

Fields
name

string

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

allow_non_empty

bool

Allows deletion of a managed folder even if it is not empty. A managed folder is empty if it manages no child managed folders or objects. Caller must have permission for storage.managedFolders.setIamPolicy.

request_id

string

Optional. A unique identifier for this request. UUID is the recommended format, but other formats are still accepted.

if_metageneration_match

int64

The operation succeeds conditional on the managed folder's current metageneration matching the value here specified.

if_metageneration_not_match

int64

The operation succeeds conditional on the managed folder's current metageneration NOT matching the value here specified.

Folder

A folder resource. This resource can only exist in a hierarchical namespace enabled bucket.

Fields
name

string

Identifier. The name of this folder. Format: projects/{project}/buckets/{bucket}/folders/{folder}

metageneration

int64

Output only. The version of the metadata for this folder. Used for preconditions and for detecting changes in metadata.

create_time

Timestamp

Output only. The creation time of the folder.

update_time

Timestamp

Output only. The modification time of the folder.

pending_rename_info

PendingRenameInfo

Output only. Only present if the folder is part of an ongoing RenameFolder operation. Contains information which can be used to query the operation status. The presence of this field also indicates all write operations are blocked for this folder, including folder, managed folder, and object operations.

GetFolderRequest

Request message for GetFolder. This operation is only applicable to a hierarchical namespace enabled bucket.

Fields
name

string

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

request_id

string

Optional. A unique identifier for this request. UUID is the recommended format, but other formats are still accepted.

if_metageneration_match

int64

Makes the operation only succeed conditional on whether the folder's current metageneration matches the given value.

if_metageneration_not_match

int64

Makes the operation only succeed conditional on whether the folder's current metageneration does not match the given value.

GetManagedFolderRequest

Request message for GetManagedFolder.

Fields
name

string

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

request_id

string

Optional. A unique identifier for this request. UUID is the recommended format, but other formats are still accepted.

if_metageneration_match

int64

The operation succeeds conditional on the managed folder's current metageneration matching the value here specified.

if_metageneration_not_match

int64

The operation succeeds conditional on the managed folder's current metageneration NOT matching the value here specified.

GetStorageLayoutRequest

Request message for GetStorageLayout.

Fields
name

string

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

prefix

string

An optional prefix used for permission check. It is useful when the caller only has limited permissions under a specific prefix.

request_id

string

Optional. A unique identifier for this request. UUID is the recommended format, but other formats are still accepted.

ListFoldersRequest

Request message for ListFolders. This operation is only applicable to a hierarchical namespace enabled bucket.

Fields
parent

string

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

page_size

int32

Optional. Maximum number of folders to return in a single response. The service will use this parameter or 1,000 items, whichever is smaller.

page_token

string

Optional. A previously-returned page token representing part of the larger set of results to view.

prefix

string

Optional. Filter results to folders whose names begin with this prefix. If set, the value must either be an empty string or end with a '/'.

delimiter

string

Optional. If set, returns results in a directory-like mode. The results will only include folders that either exactly match the above prefix, or are one level below the prefix. The only supported value is '/'.

lexicographic_start

string

Optional. Filter results to folders whose names are lexicographically equal to or after lexicographic_start. If lexicographic_end is also set, the folders listed have names between lexicographic_start (inclusive) and lexicographic_end (exclusive).

lexicographic_end

string

Optional. Filter results to folders whose names are lexicographically before lexicographic_end. If lexicographic_start is also set, the folders listed have names between lexicographic_start (inclusive) and lexicographic_end (exclusive).

request_id

string

Optional. A unique identifier for this request. UUID is the recommended format, but other formats are still accepted.

ListFoldersResponse

Response message for ListFolders.

Fields
folders[]

Folder

The list of child folders

next_page_token

string

The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.

ListManagedFoldersRequest

Request message for ListManagedFolders.

Fields
parent

string

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

page_size

int32

Optional. Maximum number of managed folders to return in a single response. The service will use this parameter or 1,000 items, whichever is smaller.

page_token

string

Optional. A previously-returned page token representing part of the larger set of results to view.

prefix

string

Optional. Filter results to match managed folders with name starting with this prefix.

request_id

string

Optional. A unique identifier for this request. UUID is the recommended format, but other formats are still accepted.

ListManagedFoldersResponse

Response message for ListManagedFolders.

Fields
managed_folders[]

ManagedFolder

The list of matching managed folders

next_page_token

string

The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.

ManagedFolder

A managed folder.

Fields
name

string

Identifier. The name of this managed folder. Format: projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}

metageneration

int64

Output only. The metadata version of this managed folder. It increases whenever the metadata is updated. Used for preconditions and for detecting changes in metadata. Managed folders don't have a generation number.

create_time

Timestamp

Output only. The creation time of the managed folder.

update_time

Timestamp

Output only. The modification time of the managed folder.

PendingRenameInfo

Contains information about a pending rename operation.

Fields
operation

string

Output only. The name of the rename operation.

RenameFolderMetadata

Message returned in the metadata field of the Operation resource for RenameFolder operations.

Fields
common_metadata

CommonLongRunningOperationMetadata

Generic metadata for the long running operation.

source_folder_id

string

The path of the source folder.

destination_folder_id

string

The path of the destination folder.

RenameFolderRequest

Request message for RenameFolder. This operation is only applicable to a hierarchical namespace enabled bucket.

Fields
name

string

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

destination_folder_id

string

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

request_id

string

Optional. A unique identifier for this request. UUID is the recommended format, but other formats are still accepted. This request is only idempotent if a request_id is provided.

if_metageneration_match

int64

Makes the operation only succeed conditional on whether the source folder's current metageneration matches the given value.

if_metageneration_not_match

int64

Makes the operation only succeed conditional on whether the source folder's current metageneration does not match the given value.

StorageLayout

The storage layout configuration of a bucket.

Fields
name

string

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

location

string

Output only. The location of the bucket.

location_type

string

Output only. The location type of the bucket (region, dual-region, multi-region, etc).

custom_placement_config

CustomPlacementConfig

Output only. The data placement configuration for custom dual region. If there is no configuration, this is not a custom dual region bucket.

hierarchical_namespace

HierarchicalNamespace

Output only. The bucket's hierarchical namespace configuration. If there is no configuration, the hierarchical namespace is disabled.

CustomPlacementConfig

Configuration for Custom Dual Regions. It should specify precisely two eligible regions within the same Multiregion. For more information about regions, see Bucket locations.

Fields
data_locations[]

string

List of locations to use for data placement.

HierarchicalNamespace

Configuration for a bucket's hierarchical namespace feature.

Fields
enabled

bool

Enables the hierarchical namespace feature.