HEX
Server: Apache/2.4.65 (Ubuntu)
System: Linux ielts-store-v2 6.8.0-1036-gcp #38~22.04.1-Ubuntu SMP Thu Aug 14 01:19:18 UTC 2025 x86_64
User: root (0)
PHP: 7.2.34-54+ubuntu20.04.1+deb.sury.org+1
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: //snap/google-cloud-cli/current/lib/surface/scc/assets/get_project.yaml
- release_tracks: [ALPHA, BETA, GA]
  deprecate:
    is_removed: false
    warning: |
      Security Command Center Asset APIs are deprecated and will be removed on or after
      June 26, 2024. Use Cloud Asset Inventory instead [(gcloud asset)](https://cloud.google.com/sdk/gcloud/reference/asset).
      For more information, [see the deprecation notice at Assets Page](https://cloud.google.com/security-command-center/docs/how-to-use-security-command-center#assets_page).

  # This command calls a list operation behind the scenes but we can't make command_type as list
  # since it doesn't support any of the list-flags.
  command_type: GENERIC
  generic:
    disable_paging_flags: true

  help_text:
    brief: Get the Project for an asset given its resource name or asset id.
    description: Get the Project for an asset given its resource name or asset id.
    examples: |
      Get project id (https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) 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:

        $ {command} 123456 --resource-name="//storage.googleapis.com/my-bucket"

      Get project id given an asset's Cloud SCC id 5678 under organization 123456.

        $ {command} 123456 --asset=5678

  request:
    collection: securitycenter.organizations.assets
    api_version: v1
    method: list
    modify_request_hooks:
    - googlecloudsdk.command_lib.scc.assets.request_hooks:GetProjectAssetReqHook

  arguments:
    additional_arguments_hook: googlecloudsdk.command_lib.scc.hooks:AppendOrgArg

    params:
    - group:
        mutex: true
        required: true
        params:
        - arg_name: asset
          help_text: |
            Cloud SCC specific asset. It's derived from the the asset's relative resource name.
            See: https://cloud.google.com/apis/design/resource_names#relative_resource_name.
            For Example, for the given asset name: "organizations/123/assets/456", 456 represents
            asset id.
        - arg_name: resource-name
          help_text: |
            Asset's resource name. Full resource name of the Google Cloud Platform resource
            this 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.

  response:
    modify_response_hooks:
    - googlecloudsdk.command_lib.scc.assets.response_hooks:ExtractMatchingAssetFromGetProjectResponse