File: //snap/google-cloud-cli/396/help/man/man1/gcloud_storage_objects_list.1
.TH "GCLOUD_STORAGE_OBJECTS_LIST" 1
.SH "NAME"
.HP
gcloud storage objects list \- lists Cloud Storage objects
.SH "SYNOPSIS"
.HP
\f5gcloud storage objects list\fR \fIURLS\fR [\fIURLS\fR\ ...] [\fB\-\-additional\-headers\fR=\fIHEADER\fR=\fIVALUE\fR] [\fB\-\-exhaustive\fR] [\fB\-\-fetch\-encrypted\-object\-hashes\fR] [\fB\-\-next\-page\-token\fR=\fINEXT_PAGE_TOKEN\fR] [\fB\-\-raw\fR] [\fB\-\-soft\-deleted\fR] [\fB\-\-stat\fR] [\fB\-\-decryption\-keys\fR=[\fIDECRYPTION_KEY\fR,...]] [\fB\-\-filter\fR=\fIEXPRESSION\fR] [\fB\-\-limit\fR=\fILIMIT\fR] [\fB\-\-page\-size\fR=\fIPAGE_SIZE\fR] [\fB\-\-sort\-by\fR=[\fIFIELD\fR,...]] [\fB\-\-uri\fR] [\fIGCLOUD_WIDE_FLAG\ ...\fR]
.SH "DESCRIPTION"
List Cloud Storage objects.
Bucket URLs like \f5gs://bucket\fR match all the objects inside a bucket, but
\f5gs://b*\fR fails because it matches a list of buckets.
.SH "EXAMPLES"
List all objects in bucket \f5\fImy\-bucket\fR\fR within current directory
level:
.RS 2m
$ gcloud storage objects list gs://my\-bucket
.RE
List all objects across nested directories using wildcards
(https://cloud.google.com/storage/docs/wildcards):
.RS 2m
$ gcloud storage objects list gs://my\-bucket/**
.RE
List all objects in bucket beginning with ``o'':
.RS 2m
$ gcloud storage objects list gs://my\-bucket/o*
.RE
List all objects in bucket with JSON formatting, only returning the value of the
\f5\fIname\fR\fR metadata field:
.RS 2m
$ gcloud storage objects list gs://my\-bucket \-\-format="json(name)"
.RE
.SH "POSITIONAL ARGUMENTS"
.RS 2m
.TP 2m
\fIURLS\fR [\fIURLS\fR ...]
Specifies URL of objects to list.
.RE
.sp
.SH "FLAGS"
.RS 2m
.TP 2m
\fB\-\-additional\-headers\fR=\fIHEADER\fR=\fIVALUE\fR
Includes arbitrary headers in storage API calls. Accepts a comma separated list
of key=value pairs, e.g. \f5header1=value1,header2=value2\fR. Overrides the
default \fBstorage/additional_headers\fR property value for this command
invocation.
.TP 2m
\fB\-\-exhaustive\fR
For features like soft delete, the API may return an empty list. If present,
continue querying. This may incur costs from repeated LIST calls and may not
return any additional objects.
.TP 2m
\fB\-\-fetch\-encrypted\-object\-hashes\fR
API requests to the LIST endpoint do not fetch the hashes for encrypted objects
by default. If this flag is set, a GET request is sent for each encrypted object
in order to fetch hashes. This can significantly increase the cost of the
command.
.TP 2m
\fB\-\-next\-page\-token\fR=\fINEXT_PAGE_TOKEN\fR
Page token for resuming LIST calls.
.TP 2m
\fB\-\-raw\fR
Shows metadata in the format returned by the API instead of standardizing it.
.TP 2m
\fB\-\-soft\-deleted\fR
Displays soft\-deleted resources only. For objects, it will exclude live and
noncurrent ones.
.TP 2m
\fB\-\-stat\fR
Emulates gsutil stat\-style behavior. Does not show past object versions and
changes output format.
.RE
.sp
.SH "ENCRYPTION FLAGS"
.RS 2m
.TP 2m
\fB\-\-decryption\-keys\fR=[\fIDECRYPTION_KEY\fR,...]
A comma\-separated list of customer\-supplied encryption keys (RFC 4648 section
4 base64\-encoded AES256 strings) that will be used to decrypt Cloud Storage
objects. Data encrypted with a customer\-managed encryption key (CMEK) is
decrypted automatically, so CMEKs do not need to be listed here.
.RE
.sp
.SH "LIST COMMAND FLAGS"
.RS 2m
.TP 2m
\fB\-\-filter\fR=\fIEXPRESSION\fR
Apply a Boolean filter \fIEXPRESSION\fR to each resource item to be listed. If
the expression evaluates \f5True\fR, 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: \fB\-\-flatten\fR,
\fB\-\-sort\-by\fR, \fB\-\-filter\fR, \fB\-\-limit\fR.
.TP 2m
\fB\-\-limit\fR=\fILIMIT\fR
Maximum number of resources to list. The default is \fBunlimited\fR. This flag
interacts with other flags that are applied in this order: \fB\-\-flatten\fR,
\fB\-\-sort\-by\fR, \fB\-\-filter\fR, \fB\-\-limit\fR.
.TP 2m
\fB\-\-page\-size\fR=\fIPAGE_SIZE\fR
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 \fBunlimited\fR (no paging). Paging may
be applied before or after \fB\-\-filter\fR and \fB\-\-limit\fR depending on the
service.
.TP 2m
\fB\-\-sort\-by\fR=[\fIFIELD\fR,...]
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:
\fB\-\-flatten\fR, \fB\-\-sort\-by\fR, \fB\-\-filter\fR, \fB\-\-limit\fR.
.TP 2m
\fB\-\-uri\fR
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 \fB\-\-format\fR,
the formatting is applied on this URI list. To display URIs alongside other keys
instead, use the \fBuri()\fR transform.
.RE
.sp
.SH "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 \fB$ gcloud help\fR for details.
.SH "NOTES"
This variant is also available:
.RS 2m
$ gcloud alpha storage objects list
.RE