
    z                        d Z ddlmZ ddlmZ ddlmZ ddlm	Z	 ddl
mZ  ej                  ej                  j                  ej                  j                        ej                    G d dej"                                      Zy	)
z<`gcloud dataplex glossaries add-iam-policy-binding` command.    )glossary)
exceptions)base)resource_args)iam_utilc                   X    e Zd ZdZddiZed        Z ej                  d      d        Z	y)AddIamPolicyBindingz.Add IAM policy binding to a Dataplex Glossary.EXAMPLESa            To add an IAM policy binding for the role of `roles/dataplex.viewer`
          for the user `test-user@gmail.com` to Glossary `test-glossary` in location
          `us-central`, run:
            $ {command} test-glossary --project=test-project  --location=us-central1 --role=roles/dataplex.viewer --member=user:test-user@gmail.com
          See https://cloud.google.com/dataplex/docs/iam-roles for details of
          policy role and member types.
          c                 Z    t        j                  | d       t        j                  |        y )Nzto add IAM policy binding to.)r   AddGlossaryResourceArgr   AddArgsForAddIamPolicyBinding)parsers    9lib/surface/dataplex/glossaries/add_iam_policy_binding.pyArgszAddIamPolicyBinding.Args'   s&    ((/ **62    z-Status code: {status_code}. {status_message}.c                     |j                   j                  j                         }t        j                  ||j                  |j
                        }|S )N)CONCEPTSr   ParseGlossaryAddIamPolicyBindingmemberrole)selfargsglossary_refresults       r   RunzAddIamPolicyBinding.Run.   sB     ==))//1L11dkk499F Mr   N)
__name__
__module____qualname____doc__detailed_helpstaticmethodr   gcloud_exception CatchHTTPErrorRaiseHTTPExceptionr    r   r   r	   r	      sQ     7  	- 3 3 5445r   r	   N)r    googlecloudsdk.api_lib.dataplexr   googlecloudsdk.api_lib.utilr   r#   googlecloudsdk.callioper   #googlecloudsdk.command_lib.dataplexr   googlecloudsdk.command_lib.iamr   ReleaseTracksReleaseTrackALPHAGADefaultUniverseOnlyCommandr	   r%   r   r   <module>r1      so    C 4 F ( = 3 D%%++T->->-A-AB$,,   Cr   