bucket key
The bucket key commands.
An access key reaches one bucket and no other. read-write can read, upload and delete
files, and read-only can read and list them.
The secret is shown once, in the result of bucket key create, and no command returns it
again, so a lost secret means a new key. There is no rotation: replacing a key means
creating a new one, moving the clients to it, and deleting the old one. A deleted key can
keep working for up to 15 minutes.
The secret is printed on stdout, so it lands wherever the command ran: a terminal's
scrollback, a CI log, an agent's transcript. An agent driving the CLI hands
bucket key create to the person to run in their own terminal. To give the key to an
application, put the values in a .env file and run
outplane env push, rather than pasting the secret into env set,
which leaves it in shell history. The variable names are on the console's
Buckets page.
bucket key list
List the access keys on a bucket.
Usage
outplane bucket key list <BUCKET>Arguments
| Argument | Type | Description |
|---|---|---|
BUCKET | string | The bucket's name or id, not its bucketName. Required. |
Output
| Field | Type | Description |
|---|---|---|
accessKeyId | string | The key's id, and what to store. Names are not enforced unique. |
name | string | |
permission | string | What it may do in this bucket. A value this release does not know reads as unknown:N. One of read-write, read-only. |
bucket | string | The bucket it reaches. |
bucketId | string |
Examples
Which keys reach a bucket
outplane bucket key list uploadsFind the id to delete
outplane bucket key list uploads --json --fields name,accessKeyId,permission{
"items": [
{
"accessKeyId": "<ACCESS_KEY_ID>",
"name": "web",
"permission": "read-write"
}
],
"total": 1,
"truncated": false
}The same list as a table, in a pipe
outplane bucket key list uploads -o textWhat to Know
- A secret never appears here and cannot be read again, by this or any other command.
- Names are not enforced unique, and accessKeyId is what to store.
- An empty list is not an error. A new bucket has no key.
Errors
Beyond 0 for success, this command exits with:
| Exit | Kind | Meaning |
|---|---|---|
2 | usage | Invalid arguments, unknown flag, or client-side validation failure. |
3 | auth | Not authenticated, token revoked or expired, or forbidden for this team. |
5 | not_found | The named resource does not exist, or is not visible to this credential. |
8 | upstream | The Out Plane API returned a server error. |
The code on the error object is one of bucket.not_found, usage.missing_argument, usage.empty_argument, context.no_team. Branch on that, or on the exit status. The message is prose and changes.
bucket key create
Add an access key to a bucket, showing its secret once.
Usage
outplane bucket key create <BUCKET> <NAME> [flags]Arguments
| Argument | Type | Description |
|---|---|---|
BUCKET | string | The bucket's name or id, not its bucketName. Required. |
NAME | string | 1 to 100 letters, numbers, hyphens and underscores. Required. Must match ^[a-zA-Z0-9][a-zA-Z0-9\-_]*$. |
Flags
| Flag | Type | Description |
|---|---|---|
--permission | string | What the key may do in this bucket. Required. One of read-write, read-only. |
This command does not accept --fields. Every other global flag applies.
Output
| Field | Type | Description |
|---|---|---|
accessKeyId | string | The key's id, and what to store. Names are not enforced unique. |
name | string | |
permission | string | What it may do in this bucket. A value this release does not know reads as unknown:N. One of read-write, read-only. |
bucket | string | The bucket it reaches. |
bucketId | string | |
secretAccessKey | string | null | The secret, shown this once. null for a dry run. |
bucketName | string | The name S3 clients use. |
endpoint | string | The S3 endpoint. Clients need virtual-hosted addressing; path-style requests fail. |
region | string | The region clients sign with, always auto. |
changed | bool | False for a dry run, where accessKeyId is null as well. |
Examples
Check the request without creating a key
outplane bucket key create uploads web --permission read-write --dry-run --json{
"accessKeyId": null,
"changed": false,
"name": "web",
"permission": "read-write",
"secretAccessKey": null
}A key an application can read and write with
outplane bucket key create uploads web --permission read-writeA key that can only read, with the whole result as JSON
outplane bucket key create uploads reports --permission read-only --json{
"accessKeyId": "<ACCESS_KEY_ID>",
"bucketName": "uploads-<SUFFIX>",
"changed": true,
"endpoint": "<ENDPOINT>",
"name": "reports",
"permission": "read-only",
"region": "auto",
"secretAccessKey": "<SECRET_ACCESS_KEY>"
}What to Know
- The secret appears once, in this result, in every format and under --quiet. No other command returns it and it cannot be read again.
- The secret is on stdout, so it lands in the record of whatever ran this command: a terminal's scrollback, a CI log, an agent's transcript. That makes this a command for a person at their own terminal when an agent is driving.
outplane env pushreads an application's values from a file, which keeps them out of shell history and out of argv.- Clients use bucketName with virtual-hosted addressing and the region auto. Path-style requests fail.
- A timeout, a dropped connection, a proxy's reply or a success with no secret in it can leave a key nobody has the secret of. retryable is false in those cases, because a retry makes another key, and
bucket key listshows what exists. A 5xx the API wrote itself stays retryable. - There is no rotation. Replacing a key means a new key, moving the clients to it, and then
bucket key deleteon the old one. - --fields is refused with exit 2 before anything is sent, because narrowing the result could discard the only copy of the secret.
Errors
Beyond 0 for success, this command exits with:
| Exit | Kind | Meaning |
|---|---|---|
1 | internal | An unexpected failure in the CLI itself. |
2 | usage | Invalid arguments, unknown flag, or client-side validation failure. |
3 | auth | Not authenticated, token revoked or expired, or forbidden for this team. |
5 | not_found | The named resource does not exist, or is not visible to this credential. |
6 | conflict | The resource already exists, or a concurrent change won. |
7 | quota | Plan limit reached or payment required. Not a rate limit; retrying will not help. |
8 | upstream | The Out Plane API returned a server error. |
124 | timeout | A client-side deadline expired. The server operation may still be running. |
The code on the error object is one of bucket.key_name_invalid, bucket.key_conflict, bucket.permission_invalid, bucket.not_found, bucket.subscription_inactive, usage.flag_not_applicable, usage.missing_argument, usage.empty_argument, context.no_team. Branch on that, or on the exit status. The message is prose and changes.
bucket key delete
Remove an access key from a bucket.
Usage
outplane bucket key delete <BUCKET> <KEY> [flags]Arguments
| Argument | Type | Description |
|---|---|---|
BUCKET | string | The bucket's name or id, not its bucketName. Required. |
KEY | string | Access key id or name. Required. |
Flags
| Flag | Type | Description |
|---|---|---|
-y, --yes | bool | Acknowledge the deletion. Not sufficient on its own. |
--confirm-name | string | The key's name, typed again, even when the key is given by id. |
The global flags apply as well.
Output
| Field | Type | Description |
|---|---|---|
accessKeyId | string | The key's id, and what to store. Names are not enforced unique. |
name | string | |
permission | string | What it may do in this bucket. A value this release does not know reads as unknown:N. One of read-write, read-only. |
bucket | string | The bucket it reaches. |
bucketId | string | |
changed | bool | True only when it was deleted. |
Examples
See which key would go
outplane bucket key delete uploads web --dry-runThe confirmed form, which a human approves
outplane bucket key delete uploads web --yes --confirm-name webCheck what the name resolves to
outplane bucket key delete uploads web --dry-run --json{
"accessKeyId": "<ACCESS_KEY_ID>",
"changed": false,
"name": "web"
}What to Know
- This command never prompts. Without confirmation it exits 4 and returns the command to replay in the error's confirm_command field, which names the key by its id.
- Under a detected agent harness it exits 4 even with both flags.
- The old secret can keep working for up to 15 minutes after this succeeds.
- Applications holding it are not updated.
- Deleting a key by name fails when two keys share it, with bucket.key_ambiguous. The id always works.
- bucket.key_not_found on a key that was just resolved can also mean its bucket went in that moment.
bucket key listtells the two apart.
Errors
Beyond 0 for success, this command exits with:
| Exit | Kind | Meaning |
|---|---|---|
2 | usage | Invalid arguments, unknown flag, or client-side validation failure. |
3 | auth | Not authenticated, token revoked or expired, or forbidden for this team. |
4 | confirmation_required | A destructive operation stopped. Replay the command in confirm_command. |
5 | not_found | The named resource does not exist, or is not visible to this credential. |
8 | upstream | The Out Plane API returned a server error. |
The code on the error object is one of confirmation.required, bucket.confirm_name_mismatch, bucket.key_not_found, bucket.key_ambiguous, bucket.not_found, usage.missing_argument, usage.empty_argument, context.no_team. Branch on that, or on the exit status. The message is prose and changes.