是否可以使用 sdk-for-java 从 AWS 账单中下载发票?如果可以,如何下载?

问题描述 投票:0回答:1

我一直在查看 AWS SDK for Java 的文档,并且正在尝试查找如何使用此 SDK 下载每月发票。这是有可能的还是我在这里追我的尾巴?

如果不支持,我可以使用其他替代方案吗?

java aws-java-sdk aws-java-sdk-2.x
1个回答
0
投票

尝试以下解决方案::

AWS SDK for Java 2.x(版本 2)没有用于直接下载每月发票的特定 API。该开发工具包主要侧重于提供对 AWS 服务及其功能的编程访问,而不是处理与计费和发票相关的任务。

[1] Use AWS Management Console:
    -> Log in to the AWS Management Console.
    -> Open the Billing and Cost Management console.
    -> In the navigation pane, select "Bills."
    -> Locate and download the invoice for the desired month.

[2] Use AWS Billing and Cost Management API:

-> You can use the AWS Cost Explorer API (part of AWS Billing and Cost Management API) to retrieve cost and usage data programmatically. The "GetCostAndUsage" API allows you to retrieve cost and usage metrics for a given billing period.

-> However, please note that the API does not directly provide the detailed invoice document like the one you see in the AWS Management Console. It provides cost and usage data in a structured format.

如果您需要自动执行检索发票并以编程方式处理发票的过程,您可能需要考虑使用 AWS Cost Explorer API 来获取成本和使用情况数据,然后根据您的需要设置数据格式。

请记住,AWS 服务产品和 SDK 功能可能已经超越了我在 2021 年的上次更新,因此最好参考官方 AWS SDK 文档和 API 参考来检查与计费和相关的任何更新或新功能。开发票。

© www.soinside.com 2019 - 2024. All rights reserved.