-
Notifications
You must be signed in to change notification settings - Fork 5.6k
[Storage] Add Get Location Usage support #3014
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
...manager/Microsoft.Storage/stable/2018-02-01/examples/StorageAccountListLocationUsage.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| { | ||
| "parameters": { | ||
| "subscriptionId": "45b60d85-fd72-427a-a708-f994d26e593e", | ||
| "location": "eastus2(stage)", | ||
| "api-version": "2018-02-01" | ||
| }, | ||
| "responses": { | ||
| "200": { | ||
| "body": { | ||
| "value": [ | ||
| { | ||
| "unit": "Count", | ||
| "currentValue": 55, | ||
| "limit": 250, | ||
| "name": { | ||
| "value": "StorageAccounts", | ||
| "localizedValue": "Storage Accounts" | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The operation group name must be plural
Usages_ListByLocationThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@anuchandy
As there's already an API with name "Usage_List", to be aligned with this, we should use "Usage_ListByLocation" here. (Actually, only one usage of the specific location is returned with the API)
And this name already passed review in https://github.com/Azure/azure-rest-api-specs-pr/pull/459
Since the feature is target to 5/7 Build release, we need this to be merged in ASAP. I will set up a meeting tomorrow to discuss this PR if it still can't be merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@anuchandy
The "Usage_List" is also aligned with other features in Usage list, like Compute:
azure-rest-api-specs/specification/compute/resource-manager/Microsoft.Compute/stable/2017-12-01/compute.json
Line 1006 in de8dada
If we want to change “Usage” to “Usages” in all APIs, it will be a breaking of existing API "Usage_List". If only change "Usage_ListByLocation" to "Usages_ListByLocation", it will be in different operation group with "Usage_List" which is wired, since 2 APIs have similar function and same return type (only scope different: one is for current subscription, one is for a location under current subscription).
I think we might can consider to change all "Usage" to "Usages" in a future release which allows breaking change. But for this release, to be aligned with existing API and no breaking, we might should keep using "Usage_ListByLocation".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@blueww thanks! Agree with you, to have consistently with
Storage::Usage_Listwe needUsage_ListByLocation. We can merge this PR.Using non-plural name for operation group is against SDK guideline, seems compute spec is also violating this guideline, thanks for pointing this. Will bring this to compute team attention and get fixed.
As you mentioned in the future API version, let's fix this. Will create an issue and assign it you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@blueww Created an issue #3024 and assigned to you.