
    vKg                        S r SSKrSSKrSSKrSSKJr  SSKJr  \R                  " \	5      r
0 SSSS/SS4_SS	_S
S_SS_SS_SSS0 S4_SS_SSSS\4_SSSS\4_SS_SS_SSSS\R                  4_SSS S\R                  4_S!S!S"S\R                  4_S#S#S$S\R                  4_S%S%S&S\R                  4_S'S(_S)S*S\R                  4S+S,S-S.\4S/S0S1S2S3S4S\4S5S6S7S8S\R                  4S9S:.Er SS;KJr  S=S=S>\S40r\R'                  \5        S?S@SS\R                  4SASS\R                  4SBSS\R                  4SCSD/SES\R                  4SFSG/SHSS4SISJS\R                  4SK.rSLSMSNSS\R*                  4SO.rSP rSQ r " SR SS5      r " ST SU5      r " SV SW5      r " SX SY5      r " SZ S[5      r " S\ S]\5      r " S^ S_\5      r " S` Sa\5      r  " Sb Sc\5      r! " Sd Se\5      r" " Sf Sg\5      r# " Sh Si\5      r$g! \ a    S<r GNf = f)jzPThis module contains the interface for controlling how configuration
is loaded.
    N)utils)InvalidConfigErrorprofileAWS_DEFAULT_PROFILEAWS_PROFILEregion)r   AWS_DEFAULT_REGIONNN	data_path)r
   AWS_DATA_PATHNNconfig_file)NAWS_CONFIG_FILEz~/.aws/configN	ca_bundle)r   AWS_CA_BUNDLENNapi_versionscredentials_file)NAWS_SHARED_CREDENTIALS_FILEz~/.aws/credentialsNmetadata_service_timeoutAWS_METADATA_SERVICE_TIMEOUT   metadata_service_num_attempts!AWS_METADATA_SERVICE_NUM_ATTEMPTSec2_metadata_service_endpoint)r   !AWS_EC2_METADATA_SERVICE_ENDPOINTNN"ec2_metadata_service_endpoint_mode)r   &AWS_EC2_METADATA_SERVICE_ENDPOINT_MODENNec2_metadata_v1_disabledAWS_EC2_METADATA_V1_DISABLEDFimds_use_ipv6AWS_IMDS_USE_IPV6use_dualstack_endpointAWS_USE_DUALSTACK_ENDPOINTuse_fips_endpointAWS_USE_FIPS_ENDPOINTignore_configured_endpoint_urls#AWS_IGNORE_CONFIGURED_ENDPOINT_URLSparameter_validation)r&   NTNcsm_enabledAWS_CSM_ENABLED)csm_hostAWS_CSM_HOSTz	127.0.0.1Ncsm_portAWS_CSM_PORTiy  )csm_client_idAWS_CSM_CLIENT_ID N)endpoint_discovery_enabledAWS_ENDPOINT_DISCOVERY_ENABLEDautoN)
retry_modeAWS_RETRY_MODElegacyN)defaults_modeAWS_DEFAULTS_MODEr5   Nmax_attemptsAWS_MAX_ATTEMPTS)sdk_ua_app_idAWS_SDK_UA_APP_IDNN)"request_min_compression_size_bytes&AWS_REQUEST_MIN_COMPRESSION_SIZE_BYTESi (  Ndisable_request_compressionAWS_DISABLE_REQUEST_COMPRESSION)sigv4a_signing_region_setAWS_SIGV4A_SIGNING_REGION_SETNN)r'   r)   r+   r-   r0   r3   r6   r8   user_agent_appidr<   r>   r@   )sts_default_settingr5   sts_regional_endpointsAWS_STS_REGIONAL_ENDPOINTS))s3addressing_styleNNN)rF   use_accelerate_endpoint)rF   r    )rF   payload_signing_enableds3_use_arn_region)rF   use_arn_regionAWS_S3_USE_ARN_REGIONs3_us_east_1_regional_endpoint)rF   us_east_1_regional_endpoint"AWS_S3_US_EAST_1_REGIONAL_ENDPOINT)rF   $s3_disable_multiregion_access_points(AWS_S3_DISABLE_MULTIREGION_ACCESS_POINTS)rG   rH   r    rI   rK   rN   rP   )proxy_ca_bundleNNN)proxy_client_certNNNproxy_use_forwarding_for_https)rR   rS   rT   c                     [        U S9n[        U[        5      n[        SU [        U[        5      5      US'   [        SU [        U[
        5      5      US'   U$ )N)sessionrF   proxies_config)ConfigChainFactory_create_config_chain_mapping!BOTOCORE_DEFAUT_SESSION_VARIABLESSectionConfigProviderDEFAULT_S3_CONFIG_VARSDEFAULT_PROXIES_CONFIG_VARS)rV   chain_builderconfig_mappings      W/var/www/highfloat_scraper/venv/lib/python3.13/site-packages/botocore/configprovider.py&create_botocore_default_config_mappingra      sl    &w7M18N 1$]4JKN4
 (=$6	
(N#$     c           	      ~    0 nUR                  5        H&  u  p4U R                  UUS   US   US   US   S9X#'   M(     U$ )Nr   r         )instance_nameenv_var_namesconfig_property_namesdefaultconversion_func)itemscreate_config_chain)r^   config_variablesmappinglogical_nameconfigs        r`   rY   rY     s\    G 0 6 6 8 - A A& )"()1I"1I !B !
 !9 Nrb   c                   ,    \ rS rSrS rS rS rS rSrg)DefaultConfigResolveri  c                 :    US   U l         US   U l        0 U l        g )Nbasemodes_base_default_config_modes _resolved_default_configurations)selfdefault_config_datas     r`   __init__DefaultConfigResolver.__init__   s#    $7$?!)'202-rb   c                    U R                   R                  5       nU R                  R                  U5      nU HM  nX$   nX4   n[	        UR                  5       5      S   nXg   nUS:X  a  XX-  nOUS:X  a  XX-  nOUS:X  a  UnXRU'   MO     U$ )Nr   multiplyaddoverride)rw   copyrx   getlistkeys)	rz   modedefault_configmodifications
config_vardefault_valuemodification_dictmodificationmodification_values	            r`   _resolve_default_values_by_mode5DefaultConfigResolver._resolve_default_values_by_mode%  s    22779-'J*6M - 9 1 6 6 89!<L!2!@z)3&3+ 2)6:& ( rb   c                 `    SS/nUR                  U R                  R                  5       5        U$ )Nr5   r2   )extendrx   r   )rz   default_modess     r`   get_default_modes'DefaultConfigResolver.get_default_modes7  s-    !6*T[[--/0rb   c                 |    XR                   ;  a  U R                  U5      nX R                   U'   U R                   U   $ N)ry   r   )rz   r   defaultss      r`   get_default_config_values/DefaultConfigResolver.get_default_config_values<  s=    <<<;;DAH:B11$744T::rb   rv   N)	__name__
__module____qualname____firstlineno__r|   r   r   r   __static_attributes__ rb   r`   rr   rr     s    3
$
;rb   rr   c                   B    \ rS rSrSrS	S jr     S
S jrS rS rSr	g)rX   iC  a  Factory class to create our most common configuration chain case.

This is a convenience class to construct configuration chains that follow
our most common pattern. This is to prevent ordering them incorrectly,
and to make the config chain construction more readable.
Nc                 B    Xl         Uc  [        R                  nX l        g)aG  Initialize a ConfigChainFactory.

:type session: :class:`botocore.session.Session`
:param session: This is the session that should be used to look up
    values from the config file.

:type environ: dict
:param environ: A mapping to use for environment variables. If this
    is not provided it will default to use os.environ.
N)_sessionosenviron_environ)rz   rV   r   s      r`   r|   ConfigChainFactory.__init__K  s      ?jjGrb   c                 &   / nUb"  UR                  [        XR                  S95        Ub   UR                  U R	                  U5      5        Ub   UR                  U R                  U5      5        Ub  UR                  [        US95        [        UUS9$ )a  Build a config chain following the standard botocore pattern.

In botocore most of our config chains follow the the precendence:
session_instance_variables, environment, config_file, default_value.

This is a convenience function for creating a chain that follow
that precendence.

:type instance_name: str
:param instance_name: This indicates what session instance variable
    corresponds to this config value. If it is None it will not be
    added to the chain.

:type env_var_names: str or list of str or None
:param env_var_names: One or more environment variable names to
    search for this value. They are searched in order. If it is None
    it will not be added to the chain.

:type config_property_names: str/tuple or list of str/tuple or None
:param config_property_names: One of more strings or tuples
    representing the name of the key in the config file for this
    config option. They are searched in order. If it is None it will
    not be added to the chain.

:type default: Any
:param default: Any constant value to be returned.

:type conversion_func: None or callable
:param conversion_func: If this value is None then it has no effect on
    the return type. Otherwise, it is treated as a function that will
    conversion_func our provided type.

:rvalue: ConfigChain
:returns: A ConfigChain that resolves in the order env_var_names ->
    config_property_name -> default. Any values that were none are
    omitted form the chain.
)instance_varrV   )value)	providersrj   )appendInstanceVarProviderr   r   _get_env_providers_get_scoped_config_providersConstantProviderChainProvider)rz   rf   rg   rh   ri   rj   r   s          r`   rl   &ConfigChainFactory.create_config_chain[  s    Z 	$#!.
 $T44]CD ,112GH -G<=+
 	
rb   c                     / n[        U[        5      (       d  U/nU H%  nUR                  [        X0R                  S95        M'     U$ Nnameenv)
isinstancer   r   EnvironmentProviderr   )rz   rg   env_var_providersenv_var_names       r`   r   %ConfigChainFactory._get_env_providers  sH    -..*OM)L$$#==I * ! rb   c                     / n[        U[        5      (       d  U/nU H&  nUR                  [        UU R                  S95        M(     U$ )N)config_var_namerV   )r   r   r   ScopedConfigProviderr   )rz   rh   scoped_config_providersconfig_property_names       r`   r   /ConfigChainFactory._get_scoped_config_providers  sR    "$/66%:$;!$9 #**$$8 MM %: '&rb   )r   r   r   )NNNNN)
r   r   r   r   __doc__r|   rl   r   r   r   r   rb   r`   rX   rX   C  s.     $ "@
D!'rb   rX   c                   L    \ rS rSrSrSS jrS rS rS rS r	S	 r
S
 rS rSrg)ConfigValueStorei  z8The ConfigValueStore object stores configuration values.Nc                 |    0 U l         0 U l        Ub+  UR                  5        H  u  p#U R                  X#5        M     gg)a  Initialize a ConfigValueStore.

:type mapping: dict
:param mapping: The mapping parameter is a map of string to a subclass
    of BaseProvider. When a config variable is asked for via the
    get_config_variable method, the corresponding provider will be
    invoked to load the value.
N)
_overrides_mappingrk   set_config_provider)rz   rn   ro   providers       r`   r|   ConfigValueStore.__init__  s>     *1--/&((@ +: rb   c                     [        [        R                  " U R                  U5      5      nU R                  R                  5        H  u  p4UR                  X45        M     U$ r   )r   r   deepcopyr   r   rk   set_config_variable)rz   memoconfig_storero   override_values        r`   __deepcopy__ConfigValueStore.__deepcopy__  sL    'dmmT(JK,0OO,A,A,C(L,,\J -D rb   c                     [        [        R                  " U R                  5      5      nU R                  R	                  5        H  u  p#UR                  X#5        M     U$ r   )r   r   r   r   rk   r   )rz   r   ro   r   s       r`   __copy__ConfigValueStore.__copy__  sJ    '		$--(@A,0OO,A,A,C(L,,\J -D rb   c                     XR                   ;   a  U R                   U   $ XR                  ;  a  gU R                  U   nUR                  5       $ )a  
Retrieve the value associeated with the specified logical_name
from the corresponding provider. If no value is found None will
be returned.

:type logical_name: str
:param logical_name: The logical name of the session variable
    you want to retrieve.  This name will be mapped to the
    appropriate environment variable name for this session as
    well as the appropriate config file entry.

:returns: value of variable or None if not defined.
N)r   r   providerz   ro   r   s      r`   get_config_variable$ConfigValueStore.get_config_variable  sG     ??*??<00}},==.!!rb   c                 b    XR                   ;   d  XR                  ;  a  gU R                  U   nU$ )a  
Retrieve the provider associated with the specified logical_name.
If no provider is found None will be returned.

:type logical_name: str
:param logical_name: The logical name of the session variable
    you want to retrieve.  This name will be mapped to the
    appropriate environment variable name for this session as
    well as the appropriate config file entry.

:returns: configuration provider or None if not defined.
N)r   r   r   s      r`   get_config_provider$ConfigValueStore.get_config_provider  s.     OO+==0==.rb   c                      X R                   U'   g)a  Set a configuration variable to a specific value.

By using this method, you can override the normal lookup
process used in ``get_config_variable`` by explicitly setting
a value.  Subsequent calls to ``get_config_variable`` will
use the ``value``.  This gives you per-session specific
configuration values.

::
    >>> # Assume logical name 'foo' maps to env var 'FOO'
    >>> os.environ['FOO'] = 'myvalue'
    >>> s.get_config_variable('foo')
    'myvalue'
    >>> s.set_config_variable('foo', 'othervalue')
    >>> s.get_config_variable('foo')
    'othervalue'

:type logical_name: str
:param logical_name: The logical name of the session variable
    you want to set.  These are the keys in ``SESSION_VARIABLES``.

:param value: The value to associate with the config variable.
N)r   )rz   ro   r   s      r`   r   $ConfigValueStore.set_config_variable  s    0 ).%rb   c                 <    U R                   R                  US5        g)zRemove an override config variable from the session.

:type logical_name: str
:param logical_name: The name of the parameter to clear the override
    value from.
N)r   pop)rz   ro   s     r`   clear_config_variable&ConfigValueStore.clear_config_variable  s     	L$/rb   c                      X R                   U'   g)a  Set the provider for a config value.

This provides control over how a particular configuration value is
loaded. This replaces the provider for ``logical_name`` with the new
``provider``.

:type logical_name: str
:param logical_name: The name of the config value to change the config
    provider for.

:type provider: :class:`botocore.configprovider.BaseProvider`
:param provider: The new provider that should be responsible for
    providing a value for the config named ``logical_name``.
N)r   r   s      r`   r   $ConfigValueStore.set_config_provider"  s     '/l#rb   )r   r   r   )r   r   r   r   r   r|   r   r   r   r   r   r   r   r   r   rb   r`   r   r     s.    BA"**.40/rb   r   c                   J    \ rS rSrS rS rS rS rS rS r	S r
S	 rS
 rSrg)SmartDefaultsConfigStoreFactoryi4  c                 *    Xl         X l        S U l        g r   _default_config_resolver_imds_region_provider_instance_metadata_region)rz   default_config_resolverimds_region_providers      r`   r|   (SmartDefaultsConfigStoreFactory.__init__5  s    (?%%9" *.&rb   c                     US:X  a  U R                  U5      nU R                  R                  U5      nU H(  nXE   n[        U SU 3S 5      nU(       d  M   U" X5        M*     g )Nr2   _set_)resolve_auto_moder   r   getattr)rz   r   r   region_namedefault_configsr   config_valuemethods           r`   merge_smart_defaults4SmartDefaultsConfigStoreFactory.merge_smart_defaults<  sh    6>))+6D))CCDI 	 *J*6LTU:,#7>Fv|2	 *rb   c                    S n[         R                  R                  S5      (       a?  [         R                  R                  S5      n[         R                  R                  SU5      nU(       d?  U R                  (       a  U R                  nO! U R                  R                  5       nX l        U(       a  X:X  a  ggg! [         a     Nf = f)NAWS_EXECUTION_ENVr	   
