HEX
Server: LiteSpeed
System: Linux s1049.use1.mysecurecloudhost.com 4.18.0-477.27.2.lve.el8.x86_64 #1 SMP Wed Oct 11 12:32:56 UTC 2023 x86_64
User: xedaptot (3356)
PHP: 8.3.31
Disabled: NONE
Upload Files
File: //lib/python3.6/site-packages/awscli/customizations/configure/__pycache__/list.cpython-36.pyc
3

�T_��@s8ddlZddlmZddlmZmZGdd�de�ZdS)�N)�BasicCommand�)�ConfigValue�NOT_SETcsReZdZdZdZdZdZejf�fdd�	Z	dd�Z
d	d
�Zdd�Zd
d�Z
�ZS)�ConfigureListCommand�lista�List the AWS CLI configuration data.  This command will show you the current configuration data.  For each configuration item, it will show you the value, where the configuration value was retrieved, and the configuration variable name.  For example, if you provide the AWS region in an environment variable, this command will show you the name of the region you've configured, it will tell you that this value came from an environment variable, and it will tell you the name of the environment variable.
z+aws configure list [--profile profile-name]a�To show your current configuration values::

  $ aws configure list
        Name                    Value             Type    Location
        ----                    -----             ----    --------
     profile                <not set>             None    None
  access_key     ****************ABCD      config_file    ~/.aws/config
  secret_key     ****************ABCD      config_file    ~/.aws/config
      region                us-west-2              env    AWS_DEFAULT_REGION

cstt|�j|�||_dS)N)�superr�__init__�_stream)�selfZsession�stream)�	__class__��/usr/lib/python3.6/list.pyr	/szConfigureListCommand.__init__cCs�|jtddd�d�|jtddd�d�|jjdk	rFt|jjdd	�}n
|jd
�}|j|d
�|j�\}}|j|d�|j|d�|jd
�}|j|d
�dS)NZValueZTypeZLocation�Namez-----z----z--------Zmanualz	--profile�profile�
access_key�
secret_key�region)�_display_config_valuer�_sessionr�_lookup_config�_lookup_credentials)r�argsZparsed_globalsrrrrrrr�	_run_main3s


zConfigureListCommand._run_maincCs"|jjd||j|j|jf�dS)Nz%10s %24s %16s    %s
)r
�write�valueZconfig_typeZconfig_variable)rZconfig_valueZconfig_namerrrrGs
z*ConfigureListCommand._display_config_valuecCs�|jd�}|jtk	r6|jd�}|j�|j�||fS|jj�}|dkr\ttdd�}||fSt|j|jd�}t|j	|jd�}|j�|j�||fSdS)Nrr�)
rrrZ
mask_valuerZget_credentialsrr�methodr)rrrZcredentialsZ	no_configrrrrLs"





z(ConfigureListCommand._lookup_credentialscCsl|jj|dd�}|dk	r0t|d|jj|d�S|jj|dd�}|dk	r\t|d|jjd��Sttdd�SdS)	N�env)�methodsr�configzconfig-fileZconfig_file)r)r!)rZget_config_variablerZsession_var_mapr)r�namerrrrrlsz#ConfigureListCommand._lookup_config)�__name__�
__module__�__qualname__�NAMEZDESCRIPTIONZSYNOPSISZEXAMPLES�sys�stdoutr	rrrr�
__classcell__rr)r
rrs
 r)r'Zawscli.customizations.commandsrrrrrrrrr�<module>
s