Hierarchy

  • UsageMeteringApi

Constructors

Properties

configuration: Configuration
requestFactory: UsageMeteringApiRequestFactory
responseProcessor: UsageMeteringApiResponseProcessor

Methods

  • Get monthly usage attribution. Multi-region data is available starting March 1, 2023.

    Note: All estimated_* usage types will be deprecated on February 1, 2027.

    Each request returns usage for the month specified by start_month. If end_month is omitted or differs from start_month, it is treated as equal to start_month. To retrieve multiple months, make a separate request for each month.

    This API endpoint is paginated. To make sure you receive all records, check if the value of next_record_id is set in the response. If it is, make another request and pass next_record_id as a parameter. Pseudo code example:

    response := GetMonthlyUsageAttribution(start_month)
    cursor := response.metadata.pagination.next_record_id
    WHILE cursor != null BEGIN
    sleep(5 seconds) # Avoid running into rate limit
    response := GetMonthlyUsageAttribution(start_month, next_record_id=cursor)
    cursor := response.metadata.pagination.next_record_id
    END

    Parameters

    Returns Promise<MonthlyUsageAttributionResponse>

Generated using TypeDoc