(AutoIt) Wasabi Delete Bucket Objects
Demonstrates how to delete one or more objects in a bucket.
; This example requires the Chilkat API to have been previously unlocked.
; See Global Unlock Sample for sample code.
$oHttp = ObjCreate("Chilkat.Http")
Local $bSuccess
; Insert your access key here:
$oHttp.AwsAccessKey = "access-key"
; Insert your secret key here:
$oHttp.AwsSecretKey = "secret-key"
; Use the endpoint matching the bucket's region.
$oHttp.AwsEndpoint = "s3.us-west-1.wasabisys.com"
Local $sBucketName = "chilkattest"
Local $sObjectName1 = "seahorse.jpg"
Local $sObjectName2 = "seahorse2.jpg"
$oSa = ObjCreate("Chilkat.StringArray")
$oSa.Append($sObjectName1)
$oSa.Append($sObjectName2)
Local $oResp = $oHttp.S3_DeleteMultipleObjects($sBucketName,$oSa)
If ($oHttp.LastMethodSuccess = False) Then
ConsoleWrite($oHttp.LastErrorText & @CRLF)
Exit
EndIf
ConsoleWrite("Response status code = " & $oHttp.LastStatus & @CRLF)
; Display the XML response.
ConsoleWrite($oResp.BodyStr & @CRLF)
|