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__/sessionmanager.cpython-38.pyc
U

<�^��@s�ddlZddlZddlZddlmZddlmZddlmZm	Z	e�
e�ZdZ
dd�Zdd	�ZGd
d�de�ZGdd
�d
e	�ZdS)�N)�
check_call)�ignore_user_entered_signals)�ServiceOperation�CLIOperationCaller)z#SessionManagerPlugin is not found. z3Please refer to SessionManager Documentation here: z3http://docs.aws.amazon.com/console/systems-manager/z session-manager-plugin-not-foundcCs|�dt�dS)Nzbuilding-command-table.ssm)�register�add_custom_start_session)Zevent_handlers�r�F/usr/lib/python3/dist-packages/awscli/customizations/sessionmanager.py�register_ssm_sessions�r
cKs*tdd||�d��d�t|�d�|d<dS)Nz
start-sessionZssm�StartSession)�name�parent_name�session�operation_modelZoperation_caller)�StartSessionCommandZget_service_modelr�StartSessionCaller)rZ
command_table�kwargsrrr	r$s���rcseZdZ�fdd�Z�ZS)rcstt|���}d|j_|S)N)�superr�create_help_commandZ_operation_modelZoutput_shape)�selfZhelp_command��	__class__rr	r1s�z'StartSessionCommand.create_help_command)�__name__�
__module__�__qualname__r�
__classcell__rrrr	r/src@seZdZdd�ZdS)rc
Cs�|jj||j|j|jd�}|jf|�}|d}|jj}|jjdk	rJ|jjnd}	|jj}
z:t	��(t
dt�|�|d|	t�|�|
g�W5QRXWdSt
k
r�}z8|jtjkr�tjddd	�|j|d
�td�t���W5d}~XYnXdS)N)�region_name�endpoint_urlZverify�	SessionId�zsession-manager-pluginrrz#SessionManagerPlugin is not presentT)�exc_info)r)Z_sessionZ
create_clientZregionrZ
verify_sslZ
start_session�metarZprofilerr�json�dumps�OSError�errnoZENOENT�logger�debugZterminate_session�
ValueError�join�
ERROR_MESSAGE)rZservice_nameZoperation_nameZ
parametersZparsed_globalsZclientZresponseZ
session_idrZprofile_namer�exrrr	�invoke:s@�
�
���zStartSessionCaller.invokeN)rrrr,rrrr	r9sr)Zloggingr"r%�
subprocessrZ
awscli.compatrZawscli.clidriverrrZ	getLoggerrr&r*r
rrrrrrr	�<module>
s