(DataFlex) Wasabi Delete Bucket
Demonstrates how to delete 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 delete 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"
Set ComKeepResponseBody Of hoHttp To True
Get ComS3_DeleteBucket Of hoHttp "chilkat-wasabi-testbucket" To iSuccess
If (iSuccess <> True) Begin
Get ComLastErrorText Of hoHttp To sTemp1
Showln sTemp1
// Also examine the error response body from Wasabi:
Get ComLastResponseBody Of hoHttp To sTemp1
Showln sTemp1
End
Else Begin
Showln "Bucket deleted."
End
End_Procedure
|