ó T!¶\c@s¢ddlZddlZddlZddlmZddlmZmZddl Z ddl Z ddl m Z m Z ddlmZdefd„ƒYZdS( iÿÿÿÿN(tConfig(tDataNotFoundErrortUnknownServiceError(tResourceNotExistsErrortUnknownAPIVersionErrori(tResourceFactorytSessionc BsûeZdZddddddd„Zd„Zed„ƒZed„ƒZed„ƒZ ed„ƒZ d„Z d„Z d „Z d „Zd ed „Zd „Zddeddddddd„ Zddeddddddd„ Zd„ZRS(s/ A session stores configuration state and allows you to create service clients and resources. :type aws_access_key_id: string :param aws_access_key_id: AWS access key ID :type aws_secret_access_key: string :param aws_secret_access_key: AWS secret access key :type aws_session_token: string :param aws_session_token: AWS temporary session token :type region_name: string :param region_name: Default region when creating new connections :type botocore_session: botocore.session.Session :param botocore_session: Use this Botocore session instead of creating a new default one. :type profile_name: string :param profile_name: The name of a profile to use. If not given, then the default profile is used. cCsB|dk r||_ntjjƒ|_|jjdkr dj|jjƒ}|jjrv|jjd|7_n ||j_d|j_t j |j_n|dk rÂ|jj d|ƒn|sÔ|sÔ|rí|jj |||ƒn|dk r|jj d|ƒnt |jjdƒƒ|_|jƒ|jƒdS(NtBotocores Botocore/{0}t tBoto3tprofiletregiont event_emitter(tNonet_sessiontbotocoretsessiont get_sessiontuser_agent_nametformattuser_agent_versiontuser_agent_extratboto3t __version__tset_config_variabletset_credentialsRt get_componenttresource_factoryt _setup_loadert_register_default_handlers(tselftaws_access_key_idtaws_secret_access_keytaws_session_tokent region_nametbotocore_sessiont profile_namet botocore_info((s./tmp/pip-install-usGedi/boto3/boto3/session.pyt__init__0s,         cCs(dj|jjt|jjdƒƒƒS(Ns{0}(region_name={1})R (Rt __class__t__name__treprRtget_config_variable(R((s./tmp/pip-install-usGedi/boto3/boto3/session.pyt__repr__Ss cCs|jjpdS(s1 The **read-only** profile name. tdefault(RR (R((s./tmp/pip-install-usGedi/boto3/boto3/session.pyR$XscCs|jjdƒS(s0 The **read-only** region name. R (RR*(R((s./tmp/pip-install-usGedi/boto3/boto3/session.pyR"_scCs|jjdƒS(s1 The event emitter for a session R (RR(R((s./tmp/pip-install-usGedi/boto3/boto3/session.pyteventsfscCs |jjS(sC The profiles available to the session credentials (Rtavailable_profiles(R((s./tmp/pip-install-usGedi/boto3/boto3/session.pyR.mscCsG|jjdƒ|_|jjjtjjtjjt ƒdƒƒdS(sC Setup loader paths so that we can load resources. t data_loadertdataN( RRt_loadert search_pathstappendtostpathtjointdirnamet__file__(R((s./tmp/pip-install-usGedi/boto3/boto3/session.pyRts cCs |jjƒS(s¾ Get a list of available services that can be loaded as low-level clients via :py:meth:`Session.client`. :rtype: list :return: List of service names (Rtget_available_services(R((s./tmp/pip-install-usGedi/boto3/boto3/session.pyR9|scCs|jjddƒS(s¿ Get a list of available services that can be loaded as resource clients via :py:meth:`Session.resource`. :rtype: list :return: List of service names t type_names resources-1(R1tlist_available_services(R((s./tmp/pip-install-usGedi/boto3/boto3/session.pytget_available_resources†scCs |jjƒS(sŠLists the available partitions :rtype: list :return: Returns a list of partition names (e.g., ["aws", "aws-cn"]) (Rtget_available_partitions(R((s./tmp/pip-install-usGedi/boto3/boto3/session.pyR=stawscCs|jjd|d|d|ƒS(sà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). :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"]). t service_nametpartition_nametallow_non_regional(Rtget_available_regions(RR?R@RA((s./tmp/pip-install-usGedi/boto3/boto3/session.pyRB˜s  cCs |jjƒS(s# 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. (Rtget_credentials(R((s./tmp/pip-install-usGedi/boto3/boto3/session.pyRC¯sc CsF|jj|d|d|d|d|d|d|d|d| d | ƒ S( sá Create a low-level service client by name. :type service_name: string :param service_name: The name of a service, e.g. 's3' or 'ec2'. You can get a list of available services via :py:meth:`get_available_services`. :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 region_name is specified in the client config, its value will take precedence over environment variables and configuration values, but not over a region_name value passed explicitly to the method. See `botocore config documentation `_ for more details. :return: Service client instance R"t api_versiontuse_ssltverifyt endpoint_urlRR R!tconfig(Rt create_client( RR?R"RDRERFRGRR R!RH((s./tmp/pip-install-usGedi/boto3/boto3/session.pytclient¹s I c CsÏy|jj|d|ƒ} Wntk r_|jƒ} ||jƒk} t|| | ƒ‚nAtk rŸ|jj|dƒ}t||dj |ƒƒ‚nX|dkrÄ|jj |dƒ}n| dk rý| j dkr t j| ƒ} d| _ q ntddƒ} |j|d|d|d|d|d |d |d |d | d | ƒ }|jj}tjjd|d|d| ddtjj|j||ƒƒ}|jjd|d| dd|ƒ}|d|ƒS(sž Create a resource service client by name. :type service_name: string :param service_name: The name of a service, e.g. 's3' or 'ec2'. You can get a list of available services via :py:meth:`get_available_resources`. :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 region_name is specified in the client config, its value will take precedence over environment variables and configuration values, but not over a region_name value passed explicitly to the method. If user_agent_extra is specified in the client config, it overrides the default user_agent_extra provided by the resource API. See `botocore config documentation `_ for more details. :return: Subclass of :py:class:`~boto3.resources.base.ServiceResource` s resources-1s, tResourceRR"RDRERFRGRR R!RHR?t service_modeltresource_json_definitionst resourcestservice_waiter_modelt resource_nametsingle_resource_json_definitiontservicetservice_contextRJN(R1tload_service_modelRR<R9RRtlist_api_versionsRR6R tdetermine_latest_versionRtcopytdeepcopyRRJtmetaRLRtutilstServiceContexttLazyLoadedWaiterModelRRtload_from_definition(RR?R"RDRERFRGRR R!RHtresource_modelt availablethas_low_level_clienttavailable_api_versionsRJRLRStcls((s./tmp/pip-install-usGedi/boto3/boto3/session.pytresource sLJ                   cCs|jjdtjjdƒƒ|jjdtjjdƒƒ|jjdtjjdƒƒ|jjdtjjdƒƒ|jjd tjjd ƒd d ƒ|jjd tjjdƒd dƒ|jjdtjjdƒƒ|jjdtjjdd|jƒƒdS(Nscreating-client-class.s3s*boto3.s3.inject.inject_s3_transfer_methodss!creating-resource-class.s3.Buckets%boto3.s3.inject.inject_bucket_methodss!creating-resource-class.s3.Objects%boto3.s3.inject.inject_object_methodss(creating-resource-class.s3.ObjectSummarys-boto3.s3.inject.inject_object_summary_methodss creating-resource-class.dynamodbs6boto3.dynamodb.transform.register_high_level_interfacet unique_idshigh-level-dynamodbs&creating-resource-class.dynamodb.Tables+boto3.dynamodb.table.register_table_methodsshigh-level-dynamodb-tables+creating-resource-class.ec2.ServiceResources'boto3.ec2.createtags.inject_create_tagss$creating-resource-class.ec2.Instances'boto3.ec2.deletetags.inject_delete_tagsR (RtregisterRRZt lazy_callR-(R((s./tmp/pip-install-usGedi/boto3/boto3/session.pyRšsF                       N(R(t __module__t__doc__R R&R+tpropertyR$R"R-R.RR9R<R=tFalseRBRCtTrueRJRcR(((s./tmp/pip-install-usGedi/boto3/boto3/session.pyRs2!      M Ž(RWR4tbotocore.sessionRtbotocore.clientRtbotocore.exceptionsRRRt boto3.utilstboto3.exceptionsRRtresources.factoryRtobjectR(((s./tmp/pip-install-usGedi/boto3/boto3/session.pyts