# 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>>
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.cess.network/developer/cess-sdk/sdk-rust/chain/file_bank/create_bucket.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
