Skip to content
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 9 commits into from
Mar 30, 2018
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
{
"swagger": "2.0",
"info": {
"version": "2016-03-01",
"title": "Global API Client"
},
"host": "management.azure.com",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be referenced in the readme.md config file here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for review. I added it there

"get": {
"tags": [
"Global"
],
"summary": "Gets a list of meters for a given location.",
"description": "Gets a list of meters for a given location.",
"operationId": "Global_GetBillingMeters",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recommended operation id is GlobalBillingMeters_get or BillingMeters_Get

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add x-ms-examples for this operation

"parameters": [
{
"$ref": "#/parameters/subscriptionIdParameter"
},
{
"$ref": "#/parameters/apiVersionParameter"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inline definitions are discouraged. Please create a model definition for this array

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, please add the x-ms-pageable extension here.

"type": "array",
"items": {
"$ref": "#/definitions/BillingMeter"
}
}
}
}
}
}
},
"definitions": {
"BillingMeter": {
"description": "Billing meter.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please provide a more useful description, applies to other properties too

"type": "object",
"properties": {
"meterId": {
"description": "Meter GUID onboarded in Commerce",
"type": "string"
},
"billingLocation": {
"description": "CSM Location",
"type": "string"
},
"shortName": {
"description": "Short Name from Azure pricing Page",
"type": "string"
},
"friendlyName": {
"description": "Meter Resource Name",
"type": "string"
},
"resourceType": {
"description": "ResourceType meter used for",
"type": "string"
}
}
}
},
"parameters": {
"subscriptionIdParameter": {
"name": "subscriptionId",
"in": "path",
"description": "Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).",
"required": true,
"type": "string"
},
"apiVersionParameter": {
"name": "api-version",
"in": "query",
"description": "API Version",
"required": true,
"type": "string"
}
},
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"description": "Azure Active Directory OAuth2 Flow",
"flow": "implicit",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"scopes": {
"user_impersonation": "impersonate your user account"
}
}
},
"security": [
{
"azure_auth": [
"user_impersonation"
]
}
]
}