
                         L   S r SSKJr  SSKJr  SSKJr  SSK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"                  R(                  5       " S S\	R*                  5      5       r\\l        g)zUpdate endpoint command.    )absolute_import)division)unicode_literalsN)ids_api)base)flags)
exceptionsz
          Update the endpoint for the specified VPC network. Check the
          progress of endpoint update by using `gcloud alpha ids endpoints
          list`.

          For more examples, refer to the EXAMPLES section below.


        a]  
            To update an endpoint called `my-endpoint`, excluding threat IDs
            1000 and 2000, run:

            $ {command} my-endpoint --threat-exceptions=1000,2000

            To update an endpoint called `my-endpoint`, clearing the excluded
            threat list, run:

            $ {command} my-endpoint --threat-exceptions=

    )DESCRIPTIONEXAMPLESc                   .    \ rS rSrSr\S 5       rS rSrg)UpdateAlpha7   z&Update an existing Cloud IDS endpoint.c                    [         R                  " U 5        [         R                  " U SS9  [         R                  " U S5        [        R
                  R                  U 5        [        R
                  R                  U S5        g )NF)required60mT)r   AddEndpointResourceAddThreatExceptionsArg
AddMaxWaitr   
ASYNC_FLAGAddToParser
SetDefault)parsers    #lib/surface/ids/endpoints/update.pyArgsUpdateAlpha.Args<   sV    	f%	  %8	VU#OO'OOvt,    c                    [         R                  " U R                  5       5      nUR                  R                  R                  5       n/ nUR                  S5      (       a  UR                  nUR                  S5        O[        R                  " S5      eUR                  n[        R                  " UR                  S9nUR                  UR!                  5       UUS9nU(       a  UR                  S5      (       d  SUl        U$ UR%                  UR'                  U5      SR#                  UR!                  5       5      US9$ )	Nthreat_exceptionszMissing --threat-exceptions.)seconds)r   update_maskformatdefaultz'waiting for endpoint [{}] to be updated)operation_refmessagemax_wait)r   ClientReleaseTrackCONCEPTSendpointParseIsSpecifiedr   appendcore_exceptionsErrorasync_datetime	timedeltar%   UpdateEndpointRelativeNamer!   WaitForOperationGetOperationRef)	selfargsclientr)   r    r   is_asyncr%   	operations	            r   RunUpdateAlpha.RunD   s!   ^^D--/0F}}%%++-HK+,,00,-!!"@AA{{H!!$--8H%%+ & !I
  h''"",,Y79@@!!#%	 #  r    N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   r;   __static_attributes__r=   r   r   r   r   7   s     /- -r   r   )rB   
__future__r   r   r   r0   googlecloudsdk.api_lib.idsr   googlecloudsdk.callioper   googlecloudsdk.command_lib.idsr   googlecloudsdk.corer	   r-   DETAILED_HELPReleaseTracksr'   ALPHABETAGAUpdateCommandr   detailed_helpr=   r   r   <module>rQ      s     &  '  . ( 0 =		6 D%%++T->->-C-C%%((*($$$ (*(V * r   