AWS_REGIONz	in-regionzcross-regionstandard)r   r   r   r   r   r   	Exception)rz   r   current_regiondefault_regions       r`   r   1SmartDefaultsConfigStoreFactory.resolve_auto_modeH  s    ::>>-..ZZ^^,@ANZZ^^L.IN--!%!?!?%)%?%?%G%G%IN5C2 ,"% ! s    B; ;
CCc                    UR                  U5      n[        U5      n[        U[        5      (       a*  [        R
                  " U5      nUR                  U5        UnO[        U[        5      (       a
  [        XE/S9nUR                  X%5        g N)r   )	r   r   r   r   r   r   set_default_providerBaseProviderr   )rz   r   variabler   original_providerdefault_providerchain_provider_copys          r`   _update_provider0SmartDefaultsConfigStoreFactory._update_provider^  s    (<<XF+E2'77"&--0A"B445EF2)<88,,?  	((Drb   c                     [         R                  " UR                  U5      5      nUR                  U[	        U5      5        UR                  X%5        g r   )r   r   r   r  r   r   )rz   r   section_namer  r   section_provider_copys         r`   _update_section_provider8SmartDefaultsConfigStoreFactory._update_section_providerk  sL     !%,,\:!
 	22&u-	
 	((Mrb   c                 *    U R                  USU5        g )Nr3   r
  rz   r   r   s      r`   _set_retryMode.SmartDefaultsConfigStoreFactory._set_retryModev  s    lL%@rb   c                 *    U R                  USU5        g )NrD   r  r  s      r`   _set_stsRegionalEndpoints9SmartDefaultsConfigStoreFactory._set_stsRegionalEndpointsy  s    l,DeLrb   c                 ,    U R                  USSU5        g )NrF   rN   )r  r  s      r`   _set_s3UsEast1RegionalEndpoints?SmartDefaultsConfigStoreFactory._set_s3UsEast1RegionalEndpoints|  s    %%$ =u	
rb   c                 0    U R                  USUS-  5        g )Nconnect_timeouti  r  r  s      r`   _set_connectTimeoutInMillis;SmartDefaultsConfigStoreFactory._set_connectTimeoutInMillis  s    l,=ut|Lrb   r   N)r   r   r   r   r|   r   r   r
  r  r  r  r  r  r   r   rb   r`   r   r   4  s4    .
3,E	NAM

Mrb   r   c                       \ rS rSrSrS rSrg)r  i  z|Base class for configuration value providers.

A configuration provider has some method of providing a configuration
value.
c                     [        S5      e)zProvide a config value.r   )NotImplementedErrorrz   s    r`   r   BaseProvider.provide  s    !),,rb   r   N)r   r   r   r   r   r   r   r   rb   r`   r  r    s    -rb   r  c                   @    \ rS rSrSrSS jrS rS rS rS r	S	 r
S
rg)r   i  zThis provider wraps one or more other providers.

Each provider in the chain is called, the first one returning a non-None
value is then returned.
Nc                 &    Uc  / nXl         X l        g)a\  Initalize a ChainProvider.

:type providers: list
:param providers: The initial list of providers to check for values
    when invoked.

:type conversion_func: None or callable
:param conversion_func: If this value is None then it has no affect on
    the return type. Otherwise, it is treated as a function that will
    transform provided value.
N)
_providers_conversion_func)rz   r   rj   s      r`   r|   ChainProvider.__init__  s     I# /rb   c                 l    [        [        R                  " U R                  U5      U R                  5      $ r   )r   r   r   r'  r(  rz   r   s     r`   r   ChainProvider.__deepcopy__  s)    MM$//40$2G2G
 	
