Sample code for 30+ languages & platforms
Rust

Wasabi Create Bucket

See more Wasabi Examples

Demonstrates how to create a new Wasabi bucket.

Chilkat Rust Downloads

Rust

// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.

let http = chilkat::Http::new();

// Insert your access key here:
http.set_aws_access_key("access-key");

// Insert your secret key here:
http.set_aws_secret_key("secret-key");

// To create a bucket located in a different region, use the domain for that region, such as "s3.eu-central-1.wasabisys.com"
http.set_aws_endpoint("s3.wasabisys.com");

// Change the bucket name here to something unique:

if http.s3_create_bucket("chilkat-wasabi-testbucket").is_err() {
    println!("{}", http.last_error_text());
} else {
    println!("Bucket created.");
}