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__/regions.cpython-311.pyc
�

/�;f�~��P�dZddlZddlZddlZddlmZddlmZmZddl	m
Z
mZddlm
Z
ddlmZddlmZmZmZmZmZmZmZmZmZmZmZmZmZmZdd	lm Z m!Z!ej"e#��Z$d
Z%diiZ&Gd�d
��Z'Gd�de'��Z(Gd�de)e��Z*Gd�d��Z+dS)z�Resolves regions and endpoints.

This module implements endpoint resolution, including resolving endpoints for a
given service and region and resolving the available endpoints for a service
in a specific AWS partition.
�N)�Enum)�UNSIGNED�
xform_name)�AUTH_TYPE_MAPS�HAS_CRT��CRT_SUPPORTED_AUTH_TYPES)�EndpointProvider)�EndpointProviderError�EndpointVariantError�!InvalidEndpointConfigurationError�InvalidHostLabelError�MissingDependencyException�
NoRegionError�ParamValidationError�$UnknownEndpointResolutionBuiltInName�UnknownRegionError�UnknownSignatureVersionError�*UnsupportedS3AccesspointConfigurationError�UnsupportedS3ConfigurationError�UnsupportedS3ControlArnError�&UnsupportedS3ControlConfigurationError)�ensure_boolean�instance_cachez{service}.{region}.{dnsSuffix}�	endpointsc�*�eZdZdZdd�Zd�Z	d	d�ZdS)
�BaseEndpointResolverz3Resolves regions and endpoints. Must be subclassed.Nc��t�)a7Resolves an endpoint for a service and region combination.

        :type service_name: string
        :param service_name: Name of the service to resolve an endpoint for
            (e.g., s3)

        :type region_name: string
        :param region_name: Region/endpoint name to resolve (e.g., us-east-1)
            if no region is provided, the first found partition-wide endpoint
            will be used if available.

        :rtype: dict
        :return: Returns a dict containing the following keys:
            - partition: (string, required) Resolved partition name
            - endpointName: (string, required) Resolved endpoint name
            - hostname: (string, required) Hostname to use for this endpoint
            - sslCommonName: (string) sslCommonName to use for this endpoint.
            - credentialScope: (dict) Signature version 4 credential scope
              - region: (string) region name override when signing.
              - service: (string) service name override when signing.
            - signatureVersions: (list<string>) A list of possible signature
              versions, including s3, v4, v2, and s3v4
            - protocols: (list<string>) A list of supported protocols
              (e.g., http, https)
            - ...: Other keys may be included as well based on the metadata
        ��NotImplementedError)�self�service_name�region_names   �C/opt/alt/python311/lib/python3.11/site-packages/botocore/regions.py�construct_endpointz'BaseEndpointResolver.construct_endpoint6s
��6"�!�c��t�)z�Lists the partitions available to the endpoint resolver.

        :return: Returns a list of partition names (e.g., ["aws", "aws-cn"]).
        r�r!s r$�get_available_partitionsz-BaseEndpointResolver.get_available_partitionsSs
��
"�!r&�awsFc��t�)a�Lists the endpoint names of a particular partition.

        :type service_name: string
        :param service_name: Name of a service to list endpoint for (e.g., s3)

        :type partition_name: string
        :param partition_name: Name of the partition to limit endpoints to.
            (e.g., aws for the public AWS endpoints, aws-cn for AWS China
            endpoints, aws-us-gov for AWS GovCloud (US) Endpoints, etc.

        :type allow_non_regional: bool
        :param allow_non_regional: Set to True to include endpoints that are
             not regional endpoints (e.g., s3-external-1,
             fips-us-gov-west-1, etc).
        :return: Returns a list of endpoint names (e.g., ["us-east-1"]).
        r)r!r"�partition_name�allow_non_regionals    r$�get_available_endpointsz,BaseEndpointResolver.get_available_endpointsZs
��&"�!r&�N)r*F)�__name__�
__module__�__qualname__�__doc__r%r)r.�r&r$rr3sX������=�=�"�"�"�"�:"�"�"�FK�"�"�"�"�"�"r&rc��eZdZdZddgZdd�Zdd�Zd�Z			dd
�Z	dd�Z					dd�Z
d
�Z	dd�Zd�Z
d�Zd�Zd�Zd�Zd�Zd�Zd	S)�EndpointResolverz7Resolves endpoints based on partition endpoint metadatazaws-isoz	aws-iso-bFc�H�d|vrtd���||_||_dS)a
        :type endpoint_data: dict
        :param endpoint_data: A dict of partition data.

        :type uses_builtin_data: boolean
        :param uses_builtin_data: Whether the endpoint data originates in the
            package's data directory.
        �
