# Update Lifecycle Management - UpdateUFileLifeCycle

## Overview

Update Lifecycle Management






## Definition

### Public Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Action**     | string  | Corresponding API command name, the current API is `UpdateUFileLifeCycle`.                      | **Yes** |
| **PublicKey**  | string  | The user's public key can be obtained from [Console](https://console.dezai.com/uaccount/api_manage)                                             | **Yes** |
| **Signature**  | string  | User signature generated based on public key and API command, see [Signature Algorithm](/docs/api/summary/signature.md)  | **Yes** |

### Request Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Region** | string | Region. See [List of Regions and Availability Zones](/docs/api/summary/regionlist) |No|
| **ProjectId** | string | Project ID. If not filled in, the default project is used, sub-accounts must be filled in. Please refer to the [GetProjectList interface](/docs/api/summary/get_project_list). |No|
| **LifeCycleId** | string | Lifecycle Id |**Yes**|
| **LifeCycleName** | string | Lifecycle Name |**Yes**|
| **Prefix** | string | The prefix applicable to the lifecycle; * for all files in the storage space; one rule only supports one file prefix. |**Yes**|
| **Status** | string | Enabled -- Enabled, Disabled -- Not enabled |**Yes**|
| **BucketName** | string | Storage Space Name |**Yes**|
| **Days** | int | Specify an expiration day N, the file will expire and be automatically deleted N days after its most recent update; Range: [7,36500] |No|
| **ArchivalDays** | int | Specify an expiration day N, the file will expire N days after its most recent update time, and automatically convert to archive storage type; Range: [7,36500], 0 represents not enabled. |No|
| **IADays** | int | Specify an expiration day N, the file will expire N days after its most recent update time, and automatically convert to a low-frequency storage type; Range: [7,36500], 0 represents not enabled. |No|
| **HistVerDeleteDays** | int | A historical file expiration period N is specified, and the file will expire and be automatically deleted N days after its last modified time; range: [7,36500] |No|
| **HistVerArchivalDays** | int | A historical file expiration period N is specified, and the file will expire and be automatically deleted N days after its last modified time; range: [7,36500] |No|
| **HistVerIADays** | int | A historical file expiration period N is specified, and the file will expire and be automatically deleted N days after its last modified time; range: [7,36500] |No|
| **Tags** | string | Tag, parameter format 'k1=v1&k2=v2', the maximum length of key is 128, the maximum length of value is 256byte, the maximum number of tags is 10. |No|
| **MinSize** | int | Minimum size of the file |No|
| **MaxSize** | string | Maximum size of the file |No|

### Response Field

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **RetCode** | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. |**Yes**|
| **Action** | string | Operation command name. |**Yes**|
| **Message** | string | Returns an error message, providing detailed description when `RetCode` is non-zero. |No|




## Example

### Request Example
    
```
https://api.dezai.com/?Action=UpdateUFileLifeCycle
&Region=cn-gd
&ProjectId=org-sdfsdd
&BucketName=lifecycle-test1
&LifeCycleId=dc7eca04-edbc-4ae9-aefd-816253123456
&LifeCycleName=test
&Prefix=life-
&Date=30
&Status=Disabled
&ArchivalDays=5
&ArchivalDays=7
&IADays=2
&Tags=nhYyyFfh
&MinSize=9
&MaxSize=bPxrgHWp
&HistVerDeleteDays=5
&HistVerArchivalDays=2
&HistVerIADays=3
```

### Response Example
    
```json
{
  "Action": "UpdateUFileLifeCycleResponse",
  "RetCode": 0
}
```





