當前位置: 首頁>>代碼示例>>Python>>正文


Python utils.is_valid_endpoint_url方法代碼示例

本文整理匯總了Python中botocore.utils.is_valid_endpoint_url方法的典型用法代碼示例。如果您正苦於以下問題:Python utils.is_valid_endpoint_url方法的具體用法?Python utils.is_valid_endpoint_url怎麽用?Python utils.is_valid_endpoint_url使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在botocore.utils的用法示例。


在下文中一共展示了utils.is_valid_endpoint_url方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: create_endpoint

# 需要導入模塊: from botocore import utils [as 別名]
# 或者: from botocore.utils import is_valid_endpoint_url [as 別名]
def create_endpoint(self, service_model, region_name, endpoint_url,
                        verify=None, response_parser_factory=None,
                        timeout=DEFAULT_TIMEOUT,
                        max_pool_connections=MAX_POOL_CONNECTIONS):
        if not is_valid_endpoint_url(endpoint_url):

            raise ValueError("Invalid endpoint: %s" % endpoint_url)
        return Endpoint(
            endpoint_url,
            endpoint_prefix=service_model.endpoint_prefix,
            event_emitter=self._event_emitter,
            proxies=self._get_proxies(endpoint_url),
            verify=self._get_verify_value(verify),
            timeout=timeout,
            max_pool_connections=max_pool_connections,
            response_parser_factory=response_parser_factory) 
開發者ID:skarlekar,項目名稱:faces,代碼行數:18,代碼來源:endpoint.py

示例2: create_endpoint

# 需要導入模塊: from botocore import utils [as 別名]
# 或者: from botocore.utils import is_valid_endpoint_url [as 別名]
def create_endpoint(self, service_model, region_name, endpoint_url,
                        verify=None, response_parser_factory=None,
                        timeout=DEFAULT_TIMEOUT,
                        max_pool_connections=MAX_POOL_CONNECTIONS,
                        proxies=None):
        if not is_valid_endpoint_url(endpoint_url):

            raise ValueError("Invalid endpoint: %s" % endpoint_url)
        if proxies is None:
            proxies = self._get_proxies(endpoint_url)
        return Endpoint(
            endpoint_url,
            endpoint_prefix=service_model.endpoint_prefix,
            event_emitter=self._event_emitter,
            proxies=proxies,
            verify=self._get_verify_value(verify),
            timeout=timeout,
            max_pool_connections=max_pool_connections,
            response_parser_factory=response_parser_factory) 
開發者ID:VirtueSecurity,項目名稱:aws-extender,代碼行數:21,代碼來源:endpoint.py

示例3: create_endpoint

# 需要導入模塊: from botocore import utils [as 別名]
# 或者: from botocore.utils import is_valid_endpoint_url [as 別名]
def create_endpoint(self, service_model, region_name=None,
                        endpoint_url=None, verify=None,
                        response_parser_factory=None, timeout=DEFAULT_TIMEOUT,
                        max_pool_connections=MAX_POOL_CONNECTIONS,
                        proxies=None, connector_args=None):
        if not is_valid_endpoint_url(endpoint_url):
            raise ValueError("Invalid endpoint: %s" % endpoint_url)
        if proxies is None:
            proxies = self._get_proxies(endpoint_url)
        return AioEndpoint(
            endpoint_url,
            endpoint_prefix=service_model.endpoint_prefix,
            event_emitter=self._event_emitter,
            proxies=proxies,
            verify=self._get_verify_value(verify),
            timeout=timeout,
            max_pool_connections=max_pool_connections,
            response_parser_factory=response_parser_factory,
            loop=self._loop, connector_args=connector_args) 
開發者ID:skylander86,項目名稱:lambda-text-extractor,代碼行數:21,代碼來源:endpoint.py

示例4: create_endpoint

# 需要導入模塊: from botocore import utils [as 別名]
# 或者: from botocore.utils import is_valid_endpoint_url [as 別名]
def create_endpoint(self, service_model, region_name, endpoint_url,
                        verify=None, response_parser_factory=None,
                        timeout=DEFAULT_TIMEOUT,
                        max_pool_connections=MAX_POOL_CONNECTIONS,
                        http_session_cls=URLLib3Session,
                        proxies=None,
                        socket_options=None,
                        client_cert=None):
        if not is_valid_endpoint_url(endpoint_url):

            raise ValueError("Invalid endpoint: %s" % endpoint_url)
        if proxies is None:
            proxies = self._get_proxies(endpoint_url)
        endpoint_prefix = service_model.endpoint_prefix

        logger.debug('Setting %s timeout as %s', endpoint_prefix, timeout)
        http_session = http_session_cls(
            timeout=timeout,
            proxies=proxies,
            verify=self._get_verify_value(verify),
            max_pool_connections=max_pool_connections,
            socket_options=socket_options,
            client_cert=client_cert,
        )

        return Endpoint(
            endpoint_url,
            endpoint_prefix=endpoint_prefix,
            event_emitter=self._event_emitter,
            response_parser_factory=response_parser_factory,
            http_session=http_session
        ) 
開發者ID:QData,項目名稱:deepWordBug,代碼行數:34,代碼來源:endpoint.py


注:本文中的botocore.utils.is_valid_endpoint_url方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。