Update bucket
Updates bucket settings including name, aliases, type, and portal configuration.
Authorization
OAuth2 upl:bucket:manageOAuth 2.0 authorization
In: header
Scope: upl:bucket:manage
Header Parameters
Define the version of the Connect protocol
Define the timeout, in ms
Request Body
application/json
Reference to the bucket
Field mask to specify which fields to update Valid paths: "type", "aliases", "primary_alias", "bucket_name", "portal_config", "private", "cors", "policy_json" If not provided, all non-empty fields will be updated (legacy behavior)
enum.defined_only = true
Set the complete list of aliases for the bucket The system will automatically add new aliases and remove missing ones Note: Cannot remove primary alias unless setting a new one
items <= 8Recheck Cloudflare status for all custom domain aliases validate:skip a bool has no bounds
Set the primary alias for the bucket Must be a verified custom domain or a non-custom domain Can be set to a new alias being added in the same request (for non-custom domains)
hostname1 <= length <= 64Update the bucket's display name This is a user-friendly label and does not affect routing (aliases handle that)
3 <= length <= 64Update the bucket's portal configuration
Toggle the bucket's private flag (see Bucket.private). The slug is immutable and cannot be updated through this RPC. validate:skip a bool has no bounds
Replace the CORS configuration. With "cors" in the update mask:
supplying a configuration sets it (an empty rules list means "allow
no cross-origin reads"), while omitting it clears back to the
cdn_mode-derived default.
Replace the bucket policy. With "policy_json" in the update mask, an empty string removes the policy. Documents outside upl's supported subset are rejected.
length <= 20480Response Body
application/json
application/json
curl -X POST "https://uploads-api.xeonr.io/uplim.api.v1.BucketsService/UpdateBucket" \ -H "Connect-Protocol-Version: 1" \ -H "Connect-Timeout-Ms: 1000" \ -H "Content-Type: application/json" \ -d '{}'{
"bucket": {
"bucketId": "string",
"bucketName": "string",
"url": "string",
"uploadCount": "string",
"usedSpaceBytes": "string",
"totalSpaceBytes": "string",
"aliases": [
"string"
],
"isPrimary": true,
"createdAt": "2023-01-15T01:30:15.01Z",
"updatedAt": "2023-01-15T01:30:15.01Z",
"type": "BUCKET_TYPE_UNSPECIFIED",
"destination": "BUCKET_DESTINATION_UNSPECIFIED",
"destinationConfig": {
"s3Bucket": {
"bucketName": "example.com",
"region": "string",
"roleArn": "string"
}
},
"primaryAlias": "string",
"portalConfig": {
"cdnMode": true
},
"integrationBucketTypeId": "64e6bf6c-205f-4993-b9eb-3e0601207a25",
"slug": "string",
"private": true,
"ownerTeam": "string",
"ownerTeamSlug": "string",
"cors": {
"rules": [
{
"id": "string",
"allowedOrigins": [
"string"
],
"allowedMethods": [
"string"
],
"allowedHeaders": [
"string"
],
"exposeHeaders": [
"string"
],
"maxAgeSeconds": 86400
}
]
},
"policyJson": "string",
"lifecycleRuleCount": 0
},
"aliasStatus": [
{
"alias": "string",
"isCustomDomain": true,
"status": "string",
"verifiedAt": "2023-01-15T01:30:15.01Z",
"error": "string",
"createdAt": "2023-01-15T01:30:15.01Z",
"fallbackHostname": "string",
"isSlug": true
}
]
}{
"code": "not_found",
"message": "string",
"details": [
{
"type": "string",
"value": "string",
"debug": {}
}
]
}