
    $                     L   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  \	R"                  " \	R$                  R&                  5       " S
 S\	R(                  5      5       r\	R"                  " \	R$                  R,                  5       " S S\5      5       rg)z*Creates a Cloud NetApp Volumes KMS Config.    )absolute_import)division)unicode_literals)client)base)flags)labels_util)logc                   d    \ rS rSrSrSSS.r\R                  R                  r	\
S 5       rS rSrg	)
Create   )Create a Cloud NetApp Volumes KMS Config.z          Creates a KMS (Key Management System) Config to encrypt Cloud NetApp Volumes, Storage Pools etc. using Customer Managed Encryption Keys (CMEK)
          aE            The following command creates a KMS Config instance named KMS_CONFIG using specified project, location, Key Ring and Crypto Key

              $ {command} KMS_CONFIG --location=us-central1 --kms-location=northamerica-northeast1 --kms-project=kms-project1 --kms-keyring=kms-keyring21 --kms-key=crypto-key1
          )DESCRIPTIONEXAMPLESc                 0    [         R                  " U 5        g )N)kmsconfigs_flagsAddKMSConfigCreateArgs)parsers    (lib/surface/netapp/kms_configs/create.pyArgsCreate.Args-   s    ++F3    c                    UR                   R                  R                  5       n[        R                  " U R
                  5      n[        R                  " XR                  R                  R                  5      n[        R                  " UR                  UR                  UR                  UR                   5      nUR#                  UR%                  5       UUR&                  US9nUR)                  X!R*                  U5      nUR*                  (       aW  SR-                  U R/                  5       R0                  5      n[2        R4                  R7                  SR-                  U5      5        U$ )z@Create a Cloud NetApp Volumes KMS Config in the current project.)namecrypto_key_namedescriptionlabelsz!gcloud {} netapp kms-configs listzJCheck the status of the new KMS Config by listing all KMS configs:
  $ {} )CONCEPTS
kms_configParsekmsconfigs_clientKmsConfigsClient_RELEASE_TRACKr	   ParseCreateArgsmessages	KmsConfigLabelsValuer   ConstructCryptoKeyNamekms_projectkms_locationkms_keyringkms_keyParseKmsConfigRelativeNamer   CreateKmsConfigasync_formatReleaseTrackprefixr
   statusPrint)	selfargskmsconfig_refr   r   r   r   resultcommands	            r   Run
Create.Run1   s    MM,,224M//0C0CDF((oo''33F '==$++T-=-=t||O &&'')'$$	 ' J ##M;;
KF{{3::




$
$g 
jjF7O Mr    N)__name__
__module____qualname____firstlineno____doc__detailed_helpr   r2   GAr#   staticmethodr   r;   __static_attributes__r=   r   r   r   r      s@    1		- $$''.4 4r   r   c                   D    \ rS rSrSr\R                  R                  rSr	g)
CreateBetaM   r   r=   N)
r>   r?   r@   rA   rB   r   r2   BETAr#   rF   r=   r   r   rH   rH   M   s    1$$)).r   rH   N)rB   
__future__r   r   r   )googlecloudsdk.api_lib.netapp.kms_configsr   r!   googlecloudsdk.callioper   -googlecloudsdk.command_lib.netapp.kms_configsr   r   $googlecloudsdk.command_lib.util.argsr	   googlecloudsdk.corer
   ReleaseTracksr2   rD   CreateCommandr   rJ   rH   r=   r   r   <module>rS      s    1 &  ' Q ( S < # D%%(()-T - *-` D%%**+* * ,*r   