Buckets
- class txcouchbase.management.buckets.BucketManager(impl: TxBucketMgmtInterface)
Performs management operations on a cluster’s buckets.
- bucket_describe(bucket_name: str, options: BucketDescribeOptions | None = None, **kwargs: Unpack[BucketDescribeOptionsKwargs]) Deferred[BucketDescribeResult]
Provides details on provided the bucket.
- Parameters:
bucket_name (str) – The name of the bucket to describe.
options (
BucketDescribeOptions) – Optional parameters for this operation.**kwargs – keyword arguments that can be used as optional parameters for this operation.
- Returns:
Key-value pair details describing the bucket.
- Return type:
Deferred[
BucketDescribeResult]- Raises:
BucketDoesNotExistException – If the bucket does not exist.
- create_bucket(settings: CreateBucketSettings, options: CreateBucketOptions | None = None, **kwargs: Unpack[CreateBucketOptionsKwargs]) Deferred[None]
Creates a new bucket.
- Parameters:
settings (
CreateBucketSettings) – The settings to use for the new bucket.options (
CreateBucketOptions) – Optional parameters for this operation.**kwargs – keyword arguments that can be used as optional parameters for this operation.
- Returns:
An empty Deferred instance.
- Return type:
Deferred
- Raises:
BucketAlreadyExistsException – If the bucket already exists.
InvalidArgumentException – If an invalid type or value is provided for the settings argument.
- drop_bucket(bucket_name: str, options: DropBucketOptions | None = None, **kwargs: Unpack[DropBucketOptionsKwargs]) Deferred[None]
Drops an existing bucket.
- Parameters:
bucket_name (str) – The name of the bucket to drop.
options (
DropBucketOptions) – Optional parameters for this operation.**kwargs – keyword arguments that can be used as optional parameters for this operation.
- Raises:
BucketDoesNotExistException – If the bucket does not exist.
- flush_bucket(bucket_name: str, options: FlushBucketOptions | None = None, **kwargs: Unpack[FlushBucketOptionsKwargs]) Deferred[None]
Flushes the bucket, deleting all the existing data that is stored in it.
- Parameters:
bucket_name (str) – The name of the bucket to flush.
options (
FlushBucketOptions) – Optional parameters for this operation.**kwargs – keyword arguments that can be used as optional parameters for this operation.
- Raises:
BucketDoesNotExistException – If the bucket does not exist.
BucketNotFlushableException – If the bucket’s settings have flushing disabled.
- get_all_buckets(options: GetAllBucketOptions | None = None, **kwargs: Unpack[GetAllBucketOptionsKwargs]) Deferred[list[BucketSettings]]
Returns a list of existing buckets in the cluster.
- Parameters:
options (
GetAllBucketOptions) – Optional parameters for this operation.**kwargs – keyword arguments that can be used as optional parameters for this operation.
- Returns:
A list of existing buckets in the cluster.
- Return type:
Deferred[list[
BucketSettings]]
- get_bucket(bucket_name: str, options: GetBucketOptions | None = None, **kwargs: Unpack[GetBucketOptionsKwargs]) Deferred[BucketSettings]
Fetches the settings in use for a specified bucket.
- Parameters:
bucket_name (str) – The name of the bucket to fetch.
options (
GetBucketOptions) – Optional parameters for this operation.**kwargs – keyword arguments that can be used as optional parameters for this operation.
- Returns:
The settings of the specified bucket.
- Return type:
Deferred[
BucketSettings]- Raises:
BucketDoesNotExistException – If the bucket does not exist.
- update_bucket(settings: BucketSettings, options: UpdateBucketOptions | None = None, **kwargs: Unpack[UpdateBucketOptionsKwargs]) Deferred[None]
Update the settings for an existing bucket.
- Parameters:
settings (
BucketSettings) – The settings to use for the new bucket.options (
UpdateBucketOptions) – Optional parameters for this operation.**kwargs – keyword arguments that can be used as optional parameters for this operation.
- Returns:
An empty Deferred instance.
- Return type:
Deferred
- Raises:
InvalidArgumentException – If an invalid type or value is provided for the settings argument.
This module also publishes these, described where they are first documented: