Skip to content

Apply Governance Lock (Bucket)

POST
/api/v1/storage/buckets/{bucket_name}/lock/
curl --request POST \
--url 'https://api.e2enetworks.com/myaccount/api/v1/storage/buckets/{bucket_name}/lock/?project_id=<PROJECT_ID>&location=<LOCATION>&apikey=<API_KEY>' \
--header 'Authorization: Bearer <API_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"lock_mode": "GOVERNANCE",
"retention_period": 3
}'

This API allows users to apply governance lock to a bucket.

bucket_name
required
string

Bucket Name

project_id
required
integer
location
required
string
Allowed values: Delhi Chennai

Deployment region for the resource. Accepted values: Delhi, Chennai.

Mumbai region has been discontinued. Delhi and Chennai are the only supported regions.

Media typeapplication/json
object
lock_mode
string
Allowed values: GOVERNANCE

Example

GOVERNANCE
retention_period
integer

Example

3

Successful retrieval of the bucket retention policy.

Media typeapplication/json
object
code
integer
data
object
bucket
integer
mode
string
Allowed values: GOVERNANCE
retention_period
integer
created_at
string format: date-time
updated_at
string format: date-time
errors
object
message
string

Example

{
"code": 200,
"data": {
"bucket": 12345,
"mode": "GOVERNANCE",
"retention_period": 5,
"created_at": "2025-05-27T13:50:12.651315Z",
"updated_at": "2025-05-27T13:50:12.651385Z"
},
"errors": {},
"message": "Success"
}