python - 使用 python 和 boto3 在 aws 中获取配置的 S3 存储桶以获取详细的计费报告
问题描述
我想用 python 和 boto3 查询配置的 s3 存储桶,以获取 aws 帐户内的详细计费报告。boto3 文档中列出了 describe_report_definitions 命令,该命令应使用配置的 s3 存储桶返回可用报告。当我运行以下代码时,我一直收到一个空数组作为响应,尽管配置了 s3 存储桶,但报告可用。
cur_client = boto3.client(
'cur',
'us-east-1'
)
cur_describe_report_definitions_response = cur_client.describe_report_definitions()
print(str(json.dumps(cur_describe_report_definitions_response['ReportDefinitions'])))
#Response
[]
解决方案
推荐阅读
- tokenize - 葡萄牙语分词器:t 打破“a”和“o”中的“ao”
- c# - 按下 Outlook 电子邮件发送按钮后调用 C# 方法或函数?
- php - getAccessToken() 方法在 facebook PHP SDK 5 中返回 null
- excel - 用于计算目标进度百分比的动态公式?
- sql - 在 Oracle sql 中以 T 为状态的最后更改数据
- php - get_meta_tags 用于批处理的慢速替代方案
- python - python os.walk 脚本的路径连接错误
- ios - What is the proper way to use EVReflection to parse a Dictionary type?
- python - 从 VBA 运行 python 脚本
- php - PHP 创建一个减去的while循环?