
                         ^   S r SSKJr  SSKJr  SSKJr  SSK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                   \
R                  R"                  \
R                  R$                  5      \
R&                   " S S\
R(                  5      5       5       rg)z/Command for spanner instances partition create.    )absolute_import)division)unicode_literalsN)instance_partition_operations)instance_partitions)base)flags)resource_argsc                   V    \ rS rSrSrS\R                  " S5      0r\S 5       r	S r
Srg)	Create   z$Create a Spanner instance partition.EXAMPLESz        To create a Spanner instance partition, run:

          $ {command} my-instance-partition-id --instance=my-instance-id --config=regional-us-east1 --description=my-instance-display-name --nodes=3
        c                 |   [         R                  " U S5        [        R                  " SS9R	                  U 5        [        R
                  " SS9R	                  U 5        [        R                  " U SSSS9  [        R                  R	                  U 5        U R                  R                  [        R                  5        g)	a`  Args is called by calliope to gather arguments for this command.

Please add arguments in alphabetical order except for no- or a clear-
pair for that argument which can follow the argument itself.
Args:
  parser: An argparse parser that you can use to add arguments that go on
    the command line after this command. Positional arguments are allowed.
z	to createzInstance configuration defines the geographic placement and replication used by the instance partition. Available configurations can be found by running "gcloud spanner instance-configs list")textz&Description of the instance partition.TF)parseradd_autoscaling_argsautoscaling_args_hiddenrequire_all_autoscaling_argsN)r
   AddInstancePartitionResourceArgr	   ConfigAddToParserDescription#AddCapacityArgsForInstancePartitionr   
ASYNC_FLAGdisplay_infoAddCacheUpdaterInstancePartitionCompleter)r   s    1lib/surface/spanner/instance_partitions/create.pyArgsCreate.Args-   s     11&+F	LL& k&	5k&	--! %%)	 	OO'
''(H(HI    c                    UR                   R                  R                  5       nUR                  5       n[        R
                  " UUR                  UR                  UR                  UR                  UR                  UR                  UR                  UR                  UR                  UR                  UR                  UR                   S9nUR"                  (       a  U$ [$        R&                  " US5        g)zThis is what gets called when the user runs this command.

Args:
  args: an argparse namespace. All the arguments that were provided to this
    command invocation.

Returns:
  Some value that we want to have printed later.
)	nodesprocessing_unitsautoscaling_min_nodesautoscaling_max_nodes autoscaling_min_processing_units autoscaling_max_processing_units$autoscaling_high_priority_cpu_targetautoscaling_total_cpu_targetautoscaling_storage_targetzCreating instance partitionN)CONCEPTSinstance_partitionParseParentr   r   configdescriptionr#   r$   r%   r&   r'   r(   r)   r*   r+   async_r   Await)selfargsinstance_partition_refinstance_refops        r   Run
Create.RunL   s     "]]==CCE)002L		#	#jj.."88"88)-)N)N)-)N)N-1-V-V%)%F%F#'#B#B
B {{i!'',IJr!    N)__name__
__module____qualname____firstlineno____doc__textwrapdedentdetailed_helpstaticmethodr   r9   __static_attributes__r;   r!   r   r   r      s?    
 - (// # - J J<Kr!   r   )r@   
__future__r   r   r   rA   googlecloudsdk.api_lib.spannerr   r   googlecloudsdk.callioper   "googlecloudsdk.command_lib.spannerr	   r
   ReleaseTracksReleaseTrackGABETAALPHAUniverseCompatibleCreateCommandr   r;   r!   r   <module>rQ      s    6 &  '  H > ( 4 < $++00$2C2C2I2I GKT GK GKr!   