Deletes the lifecycle rules for a specified bucket. After you delete all lifecycle rules for a specified bucket by using this API, the objects stored in the bucket are no longer automatically deleted because of the lifecycle rules. Only the owner of a bucket can delete the lifecycle rules for the bucket.

Request syntax

DELETE /?lifecycle HTTP/1.1
Host: BucketName.oss.aliyuncs.com
Date: GMT Date
Authorization: SignatureValue

Examples

Request example:

DELETE /?lifecycle HTTP/1.1
Host: BucketName.oss.aliyuncs.com  
Date: Mon, 14 Apr 2014 01:17:35 GMT
Authorization: OSS qn6qrrqxo2oawuk53otfjbyc:6ZVHOehYzxoC1yxRydPQs/CnMZU=

Response example:

HTTP/1.1 204 No Content 
x-oss-request-id: 534B371674E88A4D8906008B
Date: Mon, 14 Apr 2014 01:17:35 GMT
Connection: keep-alive
Content-Length: 0  
Server: AliyunOSS

SDK

The SDKs of this API are as follows:

Error codes

Error code HTTP status code Description
NoSuchBucket 404 The target bucket does not exist.
AccessDenied 403 Forbidden You do not have the permission to delete the lifecycle rules for the bucket. Only the owner of a bucket can delete the lifecycle rules for the bucket.