Buckets

class acouchbase.management.buckets.BucketManager(impl: AsyncBucketMgmtInterface)

Performs management operations on a cluster’s buckets.

async bucket_describe(bucket_name: str, options: BucketDescribeOptions | None = None, **kwargs: Unpack[BucketDescribeOptionsKwargs]) → 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:

BucketDescribeResult

Raises:

BucketDoesNotExistException – If the bucket does not exist.

async create_bucket(settings: CreateBucketSettings, options: CreateBucketOptions | None = None, **kwargs: Unpack[CreateBucketOptionsKwargs]) → 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.

Raises:
async drop_bucket(bucket_name: str, options: DropBucketOptions | None = None, **kwargs: Unpack[DropBucketOptionsKwargs]) → 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.

async flush_bucket(bucket_name: str, options: FlushBucketOptions | None = None, **kwargs: Unpack[FlushBucketOptionsKwargs]) → 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:
async get_all_buckets(options: GetAllBucketOptions | None = None, **kwargs: Unpack[GetAllBucketOptionsKwargs]) → 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:

list[BucketSettings]

async get_bucket(bucket_name: str, options: GetBucketOptions | None = None, **kwargs: Unpack[GetBucketOptionsKwargs]) → 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:

BucketSettings

Raises:

BucketDoesNotExistException – If the bucket does not exist.

async update_bucket(settings: BucketSettings, options: UpdateBucketOptions | None = None, **kwargs: Unpack[UpdateBucketOptionsKwargs]) → 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.

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: