> For the complete documentation index, see [llms.txt](https://doc.cess.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.cess.network/developer/cess-sdk/sdk-rust/chain/file_bank/create_bucket.md).

# Create Bucket

The `create_bucket` creates the bucket. The files uploaded by the user must be located in a certain bucket, and the bucket name can only consist of numbers, letters, and special characters (\_ - .).

```rust
/// Creates a new bucket with the specified name under the given account.
///
/// # Parameters
///
/// - `account`: The identifier of the account under which the bucket will be created.
/// - `bucket_name`: The name of the bucket to be created. Valid bucket name can be combination of numbers, letters, and special characters (_ - .).
///
/// # Returns
///
/// Returns a `Result` that, on success, contains a tuple with:
/// - `TxHash`: The transaction hash associated with the creation of the bucket.
/// - `CreateBucket`: A structure representing the created bucket.
///
pub async fn create_bucket(
    &self,
    account: &str,
    bucket_name: &str,
) -> Result<(TxHash, CreateBucket), Box<dyn std::error::Error>>
```
