- release_tracks: [GA, ALPHA]

  help_text:
    brief: List OS policy assignments for a specified location.
    description: |
      List OS policy assignments.

      ## EXAMPLES

      To list the OS policy assignments in `my-project` and location `us-central1-a`, run:

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

  request:
    collection: osconfig.projects.locations.osPolicyAssignments
    ALPHA:
      api_version: v1alpha
    GA:
      api_version: v1

  response:
    id_field: name

  arguments:
    resource:
      help_text: Location of the OS policy assignment to query.
      spec: !REF googlecloudsdk.command_lib.compute.os_config.resources:location

  output:
    format: |
      table(
         name.basename():label=ASSIGNMENT_ID,
         rollout_state,
         revision_create_time.date("%Y-%m-%dT%H:%M:%SZ"),
         revision_id
       )