partitionsz%Missing "partitions" in endpoint dataN)�
ValueError�_endpoint_data�uses_builtin_data)r!�
endpoint_datar;s   r$�__init__zEndpointResolver.__init__us4���}�,�,��D�E�E�E�+���!2����r&r*c�x�|jdD]+}|d|kr�|d}||vr�||dcSdS)Nr8�	partition�servicesr)r:)r!r"r,r?r@s     r$�get_service_endpoints_dataz+EndpointResolver.get_service_endpoints_data�sd���,�\�:�	7�	7�I���%��7�7�� ��,�H��8�+�+���L�)�+�6�6�6�6�
	7�	7r&c�`�g}|jdD]}|�|d���|S)Nr8r?)r:�append)r!�resultr?s   r$r)z)EndpointResolver.get_available_partitions�s=�����,�\�:�	2�	2�I��M�M�)�K�0�1�1�1�1��
r&Nc�:�g}|jdD]�}|d|kr�|d}||vr�||d}|D]]}	|	|dv}
|r6|
r4|�||	|��}|r|�|	���D|s|
r|�|	���^��|S)Nr8r?r@r�regions)r:�_retrieve_variant_datarC)r!r"r,r-�endpoint_variant_tagsrDr?r@�service_endpoints�
endpoint_name�is_regional_endpoint�variant_datas            r$r.z(EndpointResolver.get_available_endpoints�s������,�\�:�	1�	1�I���%��7�7�� ��,�H��8�+�+�� (�� 6�{� C��!2�

1�

1�
�'4�	�)�8L�'L�$�(�1�-A�1�#'�#>�#>�)�-�8�:O�$�$�L�$�5��
�
�m�4�4�4��'�1�+?�1��M�M�-�0�0�0��

1��
r&c���|jdD]T}|d|krF|r:|�|�d��|��}|rd|vr
|dcS�J|dcS�UdS)Nr8r?�defaults�	dnsSuffix)r:rG�get)r!r,rHr?�variants     r$�get_partition_dns_suffixz)EndpointResolver.get_partition_dns_suffix�s����,�\�:�		2�		2�I���%��7�7�(�2�"�9�9�!�
�
�j�1�1�3H���G��4�;�'�#9�#9�&�{�3�3�3�3��$�[�1�1�1�1�8��tr&c�$�|dkr|r|�d}|�@d}|jdD]}|d|kr|}�|�|�|||||d��}|SdS|jdD]3}|r|d|jvr�|�|||||��}|r|cS�4dS)N�s3z	us-east-1r8r?T)r:�_endpoint_for_partition�!_UNSUPPORTED_DUALSTACK_PARTITIONS)	r!r"r#r,�use_dualstack_endpoint�use_fips_endpoint�valid_partitionr?rDs	         r$r%z#EndpointResolver.construct_endpoint�s��
�D� � �&�
!��#�%�K��%�"�O�!�0��>�
0�
0�	��[�)�^�;�;�&/�O���*��5�5�#� ��*�%��
����
��4��,�\�:�	�	�I�%�
��+�&��9�:�:���1�1����&�!���F��
��
�
�
�
�	�	r&c��|jdD]"}|�||��r
|dcS�#t|d����)Nr8r?z,No partition found for provided region_name.)r#�	error_msg)r:�
_region_matchr)r!r#r?s   r$�get_partition_for_regionz)EndpointResolver.get_partition_for_region�sd���,�\�:�	.�	.�I��!�!�)�[�9�9�
.� ��-�-�-�-�
.� �#�D�
�
�
�	
r&c�T�|d}|r ||jvrd|z}tdg|����|d�|t��}	|�d|	vr	|	d}nt	���|||	|||d�}
||	dvr
|jdi|
��S|�||��s|r�|	�d��}|	�d	d
��}|r1|s/t�d|||��||
d<|jdi|
��St�d
||��|jdi|
��SdS)Nr?z@Dualstack endpoints are currently not supported for %s partition�	dualstack��tagsr[r@�partitionEndpoint)r?r"�service_datarJrWrXr�isRegionalizedTz'Using partition endpoint for %s, %s: %srJz*Creating a regex based endpoint for %s, %sr4)	rVrrP�DEFAULT_SERVICE_DATAr�_resolver\�LOG�debug)
r!r?r"r#rWrX�force_partitionr,r[rc�resolve_kwargs�partition_endpoint�is_regionalizeds
             r$rUz(EndpointResolver._endpoint_for_partition�s���#�;�/��"�	P��$�"H�H�H�$�&4�5�
�'�[�M�Y�O�O�O�O�!��,�0�0��.�
�
����"�l�2�2�*�+>�?���#�o�o�%�#�(�(�(�&<�!2�

�
���,�{�3�3�3� �4�=�2�2�>�2�2�2����i��5�5�	3��	3�!-�!1�!1�2E�!F�!F��*�.�.�/?��F�F�O�!�
7�/�
7��	�	�=� ��&�	���3E���/�$�t�}�6�6�~�6�6�6��I�I�<���
�
�
�
!�4�=�2�2�>�2�2�2�%	3�	3r&c��||dvrdSd|vr-tj|d���|��SdS)NrFT�regionRegexF)�re�compile�match)r!r?r#s   r$r\zEndpointResolver._region_match9sJ���)�I�.�.�.��4��I�%�%��:�i�
�6�7�7�=�=�k�J�J�J��ur&c��|�dg��}|D]@}t|d��t|��kr|���}|cS�AdS)N�variantsra)rP�set�copy)r!r<rarsrQrDs      r$rGz'EndpointResolver._retrieve_variant_data@sh�� �$�$�Z��4�4���	�	�G��7�6�?�#�#�s�4�y�y�0�0� �������
�
�
�1�	�	r&c�f�g}|r|�d��|r|�d��|S)Nr_�fips)rC)r!rWrXras    r$�_create_tag_listz!EndpointResolver._create_tag_listGs@����!�	%��K�K��$�$�$��	 ��K�K������r&c�v�i}|||fD]0}|�||��}|r|�||���1|Sr/)rG�_merge_keys)r!rar<�service_defaults�partition_defaultsrDrsrQs        r$�_resolve_variantz!EndpointResolver._resolve_variantOsZ����&�(8�:L�M�	2�	2�H��1�1�(�D�A�A�G��
2�� � ��&�1�1�1���
r&c�$�|�di���|i��}|�d��rt�d|z��|�di��}|�di��}	|�||��}
|
rN|�|
|||	��}|ikrd|�d|��}t|
|����|�||��n|}d|vr|d|d<|d	|d	<||d
<|�||��|�|	|��|�||d|||d��|d<d|vr(|�||d|||d��|d<|S)
Nr�
deprecatedz5Client is configured with the deprecated endpoint: %srNzEndpoint does not exist for z in region r`rOr?�endpointName�hostname�
sslCommonName)rPrg�warningrxr}rrz�_expand_template)
r!r?r"rcrJrWrXr<r{r|rarDr[s
             r$rfzEndpointResolver._resolveYs��%�(�(��b�9�9�=�=��2�
�
�
����\�*�*�	��K�K�G� �"�
�
�
�
(�+�+�J��;�;��&�]�]�:�r�:�:���$�$�%;�=N�O�O���	#��*�*��m�%5�7I���F���|�|�1�<�1�1�!.�1�1��+��	�J�J�J�J����]�F�3�3�3�3�"�F��f�$�$�"+�K�"8�F�;��'��4��{��!.��~��	
���)�6�2�2�2����+�V�4�4�4�!�2�2���:�����;��
�
��z���f�$�$�&*�&;�&;����'����{�#�'�'�F�?�#��
r&c�.�|D]}||vr||||<�dSr/r4)r!�	from_datarD�keys    r$rzzEndpointResolver._merge_keys�s4���	-�	-�C��&� � �'��n��s���	-�	-r&c�2�|�|||���S)N)�service�regionrO)�format)r!r?�templater"rJrOs      r$r�z!EndpointResolver._expand_template�s&����� ��)��
�
�	
r&)F)r*)r*FNr/)NNFF)r0r1r2r3rVr=rAr)r.rRr%r]rUr\rGrxr}rfrzr�r4r&r$r6r6psM������A�A�)2�K�(@�%�3�3�3�3�7�7�7�7����� �"�����:59�
�
�
�
�$��$��
0�0�0�0�d
�
�
� �?3�?3�?3�?3�B������������@�@�@�D-�-�-�

�
�
�
�
r&r6c�:�eZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dS)
�EndpointResolverBuiltinszAWS::RegionzAWS::UseFIPSzAWS::UseDualStackzAWS::STS::UseGlobalEndpointzAWS::S3::UseGlobalEndpointzAWS::S3::AcceleratezAWS::S3::ForcePathStylezAWS::S3::UseArnRegionzAWS::S3Control::UseArnRegionz'AWS::S3::DisableMultiRegionAccessPointsz
SDK::EndpointN)r0r1r2�
AWS_REGION�AWS_USE_FIPS�AWS_USE_DUALSTACK�AWS_STS_USE_GLOBAL_ENDPOINT�AWS_S3_USE_GLOBAL_ENDPOINT�AWS_S3_ACCELERATE�AWS_S3_FORCE_PATH_STYLE�AWS_S3_USE_ARN_REGION�AWS_S3CONTROL_USE_ARN_REGION�AWS_S3_DISABLE_MRAP�SDK_ENDPOINTr4r&r$r�r��s[�������J�"�L�,��#@��">��-��7��4��$B� �C��"�L�L�Lr&r�c��eZdZdZ		dd�Zd�Zd�Zd�Zd�Zd	�Z	d
�Z
d�Zed���Z
ed
���Zed���Zd�Zd�Zd�Zd�Zd�ZdS)�EndpointRulesetResolverz5Resolves endpoints using a service's endpoint rulesetTNc	��t||���|_|jjj|_||_||_||_||_||_	||_
i|_dS)N)�ruleset_data�partition_data)r
�	_provider�ruleset�
parameters�_param_definitions�_service_model�	_builtins�_client_context�_event_emitter�_use_ssl�_requested_auth_scheme�_instance_cache)	r!�endpoint_ruleset_datar��
service_model�builtins�client_context�
event_emitter�use_ssl�requested_auth_schemes	         r$r=z EndpointRulesetResolver.__init__�sn��*�.�)�
�
�
���#'�.�"8�"C���+���!���-���+�����
�&;��#�!����r&c�B�|�i}|�i}|�|||��}t�d|z��	|jjd
i|��}n.#t
$r!}|�||��}|��||�d}~wwxYwt�d|jz��|js@|j�	d��r&|�
d|jdd������}|�
d�|j���D���	��}|S)zAInvokes the provider with params defined in the service's rulesetNz-Calling endpoint provider with parameters: %szEndpoint provider result: %szhttps://zhttp://�)�urlc�&�i|]\}}||d��S)rr4)�.0r��vals   r$�
<dictcomp>z>EndpointRulesetResolver.construct_endpoint.<locals>.<dictcomp>
s/����� (��S��S��V���r&)�headersr4)
�_get_provider_paramsrgrhr��resolve_endpointr�#ruleset_error_to_botocore_exceptionr�r��
startswith�_replacer��items)r!�operation_model�	call_args�request_context�provider_params�provider_result�ex�botocore_exceptions        r$r%z*EndpointRulesetResolver.construct_endpoint�s������I��"� �O��3�3��Y��
�
��	�	�	�;�o�M�	
�	
�	
�	1�=�d�n�=���!���O�O��%�	1�	1�	1�!%�!I�!I��O�"�"��"�)��(�b�0�����	1����	�	�	�0�?�3F�F�G�G�G��}�	��!4�!?�!?�
�!K�!K�	�-�6�6�7�o�1�!�"�"�5�7�7�7���O�*�2�2���,;�,C�,I�,I�,K�,K����3�
�
���s�A�
A<�A7�7A<c��i}|�|||��}|j���D]I\}}|�|||���}|�#|j�|�|j|���}|�|||<�J|S)a�Resolve a value for each parameter defined in the service's ruleset

        The resolution order for parameter values is:
        1. Operation-specific static context values from the service definition
        2. Operation-specific dynamic context values from API parameters
        3. Client-specific context parameters
        4. Built-in values such as region, FIPS usage, ...
        )�
