help_text:
  brief: Set an IAM policy on a Cloud Bigtable Backup.
  description: |
    Set an IAM policy on a Cloud Bigtable Backup.

  examples: |
    To set the IAM policy from file `my-policy` on the backup `my-backup` in
    instance `my-instance` and cluster `my-cluster`, run:

      $ {command} my-backup --instance=`my-instance` --cluster=`my-cluster` my-policy

    See https://cloud.google.com/iam/docs/managing-policies for more information.

request:
  collection: bigtableadmin.projects.instances.clusters.backups
  modify_request_hooks:
  - googlecloudsdk.command_lib.iam.hooks:UseMaxRequestedPolicyVersion:api_field=setIamPolicyRequest.policy.version
  - googlecloudsdk.command_lib.iam.hooks:AddVersionToUpdateMaskIfNotPresent:update_mask_path=setIamPolicyRequest.updateMask

arguments:
  resource:
    help_text: Cloud Bigtable Backup to set the IAM policy on.
    spec: !REF googlecloudsdk.command_lib.bigtable.resources:backup

iam:
  policy_version: 3
