(Unicode C) Wasabi Create Bucket
Demonstrates how to create a new Wasabi bucket.
#include <C_CkHttpW.h>
void ChilkatSample(void)
{
HCkHttpW http;
BOOL success;
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
http = CkHttpW_Create();
// Insert your access key here:
CkHttpW_putAwsAccessKey(http,L"access-key");
// Insert your secret key here:
CkHttpW_putAwsSecretKey(http,L"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"
CkHttpW_putAwsEndpoint(http,L"s3.wasabisys.com");
// Change the bucket name here to something unique:
success = CkHttpW_S3_CreateBucket(http,L"chilkat-wasabi-testbucket");
if (success != TRUE) {
wprintf(L"%s\n",CkHttpW_lastErrorText(http));
}
else {
wprintf(L"Bucket created.\n");
}
CkHttpW_Dispose(http);
}
|