---
title: "PutBucketLifecycleConfiguration"
slug: "ncloudstorage-putbucketlifecycleconfiguration"
updated: 2026-10-08T04:17:39Z
published: 2026-10-08T04:17:39Z
canonical: "api.ncloud-docs.com/ncloudstorage-putbucketlifecycleconfiguration"
---
> ## Documentation Index
> Fetch the complete documentation index at: https://api.ncloud-docs.com/llms.txt
> Use this file to discover all available pages before exploring further.
# PutBucketLifecycleConfiguration
Available in Classic and VPC
Register a new lifecycle rule on an Ncloud Storage bucket or overwrite an existing lifecycle rule.
Note
The expiration feature has been enabled since February 26, 2026.
## Request
This section describes the request format. The method and URI are as follows:
| Method | URI |
| --- | --- |
| PUT | - |
### Request headers
The following describes the request headers:
Note
For information about the request headers common to all Ncloud Storage APIs, see [Ncloud Storage request headers](/docs/en/storage-ncloudstorage#%EC%9A%94%EC%B2%AD%ED%97%A4%EB%8D%94).
| Field | Required | Description |
| --- | --- | --- |
| `Content-MD5` | Conditional | Base64-encoded 128-bit MD5 hash of the request body - Used to verify the integrity of the request body. - Required if `x-amz-checksum-*` is not entered. |
| `x-amz-checksum-*` | Conditional | Checksum hash value - Enter the used algorithm in `*` of the key. - Supported algorithms: `crc32` \| `crc32c` \| `sha1` \| `sha256` \| `crc64nvme` - Required if `Content-MD5` is not entered. |
### Request body
You can include the following data in the body of your request:
| Field | Type | Required | Description |
| --- | --- | --- | --- |
| Rule | List | Required | Rule list - Up to 1000 can be entered. |
| Rule.ID | String | Optional | Rule name - Up to 255 characters can be entered. |
| Rule.Status | String | Optional | Whether the rule is enabled - `Enabled` \| `Disabled` - The rule is applied only when set to `Enabled`. If not specified, it is disabled. |
| Rule.Filter | List | Optional | Filter to distinguish which objects to apply the rule to |
| Rule.Filter.Prefix | String | Optional | Prefix of the object to apply the rule to, currently only filterable by prefix |
| Rule.Expiration | List | Optional | Expiration rule |
| Rule.Expiration.Days | Integer | Optional | Number of days the object is deleted after being created, which must be a positive integer greater than 0 |
| Rule.Transition | List | Optional | Storage class migration rule |
| Rule.Transition.Days | Integer | Optional | Number of days after the object is created that it is switched to the specified storage class, which must be a positive integer |
| Rule.Transition.StorageClass | String | Optional | Storage class to be converted to - `ONEZONE_IA`: One Zone-IA (Infrequent Access) Class. - `DEEP_ARCHIVE`: Archive Class. |
| Rule.NoncurrentVersionExpiration | List | Optional | Expiration rule for non-current object versions |
| Rule.NoncurrentVersionExpiration.NewerNoncurrentVersions | Integer | Optional | Number of non-current versions to archive - Up to 100 can be archived. |
| Rule.NoncurrentVersionExpiration.NoncurrentDays | Integer | Optional | Number of days the object remains noncurrent - Must be a positive integer greater than 0. |
| Rule.NoncurrentVersionTransition | List | Optional | Storage class migration rule for non-current object versions |
| Rule.NoncurrentVersionTransition.NewerNoncurrentVersions | Integer | Optional | Number of non-current versions to keep in the same storage class before switching the object - Up to 100 can be kept. |
| Rule.NoncurrentVersionTransition.NoncurrentDays | Integer | Optional | Number of days the object remains noncurrent - Must be a positive integer. |
| Rule.NoncurrentVersionTransition.StorageClass | String | Optional | Storage class to be converted to - `ONEZONE_IA`: One Zone-IA (Infrequent Access) Class. - `DEEP_ARCHIVE`: Archive Class. |
### Request example
The request example is as follows:
#### Expiration request
#### When bucket versioning is not enabled
The example below uses the `Transition` rule to move objects with the "documents/" prefix to the DEEP_ARCHIVE storage class after 180 days. It uses the `Expiration` rule to delete objects with the "logs/" prefix 360 days after creation.
```
PUT /?lifecycle HTTP/1.1
Host: bucket.kr.ncloudstorage.com
tran_documents
documents/
Enabled
180
DEEP_ARCHIVE
exp_logs
logs/
Enabled
360
```
#### When bucket versioning is enabled
The example below automatically moves all object versions with the "documents/" prefix, excluding the five most recent previous versions, to the DEEP_ARCHIVE storage class 180 days after they become non-current, in accordance with the `NoncurrentVersionTransition` rule. Objects with the "logs/" prefix are deleted 100 days after they become non-current, in accordance with the `NoncurrentVersionExpiration` rule.
```
PUT /?lifecycle HTTP/1.1
Host: bucket.kr.ncloudstorage.com
tran_noncurrent_documents
documents/
Enabled
5
180
DEEP_ARCHIVE
exp_noncurrent_logs
logs/
Enabled
100
```
#### When specifying date
The following is a sample request to transition objects with the "logs/" prefix to the DEEP_ARCHIVE storage class after `2025-10-23 00:00:00 UTC`, according to the `Transition` rule. The actual transition occurs after 00:00:00 KST on that date.
```
PUT /?lifecycle HTTP/1.1
Host: bucket.kr.ncloudstorage.com
id1
logs/
Enabled
2025-10-23T00:00:00.000Z
DEEP_ARCHIVE
```
## Response
This section describes the response format.
### Response headers
For information about the request headers common to all Ncloud Storage APIs, see [Ncloud Storage response headers](/docs/en/storage-ncloudstorage#%EC%9D%91%EB%8B%B5%ED%97%A4%EB%8D%94).
### Response status codes
For information about the response status codes common to all Ncloud Storage APIs, see [Common Ncloud Storage response status codes](/docs/en/storage-ncloudstorage#%EC%9D%91%EB%8B%B5%EC%83%81%ED%83%9C%EC%BD%94%EB%93%9C).
### Response example
The response example is as follows:
```
HTTP/1.1 200 OK
```