Skip to content
Console
On this page

sylphx data buckets

Every sylphx data buckets command: its argument, its flags and a run line.

The buckets commands of Sylphx Data, as the CLI spells them: the same calls as the buckets API page, typed for the shell. Install, sign in and the grammar are on the CLI index.

get

Gets a bucket.

NAME — the resource's name; a bare id is enough below the linked project.

CLI

Shell
sylphx data buckets get orgs/acme/projects/shop/envs/production/buckets/bucket

GET https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/buckets/bucket · scope data:read · effect read · Request, response and examples

list

Lists buckets in a environment.

PARENT — optional: the CLI fills it from the linked project or the key's scope when it is left out.

CLI

Shell
sylphx data buckets list orgs/acme/projects/shop/envs/production

GET https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/buckets · scope data:read · effect read · Request, response and examples

Flags

FlagTypeWhat it does
--page-sizeintAt most this many; default 50, clamped to 1000.
--page-tokenstringnext_page_token of the previous page.
--filterstringAIP-160 filter over labels, filterable fields, and Ready.
--order-bystringAIP-132 ordering over filterable fields.

create

Creates a bucket. The Operation is done when the controller settles it.

ID — The id segment of the new Resource's name; the server assigns one when omitted.

CLI

Shell
sylphx data buckets create --parent orgs/acme/projects/shop/envs/production

POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/buckets · scope data:write · effect write · Request, response and examples

Flags

FlagTypeWhat it does
--parentstringThe parent to create in; defaults to the linked project or the key's scope.
--meta.labelskey=valueCaller-writable, indexed labels (AIP-122 label rules). Repeat the flag for each value.
--meta.annotationskey=valueCaller-writable, unindexed annotations. Repeat the flag for each value.
--meta.display-namestringCaller-writable human-readable name.
--spec.versioning-enabledboolKeep every version and write delete markers.
--spec.retentiondurationVersions are kept at least this long; unset keeps no minimum.
--spec.regionstringThe region; default the project's home region. Changing it moves the data by signed export and import.
--spec.deletion-protectionboolWhile set, Delete fails with DELETION_PROTECTED.
--spec.corsjsonBrowser access (CORS) rules for the bucket's S3 endpoint, in order; the first rule matching an origin and method answers. Empty answers no cross-origin request. At most 20 rules. Repeat the flag for each value.
--spec.lifecycle.abort-incomplete-multipart-daysintAbort a multipart upload that has not completed this many days after it started, and free its parts: 1 to 365. 0 keeps incomplete uploads until someone aborts them (and they are billed as stored bytes until then).
--spec.lifecycle.expiration-rulesjsonExpire current objects by key prefix, at most 50 rules with distinct prefixes. On a versioned bucket an expiry writes a delete marker. Repeat the flag for each value.
--spec.public-access.modeenumWhich objects are public. One of off, read, read_prefixes.
--spec.public-access.prefixesstringKey prefixes whose objects are public when mode is READ_PREFIXES, at most 50, each at most 1024 bytes. Repeat the flag for each value.
--dry-runboolValidate and print the result without writing (validate_only).
--no-waitboolReturn the call at once instead of waiting for it to finish.

update

Updates a bucket's spec.deletion_protection, spec.cors and spec.lifecycle; every other field is fixed at creation. A mask path replaces the whole field (spec.cors replaces every rule).

NAME — the resource's name; a bare id is enough below the linked project.

CLI

Shell
sylphx data buckets update orgs/acme/projects/shop/envs/production/buckets/bucket

PATCH https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/buckets/bucket · scope data:write · effect write · Request, response and examples

Flags

FlagTypeWhat it does
--meta.labelskey=valueCaller-writable, indexed labels (AIP-122 label rules). Repeat the flag for each value.
--meta.annotationskey=valueCaller-writable, unindexed annotations. Repeat the flag for each value.
--meta.display-namestringCaller-writable human-readable name.
--spec.versioning-enabledboolKeep every version and write delete markers.
--spec.retentiondurationVersions are kept at least this long; unset keeps no minimum.
--spec.regionstringThe region; default the project's home region. Changing it moves the data by signed export and import.
--spec.deletion-protectionboolWhile set, Delete fails with DELETION_PROTECTED.
--spec.corsjsonBrowser access (CORS) rules for the bucket's S3 endpoint, in order; the first rule matching an origin and method answers. Empty answers no cross-origin request. At most 20 rules. Repeat the flag for each value.
--spec.lifecycle.abort-incomplete-multipart-daysintAbort a multipart upload that has not completed this many days after it started, and free its parts: 1 to 365. 0 keeps incomplete uploads until someone aborts them (and they are billed as stored bytes until then).
--spec.lifecycle.expiration-rulesjsonExpire current objects by key prefix, at most 50 rules with distinct prefixes. On a versioned bucket an expiry writes a delete marker. Repeat the flag for each value.
--spec.public-access.modeenumWhich objects are public. One of off, read, read_prefixes.
--spec.public-access.prefixesstringKey prefixes whose objects are public when mode is READ_PREFIXES, at most 50, each at most 1024 bytes. Repeat the flag for each value.
--allow-missingboolCreate the Resource when it does not exist (declarative upsert).
--dry-runboolValidate and print the result without writing (validate_only).
--no-waitboolReturn the call at once instead of waiting for it to finish.

delete

Deletes a bucket. Fails while spec.deletion_protection is set.

NAME — the resource's name; a bare id is enough below the linked project.

CLI

Shell
sylphx data buckets delete orgs/acme/projects/shop/envs/production/buckets/bucket --yes

DELETE https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/buckets/bucket · scope data:write · effect destructive · Request, response and examples

Flags

FlagTypeWhat it does
--etagstringDelete only if the current etag matches.
--allow-missingboolSucceed when the Resource does not exist.
--dry-runboolValidate and print the result without writing (validate_only).
--no-waitboolReturn the call at once instead of waiting for it to finish.
--yesboolDo not ask before this destructive call.

connect

Returns where to reach the bucket: the Data API address, and, once the bucket is served over S3, an S3 endpoint with keys scoped to this one bucket (s3). It carries no username or password; each call mints new S3 keys, and a client signs with those.

NAME — the resource's name; a bare id is enough below the linked project.

CLI

Shell
sylphx data buckets connect orgs/acme/projects/shop/envs/production/buckets/bucket

POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/buckets/bucket:connect · scope data:write · effect read · Request, response and examples

Flags

FlagTypeWhat it does
--credential-ttldurationHow long the S3 keys last: 900s to 604800s (7 days), default 3600s. Ask for what the work needs (a server that signs 7-day URLs asks for 604800s); connect again for fresh keys, they are cheap.

rotate-credentials

Revokes every S3 key :connect minted for the bucket, at once; connect again for new ones. Keys of other buckets are untouched.

NAME — the resource's name; a bare id is enough below the linked project.

CLI

Shell
sylphx data buckets rotate-credentials orgs/acme/projects/shop/envs/production/buckets/bucket

POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/buckets/bucket:rotateCredentials · scope data:write · effect write · Request, response and examples

Flags

FlagTypeWhat it does
--etagstringAct only if the current etag matches.
--dry-runboolValidate and print the result without writing (validate_only).
--no-waitboolReturn the call at once instead of waiting for it to finish.