- release_tracks: [GA, ALPHA]

  help_text:
    brief: List vulnerability report data for all Compute Engine VM instances in a specified location.
    description: |
      List vulnerability report 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 vulnerability report of Compute Engine VM instances in `my-project`
      and location `us-central1-a`, run:

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

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

  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
  output:
    format: |
      table(
         name.segment(-2):label=INSTANCE_ID,
         vulnerabilities.len():label=VULNERABILITY_COUNT,
         update_time.date("%Y-%m-%dT%H:%M:%SZ")
       )
