DataFlex
DataFlex
S3 Delete Bucket
See more Amazon S3 Examples
Demonstrates how to delete a bucket.Chilkat DataFlex Downloads
Use ChilkatAx-win32.pkg
Procedure Test
Boolean iSuccess
Handle hoHttp
String sTemp1
Move False To iSuccess
// 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 "ABQXXABC83ABCDEFVQXX"
// Insert your secret key here:
Set ComAwsSecretKey Of hoHttp To "XXXXYYYYabcdABCD12345678xxxxyyyyzzzz"
Set ComKeepResponseBody Of hoHttp To True
Get ComS3_DeleteBucket Of hoHttp "chilkattestbucket" To iSuccess
If (iSuccess <> True) Begin
Get ComLastErrorText Of hoHttp To sTemp1
Showln sTemp1
// Also examine the error response body from AWS:
Get ComLastResponseBody Of hoHttp To sTemp1
Showln sTemp1
End
Else Begin
Showln "Bucket deleted."
End
End_Procedure