
                             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   " S
 S\
R                  5      rg)zCCommand for deleting access configs from virtual machine instances.    )absolute_import)division)unicode_literals)base_classes)	constants)arg_parsers)base)flagsc                   8    \ rS rSrSrSSS.r\S 5       rS rSr	g	)
DeleteAccessConfig   zHDelete an access configuration from a virtual machine network interface.a  
        *{command}* is used to delete access configurations from network
        interfaces of Compute Engine virtual machines. Access
        configurations let you assign a public, external IP to a virtual
        machine. The delete-access-config operation removes external IP from
        the instance interface. If there is traffic routed to the external IP,
        after deleting the access config operation, traffic to the external IP
        will not reach the VM anymore.
      z
        To remove the externally accessible IP from a virtual machine named
        ``example-instance'' in zone ``us-central1-a'', run:

          $ {command} example-instance --zone=us-central1-a
      )DESCRIPTIONEXAMPLESc                    [         R                  R                  U 5        U R                  S[        R
                  SR                  [        R
                  5      S9  U R                  S[        R                  [        R                  SS9  g )Nz--access-config-namez        Specifies the name of the access configuration to delete.
        ``{0}'' is used as the default if this flag is not provided.
        )defaulthelpz--network-interfacez        Specifies the name of the network interface from which to delete the
        access configuration. If this is not provided, then ``nic0'' is used
        as the default.
        )r   actionr   )
r
   INSTANCE_ARGAddArgumentadd_argumentr   DEFAULT_ACCESS_CONFIG_NAMEformatDEFAULT_NETWORK_INTERFACEr   StoreOnceAction)parsers    5lib/surface/compute/instances/delete_access_config.pyArgsDeleteAccessConfig.Args2   s{    	""6*
44 F9778   33**	  	    c                    [         R                  " U R                  5       5      nUR                  n[        R
                  R                  UUR                  [        R                  " U5      S9nUR                  R                  UR                  UR                  5       UR                  UR                  UR                  S9nUR!                  UR"                  R$                  SU4/5      $ )z8Invokes request necessary for removing an access config.)scope_lister)accessConfiginstancenetworkInterfaceprojectzoner   )r   ComputeApiHolderReleaseTrackclientr
   r   ResolveAsResource	resourcesGetInstanceZoneScopeListermessages)ComputeInstancesDeleteAccessConfigRequestaccess_config_nameNamenetwork_interfacer%   r&   MakeRequestsapitools_client	instances)selfargsholderr)   instance_refrequests         r   RunDeleteAccessConfig.RunH   s    **4+<+<+>?F]]F%%7755f= 8 L ooGG,,""$//$$ H G 

 
 
*
*,@'	JK r    N)
__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr   r:   __static_attributes__r<   r   r   r   r      s/    P

-$  *r   r   N)rA   
__future__r   r   r   googlecloudsdk.api_lib.computer   r   googlecloudsdk.callioper   r	   ,googlecloudsdk.command_lib.compute.instancesr
   SilentCommandr   r<   r   r   <module>rJ      s7     J &  ' 7 4 / ( >@++ @r   