rb   c                 v    U R                    H)  nUR                  5       nUc  M  U R                  U5      s  $    g)a
  Provide the value from the first provider to return non-None.

Each provider in the chain has its provide method called. The first
one in the chain to return a non-None value is the returned from the
ChainProvider. When no non-None value is found, None is returned.
N)r'  r   _convert_type)rz   r   r   s      r`   r   ChainProvider.provide  s<     H$$&E ))%00 ( rb   c                 .   U R                   (       a1  [        U R                   S   [        5      (       a  XR                   S'   OU R                   R                  U5        [	        S U R                    5       5      nUS:  a  [
        R                  S5        g g )Nc              3   @   #    U H  n[        U[        5      v   M     g 7fr   )r   r   ).0r   s     r`   	<genexpr>5ChainProvider.set_default_provider.<locals>.<genexpr>  s"      
+ x!122+s   r   zLChainProvider object contains multiple instances of ConstantProvider objects)r'  r   r   r   sumloggerinfo)rz   r  num_of_constantss      r`   r  "ChainProvider.set_default_provider  s    ??zOOB!1 
  
 #3OOBOO""#34 
 OO
 
 aKK8  rb   c                 B    U R                   b  U R                  U5      $ U$ r   )r(  rz   r   s     r`   r.  ChainProvider._convert_type  s$      ,((//rb   c           
          SR                  SR                  U R                   Vs/ sH  n[        U5      PM     sn5      5      $ s  snf )Nz[{}]z, )formatjoinr'  str)rz   ps     r`   __repr__ChainProvider.__repr__  s4    }}TYY'H1A'HIJJ'Hs   A)r(  r'  )NN)r   r   r   r   r   r|   r   r   r  r.  rC  r   r   rb   r`   r   r     s&    0"

$
Krb   r   c                   0    \ rS rSrSrS rS rS rS rSr	g)	r   i  z>This class loads config values from the session instance vars.c                     Xl         X l        g)a  Initialize InstanceVarProvider.

:type instance_var: str
:param instance_var: The instance variable to load from the session.

:type session: :class:`botocore.session.Session`
:param session: The botocore session to get the loaded configuration
    file variables from.
N_instance_varr   )rz   r   rV   s      r`   r|   InstanceVarProvider.__init__  s     *rb   c                 l    [        [        R                  " U R                  U5      U R                  5      $ r   )r   r   r   rH  r   r+  s     r`   r    InstanceVarProvider.__deepcopy__  s)    "MM$,,d3T]]
 	
