
                             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                  ej                    G d dej"                                             Zy	)
zE`gcloud dataplex governance-rules remove-iam-policy-binding` command.    )governance_rule)
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)RemoveIamPolicyBindingz:Remove IAM policy binding from a Dataplex Governance Rule.EXAMPLESa  
          To remove an IAM policy binding for the role `roles/dataplex.viewer`
          for the user `testuser@gmail.com` from a governance rule `test-governance-rule` in project
          `test-project` and in location `us-central1`, run:

            $ {command} test-governance-rule --project=test-project --location=us-central1 --role=roles/dataplex.viewer --member=user:testuser@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 remove IAM policy binding from )r   AddGovernanceRuleResourceArgr    AddArgsForRemoveIamPolicyBinding)parsers    Blib/surface/dataplex/governance_rules/remove_iam_policy_binding.pyArgszRemoveIamPolicyBinding.Args.   s&    ..4 --f5    z-Status code: {status_code}. {status_message}.c                     |j                   j                  j                         }t        j                  ||j                  |j
                        }|S )N)CONCEPTSr   Parser	   memberrole)selfargsgovernance_rule_refresults       r   RunzRemoveIamPolicyBinding.Run6   sC     --77==?33T[[$))F Mr   N)
__name__
__module____qualname____doc__detailed_helpstaticmethodr   gcloud_exception CatchHTTPErrorRaiseHTTPExceptionr    r   r   r	   r	      sR     C  -  6 6 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DefaultUniverseOnlyHiddenCommandr	   r$   r   r   <module>r0      sl    L ; F ( = 3 D%%++,#T\\ #   -#r   