release_tracks: [ALPHA, BETA, GA]
help_text:
  brief: Set the IAM policy for a backup.
  description: |
    Sets the IAM policy for the given backup as defined in a JSON or YAML file.

    See https://cloud.google.com/iam/docs/managing-policies for details of
    the policy file format and contents.

  examples: |
    The following command will read an IAM policy defined in a JSON file
    'policy.json' and set it for the backup 'my-backup':

    $ {command} my-backup policy.json

request:
  collection: metastore.projects.locations.services.backups
  ALPHA:
    api_version: v1alpha
  BETA:
    api_version: v1beta
  GA:
    api_version: v1

iam:
  enable_condition: false
  policy_version: 0
  get_iam_policy_version_path: options.requestedPolicyVersion

arguments:
  resource:
    help_text: Backup for which to display the IAM policy.
    spec: !REF googlecloudsdk.command_lib.metastore.resources:backup
