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/__pycache__/sessionmanager.cpython-36.opt-1.pyc
3

�T_��@s�ddlZddlZddlZddlmZddlmZddlmZm	Z	ej
e�ZdZ
d	d
�Zdd�ZGd
d�de�ZGdd�de	�ZdS)�N)�
check_call)�ignore_user_entered_signals)�ServiceOperation�CLIOperationCaller�#SessionManagerPlugin is not found. �3Please refer to SessionManager Documentation here: �3http://docs.aws.amazon.com/console/systems-manager/� session-manager-plugin-not-foundcCs|jdt�dS)Nzbuilding-command-table.ssm)�register�add_custom_start_session)Zevent_handlers�r�$/usr/lib/python3.6/sessionmanager.py�register_ssm_sessionsrcKs*tdd||jd�jd�t|�d�|d<dS)Nz
start-sessionZssm�StartSession)�name�parent_name�session�operation_modelZoperation_caller)�StartSessionCommandZget_service_modelr�StartSessionCaller)rZ
command_table�kwargsrrr
r$s
rcseZdZ�fdd�Z�ZS)rcstt|�j�}d|j_|S)N)�superr�create_help_commandZ_operation_modelZoutput_shape)�selfZhelp_command)�	__class__rr
r1sz'StartSessionCommand.create_help_command)�__name__�
__module__�__qualname__r�
__classcell__rr)rr
r/src@seZdZdd�ZdS)rcCs�|jj||j|j|jd�}|jf|�}|d}|jj}|jjdk	rJ|jjnd}	|jj}
y8t	��(t
dtj|�|d|	tj|�|
g�WdQRXdSt
k
r�}z:|jtjkr�tjddd	�|j|d
�tdjt���WYdd}~XnXdS)N)�region_name�endpoint_urlZverify�	SessionId�zsession-manager-pluginrrz#SessionManagerPlugin is not presentT)�exc_info)r!)Z_sessionZ
create_clientZregionr Z
verify_sslZ
start_session�metarZprofilerr�json�dumps�OSError�errno�ENOENT�logger�debugZterminate_session�
ValueError�join�
ERROR_MESSAGE)rZservice_nameZoperation_nameZ
parametersZparsed_globalsZclientZresponseZ
session_idrZprofile_namer Zexrrr
�invoke:s2
zStartSessionCaller.invokeN)rrrr/rrrr
r9sr)rrrr	)Zloggingr%r(�
subprocessrZ
awscli.compatrZawscli.clidriverrrZ	getLoggerrr*r.rrrrrrrr
�<module>
s