-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Adding BillingMeters API #2745
Merged
Merged
Adding BillingMeters API #2745
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
3466517
Adding BillingMeters API
andreyse 2c9ced7
Adding reference to readme.md
andreyse 8240f54
"Added billingmeters in the correct file"
andreyse 2023907
Update readme.md
andreyse c36bac6
Adding example for ListBillingMeters
andreyse 77a4161
Merge branch 'master' of https://github.com/andreyse/azure-rest-api-s…
andreyse 7b6a81c
Update ResourceProvider.json
andreyse 43630ab
Addressing comments
andreyse 1723dbe
Merge branch 'master' of https://github.com/andreyse/azure-rest-api-s…
andreyse 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
This file contains 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 |
---|---|---|
|
@@ -179,6 +179,38 @@ | |
} | ||
} | ||
}, | ||
"/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters": { | ||
"get": { | ||
"summary": "Gets a list of meters for a given location.", | ||
"description": "Gets a list of meters for a given location.", | ||
"operationId": "BillingMeters_List", | ||
"parameters": [ | ||
{ | ||
"name": "billingLocation", | ||
"in": "query", | ||
"description": "Azure Location of billable resource", | ||
"type": "string" | ||
}, | ||
{ | ||
"$ref": "#/parameters/subscriptionIdParameter" | ||
}, | ||
{ | ||
"$ref": "#/parameters/apiVersionParameter" | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "OK", | ||
"schema": { | ||
"$ref": "#/definitions/BillingMeterCollection" | ||
} | ||
} | ||
}, | ||
"x-ms-pageable": { | ||
"nextLinkName": "nextLink" | ||
} | ||
} | ||
}, | ||
"/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations": { | ||
"get": { | ||
"summary": "Gets list of available geo regions plus ministamps", | ||
|
@@ -476,6 +508,64 @@ | |
} | ||
}, | ||
"definitions": { | ||
"BillingMeter": { | ||
"description": "App Service billing entity that contains information about meter which the Azure billing system utilizes to charge users for services.", | ||
"type": "object", | ||
"allOf": [ | ||
{ | ||
"$ref": "./CommonDefinitions.json#/definitions/ProxyOnlyResource" | ||
} | ||
], | ||
"properties": { | ||
"properties": { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider creating another model for these properties, something like |
||
"description": "BillingMeter resource specific properties", | ||
"properties": { | ||
"meterId": { | ||
"description": "Meter GUID onboarded in Commerce", | ||
"type": "string" | ||
}, | ||
"billingLocation": { | ||
"description": "Azure Location of billable resource", | ||
"type": "string" | ||
}, | ||
"shortName": { | ||
"description": "Short Name from App Service Azure pricing Page", | ||
"type": "string" | ||
}, | ||
"friendlyName": { | ||
"description": "Friendly name of the meter", | ||
"type": "string" | ||
}, | ||
"resourceType": { | ||
"description": "App Service resource type meter used for", | ||
"type": "string" | ||
} | ||
}, | ||
"x-ms-client-flatten": true | ||
} | ||
} | ||
}, | ||
"BillingMeterCollection": { | ||
"description": "Collection of Billing Meters", | ||
"required": [ | ||
"value" | ||
], | ||
"type": "object", | ||
"properties": { | ||
"value": { | ||
"description": "Collection of Billing Meters.", | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/BillingMeter" | ||
} | ||
}, | ||
"nextLink": { | ||
"description": "Link to next page of resources.", | ||
"type": "string", | ||
"readOnly": true | ||
} | ||
} | ||
}, | ||
"CsmMoveResourceEnvelope": { | ||
"description": "Object with a list of the resources that need to be moved and the resource group they should be moved to.", | ||
"type": "object", | ||
|
25 changes: 25 additions & 0 deletions
25
...tion/web/resource-manager/Microsoft.Web/stable/2016-03-01/examples/ListBillingMeters.json
This file contains 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,25 @@ | ||
{ | ||
"parameters": { | ||
"subscriptionId": "{subId}", | ||
"api-version": "2016-03-01" | ||
}, | ||
"responses": { | ||
"200": { | ||
"headers": {}, | ||
"body": { | ||
"value": { | ||
"id": "subscriptions/{subId}/providers/Microsoft.Web/billingMeters/{meterId}", | ||
"name": "{meterId}", | ||
"type": "subscriptions/{subId}/providers/Microsoft.Web/billingMeters", | ||
"properties": { | ||
"meterId": "{meterId}", | ||
"billingLocation": "southcentralus", | ||
"shortName": "I3", | ||
"friendlyName": "Isolated Large App Service Hours", | ||
"resourceType": "serverfarm" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
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.
Is this parameter required?
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.
No, it is not required. You can call api without billingLocation , it will return default values.