- release_tracks: [ALPHA, BETA]

  help_text:
    brief: List backup plan bindings.
    description: |
      List Backup Plan Bindings for GKE backup plan bindings.

      ## EXAMPLES

      To list all backup plan bindings in project ``my-project'' in location ``us-central1'' under backup channel ``my-backup-channel'', run:

        $ {command} --backup-channel=my-backup-channel --project=my-project --location=us-central1

      To list all backup plan bindings in project ``my-project'' across all locations under all backup channels, run:

        $ {command} --project=my-project


  request:
    collection: gkebackup.projects.locations.backupChannels.backupPlanBindings
    api_version: v1

  response:
    id_field: name

  arguments:
    resource:
      help_text: |
        Name of the backup channel from which to list backup plan bindings (provided via options or through
        properties), e.g.
        `--project=<project> --location=<location> --backup-channel=<backupChannel>`.
      spec: !REF googlecloudsdk.command_lib.container.backup_restore.resources:backup_channel

  output:
    format: |
      table(
        name.basename():label=NAME,
        name.segment(3):label=LOCATION,
        name.segment(5):label=BACKUP_CHANNEL,
        createTime.date('%Y-%m-%dT%H:%M:%S %Z', tz=LOCAL),
        cluster,
        backupPlan
      )
