作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在使用boto3,尝试使用Cost Exploer来获取成本和使用量
import boto3
client = boto3.client('ce')
client.get_cost_and_usage()
"aws-portal:ViewUsage",
"aws-portal:ViewBilling"
最佳答案
刚刚从这里找到答案
https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/billing-example-policies.html#example-policy-ce-api
示例11:查看成本和使用情况
要允许IAM用户使用AWS Cost Explorer API,请使用以下策略向他们授予访问权限:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ce:*"
],
"Resource": [
"*"
]
}
]
}
关于boto3 - 用户无权执行: ce:GetCostAndUsage,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50566905/
我正在使用boto3,尝试使用Cost Exploer来获取成本和使用量 import boto3 client = boto3.client('ce') client.get_cost_and_us
我是一名优秀的程序员,十分优秀!