Azure / Azure/azure-rest-api-specs
Microsoft.Consumption PriceSheets API is Paginated - Generated Config Says Otherwise
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 444
Description
Using the Azure SDK for Python -> ConsumptionManagementClient and the price_sheet.get_by_billing_period action, I would expect to get all pricing for the given account and billing period.
The SDK returns 1000 results and a next link to retrieve the remaining results. The root cause is that the SDK doesn't see the price sheets API endpoint as paginated, so it doesn't attempt to walk the data set:
See: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/consumption.json
The JSON objects at 1295 and 1358 should include the x-ms-pageable property, specifying the next_link property, **which does exist in the response:**

Contributor guide
Research direction
Open specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/consumption.json and inspect the objects around lines 1295 and 1358. Confirm the response includes next_link, then update the pageable metadata for both operations and verify that generated Python SDK behavior retrieves pages beyond the first 1,000 results.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, openapi, python
- Domain
- api, cloud
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100