release_tracks: [ALPHA, BETA, GA]
help_text:
  brief: Set the IAM policy for the service.
  description: |
    Sets the IAM policy for the given service 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 service 'my-service':

    $ {command} my-service policy.json

request:
  collection: metastore.projects.locations.services
  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: Service for which to display the IAM policy.
    spec: !REF googlecloudsdk.command_lib.metastore.resources:service
