HEX
Server: LiteSpeed
System: Linux us-phx-web1284.main-hosting.eu 4.18.0-553.109.1.lve.el8.x86_64 #1 SMP Thu Mar 5 20:23:46 UTC 2026 x86_64
User: u300739242 (300739242)
PHP: 8.2.30
Disabled: system, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
Upload Files
File: //opt/alt/python311/lib/python3.11/site-packages/botocore/__pycache__/discovery.cpython-311.pyc
�

/�;fC+���ddlZddlZddlZddlmZddlmZmZmZddl	m
Z
ddlmZej
e��ZGd�de��ZGd�d	e��ZGd
�de��Zd�ZGd
�d��ZGd�d��ZGd�d��ZdS)�N)�
xform_name)�
BotoCoreError�ConnectionError�HTTPClientError)�OperationNotFoundError)�CachedPropertyc��eZdZdS)�EndpointDiscoveryExceptionN)�__name__�
__module__�__qualname__���E/opt/alt/python311/lib/python3.11/site-packages/botocore/discovery.pyr
r
s�������Drr
c��eZdZdZdZdS)�EndpointDiscoveryRequiredzBEndpoint Discovery is disabled but is required for this operation.zAEndpoint Discovery is not enabled but this operation requires it.N�rrr
�__doc__�fmtrrrrrs������L�L�
M�C�C�Crrc��eZdZdZdZdS)�EndpointDiscoveryRefreshFailedz=Endpoint Discovery failed to the refresh the known endpoints.z<Endpoint Discovery failed to refresh the required endpoints.Nrrrrrr#s������G�G�
H�C�C�Crrc�b�|j}|r#|�d��rt���dSdS)N�required)�endpoint_discovery�getr)�model�kwargsrs   r�,block_endpoint_discovery_required_operationsr)sI���1���*�0�4�4�Z�@�@�*�'�)�)�)�*�*�*�*rc�Z�eZdZd�Zed���Zed���Zd�Zd�Zd�Z	d	d�Z
dS)
�EndpointDiscoveryModelc��||_dS�N)�_service_model)�self�
service_models  r�__init__zEndpointDiscoveryModel.__init__0s��+����rc�B�|jj}t|j��Sr")r#�endpoint_discovery_operationr�name)r$�discovery_operations  r�discovery_operation_namez/EndpointDiscoveryModel.discovery_operation_name3s ��"�1�N���-�2�3�3�3rc��|jj}g}|jr+t|jj�����}|Sr")r#r(�input_shape�list�members�keys)r$r*r0s   r�discovery_operation_keysz/EndpointDiscoveryModel.discovery_operation_keys8sD��"�1�N�����*�	H��+�7�?�D�D�F�F�G�G�D��rc��	|j�|��}|j�dd��S#t$rYdSwxYw)NrF)r#�operation_modelrrr)r$�operation_namer3s   r�discovery_required_forz-EndpointDiscoveryModel.discovery_required_for@s_��	�"�1�A�A����O�#�5�9�9�*�e�L�L�L��%�	�	�	��5�5�	���s�47�
A�Ac����|j�|�d��s,|�dd��|�dd���fd�|���D��S)N�Identifiers�	Operationc�$��i|]\}}|�v�	||��
Srr)�.0�k�v�
input_keyss   �r�
<dictcomp>zEEndpointDiscoveryModel.discovery_operation_kwargs.<locals>.<dictcomp>Os$���C�C�C���A�1�
�?�?��1�?�?�?r)r1r�pop�items)r$rr=s  @r�discovery_operation_kwargsz1EndpointDiscoveryModel.discovery_operation_kwargsIsi����2�
��z�z�-�(�(�	,��J�J�{�D�)�)�)��J�J�}�d�+�+�+�C�C�C�C������C�C�C�Crc�8�|�|j|��Sr")�_gather_idsr-�r$�	operation�paramss   r�gather_identifiersz)EndpointDiscoveryModel.gather_identifiersQs�����	� 5�v�>�>�>rNc���|�i}|j���D]W\}}|j�d��r||||<�+|jdkr!||vr|�||||���X|S)N�endpointdiscoveryid�	structure)r/r@�metadatar�	type_namerC)r$�shaperF�ids�member_name�member_shapes      rrCz"EndpointDiscoveryModel._gather_idsTs����;��C�).��)<�)<�)>�)>�	I�	I�%�K���$�(�(�)>�?�?�
I�#)�+�#6��K� � ��&�+�5�5�+��:O�:O�� � ��v�k�/B�C�H�H�H���
rr")rrr
r&rr+r1r5rArGrCrrrr r /s�������,�,�,��4�4��^�4�����^�����D�D�D�?�?�?������rr c�Z�eZdZ	dd�Zd�Zd�Zd�Zd�Zd�Zd	�Z	d
�Z
d�Zd�Zd
�Z
d�ZdS)�EndpointDiscoveryManagerNTc���|�i}||_i|_|�tj}||_||_tj|��|_t|j	j
��|_dSr")�_cache�_failed_attempts�time�_time�_always_discover�weakref�proxy�_clientr �metar%�_model)r$�client�cache�current_time�always_discovers     rr&z!EndpointDiscoveryManager.__init__dsd���=��E���� "������9�L�!��
� /����}�V�,�,���,�V�[�-F�G�G����rc��|d}|���}|D]"}|�d��}||dzz|d<�#|S)N�	Endpoints�CachePeriodInMinutes�<�
Expiration)rWr)r$�response�	endpointsr`�endpoint�
cache_times      r�_parse_endpointsz)EndpointDiscoveryManager._parse_endpointsusX���[�)�	��z�z�|�|��!�	D�	D�H�!���&<�=�=�J�%1�J��O�%C�H�\�"�"��rc��t|t��r.tt|�������S|Sr")�
isinstance�dict�tuple�sortedr@)r$�values  r�_cache_itemz$EndpointDiscoveryManager._cache_item}s7���e�T�"�"�	������
�
�.�.�/�/�/��Lrc����jjdi|��}t�fd�t|�����D����S)Nc3�H�K�|]\}}��|��V��dSr")rr)r:r;r<r$s   �r�	<genexpr>z=EndpointDiscoveryManager._create_cache_key.<locals>.<genexpr>�s5�����L�L�T�Q��T�%�%�a�(�(�L�L�L�L�L�Lrr)r]rArorpr@)r$rs` r�_create_cache_keyz*EndpointDiscoveryManager._create_cache_key�sP���7���7�A�A�&�A�A���L�L�L�L�V�F�L�L�N�N�5K�5K�L�L�L�L�L�Lrc�8�|j�||��Sr")r]rGrDs   rrGz+EndpointDiscoveryManager.gather_identifiers�s���{�-�-�i��@�@�@rc�F�|jdi|��}||jvr
|j|=dSdS)Nr)rvrT)r$r�	cache_keys   r�delete_endpointsz)EndpointDiscoveryManager.delete_endpoints�s?��*�D�*�4�4�V�4�4�	����#�#���I�&�&�&�$�#rc��|jjdi|��}|jj}t|j|��}t
�d|��|di|��S)Nz%Discovering endpoints with kwargs: %sr)r]rAr+�getattrr[�logger�debug)r$rr4r*s    r�_describe_endpointsz,EndpointDiscoveryManager._describe_endpoints�sf��8���7�A�A�&�A�A����=��%�d�l�N�C�C�����<�f�E�E�E�"�"�,�,�V�,�,�,rc�t��||jvrdS|�����fd�|j|D��S)Nc�,��g|]}�|dk�|��S)rfr)r:�e�nows  �r�
<listcomp>zCEndpointDiscoveryManager._get_current_endpoints.<locals>.<listcomp>�s'���E�E�E�a�s�Q�|�_�/D�/D��/D�/D�/Dr)rTrW)r$�keyr�s  @r�_get_current_endpointsz/EndpointDiscoveryManager._get_current_endpoints�sC����d�k�!�!��4��j�j�l�l��E�E�E�E�4�;�s�+�E�E�E�Erc��|jdi|��}	|jdi|��}|�|��}||j|<|j�|d��|S#ttf$r#|���dz|j|<YdSwxYw)Nrer)	rvrrkrTrUr?rrrW)r$rryrgrhs     r�_refresh_current_endpointsz3EndpointDiscoveryManager._refresh_current_endpoints�s���*�D�*�4�4�V�4�4�	�	�/�t�/�9�9�&�9�9�H��-�-�h�7�7�I�%.�D�K�	�"��!�%�%�i��6�6�6������1�	�	�	�/3�z�z�|�|�b�/@�D�!�)�,��4�4�	���s�AA�0B�Bc�v�||jvr/|���}||j|krdS|j|=dS)NTF)rUrW)r$ryr�s   r�_recently_failedz)EndpointDiscoveryManager._recently_failed�sE����-�-�-��*�*�,�,�C��T�*�9�5�5�5��t��%�i�0��urc��|ddS)Nr�Addressr)r$rhs  r�_select_endpointz)EndpointDiscoveryManager._select_endpoint�s����|�I�&�&rc��|d}|j�|��}|js!|st�d|z��dS|jdi|��}|�|��}|r|�|��S|�|��}|s$|j	di|��}|r|�|��St�d|��|j
�|d��}|r|�|��S|r4|r$|j	di|��}|r|�|��St���dS)Nr8zAOptional discovery disabled. Skipping discovery for Operation: %sz%Endpoint Discovery has failed for: %sr)
r]r5rXr}r~rvr�r�r�r�rTrr)r$rrE�discovery_requiredryrh�recently_failed�
stale_entriess        r�describe_endpointz*EndpointDiscoveryManager.describe_endpoint�s����;�'�	�!�[�?�?�	�J�J���$�	�-?�	��L�L�S���
�
�
��4�+�D�*�4�4�V�4�4�	��/�/�	�:�:�	��	4��(�(��3�3�3��/�/�	�:�:���	8�7��7�A�A�&�A�A�I��
8��,�,�Y�7�7�7����<�f�E�E�E�����	�4�8�8�
��	8��(�(��7�7�7��		3��
<�;�D�;�E�E�f�E�E�	��<��0�0��;�;�;�0�2�2�2��tr)NNT)rrr
r&rkrrrvrGrzrr�r�r�r�r�rrrrRrRcs�������EI�H�H�H�H�"������M�M�M�A�A�A�'�'�'�
-�-�-�F�F�F�
�
�
����'�'�'�)�)�)�)�)rrRc�,�eZdZd�Zd�Zd�Zd�Zd�ZdS)�EndpointDiscoveryHandlerc��||_dSr")�_manager)r$�managers  rr&z!EndpointDiscoveryHandler.__init__�s
����
�
�
rc��|�d|z|j��|�d|z|j��|�d|z|j��dS)Nzbefore-parameter-build.%szrequest-created.%szneeds-retry.%s)�registerrG�register_first�discover_endpoint�handle_retries)r$�events�
service_ids   rr�z!EndpointDiscoveryHandler.register�sq�����'�*�4�d�6M�	
�	
�	
�	��� �:�-�t�/E�	
�	
�	
�	���(�:�5�t�7J�K�K�K�K�Krc�`�|j}|�dS|j�||��}d|i|d<dS)N�identifiers�	discovery)rr�rG)r$rFr�contextrrrNs       rrGz+EndpointDiscoveryHandler.gather_identifiers�sB��"�5���%��F��m�.�.�u�f�=�=�� -�s�3�����rc�V�|j�di���d��}|�dS|j�||���}|�t�d��dS|�d��sd|z}t�d|��||_dS)Nr�r��r8r7z&Failed to discover and inject endpoint�httpzhttps://z!Injecting discovered endpoint: %s)r�rr�r�r}r~�
startswith�url)r$�requestr4rrNris      rr�z*EndpointDiscoveryHandler.discover_endpoint�s����o�!�!�+�r�2�2�6�6�}�E�E���;��F��=�2�2�$�#�3�
�
�����L�L�A�B�B�B��F��"�"�6�*�*�	-�!�H�,�H����8�(�C�C�C�����rc��|�dS|\}}|�di���d��}|�di���d��}|dkr|dkrdS|�di��}|�di���d	��}	|	�dS|j�|j|	�
��dS)N�ResponseMetadata�HTTPStatusCode�Error�Codei��InvalidEndpointExceptionr�r�r�r�r)rr�rzr))
r$�request_dictrgrEr�_�status�
error_coder�rNs
          rr�z'EndpointDiscoveryHandler.handle_retriess������4����8����0�"�5�5�9�9�:J�K�K���\�\�'�2�.�.�2�2�6�:�:�
��S�=�=�Z�+E�E�E��4��"�"�9�b�1�1���k�k�+�r�*�*�.�.�}�=�=���;��4�
	
�
�&�&��n�#�	'�	
�	
�	
��qrN)rrr
r&r�rGr�r�rrrr�r��sb������ � � �L�L�L�4�4�4�
�
�
�����rr�)�loggingrVrY�botocorer�botocore.exceptionsrrr�botocore.modelr�botocore.utilsr�	getLoggerrr}r
rrrr rRr�rrr�<module>r�s���������������������O�O�O�O�O�O�O�O�O�O�1�1�1�1�1�1�)�)�)�)�)�)�	��	�8�	$�	$��	�	�	�	�	��	�	�	�N�N�N�N�N� :�N�N�N�I�I�I�I�I�%?�I�I�I�*�*�*�1�1�1�1�1�1�1�1�h{�{�{�{�{�{�{�{�|9�9�9�9�9�9�9�9�9�9r