Skip to main content
PATCH
/
storage
/
provisioning
/
v3
/
storages
/
{storage_id}
/
buckets
/
{bucket_name}
Update bucket configuration
curl --request PATCH \
  --url https://api.gcore.com/storage/provisioning/v3/storages/{storage_id}/buckets/{bucket_name} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "cors": {
    "allowed_origins": [
      "https://example.com"
    ]
  },
  "lifecycle": {
    "expiration_days": 30
  },
  "policy": {
    "is_public": true
  }
}
'
{
  "name": "my-bucket",
  "storage_id": 123,
  "cors": {
    "allowed_origins": [
      "https://example.com",
      "*"
    ]
  },
  "lifecycle": {
    "expiration_days": 30
  },
  "policy": {
    "is_public": true
  }
}

Authorizations

Authorization
string
header
required

API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef

Path Parameters

storage_id
integer<int64>
required

Storage ID

bucket_name
string
required

Bucket name

Body

application/json
cors
object

BucketCORSPatchV3 CORS patch for V3 bucket

lifecycle
object

BucketLifecyclePatchV3 lifecycle patch for V3 bucket

policy
object

BucketPolicyPatchV3 policy patch for V3 bucket

Response

BucketDetailResV3

BucketDetailResV3 consolidated bucket response V3

name
string
required

Bucket name

Example:

"my-bucket"

storage_id
integer<int64>
required

Storage ID the bucket belongs to

Example:

123

cors
object

BucketCORSV3 CORS configuration for V3 bucket

lifecycle
object

BucketLifecycleV3 lifecycle configuration for V3 bucket

policy
object

BucketPolicyV3 policy configuration for V3 bucket