开发者社区 问答 正文

账单管理SDK调用显示EndpointResolvingError

已解决

源代码:

-- coding: utf8 --
from aliyunsdkcore.client import AcsClient
from aliyunsdkcore.profile import region_provider
from aliyunsdkbssopenapi.request.v20171214 import QueryMonthlyBillRequest

client = AcsClient(
"111111",
"111111",
"cn-shanghai"
);

request = QueryMonthlyBillRequest.QueryMonthlyBillRequest()
request.set_BillingCycle("2018-09")

response = client.do_action_with_exception(request)
print (response)

image

正常这个产品应该不用endpoint

展开
收起
c计划 2018-10-22 11:20:21 3518 分享
分享
版权
举报
1 条回答
写回答
取消 提交回答
  • 阿里云SDK研发人员
    采纳回答

    这个问题是因为账单管理这个产品未在SDK中设置endpoint,导致endpoint解析失败。感谢您的反馈,我们已经将这个问题告知产品同学,将在未来发布新的版本解决这个问题。

    要临时地解决你现在的问题,你可以在SDK中强制设定账单管理使用的endpoint即可。根据相关文档的描述,你可以使用 business.aliyuncs.com这个endpoint。

    在Python SDK中设置endpoint的方法:

    request.set_endpoint("business.aliyuncs.com")
    2019-07-17 23:09:36 举报
    赞同 展开评论

    评论

AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等

登录插画

登录以查看您的控制台资源

管理云资源
状态一览
快捷访问