Azure / Azure/azure-rest-api-specs

[BUG][Cost Management] parameter grainParameter does not work on list operations of Benefit Utilization Summaries

Open
#28,638 0 comments 0 reactions 0 assignees View on GitHub
bug Cost Management - Query Mgmt Service Attention
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
3d 37m
Merged PRs (30d)
446

Description

### API Spec link

https://github.com/Azure/azure-rest-api-specs/blob/main/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-11-01/costmanagement.benefits.json#L1414

### API Spec version

2023-11-01

### Describe the bug

Parameter `grainParameter` does not work when calling BenefitUtilizationSummaries_List operations as [sample](https://learn.microsoft.com/en-us/rest/api/cost-management/benefit-utilization-summaries/list-by-billing-account-id?view=rest-cost-management-2023-11-01&tabs=HTTP) showed in the docs. Response still returned with daily grain though the `grainParameter` was set as Monthly. Yet it works when have `&grain=Monthly` in the API URL.
```
https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries?api-version=2023-11-01&grainParameter={grainParameter}&filter={filter}
```

### Expected behavior

Update the actual parameter name `grainParameter` to `grain` to make fix on doc description as well as SDKs.

### Actual behavior

`&grain=Monthly` works yet actual parameter name `grainParameter` does not work.

### Reproduction Steps

Calling api in this format.
```
GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries?api-version=2023-11-01&grainParameter={grainParameter}&filter={filter}
```

### Environment

_No response_

Contributor guide

Open the contributing guide

Research direction

Open the linked costmanagement.benefits.json specification at line 1414 and inspect the BenefitUtilizationSummaries_List parameter definition. Confirm the specification and its documentation use grain rather than grainParameter, and verify the resulting request matches the working grain=Monthly form.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
api
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.