(DataFlex) Wasabi Create Bucket
Demonstrates how to create a new Wasabi bucket.
Use ChilkatAx-win32.pkg
Procedure Test
Handle hoHttp
Boolean iSuccess
String sTemp1
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
Get Create (RefClass(cComChilkatHttp)) To hoHttp
If (Not(IsComObjectCreated(hoHttp))) Begin
Send CreateComObject of hoHttp
End
// Insert your access key here:
Set ComAwsAccessKey Of hoHttp To "access-key"
// Insert your secret key here:
Set ComAwsSecretKey Of hoHttp To "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"
Set ComAwsEndpoint Of hoHttp To "s3.wasabisys.com"
// Change the bucket name here to something unique:
Get ComS3_CreateBucket Of hoHttp "chilkat-wasabi-testbucket" To iSuccess
If (iSuccess <> True) Begin
Get ComLastErrorText Of hoHttp To sTemp1
Showln sTemp1
End
Else Begin
Showln "Bucket created."
End
End_Procedure
|