Docs
api
Object-based Storage(US3)
CreateUFileLifeCycle

Create Lifecycle Management - CreateUFileLifeCycle

Overview

Create Lifecycle Management

Definition

Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is CreateUFileLifeCycle.Yes
PublicKeystringThe user’s public key can be obtained from ConsoleYes
SignaturestringUser signature generated based on public key and API command, see Signature AlgorithmYes

Request Parameters

Parameter NameTypeDescription InformationRequired
RegionstringRegion. See List of Regions and Availability ZonesNo
ProjectIdstringProject ID. If not filled in, the default project is used, sub-accounts must be filled in. Please refer to the GetProjectList interface.No
LifeCycleNamestringLifecycle NameYes
PrefixstringThe prefix applicable to the lifecycle; * for all files in the storage space; one rule only supports one file prefix.Yes
StatusstringEnabled — Enabled, Disabled — Not enabledYes
BucketNamestringStorage Space NameYes
DaysintSpecify an expiration day N, the file will expire and be automatically deleted N days after its most recent update; parameter range: [7,36500], 0 represents not enabled.No
ArchivalDaysintSpecify an expiration day N, the file will automatically change to the archive storage type N days after its most recent update time; parameter range: [7,36500], 0 represents not enabled.No
IADaysintSpecify an expiration day N, the file will automatically change to the infrequent access storage type N days after its most recent update time; parameter range: [7,36500], 0 represents not enabled.No
TagsstringTag, 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 for a single object is 10.No

Response Field

Field NameTypeDescription InformationRequired
RetCodeintReturn status code. If it is 0, it means successful return. If it is not 0, it means failure.Yes
ActionstringOperation command name.Yes
MessagestringReturns an error message, providing detailed description when RetCode is non-zero.No
LifeCycleIdstringLifecycle IdYes

Example

Request Example

https://api.dezai.com/?Action=CreateUFileLifeCycle
&Region=cn-gd
&ProjectId=orf-sdfssd
&LifeCyCleName=lifecycle
&Prefix=test-
&Days=10
&Status=Enabled
&BucketName=lifecycle-test1
&ArchivalDays=1
&ArchivalDays=6
&IADays=2
&Tags=wMsqQyzv

Response Example

{
  "Action": "CreateUFileLifeCycleResponse",
  "LifeCycleId": "dc7eca04-edbc-4ae9-aefd-816253123456",
  "RetCode": 0
}