gcloud scc assets get-parent

NAME
gcloud scc assets get-parent - get the Parent for an asset given its resource name or asset id
SYNOPSIS
gcloud scc assets get-parent[ORGANIZATION](--asset=ASSET    |--resource-name=RESOURCE_NAME)[GCLOUD_WIDE_FLAG]
DESCRIPTION
(DEPRECATED) Security Command Center Asset APIs are deprecated andwill be removed on or after June 26, 2024. Use Cloud Asset Inventory instead(gcloud asset).For more information,seethe deprecation notice at Assets Page.Get the Parent for an asset given its resource name or asset id.
EXAMPLES
Get parent's relative resource name given an asset's full resource name(https://cloud.google.com/apis/design/resource_names#full_resource_name) e.g.//storage.googleapis.com/my-bucket under organization 123456:
gcloudsccassetsget-parent123456--resource-name="//storage.googleapis.com/my-bucket"

Get parent's relative resource name given an asset's Cloud SCC id 5678 underorganization 123456.

gcloudsccassetsget-parent123456--asset=5678
POSITIONAL ARGUMENTS
Organization resource - The organization to be used for the SCC (SecurityCommand Center) command. This represents a Cloud resource.
[ORGANIZATION]
ID of the organization or fully qualified identifier for the organization.

To set theorganization attribute:

  • provide the argumentorganization on the command line;
  • Set the organization property in configuration usinggcloud config setscc/organization if it is not specified in command line..
REQUIRED FLAGS
Exactly one of these must be specified:
--asset=ASSET
Cloud SCC specific asset. It's derived from the the asset's relative resourcename. See:https://cloud.google.com/apis/design/resource_names#relative_resource_name.For Example, for the given asset name: "organizations/123/assets/456", 456represents asset id.
--resource-name=RESOURCE_NAME
Asset's resource name. Full resource name of the Google Cloud Platform resourcethis asset represents. This field is immutable after create time. See:https://cloud.google.com/apis/design/resource_names#full_resource_name.For Example: "//cloudresourcemanager.googleapis.com/projects/1234567890123"could be the resource-name for a 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.

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
These variants are also available:
gcloudalphasccassetsget-parent
gcloudbetasccassetsget-parent

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.