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/__pycache__/preview.cpython-310.pyc
o

.&�aE�@s`dZddlZddlZddlZe�e�ZdgZdd�Zdd�Z	dd	�Z
d
d�ZGdd
�d
e�Z
dS)a:This module enables the preview-mode customization.

If a service is marked as being in preview mode, then any attempts
to call operations on that service will print a message pointing
the user to alternate solutions.  A user can still access this
service by enabling the service in their config file via:

    [preview]
    servicename=true

or by running:

    aws configure set preview.servicename true

Also any service that is marked as being in preview will *not*
be listed in the help docs, unless the service has been enabled
in the config file as shown above.

�N�sdbcCs|�dt�dS)Nzbuilding-command-table.main)�register�mark_as_preview)�events�r�?/usr/lib/python3/dist-packages/awscli/customizations/preview.py�register_preview_commands-�rcKs|t|�}tD]5}d}||vrt�d|�d}||}tdt|jfi�}||j||jj	|d�||<|�
d��d|t�qdS)NFz/Preview service enabled through config file: %sT�PreviewCommand)�cli_name�session�service_name�
is_enabled�
event_emitterzdoc-description.%s)
�_get_allowed_services�PREVIEW_SERVICES�logger�debug�type�PreviewModeCommandMixin�	__class__�name�
service_modelr
�
get_component�
register_last�update_description_with_preview)�
command_tabler�kwargs�allowed_services�preview_servicer�original_command�preview_clsrrrr1s0�
�
�
��rcKsV|jj}|��|�tj���|j�d�|j�	d�d}|�
d|�|��dS)Nz(You can enable this service by running: �.rz!aws configure set preview.%s true)�doc�style�
start_note�boldr�HELP_SNIPPET�strip�write�event_class�split�code�end_note)�help_commandrr$r
rrrrNsrcCs:g}|j�di�}|��D]
\}}|dkr|�|�q
|S)N�preview�true)�full_config�get�items�append)r�allowed�preview_servicesr/�valuerrrres
�rcsFeZdZe�d�ZdZ�fdd�Z�fdd�Zdd�Z	d	d
�Z
�ZS)ra    However, if you'd like to use the "aws {service}" commands with the
    AWS CLI, you can enable this service by adding the following to your CLI
    config file:

        [preview]
        {service}=true

    or by running:

        aws configure set preview.{service} true

    zGAWS CLI support for this service is only available in a preview stage.
cs&|�d�|_tt|�j|i|��dS)Nr)�pop�_is_enabled�superr�__init__)�self�argsr�rrrr;�sz PreviewModeCommandMixin.__init__cs*|js|�|�rtt|��||�S|��S)N)r9�_is_help_commandr:r�__call__�_display_opt_in_message)r<r=�parsed_globalsr>rrr@�s

�z PreviewModeCommandMixin.__call__cCs|o|ddkS)N����helpr)r<r=rrrr?�r	z(PreviewModeCommandMixin._is_help_commandcCs6tj�|j�tj�d�tj�|jj|jd��dS)N�
)�service�)�sys�stderrr)r'�ENABLE_DOCS�format�
_service_name)r<rrrrA�sz/PreviewModeCommandMixin._display_opt_in_message)�__name__�
__module__�__qualname__�textwrap�dedentrJr'r;r@r?rA�
__classcell__rrr>rrqs

r)�__doc__�loggingrHrP�	getLoggerrMrrrrrr�objectrrrrr�<module>s
