Go
Go
Wasabi Create Bucket
See more Wasabi Examples
Demonstrates how to create a new Wasabi bucket.Chilkat Go Downloads
success := false
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
http := chilkat.NewHttp()
// Insert your access key here:
http.SetAwsAccessKey("access-key")
// Insert your secret key here:
http.SetAwsSecretKey("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.SetAwsEndpoint("s3.wasabisys.com")
// Change the bucket name here to something unique:
success = http.S3_CreateBucket("chilkat-wasabi-testbucket")
if success != true {
fmt.Println(http.LastErrorText())
} else {
fmt.Println("Bucket created.")
}
http.DisposeHttp()