【问题标题】:Is there an AWS command or billing API to get the credit details?是否有 AWS 命令或计费 API 来获取信用详细信息?
【发布时间】:2020-01-10 18:24:17
【问题描述】:
我目前正在使用以下命令来获取混合和非混合成本:
aws ce get-cost-and-usage --time-period Start=2019-12-01,End=2020-01-01 --granularity MONTHLY --metrics "BlendedCost" "UnblendedCost" "UsageQuantity" --group-by Type=DIMENSION,Key=SERVICE
我可以使用任何命令或选项来获取积分及其用法吗?我在 AWS 的文档中找不到太多信息,所以在这里发布一个问题。
【问题讨论】:
标签:
amazon-web-services
aws-billing
【解决方案1】:
也许这个过滤器可以帮助...
aws ce get-cost-and-usage --time-period Start=2020-07-01,End=2020-08-01 --granularity MONTHLY --metrics "BlendedCost" "UnblendedCost" "UsageQuantity" --group-by Type=DIMENSION,Key=SERVICE Type=TAG,Key=Environment --filter file://filters.json
带过滤器文件
{ "Dimensions": { "Key": "RECORD_TYPE", "Values": [ "Credit" ] } }
没有--group-by参数来获取到目前为止花费的总积分