HEX
Server: Apache
System: Linux srv1.prosuiteplus.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: prosuiteplus (1001)
PHP: 8.3.20
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/awscli/customizations/__pycache__/preview.cpython-38.pyc
U

<�^E�@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.

�NZsdbcCs|�dt�dS)Nzbuilding-command-table.main)�register�mark_as_preview)Zevents�r�?/usr/lib/python3/dist-packages/awscli/customizations/preview.py�register_preview_commands-srcKs|t|�}tD]j}d}||kr,t�d|�d}||}tdt|jfi�}||j||jj	|d�||<|�
d��d|t�qdS)NFz/Preview service enabled through config file: %sTZPreviewCommand)Zcli_name�session�service_name�
is_enabledZ
event_emitterzdoc-description.%s)
�_get_allowed_services�PREVIEW_SERVICES�logger�debug�type�PreviewModeCommandMixin�	__class__�nameZ
service_modelrZ
get_componentZ
register_last�update_description_with_preview)Z
command_tabler�kwargsZallowed_servicesZpreview_servicer	Zoriginal_commandZpreview_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�styleZ
start_noteZboldr�HELP_SNIPPET�strip�writeZevent_class�split�codeZend_note)Zhelp_commandrrrrrrrNsrcCs:g}|j�di�}|��D]\}}|dkr|�|�q|S)N�preview�true)Zfull_config�get�items�append)rZallowedZpreview_servicesr�valuerrrr
esr
csFeZdZe�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||�dS)Nr	)�pop�_is_enabled�superr�__init__)�self�argsr�rrrr%�sz PreviewModeCommandMixin.__init__cs.|js|�|�r"tt|��||�S|��SdS)N)r#�_is_help_commandr$r�__call__�_display_opt_in_message)r&r'Zparsed_globalsr(rrr*�s
�z PreviewModeCommandMixin.__call__cCs|o|ddkS)N����helpr)r&r'rrrr)�sz(PreviewModeCommandMixin._is_help_commandcCs6tj�|j�tj�d�tj�|jj|jd��dS)N�
)�service�)�sys�stderrrr�ENABLE_DOCS�formatZ
_service_name)r&rrrr+�sz/PreviewModeCommandMixin._display_opt_in_message)�__name__�
__module__�__qualname__�textwrap�dedentr3rr%r*r)r+�
__classcell__rrr(rrqs

r)�__doc__Zloggingr1r8Z	getLoggerr5rrrrrr
�objectrrrrr�<module>
s
