- gcloud alpha scc assets list - list Cloud Security Command Center assets
(ALPHA)List Cloud Security Command Center assets.
- POSITIONAL ARGUMENTS
Organization resource - The organization to be used for the SCC (Security
Command Center) command. This represents a Cloud resource.
- ID of the organization or fully qualified identifier for the organization.
- Organization resource - The organization to be used for the SCC (Security Command Center) command. This represents a Cloud resource.
- ListAssetResult's "state" attribute is updated to indicate whether the asset was added, removed, or remained present during the compare_duration period of time that precedes the read_time. Example duration: "100000s"
- Field mask to specify the Asset fields to be listed in the response. An empty field mask will list all fields. Example field mask: "asset.security_center_properties.resource_type,asset.security_center_properties.resource_parent"
- Expression that defines what fields and order to use for sorting. Example order by: "resource_properties.sort_prop ASC"
- The value returned by the last 'ListAssetsResponse'; indicates that this is a continuation of a prior 'ListAssets' call, and that the system should return the next page of data.
- Time used as a reference point when filtering assets. Default: NOW Example read time: "2019-02-28T07:00:06.861Z"
- LIST COMMAND FLAGS
Apply a Boolean filter
EXPRESSIONto 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:
Maximum number of resources to list. The default is
unlimited. This flag interacts with other flags that are applied in this order:
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
--limitdepending on the service.
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:
- GCLOUD WIDE FLAGS
These flags are available to all commands: --account, --billing-project, --configuration, --flags-file, --flatten, --format, --help, --impersonate-service-account,
--log-http, --project, --quiet, --trace-token, --user-output-enabled,
$ gcloud helpfor details.
- API REFERENCE
This command uses the
securitycenter/v1API. The full documentation for this API can be found at: https://console.cloud.google.com/apis/api/securitycenter.googleapis.com/overview
List all assets under organization (123456)
gcloud alpha scc assets list 123456
List all assets under organization (123456) that were present as of 2019-01-01T01:00:00 GMT time.
gcloud alpha scc assets list 123456 --read-time "2019-01-01T01:00:00Z"
Only list category and resource_name for all assets under organization (123456):
gcloud alpha scc assets list 123456 --field-mask "category,resource_name"
List all compute instances under organization (123456):
gcloud alpha scc assets list 123456 --filter "security_center_properties.resource_type=\"google.compute.Instance\""
List all firewall rules that have open HTTP Ports:
gcloud alpha scc assets list 123456 --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 numeric identifier).
gcloud alpha scc assets list 123456 --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:email@example.com. Notice the usage of : which enforces partial matching.
gcloud alpha scc assets list 123456 --filter "security_center_properties.resource_type =\"google.cloud.resourcemanager.Project\" AND security_center_properties.resource_owners : \"user:firstname.lastname@example.org\""
List assets and add a state_change property that indicates if the asset was added, removed, or remained present during the past 24 hours period:
gcloud alpha scc assets list 123456 --compare-duration 86400s
- This command is currently in ALPHA and may change without notice. If this command fails with API permission errors despite specifying the right project, you may be trying to access an API with an invitation-only early access whitelist.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-06-23 UTC.