-
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
Adding BillingMeters API #2745
Changes from 6 commits
3466517
2c9ced7
8240f54
2023907
c36bac6
77a4161
7b6a81c
43630ab
1723dbe
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -178,6 +178,44 @@ | |
} | ||
} | ||
} | ||
}, | ||
"/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": "ListBillingMeters", | ||
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. Recommended pattern is |
||
"parameters": [ | ||
{ | ||
"name": "billingLocation", | ||
"in": "query", | ||
"description": "Azure Location of billable resource", | ||
"type": "string" | ||
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. Is this parameter required? 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. No, it is not required. You can call api without billingLocation , it will return default values. |
||
}, | ||
{ | ||
"$ref": "#/parameters/subscriptionIdParameter" | ||
}, | ||
{ | ||
"$ref": "#/parameters/apiVersionParameter" | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "OK", | ||
"schema": { | ||
"$ref": "#/definitions/BillingMeterCollection" | ||
} | ||
}, | ||
"default": { | ||
"description": "Default error response", | ||
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 adding a better description, an example here 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. I removed this. Other our API in this json don't have it . |
||
"schema": { | ||
"$ref": "./CommonDefinitions.json#/definitions/ErrorResponse" | ||
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.
|
||
} | ||
} | ||
}, | ||
"x-ms-pageable": { | ||
"nextLinkName": "nextLink" | ||
} | ||
} | ||
}, | ||
"/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations": { | ||
"get": { | ||
|
@@ -476,6 +514,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 resources.", | ||
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. Please verify description or add more relevant information |
||
"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", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,255 @@ | ||
{ | ||
"parameters": { | ||
"subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", | ||
"api-version": "2016-03-01" | ||
}, | ||
"responses": { | ||
"200": { | ||
"headers": {}, | ||
"body": { | ||
"value": [ | ||
{ | ||
"id": "subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/billingMeters/a87d942f-26f3-4b73-abd4-3ad279b97fc9", | ||
"name": "a87d942f-26f3-4b73-abd4-3ad279b97fc9", | ||
"type": "subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/billingMeters", | ||
"properties": { | ||
"meterId": "a87d942f-26f3-4b73-abd4-3ad279b97fc9", | ||
"billingLocation": "southcentralus", | ||
"shortName": "I3", | ||
"friendlyName": "Isolated Large App Service Hours", | ||
"resourceType": "serverfarm" | ||
} | ||
}, | ||
{ | ||
"id": "subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/billingMeters/7819cd57-36a5-4845-a072-58ee70c9f483", | ||
"name": "7819cd57-36a5-4845-a072-58ee70c9f483", | ||
"type": "subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/billingMeters", | ||
"properties": { | ||
"meterId": "7819cd57-36a5-4845-a072-58ee70c9f483", | ||
"billingLocation": "southcentralus", | ||
"shortName": "I2", | ||
"friendlyName": "Isolated Medium App Service Hours", | ||
"resourceType": "serverfarm" | ||
} | ||
}, | ||
{ | ||
"id": "subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/billingMeters/e8a8b567-6047-460b-a534-17451cc7edf9", | ||
"name": "e8a8b567-6047-460b-a534-17451cc7edf9", | ||
"type": "subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/billingMeters", | ||
"properties": { | ||
"meterId": "e8a8b567-6047-460b-a534-17451cc7edf9", | ||
"billingLocation": "southcentralus", | ||
"shortName": "IM", | ||
"friendlyName": "Isolated Monthly Stamp Fee", | ||
"resourceType": "serverfarm" | ||
} | ||
}, | ||
{ | ||
"id": "subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/billingMeters/c8b787af-eeb7-4d96-97a3-630a00021664", | ||
"name": "c8b787af-eeb7-4d96-97a3-630a00021664", | ||
"type": "subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/billingMeters", | ||
"properties": { | ||
"meterId": "c8b787af-eeb7-4d96-97a3-630a00021664", | ||
"billingLocation": "southcentralus", | ||
"shortName": "I1", | ||
"friendlyName": "Isolated Small App Service Hours", | ||
"resourceType": "serverfarm" | ||
} | ||
}, | ||
{ | ||
"id": "subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/billingMeters/6318825b-98b6-4b3c-883f-52a9d1560dae", | ||
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. It is discouraged to use production style subscription ids in public repo, please replace these with |
||
"name": "6318825b-98b6-4b3c-883f-52a9d1560dae", | ||
"type": "subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/billingMeters", | ||
"properties": { | ||
"meterId": "6318825b-98b6-4b3c-883f-52a9d1560dae", | ||
"billingLocation": "southcentralus", | ||
"shortName": "IF", | ||
"friendlyName": "Isolated Front End App Service Hours", | ||
"resourceType": "serverfarm" | ||
} | ||
}, | ||
{ | ||
"id": "subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/billingMeters/7a3b96e3-1c68-4506-86d8-224b89b3347f", | ||
"name": "7a3b96e3-1c68-4506-86d8-224b89b3347f", | ||
"type": "subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/billingMeters", | ||
"properties": { | ||
"meterId": "7a3b96e3-1c68-4506-86d8-224b89b3347f", | ||
"billingLocation": "southcentralus", | ||
"shortName": "P2", | ||
"friendlyName": "Premium Medium App Service Hours", | ||
"resourceType": "serverfarm" | ||
} | ||
}, | ||
{ | ||
"id": "subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/billingMeters/db2ae25a-4469-4fa3-9c27-63ac21da6b30", | ||
"name": "db2ae25a-4469-4fa3-9c27-63ac21da6b30", | ||
"type": "subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/billingMeters", | ||
"properties": { | ||
"meterId": "db2ae25a-4469-4fa3-9c27-63ac21da6b30", | ||
"billingLocation": "southcentralus", | ||
"shortName": "P1", | ||
"friendlyName": "Premium Small App Service Hours", | ||
"resourceType": "serverfarm" | ||
} | ||
}, | ||
{ | ||
"id": "subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/billingMeters/ef5d838f-bed0-4e72-8fb2-ec32d6a715f1", | ||
"name": "ef5d838f-bed0-4e72-8fb2-ec32d6a715f1", | ||
"type": "subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/billingMeters", | ||
"properties": { | ||
"meterId": "ef5d838f-bed0-4e72-8fb2-ec32d6a715f1", | ||
"billingLocation": "southcentralus", | ||
"shortName": "P3", | ||
"friendlyName": "Premium Large App Service Hours", | ||
"resourceType": "serverfarm" | ||
} | ||
}, | ||
{ | ||
"id": "subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/billingMeters/7fadaaec-3afd-4afb-89a7-cdb1e3cb702b", | ||
"name": "7fadaaec-3afd-4afb-89a7-cdb1e3cb702b", | ||
"type": "subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/billingMeters", | ||
"properties": { | ||
"meterId": "7fadaaec-3afd-4afb-89a7-cdb1e3cb702b", | ||
"billingLocation": "southcentralus", | ||
"shortName": "S3", | ||
"friendlyName": "Standard Large App Service Hours", | ||
"resourceType": "serverfarm" | ||
} | ||
}, | ||
{ | ||
"id": "subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/billingMeters/64d48263-32ab-4359-b05b-8626b0974e17", | ||
"name": "64d48263-32ab-4359-b05b-8626b0974e17", | ||
"type": "subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/billingMeters", | ||
"properties": { | ||
"meterId": "64d48263-32ab-4359-b05b-8626b0974e17", | ||
"billingLocation": "southcentralus", | ||
"shortName": "S2", | ||
"friendlyName": "Standard Medium App Service Hours", | ||
"resourceType": "serverfarm" | ||
} | ||
}, | ||
{ | ||
"id": "subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/billingMeters/505db374-df8a-44df-9d8c-13c14b61dee1", | ||
"name": "505db374-df8a-44df-9d8c-13c14b61dee1", | ||
"type": "subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/billingMeters", | ||
"properties": { | ||
"meterId": "505db374-df8a-44df-9d8c-13c14b61dee1", | ||
"billingLocation": "southcentralus", | ||
"shortName": "S1", | ||
"friendlyName": "Standard Small App Service Hours", | ||
"resourceType": "serverfarm" | ||
} | ||
}, | ||
{ | ||
"id": "subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/billingMeters/7ce53686-7c67-470b-ae6f-3996cbb02fbb", | ||
"name": "7ce53686-7c67-470b-ae6f-3996cbb02fbb", | ||
"type": "subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/billingMeters", | ||
"properties": { | ||
"meterId": "7ce53686-7c67-470b-ae6f-3996cbb02fbb", | ||
"billingLocation": "southcentralus", | ||
"shortName": "B3", | ||
"friendlyName": "Basic Large App Service Hours", | ||
"resourceType": "serverfarm" | ||
} | ||
}, | ||
{ | ||
"id": "subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/billingMeters/4f1fa8fe-ffed-48fa-9969-26a150775b60", | ||
"name": "4f1fa8fe-ffed-48fa-9969-26a150775b60", | ||
"type": "subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/billingMeters", | ||
"properties": { | ||
"meterId": "4f1fa8fe-ffed-48fa-9969-26a150775b60", | ||
"billingLocation": "southcentralus", | ||
"shortName": "B2", | ||
"friendlyName": "Basic Medium App Service Hours", | ||
"resourceType": "serverfarm" | ||
} | ||
}, | ||
{ | ||
"id": "subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/billingMeters/ba302f7a-078b-4141-a636-a76315ba44ce", | ||
"name": "ba302f7a-078b-4141-a636-a76315ba44ce", | ||
"type": "subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/billingMeters", | ||
"properties": { | ||
"meterId": "ba302f7a-078b-4141-a636-a76315ba44ce", | ||
"billingLocation": "southcentralus", | ||
"shortName": "B1", | ||
"friendlyName": "Basic Small App Service Hours", | ||
"resourceType": "serverfarm" | ||
} | ||
}, | ||
{ | ||
"id": "subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/billingMeters/67cf08ec-f742-4d89-ba10-60ff525dd71f", | ||
"name": "67cf08ec-f742-4d89-ba10-60ff525dd71f", | ||
"type": "subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/billingMeters", | ||
"properties": { | ||
"meterId": "67cf08ec-f742-4d89-ba10-60ff525dd71f", | ||
"billingLocation": "southcentralus", | ||
"shortName": "P4", | ||
"friendlyName": "Premium Extra Large App Service Hours", | ||
"resourceType": "serverfarm" | ||
} | ||
}, | ||
{ | ||
"id": "subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/billingMeters/0c3885bd-351d-4c28-830a-446d7bb4295c", | ||
"name": "0c3885bd-351d-4c28-830a-446d7bb4295c", | ||
"type": "subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/billingMeters", | ||
"properties": { | ||
"meterId": "0c3885bd-351d-4c28-830a-446d7bb4295c", | ||
"billingLocation": "southcentralus", | ||
"shortName": "D1", | ||
"friendlyName": "Shared App Service Hours", | ||
"resourceType": "site" | ||
} | ||
}, | ||
{ | ||
"id": "subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/billingMeters/c0f5cb45-6fb1-41c9-8545-72ad400d9da4", | ||
"name": "c0f5cb45-6fb1-41c9-8545-72ad400d9da4", | ||
"type": "subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/billingMeters", | ||
"properties": { | ||
"meterId": "c0f5cb45-6fb1-41c9-8545-72ad400d9da4", | ||
"billingLocation": "southcentralus", | ||
"shortName": "F1", | ||
"friendlyName": "Free App Service", | ||
"resourceType": "site" | ||
} | ||
}, | ||
{ | ||
"id": "subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/billingMeters/c6dd980d-e1e6-4369-80b9-cc34aa027d6c", | ||
"name": "c6dd980d-e1e6-4369-80b9-cc34aa027d6c", | ||
"type": "subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/billingMeters", | ||
"properties": { | ||
"meterId": "c6dd980d-e1e6-4369-80b9-cc34aa027d6c", | ||
"billingLocation": "southcentralus", | ||
"shortName": "P1v2", | ||
"friendlyName": "Premium V2 Small App Service Hours", | ||
"resourceType": "serverfarm" | ||
} | ||
}, | ||
{ | ||
"id": "subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/billingMeters/c1153483-9560-4313-b95b-7be141ee305f", | ||
"name": "c1153483-9560-4313-b95b-7be141ee305f", | ||
"type": "subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/billingMeters", | ||
"properties": { | ||
"meterId": "c1153483-9560-4313-b95b-7be141ee305f", | ||
"billingLocation": "southcentralus", | ||
"shortName": "P2v2", | ||
"friendlyName": "Premium V2 Medium App Service Hours", | ||
"resourceType": "serverfarm" | ||
} | ||
}, | ||
{ | ||
"id": "subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/billingMeters/25d05ec4-b606-4a70-a732-0daae48180e7", | ||
"name": "25d05ec4-b606-4a70-a732-0daae48180e7", | ||
"type": "subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/billingMeters", | ||
"properties": { | ||
"meterId": "25d05ec4-b606-4a70-a732-0daae48180e7", | ||
"billingLocation": "southcentralus", | ||
"shortName": "P3v2", | ||
"friendlyName": "Premium V2 Large App Service Hours", | ||
"resourceType": "serverfarm" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
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.
nit: fix indentation
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.
can you please provide more details on this?
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 indentation is off to the right by a tab, just align it to the closing bracket above