Bucket Settings
Three independent per-bucket settings, each a read/write pair. Together they back the Setting tab of a bucket's detail view.
| Concern | Read | Write |
|---|---|---|
| Privacy | s3_getBucketPrivacy | s3_setBucketPrivacy |
| Policy | s3_getBucketPolicies | s3_upsertBucketPolicyGrant |
| CORS | s3_getBucketCorsConfig | s3_configureBucketCors |
All requests go to the Storage gateway and need the authentication headers.
The field names, types and nullability on this page are taken from the live schema. The example responses are illustrative — built from the schema shape with sample values, not captured from a real call.
Bucket Privacy
Get Bucket Privacy
Query · s3_getBucketPrivacy
Reads whether a bucket is private.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
bucketId | String | Yes | Bucket to read |
Variables
{
"bucketId": "68b571f65f34c302831d923f"
}
Request
query getBucketPrivacy($bucketId: String!) {
s3_getBucketPrivacy(bucketId: $bucketId) {
bucketId
bucketName
privacy
}
}
Response
Returns s3_BucketPrivacyOverview, which is non-null.
| Field | Type | Description |
|---|---|---|
bucketId | String | Identifier of the bucket |
bucketName | String | Name of the bucket |
privacy | Boolean | Whether the bucket is private |
{
"data": {
"s3_getBucketPrivacy": {
"bucketId": "68b571f65f34c302831d923f",
"bucketName": "bucket03",
"privacy": true
}
}
}
Set Bucket Privacy
Mutation · s3_setBucketPrivacy
Sets whether a bucket is private.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
input | s3_SetBucketPrivacyInput | Yes | Privacy setting |
input
| Field | Type | Required | Description |
|---|---|---|---|
bucketId | String | Yes | Bucket to change |
privacy | Boolean | Yes | true makes the bucket private |
Variables
{
"input": {
"bucketId": "68b571f65f34c302831d923f",
"privacy": false
}
}
Request
mutation setBucketPrivacy($input: s3_SetBucketPrivacyInput!) {
s3_setBucketPrivacy(input: $input) {
success
message
}
}
Response
| Field | Type | Description |
|---|---|---|
success | Boolean | Whether it worked |
message | String | Result message |
{
"data": {
"s3_setBucketPrivacy": {
"success": true,
"message": "Bucket privacy updated successfully"
}
}
}
Bucket Policy
Get Bucket Policies
Query · s3_getBucketPolicies
Reads the bucket's policy document.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
bucketId | String | Yes | Bucket to read |
Variables
{
"bucketId": "68b571f65f34c302831d923f"
}
Request
query getBucketPolicies($bucketId: String!) {
s3_getBucketPolicies(bucketId: $bucketId) {
id
bucketPolicy
createdAt
updatedAt
}
}
Response
| Field | Type | Description |
|---|---|---|
id | ID | Policy record identifier |
bucketPolicy | s3_JSONObject | The policy document, always present |
createdAt | Float | Creation timestamp |
updatedAt | Float | Last update timestamp |
The query itself is nullable — it returns null when the bucket has no policy
set. bucketPolicy is the s3_JSONObject scalar, so the schema does not
constrain the document's shape; it is arbitrary JSON.
{
"data": {
"s3_getBucketPolicies": {
"id": "68b571f65f34c302831d9240",
"bucketPolicy": {
"Version": "2012-10-17",
"Statement": []
},
"createdAt": 1725417988748,
"updatedAt": 1725421468701
}
}
}
Upsert Bucket Policy Grant
Mutation · s3_upsertBucketPolicyGrant
Creates or replaces the bucket's policy document.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
input | s3_UpsertBucketPolicyGrantInput | Yes | Policy to set |
input
| Field | Type | Required | Description |
|---|---|---|---|
bucketId | String | Yes | Bucket to change |
bucketPolicy | s3_JSONObject | Yes | The policy document |
Variables
{
"input": {
"bucketId": "68b571f65f34c302831d923f",
"bucketPolicy": {
"Version": "2012-10-17",
"Statement": []
}
}
}
Request
mutation upsertBucketPolicyGrant($input: s3_UpsertBucketPolicyGrantInput!) {
s3_upsertBucketPolicyGrant(input: $input) {
success
message
}
}
Response
| Field | Type | Description |
|---|---|---|
success | Boolean | Whether it worked |
message | String | Result message |
{
"data": {
"s3_upsertBucketPolicyGrant": {
"success": true,
"message": "Bucket policy updated successfully"
}
}
}
Bucket CORS
Get Bucket CORS Config
Query · s3_getBucketCorsConfig
Reads the bucket's CORS rules.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
bucketId | String | Yes | Bucket to read |
Variables
{
"bucketId": "68b571f65f34c302831d923f"
}
Request
query getBucketCorsConfig($bucketId: String!) {
s3_getBucketCorsConfig(bucketId: $bucketId) {
id
bucketId
cors {
origins
allowedMethods
allowedHeaders
exposeHeaders
maxAgeSeconds
}
createdAt
updatedAt
}
}
Response
| Field | Type | Description |
|---|---|---|
id | ID | CORS record identifier |
bucketId | ID | Identifier of the bucket |
cors | [s3_BucketCorsRule] | The rules — nullable |
createdAt | Float | Creation timestamp |
updatedAt | Float | Last update timestamp |
s3_BucketCorsRule
| Field | Type | Required | Description |
|---|---|---|---|
origins | [String] | Yes | Allowed origins |
allowedMethods | [String] | Yes | Allowed HTTP methods |
allowedHeaders | [String] | No | Allowed request headers |
exposeHeaders | [String] | No | Response headers exposed to the browser |
maxAgeSeconds | Float | No | Preflight cache lifetime |
The query is nullable — it returns null when the bucket has no CORS
configuration.
{
"data": {
"s3_getBucketCorsConfig": {
"id": "68b571f65f34c302831d9241",
"bucketId": "68b571f65f34c302831d923f",
"cors": [
{
"origins": ["https://example.com"],
"allowedMethods": ["GET", "PUT"],
"allowedHeaders": ["*"],
"exposeHeaders": ["ETag"],
"maxAgeSeconds": 3600
}
],
"createdAt": 1725417988748,
"updatedAt": 1725421468701
}
}
}
Configure Bucket CORS
Mutation · s3_configureBucketCors
Replaces the bucket's CORS rules.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
input | s3_ConfigureBucketCorsInput | Yes | CORS rules |
input
| Field | Type | Required | Description |
|---|---|---|---|
bucketId | String | Yes | Bucket to change |
cors | [s3_CorsRuleInput] | No | The rules to set |
s3_CorsRuleInput
| Field | Type | Required | Description |
|---|---|---|---|
origins | [String] | Yes | Allowed origins |
allowedMethods | [String] | Yes | Allowed HTTP methods |
allowedHeaders | [String] | No | Allowed request headers |
exposeHeaders | [String] | No | Response headers exposed to the browser |
maxAgeSeconds | Int | No | Preflight cache lifetime |
maxAgeSeconds is an Int on the input but a Float on the response
(s3_BucketCorsRule). Both are reproduced from the schema as-is.
Variables
{
"input": {
"bucketId": "68b571f65f34c302831d923f",
"cors": [
{
"origins": ["https://example.com"],
"allowedMethods": ["GET", "PUT"],
"allowedHeaders": ["*"],
"exposeHeaders": ["ETag"],
"maxAgeSeconds": 3600
}
]
}
}
Request
mutation configureBucketCors($input: s3_ConfigureBucketCorsInput!) {
s3_configureBucketCors(input: $input) {
id
bucketId
cors {
origins
allowedMethods
allowedHeaders
exposeHeaders
maxAgeSeconds
}
createdAt
updatedAt
}
}
Response
Returns s3_BucketCorsConfigResponse, the same shape as
Get Bucket CORS Config, and is non-null here.
{
"data": {
"s3_configureBucketCors": {
"id": "68b571f65f34c302831d9241",
"bucketId": "68b571f65f34c302831d923f",
"cors": [
{
"origins": ["https://example.com"],
"allowedMethods": ["GET", "PUT"],
"allowedHeaders": ["*"],
"exposeHeaders": ["ETag"],
"maxAgeSeconds": 3600
}
],
"createdAt": 1725417988748,
"updatedAt": 1725421468701
}
}
}