gcloud beta asset list

NAME
gcloud beta asset list - list the Cloud assets
SYNOPSIS
gcloud beta asset list(--folder=FOLDER_ID    |--organization=ORGANIZATION_ID    |--project=PROJECT_ID)[--asset-types=[ASSET_TYPES,…]][--content-type=CONTENT_TYPE][--relationship-types=[RELATIONSHIP_TYPES,…]][--snapshot-time=SNAPSHOT_TIME][--filter=EXPRESSION][--limit=LIMIT][--page-size=PAGE_SIZE][--sort-by=[FIELD,…]][GCLOUD_WIDE_FLAG]
DESCRIPTION
(BETA) List the Cloud assets. Note that to list a project differentfrom the project you want to bill, you can use --billing-project or authenticatewith a service account. Seehttps://cloud.google.com/resource-manager/docs/cloud-asset-inventory/gcloud-assetfor examples of using a service account.
EXAMPLES
To list a snapshot of assets of type 'compute.googleapis.com/Disk' in project'test-project' at '2019-03-05T00:00:00Z', run:
gcloudbetaassetlist--project='test-project'--asset-types='compute.googleapis.com/Disk'--snapshot-time='2019-03-05T00:00:00Z'
REQUIRED FLAGS
Exactly one of these must be specified:
--folder=FOLDER_ID
The ID of the folder which is the root asset.
--organization=ORGANIZATION_ID
The ID of the organization which is the root asset.
--project=PROJECT_ID
The project which is the root asset.

The Google Cloud project ID to use for this invocation. If omitted, then thecurrent project is assumed; the current project can be listed usinggcloudconfig list --format='text(core.project)' and can be set usinggcloud config set project PROJECTID.

--project and its fallbackcore/project property playtwo roles in the invocation. It specifies the project of the resource to operateon. It also specifies the project for API enablement check, quota, and billing.To specify a different project for quota and billing, use--billing-project orbilling/quota_project property.

FLAGS
--asset-types=[ASSET_TYPES,…]
A list of asset types (i.e., "compute.googleapis.com/Disk") to take a snapshot.If specified and non-empty, only assets matching the specified types will bereturned. Seehttp://cloud.google.com/asset-inventory/docs/supported-asset-typesfor supported asset types.
--content-type=CONTENT_TYPE
Asset content type. If not specified, no content but the asset name and typewill be returned in the feed. For more information, seehttps://cloud.google.com/asset-inventory/docs/reference/rest/v1/feeds#ContentType.CONTENT_TYPE must be one of:resource,iam-policy,org-policy,access-policy,os-inventory,relationship.
--relationship-types=[RELATIONSHIP_TYPES,…]
A list of relationship types (i.e., "INSTANCE_TO_INSTANCEGROUP") to take asnapshot. This argument will only be honoured if content_type=RELATIONSHIP. Ifspecified and non-empty, only relationships matching the specified types will bereturned. Seehttp://cloud.google.com/asset-inventory/docs/supported-asset-typesfor supported relationship types.
--snapshot-time=SNAPSHOT_TIME
Timestamp to take a snapshot on assets. This can only be a current or past time.If not specified, the current time will be used. Due to delays in resource datacollection and indexing, there is a volatile window during which running thesame query at different times may return different results. See $gcloud topic datetimes forinformation on time formats.
LIST COMMAND FLAGS
--filter=EXPRESSION
Apply a Boolean filterEXPRESSION to each resource itemto be listed. If the expression evaluatesTrue, then that item islisted. For more details and examples of filter expressions, run $gcloud topic filters. This flaginteracts with other flags that are applied in this order:--flatten,--sort-by,--filter,--limit.
--limit=LIMIT
Maximum number of resources to list. The default isunlimited. Thisflag 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 themaximum number of resources per page. The default is determined by the serviceif it supports paging, otherwise it isunlimited (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 orderis ascending. Prefix a field with ``~´´ for descending order on thatfield. This flag interacts with other flags that are applied in this order:--flatten,--sort-by,--filter,--limit.
GCLOUD WIDE FLAGS
These flags are available to all commands:--access-token-file,--account,--billing-project,--configuration,--flags-file,--flatten,--format,--help,--impersonate-service-account,--log-http,--project,--quiet,--trace-token,--user-output-enabled,--verbosity.

Run$gcloud help for details.

NOTES
This command is currently in beta and might change without notice. Thesevariants are also available:
gcloudassetlist
gcloudalphaassetlist

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-05-07 UTC.