delete method
Written by
Deletes an object.
Request
DELETE /{bucket}/{key} HTTP/2
Path parameters
Parameter | Description |
---|---|
bucket |
Bucket name. |
key |
Object key. |
Query parameters
Parameter | Description |
---|---|
versionId |
Link to a specific version of the object. |
Headers
Use the necessary common request headers in requests.
Moreover, if a lock with governance-mode retention is set for an object version in a versioned bucket, make sure to use the below-specified header to bypass retention and confirm deletion. Only users with the storage.admin
role can delete a retained object version. To check retention status, use the getObjectRetention method.
Header | Description |
---|---|
X-Amz-Bypass-Governance-Retention |
Header that confirms bypassing of the governance retention. Enter true . |
Response
Headers
Responses can only contain common response headers.
Response codes
For a list of possible responses, see Responses.