rb   c                 p    U R                   R                  5       nUR                  U R                  5      nU$ )z6Provide a config value from the session instance vars.)r   instance_variablesr   rH  )rz   instance_varsr   s      r`   r   InstanceVarProvider.provide  s/    88:!!$"4"45rb   c                 <    SU R                    SU R                   S3$ )Nz!InstanceVarProvider(instance_var=
, session=)rG  r#  s    r`   rC  InstanceVarProvider.__repr__  s'    243E3E2FjQUQ^Q^P__`aarb   rG  N
r   r   r   r   r   r|   r   r   rC  r   r   rb   r`   r   r     s    H 

brb   r   c                   ,    \ rS rSrS rS rS rS rSrg)r   i  c                     Xl         X l        g)a  Initialize ScopedConfigProvider.

:type config_var_name: str or tuple
:param config_var_name: The name of the config variable to load from
    the configuration file. If the value is a tuple, it must only
    consist of two items, where the first item represents the section
    and the second item represents the config var name in the section.

:type session: :class:`botocore.session.Session`
:param session: The botocore session to get the loaded configuration
    file variables from.
N_config_var_namer   )rz   r   rV   s      r`   r|   ScopedConfigProvider.__init__  s     !0rb   c                 l    [        [        R                  " U R                  U5      U R                  5      $ r   )r   r   r   rX  r   r+  s     r`   r   !ScopedConfigProvider.__deepcopy__  s)    #MM$//6
 	
rb   c                 N   U R                   R                  5       n[        U R                  [        5      (       aR  UR                  U R                  S   5      n[        U[        5      (       d  gUR                  U R                  S   5      $ UR                  U R                  5      $ )z,Provide a value from a config file property.r   Nr   )r   get_scoped_configr   rX  tupler   dict)rz   scoped_configsection_configs      r`   r   ScopedConfigProvider.provide  s    779d++U33*..t/D/DQ/GHNnd33!%%d&;&;A&>??  !6!677rb   c                 <    SU R                    SU R                   S3$ )Nz%ScopedConfigProvider(config_var_name=rQ  rR  rW  r#  s    r`   rC  ScopedConfigProvider.__repr__  s'    6t7L7L6MZX\XeXeWffghhrb   rW  N)	r   r   r   r   r|   r   r   rC  r   r   rb   r`   r   r     s      

8irb   r   c                   0    \ rS rSrSrS rS rS rS rSr	g)	r   i  z:This class loads config values from environment variables.c                     Xl         X l        g)zInitialize with the keys in the dictionary to check.

:type name: str
:param name: The key with that name will be loaded and returned.

:type env: dict
:param env: Environment variables dictionary to get variables from.
N_name_env)rz   r   r   s      r`   r|   EnvironmentProvider.__init__  s     
	rb   c                     [        [        R                  " U R                  U5      [        R                  " U R                  U5      5      $ r   )r   r   r   rh  ri  r+  s     r`   r    EnvironmentProvider.__deepcopy__(  s2    "MM$**d+T]]499d-K
 	
rb   c                 j    U R                   U R                  ;   a  U R                  U R                      $ g)z0Provide a config value from a source dictionary.Nrg  r#  s    r`   r   EnvironmentProvider.provide-  s(    ::"99TZZ((rb   c                 <    SU R                    SU R                   S3$ )NzEnvironmentProvider(name=z, env=rR  rg  r#  s    r`   rC  EnvironmentProvider.__repr__3  s    *4::,fTYYKqIIrb   )ri  rh  NrT  r   rb   r`   r   r     s    D


Jrb   r   c                   :    \ rS rSrSrS
S jrS rS rS rS r	S	r
g)r[   i7  zProvides a dictionary from a section in the scoped config

This is useful for retrieving scoped config variables (i.e. s3) that have
their own set of config variables and resolving logic.
Nc                     Xl         X l        [        U R                   U R                  5      U l        X0l        U R                  c  0 U l        g g r   )_section_namer   r   _scoped_config_provider_override_providers)rz   r  rV   override_providerss       r`   r|   SectionConfigProvider.__init__>  sJ    )';(
$ $6 ##+')D$ ,rb   c                     [        [        R                  " U R                  U5      U R                  [        R                  " U R
                  U5      5      $ r   )r[   r   r   rs  r   ru  r+  s     r`   r   "SectionConfigProvider.__deepcopy__H  s>    $MM$,,d3MMMM$22D9
 	
rb   c                 8   U R                   R                  5       nU(       a7  [        U[        5      (       d"  [        R                  SU R                  U5        g U R                  R                  5        H#  u  p#UR                  5       nUc  M  Uc  0 nXAU'   M%     U$ )NzEThe %s config key is not a dictionary type, ignoring its value of: %s)	rt  r   r   r_  r7  debugrs  ru  rk   )rz   ra  section_config_varr   provider_vals        r`   r   SectionConfigProvider.provideO  s    55==?*^T"B"BLL,""	 ,0,D,D,J,J,L(#++-L'!)%'N5A12 -M rb   c                     U R                   R                  U5      n[        U[        5      (       a  UR	                  U5        g [        U[
        5      (       a
  [        X2/S9nX R                   U'   g r  )ru  r   r   r   r  r  )rz   keyr  r   s       r`   r  *SectionConfigProvider.set_default_providera  se    ++//4h..))*:;,//,#6  )9  %rb   c                 V    SU R                    SU R                   SU R                   S3$ )Nz#SectionConfigProvider(section_name=rQ  z, override_providers=rR  )rs  r   ru  r#  s    r`   rC  SectionConfigProvider.__repr__l  s<    1$2D2D1E F}}o &""&":":!;1>	
rb   )ru  rt  rs  r   r   )r   r   r   r   r   r|   r   r   r  rC  r   r   rb   r`   r[   r[   7  s     *
$	9
rb   r[   c                   0    \ rS rSrSrS rS rS rS rSr	g)	r   it  z(This provider provides a constant value.c                     Xl         g r   _valuer<  s     r`   r|   ConstantProvider.__init__w  s    rb   c                 V    [        [        R                  " U R                  U5      5      $ r   )r   r   r   r  r+  s     r`   r   ConstantProvider.__deepcopy__z  s    dkk4 @AArb   c                     U R                   $ )z7Provide the constant value given during initialization.r  r#  s    r`   r   ConstantProvider.provide}  s    {{rb   c                 "    SU R                    S3$ )NzConstantProvider(value=rR  r  r#  s    r`   rC  ConstantProvider.__repr__  s    (Q77rb   r  NrT  r   rb   r`   r   r   t  s    2B8rb   r   c                   \    \ rS rSrSr/ SQr SS jrS rS rS r	S	 r
S
 rS rS rS rSrg)ConfiguredEndpointProvideri  zLookup an endpoint URL from environment variable or shared config file.

NOTE: This class is considered private and is subject to abrupt breaking
changes or removal without prior announcement. Please do not use it
directly.
)environment_serviceenvironment_globalconfig_serviceconfig_globalNc                     Xl         X l        X0l        U R                  U R                  5      U l        Uc  [
        R                  nX@l        g)a<  Initialize a ConfiguredEndpointProviderChain.

:type full_config: dict
:param full_config: This is the dict representing the full
    configuration file.

:type scoped_config: dict
:param scoped_config: This is the dict representing the configuration
    for the current profile for the session.

:type client_name: str
:param client_name: The name used to instantiate a client using
    botocore.session.Session.create_client.

:type environ: dict
:param environ: A mapping to use for environment variables. If this
    is not provided it will default to use os.environ.
N)_full_config_scoped_config_client_name_get_snake_case_service_id_transformed_service_idr   r   r   )rz   full_configr`  client_namer   s        r`   r|   #ConfiguredEndpointProvider.__init__  sG    2 (+''+'F'F(
$ ?jjGrb   c                    U R                    Hd  n[        R                  SU R                  U5        [	        U SU 35      " 5       nU(       d  MA  [        R                  SU R                  U5        Us  $    [        R                  S5        g)a  Lookup the configured endpoint URL.

The order is:

1. The value provided by a service-specific environment variable.
2. The value provided by the global endpoint environment variable
   (AWS_ENDPOINT_URL).
3. The value provided by a service-specific parameter from a services
   definition section in the shared configuration file.
4. The value provided by the global parameter from a services
   definition section in the shared configuration file.
z#Looking for endpoint for %s via: %s_get_endpoint_url_zFound endpoint for %s via: %s.zNo configured endpoint found.N)_ENDPOINT_URL_LOOKUP_ORDERr7  r{  r  r   r8  )rz   locationendpoint_urls      r`   r   "ConfiguredEndpointProvider.provide  s     77HLL5!! #4+=hZ)HIKL|4%%
 $# 8" 	45rb   c                     [         R                  R                  X5      n[         R                  R                  X5      nUR	                  SS5      $ )N-_)r   SERVICE_NAME_ALIASESr   .CLIENT_NAME_TO_HYPHENIZED_SERVICE_ID_OVERRIDESreplace)rz   r  hyphenized_service_ids      r`   r  5ConfiguredEndpointProvider._get_snake_case_service_id  sK     0044[N@@DD 	
 %,,S#66rb   c                 @    U R                   R                  5       nSU 3$ )NAWS_ENDPOINT_URL_)r  upper)rz   transformed_service_id_envs     r`   _get_service_env_var_name4ConfiguredEndpointProvider._get_service_env_var_name  s&    %)%A%A%G%G%I""#=">??rb   c                     SU R                   ;  a  0 $ U R                   S   nU R                  R                  S0 5      R                  U5      nU(       d  SU S3n[        US9eU$ )Nservicesz?The profile is configured to use the services section but the "z(" services configuration does not exist.)	error_msg)r  r  r   r   )rz   r  services_sectionr  s       r`   _get_services_config/ConfiguredEndpointProvider._get_services_config  s}    T000I**:6,,00R@DD
  $$0> 201 
 %y99rb   c                     U R                   R                  5       nU R                  5       R                  U0 5      R                  S5      $ Nr  )r  lowerr  r   )rz   snakecase_service_ids     r`    _get_endpoint_url_config_service;ConfiguredEndpointProvider._get_endpoint_url_config_service  s?    #;;AAC%%'S%r*S 	
rb   c                 8    U R                   R                  S5      $ r  )r  r   r#  s    r`   _get_endpoint_url_config_global:ConfiguredEndpointProvider._get_endpoint_url_config_global  s    ""&&~66rb   c                 b    [        U R                  5       U R                  S9R                  5       $ r   )r   r  r   r   r#  s    r`   %_get_endpoint_url_environment_service@ConfiguredEndpointProvider._get_endpoint_url_environment_service  s(    "//1t}}

')	rb   c                 F    [        SU R                  S9R                  5       $ )NAWS_ENDPOINT_URLr   )r   r   r   r#  s    r`   $_get_endpoint_url_environment_global?ConfiguredEndpointProvider._get_endpoint_url_environment_global
  s    "#

')	rb   )r  r   r  r  r  r   )r   r   r   r   r   r  r|   r   r  r  r  r  r  r  r  r   r   rb   r`   r  r    sD    " ! FB	7@ &
7
rb   r  )%r   r   loggingr   botocorer   botocore.exceptionsr   	getLoggerr   r7  intensure_booleanrZ   botocore.customizations.stsrC   _sts_default_settingImportError_STS_DEFAULT_SETTINGSupdater\   normalize_booleanr]   ra   rY   rr   rX   r   r   r  r   r   r   r   r[   r   r  r   rb   r`   <module>r     s     	  2			8	$:v%,m<dDIv% :v% ;	v%
 Cv% ;v% ^T2t4v%  v%$ "&		!%v%4 $'+		&5v%@ $ &Av%L ) +Mv%X "&	!Yv%d 	ev%p  $	qv%| 	}v%H &)-	(Iv%T FUv%^ 		 @^UC8E# CK $%7sCJ+ 	&)	$"av% !r$  $	  " ( ()> ? G)	  	)	 	*	  
67	 -1	
 	-$ 	72	-G) \ =@(	'	 (
!; !;Ho' o'd|/ |/~NM NMb	- 	-BKL BKJb, b>!i< !iHJ, J<:
L :
z8| 8"H Hc  $#$s   .G? ?H
H