param_namer�r�N)�builtin_namer�)�_get_customized_builtinsr�r��_resolve_param_from_context�builtin�_resolve_param_as_builtin)	r!r�r�r�r��customized_builtinsr��	param_def�	param_vals	         r$r�z,EndpointRulesetResolver._get_provider_paramss�����#�;�;��Y��
�
��&*�%<�%B�%B�%D�%D�	8�	8�!�J�	��8�8�%� /�#�9���I�
� �Y�%6�%B� �:�:�!*�!2�0�;���	��$�.7��
�+���r&c��|�||��}|�|S|�|||��}|�|S|�|��Sr/)�&_resolve_param_as_static_context_param�'_resolve_param_as_dynamic_context_param�&_resolve_param_as_client_context_param)r!r�r�r��static�dynamics      r$r�z3EndpointRulesetResolver._resolve_param_from_context5sh���<�<���
�
�����M��>�>����
�
�����N��:�:�:�F�F�Fr&c�V�|�|��}|�|��Sr/)�_get_static_context_paramsrP)r!r�r��static_ctx_paramss    r$r�z>EndpointRulesetResolver._resolve_param_as_static_context_paramDs,��!�;�;�O�L�L�� �$�$�Z�0�0�0r&c�r�|�|��}||vr||}|�|��SdSr/)�_get_dynamic_context_paramsrP)r!r�r�r��dynamic_ctx_params�member_names      r$r�z?EndpointRulesetResolver._resolve_param_as_dynamic_context_paramJsH��"�=�=�o�N�N���+�+�+�,�Z�8�K��=�=��-�-�-�,�+r&c�z�|���}||vr"||}|j�|��SdSr/)�_get_client_context_paramsr�rP)r!r��client_ctx_params�client_ctx_varnames    r$r�z>EndpointRulesetResolver._resolve_param_as_client_context_paramRsK�� �;�;�=�=���*�*�*�!2�:�!>���'�+�+�,>�?�?�?�+�*r&c��|tj���vrt|����|�|��S)N��name)r��__members__�valuesrrP)r!r�r�s   r$r�z1EndpointRulesetResolver._resolve_param_as_builtinXs@���7�C�J�J�L�L�L�L�6�L�I�I�I�I��|�|�L�)�)�)r&c�$�d�|jD��S)z=Mapping of param names to static param value for an operationc�(�i|]}|j|j��Sr4)r��value�r��params  r$r�zFEndpointRulesetResolver._get_static_context_params.<locals>.<dictcomp>`s.��
�
�
��
�J���
�
�
r&)�static_context_parameters�r!r�s  r$r�z2EndpointRulesetResolver._get_static_context_params]s&��
�
�(�B�
�
�
�	
r&c�$�d�|jD��S)z7Mapping of param names to member names for an operationc�(�i|]}|j|j��Sr4)r�r�r�s  r$r�zGEndpointRulesetResolver._get_dynamic_context_params.<locals>.<dictcomp>hs/��
�
�
��
�J��)�
�
�
r&)�context_parametersr�s  r$r�z3EndpointRulesetResolver._get_dynamic_context_paramses&��
�
�(�;�
�
�
�	
r&c�.�d�|jjD��S)z7Mapping of param names to client configuration variablec�B�i|]}|jt|j����Sr4)r�rr�s  r$r�zFEndpointRulesetResolver._get_client_context_params.<locals>.<dictcomp>ps6��
�
�
��
�J�
�5�:�.�.�
�
�
r&)r��client_context_parametersr(s r$r�z2EndpointRulesetResolver._get_client_context_paramsms)��
�
��,�F�
�
�
�	
r&c��|jj���}tj|j��}|j�d|z||||���|S)Nzbefore-endpoint-resolution.%s)r��model�params�context)r��
service_id�	hyphenizerur�r��emit)r!r�r�r�r�r�s      r$r�z0EndpointRulesetResolver._get_customized_builtinsusi���(�3�=�=�?�?�
�"�i���7�7���� � �+�j�8�(�!��#�	!�	
�	
�	
�#�"r&c���t|t��rt|��dkrtd���t�dd�d�|D�����j���jtkrdifS�fd�|D��}�j�4	t�fd	�|D����\}}n�#t$rdifcYSwxYw	td
�|D����\}}nq#t$rdd}d�|D��}tstd
�|D����}|rtd����td�|������wxYwi}d|vr|d|d<n.d|vr*t|d��dkr|dd|d<d|vr|�|d���d|vrt!|d��|d<t�d|d||��||fS)a�Convert an Endpoint's authSchemes property to a signing_context dict

        :type auth_schemes: list
        :param auth_schemes: A list of dictionaries taken from the
            ``authSchemes`` property of an Endpoint object returned by
            ``EndpointProvider``.

        :rtype: str, dict
        :return: Tuple of auth type string (to be used in
            ``request_context['auth_type']``) and signing context dict (for use
            in ``request_context['signing']``).
        rz&auth_schemes must be a non-empty list.z_Selecting from endpoint provider's list of auth schemes: %s. User selected auth scheme is: "%s"z, c�@�g|]}d|�d���d���S)�"r�)rP�r��ss  r$�
