- release_tracks: [GA]
  help_text:
    brief: Add an IAM policy binding to a Data Catalog entry group.
    description: Add an IAM policy binding to a Data Catalog entry group.

    examples: |
      To add an IAM policy binding for the role of 'roles/editor' for the user 'test-user@gmail.com'
      with entry group 'group1' and location 'us-central1', run:

        $ {command} group1 --location='us-central1' --member='user:test-user@gmail.com' --role='roles/editor'

      See https://cloud.google.com/iam/docs/managing-policies for details of
      policy role and member types.

  request:
    api_version: v1
    collection: datacatalog.projects.locations.entryGroups

  arguments:
    resource:
      help_text: Entry group for which to add an IAM policy binding.
      spec: !REF googlecloudsdk.command_lib.data_catalog.resources:entry_group
      is_positional: true

- release_tracks: [ALPHA, BETA]
  help_text:
    brief: Add an IAM policy binding to a Data Catalog entry group.
    description: Add an IAM policy binding to a Data Catalog entry group.

    examples: |
      To add an IAM policy binding for the role of 'roles/editor' for the user 'test-user@gmail.com'
      with entry group 'group1' and location 'us-central1', run:

        $ {command} group1 --location='us-central1' --member='user:test-user@gmail.com' --role='roles/editor'

      See https://cloud.google.com/iam/docs/managing-policies for details of
      policy role and member types.

  request:
    collection: datacatalog.projects.locations.entryGroups

  arguments:
    resource:
      help_text: Entry group for which to add an IAM policy binding.
      spec: !REF googlecloudsdk.command_lib.data_catalog.resources:entry_group
      is_positional: true
