From 9222ddb1c580fe1699b97fe506c215116d0516cb Mon Sep 17 00:00:00 2001 From: santoshsinha100 <45053048+santoshsinha100@users.noreply.github.com> Date: Wed, 20 Mar 2019 12:44:20 -0700 Subject: [PATCH 01/15] Adds base for updating Microsoft.Consumption from version preview/2017-12-30-preview to version 2019-03-01-preview --- .../2019-03-01-preview/consumption.json | 552 ++++++++++++++++++ .../2019-03-01-preview/examples/Budget.json | 45 ++ .../examples/BudgetsList.json | 108 ++++ .../examples/CreateOrUpdateBudget.json | 108 ++++ .../examples/DeleteBudget.json | 11 + 5 files changed, 824 insertions(+) create mode 100644 specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/consumption.json create mode 100644 specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/Budget.json create mode 100644 specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/BudgetsList.json create mode 100644 specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/CreateOrUpdateBudget.json create mode 100644 specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/DeleteBudget.json diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/consumption.json b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/consumption.json new file mode 100644 index 000000000000..dd74831a2c42 --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/consumption.json @@ -0,0 +1,552 @@ +{ + "swagger": "2.0", + "info": { + "version": "2017-12-30-preview", + "title": "ConsumptionManagementClient", + "description": "Consumption management client provides access to consumption resources for Azure Enterprise Subscriptions." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "tags": [ + { + "name": "Budgets-Preview", + "description": "Perform CRUD (Create, Update, Read, Delete) operations on the budget entity at the Subscription scope.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + } + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow.", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/providers/Microsoft.Consumption/budgets": { + "get": { + "tags": [ + "Budgets-Preview" + ], + "operationId": "Budgets_List", + "description": "Lists all budgets for a subscription.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "BudgetsList": { + "$ref": "./examples/BudgetsList.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/BudgetsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Consumption/budgets/{name}": { + "get": { + "tags": [ + "Budgets-Preview" + ], + "operationId": "Budgets_Get", + "description": "Gets the budget for a subscription by budget name.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "Budget": { + "$ref": "./examples/Budget.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/budgetNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/Budget" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "tags": [ + "Budgets-Preview" + ], + "operationId": "Budgets_CreateOrUpdate", + "description": "The operation to create or update a budget. Update operation requires latest eTag to be set in the request mandatorily. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "CreateOrUpdateBudget": { + "$ref": "./examples/CreateOrUpdateBudget.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/budgetNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Budget" + }, + "description": "Parameters supplied to the Create Budget operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/Budget" + } + }, + "201": { + "description": "Created.", + "schema": { + "$ref": "#/definitions/Budget" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + }, + "delete": { + "tags": [ + "Budgets-Preview" + ], + "operationId": "Budgets_Delete", + "description": "The operation to delete a budget.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "DeleteBudget": { + "$ref": "./examples/DeleteBudget.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/budgetNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.Consumption/operations": { + "get": { + "tags": [ + "Operations" + ], + "operationId": "Operations_List", + "description": "Lists all of the available consumption REST API operations.", + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/OperationListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "BudgetsListResult": { + "description": "Result of listing budgets. It contains a list of available budgets in the scope provided.", + "properties": { + "value": { + "description": "The list of budgets.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/Budget" + } + } + } + }, + "Budget": { + "description": "A budget resource.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/BudgetProperties", + "title": "Budget properties" + } + } + }, + "BudgetProperties": { + "description": "The properties of the budget.", + "properties": { + "category": { + "description": "The category of the budget, whether the budget tracks cost or something else.", + "type": "string", + "enum": [ + "Cost" + ], + "x-ms-enum": { + "name": "CategoryType", + "modelAsString": true + } + }, + "amount": { + "description": "The total amount of cost to track with the budget", + "type": "number", + "format": "decimal" + }, + "timeGrain": { + "description": "The time covered by a budget. Tracking of the amount will be reset based on the time grain.", + "type": "string", + "enum": [ + "Monthly", + "Quarterly", + "Annually" + ], + "x-ms-enum": { + "name": "TimeGrainType", + "modelAsString": true + } + }, + "timePeriod": { + "description": "Has start and end date of the budget. The start date must be first of the month and should be less than the end date. Budget start date must be on or after June 1, 2017. Future start date should not be more than three months. Past start date should be selected within the timegrain period. There are no restrictions on the end date.", + "$ref": "#/definitions/BudgetTimePeriod" + }, + "currentSpend": { + "description": "The current amount of cost which is being tracked for a budget.", + "$ref": "#/definitions/CurrentSpend", + "readOnly": true + }, + "notifications": { + "type": "object", + "description": "Dictionary of notifications associated with the budget. Budget can have up to five notifications.", + "additionalProperties": { + "type": "object", + "$ref": "#/definitions/Notification" + }, + "maxItems": 5 + } + }, + "required": [ + "category", + "amount", + "timeGrain", + "timePeriod" + ] + }, + "BudgetTimePeriod": { + "description": "The start and end date for a budget.", + "properties": { + "startDate": { + "description": "The start date for the budget.", + "type": "string", + "format": "date-time" + }, + "endDate": { + "description": "The end date for the budget. If not provided, we default this to 10 years from the start date.", + "type": "string", + "format": "date-time" + } + }, + "required": [ + "startDate" + ] + }, + "CurrentSpend": { + "description": "The current amount of cost which is being tracked for a budget.", + "properties": { + "amount": { + "description": "The total amount of cost which is being tracked by the budget.", + "type": "number", + "format": "decimal", + "readOnly": true + }, + "unit": { + "description": "The unit of measure for the budget amount.", + "type": "string", + "readOnly": true + } + } + }, + "Notification": { + "description": "The notification associated with a budget.", + "properties": { + "enabled": { + "description": "The notification is enabled or not.", + "type": "boolean" + }, + "operator": { + "description": "The comparison operator.", + "type": "string", + "enum": [ + "EqualTo", + "GreaterThan", + "GreaterThanOrEqualTo" + ], + "x-ms-enum": { + "name": "OperatorType", + "modelAsString": true + } + }, + "threshold": { + "description": "Threshold value associated with a notification. Notification is sent when the cost exceeded the threshold. It is always percent and has to be between 0 and 1000.", + "type": "number", + "format": "decimal" + }, + "contactEmails": { + "description": "Email addresses to send the budget notification to when the threshold is exceeded.", + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "maxItems": 50 + }, + "contactRoles": { + "description": "Contact roles to send the budget notification to when the threshold is exceeded.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "enabled", + "operator", + "threshold", + "contactEmails" + ] + }, + "Operation": { + "description": "A Consumption REST API operation.", + "type": "object", + "properties": { + "name": { + "description": "Operation name: {provider}/{resource}/{operation}.", + "type": "string", + "readOnly": true + }, + "display": { + "description": "The object that represents the operation.", + "properties": { + "provider": { + "description": "Service provider: Microsoft.Consumption.", + "type": "string", + "readOnly": true + }, + "resource": { + "description": "Resource on which the operation is performed: UsageDetail, etc.", + "type": "string", + "readOnly": true + }, + "operation": { + "description": "Operation type: Read, write, delete, etc.", + "type": "string", + "readOnly": true + } + } + } + } + }, + "OperationListResult": { + "description": "Result of listing consumption operations. It contains a list of operations and a URL link to get the next set of results.", + "properties": { + "value": { + "description": "List of consumption operations supported by the Microsoft.Consumption resource provider.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/Operation" + } + }, + "nextLink": { + "description": "URL to get the next set of operation list results if there are any.", + "type": "string", + "readOnly": true + } + } + }, + "ErrorDetails": { + "description": "The details of the error.", + "properties": { + "code": { + "description": "Error code.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "Error message indicating why the operation failed.", + "type": "string", + "readOnly": true + } + } + }, + "ErrorResponse": { + "description": "Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.", + "type": "object", + "properties": { + "error": { + "description": "The details of the error.", + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "ProxyResource": { + "description": "The Resource model definition.", + "properties": { + "id": { + "readOnly": true, + "type": "string", + "description": "Resource Id." + }, + "name": { + "readOnly": true, + "type": "string", + "description": "Resource name." + }, + "type": { + "readOnly": true, + "type": "string", + "description": "Resource type." + }, + "eTag": { + "type": "string", + "description": "eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not." + } + }, + "x-ms-azure-resource": true + } + }, + "parameters": { + "apiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "Version of the API to be used with the client request. The current version is 2017-12-30-preview." + }, + "subscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "description": "Azure Subscription ID.", + "required": true, + "type": "string" + }, + "budgetNameParameter": { + "name": "name", + "in": "path", + "description": "Budget name.", + "required": true, + "type": "string", + "x-ms-parameter-location": "client" + } + } +} \ No newline at end of file diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/Budget.json b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/Budget.json new file mode 100644 index 000000000000..794e0ca43296 --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/Budget.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "api-version": "2017-12-30-preview", + "subscriptionId": "{subscription-id}", + "name": "TestBudget" + }, + "responses": { + "200": { + "body": { + "id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/budgets/TestBudget", + "name": "TestBudget", + "type": "Microsoft.Consumption/budgets", + "eTag": "\"1d34d012214157f\"", + "properties": { + "category": "Cost", + "amount": 100.65, + "timeGrain": "Monthly", + "timePeriod": { + "startDate": "2017-10-01T00:00:00Z", + "endDate": "2018-10-31T00:00:00Z" + }, + "currentSpend": { + "amount": 80.89, + "unit": "USD" + }, + "notifications": { + "Actual_GreaterThan_80_Percent": { + "enabled": true, + "operator": "GreaterThan", + "threshold": 80, + "contactEmails": [ + "johndoe@contoso.com", + "janesmith@contoso.com" + ], + "contactRoles": [ + "Contributor", + "Reader" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/BudgetsList.json b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/BudgetsList.json new file mode 100644 index 000000000000..e6081f149dff --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/BudgetsList.json @@ -0,0 +1,108 @@ +{ + "parameters": { + "api-version": "2017-12-30-preview", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/budgets/TestBudget", + "name": "TestBudget", + "type": "Microsoft.Consumption/budgets", + "eTag": "\"1d34d012214157f\"", + "properties": { + "category": "Cost", + "amount": 100.65, + "timeGrain": "Monthly", + "timePeriod": { + "startDate": "2017-10-01T00:00:00Z", + "endDate": "2018-10-31T00:00:00Z" + }, + "currentSpend": { + "amount": 80.89, + "unit": "USD" + }, + "notifications": { + "Actual_GreaterThan_80_Percent": { + "enabled": true, + "operator": "GreaterThan", + "threshold": 80, + "contactEmails": [ + "johndoe@contoso.com", + "janesmith@contoso.com" + ], + "contactRoles": [ + "Contributor", + "Reader" + ] + }, + "Actual_GreaterThanOrEqualTo_90_Percent": { + "enabled": true, + "operator": "GreaterThanOrEqualTo", + "threshold": 90, + "contactEmails": [ + "johndoe@contoso.com", + "janesmith@contoso.com" + ], + "contactRoles": [ + "Contributor", + "Reader" + ] + } + } + } + }, + { + "id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/budgets/TestBudget", + "name": "TestBudget", + "type": "Microsoft.Consumption/budgets", + "eTag": "\"1d34d012214157f\"", + "properties": { + "category": "Cost", + "amount": 600.65, + "timeGrain": "Monthly", + "timePeriod": { + "startDate": "2017-10-01T00:00:00Z", + "endDate": "2018-10-31T00:00:00Z" + }, + "currentSpend": { + "amount": 120.89, + "unit": "USD" + }, + "notifications": { + "Actual_GreaterThan_40_Percent": { + "enabled": true, + "operator": "GreaterThan", + "threshold": 40, + "contactEmails": [ + "johndoe@contoso.com", + "janesmith@contoso.com" + ], + "contactRoles": [ + "Contributor", + "Reader" + ] + }, + "Actual_GreaterThanOrEqualTo_60_Percent": { + "enabled": true, + "operator": "GreaterThanOrEqualTo", + "threshold": 60, + "contactEmails": [ + "johndoe@contoso.com", + "janesmith@contoso.com" + ], + "contactRoles": [ + "Contributor", + "Reader" + ] + } + } + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/CreateOrUpdateBudget.json b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/CreateOrUpdateBudget.json new file mode 100644 index 000000000000..45d5f2d73d4b --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/CreateOrUpdateBudget.json @@ -0,0 +1,108 @@ +{ + "parameters": { + "api-version": "2017-12-30-preview", + "subscriptionId": "{subscription-id}", + "name": "TestBudget", + "parameters": { + "eTag": "\"1d34d016a593709\"", + "properties": { + "category": "Cost", + "amount": 100.65, + "timeGrain": "Monthly", + "timePeriod": { + "startDate": "2017-10-01T00:00:00Z", + "endDate": "2018-10-31T00:00:00Z" + }, + "notifications": { + "Actual_GreaterThan_80_Percent": { + "enabled": true, + "operator": "GreaterThan", + "threshold": 80, + "contactEmails": [ + "johndoe@contoso.com", + "janesmith@contoso.com" + ], + "contactRoles": [ + "Contributor", + "Reader" + ] + } + } + } + } + }, + "responses": { + "201": { + "body": { + "id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/budgets/TestBudget", + "name": "TestBudget", + "type": "Microsoft.Consumption/budgets", + "eTag": "\"1d34d012214157f\"", + "properties": { + "category": "Cost", + "amount": 100.65, + "timeGrain": "Monthly", + "timePeriod": { + "startDate": "2017-10-01T00:00:00Z", + "endDate": "2018-10-31T00:00:00Z" + }, + "currentSpend": { + "amount": 80.89, + "unit": "USD" + }, + "notifications": { + "Actual_GreaterThan_80_Percent": { + "enabled": true, + "operator": "GreaterThan", + "threshold": 80, + "contactEmails": [ + "johndoe@contoso.com", + "janesmith@contoso.com" + ], + "contactRoles": [ + "Contributor", + "Reader" + ] + } + } + } + } + }, + "200": { + "body": { + "id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/budgets/TestBudget", + "name": "TestBudget", + "type": "Microsoft.Consumption/budgets", + "eTag": "\"1d34d012214157f\"", + "properties": { + "category": "Cost", + "amount": 100.65, + "timeGrain": "Monthly", + "timePeriod": { + "startDate": "2017-10-01T00:00:00Z", + "endDate": "2018-10-31T00:00:00Z" + }, + "currentSpend": { + "amount": 80.89, + "unit": "USD" + }, + "notifications": { + "Actual_GreaterThan_80_Percent": { + "enabled": true, + "operator": "GreaterThan", + "threshold": 80, + "contactEmails": [ + "johndoe@contoso.com", + "janesmith@contoso.com" + ], + "contactRoles": [ + "Contributor", + "Reader" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/DeleteBudget.json b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/DeleteBudget.json new file mode 100644 index 000000000000..f952c1bd7e00 --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/DeleteBudget.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "api-version": "2017-12-30-preview", + "subscriptionId": "{subscription-id}", + "name": "TestBudget" + }, + "responses": { + "200": { + } + } +} \ No newline at end of file From c0150edecf9d98759f6c02c77b4c160b10efb5f1 Mon Sep 17 00:00:00 2001 From: santoshsinha100 <45053048+santoshsinha100@users.noreply.github.com> Date: Wed, 20 Mar 2019 12:44:20 -0700 Subject: [PATCH 02/15] Updates readme --- .../consumption/resource-manager/readme.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/specification/consumption/resource-manager/readme.md b/specification/consumption/resource-manager/readme.md index 4a583b834696..04a934508cfd 100644 --- a/specification/consumption/resource-manager/readme.md +++ b/specification/consumption/resource-manager/readme.md @@ -26,18 +26,27 @@ These are the global settings for the Consumption API. ``` yaml openapi-type: arm -tag: package-2019-01 +tag: package-preview-2019-03 ``` +### Tag: package-preview-2019-03 + +These settings apply only when `--tag=package-preview-2019-03` is specified on the command line. + +```yaml $(tag) == 'package-preview-2019-03' +input-file: + - Microsoft.Consumption/preview/2019-03-01-preview/consumption.json +``` ### Tag: package-2019-01 These settings apply only when `--tag=package-2019-01` is specified on the command line. -```yaml $(tag) == 'package-2019-01' +``` yaml $(tag) == 'package-2019-01' input-file: - Microsoft.Consumption/stable/2019-01-01/consumption.json ``` + ### Tag: package-2017-11 These settings apply only when `--tag=package-2017-11` is specified on the command line. From 40ccaa5c8a457f1c26db5ddd091fd681d2c00e35 Mon Sep 17 00:00:00 2001 From: santoshsinha100 <45053048+santoshsinha100@users.noreply.github.com> Date: Wed, 20 Mar 2019 12:44:22 -0700 Subject: [PATCH 03/15] Updates API version in new specs and examples --- .../preview/2019-03-01-preview/consumption.json | 4 ++-- .../preview/2019-03-01-preview/examples/Budget.json | 2 +- .../preview/2019-03-01-preview/examples/BudgetsList.json | 2 +- .../2019-03-01-preview/examples/CreateOrUpdateBudget.json | 2 +- .../preview/2019-03-01-preview/examples/DeleteBudget.json | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/consumption.json b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/consumption.json index dd74831a2c42..47e4df442f02 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/consumption.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/consumption.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "version": "2017-12-30-preview", + "version": "2019-03-01-preview", "title": "ConsumptionManagementClient", "description": "Consumption management client provides access to consumption resources for Azure Enterprise Subscriptions." }, @@ -531,7 +531,7 @@ "in": "query", "required": true, "type": "string", - "description": "Version of the API to be used with the client request. The current version is 2017-12-30-preview." + "description": "Version of the API to be used with the client request. The current version is 2019-03-01-preview." }, "subscriptionIdParameter": { "name": "subscriptionId", diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/Budget.json b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/Budget.json index 794e0ca43296..c77c80eddba5 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/Budget.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/Budget.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2017-12-30-preview", + "api-version": "2019-03-01-preview", "subscriptionId": "{subscription-id}", "name": "TestBudget" }, diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/BudgetsList.json b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/BudgetsList.json index e6081f149dff..e642789274fa 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/BudgetsList.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/BudgetsList.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2017-12-30-preview", + "api-version": "2019-03-01-preview", "subscriptionId": "{subscription-id}" }, "responses": { diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/CreateOrUpdateBudget.json b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/CreateOrUpdateBudget.json index 45d5f2d73d4b..b3cdc013c290 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/CreateOrUpdateBudget.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/CreateOrUpdateBudget.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2017-12-30-preview", + "api-version": "2019-03-01-preview", "subscriptionId": "{subscription-id}", "name": "TestBudget", "parameters": { diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/DeleteBudget.json b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/DeleteBudget.json index f952c1bd7e00..5ff6493f89a4 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/DeleteBudget.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/DeleteBudget.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2017-12-30-preview", + "api-version": "2019-03-01-preview", "subscriptionId": "{subscription-id}", "name": "TestBudget" }, From ed9fd36b5686cd1d74adbc671720895e7a9f45ba Mon Sep 17 00:00:00 2001 From: santoshsinha100 <45053048+santoshsinha100@users.noreply.github.com> Date: Wed, 20 Mar 2019 13:04:11 -0700 Subject: [PATCH 04/15] Added a new api version for Tags --- .../2019-03-01-preview/examples/Budget.json | 45 -------- .../examples/BudgetsList.json | 108 ------------------ .../examples/CreateOrUpdateBudget.json | 108 ------------------ .../examples/DeleteBudget.json | 11 -- .../2019-03-01-preview/examples/Tags.json | 47 ++++++++ 5 files changed, 47 insertions(+), 272 deletions(-) delete mode 100644 specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/Budget.json delete mode 100644 specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/BudgetsList.json delete mode 100644 specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/CreateOrUpdateBudget.json delete mode 100644 specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/DeleteBudget.json create mode 100644 specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/Tags.json diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/Budget.json b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/Budget.json deleted file mode 100644 index c77c80eddba5..000000000000 --- a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/Budget.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "parameters": { - "api-version": "2019-03-01-preview", - "subscriptionId": "{subscription-id}", - "name": "TestBudget" - }, - "responses": { - "200": { - "body": { - "id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/budgets/TestBudget", - "name": "TestBudget", - "type": "Microsoft.Consumption/budgets", - "eTag": "\"1d34d012214157f\"", - "properties": { - "category": "Cost", - "amount": 100.65, - "timeGrain": "Monthly", - "timePeriod": { - "startDate": "2017-10-01T00:00:00Z", - "endDate": "2018-10-31T00:00:00Z" - }, - "currentSpend": { - "amount": 80.89, - "unit": "USD" - }, - "notifications": { - "Actual_GreaterThan_80_Percent": { - "enabled": true, - "operator": "GreaterThan", - "threshold": 80, - "contactEmails": [ - "johndoe@contoso.com", - "janesmith@contoso.com" - ], - "contactRoles": [ - "Contributor", - "Reader" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/BudgetsList.json b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/BudgetsList.json deleted file mode 100644 index e642789274fa..000000000000 --- a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/BudgetsList.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "parameters": { - "api-version": "2019-03-01-preview", - "subscriptionId": "{subscription-id}" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/budgets/TestBudget", - "name": "TestBudget", - "type": "Microsoft.Consumption/budgets", - "eTag": "\"1d34d012214157f\"", - "properties": { - "category": "Cost", - "amount": 100.65, - "timeGrain": "Monthly", - "timePeriod": { - "startDate": "2017-10-01T00:00:00Z", - "endDate": "2018-10-31T00:00:00Z" - }, - "currentSpend": { - "amount": 80.89, - "unit": "USD" - }, - "notifications": { - "Actual_GreaterThan_80_Percent": { - "enabled": true, - "operator": "GreaterThan", - "threshold": 80, - "contactEmails": [ - "johndoe@contoso.com", - "janesmith@contoso.com" - ], - "contactRoles": [ - "Contributor", - "Reader" - ] - }, - "Actual_GreaterThanOrEqualTo_90_Percent": { - "enabled": true, - "operator": "GreaterThanOrEqualTo", - "threshold": 90, - "contactEmails": [ - "johndoe@contoso.com", - "janesmith@contoso.com" - ], - "contactRoles": [ - "Contributor", - "Reader" - ] - } - } - } - }, - { - "id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/budgets/TestBudget", - "name": "TestBudget", - "type": "Microsoft.Consumption/budgets", - "eTag": "\"1d34d012214157f\"", - "properties": { - "category": "Cost", - "amount": 600.65, - "timeGrain": "Monthly", - "timePeriod": { - "startDate": "2017-10-01T00:00:00Z", - "endDate": "2018-10-31T00:00:00Z" - }, - "currentSpend": { - "amount": 120.89, - "unit": "USD" - }, - "notifications": { - "Actual_GreaterThan_40_Percent": { - "enabled": true, - "operator": "GreaterThan", - "threshold": 40, - "contactEmails": [ - "johndoe@contoso.com", - "janesmith@contoso.com" - ], - "contactRoles": [ - "Contributor", - "Reader" - ] - }, - "Actual_GreaterThanOrEqualTo_60_Percent": { - "enabled": true, - "operator": "GreaterThanOrEqualTo", - "threshold": 60, - "contactEmails": [ - "johndoe@contoso.com", - "janesmith@contoso.com" - ], - "contactRoles": [ - "Contributor", - "Reader" - ] - } - } - } - } - ] - } - } - } -} \ No newline at end of file diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/CreateOrUpdateBudget.json b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/CreateOrUpdateBudget.json deleted file mode 100644 index b3cdc013c290..000000000000 --- a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/CreateOrUpdateBudget.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "parameters": { - "api-version": "2019-03-01-preview", - "subscriptionId": "{subscription-id}", - "name": "TestBudget", - "parameters": { - "eTag": "\"1d34d016a593709\"", - "properties": { - "category": "Cost", - "amount": 100.65, - "timeGrain": "Monthly", - "timePeriod": { - "startDate": "2017-10-01T00:00:00Z", - "endDate": "2018-10-31T00:00:00Z" - }, - "notifications": { - "Actual_GreaterThan_80_Percent": { - "enabled": true, - "operator": "GreaterThan", - "threshold": 80, - "contactEmails": [ - "johndoe@contoso.com", - "janesmith@contoso.com" - ], - "contactRoles": [ - "Contributor", - "Reader" - ] - } - } - } - } - }, - "responses": { - "201": { - "body": { - "id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/budgets/TestBudget", - "name": "TestBudget", - "type": "Microsoft.Consumption/budgets", - "eTag": "\"1d34d012214157f\"", - "properties": { - "category": "Cost", - "amount": 100.65, - "timeGrain": "Monthly", - "timePeriod": { - "startDate": "2017-10-01T00:00:00Z", - "endDate": "2018-10-31T00:00:00Z" - }, - "currentSpend": { - "amount": 80.89, - "unit": "USD" - }, - "notifications": { - "Actual_GreaterThan_80_Percent": { - "enabled": true, - "operator": "GreaterThan", - "threshold": 80, - "contactEmails": [ - "johndoe@contoso.com", - "janesmith@contoso.com" - ], - "contactRoles": [ - "Contributor", - "Reader" - ] - } - } - } - } - }, - "200": { - "body": { - "id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/budgets/TestBudget", - "name": "TestBudget", - "type": "Microsoft.Consumption/budgets", - "eTag": "\"1d34d012214157f\"", - "properties": { - "category": "Cost", - "amount": 100.65, - "timeGrain": "Monthly", - "timePeriod": { - "startDate": "2017-10-01T00:00:00Z", - "endDate": "2018-10-31T00:00:00Z" - }, - "currentSpend": { - "amount": 80.89, - "unit": "USD" - }, - "notifications": { - "Actual_GreaterThan_80_Percent": { - "enabled": true, - "operator": "GreaterThan", - "threshold": 80, - "contactEmails": [ - "johndoe@contoso.com", - "janesmith@contoso.com" - ], - "contactRoles": [ - "Contributor", - "Reader" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/DeleteBudget.json b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/DeleteBudget.json deleted file mode 100644 index 5ff6493f89a4..000000000000 --- a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/DeleteBudget.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "parameters": { - "api-version": "2019-03-01-preview", - "subscriptionId": "{subscription-id}", - "name": "TestBudget" - }, - "responses": { - "200": { - } - } -} \ No newline at end of file diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/Tags.json b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/Tags.json new file mode 100644 index 000000000000..3d05a43e9b20 --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/Tags.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "api-version": "2019-01-01", + "billingAccountId": "12345" + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.CostManagement/billingAccounts/{billingaccount-id}/providers/Microsoft.Consumption/tags/tags1", + "name": "tags1", + "type": "Microsoft.Consumption/tags", + "eTag": "\"1d34d012214157f\"", + "properties": { + "tags": [ + { + "key": "Department" + }, + { + "key": "CostCenter" + }, + { + "key": "Portal" + }, + { + "key": "OrgName" + }, + { + "key": "Namespace" + }, + { + "key": "resourceType" + }, + { + "key": "Subsystem" + }, + { + "key": "Environment" + }, + { + "key": "clusterName" + } + ] + } + } + } + } +} \ No newline at end of file From bfb3122ec3364e527b5ffea9861092750e57766f Mon Sep 17 00:00:00 2001 From: santoshsinha100 <45053048+santoshsinha100@users.noreply.github.com> Date: Wed, 20 Mar 2019 13:09:36 -0700 Subject: [PATCH 05/15] version fix version fix --- .../preview/2019-03-01-preview/examples/Tags.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/Tags.json b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/Tags.json index 3d05a43e9b20..2f319aca92b7 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/Tags.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/Tags.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2019-01-01", + "api-version": "2019-03-01-preview", "billingAccountId": "12345" }, "responses": { From ae0e3aaa2ef06ec0fdef0a7131e779245b2dde02 Mon Sep 17 00:00:00 2001 From: santoshsinha100 <45053048+santoshsinha100@users.noreply.github.com> Date: Wed, 20 Mar 2019 14:53:11 -0700 Subject: [PATCH 06/15] added new folder to support new versions for Tags and Budgets added new folder to support new versions for Tags and Budgets --- .../2019-03-01-preview/examples/Budget.json | 45 ++++++++ .../examples/BudgetsList.json | 108 ++++++++++++++++++ .../examples/CreateOrUpdateBudget.json | 108 ++++++++++++++++++ .../examples/DeleteBudget.json | 11 ++ 4 files changed, 272 insertions(+) create mode 100644 specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/Budget.json create mode 100644 specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/BudgetsList.json create mode 100644 specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/CreateOrUpdateBudget.json create mode 100644 specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/DeleteBudget.json diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/Budget.json b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/Budget.json new file mode 100644 index 000000000000..c77c80eddba5 --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/Budget.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "subscriptionId": "{subscription-id}", + "name": "TestBudget" + }, + "responses": { + "200": { + "body": { + "id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/budgets/TestBudget", + "name": "TestBudget", + "type": "Microsoft.Consumption/budgets", + "eTag": "\"1d34d012214157f\"", + "properties": { + "category": "Cost", + "amount": 100.65, + "timeGrain": "Monthly", + "timePeriod": { + "startDate": "2017-10-01T00:00:00Z", + "endDate": "2018-10-31T00:00:00Z" + }, + "currentSpend": { + "amount": 80.89, + "unit": "USD" + }, + "notifications": { + "Actual_GreaterThan_80_Percent": { + "enabled": true, + "operator": "GreaterThan", + "threshold": 80, + "contactEmails": [ + "johndoe@contoso.com", + "janesmith@contoso.com" + ], + "contactRoles": [ + "Contributor", + "Reader" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/BudgetsList.json b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/BudgetsList.json new file mode 100644 index 000000000000..e642789274fa --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/BudgetsList.json @@ -0,0 +1,108 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/budgets/TestBudget", + "name": "TestBudget", + "type": "Microsoft.Consumption/budgets", + "eTag": "\"1d34d012214157f\"", + "properties": { + "category": "Cost", + "amount": 100.65, + "timeGrain": "Monthly", + "timePeriod": { + "startDate": "2017-10-01T00:00:00Z", + "endDate": "2018-10-31T00:00:00Z" + }, + "currentSpend": { + "amount": 80.89, + "unit": "USD" + }, + "notifications": { + "Actual_GreaterThan_80_Percent": { + "enabled": true, + "operator": "GreaterThan", + "threshold": 80, + "contactEmails": [ + "johndoe@contoso.com", + "janesmith@contoso.com" + ], + "contactRoles": [ + "Contributor", + "Reader" + ] + }, + "Actual_GreaterThanOrEqualTo_90_Percent": { + "enabled": true, + "operator": "GreaterThanOrEqualTo", + "threshold": 90, + "contactEmails": [ + "johndoe@contoso.com", + "janesmith@contoso.com" + ], + "contactRoles": [ + "Contributor", + "Reader" + ] + } + } + } + }, + { + "id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/budgets/TestBudget", + "name": "TestBudget", + "type": "Microsoft.Consumption/budgets", + "eTag": "\"1d34d012214157f\"", + "properties": { + "category": "Cost", + "amount": 600.65, + "timeGrain": "Monthly", + "timePeriod": { + "startDate": "2017-10-01T00:00:00Z", + "endDate": "2018-10-31T00:00:00Z" + }, + "currentSpend": { + "amount": 120.89, + "unit": "USD" + }, + "notifications": { + "Actual_GreaterThan_40_Percent": { + "enabled": true, + "operator": "GreaterThan", + "threshold": 40, + "contactEmails": [ + "johndoe@contoso.com", + "janesmith@contoso.com" + ], + "contactRoles": [ + "Contributor", + "Reader" + ] + }, + "Actual_GreaterThanOrEqualTo_60_Percent": { + "enabled": true, + "operator": "GreaterThanOrEqualTo", + "threshold": 60, + "contactEmails": [ + "johndoe@contoso.com", + "janesmith@contoso.com" + ], + "contactRoles": [ + "Contributor", + "Reader" + ] + } + } + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/CreateOrUpdateBudget.json b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/CreateOrUpdateBudget.json new file mode 100644 index 000000000000..b3cdc013c290 --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/CreateOrUpdateBudget.json @@ -0,0 +1,108 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "subscriptionId": "{subscription-id}", + "name": "TestBudget", + "parameters": { + "eTag": "\"1d34d016a593709\"", + "properties": { + "category": "Cost", + "amount": 100.65, + "timeGrain": "Monthly", + "timePeriod": { + "startDate": "2017-10-01T00:00:00Z", + "endDate": "2018-10-31T00:00:00Z" + }, + "notifications": { + "Actual_GreaterThan_80_Percent": { + "enabled": true, + "operator": "GreaterThan", + "threshold": 80, + "contactEmails": [ + "johndoe@contoso.com", + "janesmith@contoso.com" + ], + "contactRoles": [ + "Contributor", + "Reader" + ] + } + } + } + } + }, + "responses": { + "201": { + "body": { + "id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/budgets/TestBudget", + "name": "TestBudget", + "type": "Microsoft.Consumption/budgets", + "eTag": "\"1d34d012214157f\"", + "properties": { + "category": "Cost", + "amount": 100.65, + "timeGrain": "Monthly", + "timePeriod": { + "startDate": "2017-10-01T00:00:00Z", + "endDate": "2018-10-31T00:00:00Z" + }, + "currentSpend": { + "amount": 80.89, + "unit": "USD" + }, + "notifications": { + "Actual_GreaterThan_80_Percent": { + "enabled": true, + "operator": "GreaterThan", + "threshold": 80, + "contactEmails": [ + "johndoe@contoso.com", + "janesmith@contoso.com" + ], + "contactRoles": [ + "Contributor", + "Reader" + ] + } + } + } + } + }, + "200": { + "body": { + "id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/budgets/TestBudget", + "name": "TestBudget", + "type": "Microsoft.Consumption/budgets", + "eTag": "\"1d34d012214157f\"", + "properties": { + "category": "Cost", + "amount": 100.65, + "timeGrain": "Monthly", + "timePeriod": { + "startDate": "2017-10-01T00:00:00Z", + "endDate": "2018-10-31T00:00:00Z" + }, + "currentSpend": { + "amount": 80.89, + "unit": "USD" + }, + "notifications": { + "Actual_GreaterThan_80_Percent": { + "enabled": true, + "operator": "GreaterThan", + "threshold": 80, + "contactEmails": [ + "johndoe@contoso.com", + "janesmith@contoso.com" + ], + "contactRoles": [ + "Contributor", + "Reader" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/DeleteBudget.json b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/DeleteBudget.json new file mode 100644 index 000000000000..5ff6493f89a4 --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/DeleteBudget.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "subscriptionId": "{subscription-id}", + "name": "TestBudget" + }, + "responses": { + "200": { + } + } +} \ No newline at end of file From 9b640ab034c64e2b76e554a1da5165449e2b0e16 Mon Sep 17 00:00:00 2001 From: santoshsinha100 <45053048+santoshsinha100@users.noreply.github.com> Date: Wed, 20 Mar 2019 15:29:45 -0700 Subject: [PATCH 07/15] Cleanup consumption file Cleanup consumption file --- .../2019-03-01-preview/consumption.json | 429 ++---------------- .../2019-03-01-preview/examples/Budget.json | 45 -- .../examples/BudgetsList.json | 108 ----- .../examples/CreateOrUpdateBudget.json | 108 ----- .../examples/DeleteBudget.json | 11 - 5 files changed, 35 insertions(+), 666 deletions(-) delete mode 100644 specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/Budget.json delete mode 100644 specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/BudgetsList.json delete mode 100644 specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/CreateOrUpdateBudget.json delete mode 100644 specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/DeleteBudget.json diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/consumption.json b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/consumption.json index 47e4df442f02..ea7379b794cf 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/consumption.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/consumption.json @@ -43,176 +43,36 @@ } }, "paths": { - "/subscriptions/{subscriptionId}/providers/Microsoft.Consumption/budgets": { + "/{scope}/providers/Microsoft.Consumption/tags": { "get": { "tags": [ - "Budgets-Preview" + "Tags" ], - "operationId": "Budgets_List", - "description": "Lists all budgets for a subscription.", + "operationId": "Tags_Get", + "description": "Get all available tag keys for the defined scope", "externalDocs": { "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" }, "x-ms-examples": { - "BudgetsList": { - "$ref": "./examples/BudgetsList.json" + "Tags_Get": { + "$ref": "./examples/Tags.json" } }, "parameters": [ { - "$ref": "#/parameters/apiVersionParameter" - }, - { - "$ref": "#/parameters/subscriptionIdParameter" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/BudgetsListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - }, - "x-ms-pageable": { - "nextLinkName": null - } - } - }, - "/subscriptions/{subscriptionId}/providers/Microsoft.Consumption/budgets/{name}": { - "get": { - "tags": [ - "Budgets-Preview" - ], - "operationId": "Budgets_Get", - "description": "Gets the budget for a subscription by budget name.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" - }, - "x-ms-examples": { - "Budget": { - "$ref": "./examples/Budget.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/apiVersionParameter" - }, - { - "$ref": "#/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/parameters/budgetNameParameter" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/Budget" - } + "$ref": "#/parameters/scopeTagsParameter" }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - }, - "put": { - "tags": [ - "Budgets-Preview" - ], - "operationId": "Budgets_CreateOrUpdate", - "description": "The operation to create or update a budget. Update operation requires latest eTag to be set in the request mandatorily. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" - }, - "x-ms-examples": { - "CreateOrUpdateBudget": { - "$ref": "./examples/CreateOrUpdateBudget.json" - } - }, - "parameters": [ { "$ref": "#/parameters/apiVersionParameter" - }, - { - "$ref": "#/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/parameters/budgetNameParameter" - }, - { - "name": "parameters", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/Budget" - }, - "description": "Parameters supplied to the Create Budget operation." } ], "responses": { "200": { "description": "OK. The request has succeeded.", "schema": { - "$ref": "#/definitions/Budget" + "$ref": "#/definitions/TagsResult" } }, - "201": { - "description": "Created.", - "schema": { - "$ref": "#/definitions/Budget" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - }, - "x-ms-pageable": { - "nextLinkName": null - } - }, - "delete": { - "tags": [ - "Budgets-Preview" - ], - "operationId": "Budgets_Delete", - "description": "The operation to delete a budget.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" - }, - "x-ms-examples": { - "DeleteBudget": { - "$ref": "./examples/DeleteBudget.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/apiVersionParameter" - }, - { - "$ref": "#/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/parameters/budgetNameParameter" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded." - }, "default": { "description": "Error response describing why the operation failed.", "schema": { @@ -220,56 +80,12 @@ } } } - } - }, - "/providers/Microsoft.Consumption/operations": { - "get": { - "tags": [ - "Operations" - ], - "operationId": "Operations_List", - "description": "Lists all of the available consumption REST API operations.", - "parameters": [ - { - "$ref": "#/parameters/apiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/OperationListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - } - }, - "definitions": { - "BudgetsListResult": { - "description": "Result of listing budgets. It contains a list of available budgets in the scope provided.", - "properties": { - "value": { - "description": "The list of budgets.", - "type": "array", - "readOnly": true, - "items": { - "$ref": "#/definitions/Budget" - } - } - } - }, - "Budget": { - "description": "A budget resource.", + } + } +}, + "definitions": { + "TagsResult": { + "description": "A resource listing all tags.", "type": "object", "allOf": [ { @@ -279,198 +95,29 @@ "properties": { "properties": { "x-ms-client-flatten": true, - "$ref": "#/definitions/BudgetProperties", - "title": "Budget properties" + "$ref": "#/definitions/TagProperties", + "title": "Tag properties" } } }, - "BudgetProperties": { - "description": "The properties of the budget.", - "properties": { - "category": { - "description": "The category of the budget, whether the budget tracks cost or something else.", - "type": "string", - "enum": [ - "Cost" - ], - "x-ms-enum": { - "name": "CategoryType", - "modelAsString": true - } - }, - "amount": { - "description": "The total amount of cost to track with the budget", - "type": "number", - "format": "decimal" - }, - "timeGrain": { - "description": "The time covered by a budget. Tracking of the amount will be reset based on the time grain.", - "type": "string", - "enum": [ - "Monthly", - "Quarterly", - "Annually" - ], - "x-ms-enum": { - "name": "TimeGrainType", - "modelAsString": true - } - }, - "timePeriod": { - "description": "Has start and end date of the budget. The start date must be first of the month and should be less than the end date. Budget start date must be on or after June 1, 2017. Future start date should not be more than three months. Past start date should be selected within the timegrain period. There are no restrictions on the end date.", - "$ref": "#/definitions/BudgetTimePeriod" - }, - "currentSpend": { - "description": "The current amount of cost which is being tracked for a budget.", - "$ref": "#/definitions/CurrentSpend", - "readOnly": true - }, - "notifications": { - "type": "object", - "description": "Dictionary of notifications associated with the budget. Budget can have up to five notifications.", - "additionalProperties": { - "type": "object", - "$ref": "#/definitions/Notification" - }, - "maxItems": 5 - } - }, - "required": [ - "category", - "amount", - "timeGrain", - "timePeriod" - ] - }, - "BudgetTimePeriod": { - "description": "The start and end date for a budget.", + "TagProperties": { + "description": "The properties of the tag.", "properties": { - "startDate": { - "description": "The start date for the budget.", - "type": "string", - "format": "date-time" - }, - "endDate": { - "description": "The end date for the budget. If not provided, we default this to 10 years from the start date.", - "type": "string", - "format": "date-time" - } - }, - "required": [ - "startDate" - ] - }, - "CurrentSpend": { - "description": "The current amount of cost which is being tracked for a budget.", - "properties": { - "amount": { - "description": "The total amount of cost which is being tracked by the budget.", - "type": "number", - "format": "decimal", - "readOnly": true - }, - "unit": { - "description": "The unit of measure for the budget amount.", - "type": "string", - "readOnly": true - } - } - }, - "Notification": { - "description": "The notification associated with a budget.", - "properties": { - "enabled": { - "description": "The notification is enabled or not.", - "type": "boolean" - }, - "operator": { - "description": "The comparison operator.", - "type": "string", - "enum": [ - "EqualTo", - "GreaterThan", - "GreaterThanOrEqualTo" - ], - "x-ms-enum": { - "name": "OperatorType", - "modelAsString": true - } - }, - "threshold": { - "description": "Threshold value associated with a notification. Notification is sent when the cost exceeded the threshold. It is always percent and has to be between 0 and 1000.", - "type": "number", - "format": "decimal" - }, - "contactEmails": { - "description": "Email addresses to send the budget notification to when the threshold is exceeded.", + "tags": { + "description": "A list of Tag.", "type": "array", "items": { - "type": "string" - }, - "minItems": 1, - "maxItems": 50 - }, - "contactRoles": { - "description": "Contact roles to send the budget notification to when the threshold is exceeded.", - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "enabled", - "operator", - "threshold", - "contactEmails" - ] - }, - "Operation": { - "description": "A Consumption REST API operation.", - "type": "object", - "properties": { - "name": { - "description": "Operation name: {provider}/{resource}/{operation}.", - "type": "string", - "readOnly": true - }, - "display": { - "description": "The object that represents the operation.", - "properties": { - "provider": { - "description": "Service provider: Microsoft.Consumption.", - "type": "string", - "readOnly": true - }, - "resource": { - "description": "Resource on which the operation is performed: UsageDetail, etc.", - "type": "string", - "readOnly": true - }, - "operation": { - "description": "Operation type: Read, write, delete, etc.", - "type": "string", - "readOnly": true - } + "$ref": "#/definitions/Tag" } } } }, - "OperationListResult": { - "description": "Result of listing consumption operations. It contains a list of operations and a URL link to get the next set of results.", + "Tag": { + "description": "The tag resource.", "properties": { - "value": { - "description": "List of consumption operations supported by the Microsoft.Consumption resource provider.", - "type": "array", - "readOnly": true, - "items": { - "$ref": "#/definitions/Operation" - } - }, - "nextLink": { - "description": "URL to get the next set of operation list results if there are any.", - "type": "string", - "readOnly": true + "key": { + "description": "Tag key.", + "type": "string" } } }, @@ -526,27 +173,21 @@ } }, "parameters": { + "scopeTagsParameter": { + "name": "scope", + "in": "path", + "required": true, + "type": "string", + "description": "The scope associated with tags operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope and '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope..", + "x-ms-parameter-location": "method", + "x-ms-skip-url-encoding": true + }, "apiVersionParameter": { "name": "api-version", "in": "query", "required": true, "type": "string", "description": "Version of the API to be used with the client request. The current version is 2019-03-01-preview." - }, - "subscriptionIdParameter": { - "name": "subscriptionId", - "in": "path", - "description": "Azure Subscription ID.", - "required": true, - "type": "string" - }, - "budgetNameParameter": { - "name": "name", - "in": "path", - "description": "Budget name.", - "required": true, - "type": "string", - "x-ms-parameter-location": "client" } } } \ No newline at end of file diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/Budget.json b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/Budget.json deleted file mode 100644 index c77c80eddba5..000000000000 --- a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/Budget.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "parameters": { - "api-version": "2019-03-01-preview", - "subscriptionId": "{subscription-id}", - "name": "TestBudget" - }, - "responses": { - "200": { - "body": { - "id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/budgets/TestBudget", - "name": "TestBudget", - "type": "Microsoft.Consumption/budgets", - "eTag": "\"1d34d012214157f\"", - "properties": { - "category": "Cost", - "amount": 100.65, - "timeGrain": "Monthly", - "timePeriod": { - "startDate": "2017-10-01T00:00:00Z", - "endDate": "2018-10-31T00:00:00Z" - }, - "currentSpend": { - "amount": 80.89, - "unit": "USD" - }, - "notifications": { - "Actual_GreaterThan_80_Percent": { - "enabled": true, - "operator": "GreaterThan", - "threshold": 80, - "contactEmails": [ - "johndoe@contoso.com", - "janesmith@contoso.com" - ], - "contactRoles": [ - "Contributor", - "Reader" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/BudgetsList.json b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/BudgetsList.json deleted file mode 100644 index e642789274fa..000000000000 --- a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/BudgetsList.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "parameters": { - "api-version": "2019-03-01-preview", - "subscriptionId": "{subscription-id}" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/budgets/TestBudget", - "name": "TestBudget", - "type": "Microsoft.Consumption/budgets", - "eTag": "\"1d34d012214157f\"", - "properties": { - "category": "Cost", - "amount": 100.65, - "timeGrain": "Monthly", - "timePeriod": { - "startDate": "2017-10-01T00:00:00Z", - "endDate": "2018-10-31T00:00:00Z" - }, - "currentSpend": { - "amount": 80.89, - "unit": "USD" - }, - "notifications": { - "Actual_GreaterThan_80_Percent": { - "enabled": true, - "operator": "GreaterThan", - "threshold": 80, - "contactEmails": [ - "johndoe@contoso.com", - "janesmith@contoso.com" - ], - "contactRoles": [ - "Contributor", - "Reader" - ] - }, - "Actual_GreaterThanOrEqualTo_90_Percent": { - "enabled": true, - "operator": "GreaterThanOrEqualTo", - "threshold": 90, - "contactEmails": [ - "johndoe@contoso.com", - "janesmith@contoso.com" - ], - "contactRoles": [ - "Contributor", - "Reader" - ] - } - } - } - }, - { - "id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/budgets/TestBudget", - "name": "TestBudget", - "type": "Microsoft.Consumption/budgets", - "eTag": "\"1d34d012214157f\"", - "properties": { - "category": "Cost", - "amount": 600.65, - "timeGrain": "Monthly", - "timePeriod": { - "startDate": "2017-10-01T00:00:00Z", - "endDate": "2018-10-31T00:00:00Z" - }, - "currentSpend": { - "amount": 120.89, - "unit": "USD" - }, - "notifications": { - "Actual_GreaterThan_40_Percent": { - "enabled": true, - "operator": "GreaterThan", - "threshold": 40, - "contactEmails": [ - "johndoe@contoso.com", - "janesmith@contoso.com" - ], - "contactRoles": [ - "Contributor", - "Reader" - ] - }, - "Actual_GreaterThanOrEqualTo_60_Percent": { - "enabled": true, - "operator": "GreaterThanOrEqualTo", - "threshold": 60, - "contactEmails": [ - "johndoe@contoso.com", - "janesmith@contoso.com" - ], - "contactRoles": [ - "Contributor", - "Reader" - ] - } - } - } - } - ] - } - } - } -} \ No newline at end of file diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/CreateOrUpdateBudget.json b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/CreateOrUpdateBudget.json deleted file mode 100644 index b3cdc013c290..000000000000 --- a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/CreateOrUpdateBudget.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "parameters": { - "api-version": "2019-03-01-preview", - "subscriptionId": "{subscription-id}", - "name": "TestBudget", - "parameters": { - "eTag": "\"1d34d016a593709\"", - "properties": { - "category": "Cost", - "amount": 100.65, - "timeGrain": "Monthly", - "timePeriod": { - "startDate": "2017-10-01T00:00:00Z", - "endDate": "2018-10-31T00:00:00Z" - }, - "notifications": { - "Actual_GreaterThan_80_Percent": { - "enabled": true, - "operator": "GreaterThan", - "threshold": 80, - "contactEmails": [ - "johndoe@contoso.com", - "janesmith@contoso.com" - ], - "contactRoles": [ - "Contributor", - "Reader" - ] - } - } - } - } - }, - "responses": { - "201": { - "body": { - "id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/budgets/TestBudget", - "name": "TestBudget", - "type": "Microsoft.Consumption/budgets", - "eTag": "\"1d34d012214157f\"", - "properties": { - "category": "Cost", - "amount": 100.65, - "timeGrain": "Monthly", - "timePeriod": { - "startDate": "2017-10-01T00:00:00Z", - "endDate": "2018-10-31T00:00:00Z" - }, - "currentSpend": { - "amount": 80.89, - "unit": "USD" - }, - "notifications": { - "Actual_GreaterThan_80_Percent": { - "enabled": true, - "operator": "GreaterThan", - "threshold": 80, - "contactEmails": [ - "johndoe@contoso.com", - "janesmith@contoso.com" - ], - "contactRoles": [ - "Contributor", - "Reader" - ] - } - } - } - } - }, - "200": { - "body": { - "id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/budgets/TestBudget", - "name": "TestBudget", - "type": "Microsoft.Consumption/budgets", - "eTag": "\"1d34d012214157f\"", - "properties": { - "category": "Cost", - "amount": 100.65, - "timeGrain": "Monthly", - "timePeriod": { - "startDate": "2017-10-01T00:00:00Z", - "endDate": "2018-10-31T00:00:00Z" - }, - "currentSpend": { - "amount": 80.89, - "unit": "USD" - }, - "notifications": { - "Actual_GreaterThan_80_Percent": { - "enabled": true, - "operator": "GreaterThan", - "threshold": 80, - "contactEmails": [ - "johndoe@contoso.com", - "janesmith@contoso.com" - ], - "contactRoles": [ - "Contributor", - "Reader" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/DeleteBudget.json b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/DeleteBudget.json deleted file mode 100644 index 5ff6493f89a4..000000000000 --- a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/DeleteBudget.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "parameters": { - "api-version": "2019-03-01-preview", - "subscriptionId": "{subscription-id}", - "name": "TestBudget" - }, - "responses": { - "200": { - } - } -} \ No newline at end of file From 0401a1516b582f92637b7b05e01653fae806a0b8 Mon Sep 17 00:00:00 2001 From: santoshsinha100 <45053048+santoshsinha100@users.noreply.github.com> Date: Wed, 20 Mar 2019 15:41:37 -0700 Subject: [PATCH 08/15] schema correction schema correction --- .../2019-03-01-preview/consumption.json | 19 +++++-------------- .../2019-03-01-preview/examples/Tags.json | 4 ++-- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/consumption.json b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/consumption.json index ea7379b794cf..72d1f4e8b61c 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/consumption.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/consumption.json @@ -21,16 +21,7 @@ "user_impersonation" ] } - ], - "tags": [ - { - "name": "Budgets-Preview", - "description": "Perform CRUD (Create, Update, Read, Delete) operations on the budget entity at the Subscription scope.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" - } - } - ], + ], "securityDefinitions": { "azure_auth": { "type": "oauth2", @@ -40,7 +31,7 @@ "scopes": { "user_impersonation": "impersonate your user account" } - } + } }, "paths": { "/{scope}/providers/Microsoft.Consumption/tags": { @@ -80,9 +71,9 @@ } } } - } - } -}, + } + } + }, "definitions": { "TagsResult": { "description": "A resource listing all tags.", diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/Tags.json b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/Tags.json index 2f319aca92b7..3e85a3818468 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/Tags.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/Tags.json @@ -1,7 +1,7 @@ { "parameters": { - "api-version": "2019-03-01-preview", - "billingAccountId": "12345" + "api-version": "2019-01-01", + "billingAccountId": "123456" }, "responses": { "200": { From ce365f8ab0976bf1005a9bb80a3768a6b40949dc Mon Sep 17 00:00:00 2001 From: santoshsinha100 <45053048+santoshsinha100@users.noreply.github.com> Date: Wed, 20 Mar 2019 16:11:59 -0700 Subject: [PATCH 09/15] schema correction for Tags schema correction for Tags --- .../2019-03-01-preview/consumption.json | 29 ++++--------------- .../2019-03-01-preview/examples/Tags.json | 24 ++++----------- 2 files changed, 12 insertions(+), 41 deletions(-) diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/consumption.json b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/consumption.json index 72d1f4e8b61c..f47ceee817d8 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/consumption.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/consumption.json @@ -21,7 +21,7 @@ "user_impersonation" ] } - ], + ], "securityDefinitions": { "azure_auth": { "type": "oauth2", @@ -31,10 +31,10 @@ "scopes": { "user_impersonation": "impersonate your user account" } - } + } }, "paths": { - "/{scope}/providers/Microsoft.Consumption/tags": { + "/providers/Microsoft.billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/tags": { "get": { "tags": [ "Tags" @@ -48,15 +48,7 @@ "Tags_Get": { "$ref": "./examples/Tags.json" } - }, - "parameters": [ - { - "$ref": "#/parameters/scopeTagsParameter" - }, - { - "$ref": "#/parameters/apiVersionParameter" - } - ], + }, "responses": { "200": { "description": "OK. The request has succeeded.", @@ -74,7 +66,7 @@ } } }, - "definitions": { + "definitions": { "TagsResult": { "description": "A resource listing all tags.", "type": "object", @@ -163,16 +155,7 @@ "x-ms-azure-resource": true } }, - "parameters": { - "scopeTagsParameter": { - "name": "scope", - "in": "path", - "required": true, - "type": "string", - "description": "The scope associated with tags operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope and '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope..", - "x-ms-parameter-location": "method", - "x-ms-skip-url-encoding": true - }, + "parameters": { "apiVersionParameter": { "name": "api-version", "in": "query", diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/Tags.json b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/Tags.json index 3e85a3818468..6db9be55d65d 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/Tags.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/Tags.json @@ -6,38 +6,26 @@ "responses": { "200": { "body": { - "id": "providers/Microsoft.CostManagement/billingAccounts/{billingaccount-id}/providers/Microsoft.Consumption/tags/tags1", + "id": "providers/Microsoft.Billing/billingAccounts/{billingaccount-id}/providers/Microsoft.Consumption/tags/tags1", "name": "tags1", "type": "Microsoft.Consumption/tags", "eTag": "\"1d34d012214157f\"", "properties": { "tags": [ { - "key": "Department" + "key": "created_at" }, { - "key": "CostCenter" + "key": "id" }, { - "key": "Portal" + "key": "name" }, { - "key": "OrgName" + "key": "instance_group" }, { - "key": "Namespace" - }, - { - "key": "resourceType" - }, - { - "key": "Subsystem" - }, - { - "key": "Environment" - }, - { - "key": "clusterName" + "key": "job" } ] } From f9e8349a94ba23d3e7b55261fa91bfc13ae41e76 Mon Sep 17 00:00:00 2001 From: santoshsinha100 <45053048+santoshsinha100@users.noreply.github.com> Date: Wed, 20 Mar 2019 16:15:50 -0700 Subject: [PATCH 10/15] correction consumtion.json correction consumtion.json --- .../preview/2019-03-01-preview/consumption.json | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/consumption.json b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/consumption.json index f47ceee817d8..cef43033455b 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/consumption.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/consumption.json @@ -48,7 +48,15 @@ "Tags_Get": { "$ref": "./examples/Tags.json" } - }, + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountIdParameter" + } + ], "responses": { "200": { "description": "OK. The request has succeeded.", From 3ef4e5d408979fc6bc5eee4efc8c6385a6514c61 Mon Sep 17 00:00:00 2001 From: santoshsinha100 <45053048+santoshsinha100@users.noreply.github.com> Date: Wed, 20 Mar 2019 16:20:55 -0700 Subject: [PATCH 11/15] correction in syntax correction in syntax --- .../preview/2019-03-01-preview/consumption.json | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/consumption.json b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/consumption.json index cef43033455b..0b936cfb6956 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/consumption.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/consumption.json @@ -49,7 +49,7 @@ "$ref": "./examples/Tags.json" } }, - "parameters": [ + "parameters": [ { "$ref": "#/parameters/apiVersionParameter" }, @@ -170,6 +170,14 @@ "required": true, "type": "string", "description": "Version of the API to be used with the client request. The current version is 2019-03-01-preview." + }, + "billingAccountIdParameter": { + "name": "billingAccountId", + "in": "path", + "description": "BillingAccount ID", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" } } } \ No newline at end of file From a38043f4f8f976b88073f297f40259fb4db56f35 Mon Sep 17 00:00:00 2001 From: santoshsinha100 <45053048+santoshsinha100@users.noreply.github.com> Date: Wed, 20 Mar 2019 16:36:36 -0700 Subject: [PATCH 12/15] correction corrections --- .../2019-03-01-preview/consumption.json | 82 ++++++++++++++++++- 1 file changed, 81 insertions(+), 1 deletion(-) diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/consumption.json b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/consumption.json index 0b936cfb6956..2edd73974180 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/consumption.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/consumption.json @@ -33,7 +33,38 @@ } } }, - "paths": { + "paths": { + "/providers/Microsoft.Consumption/operations": { + "get": { + "tags": [ + "Operations" + ], + "operationId": "Operations_List", + "description": "Lists all of the available consumption REST API operations.", + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/OperationListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, "/providers/Microsoft.billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/tags": { "get": { "tags": [ @@ -75,6 +106,55 @@ } }, "definitions": { + "Operation": { + "description": "A Consumption REST API operation.", + "type": "object", + "properties": { + "name": { + "description": "Operation name: {provider}/{resource}/{operation}.", + "type": "string", + "readOnly": true + }, + "display": { + "description": "The object that represents the operation.", + "properties": { + "provider": { + "description": "Service provider: Microsoft.Consumption.", + "type": "string", + "readOnly": true + }, + "resource": { + "description": "Resource on which the operation is performed: UsageDetail, etc.", + "type": "string", + "readOnly": true + }, + "operation": { + "description": "Operation type: Read, write, delete, etc.", + "type": "string", + "readOnly": true + } + } + } + } + }, + "OperationListResult": { + "description": "Result of listing consumption operations. It contains a list of operations and a URL link to get the next set of results.", + "properties": { + "value": { + "description": "List of consumption operations supported by the Microsoft.Consumption resource provider.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/Operation" + } + }, + "nextLink": { + "description": "URL to get the next set of operation list results if there are any.", + "type": "string", + "readOnly": true + } + } + }, "TagsResult": { "description": "A resource listing all tags.", "type": "object", From 0e380aeda5aed2170a63106a95950b7f9f47a174 Mon Sep 17 00:00:00 2001 From: santoshsinha100 <45053048+santoshsinha100@users.noreply.github.com> Date: Wed, 20 Mar 2019 16:44:18 -0700 Subject: [PATCH 13/15] Preview is not required for tags latest version Preview is not required for tags latest version --- .../2019-03-01-preview/consumption.json | 263 ------------------ .../2019-03-01-preview/examples/Tags.json | 35 --- 2 files changed, 298 deletions(-) delete mode 100644 specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/consumption.json delete mode 100644 specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/Tags.json diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/consumption.json b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/consumption.json deleted file mode 100644 index 2edd73974180..000000000000 --- a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/consumption.json +++ /dev/null @@ -1,263 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "version": "2019-03-01-preview", - "title": "ConsumptionManagementClient", - "description": "Consumption management client provides access to consumption resources for Azure Enterprise Subscriptions." - }, - "host": "management.azure.com", - "schemes": [ - "https" - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "security": [ - { - "azure_auth": [ - "user_impersonation" - ] - } - ], - "securityDefinitions": { - "azure_auth": { - "type": "oauth2", - "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", - "flow": "implicit", - "description": "Azure Active Directory OAuth2 Flow.", - "scopes": { - "user_impersonation": "impersonate your user account" - } - } - }, - "paths": { - "/providers/Microsoft.Consumption/operations": { - "get": { - "tags": [ - "Operations" - ], - "operationId": "Operations_List", - "description": "Lists all of the available consumption REST API operations.", - "parameters": [ - { - "$ref": "#/parameters/apiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/OperationListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/providers/Microsoft.billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/tags": { - "get": { - "tags": [ - "Tags" - ], - "operationId": "Tags_Get", - "description": "Get all available tag keys for the defined scope", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" - }, - "x-ms-examples": { - "Tags_Get": { - "$ref": "./examples/Tags.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/apiVersionParameter" - }, - { - "$ref": "#/parameters/billingAccountIdParameter" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/TagsResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - } - }, - "definitions": { - "Operation": { - "description": "A Consumption REST API operation.", - "type": "object", - "properties": { - "name": { - "description": "Operation name: {provider}/{resource}/{operation}.", - "type": "string", - "readOnly": true - }, - "display": { - "description": "The object that represents the operation.", - "properties": { - "provider": { - "description": "Service provider: Microsoft.Consumption.", - "type": "string", - "readOnly": true - }, - "resource": { - "description": "Resource on which the operation is performed: UsageDetail, etc.", - "type": "string", - "readOnly": true - }, - "operation": { - "description": "Operation type: Read, write, delete, etc.", - "type": "string", - "readOnly": true - } - } - } - } - }, - "OperationListResult": { - "description": "Result of listing consumption operations. It contains a list of operations and a URL link to get the next set of results.", - "properties": { - "value": { - "description": "List of consumption operations supported by the Microsoft.Consumption resource provider.", - "type": "array", - "readOnly": true, - "items": { - "$ref": "#/definitions/Operation" - } - }, - "nextLink": { - "description": "URL to get the next set of operation list results if there are any.", - "type": "string", - "readOnly": true - } - } - }, - "TagsResult": { - "description": "A resource listing all tags.", - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/ProxyResource" - } - ], - "properties": { - "properties": { - "x-ms-client-flatten": true, - "$ref": "#/definitions/TagProperties", - "title": "Tag properties" - } - } - }, - "TagProperties": { - "description": "The properties of the tag.", - "properties": { - "tags": { - "description": "A list of Tag.", - "type": "array", - "items": { - "$ref": "#/definitions/Tag" - } - } - } - }, - "Tag": { - "description": "The tag resource.", - "properties": { - "key": { - "description": "Tag key.", - "type": "string" - } - } - }, - "ErrorDetails": { - "description": "The details of the error.", - "properties": { - "code": { - "description": "Error code.", - "type": "string", - "readOnly": true - }, - "message": { - "description": "Error message indicating why the operation failed.", - "type": "string", - "readOnly": true - } - } - }, - "ErrorResponse": { - "description": "Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.", - "type": "object", - "properties": { - "error": { - "description": "The details of the error.", - "$ref": "#/definitions/ErrorDetails" - } - } - }, - "ProxyResource": { - "description": "The Resource model definition.", - "properties": { - "id": { - "readOnly": true, - "type": "string", - "description": "Resource Id." - }, - "name": { - "readOnly": true, - "type": "string", - "description": "Resource name." - }, - "type": { - "readOnly": true, - "type": "string", - "description": "Resource type." - }, - "eTag": { - "type": "string", - "description": "eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not." - } - }, - "x-ms-azure-resource": true - } - }, - "parameters": { - "apiVersionParameter": { - "name": "api-version", - "in": "query", - "required": true, - "type": "string", - "description": "Version of the API to be used with the client request. The current version is 2019-03-01-preview." - }, - "billingAccountIdParameter": { - "name": "billingAccountId", - "in": "path", - "description": "BillingAccount ID", - "required": true, - "type": "string", - "x-ms-parameter-location": "method" - } - } -} \ No newline at end of file diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/Tags.json b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/Tags.json deleted file mode 100644 index 6db9be55d65d..000000000000 --- a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2019-03-01-preview/examples/Tags.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "parameters": { - "api-version": "2019-01-01", - "billingAccountId": "123456" - }, - "responses": { - "200": { - "body": { - "id": "providers/Microsoft.Billing/billingAccounts/{billingaccount-id}/providers/Microsoft.Consumption/tags/tags1", - "name": "tags1", - "type": "Microsoft.Consumption/tags", - "eTag": "\"1d34d012214157f\"", - "properties": { - "tags": [ - { - "key": "created_at" - }, - { - "key": "id" - }, - { - "key": "name" - }, - { - "key": "instance_group" - }, - { - "key": "job" - } - ] - } - } - } - } -} \ No newline at end of file From eda653d26bdd03096d931da6676c4a962ae110ab Mon Sep 17 00:00:00 2001 From: santoshsinha100 <45053048+santoshsinha100@users.noreply.github.com> Date: Tue, 14 May 2019 12:49:16 -0700 Subject: [PATCH 14/15] Update consumption.json Modified the description to remove resource group from scope for usagedetails and Marketplace --- .../Microsoft.Consumption/stable/2019-01-01/consumption.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2019-01-01/consumption.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2019-01-01/consumption.json index cd04975c9a91..bfce5c8a031b 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2019-01-01/consumption.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2019-01-01/consumption.json @@ -2781,7 +2781,7 @@ "in": "path", "required": true, "type": "string", - "description": "The scope associated with usage details operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope and '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope. For subscription, billing account, department, enrollment account and management group, you can also add billing period to the scope using '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to specify billing period at department scope use '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'", + "description": "The scope associated with usage details operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope and '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope. For subscription, billing account, department, enrollment account and management group, you can also add billing period to the scope using '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to specify billing period at department scope use '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'", "x-ms-parameter-location": "method", "x-ms-skip-url-encoding": true }, @@ -2790,7 +2790,7 @@ "in": "path", "required": true, "type": "string", - "description": "The scope associated with marketplace operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope and '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope. For subscription, billing account, department, enrollment account and ManagementGroup, you can also add billing period to the scope using '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to specify billing period at department scope use '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'", + "description": "The scope associated with marketplace operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope and '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope. For subscription, billing account, department, enrollment account and ManagementGroup, you can also add billing period to the scope using '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to specify billing period at department scope use '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'", "x-ms-parameter-location": "method", "x-ms-skip-url-encoding": true }, From 2e3eea16500055837b7f91509dbf7814aa85a98d Mon Sep 17 00:00:00 2001 From: santoshsinha100 <45053048+santoshsinha100@users.noreply.github.com> Date: Tue, 14 May 2019 12:58:07 -0700 Subject: [PATCH 15/15] Update readme.md --- .../consumption/resource-manager/readme.md | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/specification/consumption/resource-manager/readme.md b/specification/consumption/resource-manager/readme.md index 04a934508cfd..b44a220403a0 100644 --- a/specification/consumption/resource-manager/readme.md +++ b/specification/consumption/resource-manager/readme.md @@ -26,18 +26,27 @@ These are the global settings for the Consumption API. ``` yaml openapi-type: arm -tag: package-preview-2019-03 +tag: package-preview-2019-04 ``` -### Tag: package-preview-2019-03 +### Tag: package-preview-2019-04 -These settings apply only when `--tag=package-preview-2019-03` is specified on the command line. +These settings apply only when `--tag=package-preview-2019-04` is specified on the command line. -```yaml $(tag) == 'package-preview-2019-03' +```yaml $(tag) == 'package-preview-2019-04' input-file: - - Microsoft.Consumption/preview/2019-03-01-preview/consumption.json + - Microsoft.Consumption/preview/2019-04-01-preview/consumption.json ``` +### Tag: package-preview-2018-11 + +These settings apply only when `--tag=package-preview-2018-11` is specified on the command line. + +``` yaml $(tag) == 'package-preview-2018-11' +input-file: + - Microsoft.Consumption/preview/2018-11-01-preview/consumption.json +``` + ### Tag: package-2019-01 These settings apply only when `--tag=package-2019-01` is specified on the command line. @@ -386,4 +395,4 @@ java: output-folder: $(azure-libraries-for-java-folder)/consumption/resource-manager/v2019_01_01 regenerate-manager: true generate-interface: true -``` +``` \ No newline at end of file