HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/awscli/customizations/configure/__pycache__/configure.cpython-310.pyc
o

.&�aG�@s�ddlZddlZddlmZddlmZddlmZddlm	Z	ddl
mZddlm
Z
ddlmZdd	lmZd
dlmZmZe�e�Zdd
�ZGdd�de�ZGdd�de�ZdS)�N)�ProfileNotFound)�compat_input)�BasicCommand)�AddModelCommand)�ConfigureSetCommand)�ConfigureGetCommand)�ConfigureListCommand)�ConfigFileWriter�)�
mask_value�profile_to_sectioncCs|�dtj�dS)Nzbuilding-command-table.main)�register�ConfigureCommand�add_command)�cli�r�K/usr/lib/python3/dist-packages/awscli/customizations/configure/configure.py�register_configure_cmd s�rc@seZdZddd�ZdS)�InteractivePrompter�cCs,|dvrt|�}td||f�}|sd}|S)N)�aws_access_key_id�aws_secret_access_keyz	%s [%s]: )rr)�self�
current_value�config_name�prompt_text�responserrr�	get_value'szInteractivePrompter.get_valueN)r)�__name__�
__module__�__qualname__rrrrrr%srcsneZdZdZe��ZdZdZde	d�de
d�ded�ded�gZ
gd	�Zd�fdd�	Zd
d�Zdd�Z�ZS)r�	configurez&aws configure [--profile profile-name]a�To create a new configuration::

    $ aws configure
    AWS Access Key ID [None]: accesskey
    AWS Secret Access Key [None]: secretkey
    Default region name [None]: us-west-2
    Default output format [None]:

To update just the region name::

    $ aws configure
    AWS Access Key ID [****]:
    AWS Secret Access Key [****]:
    Default region name [us-west-1]: us-west-2
    Default output format [None]:
�list)�name�
command_class�get�setz	add-model))rzAWS Access Key ID)rzAWS Secret Access Key)�regionzDefault region name)�outputzDefault output formatNcs<tt|��|�|durt�}||_|durt�}||_dS)N)�superr�__init__r�	_prompterr	�_config_writer)r�session�prompter�
config_writer��	__class__rrr*Xs
zConfigureCommand.__init__cCs�i}z|j��}Wntyi}Ynw|jD]\}}|�|�}|j�|||�}|dur5||kr5|||<qtj�	|j�
d��}	|ra|jj}
|�||
�|
durXt
|
�}||d<|j�||	�dSdS)N�config_file�__section__)�_session�get_scoped_configr�VALUES_TO_PROMPTr%r+r�os�path�
expanduser�get_config_variable�profile�_write_out_creds_file_valuesrr,�
update_config)r�parsed_args�parsed_globals�
new_values�configrrr�	new_value�config_filenamer;�sectionrrr�	_run_mainas2�

��
��zConfigureCommand._run_maincCsni}d|vr
|�d�|d<d|vr|�d�|d<|r5|dur"||d<tj�|j�d��}|j�||�dSdS)Nrrr3�credentials_file)�popr7r8r9r4r:r,r=)rr@�profile_name�credential_file_values�shared_credentials_filenamerrrr<zs(��
���z-ConfigureCommand._write_out_creds_file_values)NN)rrr �NAMEr�	FROM_FILE�DESCRIPTION�SYNOPSIS�EXAMPLESrrrr�SUBCOMMANDSr6r*rEr<�
__classcell__rrr0rr3s��	r)r7�logging�botocore.exceptionsr�
awscli.compatr�awscli.customizations.commandsr�(awscli.customizations.configure.addmodelr�#awscli.customizations.configure.setr�#awscli.customizations.configure.getr�$awscli.customizations.configure.listr�&awscli.customizations.configure.writerr	rrr�	getLoggerr�loggerr�objectrrrrrr�<module>s