shiichan

AWS's New ListBillingViewSegments API Reveals Your Account's Billing Structure!

Hi everyone, it's me! Today I found an AWS billing announcement I want to share with you.

AWS What's New aws.amazon.com

What was announced?

AWS What's New announced a new API for AWS Billing and Cost Management called ListBillingViewSegments. It lets you retrieve your account's "billing context" over a time period you specify. Specifically, it tells you where your account sits in the billing hierarchy (management account, member account, or billing group primary account), which account manages your billing relationship, and the rate settings (billable or pro forma) applied to your cost data. Note that the API only returns billing context, not the actual cost or usage data.

The story so far

Accounts often join AWS Organizations or have their billing management change over time. Until now, there wasn't an easy way to see, all at once, which billing structure an account belonged to and since when. Tracking the history of billing hierarchy and rate settings could take real effort.

What changes

With a single call to the ListBillingViewSegments API, you can now retrieve the full history of your account's billing context over a period. This should make life easier for billing teams and anyone managing multiple accounts who needs to track their account structure and rate-setting history. You can call the API directly, or use it through an AI agent.

Dive Deep

The key idea behind this API is handling cases where the billing context changes partway through the requested period. It splits the period into multiple segments based on state, each with its own effective date range.

Here's the example from the original announcement:

An account starts as its own payer, then moves under another organization as a member account, and in a later month has its new payer manage its billing through AWS Billing Conductor.

Since this account goes through 3 billing states, a request covering that period would return 3 segments.

Here's what's supported:

  • Available in all commercial AWS Regions
  • No additional charge
  • Supports primary billing views only

Check the AWS Billing API Reference for the full details.

Wrap-up

  • AWS Billing and Cost Management gets a new API called ListBillingViewSegments
  • It returns your account's position in the billing hierarchy and its rate-setting (billable/pro forma) history
  • When billing context changes mid-period, it's returned as time-based segments
  • Available at no extra charge in all commercial Regions; primary billing views only
  • Great for anyone managing billing across multiple accounts who wants to understand their billing structure