S3 get object lock
The get object lock API retrieves the lock configuration for a bucket.
Syntax
GET /BUCKET?object-lock HTTP/1.1
Example
GET /testbucket?object-lock HTTP/1.1
Response Entities
ObjectLockConfiguration
- Description
-
A container for the request.
- Type
-
Container
- Required
-
Yes
ObjectLockEnabled
- Description
-
Indicates whether this bucket has an object lock configuration enabled.
- Type
-
String
- Required
-
Yes
Rule
- Description
-
The object lock rule is in place for the specified bucket.
- Type
-
Container
- Required
-
No
DefaultRetention
- Description
-
The default retention period applied to new objects placed in the specified bucket.
- Type
-
Container
- Required
-
No
Mode
- Description
-
The default object lock retention mode. Valid values: GOVERNANCE/COMPLIANCE.
- Type
-
Container
- Required
-
Yes
Days
- Description
-
The number of days specified for the default retention period.
- Type
-
Integer
- Required
-
No
Years
- Description
-
The number of years specified for the default retention period.
- Type
-
Integer
- Required
-
No
Reference
-
For more information about this API call, see S3 API.