
                             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r\R                  " \R                  R                   \R                  R"                  5       " S	 S
\R$                  5      5       rg)zCommand to cancel an operation.    )
operations)base)resource_args)command_util)endpoint_util)logze
To cancel an operation in location ``us-west1'', run:

$ {command} OPERATION_ID --location=us-west1
c                   6    \ rS rSrSrS\0r\S 5       rS r	Sr
g)Cancel    zCancel an operation.EXAMPLESc                 2    [         R                  " U S5        g)z!Registers flags for this command.z	to cancelN)r   AddOperationResourceArg)parsers    .lib/surface/container/aws/operations/cancel.pyArgsCancel.Args&   s     ))&+>    c                 6   [         R                  " [        R                  " U5      R                  U R                  5       5         [        R                  " 5       n[        R                  " U5      nUR                  U5      n[        R                  " UR                  5        UR                  U5        [        R                  R                  [        R                   " UR                  S5      5        UR                  U5      sSSS5        $ ! , (       d  f       g= f)zRuns the cancel command.awsN)r   GkemulticloudEndpointOverrider   ParseOperationResourceArglocationsIdReleaseTrackop_api_utilOperationsClientGetr   CancelOperationPromptnamer
   r   statusPrintCancelOperationMessage)selfargs	op_clientop_refops        r   Run
Cancel.Run+   s    		4	4//5AA
 ..0i66t<f== b((1v	jj|::277EJK]]6"
 
 
s   B<D


D N)__name__
__module____qualname____firstlineno____doc__	_EXAMPLESdetailed_helpstaticmethodr   r'   __static_attributes__r)   r   r   r
   r
       s&    y)-? ?#r   r
   N)r.   .googlecloudsdk.api_lib.container.gkemulticloudr   r   googlecloudsdk.callioper   (googlecloudsdk.command_lib.container.awsr   2googlecloudsdk.command_lib.container.gkemulticloudr   r   googlecloudsdk.corer   r/   ReleaseTracksr   ALPHAGACommandr
   r)   r   r   <module>r<      sk    & U ( B K L #	 D%%++T->->-A-AB#T\\ # C#r   