GET /?object-lock HTTP/1.1Host: <BucketName-APPID>.cos.<Region>.myqcloud.comDate: GMT DateAuthorization: Auth String
<?xml version="1.0" encoding="UTF-8" ?><ObjectLockConfiguration><ObjectLockEnabled>Enabled</ObjectLockEnabled><Rule><DefaultRetention><Mode>COMPLIANCE</Mode><Days>30</Days></DefaultRetention></Rule></ObjectLockConfiguration>
Node Name (Keyword) | Parent Node | Description | Type |
ObjectLockConfiguration | None | Object lock configuration. | Container |
ObjectLockEnabled | ObjectLockConfiguration | Whether to enable the object lock function. Only Enabled is supported. Once the object lock function is enabled, it cannot be disabled. | String |
Rule | ObjectLockConfiguration | Object lock rule, which is used for stipulating the default period and mode of object lock in a bucket. This rule supports deletion and modification, and may potentially be left blank. | Container |
DefaultRetention | ObjectLockConfiguration.Rule | Default period and mode of the bucket object lock. Objects without carrying lock headers adhere to the retention period set by the bucket configuration. | Container |
Days | ObjectLockConfiguration.Rule.DefaultRetention | Default period of object lock (ranging from 1 to 36500). | Int |
Mode | ObjectLockConfiguration.Rule.DefaultRetention | Default mode of object lock, which only supports the enumerated value COMPLIANCE . | Enum |
GET /?object-lock HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comAuthorization: Auth String
HTTP/1.1 200 OKContent-Type: application/xmlContent-Length: 180Connection: keep-aliveDate: Fri, 09 Dec 2022 08:31:25 GMTServer: tencent-cosx-cos-request-id: NjM5MmYyNWNfMzBkMDM4MGJfMmUzNzFfM****<ObjectLockConfiguration><ObjectLockEnabled>Enabled</ObjectLockEnabled></ObjectLockConfiguration>
GET /?object-lock HTTP/1.1Host: examplebucket2-1250000000.cos.ap-beijing.myqcloud.comAuthorization: Auth String
HTTP/1.1 200 OKContent-Type: application/xmlContent-Length: 180Connection: keep-aliveDate: Fri, 09 Dec 2022 08:31:25 GMTServer: tencent-cosx-cos-request-id: NjM5MmYyNWNfMzBkMDM4MGJfMmUzNzFfM****<ObjectLockConfiguration><ObjectLockEnabled>Enabled</ObjectLockEnabled><Rule><DefaultRetention><Mode>COMPLIANCE</Mode><Days>30</Days></DefaultRetention></Rule></ObjectLockConfiguration>
Was this page helpful?