- release_tracks: [GA]
  help_text:
    brief: |
      Set the IAM policy for a CA pool.
    description: |
      Sets the IAM policy for the given CA pool 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 CA pool 'my-pool' with the location 'us-west1':

        $ {command} my-pool policy.json --location=us-west1

  request:
    collection: privateca.projects.locations.caPools
    api_version: v1

  arguments:
    resource:
      help_text: The CA pool for which to update the IAM policy.
      spec: !REF googlecloudsdk.command_lib.privateca.resources:ca_pool

  iam:
    enable_condition: true
    policy_version: 3
    get_iam_policy_version_path: options_requestedPolicyVersion
