
                         t   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
KJr  SSKJr  SSKJr  Sr\	R&                  " \	R(                  R*                  5       " S S\	R,                  5      5       r\	R&                  " \	R(                  R0                  5       " S S\5      5       rg)z+Command to update an Anthos cluster on AWS.    )absolute_import)division)unicode_literals)aws)base)flags)resource_args)command_util)	constants)endpoint_utilz
To update a cluster named ``my-cluster'' managed in location ``us-west1'', run:

$ {command} my-cluster --location=us-west1 --cluster-version=CLUSTER_VERSION
c                   6    \ rS rSrSrS\0r\S 5       rS r	Sr
g)Update&    Update an Anthos cluster on AWS.EXAMPLESc                    [         R                  " U S5        [        R                  " U SS9  [        R                  " U S5        [        R
                  " U SS9  [        R                  " U 5        [        R                  " U 5        [        R                  " U 5        [        R                  " U S5        [        R                  " U S5        [        R                  " U 5        [        R                  " U 5        [        R                  " U 5        [        R                  " U 5        [        R                   " U SS9  [        R"                  " U 5        [        R$                  " U SS9  [        R&                  " U S5        [        R(                  " U 5        [        R*                  " U S5        [        R,                  " U 5        [        R.                  " U 5        [        R0                  " U 5        [        R2                  " U 5        [        R4                  " U 5        [        R6                  " U SS9  [8        R:                  R=                  U 5        U R>                  RA                  [B        RD                  5        g )Nz	to updateF)requiredzupdate of the cluster)createclusterzcontrol plane)#r	   AddAwsClusterResourceArgr   AddClusterVersionAddValidateOnlyAddAdminUsersAddAdminGroupsAddRootVolumeSizeAddDescriptionForUpdateAddAnnotationsForUpdateAddTagsForUpdate
AddLoggingAddMonitoringConfigAddBinauthzEvaluationMode	aws_flagsAddInstanceType
AddRoleArnAddRoleSessionNameAddConfigEncryptionKmsKeyArnAddSecurityGroupFlagsForUpdateAddPerNodePoolSGRulesForUpdateAddProxyConfigForUpdateAddRootVolumeKmsKeyArnAddRootVolumeTypeAddRootVolumeIopsAddRootVolumeThroughputAddSshEC2KeyPairForUpdateAddIamInstanceProfiler   
ASYNC_FLAGAddToParserdisplay_info	AddFormatr   AWS_CLUSTERS_FORMAT)parsers    ,lib/surface/container/aws/clusters/update.pyArgsUpdate.Args,   s   **6;?	FU3	&"9:	u-	 	F#	!!&)	!!&)4	6?3	V	f%	##F+f%%0  (**6EB,,V_E,,V4%%fo>$$V,''%%f-''/##FU;OO'
!!)"?"?@    c           	         [         R                  " U5      R                  n[        R                  " U5         [         R                  " U5      n[
        R                  " 5       n[        R                  " UR                  SS9n[        R                  " UUUU[        R                  S9sSSS5        $ ! , (       d  f       g= f)zRuns the update command.Updating)action)resource_refresource_clientargsmessagekindN)r	   ParseAwsClusterResourceArglocationsIdr   GkemulticloudEndpointOverrideapi_utilClustersClientr
   ClusterMessageawsClustersIdr   r   AWS_CLUSTER_KIND)selfr?   locationcluster_refcluster_clientr@   s         r6   Run
Update.RunK   s    77=IIH		4	4X	>!<<TBk..0n++

#
#Jg   "()) 
?	>	>s   A0B11
B? N)__name__
__module____qualname____firstlineno____doc__	_EXAMPLESdetailed_helpstaticmethodr7   rN   __static_attributes__rP   r9   r6   r   r   &   s(    (y)-A A<r9   r   c                   V    \ rS rSrSr\\R                  R                  4S j5       r	Sr
g)UpdateAlpha]   r   c                 .    [         R                  U 5        g)z-Registers alpha track flags for this command.N)r   r7   )r5   tracks     r6   r7   UpdateAlpha.Argsa   s     KKr9   rP   N)rQ   rR   rS   rT   rU   rX   r   ReleaseTrackALPHAr7   rY   rP   r9   r6   r[   r[   ]   s&    (**00  r9   r[   N)rU   
__future__r   r   r   .googlecloudsdk.api_lib.container.gkemulticloudr   rE   googlecloudsdk.callioper   (googlecloudsdk.command_lib.container.awsr   r"   r	   2googlecloudsdk.command_lib.container.gkemulticloudr
   r   r   rV   ReleaseTracksr`   GAUpdateCommandr   ra   r[   rP   r9   r6   <module>rj      s    2 &  ' J ( G B K H L D	 D%%(()3T 3 *3l D%%++,&  -r9   