本文整理匯總了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)
示例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)
示例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)
示例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
)