https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/boto/roboto/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/boto/roboto/__pycache__/awsqueryrequest.cpython-310.pyc
o

ckF[�H�@s�ddlZddlZddlZddlZddlZddlZddlZddlZddlZzddl	Z
Wn
ey7ddlZ
Ynwdd�Z
Gdd�de�ZGdd�dejj�ZGdd	�d	ejj�ZGd
d�dejj�ZGdd
�d
e�ZGdd�de�ZdS)�Ncs��fdd�}|S)Ncs�|tjur
t�d�tjt_�r/tj��r/tj��r/t	j
dkr(t	�|||�dSt	�|�dS�r?tt
�|��t�d�dSt|�t�d�dS)N��epdb)�bdb�BdbQuit�sys�exit�__excepthook__�
excepthook�stdout�isatty�stdin�debugger�__name__�post_mortem�print�	traceback�print_tb)�typ�value�tb��
debug_flag�
debugger_flag��=/usr/lib/python3/dist-packages/boto/roboto/awsqueryrequest.pyr	&s


z$boto_except_hook.<locals>.excepthookr)rrr	rrr�boto_except_hook%src@s$eZdZdd�Zdd�Zdd�ZdS)�LinecCs&||_||_||_d||_d|_dS)N�%s	F)�fmt�data�label�line�printed)�selfrrr rrr�__init__;s


z
Line.__init__cCs|jd|7_dS)Nr)r!)r#�datumrrr�appendBszLine.appendcCs|js
t|j�d|_dSdS)NT)r"rr!�r#rrr�print_itEs

