DeleteObjects
Deletes multiple objects from bucket by using a single request.
The Content-MD5 header is required for Multi-Object Delete request. S3 interface uses the header value to ensure that your request body has not been altered in transit.
Request Syntax
DELETE /bucket?delete HTTP/1.1
Host: msdps3.server:8443
<?xml version="1.0" encoding="UTF-8"?>
<Delete xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<Object>
<Key>string</Key>
<VersionId>string</VersionId>
</Object>
...
<Quiet>boolean</Quiet>
</Delete>
Request Parameters
Bucket
Name of the bucket.
Required: Yes
Type: String
x-amz-bypass-governance-retention (Flex WORM only)
Indicates whether S3 Object Lock should bypass Governance mode restrictions to process this operation. To use this header, you must have the s3:BypassGovernanceRetention permission.
Response Syntax
HTTP/1.1 200
<?xml version="1.0" encoding="UTF-8"?>
<DeleteResult>
<Deleted>
<DeleteMarker>boolean</DeleteMarker>
<DeleteMarkerVersionId>string</DeleteMarkerVersionId>
<Key>string</Key>
<VersionId>string</VersionId>
</Deleted>
...
<Error>
<Code>string</Code>
<Key>string</Key>
<Message>string</Message>
<VersionId>string</VersionId>
</Error>
...
</DeleteResult>
Response Body
DeleteResult
Root level tag for the DeleteResult parameters.
Required: Yes
Deleted
Information of the objects that are successfully deleted.
DeleteMarker
Specifies if deleted object was a delete marker or not.
DeleteMarkerVersionId
Specifies versionId of the deleted delete marker.
Key
The name of the object
VersionId
VersionId of the deleted object.
Error
Information of the objects which failed to be deleted.
Code
Error code of the error that occurred while deleting the object.
Key
The name of the object
Message
Error message
VersionId
VersionId of the object or delete marker for which error occurred.
Possible Error Response
Success
HTTP status code 200.
NoSuchBucket
The specified bucket does not exist.
HTTP status code 404.
InternalError
Request failed because of an internal server error.
HTTP status code 500.
InvalidRequest
Current object is protected by Object Lock and can not be overwritten.
HTTP status code 400.