
                         8   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                  " S
SSS9\	R                  " \	R                   R"                  \	R                   R$                  5       " S S\	R&                  5      5       5       rg)z5Command to create a fleet namespace RBAC RoleBinding.    )absolute_import)division)unicode_literals)client)util)base)deprecation_utils)	resourcesz447.0.0Tz+gcloud fleet scopes rbacrolebindings create)remove_versionremovealt_commandc                   .    \ rS rSrSr\S 5       rS rSrg)Create   a>  Create an RBAC RoleBinding.

This command can fail for the following reasons:
* The RBAC RoleBinding already exists.
* The caller does not have permission to access the given namespace.

## EXAMPLES

To create an admin RBAC RoleBinding `RBRB` in namespace `NAMESPACE` for user
`person@google.com`, run:

  $ {command} RBRB --namespace=NAMESPACE --role=admin
  --user=person@google.com

To create a viewer RBAC RoleBinding `RBRB` in namespace `NAMESPACE` for group
`people@google.com`, run:

  $ {command} RBRB --namespace=NAMESPACE --role=viewer
  --group=people@google.com
c                    [         R                  " U[        R                  U R	                  5          SS9  UR                  SS9nUR                  S[        SS9  UR                  S[        S	S9  UR                  S
S/ SQSS9  g )NzqName of the RBAC RoleBinding to be created. Must comply with RFC 1123 (up to 63 characters, alphanumeric and '-'))api_versionrbacrb_helpT)requiredz--userzUser for the RoleBinding.)typehelpz--groupzGroup for the RoleBinding.z--role)admineditviewzRole to assign.)r   choicesr   )r
   AddRBACResourceArgr   VERSION_MAPReleaseTrackadd_mutually_exclusive_groupadd_argumentstr)clsparsergroups      Alib/surface/container/fleet/namespaces/rbacrolebindings/create.pyArgsCreate.Args8   s      $$S%5%5%78$	 ///>E	(  
 
)  
 )	      c                     [         R                  " U R                  5       S9nUR                  [        R
                  " U5      UR                  UR                  UR                  S9$ )N)release_track)roleuserr#   )	r   FleetClientr   CreateRBACRoleBindingr
   RBACResourceNamer*   r+   r#   )selfargsfleetclients      r$   Run
Create.RunU   sV    $$43D3D3FGK,,""4(YYYYjj	 -  r'    N)	__name__
__module____qualname____firstlineno____doc__classmethodr%   r2   __static_attributes__r4   r'   r$   r   r      s     *  8r'   r   N)r9   
__future__r   r   r   &googlecloudsdk.api_lib.container.fleetr   r   googlecloudsdk.callioper   googlecloudsdk.command_libr	   *googlecloudsdk.command_lib.container.fleetr
   DeprecateCommandAtVersionReleaseTracksr   ALPHABETACreateCommandr   r4   r'   r$   <module>rF      s    < &  ' 9 7 ( 8 @ ,,=
 D%%++T->->-C-CD9T 9 E9r'   