Go to main content

Oracle® ZFS Storage Appliance Object API Guide for Amazon S3 Service Support, Release OS8.8.0

Exit Print View

Updated: January 2019
 
 

DELETE Object

If a null version of an object exists, the DELETE operation removes the null version of the object and inserts a delete marker. For more details, see the following:

Syntax Example

For a syntax example, see Amazon's official S3 DELETE Object API documentation (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectDELETE.html).

Versioning

To remove a specific version, you must be the bucket owner and you must use the versionId subresource. Using this subresource permanently deletes the version. If the object deleted is a delete marker, S3 sets the response header, x-amz-delete-marker, to true.

Request Parameters

This implementation of the DELETE Object operation does not support the use of request parameters.

Request Headers

This implementation of the DELETE Object operation does not support the use of request headers.

Request Elements

This implementation of the DELETE Object operation does not support the use of request elements.

Response Headers

This implementation of the DELETE Object operation supports the use of the x-amz-version-id response header. For more details about this response header, see Amazon's official S3 DELETE Object API documentation (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectDELETE.html).

Response Elements

This implementation of the DELETE Object operation does not return response elements.

Expected HTTP Error Response Code

204 No Content

Error Response Code

The DELETE Object operation does not return special errors. For general information about S3 errors and a list of error codes, see S3 Client Error Handling Reference.

Example

The following request deletes my-desk-image.jpg.

DELETE /my-desk-image.jpg
HTTP/1.1 204 NoContent
x-amz-request-id: tx0A49CE4060975EAC
Date: Wed, 12 Oct 2018 17:50:00 GMT
Content-Length: 0
Connection: close
Server: Apache

The following request deletes the specified version of the object, my-desk-image.jpg.

DELETE /my-third-image.jpg?versionId=00012
HTTP/1.1 204 NoContent
x-amz-request-id: tx0A49CE4060975EAC
x-amz-version-id: 00012
Date: Wed, 12 Oct 2018 17:50:00 GMT
Content-Length: 0
Connection: close
Server: Apache

If the object deleted is a delete marker, the following response example appears.

HTTP/1.1 204 NoContent
x-amz-request-id: tx0A49CE4060975EAC
x-amz-version-id: 0011
x-amz-delete-marker: true
Date: Wed, 12 Oct 2018 17:50:00 GMT
Content-Length: 0
Connection: close
Server: Apache