<listcomp>zGEndpointRulesetResolver.auth_schemes_to_signing_ctx.<locals>.<listcomp>�s.��B�B�B��+�1�5�5��=�=�+�+�+�B�B�Br&�nonec�R��g|]#}i|�d��|d��i���$Sr�)�_strip_sig_prefix)r��schemer!s  �r$r�zGEndpointRulesetResolver.auth_schemes_to_signing_ctx.<locals>.<listcomp>�sK���
�
�
��
G�v�F�v�t�5�5�f�V�n�E�E�F�F�
�
�
r&Nc3�l�K�|].}���j|d���#�j|fV��/dS�r�N)�._does_botocore_authname_match_ruleset_authnamer�)r�r�r!s  �r$�	<genexpr>zFEndpointRulesetResolver.auth_schemes_to_signing_ctx.<locals>.<genexpr>�sa�����$�$���J�J��3�Q�v�Y���$��0�!�4�$�$�$�$�$�$r&c3�HK�|]}|dtv�|d|fV��dSr)rr�s  r$rzFEndpointRulesetResolver.auth_schemes_to_signing_ctx.<locals>.<genexpr>�sE����$�$����y�N�2�2��v�Y��N�2�2�2�2�$�$r&Fc��g|]
}|d��Sr�r4r�s  r$r�zGEndpointRulesetResolver.auth_schemes_to_signing_ctx.<locals>.<listcomp>�s��$E�$E�$E�1�Q�v�Y�$E�$E�$Er&c3�(K�|]
}|tvV��dSr/r)r�rs  r$rzFEndpointRulesetResolver.auth_schemes_to_signing_ctx.<locals>.<genexpr>�s<����+�+�"��":�:�+�+�+�+�+�+r&zbThis operation requires an additional dependency. Use pip install botocore[crt] before proceeding.��msg)�signature_version�
signingRegionr��signingRegionSet�signingName)�signing_name�disableDoubleEncodingz?Selected auth type "%s" as "%s" with signing context params: %sr�)�
isinstance�list�len�	TypeErrorrgrh�joinr�r�next�
StopIterationr�anyrr�updater)r!�auth_schemesr�r�fixable_with_crt�auth_type_options�signing_contexts`      r$�auth_schemes_to_signing_ctxz3EndpointRulesetResolver.auth_schemes_to_signing_ctx�s����,��-�-�	F��\�1B�1B�a�1G�1G��D�E�E�E��	�	�
1��I�I�B�B�\�B�B�B�C�C��'�		
�	
�	
��&�(�2�2��2�:��
�
�
�
�&�
�
�
���&�2�
 � $�$�$�$�$�)�$�$�$� � ���f�f��!�
 �
 �
 ��R�x����	
 ����
�#�$�$�)�$�$�$� � ���f�f��
!�
�
�
�$)� �$E�$E��$E�$E�$E�!���'*�+�+�&7�+�+�+�(�(�$�
$��4�L�����
7�*.�)�)�4E�*F�*F�����%
����,���f�$�$�(.��(?�O�H�%�%�
�6�
)�
)��6�,�-�.�.��2�2�,2�3E�,F�q�,I���)��F�"�"��"�"��}�0E�"�F�F�F�"�f�,�,�7E��.�/�8�8�O�3�4�	�	�	�M��6�N���		
�	
�	
��_�$�$s�!C�C�C�C2�2A.E c�D�|�d��r
|dd�n|S)z6Normalize auth type names by removing any "sig" prefix�sig�N)r�)r!�	auth_names  r$rz)EndpointRulesetResolver._strip_sig_prefix�s'�� )� 4� 4�U� ;� ;�J�y����}�}��Jr&c��|�|��}|�d��d}|dkr|�d��r
|dd�}||kS)a\
        Whether a valid string provided as signature_version parameter for
        client construction refers to the same auth methods as a string
        returned by the endpoint ruleset provider. This accounts for:

        * The ruleset prefixes auth names with "sig"
        * The s3 and s3control rulesets don't distinguish between v4[a] and
          s3v4[a] signers
        * The v2, v3, and HMAC v1 based signers (s3, s3-*) are botocore legacy
          features and do not exist in the rulesets
        * Only characters up to the first dash are considered

        Example matches:
        * v4, sigv4
        * v4, v4
        * s3v4, sigv4
        * s3v7, sigv7 (hypothetical example)
        * s3v4a, sigv4a
        * s3v4-query, sigv4

        Example mismatches:
        * v4a, sigv4
        * s3, sigv4
        * s3-presign-post, sigv4
        �-rrT�N)r�splitr�)r!�botoname�rsnames   r$rzFEndpointRulesetResolver._does_botocore_authname_match_ruleset_authname�sc��4�'�'��/�/���>�>�#�&�&�q�)���t���� 3� 3�D� 9� 9������|�H���!�!r&c�t�|j�d��}|�dS|�d��r?	|�d��d}n#t$r|}YnwxYwt|���S|jj}|dkr�|dks|d	krt|�
��S|�d��si|�d��sT|�d
��s?|�d��s*|�d��s|�d��rt|�
��S|�
���d��rt|���S|dkr�|�d��r&|�d��}t||���S|�d��s|�d��rt|�
��S|dkrt|���S|dkr;|�d��rt|�
��S|dkrt|�
��SdS)z�Attempts to translate ruleset errors to pre-existing botocore
        exception types by string matching exception strings.
        rNzInvalid region in ARN: �`�)�labelrTz/S3 Object Lambda does not support S3 Acceleratez#Accelerate cannot be used with FIPSrzS3 Outposts does not supportzS3 MRAP does not supportz!S3 Object Lambda does not supportzAccess Points do not supportzInvalid configuration:z#Client was configured for partitionzinvalid arn:)�report�	s3controlzInvalid ARN:�Bucket)�arnrz!AccountId is required but not set�eventszUInvalid Configuration: FIPS is not supported with EventBridge multi-region endpoints.z&EndpointId must be a valid host label.)�kwargsrPr�r(�
