- release_tracks: [ALPHA, BETA, GA]

  help_text:
    brief: List access policies.
    description: |
      List access policies.

      ## EXAMPLES

      To list access policies, run the following command:

        $ {command}

      This command prints a list of Access Policies in a tabular form:

        NAME      ORGANIZATION SCOPE        TITLE      ETAG
        MY_POLICY 12345        projects/123 My Policy  123abcdef

  request:
    collection: accesscontextmanager.accessPolicies
    api_version: v1
    BETA:
      api_version: v1
    ALPHA:
      api_version: v1alpha
    resource_method_params:
      parent: '{__relative_name__}'

  arguments:
    resource:
      help_text: The parent organization of the policies you want to list.
      spec: !REF googlecloudsdk.command_lib.organizations.resources:organization

  output:
    format: |
      table(
          name.basename(),
          parent.basename():label=ORGANIZATION,
          scopes.flatten(),
          title,
          etag
      )
