S3-Compatible Storage
Update bucket
Updates bucket CORS, Lifecycle, and/or Policy settings. Supports partial updates - only specified fields will be modified.
Lifecycle: set expiration_days to a positive integer to enable, null or 0 to remove. Negative values return 400. CORS: set allowed_origins to a non-empty array to configure, empty array to remove. Policy: set is_public to true/false to update.
patch/storage/v4/object_storages/{storage_id}/buckets/{name}
Path parameters
storage_idinteger required
Storage ID
namestring required
Bucket name
Request body
Example request
{
"cors": {
"allowed_origins": [
"https://example.com"
]
},
"lifecycle": {
"expiration_days": 30
},
"policy": {
"is_public": true
}
}Response
BucketDetailResV4
Example response
{
"cors": {
"allowed_origins": [
"https://example.com",
"*"
]
},
"lifecycle": {
"expiration_days": 30
},
"name": "my-bucket",
"policy": {
"is_public": true
},
"storage_id": 123
}