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/396/lib/surface/compute/os_config/inventories/list.yaml
- release_tracks: [GA, ALPHA]

  help_text:
    brief: List inventory data for all Compute Engine VM instances in a specified location.
    description: |
      List inventory data for all Compute Engine VM instances in a specified location.

      The default page size is 25. To modify this, use the `--page-size` flag.
    examples: |
      To list the inventory of VMs in `my-project` and location `us-central1-a`, run:

        $ {command} --project=my-project --location=us-central1-a

  request:
    collection: osconfig.projects.locations.instances.inventories
    ALPHA:
      api_version: v1alpha
    GA:
      api_version: v1
    disable_resource_check: true
    modify_request_hooks:
    - googlecloudsdk.command_lib.compute.os_config.inventories.declarative:SetParentOnListRequestHook
    - googlecloudsdk.command_lib.compute.os_config.declarative:SetDefaultPageSizeRequestHook:default_page_size=25

  response:
    id_field: name
    modify_response_hooks:
    - googlecloudsdk.command_lib.compute.os_config.inventories.declarative:CreateTableViewResponseHook

  arguments:
    params:
    - arg_name: location
      help_text: |
        Location of the Compute Engine VM instances to list. If not specified, the property
        `compute/zone` is used. For details on setting properties,
        see: https://cloud.google.com/sdk/docs/properties
    - api_field: view
      help_text: |
        Specifies what information should be included in the
        output. If unspecified, the default view is `basic`.
      choices:
      - arg_value: basic
        enum_value: BASIC
        help_text: Output is limited to operating system details.
      - arg_value: full
        enum_value: FULL
        help_text: Output includes operating system details and package information.
    - arg_name: unmodified-api-response
      hidden: true
      default: false
      help_text: |
        Do not transform the response from API. Warning: the amount of data returned can be very
        large.
  output:
    format: |
      multi(
        basic:format="table(
           instance_id,
           instance_name,
           os,
           osconfig_agent_version,
           update_time.date('%Y-%m-%dT%H:%M:%SZ')
         )",
        full:format="table(
           instance_id,
           instance_name,
           os,
           installed_packages,
           available_packages,
           osconfig_agent_version,
           update_time.date('%Y-%m-%dT%H:%M:%SZ')
         )"
      )