getObjectLockConfiguration method
Returns the settings of object locks for a versioned bucket.
For more information on getting started with the API and the general request format, see How to use the S3 API.
Request
GET /{bucket}?object-lock HTTP/2
Path parameters
Parameter | Description |
---|---|
bucket |
Bucket name. |
Headers
Use only common request headers in your requests.
Response
Headers
Responses can only contain common response headers.
Response codes
For a list of possible responses, see Responses.
Data schema
<ObjectLockConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<ObjectLockEnabled>string</ObjectLockEnabled>
<Rule>
<DefaultRetention>
<Mode>string</Mode>
<Days>integer</Days>
<Years>integer</Years>
</DefaultRetention>
</Rule>
</ObjectLockConfiguration>
Element | Description |
---|---|
ObjectLockEnabled |
Object lock status:
If the item is omitted, object lock is disabled. Path: |
Rule |
Lock settings. Path: |
DefaultRetention |
Default retention settings. Path: |
Mode |
Default retention type:
Path: |
Days |
Retention period in days since the object version upload. It must be a positive integer. Path: |
Years |
Retention period in years since the object version upload. It must be a positive integer. Path: |