mirror of
https://github.com/imjasonh/gcloud-help
synced 2026-07-19 07:15:23 +00:00
gcloud: Wed Sep 14 09:28:28 UTC 2022
This commit is contained in:
parent
e7bec9b31b
commit
8f4214beb2
148 changed files with 5778 additions and 334 deletions
|
|
@ -7,7 +7,8 @@ SYNOPSIS
|
|||
-k DEFAULT_ENCRYPTION_KEY]
|
||||
[--default-storage-class=DEFAULT_STORAGE_CLASS,
|
||||
-c DEFAULT_STORAGE_CLASS, -s DEFAULT_STORAGE_CLASS]
|
||||
[--location=LOCATION, -l LOCATION] [--pap, --public-access-prevention]
|
||||
[--location=LOCATION, -l LOCATION]
|
||||
[--[no-]pap, --[no-]public-access-prevention]
|
||||
[--retention-period=RETENTION_PERIOD]
|
||||
[--[no-]uniform-bucket-level-access, -b] [GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
|
|
@ -47,10 +48,12 @@ FLAGS
|
|||
bucket. If not specified, the location used by Cloud Storage is us. A
|
||||
bucket's location cannot be changed after creation.
|
||||
|
||||
--pap, --public-access-prevention
|
||||
--[no-]pap, --[no-]public-access-prevention
|
||||
Sets public access prevention to "enforced". For details on how exactly
|
||||
public access is blocked, see:
|
||||
http://cloud/storage/docs/public-access-prevention
|
||||
http://cloud/storage/docs/public-access-prevention. Use
|
||||
--public-access-prevention to enable and --no-public-access-prevention
|
||||
to disable.
|
||||
|
||||
--retention-period=RETENTION_PERIOD
|
||||
Minimum retention period
|
||||
|
|
@ -78,5 +81,7 @@ NOTES
|
|||
This command is currently in alpha and might change without notice. If this
|
||||
command fails with API permission errors despite specifying the correct
|
||||
project, you might be trying to access an API with an invitation-only early
|
||||
access allowlist.
|
||||
access allowlist. This variant is also available:
|
||||
|
||||
$ gcloud storage buckets create
|
||||
|
||||
|
|
|
|||
|
|
@ -11,11 +11,11 @@ DESCRIPTION
|
|||
EXAMPLES
|
||||
Delete a Google Cloud Storage bucket named "my-bucket":
|
||||
|
||||
$ *gcloud alpha storage buckets delete* gs://my-bucket
|
||||
$ gcloud alpha storage buckets delete gs://my-bucket
|
||||
|
||||
Delete two buckets:
|
||||
|
||||
$ *gcloud alpha storage buckets delete* gs://my-bucket \
|
||||
$ gcloud alpha storage buckets delete gs://my-bucket \
|
||||
gs://my-other-bucket
|
||||
|
||||
POSITIONAL ARGUMENTS
|
||||
|
|
@ -41,5 +41,7 @@ NOTES
|
|||
This command is currently in alpha and might change without notice. If this
|
||||
command fails with API permission errors despite specifying the correct
|
||||
project, you might be trying to access an API with an invitation-only early
|
||||
access allowlist.
|
||||
access allowlist. This variant is also available:
|
||||
|
||||
$ gcloud storage buckets delete
|
||||
|
||||
|
|
|
|||
|
|
@ -33,5 +33,7 @@ NOTES
|
|||
This command is currently in alpha and might change without notice. If this
|
||||
command fails with API permission errors despite specifying the correct
|
||||
project, you might be trying to access an API with an invitation-only early
|
||||
access allowlist.
|
||||
access allowlist. This variant is also available:
|
||||
|
||||
$ gcloud storage buckets describe
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,12 @@ GCLOUD WIDE FLAGS
|
|||
|
||||
Run $ gcloud help for details.
|
||||
|
||||
GROUPS
|
||||
GROUP is one of the following:
|
||||
|
||||
notifications
|
||||
(ALPHA) Manage Cloud Storage bucket notifications.
|
||||
|
||||
COMMANDS
|
||||
COMMAND is one of the following:
|
||||
|
||||
|
|
@ -34,5 +40,7 @@ NOTES
|
|||
This command is currently in alpha and might change without notice. If this
|
||||
command fails with API permission errors despite specifying the correct
|
||||
project, you might be trying to access an API with an invitation-only early
|
||||
access allowlist.
|
||||
access allowlist. This variant is also available:
|
||||
|
||||
$ gcloud storage buckets
|
||||
|
||||
|
|
|
|||
|
|
@ -70,5 +70,7 @@ NOTES
|
|||
This command is currently in alpha and might change without notice. If this
|
||||
command fails with API permission errors despite specifying the correct
|
||||
project, you might be trying to access an API with an invitation-only early
|
||||
access allowlist.
|
||||
access allowlist. This variant is also available:
|
||||
|
||||
$ gcloud storage buckets list
|
||||
|
||||
|
|
|
|||
142
gcloud/alpha/storage/buckets/notifications/create
Normal file
142
gcloud/alpha/storage/buckets/notifications/create
Normal file
|
|
@ -0,0 +1,142 @@
|
|||
NAME
|
||||
gcloud alpha storage buckets notifications create - create a notification
|
||||
configuration on a bucket
|
||||
|
||||
SYNOPSIS
|
||||
gcloud alpha storage buckets notifications create URL
|
||||
[--custom-attributes=[KEY=VALUE,...], -m [KEY=VALUE,...]]
|
||||
[--event-types=[NOTIFICATION_EVENT_TYPE,...],
|
||||
-e [NOTIFICATION_EVENT_TYPE,...]]
|
||||
[--object-prefix=OBJECT_PREFIX, -p OBJECT_PREFIX]
|
||||
[--payload-format=PAYLOAD_FORMAT, -f PAYLOAD_FORMAT; default="json"]
|
||||
[--skip-topic-setup, -s] [--topic=TOPIC, -t TOPIC]
|
||||
[GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
(ALPHA) gcloud alpha storage buckets notifications create creates a
|
||||
notification configuration on a bucket, establishing a flow of event
|
||||
notifications from Cloud Storage to a Cloud Pub/Sub topic. As part of
|
||||
creating this flow, it also verifies that the destination Cloud Pub/Sub
|
||||
topic exists, creating it if necessary, and verifies that the Cloud Storage
|
||||
bucket has permission to publish events to that topic, granting the
|
||||
permission if necessary.
|
||||
|
||||
If a destination Cloud Pub/Sub topic is not specified with the -t flag,
|
||||
Cloud Storage chooses a topic name in the default project whose ID is the
|
||||
same as the bucket name. For example, if the default project ID specified
|
||||
is default-project and the bucket being configured is gs://example-bucket,
|
||||
the create command uses the Cloud Pub/Sub topic
|
||||
projects/default-project/topics/example-bucket.
|
||||
|
||||
In order to enable notifications, your project's [Cloud Storage service
|
||||
agent] (https://cloud.google.com/storage/docs/projects#service-accounts)
|
||||
must have the IAM permission "pubsub.topics.publish". This command checks
|
||||
to see if the destination Cloud Pub/Sub topic grants the service agent this
|
||||
permission. If not, the create command attempts to grant it.
|
||||
|
||||
A bucket can have up to 100 total notification configurations and up to 10
|
||||
notification configurations set to trigger for a specific event.
|
||||
|
||||
EXAMPLES
|
||||
Send notifications of all changes to the bucket example-bucket to the Cloud
|
||||
Pub/Sub topic projects/default-project/topics/example-bucket:
|
||||
|
||||
$ gcloud alpha storage buckets notifications create \
|
||||
gs://example-bucket
|
||||
|
||||
The same as the above but sends no notification payload:
|
||||
|
||||
$ gcloud alpha storage buckets notifications create \
|
||||
--payload-format=none gs://example-bucket
|
||||
|
||||
Include custom metadata in notification payloads:
|
||||
|
||||
$ gcloud alpha storage buckets notifications create \
|
||||
--custom-attributes=key1:value1,key2:value2 gs://example-bucket
|
||||
|
||||
Create a notification configuration that only sends an event when a new
|
||||
object has been created or an object is deleted:
|
||||
|
||||
$ gcloud alpha storage buckets notifications create \
|
||||
--event-types=OBJECT_FINALIZE,OBJECT_DELETE gs://example-bucket
|
||||
|
||||
Create a topic and notification configuration that sends events only when
|
||||
they affect objects with the prefix photos/:
|
||||
|
||||
$ gcloud alpha storage buckets notifications create \
|
||||
--object-prefix=photos/ gs://example-bucket
|
||||
|
||||
Specifies the destination topic ID files-to-process in the default project:
|
||||
|
||||
$ gcloud alpha storage buckets notifications create \
|
||||
--topic=files-to-process gs://example-bucket
|
||||
|
||||
The same as above but specifies a Cloud Pub/Sub topic belonging to the
|
||||
specific cloud project example-project:
|
||||
|
||||
$ gcloud alpha storage buckets notifications create \
|
||||
--topic=projects/example-project/topics/files-to-process \
|
||||
gs://example-bucket
|
||||
|
||||
Skip creating a topic when creating the notification configuraiton:
|
||||
|
||||
$ gcloud alpha storage buckets notifications create \
|
||||
--skip-topic-setup gs://example-bucket
|
||||
|
||||
POSITIONAL ARGUMENTS
|
||||
URL
|
||||
URL of the bucket to create the notification configuration on.
|
||||
|
||||
FLAGS
|
||||
--custom-attributes=[KEY=VALUE,...], -m [KEY=VALUE,...]
|
||||
Specifies key:value attributes that are appended to the set of
|
||||
attributes sent to Cloud Pub/Sub for all events associated with this
|
||||
notification configuration.
|
||||
|
||||
--event-types=[NOTIFICATION_EVENT_TYPE,...], -e [NOTIFICATION_EVENT_TYPE,...]
|
||||
Specify event type filters for this notification configuration. Cloud
|
||||
Storage will send notifications of only these types. By default, Cloud
|
||||
Storage sends notifications for all event types. * OBJECT_FINALIZE: An
|
||||
object has been created. * OBJECT_METADATA_UPDATE: The metadata of an
|
||||
object has changed. * OBJECT_DELETE: An object has been permanently
|
||||
deleted. * OBJECT_ARCHIVE: A live version of an object has become a
|
||||
noncurrent version. NOTIFICATION_EVENT_TYPE must be one of:
|
||||
OBJECT_ARCHIVE, OBJECT_DELETE, OBJECT_FINALIZE, OBJECT_METADATA_UPDATE.
|
||||
|
||||
--object-prefix=OBJECT_PREFIX, -p OBJECT_PREFIX
|
||||
Specifies a prefix path for this notification configuration. Cloud
|
||||
Storage will send notifications for only objects in the bucket whose
|
||||
names begin with the prefix.
|
||||
|
||||
--payload-format=PAYLOAD_FORMAT, -f PAYLOAD_FORMAT; default="json"
|
||||
Specifies the payload format of notification messages. Notification
|
||||
details are available in the message attributes. 'none' sends no
|
||||
payload. PAYLOAD_FORMAT must be one of: json, none.
|
||||
|
||||
--skip-topic-setup, -s
|
||||
Skips creation and permission assignment of the Cloud Pub/Sub topic.
|
||||
This is useful if the caller does not have permission to access the
|
||||
topic in question, or if the topic already exists and has the
|
||||
appropriate publish permission assigned.
|
||||
|
||||
--topic=TOPIC, -t TOPIC
|
||||
Specifies the Cloud Pub/Sub topic to send notifications to. If not
|
||||
specified, this command chooses a topic whose project is your default
|
||||
project and whose ID is the same as the Cloud Storage bucket name.
|
||||
|
||||
GCLOUD WIDE FLAGS
|
||||
These flags are available to all commands: --access-token-file, --account,
|
||||
--billing-project, --configuration, --flags-file, --flatten, --format,
|
||||
--help, --impersonate-service-account, --log-http, --project, --quiet,
|
||||
--trace-token, --user-output-enabled, --verbosity.
|
||||
|
||||
Run $ gcloud help for details.
|
||||
|
||||
NOTES
|
||||
This command is currently in alpha and might change without notice. If this
|
||||
command fails with API permission errors despite specifying the correct
|
||||
project, you might be trying to access an API with an invitation-only early
|
||||
access allowlist. This variant is also available:
|
||||
|
||||
$ gcloud storage buckets notifications create
|
||||
|
||||
51
gcloud/alpha/storage/buckets/notifications/delete
Normal file
51
gcloud/alpha/storage/buckets/notifications/delete
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
NAME
|
||||
gcloud alpha storage buckets notifications delete - delete notification
|
||||
configurations from a bucket
|
||||
|
||||
SYNOPSIS
|
||||
gcloud alpha storage buckets notifications delete URLS [URLS ...]
|
||||
[GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
(ALPHA) gcloud alpha storage buckets notifications delete deletes
|
||||
notification configurations from a bucket. If a notification configuration
|
||||
name is passed as a parameter, that configuration alone is deleted. If a
|
||||
bucket name is passed, all notification configurations associated with the
|
||||
bucket are deleted.
|
||||
|
||||
Cloud Pub/Sub topics associated with this notification configuration are
|
||||
not deleted by this command. Those must be deleted separately, for example
|
||||
with the command "gcloud pubsub topics delete".
|
||||
|
||||
EXAMPLES
|
||||
Delete a single notification configuration (with ID 3) in the bucket
|
||||
example-bucket:
|
||||
|
||||
$ gcloud alpha storage buckets notifications delete \
|
||||
b/example-bucket/notificationConfigs/3
|
||||
|
||||
Delete all notification configurations in the bucket example-bucket:
|
||||
|
||||
$ gcloud alpha storage buckets notifications delete \
|
||||
gs://example-bucket
|
||||
|
||||
POSITIONAL ARGUMENTS
|
||||
URLS [URLS ...]
|
||||
Specifies notification configuration names or buckets.
|
||||
|
||||
GCLOUD WIDE FLAGS
|
||||
These flags are available to all commands: --access-token-file, --account,
|
||||
--billing-project, --configuration, --flags-file, --flatten, --format,
|
||||
--help, --impersonate-service-account, --log-http, --project, --quiet,
|
||||
--trace-token, --user-output-enabled, --verbosity.
|
||||
|
||||
Run $ gcloud help for details.
|
||||
|
||||
NOTES
|
||||
This command is currently in alpha and might change without notice. If this
|
||||
command fails with API permission errors despite specifying the correct
|
||||
project, you might be trying to access an API with an invitation-only early
|
||||
access allowlist. This variant is also available:
|
||||
|
||||
$ gcloud storage buckets notifications delete
|
||||
|
||||
39
gcloud/alpha/storage/buckets/notifications/describe
Normal file
39
gcloud/alpha/storage/buckets/notifications/describe
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
NAME
|
||||
gcloud alpha storage buckets notifications describe - show metadata for a
|
||||
notification configuration
|
||||
|
||||
SYNOPSIS
|
||||
gcloud alpha storage buckets notifications describe URL
|
||||
[GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
(ALPHA) gcloud alpha storage buckets notifications describe prints
|
||||
populated metadata for a notification configuration.
|
||||
|
||||
EXAMPLES
|
||||
Describe a single notification configuration (with ID 3) in the bucket
|
||||
example-bucket:
|
||||
|
||||
$ gcloud alpha storage buckets notifications describe \
|
||||
b/example-bucket/notificationConfigs/3
|
||||
|
||||
POSITIONAL ARGUMENTS
|
||||
URL
|
||||
The url of the notification configuration
|
||||
|
||||
GCLOUD WIDE FLAGS
|
||||
These flags are available to all commands: --access-token-file, --account,
|
||||
--billing-project, --configuration, --flags-file, --flatten, --format,
|
||||
--help, --impersonate-service-account, --log-http, --project, --quiet,
|
||||
--trace-token, --user-output-enabled, --verbosity.
|
||||
|
||||
Run $ gcloud help for details.
|
||||
|
||||
NOTES
|
||||
This command is currently in alpha and might change without notice. If this
|
||||
command fails with API permission errors despite specifying the correct
|
||||
project, you might be trying to access an API with an invitation-only early
|
||||
access allowlist. This variant is also available:
|
||||
|
||||
$ gcloud storage buckets notifications describe
|
||||
|
||||
39
gcloud/alpha/storage/buckets/notifications/help
Normal file
39
gcloud/alpha/storage/buckets/notifications/help
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
NAME
|
||||
gcloud alpha storage buckets notifications - manage Cloud Storage bucket
|
||||
notifications
|
||||
|
||||
SYNOPSIS
|
||||
gcloud alpha storage buckets notifications COMMAND [GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
(ALPHA) Manage Cloud Storage bucket notifications.
|
||||
|
||||
GCLOUD WIDE FLAGS
|
||||
These flags are available to all commands: --help.
|
||||
|
||||
Run $ gcloud help for details.
|
||||
|
||||
COMMANDS
|
||||
COMMAND is one of the following:
|
||||
|
||||
create
|
||||
(ALPHA) Create a notification configuration on a bucket.
|
||||
|
||||
delete
|
||||
(ALPHA) Delete notification configurations from a bucket.
|
||||
|
||||
describe
|
||||
(ALPHA) Show metadata for a notification configuration.
|
||||
|
||||
list
|
||||
(ALPHA) List the notification configurations belonging to a given
|
||||
bucket.
|
||||
|
||||
NOTES
|
||||
This command is currently in alpha and might change without notice. If this
|
||||
command fails with API permission errors despite specifying the correct
|
||||
project, you might be trying to access an API with an invitation-only early
|
||||
access allowlist. This variant is also available:
|
||||
|
||||
$ gcloud storage buckets notifications
|
||||
|
||||
81
gcloud/alpha/storage/buckets/notifications/list
Normal file
81
gcloud/alpha/storage/buckets/notifications/list
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
NAME
|
||||
gcloud alpha storage buckets notifications list - list the notification
|
||||
configurations belonging to a given bucket
|
||||
|
||||
SYNOPSIS
|
||||
gcloud alpha storage buckets notifications list [URLS ...]
|
||||
[--filter=EXPRESSION] [--limit=LIMIT] [--page-size=PAGE_SIZE]
|
||||
[--sort-by=[FIELD,...]] [--uri] [GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
(ALPHA) gcloud alpha storage buckets notifications list provides a list of
|
||||
notification configurations belonging to a given bucket. The listed name of
|
||||
each configuration can be used with the delete sub-command to delete that
|
||||
specific notification config.
|
||||
|
||||
EXAMPLES
|
||||
Fetch the list of notification configs for the bucket example-bucket:
|
||||
|
||||
$ gcloud alpha storage buckets notifications list gs://example-bucket
|
||||
|
||||
Fetch the notification configs in all buckets matching a wildcard:
|
||||
|
||||
$ gcloud alpha storage buckets notifications list gs://example-*
|
||||
|
||||
Fetch all of the notification configs for buckets in the default project:
|
||||
|
||||
$ gcloud alpha storage buckets notifications list
|
||||
|
||||
POSITIONAL ARGUMENTS
|
||||
[URLS ...]
|
||||
Google Cloud Storage bucket paths. The path must begin with gs:// and
|
||||
may contain wildcard characters.
|
||||
|
||||
LIST COMMAND FLAGS
|
||||
--filter=EXPRESSION
|
||||
Apply a Boolean filter EXPRESSION to each resource item to be listed.
|
||||
If the expression evaluates True, then that item is listed. For more
|
||||
details and examples of filter expressions, run $ gcloud topic filters.
|
||||
This flag interacts with other flags that are applied in this order:
|
||||
--flatten, --sort-by, --filter, --limit.
|
||||
|
||||
--limit=LIMIT
|
||||
Maximum number of resources to list. The default is unlimited. This
|
||||
flag interacts with other flags that are applied in this order:
|
||||
--flatten, --sort-by, --filter, --limit.
|
||||
|
||||
--page-size=PAGE_SIZE
|
||||
Some services group resource list output into pages. This flag
|
||||
specifies the maximum number of resources per page. The default is
|
||||
determined by the service if it supports paging, otherwise it is
|
||||
unlimited (no paging). Paging may be applied before or after --filter
|
||||
and --limit depending on the service.
|
||||
|
||||
--sort-by=[FIELD,...]
|
||||
Comma-separated list of resource field key names to sort by. The
|
||||
default order is ascending. Prefix a field with ``~'' for descending
|
||||
order on that field. This flag interacts with other flags that are
|
||||
applied in this order: --flatten, --sort-by, --filter, --limit.
|
||||
|
||||
--uri
|
||||
Print a list of resource URIs instead of the default output, and change
|
||||
the command output to a list of URIs. If this flag is used with
|
||||
--format, the formatting is applied on this URI list. To display URIs
|
||||
alongside other keys instead, use the uri() transform.
|
||||
|
||||
GCLOUD WIDE FLAGS
|
||||
These flags are available to all commands: --access-token-file, --account,
|
||||
--billing-project, --configuration, --flags-file, --flatten, --format,
|
||||
--help, --impersonate-service-account, --log-http, --project, --quiet,
|
||||
--trace-token, --user-output-enabled, --verbosity.
|
||||
|
||||
Run $ gcloud help for details.
|
||||
|
||||
NOTES
|
||||
This command is currently in alpha and might change without notice. If this
|
||||
command fails with API permission errors despite specifying the correct
|
||||
project, you might be trying to access an API with an invitation-only early
|
||||
access allowlist. This variant is also available:
|
||||
|
||||
$ gcloud storage buckets notifications list
|
||||
|
||||
|
|
@ -2,26 +2,26 @@ NAME
|
|||
gcloud alpha storage buckets update - update bucket settings
|
||||
|
||||
SYNOPSIS
|
||||
gcloud alpha storage buckets update URL [URL ...] [--clear-cors]
|
||||
[--clear-default-encryption-key] [--clear-lifecycle]
|
||||
[--clear-log-bucket] [--clear-log-object-prefix]
|
||||
[--clear-pap, --clear-public-access-prevention]
|
||||
[--clear-retention-period] [--clear-web-error-page]
|
||||
[--clear-web-main-page-suffix] [--continue-on-error, -c]
|
||||
[--cors-file=CORS_FILE]
|
||||
[--default-encryption-key=DEFAULT_ENCRYPTION_KEY]
|
||||
gcloud alpha storage buckets update URL [URL ...] [--continue-on-error, -c]
|
||||
[--[no-]default-event-based-hold]
|
||||
[--default-storage-class=DEFAULT_STORAGE_CLASS]
|
||||
[--lifecycle-file=LIFECYCLE_FILE] [--[no-]lock-retention-period]
|
||||
[--log-bucket=LOG_BUCKET] [--log-object-prefix=LOG_OBJECT_PREFIX]
|
||||
[--[no-]pap, --[no-]public-access-prevention] [--[no-]requester-pays]
|
||||
[--retention-period=RETENTION_PERIOD]
|
||||
[--[no-]lock-retention-period] [--[no-]requester-pays]
|
||||
[--[no-]uniform-bucket-level-access] [--[no-]versioning]
|
||||
[--web-error-page=WEB_ERROR_PAGE]
|
||||
[--web-main-page-suffix=WEB_MAIN_PAGE_SUFFIX]
|
||||
[--clear-cors | --cors-file=CORS_FILE]
|
||||
[--clear-default-encryption-key
|
||||
| --default-encryption-key=DEFAULT_ENCRYPTION_KEY]
|
||||
[--clear-labels | --labels-file=LABELS_FILE
|
||||
| --remove-labels=[LABEL_KEYS,...]
|
||||
--update-labels=[LABEL_KEYS_AND_VALUES,...]] [GCLOUD_WIDE_FLAG ...]
|
||||
--update-labels=[LABEL_KEYS_AND_VALUES,...]]
|
||||
[--clear-lifecycle | --lifecycle-file=LIFECYCLE_FILE]
|
||||
[--clear-log-bucket | --log-bucket=LOG_BUCKET]
|
||||
[--clear-log-object-prefix | --log-object-prefix=LOG_OBJECT_PREFIX]
|
||||
[--clear-pap, --clear-public-access-prevention
|
||||
| --[no-]pap, --[no-]public-access-prevention]
|
||||
[--clear-retention-period | --retention-period=RETENTION_PERIOD]
|
||||
[--clear-web-error-page | --web-error-page=WEB_ERROR_PAGE]
|
||||
[--clear-web-main-page-suffix
|
||||
| --web-main-page-suffix=WEB_MAIN_PAGE_SUFFIX] [GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
(ALPHA) Update a bucket.
|
||||
|
|
@ -40,63 +40,15 @@ EXAMPLES
|
|||
|
||||
POSITIONAL ARGUMENTS
|
||||
URL [URL ...]
|
||||
The URLs of the buckets to update.
|
||||
URLs of the buckets to update.
|
||||
|
||||
FLAGS
|
||||
--clear-cors
|
||||
Clears the bucket's CORS settings.
|
||||
|
||||
--clear-default-encryption-key
|
||||
Clears the bucket's default encryption key.
|
||||
|
||||
--clear-lifecycle
|
||||
Removes all lifecycle configuration for the bucket.
|
||||
|
||||
--clear-log-bucket
|
||||
Clears logging bucket receiving the usage current bucket's data.
|
||||
|
||||
--clear-log-object-prefix
|
||||
Clears prefix used to determine what usage data to send to logging
|
||||
bucket.
|
||||
|
||||
--clear-pap, --clear-public-access-prevention
|
||||
Unsets the public access prevention setting on a bucket.
|
||||
|
||||
--clear-retention-period
|
||||
Clears the object retention period for a bucket.
|
||||
|
||||
--clear-web-error-page
|
||||
Clear website error page if bucket is hosting website.
|
||||
|
||||
--clear-web-main-page-suffix
|
||||
Clear website main page suffix if bucket is hosting website.
|
||||
|
||||
--continue-on-error, -c
|
||||
If any operations are unsuccessful, the command will exit with a
|
||||
non-zero exit status after completing the remaining operations. This
|
||||
flag takes effect only in sequential execution mode (i.e. processor and
|
||||
thread count are set to 1). Parallelism is default.
|
||||
|
||||
--cors-file=CORS_FILE
|
||||
Sets the Cross-Origin Resource Sharing (CORS) configuration on a
|
||||
bucket. An example CORS JSON document looks like the following:
|
||||
|
||||
[
|
||||
{
|
||||
"origin": ["http://origin1.example.com"],
|
||||
"responseHeader": ["Content-Type"],
|
||||
"method": ["GET"],
|
||||
"maxAgeSeconds": 3600
|
||||
}
|
||||
]
|
||||
|
||||
For more information about supported endpoints for CORS, see [Cloud
|
||||
Storage CORS support]
|
||||
(https://cloud.google.com/storage/docs/cross-origin#server-side-support).
|
||||
|
||||
--default-encryption-key=DEFAULT_ENCRYPTION_KEY
|
||||
Set the default KMS key for the bucket.
|
||||
|
||||
--[no-]default-event-based-hold
|
||||
Sets the default value for an event-based hold on the bucket. By
|
||||
setting the default event-based hold on a bucket, newly-created objects
|
||||
|
|
@ -107,22 +59,6 @@ FLAGS
|
|||
--default-storage-class=DEFAULT_STORAGE_CLASS
|
||||
Sets the default storage class for the bucket.
|
||||
|
||||
--lifecycle-file=LIFECYCLE_FILE
|
||||
Sets the lifecycle management configuration on a bucket. For example,
|
||||
The following lifecycle management configuration JSON document
|
||||
specifies that all objects in this bucket that are more than 365 days
|
||||
old are deleted automatically:
|
||||
|
||||
{
|
||||
"rule":
|
||||
[
|
||||
{
|
||||
"action": {"type": "Delete"},
|
||||
"condition": {"age": 365}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
--[no-]lock-retention-period
|
||||
Locks an unlocked retention policy on the buckets. Caution: A locked
|
||||
retention policy cannot be removed from a bucket or reduced in
|
||||
|
|
@ -130,40 +66,11 @@ FLAGS
|
|||
a retention policy. Use --lock-retention-period to enable and
|
||||
--no-lock-retention-period to disable.
|
||||
|
||||
--log-bucket=LOG_BUCKET
|
||||
Enables usage logging of the bucket, outputting log files to the
|
||||
specified logging_bucket in this flag. Cloud Storage doesn't validate
|
||||
the existence of the bucket receiving logs. In addition to enabling
|
||||
logging on your bucket, you will also need to grant
|
||||
cloud-storage-analytics@google.com write access to the log bucket.
|
||||
|
||||
--log-object-prefix=LOG_OBJECT_PREFIX
|
||||
Specifies the object prefix for logging activity to the log bucket. The
|
||||
default prefix is the bucket name. All read and write activity to
|
||||
objects in the bucket will be logged for objects matching the prefix.
|
||||
|
||||
--[no-]pap, --[no-]public-access-prevention
|
||||
If True, sets public access prevention to "enforced". If False, sets
|
||||
public access prevention to "inherited". For details on how exactly
|
||||
public access is blocked, see:
|
||||
http://cloud/storage/docs/public-access-prevention. Use
|
||||
--public-access-prevention to enable and --no-public-access-prevention
|
||||
to disable.
|
||||
|
||||
--[no-]requester-pays
|
||||
Allows you to configure a Cloud Storage bucket so that the requester
|
||||
pays all costs related to accessing the bucket and its objects. Use
|
||||
--requester-pays to enable and --no-requester-pays to disable.
|
||||
|
||||
--retention-period=RETENTION_PERIOD
|
||||
Minimum retention period
|
||||
(https://cloud.google.com/storage/docs/bucket-lock#retention-periods)
|
||||
for objects stored in the bucket, for example
|
||||
--retention-period=1Y1M1D5S. Objects added to the bucket cannot be
|
||||
deleted until they've been stored for the specified length of time.
|
||||
Default is no retention period. Only available for Cloud Storage using
|
||||
the JSON API.
|
||||
|
||||
--[no-]uniform-bucket-level-access
|
||||
Enables or disables uniform bucket-level access
|
||||
(https://cloud.google.com/storage/docs/bucket-policy-only) for the
|
||||
|
|
@ -174,17 +81,35 @@ FLAGS
|
|||
Allows you to configure a Cloud Storage bucket to keep old versions of
|
||||
objects. Use --versioning to enable and --no-versioning to disable.
|
||||
|
||||
--web-error-page=WEB_ERROR_PAGE
|
||||
Cloud Storage allows you to configure a bucket to behave like a static
|
||||
website. A subsequent GET bucket request through a custom domain for a
|
||||
non-existent object serves the specified error page instead of the
|
||||
standard Cloud Storage error.
|
||||
At most one of these can be specified:
|
||||
|
||||
--web-main-page-suffix=WEB_MAIN_PAGE_SUFFIX
|
||||
Cloud Storage allows you to configure a bucket to behave like a static
|
||||
website. A subsequent GET bucket request through a custom domain serves
|
||||
the specified "main" page instead of performing the usual bucket
|
||||
listing.
|
||||
--clear-cors
|
||||
Clears the bucket's CORS settings.
|
||||
|
||||
--cors-file=CORS_FILE
|
||||
Sets the Cross-Origin Resource Sharing (CORS) configuration on a
|
||||
bucket. An example CORS JSON document looks like the following:
|
||||
|
||||
[
|
||||
{
|
||||
"origin": ["http://origin1.example.com"],
|
||||
"responseHeader": ["Content-Type"],
|
||||
"method": ["GET"],
|
||||
"maxAgeSeconds": 3600
|
||||
}
|
||||
]
|
||||
|
||||
For more information about supported endpoints for CORS, see [Cloud
|
||||
Storage CORS support]
|
||||
(https://cloud.google.com/storage/docs/cross-origin#server-side-support).
|
||||
|
||||
At most one of these can be specified:
|
||||
|
||||
--clear-default-encryption-key
|
||||
Clears the bucket's default encryption key.
|
||||
|
||||
--default-encryption-key=DEFAULT_ENCRYPTION_KEY
|
||||
Set the default KMS key for the bucket.
|
||||
|
||||
At most one of these can be specified:
|
||||
|
||||
|
|
@ -207,6 +132,99 @@ FLAGS
|
|||
Add or update labels. Example:
|
||||
--update-labels=key1=value1,key2=value2
|
||||
|
||||
At most one of these can be specified:
|
||||
|
||||
--clear-lifecycle
|
||||
Removes all lifecycle configuration for the bucket.
|
||||
|
||||
--lifecycle-file=LIFECYCLE_FILE
|
||||
Sets the lifecycle management configuration on a bucket. For example,
|
||||
The following lifecycle management configuration JSON document
|
||||
specifies that all objects in this bucket that are more than 365 days
|
||||
old are deleted automatically:
|
||||
|
||||
{
|
||||
"rule":
|
||||
[
|
||||
{
|
||||
"action": {"type": "Delete"},
|
||||
"condition": {"age": 365}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
At most one of these can be specified:
|
||||
|
||||
--clear-log-bucket
|
||||
Clears logging bucket receiving the usage current bucket's data.
|
||||
|
||||
--log-bucket=LOG_BUCKET
|
||||
Enables usage logging of the bucket, outputting log files to the
|
||||
specified logging_bucket in this flag. Cloud Storage doesn't validate
|
||||
the existence of the bucket receiving logs. In addition to enabling
|
||||
logging on your bucket, you will also need to grant
|
||||
cloud-storage-analytics@google.com write access to the log bucket.
|
||||
|
||||
At most one of these can be specified:
|
||||
|
||||
--clear-log-object-prefix
|
||||
Clears prefix used to determine what usage data to send to logging
|
||||
bucket.
|
||||
|
||||
--log-object-prefix=LOG_OBJECT_PREFIX
|
||||
Specifies the object prefix for logging activity to the log bucket.
|
||||
The default prefix is the bucket name. All read and write activity to
|
||||
objects in the bucket will be logged for objects matching the prefix.
|
||||
|
||||
At most one of these can be specified:
|
||||
|
||||
--clear-pap, --clear-public-access-prevention
|
||||
Unsets the public access prevention setting on a bucket.
|
||||
|
||||
--[no-]pap, --[no-]public-access-prevention
|
||||
If True, sets public access prevention to "enforced". If False, sets
|
||||
public access prevention to "inherited". For details on how exactly
|
||||
public access is blocked, see:
|
||||
http://cloud/storage/docs/public-access-prevention. Use
|
||||
--public-access-prevention to enable and
|
||||
--no-public-access-prevention to disable.
|
||||
|
||||
At most one of these can be specified:
|
||||
|
||||
--clear-retention-period
|
||||
Clears the object retention period for a bucket.
|
||||
|
||||
--retention-period=RETENTION_PERIOD
|
||||
Minimum retention period
|
||||
(https://cloud.google.com/storage/docs/bucket-lock#retention-periods)
|
||||
for objects stored in the bucket, for example
|
||||
--retention-period=1Y1M1D5S. Objects added to the bucket cannot be
|
||||
deleted until they've been stored for the specified length of time.
|
||||
Default is no retention period. Only available for Cloud Storage
|
||||
using the JSON API.
|
||||
|
||||
At most one of these can be specified:
|
||||
|
||||
--clear-web-error-page
|
||||
Clear website error page if bucket is hosting website.
|
||||
|
||||
--web-error-page=WEB_ERROR_PAGE
|
||||
Cloud Storage allows you to configure a bucket to behave like a
|
||||
static website. A subsequent GET bucket request through a custom
|
||||
domain for a non-existent object serves the specified error page
|
||||
instead of the standard Cloud Storage error.
|
||||
|
||||
At most one of these can be specified:
|
||||
|
||||
--clear-web-main-page-suffix
|
||||
Clear website main page suffix if bucket is hosting website.
|
||||
|
||||
--web-main-page-suffix=WEB_MAIN_PAGE_SUFFIX
|
||||
Cloud Storage allows you to configure a bucket to behave like a
|
||||
static website. A subsequent GET bucket request through a custom
|
||||
domain serves the specified "main" page instead of performing the
|
||||
usual bucket listing.
|
||||
|
||||
GCLOUD WIDE FLAGS
|
||||
These flags are available to all commands: --access-token-file, --account,
|
||||
--billing-project, --configuration, --flags-file, --flatten, --format,
|
||||
|
|
@ -219,5 +237,7 @@ NOTES
|
|||
This command is currently in alpha and might change without notice. If this
|
||||
command fails with API permission errors despite specifying the correct
|
||||
project, you might be trying to access an API with an invitation-only early
|
||||
access allowlist.
|
||||
access allowlist. This variant is also available:
|
||||
|
||||
$ gcloud storage buckets update
|
||||
|
||||
|
|
|
|||
|
|
@ -74,5 +74,7 @@ NOTES
|
|||
This command is currently in alpha and might change without notice. If this
|
||||
command fails with API permission errors despite specifying the correct
|
||||
project, you might be trying to access an API with an invitation-only early
|
||||
access allowlist.
|
||||
access allowlist. This variant is also available:
|
||||
|
||||
$ gcloud storage cat
|
||||
|
||||
|
|
|
|||
|
|
@ -164,9 +164,7 @@ FLAGS
|
|||
path expression.
|
||||
|
||||
--skip-unsupported, -U
|
||||
Skip objects with unsupported object types.Currently, the only
|
||||
unsupported category is Amazon S3 objects with the GLACIER storage
|
||||
class.
|
||||
Skip objects with unsupported object types.
|
||||
|
||||
--storage-class=STORAGE_CLASS, -s STORAGE_CLASS
|
||||
Specify the storage class of the destination object. If not specified,
|
||||
|
|
@ -329,5 +327,7 @@ NOTES
|
|||
This command is currently in alpha and might change without notice. If this
|
||||
command fails with API permission errors despite specifying the correct
|
||||
project, you might be trying to access an API with an invitation-only early
|
||||
access allowlist.
|
||||
access allowlist. This variant is also available:
|
||||
|
||||
$ gcloud storage cp
|
||||
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ SYNOPSIS
|
|||
gcloud alpha storage GROUP | COMMAND [GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
(ALPHA) The gcloud alpha storage command group lets you create and manage
|
||||
Cloud Storage resources such as buckets and objects.
|
||||
(ALPHA) The gcloud storage command group lets you create and manage Cloud
|
||||
Storage resources such as buckets and objects.
|
||||
|
||||
More information on Cloud Storage can be found here:
|
||||
https://cloud.google.com/storage, and detailed documentation can be found
|
||||
|
|
@ -52,5 +52,7 @@ NOTES
|
|||
This command is currently in alpha and might change without notice. If this
|
||||
command fails with API permission errors despite specifying the correct
|
||||
project, you might be trying to access an API with an invitation-only early
|
||||
access allowlist.
|
||||
access allowlist. This variant is also available:
|
||||
|
||||
$ gcloud storage
|
||||
|
||||
|
|
|
|||
|
|
@ -112,8 +112,7 @@ FLAGS
|
|||
List all available metadata about items as a JSON dump.
|
||||
|
||||
--long, -l
|
||||
For objects only. List size in bytes, creation time, and URL. Note:
|
||||
Creation time not available for S3.
|
||||
For objects only. List size in bytes, creation time, and URL.
|
||||
|
||||
ENCRYPTION FLAGS
|
||||
--decryption-keys=[DECRYPTION_KEY,...]
|
||||
|
|
@ -135,5 +134,7 @@ NOTES
|
|||
This command is currently in alpha and might change without notice. If this
|
||||
command fails with API permission errors despite specifying the correct
|
||||
project, you might be trying to access an API with an invitation-only early
|
||||
access allowlist.
|
||||
access allowlist. This variant is also available:
|
||||
|
||||
$ gcloud storage ls
|
||||
|
||||
|
|
|
|||
|
|
@ -171,9 +171,7 @@ FLAGS
|
|||
flag.
|
||||
|
||||
--skip-unsupported, -U
|
||||
Skip objects with unsupported object types.Currently, the only
|
||||
unsupported category is Amazon S3 objects with the GLACIER storage
|
||||
class.
|
||||
Skip objects with unsupported object types.
|
||||
|
||||
--storage-class=STORAGE_CLASS, -s STORAGE_CLASS
|
||||
Specify the storage class of the destination object. If not specified,
|
||||
|
|
@ -336,5 +334,7 @@ NOTES
|
|||
This command is currently in alpha and might change without notice. If this
|
||||
command fails with API permission errors despite specifying the correct
|
||||
project, you might be trying to access an API with an invitation-only early
|
||||
access allowlist.
|
||||
access allowlist. This variant is also available:
|
||||
|
||||
$ gcloud storage mv
|
||||
|
||||
|
|
|
|||
|
|
@ -52,5 +52,7 @@ NOTES
|
|||
This command is currently in alpha and might change without notice. If this
|
||||
command fails with API permission errors despite specifying the correct
|
||||
project, you might be trying to access an API with an invitation-only early
|
||||
access allowlist.
|
||||
access allowlist. This variant is also available:
|
||||
|
||||
$ gcloud storage objects compose
|
||||
|
||||
|
|
|
|||
|
|
@ -43,5 +43,7 @@ NOTES
|
|||
This command is currently in alpha and might change without notice. If this
|
||||
command fails with API permission errors despite specifying the correct
|
||||
project, you might be trying to access an API with an invitation-only early
|
||||
access allowlist.
|
||||
access allowlist. This variant is also available:
|
||||
|
||||
$ gcloud storage objects describe
|
||||
|
||||
|
|
|
|||
|
|
@ -31,5 +31,7 @@ NOTES
|
|||
This command is currently in alpha and might change without notice. If this
|
||||
command fails with API permission errors despite specifying the correct
|
||||
project, you might be trying to access an API with an invitation-only early
|
||||
access allowlist.
|
||||
access allowlist. This variant is also available:
|
||||
|
||||
$ gcloud storage objects
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ NAME
|
|||
gcloud alpha storage objects list - lists Cloud Storage objects
|
||||
|
||||
SYNOPSIS
|
||||
gcloud alpha storage objects list URLS [URLS ...]
|
||||
gcloud alpha storage objects list URLS [URLS ...] [--stat]
|
||||
[--decryption-keys=[DECRYPTION_KEY,...]] [--filter=EXPRESSION]
|
||||
[--limit=LIMIT] [--page-size=PAGE_SIZE] [--sort-by=[FIELD,...]] [--uri]
|
||||
[GCLOUD_WIDE_FLAG ...]
|
||||
|
|
@ -32,6 +32,11 @@ POSITIONAL ARGUMENTS
|
|||
URLS [URLS ...]
|
||||
Specifies URL of objects to list.
|
||||
|
||||
FLAGS
|
||||
--stat
|
||||
Emulates gsutil stat-style behavior. Does not show past object versions
|
||||
and changes output format.
|
||||
|
||||
ENCRYPTION FLAGS
|
||||
--decryption-keys=[DECRYPTION_KEY,...]
|
||||
A comma-separated list of customer-supplied encryption keys (RFC 4648
|
||||
|
|
@ -84,5 +89,7 @@ NOTES
|
|||
This command is currently in alpha and might change without notice. If this
|
||||
command fails with API permission errors despite specifying the correct
|
||||
project, you might be trying to access an API with an invitation-only early
|
||||
access allowlist.
|
||||
access allowlist. This variant is also available:
|
||||
|
||||
$ gcloud storage objects list
|
||||
|
||||
|
|
|
|||
|
|
@ -29,19 +29,19 @@ DESCRIPTION
|
|||
EXAMPLES
|
||||
Update a Google Cloud Storage object's custom-metadata:
|
||||
|
||||
$ *gcloud alpha storage objects update* gs://bucket/my-object \
|
||||
$ gcloud alpha storage objects update gs://bucket/my-object \
|
||||
--custom-metadata=key1=value1,key2=value2
|
||||
|
||||
Set a temporary hold on JPG images:
|
||||
Rewrite all JPEG images to the NEARLINE storage class:
|
||||
|
||||
$ *gcloud alpha storage objects update* gs://bucket/*.jpg \
|
||||
--temporary-hold
|
||||
$ gcloud alpha storage objects update gs://bucket/*.jpg \
|
||||
--storage-class=NEARLINE
|
||||
|
||||
You can also provide a precondition on an object's metageneration in
|
||||
order to avoid potential race conditions:
|
||||
|
||||
$ *gcloud alpha storage objects update* gs://bucket/*.jpg \
|
||||
--temporary-hold --if-metageneration-match=123456789
|
||||
$ gcloud alpha storage objects update gs://bucket/*.jpg \
|
||||
--storage-class=NEARLINE --if-metageneration-match=123456789
|
||||
|
||||
POSITIONAL ARGUMENTS
|
||||
[URL ...]
|
||||
|
|
@ -201,5 +201,7 @@ NOTES
|
|||
This command is currently in alpha and might change without notice. If this
|
||||
command fails with API permission errors despite specifying the correct
|
||||
project, you might be trying to access an API with an invitation-only early
|
||||
access allowlist.
|
||||
access allowlist. This variant is also available:
|
||||
|
||||
$ gcloud storage objects update
|
||||
|
||||
|
|
|
|||
|
|
@ -93,5 +93,7 @@ NOTES
|
|||
This command is currently in alpha and might change without notice. If this
|
||||
command fails with API permission errors despite specifying the correct
|
||||
project, you might be trying to access an API with an invitation-only early
|
||||
access allowlist.
|
||||
access allowlist. This variant is also available:
|
||||
|
||||
$ gcloud storage rm
|
||||
|
||||
|
|
|
|||
|
|
@ -46,5 +46,7 @@ NOTES
|
|||
This command is currently in alpha and might change without notice. If this
|
||||
command fails with API permission errors despite specifying the correct
|
||||
project, you might be trying to access an API with an invitation-only early
|
||||
access allowlist.
|
||||
access allowlist. This variant is also available:
|
||||
|
||||
$ gcloud storage service-agent
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue