wb resource create gcs-bucket --id=mybucket --bucket-name=mybucket --auto-delete=365
Name
wb-resource-create-gcs-bucket - Add a controlled GCS bucket.
Synopsis
wb resource create gcs-bucket [--access=<access>] [--bucket-name=<bucketName>] [--cloning=<cloning>] [--description=<description>] [--format=<format>] [--location=<location>] [--storage=<storageClass>] [--workspace=<id>] (--id=<id>) [--lifecycle=<pathToLifecycleFile> | --auto-delete=<autoDelete>]
Description
Adds a controlled GCS bucket resource.
Lifecycle rules
GCS bucket lifecycle rules are specified by passing a JSON-formatted file path to the wb resource create gcs-bucket
command.
The expected JSON structure matches the one used by the gsutil lifecycle command. This structure is a subset of the GCS resource specification.
There is a command shortcut for specifying a lifecycle rule which deletes any objects more than N days old:
Options
- --access=<access>
-
Access scope for the resource: SHARED_ACCESS, PRIVATE_ACCESS.
Default: SHARED_ACCESS
- --auto-delete=<autoDelete>
-
Number of days after which to auto-delete the objects in the bucket. This option is a shortcut for specifying a lifecycle rule that auto-deletes objects in the bucket after some number of days.
- --bucket-name=<bucketName>
-
Name of the GCS bucket, without the prefix. (e.g. 'my-bucket', not 'gs://my-bucket'). If not provided, a unique bucket name will be generated.
- --cloning=<cloning>
-
Instructions for handling when cloning the workspace: COPY_NOTHING, COPY_DEFINITION, COPY_RESOURCE, COPY_REFERENCE, COPY_LINK_REFERENCE.
Default: COPY_RESOURCE
- --description=<description>
-
Description of the resource.
- --format=<format>
-
Set the format for printing command output: JSON, TEXT. Defaults to the config format property.
Default: null
- --id=<id>
-
ID of the resource, scoped to the workspace. Only use letters, numbers, dashes, and underscores.
- --lifecycle=<pathToLifecycleFile>
-
Lifecycle rules (https://cloud.google.com/storage/docs/lifecycle) specified in a JSON-formatted file. See the README for the expected JSON format.
- --location=<location>
-
The Google Cloud location of the bucket (https://cloud.google.com/storage/docs/locations).
Default: US-CENTRAL1
- --storage=<storageClass>
-
Storage class (https://cloud.google.com/storage/docs/storage-classes): STANDARD, NEARLINE, COLDLINE, ARCHIVE.
- --workspace=<id>
-
Workspace id to use for this command only.
Last Modified: 1 January 0001