Put Bucket Serving Config For S3
Backs the S3 Put/DeleteBucketCors and Put/DeleteBucketPolicy APIs. The verified_access_key_id must be live, enabled and hold an explicit ADMIN grant on the bucket; otherwise, or for an unknown bucket, the response carries denied. CORS rules and policy documents are validated (policies against upl's supported subset, at most 20 KiB and 20 statements, and the bucket must have a slug); failures are returned in validation_error rather than as a Connect error. Delete clears CORS back to the cdn_mode default or removes the policy.
Access: internal only — the portal worker, authenticated by the shared X-Upl-Internal-Token header matching S3_CREDENTIALS_INTERNAL_TOKEN (FailedPrecondition when unset, Unauthenticated on mismatch). No user authentication.
JWT access token obtained via OAuth2 flow or service account
In: header
Header Parameters
Define the version of the Connect protocol
Define the timeout, in ms
Request Body
application/json
SigV4-verified access key making the request. The api recomputes the key's grants and requires ADMIN on this bucket — these are bucket administration operations, not content operations.
1 <= lengthPutBucketCors
Response Body
application/json
application/json
curl -X POST "https://uploads-api.xeonr.io/uplim.api.v1.InternalPortalService/PutBucketServingConfigForS3" \ -H "Connect-Protocol-Version: 1" \ -H "Connect-Timeout-Ms: 1000" \ -H "Content-Type: application/json" \ -d '{}'{
"denied": {
"reason": "REASON_UNSPECIFIED"
},
"validationError": "string"
}{
"code": "not_found",
"message": "string",
"details": [
{
"type": "string",
"value": "string",
"debug": {}
}
]
}