diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2018-12-01-preview/consumption.json b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2018-12-01-preview/consumption.json new file mode 100644 index 000000000000..d7a1899ab5ef --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2018-12-01-preview/consumption.json @@ -0,0 +1,969 @@ +{ + "swagger": "2.0", + "info": { + "version": "2018-10-01", + "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.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/budgets": { + "get": { + "tags": [ + "Budgets" + ], + "operationId": "Budgets_ListByBillingAccount", + "description": "Lists all budgets for a billing account.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "BudgetsList": { + "$ref": "./examples/BudgetsListForBillingAccount.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountIdParameter" + } + ], + "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": "nextLink" + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.Consumption/budgets": { + "get": { + "tags": [ + "Budgets" + ], + "operationId": "Budgets_ListByBillingProfile", + "description": "Lists all budgets for a billing profile.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "BudgetsList": { + "$ref": "./examples/BudgetsListForBillingProfile.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountIdParameter" + }, + { + "$ref": "#/parameters/billingProfileIdParameter" + } + ], + "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": "nextLink" + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}/providers/Microsoft.Consumption/budgets": { + "get": { + "tags": [ + "Budgets" + ], + "operationId": "Budgets_ListByInvoiceSection", + "description": "Lists all budgets for an invoice section.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "BudgetsList": { + "$ref": "./examples/BudgetsListForInvoiceSection.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountIdParameter" + }, + { + "$ref": "#/parameters/invoiceSectionIdParameter" + } + ], + "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": "nextLink" + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/budgets/{budgetName}": { + "get": { + "tags": [ + "Budgets" + ], + "operationId": "Budgets_GetByBillingAccount", + "description": "Gets the budget for a billing account by budget name.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "BudgetGet": { + "$ref": "./examples/BudgetGetForBillingAccount.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountIdParameter" + }, + { + "$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" + ], + "operationId": "Budgets_CreateOrUpdateForBillingAccount", + "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": { + "BudgetCreateOrUpdate": { + "$ref": "./examples/BudgetCreateOrUpdateForBillingAccount.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountIdParameter" + }, + { + "$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" + } + } + } + }, + "delete": { + "tags": [ + "Budgets" + ], + "operationId": "Budgets_DeleteForBillingAccount", + "description": "The operation to delete a budget for a billing account.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "BudgetDelete": { + "$ref": "./examples/BudgetDeleteForBillingAccount.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountIdParameter" + }, + { + "$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.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.Consumption/budgets/{budgetName}": { + "get": { + "tags": [ + "Budgets" + ], + "operationId": "Budgets_GetByBillingProfile", + "description": "Gets the budget for a billing profile by budget name.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "BudgetGet": { + "$ref": "./examples/BudgetGetForBillingProfile.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountIdParameter" + }, + { + "$ref": "#/parameters/billingProfileIdParameter" + }, + { + "$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" + ], + "operationId": "Budgets_CreateOrUpdateForBillingProfile", + "description": "The operation to create or update a budget for a billing profile. 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": { + "BudgetCreateOrUpdate": { + "$ref": "./examples/BudgetCreateOrUpdateForBillingProfile.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountIdParameter" + }, + { + "$ref": "#/parameters/billingProfileIdParameter" + }, + { + "$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" + } + } + } + }, + "delete": { + "tags": [ + "Budgets" + ], + "operationId": "Budgets_DeleteForBillingProfile", + "description": "The operation to delete a budget for a billing profile.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "BudgetDelete": { + "$ref": "./examples/BudgetDeleteForBillingProfile.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountIdParameter" + }, + { + "$ref": "#/parameters/billingProfileIdParameter" + }, + { + "$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.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}/providers/Microsoft.Consumption/budgets/{budgetName}": { + "get": { + "tags": [ + "Budgets" + ], + "operationId": "Budgets_GetByInvoiceSection", + "description": "Gets the budget for an invoice section by budget name.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "BudgetGet": { + "$ref": "./examples/BudgetGetForInvoiceSection.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountIdParameter" + }, + { + "$ref": "#/parameters/invoiceSectionIdParameter" + }, + { + "$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" + ], + "operationId": "Budgets_CreateOrUpdateForInvoiceSection", + "description": "The operation to create or update a budget for an invoice section. 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": { + "BudgetCreateOrUpdate": { + "$ref": "./examples/BudgetCreateOrUpdateForInvoiceSection.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountIdParameter" + }, + { + "$ref": "#/parameters/invoiceSectionIdParameter" + }, + { + "$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" + } + } + } + }, + "delete": { + "tags": [ + "Budgets" + ], + "operationId": "Budgets_DeleteForInvoiceSection", + "description": "The operation to delete a budget for an invoice section.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "BudgetDelete": { + "$ref": "./examples/BudgetDeleteForInvoiceSection.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountIdParameter" + }, + { + "$ref": "#/parameters/invoiceSectionIdParameter" + }, + { + "$ref": "#/parameters/budgetNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + } + }, + "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" + } + }, + "nextLink": { + "description": "The link (url) to the next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "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 usage.", + "type": "string", + "enum": [ + "Cost", + "Usage" + ], + "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" + }, + "filters": { + "description": "May be used to filter budgets by billing profile (for a request at billing account scope), invoice section (for a request at billing account scope), resource group (for a request at subscription scope), resource, meter or tags.", + "type": "object", + "$ref": "#/definitions/Filters" + }, + "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" + ] + }, + "Filters": { + "description": "May be used to filter budgets by billing profile (for a request at billing account scope), invoice section (for a request at billing account scope), resource group (for a request at subscription scope), resource, meter or tags.", + "properties": { + "billingProfiles": { + "description": "The list of filters on billing profiles, allowed only at billing account scope.", + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 0, + "maxItems": 10 + }, + "invoiceSections": { + "description": "The list of filters on invoice sections, allowed only at billing account scope.", + "type": "array", + "items": { + "type": "string" + }, + "minItems": 0, + "maxItems": 10 + }, + "resourceGroups": { + "description": "The list of filters on resource groups, allowed only at subscription scope.", + "type": "array", + "items": { + "type": "string" + }, + "minItems": 0, + "maxItems": 10 + }, + "resources": { + "description": "The list of filters on resources.", + "type": "array", + "items": { + "type": "string" + }, + "minItems": 0, + "maxItems": 10 + }, + "meters": { + "description": "The list of filters on meters (GUID), mandatory for budgets of usage category. ", + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 0, + "maxItems": 10 + }, + "tags": { + "type": "object", + "description": "The dictionary of filters on tags.", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": 0, + "maxItems": 10 + } + } + }, + "CurrentSpend": { + "description": "The current spend which is being tracked for a budget.", + "properties": { + "amount": { + "description": "The total amount 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. If not present in the request body, defaults to true", + "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 + } + }, + "required": [ + "operator", + "threshold", + "contactEmails" + ] + }, + "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" + } + } + }, + "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 + } + } + }, + "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 2018-10-01." + }, + "billingAccountIdParameter": { + "name": "billingAccountId", + "in": "path", + "description": "BillingAccount ID", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "billingProfileIdParameter": { + "name": "billingProfileId", + "in": "path", + "description": "BillingProfile ID", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "invoiceSectionIdParameter": { + "name": "invoiceSectionId", + "in": "path", + "description": "InvoiceSection ID", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "budgetNameParameter": { + "name": "budgetName", + "in": "path", + "description": "Budget Name.", + "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/2018-12-01-preview/examples/BudgetCreateOrUpdateForBillingAccount.json b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2018-12-01-preview/examples/BudgetCreateOrUpdateForBillingAccount.json new file mode 100644 index 000000000000..bcd12188af07 --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2018-12-01-preview/examples/BudgetCreateOrUpdateForBillingAccount.json @@ -0,0 +1,184 @@ +{ + "parameters": { + "api-version": "2018-12-01-preview", + "billingAccountId": "00000000-0000-0000-0000-000000000000", + "budgetName": "Budget1", + "parameters": { + "eTag": "\"1d34d016a593709\"", + "properties": { + "category": "Cost", + "amount": 100.65, + "timeGrain": "Monthly", + "timePeriod": { + "startDate": "2018-10-01T00:00:00Z", + "endDate": "2019-10-31T00:00:00Z" + }, + "filters": { + "billingProfiles": [ + "11111111-1111-1111-1111-111111111111" + ], + "resources": [ + "/subscriptions/0000/resourceGroups/RG1/providers/Microsoft.Compute/virtualMachines/VM1", + "/subscriptions/0000/resourceGroups/RG1/providers/Microsoft.Compute/virtualMachines/VM2" + ], + "meters": [ + "00000000-0000-0000-0000-000000000000" + ], + "tags": { + "category": [ + "Cat1", + "Cat2" + ], + "department": [ + "Dep1", + "Dep2" + ] + } + }, + "notifications": { + "Actual_GreaterThan_80_Percent": { + "operator": "GreaterThan", + "threshold": 80, + "contactEmails": [ + "johndoe@contoso.com" + ] + }, + "Actual_GreaterThanOrEqualTo_90_Percent": { + "operator": "GreaterThanOrEqualTo", + "threshold": 90, + "contactEmails": [ + "johndoe@contoso.com", + "janesmith@contoso.com" + ] + } + } + } + } + }, + "responses": { + "201": { + "body": { + "id": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/budgets/Budget1", + "name": "Budget1", + "type": "Microsoft.Consumption/budgets", + "eTag": "\"1d34d012214157f\"", + "properties": { + "category": "Cost", + "amount": 100.65, + "timeGrain": "Monthly", + "timePeriod": { + "startDate": "2018-10-01T00:00:00Z", + "endDate": "2019-10-31T00:00:00Z" + }, + "filters": { + "billingProfiles": [ + "11111111-1111-1111-1111-111111111111" + ], + "resources": [ + "/subscriptions/0000/resourceGroups/RG1/providers/Microsoft.Compute/virtualMachines/VM1", + "/subscriptions/0000/resourceGroups/RG1/providers/Microsoft.Compute/virtualMachines/VM2" + ], + "meters": [ + "00000000-0000-0000-0000-000000000000" + ], + "tags": { + "category": [ + "Cat1", + "Cat2" + ], + "department": [ + "Dep1", + "Dep2" + ] + } + }, + "currentSpend": { + "amount": 80.89, + "unit": "USD" + }, + "notifications": { + "Actual_GreaterThan_80_Percent": { + "enabled": true, + "operator": "GreaterThan", + "threshold": 80, + "contactEmails": [ + "johndoe@contoso.com" + ] + }, + "Actual_GreaterThanOrEqualTo_90_Percent": { + "enabled": true, + "operator": "GreaterThanOrEqualTo", + "threshold": 90, + "contactEmails": [ + "johndoe@contoso.com", + "janesmith@contoso.com" + ] + } + } + } + } + }, + "200": { + "body": { + "id": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/budgets/Budget1", + "name": "Budget1", + "type": "Microsoft.Consumption/budgets", + "eTag": "\"1d34d012214157f\"", + "properties": { + "category": "Cost", + "amount": 100.65, + "timeGrain": "Monthly", + "timePeriod": { + "startDate": "2018-10-01T00:00:00Z", + "endDate": "2019-10-31T00:00:00Z" + }, + "filters": { + "billingProfiles": [ + "11111111-1111-1111-1111-111111111111" + ], + "resources": [ + "/subscriptions/0000/resourceGroups/RG1/providers/Microsoft.Compute/virtualMachines/VM1", + "/subscriptions/0000/resourceGroups/RG1/providers/Microsoft.Compute/virtualMachines/VM2" + ], + "meters": [ + "00000000-0000-0000-0000-000000000000" + ], + "tags": { + "category": [ + "Cat1", + "Cat2" + ], + "department": [ + "Dep1", + "Dep2" + ] + } + }, + "currentSpend": { + "amount": 80.89, + "unit": "USD" + }, + "notifications": { + "Actual_GreaterThan_80_Percent": { + "enabled": true, + "operator": "GreaterThan", + "threshold": 80, + "contactEmails": [ + "johndoe@contoso.com" + ] + }, + "Actual_GreaterThanOrEqualTo_90_Percent": { + "enabled": true, + "operator": "GreaterThanOrEqualTo", + "threshold": 90, + "contactEmails": [ + "johndoe@contoso.com", + "janesmith@contoso.com" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2018-12-01-preview/examples/BudgetCreateOrUpdateForBillingProfile.json b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2018-12-01-preview/examples/BudgetCreateOrUpdateForBillingProfile.json new file mode 100644 index 000000000000..cb6986bb3670 --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2018-12-01-preview/examples/BudgetCreateOrUpdateForBillingProfile.json @@ -0,0 +1,176 @@ +{ + "parameters": { + "api-version": "2018-12-01-preview", + "billingAccountId": "00000000-0000-0000-0000-000000000000", + "billingProfileId": "11111111-1111-1111-1111-111111111111", + "budgetName": "Budget1", + "parameters": { + "eTag": "\"1d34d016a593709\"", + "properties": { + "category": "Cost", + "amount": 100.65, + "timeGrain": "Monthly", + "timePeriod": { + "startDate": "2018-10-01T00:00:00Z", + "endDate": "2019-10-31T00:00:00Z" + }, + "filters": { + "resources": [ + "/subscriptions/0000/resourceGroups/RG1/providers/Microsoft.Compute/virtualMachines/VM1", + "/subscriptions/0000/resourceGroups/RG1/providers/Microsoft.Compute/virtualMachines/VM2" + ], + "meters": [ + "00000000-0000-0000-0000-000000000000" + ], + "tags": { + "category": [ + "Cat1", + "Cat2" + ], + "department": [ + "Dep1", + "Dep2" + ] + } + }, + "notifications": { + "Actual_GreaterThan_80_Percent": { + "operator": "GreaterThan", + "threshold": 80, + "contactEmails": [ + "johndoe@contoso.com" + ] + }, + "Actual_GreaterThanOrEqualTo_90_Percent": { + "operator": "GreaterThanOrEqualTo", + "threshold": 90, + "contactEmails": [ + "johndoe@contoso.com", + "janesmith@contoso.com" + ] + } + } + } + } + }, + "responses": { + "201": { + "body": { + "id": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000/billingProfiles/11111111-1111-1111-1111-111111111111/providers/Microsoft.Consumption/budgets/Budget1", + "name": "Budget1", + "type": "Microsoft.Consumption/budgets", + "eTag": "\"1d34d012214157f\"", + "properties": { + "category": "Cost", + "amount": 100.65, + "timeGrain": "Monthly", + "timePeriod": { + "startDate": "2018-10-01T00:00:00Z", + "endDate": "2019-10-31T00:00:00Z" + }, + "filters": { + "resources": [ + "/subscriptions/0000/resourceGroups/RG1/providers/Microsoft.Compute/virtualMachines/VM1", + "/subscriptions/0000/resourceGroups/RG1/providers/Microsoft.Compute/virtualMachines/VM2" + ], + "meters": [ + "00000000-0000-0000-0000-000000000000" + ], + "tags": { + "category": [ + "Cat1", + "Cat2" + ], + "department": [ + "Dep1", + "Dep2" + ] + } + }, + "currentSpend": { + "amount": 80.89, + "unit": "USD" + }, + "notifications": { + "Actual_GreaterThan_80_Percent": { + "enabled": true, + "operator": "GreaterThan", + "threshold": 80, + "contactEmails": [ + "johndoe@contoso.com" + ] + }, + "Actual_GreaterThanOrEqualTo_90_Percent": { + "enabled": true, + "operator": "GreaterThanOrEqualTo", + "threshold": 90, + "contactEmails": [ + "johndoe@contoso.com", + "janesmith@contoso.com" + ] + } + } + } + } + }, + "200": { + "body": { + "id": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000/billingProfiles/11111111-1111-1111-1111-111111111111/providers/Microsoft.Consumption/budgets/Budget1", + "name": "Budget1", + "type": "Microsoft.Consumption/budgets", + "eTag": "\"1d34d012214157f\"", + "properties": { + "category": "Cost", + "amount": 100.65, + "timeGrain": "Monthly", + "timePeriod": { + "startDate": "2018-10-01T00:00:00Z", + "endDate": "2019-10-31T00:00:00Z" + }, + "filters": { + "resources": [ + "/subscriptions/0000/resourceGroups/RG1/providers/Microsoft.Compute/virtualMachines/VM1", + "/subscriptions/0000/resourceGroups/RG1/providers/Microsoft.Compute/virtualMachines/VM2" + ], + "meters": [ + "00000000-0000-0000-0000-000000000000" + ], + "tags": { + "category": [ + "Cat1", + "Cat2" + ], + "department": [ + "Dep1", + "Dep2" + ] + } + }, + "currentSpend": { + "amount": 80.89, + "unit": "USD" + }, + "notifications": { + "Actual_GreaterThan_80_Percent": { + "enabled": true, + "operator": "GreaterThan", + "threshold": 80, + "contactEmails": [ + "johndoe@contoso.com" + ] + }, + "Actual_GreaterThanOrEqualTo_90_Percent": { + "enabled": true, + "operator": "GreaterThanOrEqualTo", + "threshold": 90, + "contactEmails": [ + "johndoe@contoso.com", + "janesmith@contoso.com" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2018-12-01-preview/examples/BudgetCreateOrUpdateForInvoiceSection.json b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2018-12-01-preview/examples/BudgetCreateOrUpdateForInvoiceSection.json new file mode 100644 index 000000000000..ca9b4bb49f9b --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2018-12-01-preview/examples/BudgetCreateOrUpdateForInvoiceSection.json @@ -0,0 +1,176 @@ +{ + "parameters": { + "api-version": "2018-12-01-preview", + "billingAccountId": "00000000-0000-0000-0000-000000000000", + "invoiceSectionId": "11111111-1111-1111-1111-111111111111", + "budgetName": "Budget1", + "parameters": { + "eTag": "\"1d34d016a593709\"", + "properties": { + "category": "Cost", + "amount": 100.65, + "timeGrain": "Monthly", + "timePeriod": { + "startDate": "2018-10-01T00:00:00Z", + "endDate": "2019-10-31T00:00:00Z" + }, + "filters": { + "resources": [ + "/subscriptions/0000/resourceGroups/RG1/providers/Microsoft.Compute/virtualMachines/VM1", + "/subscriptions/0000/resourceGroups/RG1/providers/Microsoft.Compute/virtualMachines/VM2" + ], + "meters": [ + "00000000-0000-0000-0000-000000000000" + ], + "tags": { + "category": [ + "Cat1", + "Cat2" + ], + "department": [ + "Dep1", + "Dep2" + ] + } + }, + "notifications": { + "Actual_GreaterThan_80_Percent": { + "operator": "GreaterThan", + "threshold": 80, + "contactEmails": [ + "johndoe@contoso.com" + ] + }, + "Actual_GreaterThanOrEqualTo_90_Percent": { + "operator": "GreaterThanOrEqualTo", + "threshold": 90, + "contactEmails": [ + "johndoe@contoso.com", + "janesmith@contoso.com" + ] + } + } + } + } + }, + "responses": { + "201": { + "body": { + "id": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000/invoiceSections/11111111-1111-1111-1111-111111111111/providers/Microsoft.Consumption/budgets/Budget1", + "name": "Budget1", + "type": "Microsoft.Consumption/budgets", + "eTag": "\"1d34d012214157f\"", + "properties": { + "category": "Cost", + "amount": 100.65, + "timeGrain": "Monthly", + "timePeriod": { + "startDate": "2018-10-01T00:00:00Z", + "endDate": "2019-10-31T00:00:00Z" + }, + "filters": { + "resources": [ + "/subscriptions/0000/resourceGroups/RG1/providers/Microsoft.Compute/virtualMachines/VM1", + "/subscriptions/0000/resourceGroups/RG1/providers/Microsoft.Compute/virtualMachines/VM2" + ], + "meters": [ + "00000000-0000-0000-0000-000000000000" + ], + "tags": { + "category": [ + "Cat1", + "Cat2" + ], + "department": [ + "Dep1", + "Dep2" + ] + } + }, + "currentSpend": { + "amount": 80.89, + "unit": "USD" + }, + "notifications": { + "Actual_GreaterThan_80_Percent": { + "enabled": true, + "operator": "GreaterThan", + "threshold": 80, + "contactEmails": [ + "johndoe@contoso.com" + ] + }, + "Actual_GreaterThanOrEqualTo_90_Percent": { + "enabled": true, + "operator": "GreaterThanOrEqualTo", + "threshold": 90, + "contactEmails": [ + "johndoe@contoso.com", + "janesmith@contoso.com" + ] + } + } + } + } + }, + "200": { + "body": { + "id": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000/invoiceSections/11111111-1111-1111-1111-111111111111/providers/Microsoft.Consumption/budgets/Budget1", + "name": "Budget1", + "type": "Microsoft.Consumption/budgets", + "eTag": "\"1d34d012214157f\"", + "properties": { + "category": "Cost", + "amount": 100.65, + "timeGrain": "Monthly", + "timePeriod": { + "startDate": "2018-10-01T00:00:00Z", + "endDate": "2019-10-31T00:00:00Z" + }, + "filters": { + "resources": [ + "/subscriptions/0000/resourceGroups/RG1/providers/Microsoft.Compute/virtualMachines/VM1", + "/subscriptions/0000/resourceGroups/RG1/providers/Microsoft.Compute/virtualMachines/VM2" + ], + "meters": [ + "00000000-0000-0000-0000-000000000000" + ], + "tags": { + "category": [ + "Cat1", + "Cat2" + ], + "department": [ + "Dep1", + "Dep2" + ] + } + }, + "currentSpend": { + "amount": 80.89, + "unit": "USD" + }, + "notifications": { + "Actual_GreaterThan_80_Percent": { + "enabled": true, + "operator": "GreaterThan", + "threshold": 80, + "contactEmails": [ + "johndoe@contoso.com" + ] + }, + "Actual_GreaterThanOrEqualTo_90_Percent": { + "enabled": true, + "operator": "GreaterThanOrEqualTo", + "threshold": 90, + "contactEmails": [ + "johndoe@contoso.com", + "janesmith@contoso.com" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2018-12-01-preview/examples/BudgetDeleteForBillingAccount.json b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2018-12-01-preview/examples/BudgetDeleteForBillingAccount.json new file mode 100644 index 000000000000..1de8d5dc3b6c --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2018-12-01-preview/examples/BudgetDeleteForBillingAccount.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "api-version": "2018-12-01-preview", + "billingAccountId": "00000000-0000-0000-0000-000000000000", + "budgetName": "Budget1" + }, + "responses": { + "200": { + } + } +} \ No newline at end of file diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2018-12-01-preview/examples/BudgetDeleteForBillingProfile.json b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2018-12-01-preview/examples/BudgetDeleteForBillingProfile.json new file mode 100644 index 000000000000..70aa5562019d --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2018-12-01-preview/examples/BudgetDeleteForBillingProfile.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "api-version": "2018-12-01-preview", + "billingAccountId": "00000000-0000-0000-0000-000000000000", + "billingProfileId": "11111111-1111-1111-1111-111111111111", + "budgetName": "Budget1" + }, + "responses": { + "200": {} + } +} \ No newline at end of file diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2018-12-01-preview/examples/BudgetDeleteForInvoiceSection.json b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2018-12-01-preview/examples/BudgetDeleteForInvoiceSection.json new file mode 100644 index 000000000000..ac642999cdb4 --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2018-12-01-preview/examples/BudgetDeleteForInvoiceSection.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "api-version": "2018-12-01-preview", + "billingAccountId": "00000000-0000-0000-0000-000000000000", + "invoiceSectionId": "11111111-1111-1111-1111-111111111111", + "budgetName": "Budget1" + }, + "responses": { + "200": {} + } +} \ No newline at end of file diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2018-12-01-preview/examples/BudgetGetForBillingAccount.json b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2018-12-01-preview/examples/BudgetGetForBillingAccount.json new file mode 100644 index 000000000000..f8acdf0b0d6d --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2018-12-01-preview/examples/BudgetGetForBillingAccount.json @@ -0,0 +1,71 @@ +{ + "parameters": { + "api-version": "2018-12-01-preview", + "billingAccountId": "00000000-0000-0000-0000-000000000000", + "budgetName": "Budget1" + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/budgets/Budget1", + "name": "Budget1", + "type": "Microsoft.Consumption/budgets", + "eTag": "\"1d34d012214157f\"", + "properties": { + "category": "Cost", + "amount": 100.65, + "timeGrain": "Monthly", + "timePeriod": { + "startDate": "2018-10-01T00:00:00Z", + "endDate": "2019-10-31T00:00:00Z" + }, + "filters": { + "billingProfiles": [ + "11111111-1111-1111-1111-111111111111" + ], + "resources": [ + "/subscriptions/0000/resourceGroups/RG1/providers/Microsoft.Compute/virtualMachines/VM1", + "/subscriptions/0000/resourceGroups/RG1/providers/Microsoft.Compute/virtualMachines/VM2" + ], + "meters": [ + "00000000-0000-0000-0000-000000000000" + ], + "tags": { + "category": [ + "Cat1", + "Cat2" + ], + "department": [ + "Dep1", + "Dep2" + ] + } + }, + "currentSpend": { + "amount": 80.89, + "unit": "USD" + }, + "notifications": { + "Actual_GreaterThan_80_Percent": { + "enabled": true, + "operator": "GreaterThan", + "threshold": 80, + "contactEmails": [ + "johndoe@contoso.com" + ] + }, + "Actual_GreaterThanOrEqualTo_90_Percent": { + "enabled": true, + "operator": "GreaterThanOrEqualTo", + "threshold": 90, + "contactEmails": [ + "johndoe@contoso.com", + "janesmith@contoso.com" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2018-12-01-preview/examples/BudgetGetForBillingProfile.json b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2018-12-01-preview/examples/BudgetGetForBillingProfile.json new file mode 100644 index 000000000000..4ef311bc03e1 --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2018-12-01-preview/examples/BudgetGetForBillingProfile.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "api-version": "2018-12-01-preview", + "billingAccountId": "00000000-0000-0000-0000-000000000000", + "billingProfileId": "11111111-1111-1111-1111-111111111111", + "budgetName": "Budget1" + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000/billingProfiles/11111111-1111-1111-1111-111111111111/providers/Microsoft.Consumption/budgets/Budget1", + "name": "Budget1", + "type": "Microsoft.Consumption/budgets", + "eTag": "\"1d34d012214157f\"", + "properties": { + "category": "Cost", + "amount": 100.65, + "timeGrain": "Monthly", + "timePeriod": { + "startDate": "2018-10-01T00:00:00Z", + "endDate": "2019-10-31T00:00:00Z" + }, + "filters": { + "resources": [ + "/subscriptions/0000/resourceGroups/RG1/providers/Microsoft.Compute/virtualMachines/VM1", + "/subscriptions/0000/resourceGroups/RG1/providers/Microsoft.Compute/virtualMachines/VM2" + ], + "meters": [ + "00000000-0000-0000-0000-000000000000" + ], + "tags": { + "category": [ + "Cat1", + "Cat2" + ], + "department": [ + "Dep1", + "Dep2" + ] + } + }, + "currentSpend": { + "amount": 80.89, + "unit": "USD" + }, + "notifications": { + "Actual_GreaterThan_80_Percent": { + "enabled": true, + "operator": "GreaterThan", + "threshold": 80, + "contactEmails": [ + "johndoe@contoso.com" + ] + }, + "Actual_GreaterThanOrEqualTo_90_Percent": { + "enabled": true, + "operator": "GreaterThanOrEqualTo", + "threshold": 90, + "contactEmails": [ + "johndoe@contoso.com", + "janesmith@contoso.com" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2018-12-01-preview/examples/BudgetGetForInvoiceSection.json b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2018-12-01-preview/examples/BudgetGetForInvoiceSection.json new file mode 100644 index 000000000000..009e61946dde --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2018-12-01-preview/examples/BudgetGetForInvoiceSection.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "api-version": "2018-12-01-preview", + "billingAccountId": "00000000-0000-0000-0000-000000000000", + "invoiceSectionId": "11111111-1111-1111-1111-111111111111", + "budgetName": "Budget1" + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000/invoiceSections/11111111-1111-1111-1111-111111111111/providers/Microsoft.Consumption/budgets/Budget1", + "name": "Budget1", + "type": "Microsoft.Consumption/budgets", + "eTag": "\"1d34d012214157f\"", + "properties": { + "category": "Cost", + "amount": 100.65, + "timeGrain": "Monthly", + "timePeriod": { + "startDate": "2018-10-01T00:00:00Z", + "endDate": "2019-10-31T00:00:00Z" + }, + "filters": { + "resources": [ + "/subscriptions/0000/resourceGroups/RG1/providers/Microsoft.Compute/virtualMachines/VM1", + "/subscriptions/0000/resourceGroups/RG1/providers/Microsoft.Compute/virtualMachines/VM2" + ], + "meters": [ + "00000000-0000-0000-0000-000000000000" + ], + "tags": { + "category": [ + "Cat1", + "Cat2" + ], + "department": [ + "Dep1", + "Dep2" + ] + } + }, + "currentSpend": { + "amount": 80.89, + "unit": "USD" + }, + "notifications": { + "Actual_GreaterThan_80_Percent": { + "enabled": true, + "operator": "GreaterThan", + "threshold": 80, + "contactEmails": [ + "johndoe@contoso.com" + ] + }, + "Actual_GreaterThanOrEqualTo_90_Percent": { + "enabled": true, + "operator": "GreaterThanOrEqualTo", + "threshold": 90, + "contactEmails": [ + "johndoe@contoso.com", + "janesmith@contoso.com" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2018-12-01-preview/examples/BudgetsListForBillingAccount.json b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2018-12-01-preview/examples/BudgetsListForBillingAccount.json new file mode 100644 index 000000000000..d8cd73610dff --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2018-12-01-preview/examples/BudgetsListForBillingAccount.json @@ -0,0 +1,120 @@ +{ + "parameters": { + "api-version": "2018-12-01-preview", + "billingAccountId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/providers/Microsoft.Billing/billingAccounts/0000/providers/Microsoft.Consumption/budgets/Budget1", + "name": "Budget1", + "type": "Microsoft.Consumption/budgets", + "eTag": "\"1d34d012214157f\"", + "properties": { + "category": "Cost", + "amount": 100.65, + "timeGrain": "Monthly", + "timePeriod": { + "startDate": "2018-10-01T00:00:00Z", + "endDate": "2019-10-31T00:00:00Z" + }, + "filters": { + "billingProfiles": [ + "11111111-1111-1111-1111-111111111111" + ], + "resources": [ + "/subscriptions/0000/resourceGroups/RG1/providers/Microsoft.Compute/virtualMachines/VM1", + "/subscriptions/0000/resourceGroups/RG1/providers/Microsoft.Compute/virtualMachines/VM2" + ], + "meters": [ + "00000000-0000-0000-0000-000000000000" + ], + "tags": { + "category": [ + "Cat1", + "Cat2" + ], + "department": [ + "Dep1", + "Dep2" + ] + } + }, + "currentSpend": { + "amount": 80.89, + "unit": "USD" + }, + "notifications": { + "Actual_GreaterThan_80_Percent": { + "enabled": true, + "operator": "GreaterThan", + "threshold": 80, + "contactEmails": [ + "johndoe@contoso.com" + ] + }, + "Actual_GreaterThanOrEqualTo_90_Percent": { + "enabled": true, + "operator": "GreaterThanOrEqualTo", + "threshold": 90, + "contactEmails": [ + "johndoe@contoso.com", + "janesmith@contoso.com" + ] + } + } + } + }, + { + "id": "/providers/Microsoft.Billing/billingAccounts/0000/providers/Microsoft.Consumption/budgets/Budget2", + "name": "Budget2", + "type": "Microsoft.Consumption/budgets", + "eTag": "\"1d34d012214157f\"", + "properties": { + "category": "Cost", + "amount": 600.65, + "timeGrain": "Monthly", + "timePeriod": { + "startDate": "2018-10-01T00:00:00Z", + "endDate": "2019-10-31T00:00:00Z" + }, + "filters": { + "invoiceSections": [ + "11111111-1111-1111-1111-111111111111_1111-11-11" + ], + "resources": [ + "/subscriptions/0000/resourceGroups/RG1/providers/Microsoft.Compute/virtualMachines/VM2" + ] + }, + "currentSpend": { + "amount": 120.89, + "unit": "USD" + }, + "notifications": { + "Actual_GreaterThan_40_Percent": { + "enabled": true, + "operator": "GreaterThan", + "threshold": 40, + "contactEmails": [ + "johndoe@contoso.com" + ] + }, + "Actual_GreaterThanOrEqualTo_60_Percent": { + "enabled": true, + "operator": "GreaterThanOrEqualTo", + "threshold": 60, + "contactEmails": [ + "johndoe@contoso.com", + "janesmith@contoso.com" + ] + } + } + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2018-12-01-preview/examples/BudgetsListForBillingProfile.json b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2018-12-01-preview/examples/BudgetsListForBillingProfile.json new file mode 100644 index 000000000000..b747125c7200 --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2018-12-01-preview/examples/BudgetsListForBillingProfile.json @@ -0,0 +1,115 @@ +{ + "parameters": { + "api-version": "2018-12-01-preview", + "billingAccountId": "00000000-0000-0000-0000-000000000000", + "billingProfileId": "11111111-1111-1111-1111-111111111111" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000/billingProfiles/11111111-1111-1111-1111-111111111111/providers/Microsoft.Consumption/budgets/Budget1", + "name": "Budget1", + "type": "Microsoft.Consumption/budgets", + "eTag": "\"1d34d012214157f\"", + "properties": { + "category": "Cost", + "amount": 100.65, + "timeGrain": "Monthly", + "timePeriod": { + "startDate": "2018-10-01T00:00:00Z", + "endDate": "2019-10-31T00:00:00Z" + }, + "filters": { + "resources": [ + "/subscriptions/0000/resourceGroups/RG1/providers/Microsoft.Compute/virtualMachines/VM1", + "/subscriptions/0000/resourceGroups/RG1/providers/Microsoft.Compute/virtualMachines/VM2" + ], + "meters": [ + "00000000-0000-0000-0000-000000000000" + ], + "tags": { + "category": [ + "Cat1", + "Cat2" + ], + "department": [ + "Dep1", + "Dep2" + ] + } + }, + "currentSpend": { + "amount": 80.89, + "unit": "USD" + }, + "notifications": { + "Actual_GreaterThan_80_Percent": { + "enabled": true, + "operator": "GreaterThan", + "threshold": 80, + "contactEmails": [ + "johndoe@contoso.com" + ] + }, + "Actual_GreaterThanOrEqualTo_90_Percent": { + "enabled": true, + "operator": "GreaterThanOrEqualTo", + "threshold": 90, + "contactEmails": [ + "johndoe@contoso.com", + "janesmith@contoso.com" + ] + } + } + } + }, + { + "id": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000/billingProfiles/11111111-1111-1111-1111-111111111111/providers/Microsoft.Consumption/budgets/Budget2", + "name": "Budget2", + "type": "Microsoft.Consumption/budgets", + "eTag": "\"1d34d012214157f\"", + "properties": { + "category": "Cost", + "amount": 600.65, + "timeGrain": "Monthly", + "timePeriod": { + "startDate": "2018-10-01T00:00:00Z", + "endDate": "2019-10-31T00:00:00Z" + }, + "filters": { + "resources": [ + "/subscriptions/0000/resourceGroups/RG1/providers/Microsoft.Compute/virtualMachines/VM2" + ] + }, + "currentSpend": { + "amount": 120.89, + "unit": "USD" + }, + "notifications": { + "Actual_GreaterThan_40_Percent": { + "enabled": true, + "operator": "GreaterThan", + "threshold": 40, + "contactEmails": [ + "johndoe@contoso.com" + ] + }, + "Actual_GreaterThanOrEqualTo_60_Percent": { + "enabled": true, + "operator": "GreaterThanOrEqualTo", + "threshold": 60, + "contactEmails": [ + "johndoe@contoso.com", + "janesmith@contoso.com" + ] + } + } + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/preview/2018-12-01-preview/examples/BudgetsListForInvoiceSection.json b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2018-12-01-preview/examples/BudgetsListForInvoiceSection.json new file mode 100644 index 000000000000..52e0fdabcfe5 --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/preview/2018-12-01-preview/examples/BudgetsListForInvoiceSection.json @@ -0,0 +1,115 @@ +{ + "parameters": { + "api-version": "2018-12-01-preview", + "billingAccountId": "00000000-0000-0000-0000-000000000000", + "invoiceSectionId": "11111111-1111-1111-1111-111111111111" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000/invoiceSections/11111111-1111-1111-1111-111111111111/providers/Microsoft.Consumption/budgets/Budget1", + "name": "Budget1", + "type": "Microsoft.Consumption/budgets", + "eTag": "\"1d34d012214157f\"", + "properties": { + "category": "Cost", + "amount": 100.65, + "timeGrain": "Monthly", + "timePeriod": { + "startDate": "2018-10-01T00:00:00Z", + "endDate": "2019-10-31T00:00:00Z" + }, + "filters": { + "resources": [ + "/subscriptions/0000/resourceGroups/RG1/providers/Microsoft.Compute/virtualMachines/VM1", + "/subscriptions/0000/resourceGroups/RG1/providers/Microsoft.Compute/virtualMachines/VM2" + ], + "meters": [ + "00000000-0000-0000-0000-000000000000" + ], + "tags": { + "category": [ + "Cat1", + "Cat2" + ], + "department": [ + "Dep1", + "Dep2" + ] + } + }, + "currentSpend": { + "amount": 80.89, + "unit": "USD" + }, + "notifications": { + "Actual_GreaterThan_80_Percent": { + "enabled": true, + "operator": "GreaterThan", + "threshold": 80, + "contactEmails": [ + "johndoe@contoso.com" + ] + }, + "Actual_GreaterThanOrEqualTo_90_Percent": { + "enabled": true, + "operator": "GreaterThanOrEqualTo", + "threshold": 90, + "contactEmails": [ + "johndoe@contoso.com", + "janesmith@contoso.com" + ] + } + } + } + }, + { + "id": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000/invoiceSections/11111111-1111-1111-1111-111111111111/providers/Microsoft.Consumption/budgets/Budget2", + "name": "Budget2", + "type": "Microsoft.Consumption/budgets", + "eTag": "\"1d34d012214157f\"", + "properties": { + "category": "Cost", + "amount": 600.65, + "timeGrain": "Monthly", + "timePeriod": { + "startDate": "2018-10-01T00:00:00Z", + "endDate": "2019-10-31T00:00:00Z" + }, + "filters": { + "resources": [ + "/subscriptions/0000/resourceGroups/RG1/providers/Microsoft.Compute/virtualMachines/VM2" + ] + }, + "currentSpend": { + "amount": 120.89, + "unit": "USD" + }, + "notifications": { + "Actual_GreaterThan_40_Percent": { + "enabled": true, + "operator": "GreaterThan", + "threshold": 40, + "contactEmails": [ + "johndoe@contoso.com" + ] + }, + "Actual_GreaterThanOrEqualTo_60_Percent": { + "enabled": true, + "operator": "GreaterThanOrEqualTo", + "threshold": 60, + "contactEmails": [ + "johndoe@contoso.com", + "janesmith@contoso.com" + ] + } + } + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/consumption/resource-manager/readme.md b/specification/consumption/resource-manager/readme.md index 8a253969a640..edb42eeaee2c 100644 --- a/specification/consumption/resource-manager/readme.md +++ b/specification/consumption/resource-manager/readme.md @@ -127,6 +127,16 @@ input-file: - Microsoft.Consumption/preview/2017-12-30-preview/consumption.json ``` +--- +### Tag: package-2018-12-preview + +These settings apply only when `--tag=package-2018-12-preview` is specified on the command line. + +``` yaml $(tag) == 'package-2018-12-preview' +input-file: +- Microsoft.Consumption/preview/2018-12-01-preview/consumption.json +``` + --- # Code Generation @@ -217,6 +227,7 @@ batch: - tag: package-2018-06 - tag: package-2018-08 - tag: package-2018-10 + - tag: package-2018-12-preview ``` ### Tag: package-2017-04-preview and java @@ -336,3 +347,16 @@ regenerate-manager: true generate-interface: true ``` +### Tag: package-2018-12-preview and java + +These settings apply only when `--tag=package-2018-12-preview --java` is specified on the command line. +Please also specify `--azure-libraries-for-java=`. + +``` yaml $(tag) == 'package-2018-12-preview' && $(java) && $(multiapi) +java: + namespace: com.microsoft.azure.management.consumption.v2018_12_01_preview + output-folder: $(azure-libraries-for-java-folder)/consumption/resource-manager/v2018_12_01_preview +regenerate-manager: true +generate-interface: true +``` +