DeleteObject
Deletes the specified object in the bucket for a non-versioned bucket. If the versioning is enabled on the bucket and VersionId is passed, the specified version of the object is deleted. If the versioning is enabled on the bucket and VersionId is not passed, a DeleteMarker is created for the object.
Request Syntax
DELETE /bucket/Key+?versionId=VersionId HTTP/1.1 Host: msdps3.server:8443
Request Parameters
Bucket
Name of the bucket.
Required: Yes
Type: String
Key
The name of the object for which multipart upload was initiated.
Required: Yes
Type: String
versionId
The version ID of the Object.
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 204 x-amz-delete-marker: DeleteMarker x-amz-version-id: VersionId
Response Headers
x-amz-delete-marker
Specifies if the deleted object is a delete marker or not.
x-amz-version-id
Specifies Version ID of the deleted object.
Possible Error Response
Success
HTTP status code 204.
InvalidArgument
Invalid Argument.
HTTP status code 400.
AccessDenied
Request was rejected because user authentication failed.
HTTP status code 403.
NoSuchKey
The specified key does not exist.
HTTP status code 404.
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.