IndexErrorrr�r"rr�lowerrrrr
)r!�ruleset_exceptionr�rr.r"r2s       r$r�z;EndpointRulesetResolver.ruleset_error_to_botocore_exception	s��� �&�*�*�5�1�1���;��F��>�>�3�4�4�	6�
��	�	�#���q�)�����
�
�
�����
����(�u�5�5�5�5��*�7���4����H�H�H��?�?�?�6�3�?�?�?�?����=�>�>�
K��>�>�"<�=�=�
K��>�>�"E�F�F�
K��>�>�"@�A�A�	
K�
�>�>�":�;�;�
K��>�>�"G�H�H�

K�B�c�J�J�J�J��y�y�{�{�%�%�n�5�5�
8�+�3�7�7�7�7��;�&�&��~�~�n�-�-�
F��j�j��*�*��3���E�E�E�E��~�~�6�7�7�
G�3�>�>�5�<�<�
G�>�#�F�F�F�F��9�9�9�+�3�7�7�7�7��8�#�#��~�~�6���
B�9�S�A�A�A�A��>�>�>�8�S�A�A�A�A��ts�A�A �A )TN)r0r1r2r3r=r%r�r�r�r�r�r�rr�r�r�r�r rrr�r4r&r$r�r��sK������?�?��"�"�"�"�"�00�0�0�d���B
G�
G�
G�1�1�1�.�.�.�@�@�@�*�*�*�
�
�
��^�
��
�
��^�
��
�
��^�
�
#�
#�
#�_%�_%�_%�BK�K�K�"�"�"�@5�5�5�5�5r&r�),r3ru�loggingro�enumr�botocorerr�
botocore.authrr�botocore.crtr	�botocore.endpoint_providerr
�botocore.exceptionsrrr
rrrrrrrrrrr�botocore.utilsrr�	getLoggerr0rg�DEFAULT_URI_TEMPLATErerr6�strr�r�r4r&r$�<module>rCs4������������	�	�	�	�������)�)�)�)�)�)�)�)�1�1�1�1�1�1�1�1�1�1�1�1�1�1�7�7�7�7�7�7��������������������������������� :�9�9�9�9�9�9�9��g���!�!��7��#�R�(��:"�:"�:"�:"�:"�:"�:"�:"�zu
�u
�u
�u
�u
�+�u
�u
�u
�p	#�#�#�#�#�s�D�#�#�#�>w�w�w�w�w�w�w�w�w�wr&