
                         ,   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	S
.r\R                  \R                  " \R                   R"                  \R                   R$                  5       " S S\R&                  5      5       5       r\\l        g)zLCommand to add an IAM policy binding to a Colab Enterprise runtime template.    )runtime_templates)util)base)endpoint_util)flags)iam_utilzO
        Add an IAM policy binding to a Colab Enterprise runtime template.
    aA  
        To set `someone@example.com` to have the `roles/aiplatform.notebookRuntimeUser` role for a runtime template with id `my-runtime-template` in region `us-central1`, run:

        $ {command} my-runtime-template --region=us-central1 --member=user:someone@example.com --role=roles/aiplatform.notebookRuntimeUser
    )DESCRIPTIONEXAMPLESc                   .    \ rS rSrSr\S 5       rS rSrg)AddIamPolicyBinding%   zAAdd an IAM policy binding to a Colab Enterprise runtime template.c                 0    [         R                  " U 5        g)z Register flags for this command.N)r   AddFlagsToAddIamPolicyBinding)parsers    =lib/surface/colab/runtime_templates/add_iam_policy_binding.pyArgsAddIamPolicyBinding.Args*   s     
''/    c                    U R                  5       n[        R                  " U R                  5       5      nUR                  R                  R                  5       nUR                  5       S   n[        R                  " SUS9   [        R                  " U5      nUR                  nUR                  [        R                  " X5      5      n[        R                  " UR                   UUR"                  UR$                  5        UR'                  [        R(                  " XU5      5      sSSS5        $ ! , (       d  f       g= f)z9This is what gets called when the user runs this command.locationsIdBETA)versionregionN)ReleaseTrackr   GetMessagesCONCEPTSruntime_templateParseAsDictr   AiplatformEndpointOverrides	GetClient+projects_locations_notebookRuntimeTemplatesGetIamPolicyruntime_templates_util(CreateRuntimeTemplateGetIamPolicyRequestr   AddBindingToIamPolicyGoogleIamV1BindingmemberroleSetIamPolicy(CreateRuntimeTemplateSetIamPolicyRequest)	selfargsrelease_trackmessagesruntime_template_refr   
api_clientruntime_templates_service
iam_policys	            r   RunAddIamPolicyBinding.Run/   s   %%'M 1 1 34H==99??A!((*=9F		2	2v
 >>-0j

@
@   -99
 
I
Ij
 $$

%
%

++
))	 '33
 
I
I%
 
 
s   B$D//
D= N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   r4   __static_attributes__r6   r   r   r   r   %   s     J0 0r   r   N)r;   'googlecloudsdk.api_lib.colab_enterpriser   r$   r   googlecloudsdk.callioper   googlecloudsdk.command_lib.air   +googlecloudsdk.command_lib.colab_enterpriser   googlecloudsdk.command_lib.iamr   _DETAILED_HELPDefaultUniverseOnlyReleaseTracksr   GAr   Commandr   detailed_helpr6   r   r   <module>rI      s    S _ 8 ( 7 = 3		 D%%(($*;*;*@*@A%$,, % B %N %3  !r   