
                         z    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\R                  5      rg	)
zDestroy a version.    )absolute_import)division)unicode_literals)base)flagsc                   .    \ rS rSrSr\S 5       rS rSrg)Destroy   a  Schedule a version to be destroyed.

Schedules the given version for destruction in 24 hours.

After that time period passes it is automatically destroyed. Once
destroyed, the key material is removed but the version number can
not be reused.

Only versions which are Enabled or Disabled can be Scheduled
for destruction.

## EXAMPLES

The following command schedules version 9 of key `frodo` within
keyring `fellowship` and location `us-east1` for destruction:

  $ {command} 9 --location=us-east1 --keyring=fellowship --key=frodo
c                 2    [         R                  " U S5        g )Nz
to destroy)r   AddKeyVersionResourceArgument)parsers    (lib/surface/kms/keys/versions/destroy.pyArgsDestroy.Args.   s    	''=    c                     [         R                  " 5       n[         R                  " 5       n[        R                  " U5      nUR                  UR                  5       S9nUR                  nUR                  U5      $ )N)name)	cloudkms_baseGetClientInstanceGetMessagesModuler   ParseCryptoKeyVersionNameJCloudkmsProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsDestroyRequestRelativeName8projects_locations_keyRings_cryptoKeys_cryptoKeyVersionsr	   )selfargsclientmessagesversion_refreqckvs          r   RunDestroy.Run2   sl    ,,.F..0H11$7K

]
]%%' ^ )C 
I
IC;;sr    N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   r"   __static_attributes__r$   r   r   r	   r	      s     & > >
r   r	   N)r)   
__future__r   r   r   googlecloudsdk.api_lib.cloudkmsr   r   googlecloudsdk.calliopegooglecloudsdk.command_lib.kmsr   UpdateCommandr	   r$   r   r   <module>r1      s.     &  ' A ( 0"d   "r   