v32

latestOpenAPI 3.1.0raw.githubusercontent.com2026-05-151,1412,2144.5 MB
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

namestring required

Globally unique bucket name within the storage. Used as the path prefix when accessing objects via S3 API.

storage_idinteger required

Parent storage this bucket belongs to. Use this ID in the URL path for bucket operations.

Example response

{
  "cors": {
    "allowed_origins": [
      "https://example.com",
      "*"
    ]
  },
  "lifecycle": {
    "expiration_days": 30
  },
  "name": "my-bucket",
  "policy": {
    "is_public": true
  },
  "storage_id": 123
}