Skip to content

How to List Savings Plans Organization Inventory through API?

0

I am looking for guidance on how to list the Savings Plans organization inventory using an API. I know how to view it on Billing and Cost Management Console but couldn't find the specific documentation regarding the API. If possible, could anyone provide examples or documentation links?

https://docs.aws.amazon.com/savingsplans/latest/userguide/ce-sp-inventory.html

asked 2 years ago541 views

2 Answers
0
Accepted Answer

Hello.

I searched the documentation for the API "ListSavingsPlans" mentioned in the AWS re:Post Agent response, but I couldn't find it.
I think it's probably an API that can't be executed.
Please use the "describe-savings-plans" API instead.
https://awscli.amazonaws.com/v2/documentation/api/latest/reference/savingsplans/describe-savings-plans.html

aws savingsplans describe-savings-plans
EXPERT

answered 2 years ago

EXPERT

reviewed 2 years ago

  • Hi, Thank you for your answer. I understand that there is no API available for listing the Savings Plans organization inventory, and that I should use the "describe-savings-plans" API instead.

-1

To list the Savings Plans organization inventory through an API, you can use the "ListSavingsPlans" API operation. This operation returns a list of Savings Plans for the calling account, which includes organization-wide inventory if you're using a management account.

The API allows you to retrieve detailed information about your Savings Plans, including the Savings Plan ID, status, type, instance family (for EC2 Instance Savings Plans), region, commitment, and start and end dates. You can also get information about the monthly net savings for each Savings Plan in the organization inventory.

When using the API, keep in mind that recently purchased Savings Plans may appear in the account inventory view shortly after purchase, but it might take longer for them to show up in the organization inventory view.

To use this API, you'll need to ensure you have the necessary permissions and are using the appropriate AWS SDK or AWS CLI. The exact syntax and parameters will depend on the programming language or tool you're using to make the API call.

It's worth noting that while the API provides a programmatic way to access this information, the Billing and Cost Management console still offers a user-friendly interface for viewing and managing your Savings Plans inventory, including the ability to download the inventory as a CSV file.
Sources
https://docs.aws.amazon.com/savingsplans/latest/APIReference/meta-inf/related-resources.html
Viewing your Savings Plans inventory - Savings Plans

answered 2 years ago

AWS
EXPERT

reviewed 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.