
                            S r SSKJr  SSKJr  SSKJr  SSKJr  SSKJ	r
  SSKJr  SSKJr  SS	KJr  \R$                  \R&                  " \R(                  R*                  5       " S
 S\R,                  5      5       5       r\R$                  \R&                  " \R(                  R0                  5       " S S\5      5       5       rg)z:Command to remove-iam-policy-binding to a secret resource.    )absolute_import)division)unicode_literals)api)
exceptions)base)iam_util)argsc                   `    \ rS rSrSrSS0r\S 5       r\R                  " S5      S 5       r
Srg	)
RemoveIamPolicyBinding   zRemove IAM policy binding for a secret.

Removes a policy binding from the IAM policy of a secret. One binding
consists of a member and a role.

See https://cloud.google.com/iam/docs/managing-policies for details of
policy role and member types.
EXAMPLES          To remove an IAM policy binding for the role of 'roles/viewer' for the user
          'test-user@gmail.com' on the my-secret, run:

          $ {command} my-secret --member='user:test-user@gmail.com' --role='roles/viewer'
        c                     [         R                  " U SSSSS9  [         R                  " U SSS9  [        R                  " U SS9  g )	N Tz;Name of the secret from which to remove IAM policy binding.)purpose
positionalrequired	help_textzto remove iam policyF)r   hidden)add_condition)secrets_args	AddSecretAddLocationr	    AddArgsForRemoveIamPolicyBinding)parsers    0lib/surface/secrets/remove_iam_policy_binding.pyArgsRemoveIamPolicyBinding.Args2   sI    O .u --fDI    z-Status code: {status_code}. {status_message}.c                    [         R                  " U R                  5       5      nUR                  R                  R                  5       n[        R                  " U5      n[         R                  " US9R                  UUR                  UR                  UUR                  S9n[        R                  " UR                  5       S5        U$ )N)api_version)	conditionsecret_locationsecret)secrets_apiGetApiFromTrackReleaseTrackCONCEPTSr%   Parser	   $ValidateAndExtractConditionMutexRoleSecretsr   memberrolelocationLogSetIamPolicyName)selfr
   r"   
secret_refr#   results         r   RunRemoveIamPolicyBinding.RunA   s     --d.?.?.ABK%%++-J==dCI  		    Z__.9Mr     N)__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr   gcloud_exception CatchHTTPErrorRaiseHTTPExceptionr5   __static_attributes__r7   r    r   r   r      sP      - J J 445r    r   c                        \ rS rSrSrSS0rSrg)RemoveIamPolicyBindingBetaU   z/Remove IAM policy binding of a secret resource.r   r   r7   N)r8   r9   r:   r;   r<   r=   rA   r7   r    r   rC   rC   U   s     8  -r    rC   N)r<   
__future__r   r   r   googlecloudsdk.api_lib.secretsr   r&   googlecloudsdk.api_lib.utilr   r?   googlecloudsdk.callioper   googlecloudsdk.command_lib.iamr	   "googlecloudsdk.command_lib.secretsr
   r   DefaultUniverseOnlyReleaseTracksr(   GACommandr   BETArC   r7   r    r   <module>rP      s    A '  ' = F ( 3 C D%%(()3T\\ 3 * 3l D%%**+
!7 
 , 
r    