gcloud alpha scc assets list

NAME
gcloud alpha scc assets list - list Cloud Security Command Center assets
SYNOPSIS
gcloud alpha scc assets list[PARENT][--compare-duration=COMPARE_DURATION][--field-mask=FIELD_MASK][--order-by=ORDER_BY][--page-token=PAGE_TOKEN][--read-time=READ_TIME][--filter=EXPRESSION][--limit=LIMIT][--page-size=PAGE_SIZE][--sort-by=[FIELD,…]][GCLOUD_WIDE_FLAG]
DESCRIPTION
(ALPHA)(DEPRECATED) Security Command Center AssetAPIs are deprecated and will be removed on or after June 26, 2024. Use CloudAsset Inventory instead(gcloud asset).For more information,seethe deprecation notice at Assets Page.List Cloud Security Command Center assets.
EXAMPLES
List all assets under organization (123456)
gcloudalphasccassetslist123456

List all assets under project (example-project)

gcloudalphasccassetslistprojects/example-project

List all assets under folder (456)

gcloudalphasccassetslistfolders/456

List all assets under organization (123456) that were present as of2019-01-01T01:00:00 GMT time.

gcloudalphasccassetslist123456--read-time="2019-01-01T01:00:00Z"

Only list category and resource_name for all assets under organization (123456):

gcloudalphasccassetslist123456--field-mask="category,resource_name"

List all compute instances under organization (123456):

gcloudalphasccassetslist123456--filter="security_center_properties.resource_type=\"google.compute.Instance\""

List all firewall rules that have open HTTP Ports:

gcloudalphasccassetslist123456--filter="security_center_properties.resource_type = \"google.compute.Firewall\" AND resource_properties.name =\"default-allow-http\""

List all assets that belong to either projects: 5678 OR 78910 (project's numericidentifier).

gcloudalphasccassetslist123456--filter="security_center_properties.resource_parent = \"//cloudresourcemanager.googleapis.com/projects/5678\" OR security_center_properties.resource_parent = "\78910\""

List all projects that are owned by a user:someone@domain.com. Notice the usageof : which enforces partial matching.

gcloudalphasccassetslist123456--filter="security_center_properties.resource_type = \"google.cloud.resourcemanager.Project\" AND security_center_properties.resource_owners : \"user:someone@domain.com\""

List assets and add a state_change property that indicates if the asset wasadded, removed, or remained present during the past 24 hours period:

gcloudalphasccassetslist123456--compare-duration=86400s
POSITIONAL ARGUMENTS
Parent resource - parent organization, folder, or project in the Google Cloudresource hierarchy to be used for thegcloud scc command. Specify theargument as either [RESOURCE_TYPE/RESOURCE_ID] or [RESOURCE_ID], as shown in thepreceding examples. This represents a Cloud resource.
[PARENT]
ID of the parent or fully qualified identifier for the parent.

To set theparent attribute:

  • provide the argumentparent on the command line;
  • Set the parent property in configuration usinggcloud config setscc/parent if it is not specified in command line.
FLAGS
--compare-duration=COMPARE_DURATION
The result's "state_change" attribute is updated to indicate whether the assetwas added, removed, or remained present during the compare_duration period oftime that precedes the read_time. See$gcloud topic datetimesfor information on supported duration formats.
--field-mask=FIELD_MASK
Field mask to specify the Asset fields to be listed in the response. An emptyfield mask will list all fields. Example field mask:"asset.security_center_properties.resource_type,asset.security_center_properties.resource_parent"
--order-by=ORDER_BY
Expression that defines what fields and order to use for sorting. Example orderby: "resource_properties.sort_prop ASC"
--page-token=PAGE_TOKEN
The value returned by the last 'ListAssetsResponse'; indicates that this is acontinuation of a prior 'ListAssets' call, and that the system should return thenext page of data.
--read-time=READ_TIME
Time used as a reference point when filtering. Absence of this field willdefault to the API's version of NOW. See$gcloud topic datetimesfor information on supported 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.

API REFERENCE
This command uses thesecuritycenter/v1 API. The full documentationfor this API can be found at:https://cloud.google.com/security-command-center
NOTES
This command is currently in alpha and might change without notice. If thiscommand fails with API permission errors despite specifying the correct project,you might be trying to access an API with an invitation-only early accessallowlist. These variants are also available:
gcloudsccassetslist
gcloudbetasccassetslist

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 2026-01-21 UTC.