Ë
    €Ï"  ã                   ó†   — 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 ddl	m
Z
 ddlmZ  G d	„ d
ej                  «      Zy)z(Remove IAM Policy Binding for EkmConfig.é    )Úabsolute_import)Údivision)Úunicode_literals)Úiam)Úbase)Úiam_util)Úresource_argsc                   ó&   — e Zd ZdZed„ «       Zd„ Zy)ÚRemoveIamPolicyBindinga·  Remove IAM policy binding from an EkmConfig.

  Removes a policy binding from the IAM policy of a kms EkmConfig. A binding
  consists of at
  least one member, a role, and an optional condition.

  ## EXAMPLES
  To remove an IAM policy binding for the role of 'roles/editor' for the user
  'test-user@gmail.com' on the EkmConfig with location us-central1, run:

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

  To remove an IAM policy binding with a condition of
  expression='request.time < timestamp("2023-01-01T00:00:00Z")',
  title='expires_end_of_2022',
  and description='Expires at midnight on 2022-12-31' for the role of
  'roles/editor'
  for the user 'test-user@gmail.com' on the EkmConfig with location us-central1,
  run:

    $ {command} --location='us-central1' --member='user:test-user@gmail.com'
    --role='roles/editor' --condition='expression=request.time <
    timestamp("2023-01-01T00:00:00Z"),title=expires_end_of_2022,description=Expires
    at midnight on 2022-12-31'

  To remove all IAM policy bindings regardless of the condition for the role of
  'roles/editor' and for the user 'test-user@gmail.com' on the EkmConfig with
  location us-central1, run:

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

  See https://cloud.google.com/iam/docs/managing-policies for details of
  policy role and member types.
  c                 ó`   — t        j                  | dd«       t        j                  | d¬«       y )NTz
--location)Úadd_condition)r	   ÚAddKmsLocationResourceArgForKMSr   Ú AddArgsForRemoveIamPolicyBinding)Úparsers    ú7lib/surface/kms/ekm_config/remove_iam_policy_binding.pyÚArgszRemoveIamPolicyBinding.ArgsA   s$   € ä×1Ñ1°&¸$ÀÔMÜ×-Ñ-¨fÀDÖIó    c                 ó  — |j                   j                  j                  «       }dj                  |j                  |j
                  «      }t        j                  ||j                  |j                  «      }t        j                  |d«       |S )Nz$projects/{0}/locations/{1}/ekmConfigÚ	EkmConfig)ÚCONCEPTSÚlocationÚParseÚformatÚ
projectsIdÚlocationsIdr   Ú RemovePolicyBindingFromEkmConfigÚmemberÚroler   ÚLogSetIamPolicy)ÚselfÚargsÚlocation_refÚekm_config_nameÚresults        r   ÚRunzRemoveIamPolicyBinding.RunF   so   € Ø—=‘=×)Ñ)×/Ñ/Ó1€LØ<×CÑCØ×Ñ ×!9Ñ!9ó;€Oä×1Ñ1°/À4Ç;Á;Ø26·)±)ó=€Fä×Ñ˜_¨kÔ:Ø€Mr   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ústaticmethodr   r%   © r   r   r   r      s#   „ ñ#ðJ ñJó ðJór   r   N)r)   Ú
__future__r   r   r   Úgooglecloudsdk.api_lib.cloudkmsr   Úgooglecloudsdk.callioper   Úgooglecloudsdk.command_lib.iamr   Úgooglecloudsdk.command_lib.kmsr	   ÚCommandr   r+   r   r   Ú<module>r2      s/   ðñ /å &Ý Ý 'å /Ý (Ý 3Ý 8ô2˜TŸ\™\õ 2r   