Sub-Users
A sub-user is an additional S3 identity under your account. Each one carries its
own accessKey and secretKey, and a list of bucketAccess entries pairing a
bucket with a policy statement template.
All requests go to the Storage gateway and need the authentication headers.
s3_getSubUsers, s3_createSubUser, s3_updateSubUser and
s3_regenerateSubUserKey all return secretKey. A single unfiltered
s3_getSubUsers call returns the secret key of every sub-user. Treat these
responses as credential material: do not log them or paste them into issue
trackers.
Permissions
Two distinct enums exist and their values are not identical — check which one a field expects.
| Enum | Values |
|---|---|
s3_SubUserPermission | READ, WRITE, READ_WRITE, FULL |
s3_SubUserBucketPermission | READ, WRITE, READ_WRITE, FULL_ACCESS |
The account-level enum ends in FULL; the bucket-level one ends in
FULL_ACCESS.
List Sub-Users
Query · s3_getSubUsers
Returns a paginated list of sub-users.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
input | s3_ListSubUsersInput | No | Pagination, filter and sort |
input
| Field | Type | Required | Description |
|---|---|---|---|
pager | s3_PagerInput | No | Page and page size |
bucketId | String | No | Only sub-users with access to this bucket |
statementId | String | No | Only sub-users holding this statement |
bucketPermission | s3_SubUserBucketPermission | No | Filter by bucket-level permission |
permission | s3_SubUserPermission | No | Filter by account-level permission |
sortBy | s3_SortBy | No | ASC or DESC |
search | String | No | Free-text search |
pager
| Field | Type | Required | Description |
|---|---|---|---|
page | Int! | Yes | Page number |
limit | Int! | Yes | Items per page |
Response — s3_ListSubUsersResponse
| Field | Type | Description |
|---|---|---|
subUsers | [s3_SubUserListItemResponse!]! | The page of results |
pagination | s3_Pagination! | Pagination metadata |
s3_SubUserListItemResponse
| Field | Type | Description |
|---|---|---|
id | ID! | Sub-user identifier |
subUId | String! | Sub-user UID |
permission | s3_SubUserPermission! | Account-level permission |
accessKey | String! | The sub-user's S3 access key |
secretKey | String! | The sub-user's S3 secret key |
bucketAccess | [s3_SubUserBucketAccessResponse!]! | Per-bucket access |
s3_SubUserBucketAccessResponse
| Field | Type | Description |
|---|---|---|
bucketId | ID! | Identifier of the bucket |
bucketName | String | Name of the bucket |
statementId | ID! | Identifier of the policy statement |
statementLabel | String | Label of the policy statement |
permission | String | Permission granted on this bucket |
actions | [String!]! | Actions the statement permits |
resources | [String!]! | Resources the statement applies to |
s3_Pagination
| Field | Type |
|---|---|
currentPage | Int! |
lastPage | Int! |
from | Int! |
perPage | Int! |
to | Int! |
total | Int! |
Variables
{
"input": {
"pager": { "page": 1, "limit": 20 },
"sortBy": "ASC"
}
}
Request
query getSubUsers($input: s3_ListSubUsersInput) {
s3_getSubUsers(input: $input) {
subUsers {
id
subUId
permission
accessKey
secretKey
bucketAccess {
bucketId
bucketName
statementId
statementLabel
permission
actions
resources
}
}
pagination {
currentPage
lastPage
from
perPage
to
total
}
}
}
Policy Statement Templates
Query · s3_getPolicyStatementTemplates
Returns the policy statement templates available when granting a sub-user access
to a bucket. A template's id is what you pass as statementId when creating
or updating a sub-user. Takes no arguments.
Response — [s3_PolicyStatementTemplate!]!
| Field | Type | Description |
|---|---|---|
id | ID! | Template identifier |
label | String! | Human-readable template name |
description | String | What the template grants |
actions | [String!]! | Actions the template permits |
Request
query getPolicyStatementTemplates {
s3_getPolicyStatementTemplates {
id
label
description
actions
}
}
Create Sub-User
Mutation · s3_createSubUser
Creates a sub-user and issues its key pair.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
input | s3_CreateSubUserInput! | Yes | Sub-user definition |
input
| Field | Type | Required | Description |
|---|---|---|---|
subUid | String! | Yes | UID for the new sub-user |
bucketAccess | [s3_CreateSubUserBucketAccessInput!]! | Yes | Bucket/statement pairs to grant |
The input field is subUid (lowercase i), while the response field is
subUId (uppercase I). This is the schema's own spelling, not a typo here.
bucketAccess
| Field | Type | Required | Description |
|---|---|---|---|
bucketId | String! | Yes | Bucket to grant access to |
statementId | String! | Yes | Policy statement template to apply |
Variables
{
"input": {
"subUid": "reporting-service",
"bucketAccess": [
{
"bucketId": "68b571f65f34c302831d923f",
"statementId": "read-only"
}
]
}
}
Request
mutation createSubUser($input: s3_CreateSubUserInput!) {
s3_createSubUser(input: $input) {
id
subUId
accessKey
secretKey
permission
bucketAccess {
bucketId
statementId
}
createdAt
updatedAt
}
}
Response — s3_SubUserResponse
| Field | Type | Description |
|---|---|---|
id | ID! | Sub-user identifier |
subUId | String! | Sub-user UID |
accessKey | String! | Newly issued access key |
secretKey | String! | Newly issued secret key |
permission | s3_SubUserPermission | Account-level permission |
bucketAccess | [s3_SubUserBucketAccess!]! | Granted access — bucketId and statementId only |
createdAt | Float! | Creation timestamp |
updatedAt | Float! | Last update timestamp |
s3_SubUserResponse.bucketAccess is s3_SubUserBucketAccess, which carries
only bucketId and statementId. The richer shape with bucketName,
actions and resources is s3_SubUserBucketAccessResponse, returned by
List Sub-Users.
Update Sub-User
Mutation · s3_updateSubUser
Replaces a sub-user's bucket access.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
input | s3_UpdateSubUserInput! | Yes | Changes to apply |
input
| Field | Type | Required | Description |
|---|---|---|---|
id | String! | Yes | Sub-user to update |
bucketAccess | [s3_CreateSubUserBucketAccessInput!] | No | Bucket/statement pairs to grant |
bucketAccess is nullable here and uses the same
s3_CreateSubUserBucketAccessInput type as Create. Note that subUid cannot be
changed — the input has no such field.
Variables
{
"input": {
"id": "674ebff6c12192a423b48b2d",
"bucketAccess": [
{
"bucketId": "68b571f65f34c302831d923f",
"statementId": "read-write"
}
]
}
}
Request
mutation updateSubUser($input: s3_UpdateSubUserInput!) {
s3_updateSubUser(input: $input) {
id
subUId
accessKey
secretKey
permission
bucketAccess {
bucketId
statementId
}
createdAt
updatedAt
}
}
Returns s3_SubUserResponse, the same shape as
Create Sub-User.
Delete Sub-User
Mutation · s3_deleteSubUser
Removes a sub-user.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
input | s3_DeleteSubUserInput! | Yes | Sub-user to delete |
input
| Field | Type | Required | Description |
|---|---|---|---|
id | String! | Yes | Sub-user to delete |
Variables
{
"input": {
"id": "674ebff6c12192a423b48b2d"
}
}
Request
mutation deleteSubUser($input: s3_DeleteSubUserInput!) {
s3_deleteSubUser(input: $input) {
message
success
}
}
Response — s3_CommonResponse
| Field | Type | Description |
|---|---|---|
message | String! | Result message |
success | Boolean! | Whether it worked |
Regenerate Sub-User Key
Mutation · s3_regenerateSubUserKey
Issues a new access key and secret key for a sub-user. The previous pair stops working.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
input | s3_RegenerateSubUserKeyInput! | Yes | Sub-user to re-key |
input
| Field | Type | Required | Description |
|---|---|---|---|
id | String! | Yes | Sub-user to re-key |
Variables
{
"input": {
"id": "674ebff6c12192a423b48b2d"
}
}
Request
mutation regenerateSubUserKey($input: s3_RegenerateSubUserKeyInput!) {
s3_regenerateSubUserKey(input: $input) {
id
subUId
accessKey
secretKey
createdAt
updatedAt
}
}
Returns s3_SubUserResponse carrying the new accessKey and secretKey.