mirror of
https://github.com/imjasonh/gcloud-help
synced 2026-07-20 21:20:07 +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
84
gcloud/storage/buckets/create
Normal file
84
gcloud/storage/buckets/create
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
NAME
|
||||
gcloud storage buckets create - create buckets for storing objects
|
||||
|
||||
SYNOPSIS
|
||||
gcloud storage buckets create URL
|
||||
[--default-encryption-key=DEFAULT_ENCRYPTION_KEY,
|
||||
-k DEFAULT_ENCRYPTION_KEY]
|
||||
[--default-storage-class=DEFAULT_STORAGE_CLASS,
|
||||
-c DEFAULT_STORAGE_CLASS, -s DEFAULT_STORAGE_CLASS]
|
||||
[--location=LOCATION, -l LOCATION]
|
||||
[--[no-]pap, --[no-]public-access-prevention]
|
||||
[--retention-period=RETENTION_PERIOD]
|
||||
[--[no-]uniform-bucket-level-access, -b] [GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
Create a new bucket.
|
||||
|
||||
EXAMPLES
|
||||
The following command creates a Cloud Storage bucket named my-bucket:
|
||||
|
||||
$ gcloud storage buckets create gs://my-bucket
|
||||
|
||||
The following command creates a bucket with the nearline default storage
|
||||
class (https://cloud.google.com/storage/docs/storage-classes) in the asia
|
||||
location (https://cloud.google.com/storage/docs/locations):
|
||||
|
||||
$ gcloud storage buckets create gs://my-bucket \
|
||||
--default-storage-class=nearline --location=asia
|
||||
|
||||
POSITIONAL ARGUMENTS
|
||||
URL
|
||||
The URL of the bucket to create.
|
||||
|
||||
FLAGS
|
||||
--default-encryption-key=DEFAULT_ENCRYPTION_KEY, -k DEFAULT_ENCRYPTION_KEY
|
||||
Set the default KMS key using the full path to the key, which has the
|
||||
following form:
|
||||
projects/[project-id]/locations/[location]/keyRings/[key-ring]/cryptoKeys/[my-key].
|
||||
|
||||
--default-storage-class=DEFAULT_STORAGE_CLASS, -c DEFAULT_STORAGE_CLASS, -s DEFAULT_STORAGE_CLASS
|
||||
Default storage class
|
||||
(https://cloud.google.com/storage/docs/storage-classes) for the bucket.
|
||||
If not specified, the default storage class used by Cloud Storage is
|
||||
"Standard".
|
||||
|
||||
--location=LOCATION, -l LOCATION
|
||||
Location (https://cloud.google.com/storage/docs/locations) for the
|
||||
bucket. If not specified, the location used by Cloud Storage is us. A
|
||||
bucket's location cannot be changed after creation.
|
||||
|
||||
--[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. Use
|
||||
--public-access-prevention to enable and --no-public-access-prevention
|
||||
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, -b
|
||||
Turns on uniform bucket-level access setting. Default is False. Use
|
||||
--uniform-bucket-level-access to enable and
|
||||
--no-uniform-bucket-level-access to disable.
|
||||
|
||||
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 variant is also available:
|
||||
|
||||
$ gcloud alpha storage buckets create
|
||||
|
||||
43
gcloud/storage/buckets/delete
Normal file
43
gcloud/storage/buckets/delete
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
NAME
|
||||
gcloud storage buckets delete - deletes Cloud Storage buckets
|
||||
|
||||
SYNOPSIS
|
||||
gcloud storage buckets delete URLS [URLS ...] [--continue-on-error, -c]
|
||||
[GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
Deletes one or more Cloud Storage buckets.
|
||||
|
||||
EXAMPLES
|
||||
Delete a Google Cloud Storage bucket named "my-bucket":
|
||||
|
||||
$ gcloud storage buckets delete gs://my-bucket
|
||||
|
||||
Delete two buckets:
|
||||
|
||||
$ gcloud storage buckets delete gs://my-bucket gs://my-other-bucket
|
||||
|
||||
POSITIONAL ARGUMENTS
|
||||
URLS [URLS ...]
|
||||
Specifies the URLs of the buckets to delete.
|
||||
|
||||
FLAGS
|
||||
--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.
|
||||
|
||||
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 variant is also available:
|
||||
|
||||
$ gcloud alpha storage buckets delete
|
||||
|
||||
36
gcloud/storage/buckets/describe
Normal file
36
gcloud/storage/buckets/describe
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
NAME
|
||||
gcloud storage buckets describe - describes Cloud Storage buckets
|
||||
|
||||
SYNOPSIS
|
||||
gcloud storage buckets describe URL [GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
Describe a Cloud Storage bucket.
|
||||
|
||||
EXAMPLES
|
||||
Describe a Google Cloud Storage bucket named "my-bucket":
|
||||
|
||||
$ gcloud storage buckets describe gs://my-bucket
|
||||
|
||||
Describe bucket with JSON formatting, only returning the "name" key:
|
||||
|
||||
$ gcloud storage buckets describe gs://my-bucket \
|
||||
--format="json(name)"
|
||||
|
||||
POSITIONAL ARGUMENTS
|
||||
URL
|
||||
Specifies URL of bucket to describe.
|
||||
|
||||
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 variant is also available:
|
||||
|
||||
$ gcloud alpha storage buckets describe
|
||||
|
||||
43
gcloud/storage/buckets/help
Normal file
43
gcloud/storage/buckets/help
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
NAME
|
||||
gcloud storage buckets - manage Cloud Storage buckets
|
||||
|
||||
SYNOPSIS
|
||||
gcloud storage buckets GROUP | COMMAND [GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
Manage Cloud Storage buckets.
|
||||
|
||||
GCLOUD WIDE FLAGS
|
||||
These flags are available to all commands: --help.
|
||||
|
||||
Run $ gcloud help for details.
|
||||
|
||||
GROUPS
|
||||
GROUP is one of the following:
|
||||
|
||||
notifications
|
||||
Manage Cloud Storage bucket notifications.
|
||||
|
||||
COMMANDS
|
||||
COMMAND is one of the following:
|
||||
|
||||
create
|
||||
Create buckets for storing objects.
|
||||
|
||||
delete
|
||||
Deletes Cloud Storage buckets.
|
||||
|
||||
describe
|
||||
Describes Cloud Storage buckets.
|
||||
|
||||
list
|
||||
Lists Cloud Storage buckets.
|
||||
|
||||
update
|
||||
Update bucket settings.
|
||||
|
||||
NOTES
|
||||
This variant is also available:
|
||||
|
||||
$ gcloud alpha storage buckets
|
||||
|
||||
73
gcloud/storage/buckets/list
Normal file
73
gcloud/storage/buckets/list
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
NAME
|
||||
gcloud storage buckets list - lists Cloud Storage buckets
|
||||
|
||||
SYNOPSIS
|
||||
gcloud storage buckets list [URLS ...] [--filter=EXPRESSION]
|
||||
[--limit=LIMIT] [--page-size=PAGE_SIZE] [--sort-by=[FIELD,...]] [--uri]
|
||||
[GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
List Cloud Storage buckets.
|
||||
|
||||
EXAMPLES
|
||||
List all Google Cloud Storage buckets in default project:
|
||||
|
||||
$ gcloud storage buckets list
|
||||
|
||||
List buckets beginning with "b":
|
||||
|
||||
$ gcloud storage buckets list gs://b*
|
||||
|
||||
List buckets with JSON formatting, only returning the "name" key:
|
||||
|
||||
$ gcloud storage buckets list --format="json(name)"
|
||||
|
||||
POSITIONAL ARGUMENTS
|
||||
[URLS ...]
|
||||
Specifies URL of buckets to List.
|
||||
|
||||
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 variant is also available:
|
||||
|
||||
$ gcloud alpha storage buckets list
|
||||
|
||||
137
gcloud/storage/buckets/notifications/create
Normal file
137
gcloud/storage/buckets/notifications/create
Normal file
|
|
@ -0,0 +1,137 @@
|
|||
NAME
|
||||
gcloud storage buckets notifications create - create a notification
|
||||
configuration on a bucket
|
||||
|
||||
SYNOPSIS
|
||||
gcloud 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
|
||||
gcloud 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 storage buckets notifications create gs://example-bucket
|
||||
|
||||
The same as the above but sends no notification payload:
|
||||
|
||||
$ gcloud storage buckets notifications create \
|
||||
--payload-format=none gs://example-bucket
|
||||
|
||||
Include custom metadata in notification payloads:
|
||||
|
||||
$ gcloud 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 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 storage buckets notifications create \
|
||||
--object-prefix=photos/ gs://example-bucket
|
||||
|
||||
Specifies the destination topic ID files-to-process in the default project:
|
||||
|
||||
$ gcloud 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 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 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 variant is also available:
|
||||
|
||||
$ gcloud alpha storage buckets notifications create
|
||||
|
||||
47
gcloud/storage/buckets/notifications/delete
Normal file
47
gcloud/storage/buckets/notifications/delete
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
NAME
|
||||
gcloud storage buckets notifications delete - delete notification
|
||||
configurations from a bucket
|
||||
|
||||
SYNOPSIS
|
||||
gcloud storage buckets notifications delete URLS [URLS ...]
|
||||
[GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
gcloud 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 storage buckets notifications delete \
|
||||
b/example-bucket/notificationConfigs/3
|
||||
|
||||
Delete all notification configurations in the bucket example-bucket:
|
||||
|
||||
$ gcloud 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 variant is also available:
|
||||
|
||||
$ gcloud alpha storage buckets notifications delete
|
||||
|
||||
35
gcloud/storage/buckets/notifications/describe
Normal file
35
gcloud/storage/buckets/notifications/describe
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
NAME
|
||||
gcloud storage buckets notifications describe - show metadata for a
|
||||
notification configuration
|
||||
|
||||
SYNOPSIS
|
||||
gcloud storage buckets notifications describe URL [GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
gcloud 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 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 variant is also available:
|
||||
|
||||
$ gcloud alpha storage buckets notifications describe
|
||||
|
||||
35
gcloud/storage/buckets/notifications/help
Normal file
35
gcloud/storage/buckets/notifications/help
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
NAME
|
||||
gcloud storage buckets notifications - manage Cloud Storage bucket
|
||||
notifications
|
||||
|
||||
SYNOPSIS
|
||||
gcloud storage buckets notifications COMMAND [GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
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
|
||||
Create a notification configuration on a bucket.
|
||||
|
||||
delete
|
||||
Delete notification configurations from a bucket.
|
||||
|
||||
describe
|
||||
Show metadata for a notification configuration.
|
||||
|
||||
list
|
||||
List the notification configurations belonging to a given bucket.
|
||||
|
||||
NOTES
|
||||
This variant is also available:
|
||||
|
||||
$ gcloud alpha storage buckets notifications
|
||||
|
||||
78
gcloud/storage/buckets/notifications/list
Normal file
78
gcloud/storage/buckets/notifications/list
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
NAME
|
||||
gcloud storage buckets notifications list - list the notification
|
||||
configurations belonging to a given bucket
|
||||
|
||||
SYNOPSIS
|
||||
gcloud storage buckets notifications list [URLS ...] [--filter=EXPRESSION]
|
||||
[--limit=LIMIT] [--page-size=PAGE_SIZE] [--sort-by=[FIELD,...]] [--uri]
|
||||
[GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
gcloud 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 storage buckets notifications list gs://example-bucket
|
||||
|
||||
Fetch the notification configs in all buckets matching a wildcard:
|
||||
|
||||
$ gcloud storage buckets notifications list gs://example-*
|
||||
|
||||
Fetch all of the notification configs for buckets in the default project:
|
||||
|
||||
$ gcloud 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 variant is also available:
|
||||
|
||||
$ gcloud alpha storage buckets notifications list
|
||||
|
||||
197
gcloud/storage/buckets/update
Normal file
197
gcloud/storage/buckets/update
Normal file
|
|
@ -0,0 +1,197 @@
|
|||
NAME
|
||||
gcloud storage buckets update - update bucket settings
|
||||
|
||||
SYNOPSIS
|
||||
gcloud storage buckets update URL [URL ...] [--continue-on-error, -c]
|
||||
[--default-storage-class=DEFAULT_STORAGE_CLASS] [--[no-]requester-pays]
|
||||
[--[no-]versioning] [--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,...]]
|
||||
[--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-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
|
||||
Update a bucket.
|
||||
|
||||
EXAMPLES
|
||||
The following command updates the default storage class of a Cloud Storage
|
||||
bucket named "my-bucket" to NEARLINE and sets requester pays to true:
|
||||
|
||||
$ gcloud storage buckets update gs://my-bucket \
|
||||
--default-storage-class=NEARLINE --requester-pays
|
||||
|
||||
POSITIONAL ARGUMENTS
|
||||
URL [URL ...]
|
||||
URLs of the buckets to update.
|
||||
|
||||
FLAGS
|
||||
--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.
|
||||
|
||||
--default-storage-class=DEFAULT_STORAGE_CLASS
|
||||
Sets the default storage class for the bucket.
|
||||
|
||||
--[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.
|
||||
|
||||
--[no-]versioning
|
||||
Allows you to configure a Cloud Storage bucket to keep old versions of
|
||||
objects. Use --versioning to enable and --no-versioning to disable.
|
||||
|
||||
At most one of these can be specified:
|
||||
|
||||
--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:
|
||||
|
||||
--clear-labels
|
||||
Clear all labels associated with a bucket.
|
||||
|
||||
--labels-file=LABELS_FILE
|
||||
Sets the label configuration for the bucket. An example label JSON
|
||||
document looks like the following:
|
||||
|
||||
{
|
||||
"your_label_key": "your_label_value",
|
||||
"your_other_label_key": "your_other_label_value"
|
||||
}
|
||||
|
||||
--remove-labels=[LABEL_KEYS,...]
|
||||
Remove labels by their key names.
|
||||
|
||||
--update-labels=[LABEL_KEYS_AND_VALUES,...]
|
||||
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-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,
|
||||
--help, --impersonate-service-account, --log-http, --project, --quiet,
|
||||
--trace-token, --user-output-enabled, --verbosity.
|
||||
|
||||
Run $ gcloud help for details.
|
||||
|
||||
NOTES
|
||||
This variant is also available:
|
||||
|
||||
$ gcloud alpha storage buckets update
|
||||
|
||||
76
gcloud/storage/cat
Normal file
76
gcloud/storage/cat
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
NAME
|
||||
gcloud storage cat - outputs the contents of one or more URLs to stdout
|
||||
|
||||
SYNOPSIS
|
||||
gcloud storage cat URL [URL ...] [--display-url, -d]
|
||||
[--range=RANGE, -r RANGE] [--decryption-keys=[DECRYPTION_KEY,...]]
|
||||
[GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
The cat command outputs the contents of one or more URLs to stdout. While
|
||||
the cat command does not compute a checksum, it is otherwise equivalent to
|
||||
doing:
|
||||
|
||||
$ gcloud storage cp url... -
|
||||
|
||||
(The final '-' causes gcloud to stream the output to stdout.)
|
||||
|
||||
EXAMPLES
|
||||
The following command writes all text files in a bucket to stdout:
|
||||
|
||||
$ gcloud storage cat gs://bucket/*.txt
|
||||
|
||||
The following command outputs a short header describing file.txt, along
|
||||
with its contents:
|
||||
|
||||
$ gcloud storage cat -d gs://my-bucket/file.txt
|
||||
|
||||
The following command outputs bytes 256-939 of file.txt:
|
||||
|
||||
$ gcloud storage cat -r 256-939 gs://my-bucket/file.txt
|
||||
|
||||
The following command outputs the last 5 bytes of file.txt:
|
||||
|
||||
$ gcloud storage cat -r -5 gs://my-bucket/file.txt
|
||||
|
||||
POSITIONAL ARGUMENTS
|
||||
URL [URL ...]
|
||||
The url of objects to list.
|
||||
|
||||
FLAGS
|
||||
--display-url, -d
|
||||
Prints the header before each object.
|
||||
|
||||
--range=RANGE, -r RANGE
|
||||
Causes gcloud storage to output just the specified byte range of the
|
||||
object. In a case where "start" = 'x', and "end" = 'y', ranges take the
|
||||
form: x-y (e.g., -r 256-5939), x- (e.g., -r 256-), -y (e.g., -r -5)
|
||||
|
||||
When offsets start at 0, x-y means to return bytes x through y
|
||||
(inclusive), x- means to return bytes x through the end of the object,
|
||||
and -y changes the role of y. If -y is present, then it returns the
|
||||
last y bytes of the object.
|
||||
|
||||
If the bytes are out of range of the object, then nothing is printed
|
||||
|
||||
ENCRYPTION FLAGS
|
||||
--decryption-keys=[DECRYPTION_KEY,...]
|
||||
A comma-separated list of customer-supplied encryption keys (RFC 4648
|
||||
section 4 base64-encoded AES256 strings) that will be used to decrypt
|
||||
Google Cloud Storage objects. Data encrypted with a customer-managed
|
||||
encryption key (CMEK) is decrypted automatically, so CMEKs do not need
|
||||
to be listed here.
|
||||
|
||||
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 variant is also available:
|
||||
|
||||
$ gcloud alpha storage cat
|
||||
|
||||
330
gcloud/storage/cp
Normal file
330
gcloud/storage/cp
Normal file
|
|
@ -0,0 +1,330 @@
|
|||
NAME
|
||||
gcloud storage cp - upload, download, and copy Cloud Storage objects
|
||||
|
||||
SYNOPSIS
|
||||
gcloud storage cp [SOURCE ...] DESTINATION [--all-versions, -A]
|
||||
[--no-clobber, -n] [--continue-on-error, -c] [--daisy-chain, -D]
|
||||
[--do-not-decompress] [--ignore-symlinks]
|
||||
[--manifest-path=MANIFEST_PATH, -L MANIFEST_PATH]
|
||||
[--preserve-posix, -P] [--print-created-message, -v]
|
||||
[--read-paths-from-stdin, -I] [--recursive, -R, -r]
|
||||
[--skip-unsupported, -U]
|
||||
[--storage-class=STORAGE_CLASS, -s STORAGE_CLASS]
|
||||
[--canned-acl=PREDEFINED_ACL,
|
||||
--predefined-acl=PREDEFINED_ACL, -a PREDEFINED_ACL
|
||||
| --preserve-acl, -p]
|
||||
[--gzip-in-flight=[FILE_EXTENSIONS,...], -j [FILE_EXTENSIONS,...]
|
||||
| --gzip-in-flight-all, -J
|
||||
| --gzip-local=[FILE_EXTENSIONS,...], -z [FILE_EXTENSIONS,...]
|
||||
| --gzip-local-all, -Z]
|
||||
[--decryption-keys=[DECRYPTION_KEY,...]
|
||||
--encryption-key=ENCRYPTION_KEY]
|
||||
[--cache-control=CACHE_CONTROL
|
||||
--content-disposition=CONTENT_DISPOSITION
|
||||
--content-encoding=CONTENT_ENCODING
|
||||
--content-language=CONTENT_LANGUAGE --content-md5=MD5_DIGEST
|
||||
--content-type=CONTENT_TYPE
|
||||
--custom-time=CUSTOM_TIME --clear-custom-metadata
|
||||
| --custom-metadata=[CUSTOM_METADATA_KEYS_AND_VALUES,...]
|
||||
| --remove-custom-metadata=[METADATA_KEYS,...]
|
||||
--update-custom-metadata=[CUSTOM_METADATA_KEYS_AND_VALUES,...]]
|
||||
[--if-generation-match=GENERATION
|
||||
--if-metageneration-match=METAGENERATION] [GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
Copy data between your local file system and the cloud, within the cloud,
|
||||
and between cloud storage providers.
|
||||
|
||||
EXAMPLES
|
||||
The following command uploads all text files from the local directory to a
|
||||
bucket:
|
||||
|
||||
$ gcloud storage cp *.txt gs://my-bucket
|
||||
|
||||
The following command downloads all text files from a bucket to your
|
||||
current directory:
|
||||
|
||||
$ gcloud storage cp gs://my-bucket/*.txt .
|
||||
|
||||
The following command transfers all text files from a bucket to a different
|
||||
cloud storage provider:
|
||||
|
||||
$ gcloud storage cp gs://my-bucket/*.txt s3://my-bucket
|
||||
|
||||
Use the --recursive option to copy an entire directory tree. The following
|
||||
command uploads the directory tree dir:
|
||||
|
||||
$ gcloud storage cp --recursive dir gs://my-bucket
|
||||
|
||||
Recursive listings are similar to adding ** to a query, except ** matches
|
||||
only cloud objects and will not match prefixes. For example, the following
|
||||
would not match gs://my-bucket/dir/log.txt
|
||||
|
||||
$ gcloud storage cp gs://my-bucket/**/dir dir
|
||||
|
||||
** retrieves a flat list of objects in a single API call. However, **
|
||||
matches folders for non-cloud queries. For example, a folder dir would be
|
||||
copied in the following.
|
||||
|
||||
$ gcloud storage cp ~/Downloads/**/dir gs://my-bucket
|
||||
|
||||
POSITIONAL ARGUMENTS
|
||||
[SOURCE ...]
|
||||
The source path(s) to copy.
|
||||
|
||||
DESTINATION
|
||||
The destination path.
|
||||
|
||||
FLAGS
|
||||
--all-versions, -A
|
||||
Copy all source versions from a source bucket or folder. If not set,
|
||||
only the live version of each source object is copied.
|
||||
|
||||
Note: This option is only useful when the destination bucket has Object
|
||||
Versioning enabled. Additionally, the generation numbers of copied
|
||||
versions do not necessarily match the order of the original generation
|
||||
numbers.
|
||||
|
||||
--no-clobber, -n
|
||||
Do not overwrite existing files or objects at the destination. Skipped
|
||||
items will be printed. This option performs an additional GET request
|
||||
for cloud objects before attempting an upload.
|
||||
|
||||
--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.
|
||||
|
||||
--daisy-chain, -D
|
||||
Copy in "daisy chain" mode, which means copying an object by first
|
||||
downloading it to the machine where the command is run, then uploading
|
||||
it to the destination bucket. The default mode is a "copy in the
|
||||
cloud," where data is copied without uploading or downloading. During a
|
||||
copy in the cloud, a source composite object remains composite at its
|
||||
destination. However, you can use daisy chain mode to change a
|
||||
composite object into a non-composite object. Note: Daisy chain mode is
|
||||
automatically used when copying between providers.
|
||||
|
||||
--do-not-decompress
|
||||
Do not automatically decompress downloaded gzip files.
|
||||
|
||||
--ignore-symlinks
|
||||
Ignore file symlinks instead of copying what they point to. Symlinks
|
||||
pointing to directories will always be ignored.
|
||||
|
||||
--manifest-path=MANIFEST_PATH, -L MANIFEST_PATH
|
||||
Outputs a manifest log file with detailed information about each item
|
||||
that was copied. This manifest contains the following information for
|
||||
each item:
|
||||
|
||||
◆ Source path.
|
||||
◆ Destination path.
|
||||
◆ Source size.
|
||||
◆ Bytes transferred.
|
||||
◆ MD5 hash.
|
||||
◆ Transfer start time and date in UTC and ISO 8601 format.
|
||||
◆ Transfer completion time and date in UTC and ISO 8601 format.
|
||||
◆ Final result of the attempted transfer: OK, error, or skipped.
|
||||
◆ Details, if any.
|
||||
|
||||
If the manifest file already exists, gcloud storage appends log items
|
||||
to the existing file.
|
||||
|
||||
Objects that are marked as "OK" or "skipped" in the existing manifest
|
||||
file are not retried by future commands. Objects marked as "error" are
|
||||
retried.
|
||||
|
||||
--preserve-posix, -P
|
||||
Causes POSIX attributes to be preserved when objects are copied. With
|
||||
this feature enabled, gcloud storage will copy several fields provided
|
||||
by the stat command: access time, modification time, owner UID, owner
|
||||
group GID, and the mode (permissions) of the file.
|
||||
|
||||
For uploads, these attributes are read off of local files and stored in
|
||||
the cloud as custom metadata. For downloads, custom cloud metadata is
|
||||
set as POSIX attributes on files after they are downloaded.
|
||||
|
||||
On Windows, this flag will only set and restore access time and
|
||||
modification time because Windows doesn't have a notion of POSIX UID,
|
||||
GID, and mode.
|
||||
|
||||
--print-created-message, -v
|
||||
Prints the version-specific URL for each copied object.
|
||||
|
||||
--read-paths-from-stdin, -I
|
||||
Read the list of resources to copy from stdin. No need to enter a
|
||||
source argument if this flag is present. Example: "storage cp -I
|
||||
gs://bucket/destination" Note: To copy the contents of one file
|
||||
directly from stdin, use "-" as the source argument without the "-I"
|
||||
flag.
|
||||
|
||||
--recursive, -R, -r
|
||||
Recursively copy the contents of any directories that match the source
|
||||
path expression.
|
||||
|
||||
--skip-unsupported, -U
|
||||
Skip objects with unsupported object types.
|
||||
|
||||
--storage-class=STORAGE_CLASS, -s STORAGE_CLASS
|
||||
Specify the storage class of the destination object. If not specified,
|
||||
the default storage class of the destination bucket is used. This
|
||||
option is not valid for copying to non-cloud destinations.
|
||||
|
||||
At most one of these can be specified:
|
||||
|
||||
--canned-acl=PREDEFINED_ACL, --predefined-acl=PREDEFINED_ACL, -a PREDEFINED_ACL
|
||||
Applies predefined, or "canned," ACLs to a copied object. See docs
|
||||
for a list of predefined ACL constants:
|
||||
https://cloud.google.com/storage/docs/access-control/lists#predefined-acl
|
||||
|
||||
--preserve-acl, -p
|
||||
Preserves ACLs when copying in the cloud. This option is Google Cloud
|
||||
Storage-only, and you need OWNER access to all copied objects. If all
|
||||
objects in the destination bucket should have the same ACL, you can
|
||||
also set a default object ACL on that bucket instead of using this
|
||||
flag.
|
||||
|
||||
At most one of these can be specified:
|
||||
|
||||
--gzip-in-flight=[FILE_EXTENSIONS,...], -j [FILE_EXTENSIONS,...]
|
||||
Applies gzip transport encoding to any file upload whose extension
|
||||
matches the input extension list. This is useful when uploading files
|
||||
with compressible content such as .js, .css, or .html files. This
|
||||
also saves network bandwidth while leaving the data uncompressed in
|
||||
Cloud Storage.
|
||||
|
||||
When you specify the --gzip-in-flight option, files being uploaded
|
||||
are compressed in-memory and on-the-wire only. Both the local files
|
||||
and Cloud Storage objects remain uncompressed. The uploaded objects
|
||||
retain the Content-Type and name of the original files.
|
||||
|
||||
--gzip-in-flight-all, -J
|
||||
Applies gzip transport encoding to file uploads. This option works
|
||||
like the --gzip-in-flight option described above, but it applies to
|
||||
all uploaded files, regardless of extension.
|
||||
|
||||
CAUTION: If some of the source files don't compress well, such as
|
||||
binary data, using this option may result in longer uploads.
|
||||
|
||||
--gzip-local=[FILE_EXTENSIONS,...], -z [FILE_EXTENSIONS,...]
|
||||
Applies gzip content encoding to any file upload whose extension
|
||||
matches the input extension list. This is useful when uploading files
|
||||
with compressible content such as .js, .css, or .html files. This
|
||||
saves network bandwidth and space in Cloud Storage.
|
||||
|
||||
When you specify the --gzip-local option, the data from files is
|
||||
compressed before it is uploaded, but the original files are left
|
||||
uncompressed on the local disk. The uploaded objects retain the
|
||||
Content-Type and name of the original files. However, the
|
||||
Content-Encoding metadata is set to gzip and the Cache-Control
|
||||
metadata set to no-transform. The data remains compressed on Cloud
|
||||
Storage servers and will not be decompressed on download by gcloud
|
||||
stroage because of the no-transform field.
|
||||
|
||||
Since the local gzip option compresses data prior to upload, it is
|
||||
not subject to the same compression buffer bottleneck of the
|
||||
in-flight gzip option.
|
||||
|
||||
--gzip-local-all, -Z
|
||||
Applies gzip content encoding to file uploads. This option works like
|
||||
the --gzip-local option described above, but it applies to all
|
||||
uploaded files, regardless of extension.
|
||||
|
||||
CAUTION: If some of the source files don't compress well, such as
|
||||
binary data, using this option may result in files taking up more
|
||||
space in the cloud than they would if left uncompressed.
|
||||
|
||||
ENCRYPTION FLAGS
|
||||
--decryption-keys=[DECRYPTION_KEY,...]
|
||||
A comma-separated list of customer-supplied encryption keys (RFC 4648
|
||||
section 4 base64-encoded AES256 strings) that will be used to decrypt
|
||||
Google Cloud Storage objects. Data encrypted with a customer-managed
|
||||
encryption key (CMEK) is decrypted automatically, so CMEKs do not need
|
||||
to be listed here.
|
||||
|
||||
--encryption-key=ENCRYPTION_KEY
|
||||
The encryption key to use for encrypting target objects. The specified
|
||||
encryption key can be a customer-supplied encryption key (An RFC 4648
|
||||
section 4 base64-encoded AES256 string), or a customer-managed
|
||||
encryption key of the form
|
||||
projects/{project}/locations/{location}/keyRings/
|
||||
{key-ring}/cryptoKeys/{crypto-key}. The specified key also acts as a
|
||||
decryption key, which is useful when copying or moving encryted data to
|
||||
a new location. Using this flag in an objects update command triggers a
|
||||
rewrite of target objects.
|
||||
|
||||
OBJECT METADATA FLAGS
|
||||
--cache-control=CACHE_CONTROL
|
||||
How caches should handle requests and responses.
|
||||
|
||||
--content-disposition=CONTENT_DISPOSITION
|
||||
How content should be displayed.
|
||||
|
||||
--content-encoding=CONTENT_ENCODING
|
||||
How content is encoded (e.g. gzip).
|
||||
|
||||
--content-language=CONTENT_LANGUAGE
|
||||
Content's language (e.g. en signifies "English").
|
||||
|
||||
--content-md5=MD5_DIGEST
|
||||
Manually specified MD5 hash digest for the contents of an uploaded
|
||||
file. This flag cannot be used when uploading multiple files. The
|
||||
custom digest is used by the cloud provider for validation.
|
||||
|
||||
--content-type=CONTENT_TYPE
|
||||
Type of data contained in the object (e.g. text/html).
|
||||
|
||||
--custom-time=CUSTOM_TIME
|
||||
Custom time for Google Cloud Storage objects in RFC 3339 format.
|
||||
|
||||
At most one of these can be specified:
|
||||
|
||||
--clear-custom-metadata
|
||||
Clears all custom metadata on objects. When used with
|
||||
--preserve-posix, POSIX attributes will still be stored in custom
|
||||
metadata.
|
||||
|
||||
--custom-metadata=[CUSTOM_METADATA_KEYS_AND_VALUES,...]
|
||||
Sets custom metadata on objects. When used with --preserve-posix,
|
||||
POSIX attributes are also stored in custom metadata.
|
||||
|
||||
Flags that preserve unspecified existing metadata cannot be used with
|
||||
--custom-metadata or --clear-custom-metadata, but can be specified
|
||||
together:
|
||||
|
||||
--remove-custom-metadata=[METADATA_KEYS,...]
|
||||
Removes individual custom metadata keys from objects. This flag can
|
||||
be used with --update-custom-metadata. When used with
|
||||
--preserve-posix, POSIX attributes specified by this flag are not
|
||||
preserved.
|
||||
|
||||
--update-custom-metadata=[CUSTOM_METADATA_KEYS_AND_VALUES,...]
|
||||
Adds or sets individual custom metadata key value pairs on objects.
|
||||
Existing custom metadata not specified with this flag is not
|
||||
changed. This flag can be used with --remove-custom-metadata. When
|
||||
keys overlap with those provided by --preserve-posix, values
|
||||
specified by this flag are used.
|
||||
|
||||
PRECONDITION FLAGS
|
||||
--if-generation-match=GENERATION
|
||||
Execute only if the generation matches the generation of the requested
|
||||
object.
|
||||
|
||||
--if-metageneration-match=METAGENERATION
|
||||
Execute only if the metageneration matches the metageneration of the
|
||||
requested object.
|
||||
|
||||
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 variant is also available:
|
||||
|
||||
$ gcloud alpha storage cp
|
||||
|
||||
55
gcloud/storage/help
Normal file
55
gcloud/storage/help
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
NAME
|
||||
gcloud storage - create and manage Cloud Storage buckets and objects
|
||||
|
||||
SYNOPSIS
|
||||
gcloud storage GROUP | COMMAND [GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
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
|
||||
here: https://cloud.google.com/storage/docs/
|
||||
|
||||
GCLOUD WIDE FLAGS
|
||||
These flags are available to all commands: --help.
|
||||
|
||||
Run $ gcloud help for details.
|
||||
|
||||
GROUPS
|
||||
GROUP is one of the following:
|
||||
|
||||
buckets
|
||||
Manage Cloud Storage buckets.
|
||||
|
||||
objects
|
||||
Manage Cloud Storage objects.
|
||||
|
||||
COMMANDS
|
||||
COMMAND is one of the following:
|
||||
|
||||
cat
|
||||
Outputs the contents of one or more URLs to stdout.
|
||||
|
||||
cp
|
||||
Upload, download, and copy Cloud Storage objects.
|
||||
|
||||
ls
|
||||
List Cloud Storage buckets and objects.
|
||||
|
||||
mv
|
||||
Moves or renames objects.
|
||||
|
||||
rm
|
||||
Delete objects and buckets.
|
||||
|
||||
service-agent
|
||||
Manage a project's Cloud Storage service agent, which is used to
|
||||
perform Cloud KMS operations.
|
||||
|
||||
NOTES
|
||||
This variant is also available:
|
||||
|
||||
$ gcloud alpha storage
|
||||
|
||||
136
gcloud/storage/ls
Normal file
136
gcloud/storage/ls
Normal file
|
|
@ -0,0 +1,136 @@
|
|||
NAME
|
||||
gcloud storage ls - list Cloud Storage buckets and objects
|
||||
|
||||
SYNOPSIS
|
||||
gcloud storage ls [PATH ...] [--all-versions, -a] [--buckets, -b]
|
||||
[--etag, -e] [--format=FORMAT] [--readable-sizes] [--recursive, -R, -r]
|
||||
[--full, -L | --json, -j | --long, -l]
|
||||
[--decryption-keys=[DECRYPTION_KEY,...]] [GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
List your Cloud Storage buckets in a project and objects in a bucket. This
|
||||
command treats forward slashes in object names as directories. See below
|
||||
for examples of how to use wildcards to get the listing behavior you want.
|
||||
|
||||
EXAMPLES
|
||||
The following command lists the buckets in the default project:
|
||||
|
||||
$ gcloud storage ls
|
||||
|
||||
The following command lists the buckets in the specified project:
|
||||
|
||||
$ gcloud storage ls --project=my-project
|
||||
|
||||
The following command lists the contents of a bucket:
|
||||
|
||||
$ gcloud storage ls gs://my-bucket
|
||||
|
||||
You can use wildcards to match multiple paths (including multiple buckets).
|
||||
Bucket wildcards are expanded to match only buckets contained in your
|
||||
current project. The following command matches .txt objects that begin with
|
||||
log and that are stored in buckets in your project that begin with my-b:
|
||||
|
||||
$ gcloud storage ls gs://my-b*/log*.txt
|
||||
|
||||
The following wildcards are valid and match only within the current
|
||||
directory:
|
||||
|
||||
*: Matches zero or more characters
|
||||
?: Matches zero or one characters
|
||||
[]: Matches a character range (ex. [a-z] or [0-9])
|
||||
|
||||
You can use double-star wildcards to match zero or more directory levels in
|
||||
a path. The following command matches all .txt objects in a bucket.
|
||||
|
||||
$ gcloud storage ls gs://my-bucket/**/*.txt
|
||||
|
||||
** retrieves a flat list of objects in a single API call and will not match
|
||||
prefixes. The following command would not match gs://my-bucket/dir/log.txt:
|
||||
|
||||
$ gcloud storage ls gs://my-bucket/**/dir
|
||||
|
||||
Double-star expansion also can not be combined with other expressions in a
|
||||
given path segment and operates as a single star in that context. For
|
||||
example:
|
||||
|
||||
gs://my-bucket/dir**/log.txt is treated as:
|
||||
|
||||
gs://my-bucket/dir*/log.txt and instead should be written as:
|
||||
|
||||
gs://my-bucket/dir*/**/log.txt to get the recursive behavior.
|
||||
|
||||
The following command lists all items recursively with formatting by using
|
||||
--recursive:
|
||||
|
||||
$ gcloud storage ls --recursive gs://bucket
|
||||
|
||||
Recursive listings are similar to ** except recursive listings include line
|
||||
breaks and header formatting for each subdirectory.
|
||||
|
||||
POSITIONAL ARGUMENTS
|
||||
[PATH ...]
|
||||
The path of objects and directories to list. The path must begin with
|
||||
gs:// and is allowed to contain wildcard characters.
|
||||
|
||||
FLAGS
|
||||
--all-versions, -a
|
||||
Include non-current object versions in the listing. This flag is
|
||||
typically only useful for buckets with object versioning
|
||||
(https://cloud.google.com/storage/docs/object-versioning) enabled. If
|
||||
combined with the --long option, the metageneration for each listed
|
||||
object is also included.
|
||||
|
||||
--buckets, -b
|
||||
When given a bucket URL, only return buckets. Useful for avoiding the
|
||||
rule that prints the top-level objects of buckets matching a query.
|
||||
Typically used in combination with --full to get the full metadata of
|
||||
buckets.
|
||||
|
||||
--etag, -e
|
||||
Include ETag metadata in listings that use the --long flag.
|
||||
|
||||
--format=FORMAT
|
||||
Use "gsutil" to get the style of the older gsutil CLI. (e.g.
|
||||
"--format=gsutil"). Other format values (e.g. "json") do not work. See
|
||||
different ls flags and commands for alternative formatting.
|
||||
|
||||
--readable-sizes
|
||||
When used with --long, print object sizes in human readable format,
|
||||
such as 1 KiB, 234 MiB, or 2 GiB.
|
||||
|
||||
--recursive, -R, -r
|
||||
Recursively list the contents of any directories that match the path
|
||||
expression.
|
||||
|
||||
At most one of these can be specified:
|
||||
|
||||
--full, -L
|
||||
List all available metadata about items in rows.
|
||||
|
||||
--json, -j
|
||||
List all available metadata about items as a JSON dump.
|
||||
|
||||
--long, -l
|
||||
For objects only. List size in bytes, creation time, and URL.
|
||||
|
||||
ENCRYPTION FLAGS
|
||||
--decryption-keys=[DECRYPTION_KEY,...]
|
||||
A comma-separated list of customer-supplied encryption keys (RFC 4648
|
||||
section 4 base64-encoded AES256 strings) that will be used to decrypt
|
||||
Google Cloud Storage objects. Data encrypted with a customer-managed
|
||||
encryption key (CMEK) is decrypted automatically, so CMEKs do not need
|
||||
to be listed here.
|
||||
|
||||
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 variant is also available:
|
||||
|
||||
$ gcloud alpha storage ls
|
||||
|
||||
336
gcloud/storage/mv
Normal file
336
gcloud/storage/mv
Normal file
|
|
@ -0,0 +1,336 @@
|
|||
NAME
|
||||
gcloud storage mv - moves or renames objects
|
||||
|
||||
SYNOPSIS
|
||||
gcloud storage mv [SOURCE ...] DESTINATION [--all-versions, -A]
|
||||
[--no-clobber, -n] [--continue-on-error, -c] [--daisy-chain, -D]
|
||||
[--do-not-decompress] [--ignore-symlinks]
|
||||
[--manifest-path=MANIFEST_PATH, -L MANIFEST_PATH]
|
||||
[--preserve-posix, -P] [--print-created-message, -v]
|
||||
[--read-paths-from-stdin, -I] [--skip-unsupported, -U]
|
||||
[--storage-class=STORAGE_CLASS, -s STORAGE_CLASS]
|
||||
[--canned-acl=PREDEFINED_ACL,
|
||||
--predefined-acl=PREDEFINED_ACL, -a PREDEFINED_ACL
|
||||
| --preserve-acl, -p]
|
||||
[--gzip-in-flight=[FILE_EXTENSIONS,...], -j [FILE_EXTENSIONS,...]
|
||||
| --gzip-in-flight-all, -J
|
||||
| --gzip-local=[FILE_EXTENSIONS,...], -z [FILE_EXTENSIONS,...]
|
||||
| --gzip-local-all, -Z]
|
||||
[--decryption-keys=[DECRYPTION_KEY,...]
|
||||
--encryption-key=ENCRYPTION_KEY]
|
||||
[--cache-control=CACHE_CONTROL
|
||||
--content-disposition=CONTENT_DISPOSITION
|
||||
--content-encoding=CONTENT_ENCODING
|
||||
--content-language=CONTENT_LANGUAGE --content-md5=MD5_DIGEST
|
||||
--content-type=CONTENT_TYPE
|
||||
--custom-time=CUSTOM_TIME --clear-custom-metadata
|
||||
| --custom-metadata=[CUSTOM_METADATA_KEYS_AND_VALUES,...]
|
||||
| --remove-custom-metadata=[METADATA_KEYS,...]
|
||||
--update-custom-metadata=[CUSTOM_METADATA_KEYS_AND_VALUES,...]]
|
||||
[--if-generation-match=GENERATION
|
||||
--if-metageneration-match=METAGENERATION] [GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
The mv command allows you to move data between your local file system and
|
||||
the cloud, move data within the cloud, and move data between cloud storage
|
||||
providers
|
||||
|
||||
Renaming Groups Of Objects
|
||||
|
||||
You can use the mv command to rename all objects with a given prefix to
|
||||
have a new prefix. For example, the following command renames all objects
|
||||
under gs://my_bucket/oldprefix to be under gs://my_bucket/newprefix,
|
||||
otherwise preserving the naming structure:
|
||||
|
||||
$ gcloud storage mv mv gs://my_bucket/oldprefix \
|
||||
gs://my_bucket/newprefix
|
||||
|
||||
Note that when using mv to rename groups of objects with a common prefix,
|
||||
you cannot specify the source URL using wildcards; you must spell out the
|
||||
complete name.
|
||||
|
||||
If you do a rename as specified above and you want to preserve ACLs.
|
||||
|
||||
Non-Atomic Operation
|
||||
|
||||
Unlike the case with many file systems, the mv command does not perform a
|
||||
single atomic operation. Rather, it performs a copy from source to
|
||||
destination followed by removing the source for each object.
|
||||
|
||||
A consequence of this is that, in addition to normal network and operation
|
||||
charges, if you move a Nearline Storage, Coldline Storage, or Archive
|
||||
Storage object, deletion and data retrieval charges apply. See the
|
||||
documentation for pricing details.
|
||||
|
||||
EXAMPLES
|
||||
To move all objects from a bucket to a local directory you could use:
|
||||
|
||||
$ gcloud storage mv gs://my_bucket/* dir
|
||||
|
||||
Similarly, to move all objects from a local directory to a bucket you could
|
||||
use:
|
||||
|
||||
$ gcloud storage mv ./dir gs://my_bucket
|
||||
|
||||
The following command renames all objects under gs://my_bucket/oldprefix to
|
||||
be under gs://my_bucket/newprefix, otherwise preserving the naming
|
||||
structure:
|
||||
|
||||
$ gcloud storage mv gs://my_bucket/oldprefix gs://my_bucket/newprefix
|
||||
|
||||
POSITIONAL ARGUMENTS
|
||||
[SOURCE ...]
|
||||
The source path(s) to copy.
|
||||
|
||||
DESTINATION
|
||||
The destination path.
|
||||
|
||||
FLAGS
|
||||
--all-versions, -A
|
||||
Copy all source versions from a source bucket or folder. If not set,
|
||||
only the live version of each source object is copied.
|
||||
|
||||
Note: This option is only useful when the destination bucket has Object
|
||||
Versioning enabled. Additionally, the generation numbers of copied
|
||||
versions do not necessarily match the order of the original generation
|
||||
numbers.
|
||||
|
||||
--no-clobber, -n
|
||||
Do not overwrite existing files or objects at the destination. Skipped
|
||||
items will be printed. This option performs an additional GET request
|
||||
for cloud objects before attempting an upload.
|
||||
|
||||
--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.
|
||||
|
||||
--daisy-chain, -D
|
||||
Copy in "daisy chain" mode, which means copying an object by first
|
||||
downloading it to the machine where the command is run, then uploading
|
||||
it to the destination bucket. The default mode is a "copy in the
|
||||
cloud," where data is copied without uploading or downloading. During a
|
||||
copy in the cloud, a source composite object remains composite at its
|
||||
destination. However, you can use daisy chain mode to change a
|
||||
composite object into a non-composite object. Note: Daisy chain mode is
|
||||
automatically used when copying between providers.
|
||||
|
||||
--do-not-decompress
|
||||
Do not automatically decompress downloaded gzip files.
|
||||
|
||||
--ignore-symlinks
|
||||
Ignore file symlinks instead of copying what they point to. Symlinks
|
||||
pointing to directories will always be ignored.
|
||||
|
||||
--manifest-path=MANIFEST_PATH, -L MANIFEST_PATH
|
||||
Outputs a manifest log file with detailed information about each item
|
||||
that was copied. This manifest contains the following information for
|
||||
each item:
|
||||
|
||||
◆ Source path.
|
||||
◆ Destination path.
|
||||
◆ Source size.
|
||||
◆ Bytes transferred.
|
||||
◆ MD5 hash.
|
||||
◆ Transfer start time and date in UTC and ISO 8601 format.
|
||||
◆ Transfer completion time and date in UTC and ISO 8601 format.
|
||||
◆ Final result of the attempted transfer: OK, error, or skipped.
|
||||
◆ Details, if any.
|
||||
|
||||
If the manifest file already exists, gcloud storage appends log items
|
||||
to the existing file.
|
||||
|
||||
Objects that are marked as "OK" or "skipped" in the existing manifest
|
||||
file are not retried by future commands. Objects marked as "error" are
|
||||
retried.
|
||||
|
||||
--preserve-posix, -P
|
||||
Causes POSIX attributes to be preserved when objects are copied. With
|
||||
this feature enabled, gcloud storage will copy several fields provided
|
||||
by the stat command: access time, modification time, owner UID, owner
|
||||
group GID, and the mode (permissions) of the file.
|
||||
|
||||
For uploads, these attributes are read off of local files and stored in
|
||||
the cloud as custom metadata. For downloads, custom cloud metadata is
|
||||
set as POSIX attributes on files after they are downloaded.
|
||||
|
||||
On Windows, this flag will only set and restore access time and
|
||||
modification time because Windows doesn't have a notion of POSIX UID,
|
||||
GID, and mode.
|
||||
|
||||
--print-created-message, -v
|
||||
Prints the version-specific URL for each copied object.
|
||||
|
||||
--read-paths-from-stdin, -I
|
||||
Read the list of resources to copy from stdin. No need to enter a
|
||||
source argument if this flag is present. Example: "storage cp -I
|
||||
gs://bucket/destination" Note: To copy the contents of one file
|
||||
directly from stdin, use "-" as the source argument without the "-I"
|
||||
flag.
|
||||
|
||||
--skip-unsupported, -U
|
||||
Skip objects with unsupported object types.
|
||||
|
||||
--storage-class=STORAGE_CLASS, -s STORAGE_CLASS
|
||||
Specify the storage class of the destination object. If not specified,
|
||||
the default storage class of the destination bucket is used. This
|
||||
option is not valid for copying to non-cloud destinations.
|
||||
|
||||
At most one of these can be specified:
|
||||
|
||||
--canned-acl=PREDEFINED_ACL, --predefined-acl=PREDEFINED_ACL, -a PREDEFINED_ACL
|
||||
Applies predefined, or "canned," ACLs to a copied object. See docs
|
||||
for a list of predefined ACL constants:
|
||||
https://cloud.google.com/storage/docs/access-control/lists#predefined-acl
|
||||
|
||||
--preserve-acl, -p
|
||||
Preserves ACLs when copying in the cloud. This option is Google Cloud
|
||||
Storage-only, and you need OWNER access to all copied objects. If all
|
||||
objects in the destination bucket should have the same ACL, you can
|
||||
also set a default object ACL on that bucket instead of using this
|
||||
flag.
|
||||
|
||||
At most one of these can be specified:
|
||||
|
||||
--gzip-in-flight=[FILE_EXTENSIONS,...], -j [FILE_EXTENSIONS,...]
|
||||
Applies gzip transport encoding to any file upload whose extension
|
||||
matches the input extension list. This is useful when uploading files
|
||||
with compressible content such as .js, .css, or .html files. This
|
||||
also saves network bandwidth while leaving the data uncompressed in
|
||||
Cloud Storage.
|
||||
|
||||
When you specify the --gzip-in-flight option, files being uploaded
|
||||
are compressed in-memory and on-the-wire only. Both the local files
|
||||
and Cloud Storage objects remain uncompressed. The uploaded objects
|
||||
retain the Content-Type and name of the original files.
|
||||
|
||||
--gzip-in-flight-all, -J
|
||||
Applies gzip transport encoding to file uploads. This option works
|
||||
like the --gzip-in-flight option described above, but it applies to
|
||||
all uploaded files, regardless of extension.
|
||||
|
||||
CAUTION: If some of the source files don't compress well, such as
|
||||
binary data, using this option may result in longer uploads.
|
||||
|
||||
--gzip-local=[FILE_EXTENSIONS,...], -z [FILE_EXTENSIONS,...]
|
||||
Applies gzip content encoding to any file upload whose extension
|
||||
matches the input extension list. This is useful when uploading files
|
||||
with compressible content such as .js, .css, or .html files. This
|
||||
saves network bandwidth and space in Cloud Storage.
|
||||
|
||||
When you specify the --gzip-local option, the data from files is
|
||||
compressed before it is uploaded, but the original files are left
|
||||
uncompressed on the local disk. The uploaded objects retain the
|
||||
Content-Type and name of the original files. However, the
|
||||
Content-Encoding metadata is set to gzip and the Cache-Control
|
||||
metadata set to no-transform. The data remains compressed on Cloud
|
||||
Storage servers and will not be decompressed on download by gcloud
|
||||
stroage because of the no-transform field.
|
||||
|
||||
Since the local gzip option compresses data prior to upload, it is
|
||||
not subject to the same compression buffer bottleneck of the
|
||||
in-flight gzip option.
|
||||
|
||||
--gzip-local-all, -Z
|
||||
Applies gzip content encoding to file uploads. This option works like
|
||||
the --gzip-local option described above, but it applies to all
|
||||
uploaded files, regardless of extension.
|
||||
|
||||
CAUTION: If some of the source files don't compress well, such as
|
||||
binary data, using this option may result in files taking up more
|
||||
space in the cloud than they would if left uncompressed.
|
||||
|
||||
ENCRYPTION FLAGS
|
||||
--decryption-keys=[DECRYPTION_KEY,...]
|
||||
A comma-separated list of customer-supplied encryption keys (RFC 4648
|
||||
section 4 base64-encoded AES256 strings) that will be used to decrypt
|
||||
Google Cloud Storage objects. Data encrypted with a customer-managed
|
||||
encryption key (CMEK) is decrypted automatically, so CMEKs do not need
|
||||
to be listed here.
|
||||
|
||||
--encryption-key=ENCRYPTION_KEY
|
||||
The encryption key to use for encrypting target objects. The specified
|
||||
encryption key can be a customer-supplied encryption key (An RFC 4648
|
||||
section 4 base64-encoded AES256 string), or a customer-managed
|
||||
encryption key of the form
|
||||
projects/{project}/locations/{location}/keyRings/
|
||||
{key-ring}/cryptoKeys/{crypto-key}. The specified key also acts as a
|
||||
decryption key, which is useful when copying or moving encryted data to
|
||||
a new location. Using this flag in an objects update command triggers a
|
||||
rewrite of target objects.
|
||||
|
||||
OBJECT METADATA FLAGS
|
||||
--cache-control=CACHE_CONTROL
|
||||
How caches should handle requests and responses.
|
||||
|
||||
--content-disposition=CONTENT_DISPOSITION
|
||||
How content should be displayed.
|
||||
|
||||
--content-encoding=CONTENT_ENCODING
|
||||
How content is encoded (e.g. gzip).
|
||||
|
||||
--content-language=CONTENT_LANGUAGE
|
||||
Content's language (e.g. en signifies "English").
|
||||
|
||||
--content-md5=MD5_DIGEST
|
||||
Manually specified MD5 hash digest for the contents of an uploaded
|
||||
file. This flag cannot be used when uploading multiple files. The
|
||||
custom digest is used by the cloud provider for validation.
|
||||
|
||||
--content-type=CONTENT_TYPE
|
||||
Type of data contained in the object (e.g. text/html).
|
||||
|
||||
--custom-time=CUSTOM_TIME
|
||||
Custom time for Google Cloud Storage objects in RFC 3339 format.
|
||||
|
||||
At most one of these can be specified:
|
||||
|
||||
--clear-custom-metadata
|
||||
Clears all custom metadata on objects. When used with
|
||||
--preserve-posix, POSIX attributes will still be stored in custom
|
||||
metadata.
|
||||
|
||||
--custom-metadata=[CUSTOM_METADATA_KEYS_AND_VALUES,...]
|
||||
Sets custom metadata on objects. When used with --preserve-posix,
|
||||
POSIX attributes are also stored in custom metadata.
|
||||
|
||||
Flags that preserve unspecified existing metadata cannot be used with
|
||||
--custom-metadata or --clear-custom-metadata, but can be specified
|
||||
together:
|
||||
|
||||
--remove-custom-metadata=[METADATA_KEYS,...]
|
||||
Removes individual custom metadata keys from objects. This flag can
|
||||
be used with --update-custom-metadata. When used with
|
||||
--preserve-posix, POSIX attributes specified by this flag are not
|
||||
preserved.
|
||||
|
||||
--update-custom-metadata=[CUSTOM_METADATA_KEYS_AND_VALUES,...]
|
||||
Adds or sets individual custom metadata key value pairs on objects.
|
||||
Existing custom metadata not specified with this flag is not
|
||||
changed. This flag can be used with --remove-custom-metadata. When
|
||||
keys overlap with those provided by --preserve-posix, values
|
||||
specified by this flag are used.
|
||||
|
||||
PRECONDITION FLAGS
|
||||
--if-generation-match=GENERATION
|
||||
Execute only if the generation matches the generation of the requested
|
||||
object.
|
||||
|
||||
--if-metageneration-match=METAGENERATION
|
||||
Execute only if the metageneration matches the metageneration of the
|
||||
requested object.
|
||||
|
||||
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 variant is also available:
|
||||
|
||||
$ gcloud alpha storage mv
|
||||
|
||||
55
gcloud/storage/objects/compose
Normal file
55
gcloud/storage/objects/compose
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
NAME
|
||||
gcloud storage objects compose - concatenate a sequence of objects into a
|
||||
new composite object
|
||||
|
||||
SYNOPSIS
|
||||
gcloud storage objects compose SOURCE [SOURCE ...] DESTINATION
|
||||
[--if-generation-match=GENERATION
|
||||
--if-metageneration-match=METAGENERATION] [GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
gcloud storage objects compose creates a new object whose content is the
|
||||
concatenation of a given sequence of source objects in the same bucket. For
|
||||
more information, please see: composite objects documentation
|
||||
(https://cloud.google.com/storage/docs/composite-objects).
|
||||
|
||||
There is a limit (currently 32) to the number of components that can be
|
||||
composed in a single operation.
|
||||
|
||||
EXAMPLES
|
||||
The following command creates a new object target.txt by concatenating
|
||||
a.txt and b.txt:
|
||||
|
||||
$ gcloud storage objects compose gs://bucket/a.txt \
|
||||
gs://bucket/b.txt gs://bucket/target.txt
|
||||
|
||||
POSITIONAL ARGUMENTS
|
||||
SOURCE [SOURCE ...]
|
||||
The list of source objects that will be concatenated into a single
|
||||
object.
|
||||
|
||||
DESTINATION
|
||||
The destination object.
|
||||
|
||||
PRECONDITION FLAGS
|
||||
--if-generation-match=GENERATION
|
||||
Execute only if the generation matches the generation of the requested
|
||||
object.
|
||||
|
||||
--if-metageneration-match=METAGENERATION
|
||||
Execute only if the metageneration matches the metageneration of the
|
||||
requested object.
|
||||
|
||||
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 variant is also available:
|
||||
|
||||
$ gcloud alpha storage objects compose
|
||||
|
||||
46
gcloud/storage/objects/describe
Normal file
46
gcloud/storage/objects/describe
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
NAME
|
||||
gcloud storage objects describe - describe a Cloud Storage object
|
||||
|
||||
SYNOPSIS
|
||||
gcloud storage objects describe URL
|
||||
[--decryption-keys=[DECRYPTION_KEY,...]] [GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
Describe a Cloud Storage object.
|
||||
|
||||
EXAMPLES
|
||||
Describe a Google Cloud Storage object with the url
|
||||
"gs://bucket/my-object":
|
||||
|
||||
$ gcloud storage objects describe gs://bucket/my-object
|
||||
|
||||
Describe object with JSON formatting, only returning the "name" key:
|
||||
|
||||
$ gcloud storage objects describe gs://bucket/my-object \
|
||||
--format="json(name)"
|
||||
|
||||
POSITIONAL ARGUMENTS
|
||||
URL
|
||||
Specifies URL of object to describe.
|
||||
|
||||
ENCRYPTION FLAGS
|
||||
--decryption-keys=[DECRYPTION_KEY,...]
|
||||
A comma-separated list of customer-supplied encryption keys (RFC 4648
|
||||
section 4 base64-encoded AES256 strings) that will be used to decrypt
|
||||
Google Cloud Storage objects. Data encrypted with a customer-managed
|
||||
encryption key (CMEK) is decrypted automatically, so CMEKs do not need
|
||||
to be listed here.
|
||||
|
||||
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 variant is also available:
|
||||
|
||||
$ gcloud alpha storage objects describe
|
||||
|
||||
34
gcloud/storage/objects/help
Normal file
34
gcloud/storage/objects/help
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
NAME
|
||||
gcloud storage objects - manage Cloud Storage objects
|
||||
|
||||
SYNOPSIS
|
||||
gcloud storage objects COMMAND [GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
Manage Cloud Storage objects.
|
||||
|
||||
GCLOUD WIDE FLAGS
|
||||
These flags are available to all commands: --help.
|
||||
|
||||
Run $ gcloud help for details.
|
||||
|
||||
COMMANDS
|
||||
COMMAND is one of the following:
|
||||
|
||||
compose
|
||||
Concatenate a sequence of objects into a new composite object.
|
||||
|
||||
describe
|
||||
Describe a Cloud Storage object.
|
||||
|
||||
list
|
||||
Lists Cloud Storage objects.
|
||||
|
||||
update
|
||||
Update Cloud Storage objects.
|
||||
|
||||
NOTES
|
||||
This variant is also available:
|
||||
|
||||
$ gcloud alpha storage objects
|
||||
|
||||
91
gcloud/storage/objects/list
Normal file
91
gcloud/storage/objects/list
Normal file
|
|
@ -0,0 +1,91 @@
|
|||
NAME
|
||||
gcloud storage objects list - lists Cloud Storage objects
|
||||
|
||||
SYNOPSIS
|
||||
gcloud 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 ...]
|
||||
|
||||
DESCRIPTION
|
||||
List Cloud Storage objects.
|
||||
|
||||
Bucket URLs like "gs://bucket" will match all the objects inside a bucket,
|
||||
but "gs://b" will error because it matches a list of buckets.
|
||||
|
||||
EXAMPLES
|
||||
List all objects in bucket "my-bucket":
|
||||
|
||||
$ gcloud storage objects list gs://my-bucket
|
||||
|
||||
List all objects in bucket beginning with "o":
|
||||
|
||||
$ gcloud storage objects list gs://my-bucket/o*
|
||||
|
||||
List all objects in bucket with JSON formatting, only returning the value
|
||||
of the "name" metadata field:
|
||||
|
||||
$ gcloud storage objects list gs://my-bucket --format="json(name)"
|
||||
|
||||
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
|
||||
section 4 base64-encoded AES256 strings) that will be used to decrypt
|
||||
Google Cloud Storage objects. Data encrypted with a customer-managed
|
||||
encryption key (CMEK) is decrypted automatically, so CMEKs do not need
|
||||
to be listed here.
|
||||
|
||||
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 variant is also available:
|
||||
|
||||
$ gcloud alpha storage objects list
|
||||
|
||||
194
gcloud/storage/objects/update
Normal file
194
gcloud/storage/objects/update
Normal file
|
|
@ -0,0 +1,194 @@
|
|||
NAME
|
||||
gcloud storage objects update - update Cloud Storage objects
|
||||
|
||||
SYNOPSIS
|
||||
gcloud storage objects update [URL ...] [--continue-on-error, -c]
|
||||
[--preserve-acl, -p] [--read-paths-from-stdin, -I]
|
||||
[--recursive, -R, -r] [--storage-class=STORAGE_CLASS, -s STORAGE_CLASS]
|
||||
[--clear-encryption-key --decryption-keys=[DECRYPTION_KEY,...]
|
||||
--encryption-key=ENCRYPTION_KEY]
|
||||
[--cache-control=CACHE_CONTROL --clear-cache-control
|
||||
--clear-content-disposition --clear-content-encoding
|
||||
--clear-content-language --clear-content-md5 --clear-content-type
|
||||
--clear-custom-time --content-disposition=CONTENT_DISPOSITION
|
||||
--content-encoding=CONTENT_ENCODING
|
||||
--content-language=CONTENT_LANGUAGE --content-md5=MD5_DIGEST
|
||||
--content-type=CONTENT_TYPE
|
||||
--custom-time=CUSTOM_TIME --clear-custom-metadata
|
||||
| --custom-metadata=[CUSTOM_METADATA_KEYS_AND_VALUES,...]
|
||||
| --remove-custom-metadata=[METADATA_KEYS,...]
|
||||
--update-custom-metadata=[CUSTOM_METADATA_KEYS_AND_VALUES,...]]
|
||||
[--if-generation-match=GENERATION
|
||||
--if-metageneration-match=METAGENERATION] [GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
Update Cloud Storage objects.
|
||||
|
||||
EXAMPLES
|
||||
Update a Google Cloud Storage object's custom-metadata:
|
||||
|
||||
$ gcloud storage objects update gs://bucket/my-object \
|
||||
--custom-metadata=key1=value1,key2=value2
|
||||
|
||||
Rewrite all JPEG images to the NEARLINE storage class:
|
||||
|
||||
$ gcloud 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 storage objects update gs://bucket/*.jpg \
|
||||
--storage-class=NEARLINE --if-metageneration-match=123456789
|
||||
|
||||
POSITIONAL ARGUMENTS
|
||||
[URL ...]
|
||||
Specifies URLs of objects to update.
|
||||
|
||||
FLAGS
|
||||
--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.
|
||||
|
||||
--preserve-acl, -p
|
||||
Preserves ACLs when copying in the cloud. This feature is supported for
|
||||
only Google Cloud Storage and requires OWNER access to all copied
|
||||
objects. To use the destination bucket's default policy (necessary for
|
||||
uniform bucket-level access), use --no-preserve-acl. Enabled by
|
||||
default, use -p to disable.
|
||||
|
||||
--read-paths-from-stdin, -I
|
||||
Read the list of objects to update from stdin. No need to enter a
|
||||
source argument if this flag is present. Example: "storage objects
|
||||
update -I --content-type=new-type"
|
||||
|
||||
--recursive, -R, -r
|
||||
Recursively update objects under any buckets or directories that match
|
||||
the URL expression.
|
||||
|
||||
--storage-class=STORAGE_CLASS, -s STORAGE_CLASS
|
||||
Specify the storage class of the object. Using this flag triggers a
|
||||
rewrite of underlying object data.
|
||||
|
||||
ENCRYPTION FLAGS
|
||||
--clear-encryption-key
|
||||
Clears the encryption key associated with an object. Using this flag
|
||||
triggers a rewrite of affected objects, which are then encrypted using
|
||||
the default encryption key set on the bucket, if one exists, or else
|
||||
with a Google-managed encryption key.
|
||||
|
||||
--decryption-keys=[DECRYPTION_KEY,...]
|
||||
A comma-separated list of customer-supplied encryption keys (RFC 4648
|
||||
section 4 base64-encoded AES256 strings) that will be used to decrypt
|
||||
Google Cloud Storage objects. Data encrypted with a customer-managed
|
||||
encryption key (CMEK) is decrypted automatically, so CMEKs do not need
|
||||
to be listed here.
|
||||
|
||||
--encryption-key=ENCRYPTION_KEY
|
||||
The encryption key to use for encrypting target objects. The specified
|
||||
encryption key can be a customer-supplied encryption key (An RFC 4648
|
||||
section 4 base64-encoded AES256 string), or a customer-managed
|
||||
encryption key of the form
|
||||
projects/{project}/locations/{location}/keyRings/
|
||||
{key-ring}/cryptoKeys/{crypto-key}. The specified key also acts as a
|
||||
decryption key, which is useful when copying or moving encryted data to
|
||||
a new location. Using this flag in an objects update command triggers a
|
||||
rewrite of target objects.
|
||||
|
||||
OBJECT METADATA FLAGS
|
||||
--cache-control=CACHE_CONTROL
|
||||
How caches should handle requests and responses.
|
||||
|
||||
--clear-cache-control
|
||||
Clears object cache control.
|
||||
|
||||
--clear-content-disposition
|
||||
Clears object content disposition.
|
||||
|
||||
--clear-content-encoding
|
||||
Clears content encoding.
|
||||
|
||||
--clear-content-language
|
||||
Clears object content language.
|
||||
|
||||
--clear-content-md5
|
||||
Clears object content MD5.
|
||||
|
||||
--clear-content-type
|
||||
Clears object content type.
|
||||
|
||||
--clear-custom-time
|
||||
Clears object custom time.
|
||||
|
||||
--content-disposition=CONTENT_DISPOSITION
|
||||
How content should be displayed.
|
||||
|
||||
--content-encoding=CONTENT_ENCODING
|
||||
How content is encoded (e.g. gzip).
|
||||
|
||||
--content-language=CONTENT_LANGUAGE
|
||||
Content's language (e.g. en signifies "English").
|
||||
|
||||
--content-md5=MD5_DIGEST
|
||||
Manually specified MD5 hash digest for the contents of an uploaded
|
||||
file. This flag cannot be used when uploading multiple files. The
|
||||
custom digest is used by the cloud provider for validation.
|
||||
|
||||
--content-type=CONTENT_TYPE
|
||||
Type of data contained in the object (e.g. text/html).
|
||||
|
||||
--custom-time=CUSTOM_TIME
|
||||
Custom time for Google Cloud Storage objects in RFC 3339 format.
|
||||
|
||||
At most one of these can be specified:
|
||||
|
||||
--clear-custom-metadata
|
||||
Clears all custom metadata on objects. When used with
|
||||
--preserve-posix, POSIX attributes will still be stored in custom
|
||||
metadata.
|
||||
|
||||
--custom-metadata=[CUSTOM_METADATA_KEYS_AND_VALUES,...]
|
||||
Sets custom metadata on objects. When used with --preserve-posix,
|
||||
POSIX attributes are also stored in custom metadata.
|
||||
|
||||
Flags that preserve unspecified existing metadata cannot be used with
|
||||
--custom-metadata or --clear-custom-metadata, but can be specified
|
||||
together:
|
||||
|
||||
--remove-custom-metadata=[METADATA_KEYS,...]
|
||||
Removes individual custom metadata keys from objects. This flag can
|
||||
be used with --update-custom-metadata. When used with
|
||||
--preserve-posix, POSIX attributes specified by this flag are not
|
||||
preserved.
|
||||
|
||||
--update-custom-metadata=[CUSTOM_METADATA_KEYS_AND_VALUES,...]
|
||||
Adds or sets individual custom metadata key value pairs on objects.
|
||||
Existing custom metadata not specified with this flag is not
|
||||
changed. This flag can be used with --remove-custom-metadata. When
|
||||
keys overlap with those provided by --preserve-posix, values
|
||||
specified by this flag are used.
|
||||
|
||||
PRECONDITION FLAGS
|
||||
--if-generation-match=GENERATION
|
||||
Execute only if the generation matches the generation of the requested
|
||||
object.
|
||||
|
||||
--if-metageneration-match=METAGENERATION
|
||||
Execute only if the metageneration matches the metageneration of the
|
||||
requested object.
|
||||
|
||||
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 variant is also available:
|
||||
|
||||
$ gcloud alpha storage objects update
|
||||
|
||||
95
gcloud/storage/rm
Normal file
95
gcloud/storage/rm
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
NAME
|
||||
gcloud storage rm - delete objects and buckets
|
||||
|
||||
SYNOPSIS
|
||||
gcloud storage rm [URLS ...] [--all-versions, -a] [--continue-on-error, -c]
|
||||
[--read-paths-from-stdin, -I] [--recursive, -R, -r]
|
||||
[--if-generation-match=GENERATION
|
||||
--if-metageneration-match=METAGENERATION] [GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
Delete objects and buckets.
|
||||
|
||||
EXAMPLES
|
||||
The following command deletes a Cloud Storage object named my-object from
|
||||
the bucket my-bucket:
|
||||
|
||||
$ gcloud storage rm gs://my-bucket/my-object
|
||||
|
||||
The following command deletes all objects directly within the directory
|
||||
my-dir but no objects within subdirectories:
|
||||
|
||||
$ gcloud storage rm gs://my-bucket/my-dir/*
|
||||
|
||||
The following command deletes all objects and subdirectories within the
|
||||
directory my-dir:
|
||||
|
||||
$ gcloud storage rm gs://my-bucket/my-dir/**
|
||||
|
||||
Note that for buckets that contain versioned objects
|
||||
(https://cloud.google.com/storage/docs/object-versioning), the above
|
||||
command only affects live versions. Use the --recursive flag instead to
|
||||
delete all versions.
|
||||
|
||||
The following command deletes all versions of all resources in my-bucket
|
||||
and then deletes the bucket.
|
||||
|
||||
$ gcloud storage rm --recursive gs://my-bucket/
|
||||
|
||||
The following command deletes all text files in the top-level of my-bucket,
|
||||
but not text files in subdirectories:
|
||||
|
||||
$ gcloud storage rm -recursive gs://my-bucket/*.txt
|
||||
|
||||
The following command deletes one wildcard expression per line passed in by
|
||||
stdin:
|
||||
|
||||
$ some_program | gcloud storage rm -I
|
||||
|
||||
POSITIONAL ARGUMENTS
|
||||
[URLS ...]
|
||||
The URLs of the resources to delete.
|
||||
|
||||
FLAGS
|
||||
--all-versions, -a
|
||||
Delete all versions
|
||||
(https://cloud.google.com/storage/docs/object-versioning) of an object.
|
||||
|
||||
--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.
|
||||
|
||||
--read-paths-from-stdin, -I
|
||||
Read the list of resources to remove from stdin.
|
||||
|
||||
--recursive, -R, -r
|
||||
Recursively delete the contents of buckets or directories that match
|
||||
the path expression. If the path is set to a bucket, like gs://bucket,
|
||||
the bucket is also deleted. This option implies the --all-versions
|
||||
option. If you want to delete only live object versions, use the ``**''
|
||||
wildcard instead.
|
||||
|
||||
PRECONDITION FLAGS
|
||||
--if-generation-match=GENERATION
|
||||
Execute only if the generation matches the generation of the requested
|
||||
object.
|
||||
|
||||
--if-metageneration-match=METAGENERATION
|
||||
Execute only if the metageneration matches the metageneration of the
|
||||
requested object.
|
||||
|
||||
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 variant is also available:
|
||||
|
||||
$ gcloud alpha storage rm
|
||||
|
||||
49
gcloud/storage/service-agent
Normal file
49
gcloud/storage/service-agent
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
NAME
|
||||
gcloud storage service-agent - manage a project's Cloud Storage service
|
||||
agent, which is used to perform Cloud KMS operations
|
||||
|
||||
SYNOPSIS
|
||||
gcloud storage service-agent [--authorize-cmek=AUTHORIZE_CMEK]
|
||||
[GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
gcloud storage service-agent displays the Cloud Storage service agent,
|
||||
which is used to perform Cloud KMS operations against your a default or
|
||||
supplied project. If the project does not yet have a service agent, gcloud
|
||||
storage service-agent creates one.
|
||||
|
||||
EXAMPLES
|
||||
To show the service agent for your default project:
|
||||
|
||||
$ gcloud storage service-agent
|
||||
|
||||
To show the service account for my-project:
|
||||
|
||||
$ gcloud storage service-agent --project=my-project
|
||||
|
||||
To authorize your default project to use a Cloud KMS key:
|
||||
|
||||
$ gcloud storage service-agent \
|
||||
--authorize-cmek=projects/key-project/locations/us-east1/\
|
||||
keyRings/key-ring/cryptoKeys/my-key
|
||||
|
||||
FLAGS
|
||||
--authorize-cmek=AUTHORIZE_CMEK
|
||||
Adds appropriate encrypt/decrypt permissions to the specified Cloud KMS
|
||||
key. This allows the Cloud Storage service agent to write and read
|
||||
Cloud KMS-encrypted objects in buckets associated with the service
|
||||
agent's project.
|
||||
|
||||
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 variant is also available:
|
||||
|
||||
$ gcloud alpha storage service-agent
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue