403Webshell
Server IP : 172.67.201.108  /  Your IP : 216.73.216.55
Web Server : Apache/2.4.68 (Amazon Linux) OpenSSL/3.5.7
System : Linux ip-172-31-69-123.ec2.internal 6.1.177-224.371.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Jul 27 20:28:29 UTC 2026 x86_64
User : ec2-user ( 1000)
PHP Version : 8.4.24
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3.9/site-packages/awscli/botocore/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3.9/site-packages/awscli/botocore/__pycache__/discovery.cpython-39.pyc
a

wA�i1+�@s�ddlZddlZddlZddlmZddlmZmZmZddl	m
Z
ddlmZe�
e�ZGdd�de�ZGdd	�d	e�ZGd
d�de�Zdd
�ZGdd�d�ZGdd�d�ZGdd�d�ZdS)�N)�
xform_name)�
BotoCoreError�ConnectionError�HTTPClientError)�OperationNotFoundError)�CachedPropertyc@seZdZdS)�EndpointDiscoveryExceptionN)�__name__�
__module__�__qualname__�rr�=/usr/lib/python3.9/site-packages/awscli/botocore/discovery.pyrsrc@seZdZdZdZdS)�EndpointDiscoveryRequiredzBEndpoint Discovery is disabled but is required for this operation.zAEndpoint Discovery is not enabled but this operation requires it.N�r	r
r�__doc__�fmtrrrr
rsrc@seZdZdZdZdS)�EndpointDiscoveryRefreshFailedz=Endpoint Discovery failed to the refresh the known endpoints.z<Endpoint Discovery failed to refresh the required endpoints.Nrrrrr
r#srcKs|j}|r|�d�rt��dS)N�required)�endpoint_discovery�getr)�model�kwargsrrrr
�,block_endpoint_discovery_required_operations)src@sNeZdZdd�Zedd��Zedd��Zdd�Zd	d
�Zdd�Z	ddd�Z
d
S)�EndpointDiscoveryModelcCs
||_dS�N)�_service_model)�self�
service_modelrrr
�__init__0szEndpointDiscoveryModel.__init__cCs|jj}t|j�Sr)r�endpoint_discovery_operationr�name)r�discovery_operationrrr
�discovery_operation_name3sz/EndpointDiscoveryModel.discovery_operation_namecCs&|jj}g}|jr"t|jj���}|Sr)rr�input_shape�list�members�keys)rr!r&rrr
�discovery_operation_keys8s
z/EndpointDiscoveryModel.discovery_operation_keyscCs6z|j�|�}|j�dd�WSty0YdS0dS)NrF)r�operation_modelrrr)r�operation_namer(rrr
�discovery_required_for@s�z-EndpointDiscoveryModel.discovery_required_forcsB|j�|�d�s(|�dd�|�dd�t�fdd�|��D��S)N�Identifiers�	Operationc3s"|]\}}|�vr||fVqdSrr��.0�k�v�Z
input_keysrr
�	<genexpr>O�zDEndpointDiscoveryModel.discovery_operation_kwargs.<locals>.<genexpr>)r'r�pop�dict�items�rrrr1r
�discovery_operation_kwargsIs

z1EndpointDiscoveryModel.discovery_operation_kwargscCs|�|j|�Sr)�_gather_idsr#�r�	operation�paramsrrr
�gather_identifiersQsz)EndpointDiscoveryModel.gather_identifiersNcCsb|duri}|j��D]F\}}|j�d�r8||||<q|jdkr||vr|�||||�q|S)NZendpointdiscoveryidZ	structure)r%r6�metadatarZ	type_namer9)r�shaper<�ids�member_nameZmember_shaperrr
r9Ts��z"EndpointDiscoveryModel._gather_ids)N)r	r
rrrr"r'r*r8r=r9rrrr
r/s

	rc@sneZdZddd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�ZdS)�EndpointDiscoveryManagerNTcCsP|duri}||_i|_|dur&tj}||_||_t�|�|_t|j	j
�|_dSr)�_cache�_failed_attempts�time�_time�_always_discover�weakref�proxy�_clientr�metar�_model)rZclient�cache�current_timeZalways_discoverrrr
rdsz!EndpointDiscoveryManager.__init__cCs8|d}|��}|D]}|�d�}||d|d<q|S)NZ	EndpointsZCachePeriodInMinutes�<�
Expiration)rFr)r�response�	endpointsrN�endpointZ
cache_timerrr
�_parse_endpointsus
z)EndpointDiscoveryManager._parse_endpointscCs"t|t�rtt|����S|SdSr)�
isinstancer5�tuple�sortedr6)r�valuerrr
�_cache_item}s
z$EndpointDiscoveryManager._cache_itemcs0�jjfi|��}t�fdd�t|���D��S)Nc3s|]\}}��|�VqdSr)rYr-�rrr
r2�r3z=EndpointDiscoveryManager._create_cache_key.<locals>.<genexpr>)rLr8rVrWr6r7rrZr
�_create_cache_key�sz*EndpointDiscoveryManager._create_cache_keycCs|j�||�Sr)rLr=r:rrr
r=�sz+EndpointDiscoveryManager.gather_identifierscKs&|jfi|��}||jvr"|j|=dSr)r[rC)rr�	cache_keyrrr
�delete_endpoints�s
z)EndpointDiscoveryManager.delete_endpointscKs@|jjfi|��}|jj}t|j|�}t�d|�|fi|��S)Nz%Discovering endpoints with kwargs: %s)rLr8r"�getattrrJ�logger�debug)rrr)r!rrr
�_describe_endpoints�s
z,EndpointDiscoveryManager._describe_endpointscs.||jvrdS|����fdd�|j|D�S)Ncsg|]}�|dkr|�qS)rPr)r.�e��nowrr
�
<listcomp>�r3zCEndpointDiscoveryManager._get_current_endpoints.<locals>.<listcomp>)rCrF)r�keyrrcr
�_get_current_endpoints�s
z/EndpointDiscoveryManager._get_current_endpointsc	Ksx|jfi|��}z8|jfi|��}|�|�}||j|<|j�|d�|WSttfyr|��d|j|<YdS0dS)NrO)	r[rarTrCrDr4rrrF)rrr\rQrRrrr
�_refresh_current_endpoints�s

z3EndpointDiscoveryManager._refresh_current_endpointscCs0||jvr,|��}||j|kr$dS|j|=dS)NTF)rDrF)rr\rdrrr
�_recently_failed�s
z)EndpointDiscoveryManager._recently_failedcCs|ddS)NrZAddressr)rrRrrr
�_select_endpoint�sz)EndpointDiscoveryManager._select_endpointcKs�|d}|j�|�}|js2|s2t�d|���dS|jfi|��}|�|�}|rZ|�|�S|�|�}|s�|j	fi|��}|r�|�|�St�d|�|j
�|d�}|r�|�|�S|r�|r�|j	fi|��}|r�|�|�St��dS)Nr,z?Optional discovery disabled. Skipping discovery for Operation: z%Endpoint Discovery has failed for: %s)
rLr*rGr_r`r[rgrjrirhrCrr)rrr;Zdiscovery_requiredr\rRZrecently_failedZ
stale_entriesrrr
�describe_endpoint�s6
�





z*EndpointDiscoveryManager.describe_endpoint)NNT)r	r
rrrTrYr[r=r]rargrhrirjrkrrrr
rBcs�
	rBc@s4eZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS)�EndpointDiscoveryHandlercCs
||_dSr)�_manager)rZmanagerrrr
r�sz!EndpointDiscoveryHandler.__init__cCs@|�d|��|j�|�d|��|j�|�d|��|j�dS)Nzbefore-parameter-build.zrequest-created.zneeds-retry.)�registerr=Zregister_first�discover_endpoint�handle_retries)rZeventsZ
service_idrrr
rn�s��z!EndpointDiscoveryHandler.registercKs0|j}|durdS|j�||�}d|i|d<dS)N�identifiers�	discovery)rrmr=)rr<r�contextrrr@rrr
r=�s
z+EndpointDiscoveryHandler.gather_identifierscKsn|j�di��d�}|dur dS|jj||d�}|durFt�d�dS|�d�sXd|}t�d|�||_dS)Nrrrq�r,r+z&Failed to discover and inject endpoint�httpzhttps://z!Injecting discovered endpoint: %s)rsrrmrkr_r`�
startswith�url)rZrequestr)rr@rSrrr
ro�s�

z*EndpointDiscoveryHandler.discover_endpointc
Ks�|durdS|\}}|�di��d�}|�di��d�}|dkrL|dkrLdS|�di�}|�di��d	�}	|	durvdS|jj|j|	d
�dS)NZResponseMetadataZHTTPStatusCode�ErrorZCodei�ZInvalidEndpointExceptionrsrrrqrtr)rrmr]r )
rZrequest_dictrQr;r�_ZstatusZ
error_codersr@rrr
rps�z'EndpointDiscoveryHandler.handle_retriesN)r	r
rrrnr=rorprrrr
rl�s
	rl)ZloggingrErHZbotocorerZbotocore.exceptionsrrrZbotocore.modelrZbotocore.utilsrZ	getLoggerr	r_rrrrrrBrlrrrr
�<module>
s
4}

Youez - 2016 - github.com/yon3zu
LinuXploit