�z
Line.print_itN)r�
__module__�__qualname__r$r&r(rrrrr9src�eZdZ�fdd�Z�ZS)�RequiredParamErrorc�$||_d|j}tt|��|�dS)Nz#Required parameters are missing: %s)�required�superr,r$)r#r.�s��	__class__rrr$L�
zRequiredParamError.__init__�rr)r*r$�
__classcell__rrr1rr,J�r,cr+)�EncoderErrorcsd|}tt|��|�dS)NzError encoding value (%s))r/r7r$)r#�	error_msgr0r1rrr$SszEncoderError.__init__r4rrr1rr7Qr6r7cr+)�FilterErrorcr-)N�Unknown filters: %s)�filtersr/r9r$)r#r;r0r1rrr$Yr3zFilterError.__init__r4rrr1rr9Wr6r9c@s^eZdZeddd��Zedd��ZeZeZedd��Zedd	��Z	ed
d��Z
edd
��ZdS)�EncoderNcCsR|j�d�rdSzt|d|j�}|||||�WdSty(td|j��w)N�_�encode_zUnknown type: %s)�name�
startswith�getattr�ptype�AttributeErrorr7)�cls�p�rp�vr �mthdrrr�encode`s�zEncoder.encodecC�|r|}n|j}|||<dS�N�r?�rDrErFrG�lr rrr�
encode_stringj�zEncoder.encode_stringcCs |r|}n|j}d|||<dS)Nz%drLrMrrr�encode_integeruszEncoder.encode_integercCs*|r|}n|j}|r
d}nd}|||<dS)N�true�falserLrMrrr�encode_boolean}szEncoder.encode_booleancCrJrKrLrMrrr�encode_datetime�rPzEncoder.encode_datetimecCsJtj�|�}|r|}n|j}|d}t|�D]\}}||||d<qdS)Nz.%dr)�boto�utils�mklistr?�	enumerate)rDrErFrGrNr �irrrr�encode_array�s�zEncoder.encode_arrayrK)rr)r*�classmethodrIrO�encode_file�encode_enumrQrTrUr[rrrrr<^s	



r<c	@s�eZdZdZdZgZgZgZiZddddddddd�Z	e
dd��Zd	d
�Zdd�Z
d
d�Zedd��Zedd��Zedd��Zdd�Zdd�Zd,dd�Zd-dd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Zd.d(d)�Zd*d+�ZdS)/�AWSQueryRequestN��string�int�choice)ra�integerrb�enum�datetime�dateTime�file�booleancCs|jSrK)r)rDrrrr?�szAWSQueryRequest.namecKs@||_d|_d|_d|_d|_d|_g|_g|_i|_d|_	dSrK)
�args�parser�cli_options�cli_args�cli_output_format�
connection�list_markers�item_markers�request_params�connection_args�r#rjrrrr$�s
zAWSQueryRequest.__init__cCs|��SrKrLr'rrr�__repr__�szAWSQueryRequest.__repr__cKs"|jdur|jdi|��|_|jS)Nr)ro�ServiceClassrtrrr�get_connection�s
zAWSQueryRequest.get_connectioncC�d}|jdur|jj}|SrK)�
http_response�status�r#�retvalrrrrz��
zAWSQueryRequest.statuscCrxrK)ry�reasonr{rrrr~�r}zAWSQueryRequest.reasoncCsd}|jdur
t|jd�}|S)N�	requestId)�aws_responserAr{rrr�
request_id�s
zAWSQueryRequest.request_idcs�|j�dg�}dd�|jD���fdd�|D�}|r td|��t|j�D]5\}}|d}||vrZ||jd|d<ttj�||��D]\}}t	�
||j|d	|d|df�qDq%dS)
Nr;cSsg|]}|d�qSrLr��.0�frrr�
<listcomp>�sz3AWSQueryRequest.process_filters.<locals>.<listcomp>csg|]}|�vr|�qSrrr���filter_namesrrr���r:r?zFilter.%d.NamerzFilter.%d.Value.%d)rj�get�Filtersr9rYrrrVrWrXr<rI)r#r;�unknown_filtersrZ�filterr?�jrrr�r�process_filters�s���zAWSQueryRequest.process_filterscKs�|j�|�t�|j�|_d|jvr |jddkr t�|���dd�|j|jD�}|j|jD]W}|j	r>|j	�
dd�}ntj�|jd�}d}||jvrR|j|}|durY|j
}|dur|j|vrh|�|j�|jr|jrw|�||j|�nt�||j|�||jvr�|j|=q1|r�g}|j|jD]-}|j|vr�|jr�|j	r�|�d|j|jf�q�|jr�|�d	|j�q�|�d	|j�q�td
�|���tj�d|j�|�|j�dS)a�
        Responsible for walking through Params defined for the request and:

        * Matching them with keyword parameters passed to the request
          constructor or via the command line.
        * Checking to see if all required parameters have been specified
          and raising an exception, if not.
        * Encoding each value into the set of request parameters that will
          be sent in the request to the AWS service.
        �debug�cSsg|]}|js|j�qSr)�optionalr?)r�rErrrr��r�z0AWSQueryRequest.process_args.<locals>.<listcomp>�-r=Nz(%s, %s)z(%s)�,zrequest_params: %s)rj�update�copyrsrV�set_stream_loggerr?�Params�Args�	long_name�replacerW�pythonize_name�default�remove�
request_param�encoderrrr<rI�
short_namer&�optparse_short_name�optparse_long_namer,�join�logr��process_markers�Response)r#rjr.�param�python_namerrNrErrr�process_args�sN



�


��zAWSQueryRequest.process_argscCsj|r|ddkr|dD]
}|�||d�qdS|r1|ddkr3|j�|�|j�|d�dSdSdS)N�type�object�
propertiesr?�array)r�rpr&rq)r#r�	prev_name�proprrrr�s��zAWSQueryRequest.process_markers�GETcKs�|jdi|��|��|jdi|j��}|j|��|j|d�|_|j��|_	t
j�|j	�|jj
dkrPt
jj|j|jd�|_t
j�|j|�}|�|j	�|jSt
j�d|jj
|jjf�t
j�d|j	�|�|jj
|jj|j	��)N)�verb��)�list_marker�item_markerz%s %sz%sr)r�r�rwrs�make_requestr?rrry�read�bodyrVr�r�rz�jsonresponse�Elementrprqr��
XmlHandler�parse�errorr~�
ResponseError)r#r�rj�conn�hrrr�send%s0
�
��
�zAWSQueryRequest.sendcCs�t�|jd�}|jddddd�|jdddd	d
�|jddd
dd�|jdd
dd�|jddd
dd�|jddd
dd�|jdddd�|jrZ|jjdddd�|jjddddd�|j�|�dS) NzStandard Optionsz-Dz--debug�
store_truezTurn on all debugging output)�action�helpz
--debuggerFz$Enable interactive debugger on error)r�r�r�z-Uz--url�storez(Override service URL with value providedz--regionz Name of the region to connect toz-Iz--access-key-idzOverride access key valuez-Sz--secret-keyzOverride secret key valuez	--versionzDisplay version stringz--help-filtersz!Display list of available filtersz--filterr&z name=valuez!A filter for limiting the results)r��metavarr�)�optparse�OptionGrouprk�
add_optionr��group�add_option_group)r#r�rrr�add_standard_options<s@
��
��
�
��
�
�z$AWSQueryRequest.add_standard_optionscCs�t|d�r!|jr!td�|jD]}td|j|jf�qt�d�|jr)d|j	d<|j
r2|j
|j	d<|jr;|j|j	d<|jrD|j|j	d	<|j
rM|j
|j	d
<|jrXtd�td�t|j|j�t_dS)N�help_filterszAvailable filters:z%s	%srr�r��url�region�aws_access_key_id�aws_secret_access_keyzversion x.xx)�hasattrr�rr�r?�docrrr�rjr�r��
access_key_id�
secret_key�versionrr
r	)r#�optionsrj�dr�rrr�process_standard_optionsVs*



�z(AWSQueryRequest.process_standard_optionscCsLd}dd�|jD�}|d�|�7}|jD]}|jr#|d|j|jf7}q|S)Nzusage: %prog [options] cSsg|]}|j�qSr)r�)r��arrrr�osz-AWSQueryRequest.get_usage.<locals>.<listcomp>� z


	%s - %s)r�r�r�r�)r#r0rNr�rrr�	get_usagems
�zAWSQueryRequest.get_usagec	Cs�tj|j|��d�|_|��|jD]f}d}}}|j|jvr(|j|j}d}|jdkr0d}n|jdkrFt	|j
�dkrE|j
dd}d	}n|jdkrMd	}|sS|dkrx|jrg|jj
|j|j|||j|jd
�q|jrx|jj
|j|||j|jd
�qdS)N)�description�usager�rir�r�rrr�r&)r�r��choicesr�)r��OptionParser�Descriptionr�rkr�r�rB�
CLITypeMap�len�items�cardinalityr�r�r�r�r�r�r�)r#r�rBr�r�rrr�build_cli_parservsD�


�

�
���z AWSQueryRequest.build_cli_parserc

Cs�|js|��|j��\|_|_i}|�|j|j|�|jD]V}|jr+|j�dd�}nt	j
�|j�}t
|j|�}|jdkrp|rp|dkrItj��}n'tj�|�}tj�|�}tj�|�rht|�}|��}|��n|j�d|�|||<q|jD]/}|jr�|j�dd�}nt	j
�|j�}d}|jdkr�t|j�dkr�|jd}n|j}|||<qx|j�|�t|jd�r�|jj r�i}|jj D]
}|�!d�\}	}|||	<q�d	|jvr�|jd	�|�n||jd	<z|�"�}
|�#|
�WdSt$�y}zt%|�t�&d�WYd}~dSd}~w|j'j(�y,}zt%d
|j)|j*f�t�&d�WYd}~dSd}~wt	j+j,j-�yK}zt%d�t�&d�WYd}~dSd}~wt.�yg}zt%|�t�&d�WYd}~dSd}~ww)Nr�r=rhzUnable to read file: %srrr��=r;z
Error(%s): %szUnable to find credentials.)/rkr��
parse_argsrlrmr�r�r�r�rVrWr�r?rArBrrr��os�path�
expanduser�
expandvars�isfile�open�closer�r�r�r�rjr�r�r��split�main�
cli_formatterr,rrrvr��
error_code�
error_message�roboto�awsqueryservice�NoCredentialsError�	Exception)
r#r�r��p_namerr��fp�argr�r?�response�e�errrrr�do_cli�sz





�



�����zAWSQueryRequest.do_clicCs�|ddkrA|dD]4}d|vr7|d|vr||d}|d|jvr7|d}|ddkr3|dd�}|��}|�|||�q
dS|ddkrr|D]*}t|||�}t|t�rc|D]	}|�||�qXn
t|t�rm|�|�|��qIdSdS)	Nr�r�r�r?���r0rr�)	rp�upper�_generic_cli_formatterr�
isinstance�dictr&�
basestringr()r#rrr r��itemr!�
field_namerrrr�s0�

�


�z&AWSQueryRequest._generic_cli_formattercCs|r|�|j|�dSdS)a�
        This method is responsible for formatting the output for the
        command line interface.  The default behavior is to call the
        generic CLI formatter which attempts to print something
        reasonable.  If you want specific formatting, you should
        override this method and do your own thing.

        :type data: dict
        :param data: The data returned by AWS.
        N)rr�)r#rrrrr��s�zAWSQueryRequest.cli_formatterrK)r�)r`)rr)r*rvr�r�r�r�r�r�r\r?r$rurw�propertyrzr~r�r�r�r�r�r�r�r�r�r�rr�rrrrr_�sL�	




3
	
?r_)rr�rVr�r��boto.exception�boto.roboto.awsqueryservicerrrr
�ImportError�pdbrr�r�	exception�BotoClientErrorr,r7r9r<r_rrrr�<module>s*�>

https://t.me/RX1948 - 2025