B ç0œ`©©ã@sÌdZddlZddlZddlZddlZddlZddlZddlZddlm Z ddlm Z ddl Zddl Zddl ZddlmZddlmZddlmZddlmZdd lmZmZmZmZdd lmZdd lmZdd lmZmZdd lmZddlm Z ddl!m"Z"ddl#m$Z$ddl%m&Z&ddlm'Z'ddlm(Z(ddlm)Z)ddlm*Z*m+Z+ddlm,Z,ddl-m.Z.m/Z/ddl0m1Z1e 2e3¡Z4Gdd„de5ƒZ6Gdd„de5ƒZ7Gdd„de1ƒZ8Gdd „d e5ƒZ9d#d!d"„Z:dS)$zV This module contains the main interface to the botocore package, the Session object. éN)Ú __version__)ÚUNSIGNED)ÚConfigValueStore)ÚConfigChainFactory)Ú&create_botocore_default_config_mapping)Ú!BOTOCORE_DEFAUT_SESSION_VARIABLES)ÚConfigNotFoundÚProfileNotFoundÚUnknownServiceErrorÚPartialCredentialsError)ÚClientExceptionsFactory)Úhandlers)ÚHierarchicalEmitterÚfirst_non_none_response)Ú EventAliaser)Ú create_loader)ÚResponseParserFactory)ÚEndpointResolver)Ú ServiceModel)Ú monitoring)Úpaginate)Úwaiter)Ú retryhandlerÚ translate)Úutils)Ú EVENT_ALIASESÚvalidate_region_name)ÚMutableMappingc @sÖeZdZdZe e¡ZdZdldd„Zdd„Z d d „Z d d „Z d d„Z dd„Z dd„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd„Zedd „ƒZd!d"„Zed#d$„ƒZdmd%d&„Zd'd(„Zd)d*„Zd+d,„Zd-d.„Zed/d0„ƒZd1d2„Zd3d4„Z dnd5d6„Z!d7d8„Z"d9d:„Z#d;d<„Z$dod=d>„Z%dpd?d@„Z&dqdAdB„Z'drdCdD„Z(dEdF„Z)dsdHdI„Z*dtdJdK„Z+dudLdM„Z,dvdOdP„Z-dwdQdR„Z.dSdT„Z/dUdV„Z0dWdX„Z1dYdZ„Z2d[d\„Z3d]d^„Z4d_d`„Z5dxdadb„Z6dcdd„Z7dedf„Z8dgdh„Z9dydjdk„Z:dS)zÚSessionae The Session object collects together useful functionality from `botocore` as well as important data such as configuration information and credentials into a single, easy-to-use object. :ivar available_profiles: A list of profiles defined in the config file associated with this session. :ivar profile: The current profile. z4%(asctime)s - %(name)s - %(levelname)s - %(message)sNTcCsÀ|dkrtƒ|_n||_t|jƒ|_|r4| |j¡d|_t|_d|_d|_ d|_ d|_ d|_ i|_ |dk rv||j d<d|_d|_tƒ|_tƒ|_| ¡t||jƒ|_|dk r¼|j |¡dS)a· Create a new Session object. :type session_vars: dict :param session_vars: A dictionary that is used to override some or all of the environment variables associated with this session. The key/value pairs defined in this dictionary will override the corresponding variables defined in ``SESSION_VARIABLES``. :type event_hooks: BaseEventHooks :param event_hooks: The event hooks object to use. If one is not provided, an event hooks object will be automatically created for you. :type include_builtin_handlers: bool :param include_builtin_handlers: Indicates whether or not to automatically register builtin handlers. :type profile: str :param profile: The name of the profile to use for this session. Note that the profile can only be set when the session is created. NZBotocoreÚÚprofile)rZ_original_handlerrÚ_eventsÚ_register_builtin_handlersÚuser_agent_namerÚuser_agent_versionÚuser_agent_extraÚ_profileÚ_configÚ _credentialsÚ _profile_mapÚ_session_instance_varsÚ_client_configÚ_last_client_region_usedÚComponentLocatorÚ _componentsÚ_internal_componentsÚ_register_componentsÚSessionVarDictÚSESSION_VARIABLESÚsession_var_mapÚupdate)ÚselfÚ session_varsZ event_hooksZinclude_builtin_handlersr ©r7úk/private/var/folders/sf/wxz_36012wxg_prv29r6623x5vlqx8/T/pip-target-tft40_m7/lib/python/botocore/session.pyÚ__init__Ls0    zSession.__init__cCsD| ¡| ¡| ¡| ¡| ¡| ¡| ¡| ¡dS)N)Ú_register_credential_providerÚ_register_data_loaderÚ_register_endpoint_resolverÚ_register_event_emitterÚ!_register_response_parser_factoryÚ_register_exceptions_factoryÚ_register_config_storeÚ_register_monitor)r5r7r7r8r0…szSession._register_componentscCs|j d|j¡dS)NÚ event_emitter)r.Úregister_componentr!)r5r7r7r8r=szSession._register_event_emittercCs|j d|j¡dS)NÚcredential_provider)r.Úlazy_register_componentÚ_create_credential_resolver)r5r7r7r8r:’sz%Session._register_credential_providercCstjj||jdS)N)Ú region_name)ÚbotocoreÚ credentialsZcreate_credential_resolverr,)r5r7r7r8rF–sz#Session._create_credential_resolvercsˆj d‡fdd„¡dS)NÚ data_loadercstˆ d¡ƒS)NÚ data_path)rÚget_config_variabler7)r5r7r8Úžóz/Session._register_data_loader..)r.rE)r5r7)r5r8r;›szSession._register_data_loadercs‡fdd„}ˆj d|¡dS)Ncsˆ d¡}| d¡}t|ƒS)NrJÚ endpoints)Ú get_componentÚ load_datar)ÚloaderrO)r5r7r8Úcreate_default_resolver¡s  zDSession._register_endpoint_resolver..create_default_resolverÚendpoint_resolver)r/rE)r5rSr7)r5r8r< s z#Session._register_endpoint_resolvercCs|j dtƒ¡dS)NÚresponse_parser_factory)r.rCr)r5r7r7r8r>¨sz)Session._register_response_parser_factorycCs|j dtƒ¡dS)NÚexceptions_factory)r/rCr )r5r7r7r8r?¬sz$Session._register_exceptions_factorycCsrxltjD]b}t|ƒdkr.|\}}| ||¡q|\}}}|tjkrR|j ||¡q|tjkr|j ||¡qWdS)Né) r ZBUILTIN_HANDLERSÚlenÚregisterZREGISTER_FIRSTr!Zregister_firstZ REGISTER_LASTZ register_last)r5ÚeventsÚspecÚ event_nameÚhandlerZ register_typer7r7r8r"°s     z"Session._register_builtin_handlerscCs tt|ƒd}|j d|¡dS)N)ÚmappingÚ config_store)rrr.rC)r5Úconfig_store_componentr7r7r8r@¼s zSession._register_config_storecCs|j d|j¡dS)NÚmonitor)r/rEÚ_create_csm_monitor)r5r7r7r8rAÃszSession._register_monitorc Csd| d¡r`| d¡}| d¡}| d¡}tjt ¡tjt tjtj¡||tj|ddd}|SdS)NZ csm_enabledÚ csm_client_idZcsm_hostZcsm_port)rc)ÚsocketÚhostÚportÚ serializer)ÚadapterZ publisher) rLrZMonitorZMonitorEventAdapterZSocketPublisherrdÚAF_INETÚ SOCK_DGRAMZ CSMSerializer)r5Z client_idrerfr]r7r7r8rbÇs    zSession._create_csm_monitorcCst| ¡ ¡ƒS)N)ÚlistÚ_build_profile_mapÚkeys)r5r7r7r8Úavailable_profilesÙszSession.available_profilescCs|jdkr|jd|_|jS)NÚprofiles)r)Ú full_config)r5r7r7r8rlÝs  zSession._build_profile_mapcCs |jdkr| d¡}||_|jS)Nr )r&rL)r5r r7r7r8r ås  zSession.profilecCs$|dk r| ||¡S| d¡ |¡S)Nr_)Ú(_get_config_variable_with_custom_methodsrPrL)r5Ú logical_nameÚmethodsr7r7r8rLìs  zSession.get_config_variablecCsšt||d}t|ƒ}xl|j ¡D]^\}}|\}}} } | | dœ} d|krN|| d<d|kr^|| d<d|krn|| d<|jf| Ž||<q Wt|d } |  |¡} | S) N)Úsessionrs)Úconversion_funcÚdefaultÚinstanceÚ instance_nameÚenvÚ env_var_namesÚconfigÚconfig_property_name)r^)ÚSubsetChainConfigFactoryrr3ÚitemsÚcreate_config_chainrrL)r5rrrsZ chain_builderr^ÚnameÚconfig_optionsÚ config_nameÚenv_varsrvÚtypecastZbuild_chain_config_argsr`Úvaluer7r7r8rqós$   z0Session._get_config_variable_with_custom_methodscCst d||¡||j|<dS)aSet 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. z$Setting config variable for %s to %rN)ÚloggerÚdebugr*)r5rrr…r7r7r8Úset_config_variables zSession.set_config_variablecCs t |j¡S)N)Úcopyr*)r5r7r7r8Úinstance_variables0szSession.instance_variablescCsF| d¡}| ¡}|dkr&| di¡S||kr:t|d‚n||SdS)a5 Returns the config values from the config file scoped to the current profile. The configuration data is loaded **only** from the config file. It does not resolve variables based on different locations (e.g. first from the session instance, then from environment variables, then from the config file). If you want this lookup behavior, use the ``get_config_variable`` method instead. Note that this configuration is specific to a single profile (the ``profile`` session variable). If the ``profile`` session variable is set and the profile does not exist in the config file, a ``ProfileNotFound`` exception will be raised. :raises: ConfigNotFound, ConfigParseError, ProfileNotFound :rtype: dict r Nrv)r )rLrlÚgetr )r5Z profile_nameZ profile_mapr7r7r8Úget_scoped_config3s   zSession.get_scoped_configcCsÄ|jdkr¾y| d¡}tj |¡|_Wntk rDdii|_YnXyb| d¡}tj |¡}xF|D]>}||}||jdkrŽ||jd|<qd|jd| |¡qdWWntk r¼YnX|jS)zíReturn the parsed config file. The ``get_config`` method returns the config associated with the specified profile. This property returns the contents of the **entire** config file. :rtype: dict NÚ config_fileroZcredentials_file)r'rLrHZ configloaderÚ load_configrZraw_config_parser4)r5rZ cred_fileZ cred_profilesr Z cred_varsr7r7r8rpXs$    zSession.full_configcCs|jS)aRetrieves the default config for creating clients :rtype: botocore.client.Config :returns: The default client config object when creating clients. If the value is ``None`` then there is no default config object attached to the session. )r+)r5r7r7r8Úget_default_client_config{sz!Session.get_default_client_configcCs ||_dS)a1Sets the default config for creating clients :type client_config: botocore.client.Config :param client_config: The default client config object when creating clients. If the value is ``None`` then there is no default config object attached to the session. N)r+)r5Ú client_configr7r7r8Úset_default_client_config…sz!Session.set_default_client_configcCstj |||¡|_dS)aO Manually create credentials for this session. If you would prefer to use botocore without a config file, environment variables, or IAM roles, you can pass explicit credentials into this method to establish credentials for this session. :type access_key: str :param access_key: The access key part of the credentials. :type secret_key: str :param secret_key: The secret key part of the credentials. :type token: str :param token: An option session token used by STS session credentials. N)rHrIÚ Credentialsr()r5Ú access_keyÚ secret_keyÚtokenr7r7r8Úset_credentialsszSession.set_credentialscCs"|jdkr|j d¡ ¡|_|jS)a$ Return the :class:`botocore.credential.Credential` object associated with this session. If the credentials have not yet been loaded, this will attempt to load them. If they have already been loaded, this will return the cached credentials. NrD)r(r.rPZload_credentials)r5r7r7r8Úget_credentials¤s  zSession.get_credentialscCs^d|j|jt ¡t ¡t ¡f}tj d¡dk rF|dtj d¡7}|j rZ|d|j 7}|S)ak Return a string suitable for use as a User-Agent header. The string will be of the form: / Python/ / Where: - agent_name is the value of the `user_agent_name` attribute of the session object (`Botocore` by default). - agent_version is the value of the `user_agent_version` attribute of the session object (the botocore version by default). by default. - py_ver is the version of the Python interpreter beng used. - plat_name is the name of the platform (e.g. Darwin) - plat_ver is the version of the platform - exec_env is exec-env/$AWS_EXECUTION_ENV If ``user_agent_extra`` is not empty, then this value will be appended to the end of the user agent string. z%s/%s Python/%s %s/%sZAWS_EXECUTION_ENVNz exec-env/%sz %s) r#r$ÚplatformÚpython_versionÚsystemÚreleaseÚosÚenvironr‹r%)r5Úbaser7r7r8Ú user_agent²s zSession.user_agentcCs| d¡ |¡S)z£ Retrieve the data associated with `data_path`. :type data_path: str :param data_path: The path to the data you wish to retrieve. rJ)rPrQ)r5rKr7r7r8Úget_dataÕszSession.get_datacCs| ||¡}t||dS)a‘Get the service model object. :type service_name: string :param service_name: The service name :type api_version: string :param api_version: The API version of the service. If none is provided, then the latest API version will be used. :rtype: L{botocore.model.ServiceModel} :return: The botocore service model for the service. )Ú service_name)Úget_service_datar)r5r¡Ú api_versionZservice_descriptionr7r7r8Úget_service_modelÞs zSession.get_service_modelcCs"| d¡}| |d|¡}t |¡S)NrJz waiters-2)rPÚload_service_modelrZ WaiterModel)r5r¡r£rRZ waiter_configr7r7r8Úget_waiter_modelïs  zSession.get_waiter_modelcCs"| d¡}| |d|¡}t |¡S)NrJz paginators-1)rPr¥rZPaginatorModel)r5r¡r£rRZpaginator_configr7r7r8Úget_paginator_modelõs  zSession.get_paginator_modelcCsB|}| d¡j|d|d}t ||¡}|jjd||||d|S)zK Retrieve the fully merged data associated with a service. rJz service-2)Ú type_namer£zservice-data-loaded.%s)Ú service_datar¡rt)rPr¥rr‹r!Úemit)r5r¡r£rKr©Z service_idr7r7r8r¢ûs    zSession.get_service_datacCs| d¡jddS)z? Return a list of names of available services. rJz service-2)r¨)rPZlist_available_services)r5r7r7r8Úget_available_services s zSession.get_available_servicesrHcCs| |tj¡dS)zk Convenience function to quickly configure full debug output to go to the console. N)Úset_stream_loggerÚloggingÚDEBUG)r5Ú logger_namer7r7r8Úset_debug_loggerszSession.set_debug_loggercCsZt |¡}| tj¡t |¡}| |¡|dkr8|j}t |¡}| |¡| |¡dS)a¿ Convenience method to configure a stream logger. :type logger_name: str :param logger_name: The name of the logger to configure :type log_level: str :param log_level: The log level to set for the logger. This is any param supported by the ``.setLevel()`` method of a ``Log`` object. :type stream: file :param stream: A file like object to log to. If none is provided then sys.stderr will be used. :type format_string: str :param format_string: The format string to use for the log formatter. If none is provided this will default to ``self.LOG_FORMAT``. N) r­Ú getLoggerÚsetLevelr®Ú StreamHandlerÚ LOG_FORMATÚ FormatterÚ setFormatterÚ addHandler)r5r¯Ú log_levelÚstreamÚ format_stringÚlogÚchÚ formatterr7r7r8r¬s      zSession.set_stream_loggercCsNt |¡}| tj¡t |¡}| |¡t |j¡}| |¡| |¡dS)aV Convenience function to quickly configure any level of logging to a file. :type log_level: int :param log_level: A log level as specified in the `logging` module :type path: string :param path: Path to the log file. The file will be created if it doesn't already exist. N) r­r±r²r®Ú FileHandlerrµr´r¶r·)r5r¸Úpathr¯r»r¼r½r7r7r8Úset_file_loggerAs      zSession.set_file_loggerFcCs|jj||||ddS)a)Register a handler with an event. :type event_name: str :param event_name: The name of the event. :type handler: callable :param handler: The callback to invoke when the event is emitted. This object must be callable, and must accept ``**kwargs``. If either of these preconditions are not met, a ``ValueError`` will be raised. :type unique_id: str :param unique_id: An optional identifier to associate with the registration. A unique_id can only be used once for the entire session registration (unless it is unregistered). This can be used to prevent an event handler from being registered twice. :param unique_id_uses_count: boolean :param unique_id_uses_count: Specifies if the event should maintain a count when a ``unique_id`` is registered and unregisted. The event can only be completely unregistered once every register call using the unique id has been matched by an ``unregister`` call. If ``unique_id`` is specified, subsequent ``register`` calls must use the same value for ``unique_id_uses_count`` as the ``register`` call that first registered the event. :raises ValueError: If the call to ``register`` uses ``unique_id`` but the value for ``unique_id_uses_count`` differs from the ``unique_id_uses_count`` value declared by the very first ``register`` call for that ``unique_id``. )Úunique_id_uses_countN)r!rY)r5r\r]Ú unique_idrÁr7r7r8rY]s" zSession.registercCs|jj||||ddS)aUnregister a handler with an event. :type event_name: str :param event_name: The name of the event. :type handler: callable :param handler: The callback to unregister. :type unique_id: str :param unique_id: A unique identifier identifying the callback to unregister. You can provide either the handler or the unique_id, you do not have to provide both. :param unique_id_uses_count: boolean :param unique_id_uses_count: Specifies if the event should maintain a count when a ``unique_id`` is registered and unregisted. The event can only be completely unregistered once every ``register`` call using the ``unique_id`` has been matched by an ``unregister`` call. If the ``unique_id`` is specified, subsequent ``unregister`` calls must use the same value for ``unique_id_uses_count`` as the ``register`` call that first registered the event. :raises ValueError: If the call to ``unregister`` uses ``unique_id`` but the value for ``unique_id_uses_count`` differs from the ``unique_id_uses_count`` value declared by the very first ``register`` call for that ``unique_id``. )r]rÂrÁN)r!Ú unregister)r5r\r]rÂrÁr7r7r8rÂs zSession.unregistercKs|jj|f|ŽS)N)r!rª)r5r\Úkwargsr7r7r8rª¤sz Session.emitcKs|jj|f|Ž}t|ƒS)N)r!rªr)r5r\rÄÚ responsesr7r7r8Úemit_first_non_none_response§sz$Session.emit_first_non_none_responsecCsLy |j |¡Stk rF|dkr@t d|t¡|j |¡S‚YnXdS)N)rTrVz•Fetching the %s component with the get_component() method is deprecated as the component has always been considered an internal interface of botocore)r.rPÚ ValueErrorÚwarningsÚwarnÚDeprecationWarningr/)r5r€r7r7r8rP«s  zSession.get_componentcCs |j |¡S)N)r/rP)r5r€r7r7r8Ú_get_internal_component¸szSession._get_internal_componentcCs|j ||¡S)N)r/rC)r5r€Ú componentr7r7r8Ú_register_internal_component¾sz$Session._register_internal_componentcCs|j ||¡dS)N)r.rC)r5r€rÌr7r7r8rCÄszSession.register_componentcCs|j ||¡dS)N)r.rE)r5r€rÌr7r7r8rEÇszSession.lazy_register_componentc  Csp| ¡} | dk r$| dk r$|  | ¡} n | dk r0| } | || ¡}|dkrN| d¡}|dkrh| d¡ |d¡}| d¡} | d¡} | d¡}| dk rž| jtkržd}nN|dk rÂ|dk rÂtj j ||| d}n*|  ||¡rät d|  ||¡d ‚n|  ¡}| d ¡}| d ¡}| d ¡}tj | || ¡| tt|||¡ }|j||||||| ¡| |d }| d¡}|dk rl| |jj¡|S)aQ Create a botocore client. :type service_name: string :param service_name: The name of the service for which a client will be created. You can use the ``Sesssion.get_available_services()`` method to get a list of all available service names. :type region_name: string :param region_name: The name of the region associated with the client. A client is associated with a single region. :type api_version: string :param api_version: The API version to use. By default, botocore will use the latest API version when creating a client. You only need to specify this parameter if you want to use a previous API version of the client. :type use_ssl: boolean :param use_ssl: Whether or not to use SSL. By default, SSL is used. Note that not all services support non-ssl connections. :type verify: boolean/string :param verify: Whether or not to verify SSL certificates. By default SSL certificates are verified. You can provide the following values: * False - do not validate SSL certificates. SSL will still be used (unless use_ssl is False), but SSL certificates will not be verified. * path/to/cert/bundle.pem - A filename of the CA cert bundle to uses. You can specify this argument if you want to use a different CA cert bundle than the one used by botocore. :type endpoint_url: string :param endpoint_url: The complete URL to use for the constructed client. Normally, botocore will automatically construct the appropriate URL to use when communicating with a service. You can specify a complete URL (including the "http/https" scheme) to override this behavior. If this value is provided, then ``use_ssl`` is ignored. :type aws_access_key_id: string :param aws_access_key_id: The access key to use when creating the client. This is entirely optional, and if not provided, the credentials configured for the session will automatically be used. You only need to provide this argument if you want to override the credentials used for this specific client. :type aws_secret_access_key: string :param aws_secret_access_key: The secret key to use when creating the client. Same semantics as aws_access_key_id above. :type aws_session_token: string :param aws_session_token: The session token to use when creating the client. Same semantics as aws_access_key_id above. :type config: botocore.client.Config :param config: Advanced client configuration options. If a value is specified in the client config, its value will take precedence over environment variables and configuration values, but not over a value passed explicitly to the method. If a default config object is set on the session, the config object used when creating the client will be the result of calling ``merge()`` on the default config with the config provided to this call. :rtype: botocore.client.BaseClient :return: A botocore client instance NZ ca_bundleZ api_versionsrJrBrU)r“r”r•Úexplicit)ZproviderZcred_varrTrVr_) r¡rGZ is_secureÚ endpoint_urlÚverifyrIZ scoped_configrr£ra)rÚmergeÚ_resolve_region_namerLr‹rPZsignature_versionrrHrIr’Ú_missing_cred_varsr r—rËÚclientZ ClientCreatorrŸrrÚ create_clientrŒrYÚmetarZ)r5r¡rGr£Zuse_sslrÐrÏÚaws_access_key_idÚaws_secret_access_keyZaws_session_tokenr{Zdefault_client_configrRrBrUrIrTrVr_Zclient_creatorrÔrar7r7r8rÕÊsZI               zSession.create_clientcCs:|dkr(|r|jdk r|j}n | d¡}t|ƒ||_|S)NZregion)rGrLrr,)r5rGr{r7r7r8rÒLs  zSession._resolve_region_namecCs,|dk r|dkrdS|dk r(|dkr(dSdS)NrØr×r7)r5r“r”r7r7r8rÓbs zSession._missing_cred_varscCs| d¡}| ¡S)z˜Lists the available partitions found on disk :rtype: list :return: Returns a list of partition names (e.g., ["aws", "aws-cn"]) rT)rËÚget_available_partitions)r5Úresolverr7r7r8rÙis z Session.get_available_partitionsÚawscCsT| d¡}g}y,| |¡}|d d|¡}| |||¡}Wntk rNYnX|S)a]Lists the region and endpoint names of a particular partition. :type service_name: string :param service_name: Name of a service to list endpoint for (e.g., s3). This parameter accepts a service name (e.g., "elb") or endpoint prefix (e.g., "elasticloadbalancing"). :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"]). rTÚmetadataZendpointPrefix)rËr¢r‹Zget_available_endpointsr )r5r¡Zpartition_nameZallow_non_regionalrÚÚresultsr©Zendpoint_prefixr7r7r8Úget_available_regionsrs  zSession.get_available_regions)NNTN)N)N)N)N)N)N)rH)NN)rH)NF)NNF) NNTNNNNNN)rÛF);Ú__name__Ú __module__Ú __qualname__Ú__doc__r‰rr2r´r9r0r=r:rFr;r<r>r?r"r@rArbÚpropertyrnrlr rLrqrˆrŠrŒrprr‘r–r—rŸr r¤r¦r§r¢r«r°r¬rÀrYrÃrªrÆrPrËrÍrCrErÕrÒrÓrÙrÞr7r7r7r8r<sz   8     % #  #      '  $ !   rc@s0eZdZdZdd„Zdd„Zdd„Zdd „Zd S) r-z'Service locator for session components.cCsi|_i|_dS)N)r.Ú _deferred)r5r7r7r8r9•szComponentLocator.__init__cCsX||jkr(|j|}|ƒ|j|<|j|=y |j|Stk rRtd|ƒ‚YnXdS)NzUnknown component: %s)rär.ÚKeyErrorrÇ)r5r€Úfactoryr7r7r8rP™s    zComponentLocator.get_componentcCs0||j|<y |j|=Wntk r*YnXdS)N)r.rärå)r5r€rÌr7r7r8rC¦s   z#ComponentLocator.register_componentcCs0||j|<y |j|=Wntk r*YnXdS)N)rär.rå)r5r€Zno_arg_factoryr7r7r8rE­s   z(ComponentLocator.lazy_register_componentN)rßràrárâr9rPrCrEr7r7r7r8r-“s  r-c@sDeZdZdd„Zdd„Zdd„Zdd„Zd d „Zd d „Zd d„Z dS)r1cCs||_t |¡|_dS)N)Ú_sessionr‰Ú_store)r5rtr6r7r7r8r9¶szSessionVarDict.__init__cCs |j|S)N)rè)r5Úkeyr7r7r8Ú __getitem__ºszSessionVarDict.__getitem__cCs||j|<| ||¡dS)N)rèÚ&_update_config_store_from_session_vars)r5rér…r7r7r8Ú __setitem__½s zSessionVarDict.__setitem__cCs |j|=dS)N)rè)r5rér7r7r8Ú __delitem__ÁszSessionVarDict.__delitem__cCs t|jƒS)N)Úiterrè)r5r7r7r8Ú__iter__ÄszSessionVarDict.__iter__cCs t|jƒS)N)rXrè)r5r7r7r8Ú__len__ÇszSessionVarDict.__len__c CsDt|jd}|\}}}}|j d¡}| ||j|||||d¡dS)N)rtr_)rxrzÚconfig_property_namesrvru)rrçrPZset_config_providerr) r5rrrZconfig_chain_builderr‚rƒrvr„r_r7r7r8rëÊs   z5SessionVarDict._update_config_store_from_session_varsN) rßràrár9rêrìrírïrðrër7r7r7r8r1µsr1c@s$eZdZdZddd„Zddd„ZdS) r}a`A class for creating backwards compatible configuration chains. This class can be used instead of :class:`botocore.configprovider.ConfigChainFactory` to make it honor the methods argument to get_config_variable. This class can be used to filter out providers that are not in the methods tuple when creating a new config chain. NcCst||ƒ|_||_dS)N)rÚ_factoryÚ_supported_methods)r5rtrsrr7r7r8r9ës z!SubsetChainConfigFactory.__init__cCs@d|jkrd}d|jkrd}d|jkr*d}|jj|||||dS)aüBuild a config chain following the standard botocore pattern. This config chain factory will omit any providers not in the methods tuple provided at initialization. For example if given the tuple ('instance', 'config',) it will not inject the environment provider into the standard config chain. This lets the botocore session support the custom ``methods`` argument for all the default botocore config variables when calling ``get_config_variable``. rwNryr{)rxrzrñrvru)róròr)r5rxrzr|rvrur7r7r8rïs   z,SubsetChainConfigFactory.create_config_chain)N)NNNNN)rßràrárâr9rr7r7r7r8r}âs  r}cCst|ƒS)z& Return a new session object. )r)rƒr7r7r8Ú get_session srô)N);râr‰r­rœr˜ÚrerdrÈrHrrZbotocore.configloaderZbotocore.credentialsZbotocore.clientZbotocore.configproviderrrrrZbotocore.exceptionsrr r r Zbotocore.errorfactoryr r Zbotocore.hooksrrrZbotocore.loadersrZbotocore.parsersrZbotocore.regionsrZbotocore.modelrrrrrrrZbotocore.utilsrrZbotocore.compatrr±rßr†Úobjectrr-r1r}rôr7r7r7r8ÚsX                   ]"-(