
    	                     *   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 delete an Anthos cluster on Azure.    )absolute_import)division)unicode_literals)azure)base)resource_args)command_util)	constants)endpoint_util)flagsz}
To delete a cluster named ``my-cluster'' managed in location ``us-west1'', run:

$ {command} my-cluster --location=us-west1
c                   .    e Zd ZdZdeiZed        Zd Zy)Deletez"Delete an Anthos cluster on Azure.EXAMPLESc                     t        j                  | d       t        j                  | d       t        j                  | t
        j                  d       t        j                  j                  |        y )Nz	to deletecluster)
r   AddAzureClusterResourceArgr   AddAllowMissingAddIgnoreErrorsr
   AZUREr   
ASYNC_FLAGAddToParser)parsers    .lib/surface/container/azure/clusters/delete.pyArgszDelete.Args*   sJ    ,,V[A	&),	&)//9=OO'    c                    t        j                  |      j                  }t        j                  |      5  t        j                  |      }t        j                         }|j                  |      }t        j                  |j                  t        j                  |j                        }t        j                  ||||t        j                         ddd       y# 1 sw Y   yxY w)zRuns the delete command.)kindregionN)r   ParseAzureClusterResourceArglocationsIdr   GkemulticloudEndpointOverrideapi_utilClustersClientGetr	   ClusterMessageazureClustersIdr
   r   azureRegionDeleteWithIgnoreErrorsAZURE_CLUSTER_KIND)selfargslocationcluster_refcluster_clientr   messages          r   Runz
Delete.Run3   s    99$?KKH		4	4X	>!>>tDk..0n"";/g++

%
%$$g
 ))





&
& 
?	>	>s   BCC#N)	__name__
__module____qualname____doc__	_EXAMPLESdetailed_helpstaticmethodr   r0    r   r   r   r   $   s&    *y)-( (r   r   N)r4   
__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   r5   ReleaseTracksReleaseTrackALPHAGADeleteCommandr   r8   r   r   <module>rC      sx    4 &  ' L ( D K H L D	 D%%++T->->-A-AB T   C r   