client.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:AshsSDK 作者: thehappydinoa 项目源码 文件源码
def _resolve_signature_version(self, service_name, resolved):
        configured_version = _get_configured_signature_version(
            service_name, self.client_config, self.scoped_config)
        if configured_version is not None:
            return configured_version

        # Pick a signature version from the endpoint metadata if present.
        if 'signatureVersions' in resolved:
            potential_versions = resolved['signatureVersions']
            if service_name == 's3':
                return 's3v4'
            if 'v4' in potential_versions:
                return 'v4'
            # Now just iterate over the signature versions in order until we
            # find the first one that is known to Botocore.
            for known in AUTH_TYPE_MAPS:
                if known in potential_versions:
                    return known
        raise UnknownSignatureVersionError(
            signature_version=resolved.get('signatureVersions'))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号