
                         *   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 dd	lmZ dd
lmZ ddlmZ dZ e	j$                  e	j&                  j(                  e	j&                  j*                         G d de	j,                               Zy)z"Command to create an Azure client.    )absolute_import)division)unicode_literals)azure)base)resource_args)command_util)	constants)endpoint_util)flagsz
To create an Azure client named ``my-client'' in
location ``us-west1'', run:

$ {command} my-client --location=us-west1 --application-id=APP_ID --tenant-id=TENANT_ID
c                   .    e Zd ZdZdeiZed        Zd Zy)CreatezCreate an Azure client.EXAMPLESc                 >   t        j                  | d       | j                  ddd       | j                  dddd	       t        j                  j                  |        t        j                  | d
       | j                  j                  t        j                         y )Nz	to createz--tenant-idTzKAzure Active Directory (AAD) tenant ID (GUID) to associate with the client.)requiredhelpz--application-idapp_idz:Azure Active Directory (AAD) Application/Client ID (GUID).)r   destr   zcreation of the client)r   AddAzureClientResourceArgadd_argumentr   
ASYNC_FLAGAddToParserr   AddValidateOnlydisplay_info	AddFormatr
   AZURE_CLIENT_FORMAT)parsers    -lib/surface/container/azure/clients/create.pyArgszCreate.Args-   s    ++FK@
	   I	   	OO'	&":;
!!)"?"?@    c                 z   t        j                  |      j                  }t        j                  |      5  t        j                  |      }t        j                         }t        j                  |j                  d      }t        j                  ||||t        j                        cddd       S # 1 sw Y   yxY w)zRuns the create command.Creating)action)resource_refresource_clientmessageargskindN)r   ParseAzureClientResourceArglocationsIdr   GkemulticloudEndpointOverrideapi_utilClientsClientr	   ClientMessageazureClientsIdr   r
   AZURE_CLIENT_KIND)selfr'   location
client_ref
api_clientr&   s         r   Runz
Create.RunB   s    88>JJH		4	4X	> <<TBj))+j**

#
#Jg   !$** 
?	>	>s   A2B11B:N)	__name__
__module____qualname____doc__	_EXAMPLESdetailed_helpstaticmethodr   r5    r    r   r   r   '   s(    y)-A A(r    r   N)r9   
__future__r   r   r   .googlecloudsdk.api_lib.container.gkemulticloudr   r,   googlecloudsdk.callioper   *googlecloudsdk.command_lib.container.azurer   2googlecloudsdk.command_lib.container.gkemulticloudr	   r
   r   r   r:   ReleaseTracksReleaseTrackALPHAGACreateCommandr   r=   r    r   <module>rH      sx    ) &  ' L ( D K H L D	 D%%++T->->-A-AB)T ) C)r    