From 661ebb8f5d0c0a9b2e11df7449206d4824c376c8 Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Wed, 10 Jun 2020 21:25:45 -0700 Subject: [PATCH 01/53] Adds base for updating Microsoft.CostManagement from version preview/2019-04-01-preview to version 2020-03-01-preview --- .../2020-03-01-preview/costmanagement.json | 1485 +++++++++++++++++ .../2020-03-01-preview/examples/Budget.json | 91 + .../examples/BudgetsList.json | 198 +++ .../examples/CreateOrUpdateBudget.json | 242 +++ .../examples/DeleteBudget.json | 13 + .../examples/PrivateView.json | 69 + .../examples/PrivateViewCreateOrUpdate.json | 185 ++ .../examples/PrivateViewDelete.json | 10 + .../examples/PrivateViewList.json | 131 ++ .../examples/ViewByResourceGroup.json | 70 + .../ViewCreateOrUpdateByResourceGroup.json | 186 +++ .../examples/ViewDeleteByResourceGroup.json | 11 + .../examples/ViewListByResourceGroup.json | 132 ++ 13 files changed, 2823 insertions(+) create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/Budget.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BudgetsList.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CreateOrUpdateBudget.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DeleteBudget.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateView.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewCreateOrUpdate.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewDelete.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewList.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewByResourceGroup.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewCreateOrUpdateByResourceGroup.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewDeleteByResourceGroup.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewListByResourceGroup.json diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json new file mode 100644 index 000000000000..6ee1ded63ee5 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json @@ -0,0 +1,1485 @@ +{ + "swagger": "2.0", + "info": { + "version": "2019-04-01-preview", + "title": "CostManagementClient" + }, + "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.CostManagement/views": { + "get": { + "tags": [ + "Views" + ], + "operationId": "Views_List", + "description": "Lists all views by tenant and object.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "PrivateViewList": { + "$ref": "./examples/PrivateViewList.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ViewListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/{scope}/providers/Microsoft.CostManagement/views": { + "get": { + "tags": [ + "Views" + ], + "operationId": "Views_ListByScope", + "description": "Lists all views at the given scope.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ResourceGroupViewList": { + "$ref": "./examples/ViewListByResourceGroup.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scopeViewParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ViewListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/providers/Microsoft.CostManagement/views/{viewName}": { + "get": { + "tags": [ + "Views" + ], + "operationId": "Views_Get", + "description": "Gets the view by view name.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "PrivateView": { + "$ref": "./examples/PrivateView.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/viewNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/View" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "tags": [ + "Views" + ], + "operationId": "Views_CreateOrUpdate", + "description": "The operation to create or update a view. Update operation requires latest eTag to be set in the request. 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/costmanagement/" + }, + "x-ms-examples": { + "CreateOrUpdatePrivateView": { + "$ref": "./examples/PrivateViewCreateOrUpdate.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/viewNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/View" + }, + "description": "Parameters supplied to the CreateOrUpdate View operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/View" + } + }, + "201": { + "description": "Created.", + "schema": { + "$ref": "#/definitions/View" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "tags": [ + "Views" + ], + "operationId": "Views_Delete", + "description": "The operation to delete a view.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "DeletePrivateView": { + "$ref": "./examples/PrivateViewDelete.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/viewNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded." + }, + "204": { + "description": "NoContent. Resource is not available." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/{scope}/providers/Microsoft.CostManagement/views/{viewName}": { + "get": { + "tags": [ + "Views" + ], + "operationId": "Views_GetByScope", + "description": "Gets the view for the defined scope by view name.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ResourceGroupView": { + "$ref": "./examples/ViewByResourceGroup.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scopeViewParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/viewNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/View" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "tags": [ + "Views" + ], + "operationId": "Views_CreateOrUpdateByScope", + "description": "The operation to create or update a view. Update operation requires latest eTag to be set in the request. 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/costmanagement/" + }, + "x-ms-examples": { + "ResourceGroupCreateOrUpdateView": { + "$ref": "./examples/ViewCreateOrUpdateByResourceGroup.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scopeViewParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/viewNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/View" + }, + "description": "Parameters supplied to the CreateOrUpdate View operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/View" + } + }, + "201": { + "description": "Created.", + "schema": { + "$ref": "#/definitions/View" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "tags": [ + "Views" + ], + "operationId": "Views_DeleteByScope", + "description": "The operation to delete a view.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ResourceGroupDeleteView": { + "$ref": "./examples/ViewDeleteByResourceGroup.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scopeViewParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/viewNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded." + }, + "204": { + "description": "NoContent. Resource is not available." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/{scope}/providers/Microsoft.CostManagement/budgets": { + "get": { + "tags": [ + "Budgets" + ], + "operationId": "Budgets_List", + "description": "Lists all budgets for the defined scope.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/cost-management/" + }, + "x-ms-examples": { + "BudgetsList": { + "$ref": "./examples/BudgetsList.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scopeBudgetParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "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" + } + } + }, + "/{scope}/providers/Microsoft.CostManagement/budgets/{budgetName}": { + "get": { + "tags": [ + "Budgets" + ], + "operationId": "Budget_Get", + "description": "Gets the budget for the scope by budget name.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/cost-management/" + }, + "x-ms-examples": { + "Budget": { + "$ref": "./examples/Budget.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scopeBudgetParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/budgetNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/BudgetModel" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "tags": [ + "Budgets" + ], + "operationId": "Budget_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/cost-management/" + }, + "x-ms-examples": { + "CreateOrUpdateBudget": { + "$ref": "./examples/CreateOrUpdateBudget.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scopeBudgetParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/budgetNameParameter" + }, + { + "name": "parameters", + "in": "body", + "x-required": true, + "schema": { + "$ref": "#/definitions/BudgetModel" + }, + "description": "Parameters supplied to the Create Budget operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/BudgetModel" + } + }, + "201": { + "description": "Created.", + "schema": { + "$ref": "#/definitions/BudgetModel" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "tags": [ + "Budgets" + ], + "operationId": "Budget_Delete", + "description": "The operation to delete a budget.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/cost-management/" + }, + "x-ms-examples": { + "DeleteBudget": { + "$ref": "./examples/DeleteBudget.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scopeBudgetParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/budgetNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded." + }, + "204": { + "description": "NoContent. Resource is not available." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.CostManagement/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": { + "ErrorBase": { + "description": "The details of the error.", + "properties": { + "code": { + "type": "string", + "description": "A machine readable error code.", + "readOnly": true + }, + "message": { + "type": "string", + "description": "A human readable error message.", + "readOnly": true + }, + "target": { + "type": "string", + "description": "Indicates which property in the request is responsible for the error.", + "readOnly": true + } + } + }, + "ErrorDetails": { + "description": "The details of the error.", + "properties": { + "code": { + "description": "A machine readable error code.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "A human readable error message.", + "type": "string", + "readOnly": true + }, + "target": { + "description": "Indicates which property in the request is responsible for the error.", + "type": "string" + }, + "details": { + "description": "error details.", + "type": "array", + "items": { + "$ref": "#/definitions/ErrorBase" + } + } + } + }, + "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" + } + } + }, + "Resource": { + "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." + }, + "tags": { + "readOnly": true, + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Resource tags." + } + }, + "x-ms-azure-resource": 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 + }, + "ReportConfigDefinition": { + "description": "The definition of a report config.", + "properties": { + "type": { + "description": "The type of the report. Usage represents actual usage, forecast represents forecasted data and UsageAndForecast represents both usage and forecasted data. Actual usage and forecasted data can be differentiated based on dates.", + "type": "string", + "enum": [ + "Usage" + ], + "x-ms-enum": { + "name": "ReportType", + "modelAsString": true + } + }, + "timeframe": { + "description": "The time frame for pulling data for the report. If custom, then a specific time period must be provided.", + "type": "string", + "enum": [ + "WeekToDate", + "MonthToDate", + "YearToDate", + "Custom" + ], + "x-ms-enum": { + "name": "TimeframeType", + "modelAsString": true + } + }, + "timePeriod": { + "description": "Has time period for pulling data for the report.", + "$ref": "#/definitions/ReportConfigTimePeriod" + }, + "dataset": { + "description": "Has definition for data in this report config.", + "$ref": "#/definitions/ReportConfigDataset" + } + }, + "required": [ + "type", + "timeframe" + ] + }, + "ReportConfigTimePeriod": { + "description": "The start and end date for pulling data for the report.", + "properties": { + "from": { + "description": "The start date to pull data from.", + "type": "string", + "format": "date-time" + }, + "to": { + "description": "The end date to pull data to.", + "type": "string", + "format": "date-time" + } + }, + "required": [ + "from", + "to" + ] + }, + "ReportConfigDataset": { + "description": "The definition of data present in the report.", + "properties": { + "granularity": { + "description": "The granularity of rows in the report.", + "type": "string", + "enum": [ + "Daily", + "Monthly" + ], + "x-ms-enum": { + "name": "GranularityType", + "modelAsString": true + } + }, + "configuration": { + "description": "Has configuration information for the data in the report. The configuration will be ignored if aggregation and grouping are provided.", + "$ref": "#/definitions/ReportConfigDatasetConfiguration" + }, + "aggregation": { + "type": "object", + "description": "Dictionary of aggregation expression to use in the report. The key of each item in the dictionary is the alias for the aggregated column. Report can have up to 2 aggregation clauses.", + "additionalProperties": { + "type": "object", + "$ref": "#/definitions/ReportConfigAggregation" + }, + "maxItems": 2 + }, + "grouping": { + "description": "Array of group by expression to use in the report. Report can have up to 2 group by clauses.", + "type": "array", + "items": { + "$ref": "#/definitions/ReportConfigGrouping" + }, + "maxItems": 2 + }, + "sorting": { + "description": "Array of order by expression to use in the report.", + "type": "array", + "items": { + "$ref": "#/definitions/ReportConfigSorting" + } + }, + "filter": { + "type": "object", + "description": "Has filter expression to use in the report.", + "$ref": "#/definitions/ReportConfigFilter" + } + } + }, + "ReportConfigDatasetConfiguration": { + "description": "The configuration of dataset in the report.", + "properties": { + "columns": { + "description": "Array of column names to be included in the report. Any valid report column name is allowed. If not provided, then report includes all columns.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "ReportConfigAggregation": { + "description": "The aggregation expression to be used in the report.", + "properties": { + "name": { + "description": "The name of the column to aggregate.", + "type": "string" + }, + "function": { + "description": "The name of the aggregation function to use.", + "type": "string", + "enum": [ + "Sum" + ], + "x-ms-enum": { + "name": "FunctionType", + "modelAsString": true + } + } + }, + "required": [ + "name", + "function" + ] + }, + "ReportConfigSorting": { + "description": "The order by expression to be used in the report.", + "properties": { + "direction": { + "description": "Direction of sort.", + "type": "string", + "enum": [ + "Ascending", + "Descending" + ] + }, + "name": { + "description": "The name of the column to sort.", + "type": "string" + } + }, + "required": [ + "name" + ] + }, + "ReportConfigGrouping": { + "description": "The group by expression to be used in the report.", + "properties": { + "type": { + "description": "Has type of the column to group.", + "$ref": "#/definitions/ReportConfigColumnType" + }, + "name": { + "description": "The name of the column to group. This version supports subscription lowest possible grain.", + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + "ReportConfigFilter": { + "description": "The filter expression to be used in the report.", + "properties": { + "and": { + "description": "The logical \"AND\" expression. Must have at least 2 items.", + "type": "array", + "items": { + "$ref": "#/definitions/ReportConfigFilter" + }, + "minItems": 2 + }, + "or": { + "description": "The logical \"OR\" expression. Must have at least 2 items.", + "type": "array", + "items": { + "$ref": "#/definitions/ReportConfigFilter" + }, + "minItems": 2 + }, + "not": { + "description": "The logical \"NOT\" expression.", + "$ref": "#/definitions/ReportConfigFilter" + }, + "dimension": { + "description": "Has comparison expression for a dimension", + "$ref": "#/definitions/ReportConfigComparisonExpression" + }, + "tag": { + "description": "Has comparison expression for a tag", + "$ref": "#/definitions/ReportConfigComparisonExpression" + } + } + }, + "ReportConfigColumnType": { + "description": "The type of the column in the report.", + "type": "string", + "enum": [ + "Tag", + "Dimension" + ], + "x-ms-enum": { + "name": "ReportConfigColumnType", + "modelAsString": true + } + }, + "ReportConfigComparisonExpression": { + "description": "The comparison expression to be used in the report.", + "properties": { + "name": { + "description": "The name of the column to use in comparison.", + "type": "string" + }, + "operator": { + "description": "The operator to use for comparison.", + "type": "string", + "enum": [ + "In", + "Contains" + ], + "x-ms-enum": { + "name": "OperatorType", + "modelAsString": true + } + }, + "values": { + "description": "Array of values to use for comparison", + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1 + } + }, + "required": [ + "name", + "operator", + "values" + ] + }, + "OperationListResult": { + "description": "Result of listing cost management operations. It contains a list of operations and a URL link to get the next set of results.", + "properties": { + "value": { + "description": "List of cost management operations supported by the Microsoft.CostManagement 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 + } + } + }, + "Operation": { + "description": "A Cost management 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.CostManagement.", + "type": "string", + "readOnly": true + }, + "resource": { + "description": "Resource on which the operation is performed: Dimensions, Query.", + "type": "string", + "readOnly": true + }, + "operation": { + "description": "Operation type: Read, write, delete, etc.", + "type": "string", + "readOnly": true + } + } + } + } + }, + "Scope": { + "type": "object", + "description": "The Scope model definition", + "properties": { + "id": { + "type": "string", + "description": "Scope id" + }, + "name": { + "type": "string", + "description": "Scope name" + }, + "type": { + "type": "string", + "description": "Scope type" + }, + "childScope": { + "$ref": "#/definitions/Scope" + } + } + }, + "ViewListResult": { + "description": "Result of listing views. It contains a list of available views.", + "type": "object", + "properties": { + "value": { + "description": "The list of views.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/View" + } + }, + "nextLink": { + "description": "The link (url) to the next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "View": { + "description": "States and configurations of Cost Analysis.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ViewProperties", + "title": "View properties" + } + } + }, + "ViewProperties": { + "type": "object", + "description": "The properties of the view.", + "properties": { + "displayName": { + "description": "User input name of the view. Required.", + "type": "string" + }, + "scope": { + "description": "Cost Management scope to save the view on. 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, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for BillingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, '/providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for ExternalBillingAccount scope, and '/providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for ExternalSubscription scope.", + "type": "string" + }, + "createdOn": { + "description": "Date the user created this view.", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "modifiedOn": { + "description": "Date when the user last modified this view.", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "query": { + "description": "Query body configuration. Required.", + "type": "object", + "x-ms-client-flatten": true, + "$ref": "#/definitions/ReportConfigDefinition" + }, + "chart": { + "description": "Chart type of the main view in Cost Analysis. Required.", + "type": "string", + "enum": [ + "Area", + "Line", + "StackedColumn", + "GroupedColumn", + "Table" + ], + "x-ms-enum": { + "name": "ChartType", + "modelAsString": true + } + }, + "accumulated": { + "description": "Show costs accumulated over time.", + "type": "string", + "enum": [ + "true", + "false" + ], + "x-ms-enum": { + "name": "AccumulatedType", + "modelAsString": true + } + }, + "metric": { + "description": "Metric to use when displaying costs.", + "type": "string", + "enum": [ + "ActualCost", + "AmortizedCost", + "AHUB" + ], + "x-ms-enum": { + "name": "MetricType", + "modelAsString": true + } + }, + "kpis": { + "description": "List of KPIs to show in Cost Analysis UI.", + "type": "array", + "items": { + "$ref": "#/definitions/KpiProperties" + } + }, + "pivots": { + "description": "Configuration of 3 sub-views in the Cost Analysis UI.", + "type": "array", + "items": { + "$ref": "#/definitions/PivotProperties" + } + } + } + }, + "KpiProperties": { + "description": "Each KPI must contain a 'type' and 'enabled' key.", + "type": "object", + "properties": { + "type": { + "description": "KPI type (Forecast, Budget).", + "type": "string", + "enum": [ + "Forecast", + "Budget" + ], + "x-ms-enum": { + "name": "KpiTypeType", + "modelAsString": true + } + }, + "id": { + "description": "ID of resource related to metric (budget).", + "type": "string" + }, + "enabled": { + "description": "show the KPI in the UI?", + "type": "boolean" + } + } + }, + "PivotProperties": { + "description": "Each pivot must contain a 'type' and 'name'.", + "type": "object", + "properties": { + "type": { + "description": "Data type to show in view.", + "type": "string", + "enum": [ + "Dimension", + "TagKey" + ], + "x-ms-enum": { + "name": "PivotTypeType", + "modelAsString": true + } + }, + "name": { + "description": "Data field to show in view.", + "type": "string" + } + } + }, + "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/BudgetModel" + } + }, + "nextLink": { + "description": "The link (url) to the next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "BudgetModel": { + "description": "A budget resource.", + "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" + }, + "filter": { + "description": "May be used to filter budgets.", + "type": "object", + "$ref": "#/definitions/ReportConfigFilter" + }, + "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": "NotificationOperatorType", + "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" + } + }, + "contactGroups": { + "description": "Action groups to send the budget notification to when the threshold is exceeded.", + "type": "array", + "items": { + "type": "string" + }, + "minItems": 0, + "maxItems": 50 + } + }, + "required": [ + "enabled", + "operator", + "threshold", + "contactEmails" + ] + } + }, + "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-04-01-preview" + }, + "subscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "description": "Azure Subscription ID.", + "required": true, + "type": "string" + }, + "billingAccountIdParameter": { + "name": "billingAccountId", + "in": "path", + "description": "BillingAccount ID", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "managementGroupIdParameter": { + "name": "managementGroupId", + "in": "path", + "description": "ManagementGroup ID", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "departmentIdParameter": { + "name": "departmentId", + "in": "path", + "description": "Department ID", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "enrollmentAccountIdParameter": { + "name": "enrollmentAccountId", + "in": "path", + "description": "Enrollment Account ID", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "resourceGroupNameParameter": { + "name": "resourceGroupName", + "in": "path", + "description": "Azure Resource Group Name.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "scopeViewParameter": { + "name": "scope", + "in": "path", + "required": true, + "type": "string", + "description": "The scope associated with view 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, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for BillingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for External Billing Account scope and 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External Subscription scope.", + "x-ms-parameter-location": "method" + }, + "viewNameParameter": { + "name": "viewName", + "in": "path", + "description": "View name", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "scopeBudgetParameter": { + "name": "scope", + "in": "path", + "required": true, + "type": "string", + "description": "The scope associated with budget 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, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope.", + "x-ms-parameter-location": "method", + "x-ms-skip-url-encoding": true + }, + "budgetNameParameter": { + "name": "budgetName", + "in": "path", + "description": "Budget Name.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/Budget.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/Budget.json new file mode 100644 index 000000000000..fd2bacba9ef7 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/Budget.json @@ -0,0 +1,91 @@ +{ + "parameters": { + "api-version": "2019-05-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "MYDEVTESTRG", + "budgetName": "TestBudget", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000" + }, + "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" + }, + "filter": { + "and": [ + { + "dimension": { + "name": "ResourceGroupName", + "operator": "In", + "values": [ + "MYDEVTESTRG" + ] + } + }, + { + "dimension": { + "name": "ResourceId", + "operator": "In", + "values": [ + "/subscriptions/{subscription-id}/resourceGroups/MYDEVTESTRG/providers/Microsoft.Compute/virtualMachines/MYVM2", + "/subscriptions/{subscription-id}/resourceGroups/MYDEVTESTRG/providers/Microsoft.Compute/virtualMachines/platformcloudplatformGeneric1" + ] + } + }, + { + "dimension": { + "name": "Meter", + "operator": "In", + "values": [ + "00000000-0000-0000-0000-000000000000" + ] + } + }, + { + "tag": { + "name": "Dev", + "operator": "In", + "values": [ + "engineering" + ] + } + } + ] + }, + "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" + ], + "contactGroups": [ + "/subscriptions/{subscription-id}/resourceGroups/MYDEVTESTRG/providers/microsoft.insights/actionGroups/SampleActionGroup" + ] + } + } + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BudgetsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BudgetsList.json new file mode 100644 index 000000000000..805e150c0edf --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BudgetsList.json @@ -0,0 +1,198 @@ +{ + "parameters": { + "api-version": "2019-05-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "MYDEVTESTRG", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000" + }, + "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" + }, + "filter": { + "and": [ + { + "dimension": { + "name": "ResourceGroupName", + "operator": "In", + "values": [ + "MYDEVTESTRG" + ] + } + }, + { + "dimension": { + "name": "ResourceId", + "operator": "In", + "values": [ + "/subscriptions/{subscription-id}/resourceGroups/MYDEVTESTRG/providers/Microsoft.Compute/virtualMachines/MYVM2", + "/subscriptions/{subscription-id}/resourceGroups/MYDEVTESTRG/providers/Microsoft.Compute/virtualMachines/platformcloudplatformGeneric1" + ] + } + }, + { + "dimension": { + "name": "Meter", + "operator": "In", + "values": [ + "00000000-0000-0000-0000-000000000000" + ] + } + }, + { + "tag": { + "name": "Dev", + "operator": "In", + "values": [ + "engineering" + ] + } + } + ] + }, + "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" + ], + "contactGroups": [ + "/subscriptions/{subscription-id}/resourceGroups/MYDEVTESTRG/providers/microsoft.insights/actionGroups/SampleActionGroup" + ] + } + } + } + }, + { + "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" + }, + "filter": { + "and": [ + { + "dimension": { + "name": "ResourceGroupName", + "operator": "In", + "values": [ + "MYDEVTESTRG" + ] + } + }, + { + "dimension": { + "name": "ResourceId", + "operator": "In", + "values": [ + "/subscriptions/{subscription-id}/resourceGroups/MYDEVTESTRG/providers/Microsoft.Compute/virtualMachines/MYVM2", + "/subscriptions/{subscription-id}/resourceGroups/MYDEVTESTRG/providers/Microsoft.Compute/virtualMachines/platformcloudplatformGeneric1" + ] + } + }, + { + "dimension": { + "name": "Meter", + "operator": "In", + "values": [ + "00000000-0000-0000-0000-000000000000" + ] + } + }, + { + "tag": { + "name": "Dev", + "operator": "In", + "values": [ + "engineering" + ] + } + } + ] + }, + "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" + ], + "contactGroups": [ + "/subscriptions/{subscription-id}/resourceGroups/MYDEVTESTRG/providers/microsoft.insights/actionGroups/SampleActionGroup" + ] + } + } + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CreateOrUpdateBudget.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CreateOrUpdateBudget.json new file mode 100644 index 000000000000..e71edf730de5 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CreateOrUpdateBudget.json @@ -0,0 +1,242 @@ +{ + "parameters": { + "api-version": "2019-05-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "MYDEVTESTRG", + "budgetName": "TestBudget", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "parameters": { + "eTag": "\"1d34d016a593709\"", + "properties": { + "category": "Cost", + "amount": 100.65, + "timeGrain": "Monthly", + "timePeriod": { + "startDate": "2017-10-01T00:00:00Z", + "endDate": "2018-10-31T00:00:00Z" + }, + "filter": { + "and": [ + { + "dimension": { + "name": "ResourceGroupName", + "operator": "In", + "values": [ + "MYDEVTESTRG" + ] + } + }, + { + "dimension": { + "name": "ResourceId", + "operator": "In", + "values": [ + "/subscriptions/{subscription-id}/resourceGroups/MYDEVTESTRG/providers/Microsoft.Compute/virtualMachines/MYVM2", + "/subscriptions/{subscription-id}/resourceGroups/MYDEVTESTRG/providers/Microsoft.Compute/virtualMachines/platformcloudplatformGeneric1" + ] + } + }, + { + "dimension": { + "name": "Meter", + "operator": "In", + "values": [ + "00000000-0000-0000-0000-000000000000" + ] + } + }, + { + "tag": { + "name": "Dev", + "operator": "In", + "values": [ + "engineering" + ] + } + } + ] + }, + "notifications": { + "Actual_GreaterThan_80_Percent": { + "enabled": true, + "operator": "GreaterThan", + "threshold": 80, + "contactEmails": [ + "johndoe@contoso.com", + "janesmith@contoso.com" + ], + "contactRoles": [ + "Contributor", + "Reader" + ], + "contactGroups": [ + "/subscriptions/{subscription-id}/resourceGroups/MYDEVTESTRG/providers/microsoft.insights/actionGroups/SampleActionGroup" + ] + } + } + } + } + }, + "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" + }, + "filter": { + "and": [ + { + "dimension": { + "name": "ResourceGroupName", + "operator": "In", + "values": [ + "MYDEVTESTRG" + ] + } + }, + { + "dimension": { + "name": "ResourceId", + "operator": "In", + "values": [ + "/subscriptions/{subscription-id}/resourceGroups/MYDEVTESTRG/providers/Microsoft.Compute/virtualMachines/MYVM2", + "/subscriptions/{subscription-id}/resourceGroups/MYDEVTESTRG/providers/Microsoft.Compute/virtualMachines/platformcloudplatformGeneric1" + ] + } + }, + { + "dimension": { + "name": "Meter", + "operator": "In", + "values": [ + "00000000-0000-0000-0000-000000000000" + ] + } + }, + { + "tag": { + "name": "Dev", + "operator": "In", + "values": [ + "engineering" + ] + } + } + ] + }, + "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" + ], + "contactGroups": [ + "/subscriptions/{subscription-id}/resourceGroups/MYDEVTESTRG/providers/microsoft.insights/actionGroups/SampleActionGroup" + ] + } + } + } + } + }, + "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" + }, + "filter": { + "and": [ + { + "dimension": { + "name": "ResourceGroupName", + "operator": "In", + "values": [ + "MYDEVTESTRG" + ] + } + }, + { + "dimension": { + "name": "ResourceId", + "operator": "In", + "values": [ + "/subscriptions/{subscription-id}/resourceGroups/MYDEVTESTRG/providers/Microsoft.Compute/virtualMachines/MYVM2", + "/subscriptions/{subscription-id}/resourceGroups/MYDEVTESTRG/providers/Microsoft.Compute/virtualMachines/platformcloudplatformGeneric1" + ] + } + }, + { + "dimension": { + "name": "Meter", + "operator": "In", + "values": [ + "00000000-0000-0000-0000-000000000000" + ] + } + }, + { + "tag": { + "name": "Dev", + "operator": "In", + "values": [ + "engineering" + ] + } + } + ] + }, + "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" + ], + "contactGroups": [ + "/subscriptions/{subscription-id}/resourceGroups/MYDEVTESTRG/providers/microsoft.insights/actionGroups/SampleActionGroup" + ] + } + } + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DeleteBudget.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DeleteBudget.json new file mode 100644 index 000000000000..53d0c16c522f --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DeleteBudget.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "api-version": "2019-05-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "MYDEVTESTRG", + "budgetName": "TestBudget", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateView.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateView.json new file mode 100644 index 000000000000..e96ebb9fdf7c --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateView.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "api-version": "2019-04-01-preview", + "viewName": "swaggerExample" + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.CostManagement/views/swaggerExample", + "name": "swaggerExample", + "type": "Microsoft.CostManagement/Views", + "eTag": "\"1d4ff9fe66f1d10\"", + "properties": { + "displayName": "swagger Example", + "scope": "", + "query": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [], + "sorting": [ + { + "direction": "Ascending", + "name": "UsageDate" + } + ] + } + }, + "chart": "Table", + "accumulated": "true", + "metric": "ActualCost", + "kpis": [ + { + "type": "Forecast", + "id": null, + "enabled": true + }, + { + "type": "Budget", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo", + "enabled": true + } + ], + "pivots": [ + { + "type": "Dimension", + "name": "ServiceName" + }, + { + "type": "Dimension", + "name": "MeterCategory" + }, + { + "type": "TagKey", + "name": "swaggerTagKey" + } + ] + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewCreateOrUpdate.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewCreateOrUpdate.json new file mode 100644 index 000000000000..85d18a6d302d --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewCreateOrUpdate.json @@ -0,0 +1,185 @@ +{ + "parameters": { + "api-version": "2019-04-01-preview", + "viewName": "swaggerExample", + "parameters": { + "eTag": "\"1d4ff9fe66f1d10\"", + "properties": { + "displayName": "swagger Example", + "query": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [], + "sorting": [ + { + "direction": "Ascending", + "name": "UsageDate" + } + ] + } + }, + "chart": "Table", + "accumulated": "true", + "metric": "ActualCost", + "kpis": [ + { + "type": "Forecast", + "id": null, + "enabled": true + }, + { + "type": "Budget", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo", + "enabled": true + } + ], + "pivots": [ + { + "type": "Dimension", + "name": "ServiceName" + }, + { + "type": "Dimension", + "name": "MeterCategory" + }, + { + "type": "TagKey", + "name": "swaggerTagKey" + } + ] + } + } + }, + "responses": { + "201": { + "body": { + "id": "/providers/Microsoft.CostManagement/views/swaggerExample", + "name": "swaggerExample", + "type": "Microsoft.CostManagement/Views", + "eTag": "\"1d4ffa5a9c2430c\"", + "properties": { + "displayName": "swagger Example", + "scope": "", + "query": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [], + "sorting": [ + { + "direction": "Ascending", + "name": "UsageDate" + } + ] + } + }, + "chart": "Table", + "accumulated": "true", + "metric": "ActualCost", + "kpis": [ + { + "type": "Forecast", + "id": null, + "enabled": true + }, + { + "type": "Budget", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo", + "enabled": true + } + ], + "pivots": [ + { + "type": "Dimension", + "name": "ServiceName" + }, + { + "type": "Dimension", + "name": "MeterCategory" + }, + { + "type": "TagKey", + "name": "swaggerTagKey" + } + ] + } + } + }, + "200": { + "body": { + "id": "/providers/Microsoft.CostManagement/views/swaggerExample", + "name": "swaggerExample", + "type": "Microsoft.CostManagement/Views", + "eTag": "\"1d4ffa5a9c2430c\"", + "properties": { + "displayName": "swagger Example", + "scope": "", + "query": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [], + "sorting": [ + { + "direction": "Ascending", + "name": "UsageDate" + } + ] + } + }, + "chart": "Table", + "accumulated": "true", + "metric": "ActualCost", + "kpis": [ + { + "type": "Forecast", + "id": null, + "enabled": true + }, + { + "type": "Budget", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo", + "enabled": true + } + ], + "pivots": [ + { + "type": "Dimension", + "name": "ServiceName" + }, + { + "type": "Dimension", + "name": "MeterCategory" + }, + { + "type": "TagKey", + "name": "swaggerTagKey" + } + ] + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewDelete.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewDelete.json new file mode 100644 index 000000000000..12a0239b9dc5 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewDelete.json @@ -0,0 +1,10 @@ +{ + "parameters": { + "api-version": "2019-04-01-preview", + "viewName": "TestView" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewList.json new file mode 100644 index 000000000000..86eb6ee3b68b --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewList.json @@ -0,0 +1,131 @@ +{ + "parameters": { + "api-version": "2019-04-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/providers/Microsoft.CostManagement/views/swaggerExample", + "name": "swaggerExample", + "type": "Microsoft.CostManagement/Views", + "eTag": "\"1d4ff9fe66f1d10\"", + "properties": { + "displayName": "swagger Example", + "scope": "", + "query": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [], + "sorting": [ + { + "direction": "Ascending", + "name": "UsageDate" + } + ] + } + }, + "chart": "Table", + "accumulated": "true", + "metric": "ActualCost", + "kpis": [ + { + "type": "Forecast", + "id": null, + "enabled": true + }, + { + "type": "Budget", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo", + "enabled": true + } + ], + "pivots": [ + { + "type": "Dimension", + "name": "ServiceName" + }, + { + "type": "Dimension", + "name": "MeterCategory" + }, + { + "type": "TagKey", + "name": "swaggerTagKey" + } + ] + } + }, + { + "id": "/providers/Microsoft.CostManagement/views/swaggerExample2", + "name": "swaggerExample2", + "type": "Microsoft.CostManagement/Views", + "eTag": "\"1d4ffa5a9c2430c\"", + "properties": { + "displayName": "swagger Example 2", + "scope": "", + "query": { + "type": "Usage", + "timeframe": "LastMonthToDate", + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [], + "sorting": [ + { + "direction": "Ascending", + "name": "UsageDate" + } + ] + } + }, + "chart": "GroupedColumn", + "accumulated": "true", + "metric": "ActualCost", + "kpis": [ + { + "type": "Forecast", + "id": null, + "enabled": true + }, + { + "type": "Budget", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo", + "enabled": true + } + ], + "pivots": [ + { + "type": "Dimension", + "name": "ServiceName" + }, + { + "type": "Dimension", + "name": "MeterCategory" + }, + { + "type": "TagKey", + "name": "swaggerTagKey" + } + ] + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewByResourceGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewByResourceGroup.json new file mode 100644 index 000000000000..4a76a9b898a0 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewByResourceGroup.json @@ -0,0 +1,70 @@ +{ + "parameters": { + "api-version": "2019-04-01-preview", + "viewName": "swaggerExample", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/views/swaggerExample", + "name": "swaggerExample", + "type": "Microsoft.CostManagement/Views", + "eTag": "\"1d4ff9fe66f1d10\"", + "properties": { + "displayName": "swagger Example", + "scope": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", + "query": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [], + "sorting": [ + { + "direction": "Ascending", + "name": "UsageDate" + } + ] + } + }, + "chart": "Table", + "accumulated": "true", + "metric": "ActualCost", + "kpis": [ + { + "type": "Forecast", + "id": null, + "enabled": true + }, + { + "type": "Budget", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo", + "enabled": true + } + ], + "pivots": [ + { + "type": "Dimension", + "name": "ServiceName" + }, + { + "type": "Dimension", + "name": "MeterCategory" + }, + { + "type": "TagKey", + "name": "swaggerTagKey" + } + ] + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewCreateOrUpdateByResourceGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewCreateOrUpdateByResourceGroup.json new file mode 100644 index 000000000000..1edc69822cad --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewCreateOrUpdateByResourceGroup.json @@ -0,0 +1,186 @@ +{ + "parameters": { + "api-version": "2019-04-01-preview", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", + "viewName": "swaggerExample", + "parameters": { + "eTag": "\"1d4ff9fe66f1d10\"", + "properties": { + "displayName": "swagger Example", + "query": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [], + "sorting": [ + { + "direction": "Ascending", + "name": "UsageDate" + } + ] + } + }, + "chart": "Table", + "accumulated": "true", + "metric": "ActualCost", + "kpis": [ + { + "type": "Forecast", + "id": null, + "enabled": true + }, + { + "type": "Budget", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo", + "enabled": true + } + ], + "pivots": [ + { + "type": "Dimension", + "name": "ServiceName" + }, + { + "type": "Dimension", + "name": "MeterCategory" + }, + { + "type": "TagKey", + "name": "swaggerTagKey" + } + ] + } + } + }, + "responses": { + "201": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/views/swaggerExample", + "name": "swaggerExample", + "type": "Microsoft.CostManagement/Views", + "eTag": "\"1d4ffa5a9c2430c\"", + "properties": { + "displayName": "swagger Example", + "scope": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", + "query": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [], + "sorting": [ + { + "direction": "Ascending", + "name": "UsageDate" + } + ] + } + }, + "chart": "Table", + "accumulated": "true", + "metric": "ActualCost", + "kpis": [ + { + "type": "Forecast", + "id": null, + "enabled": true + }, + { + "type": "Budget", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo", + "enabled": true + } + ], + "pivots": [ + { + "type": "Dimension", + "name": "ServiceName" + }, + { + "type": "Dimension", + "name": "MeterCategory" + }, + { + "type": "TagKey", + "name": "swaggerTagKey" + } + ] + } + } + }, + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/views/swaggerExample", + "name": "swaggerExample", + "type": "Microsoft.CostManagement/Views", + "eTag": "\"1d4ffa5a9c2430c\"", + "properties": { + "displayName": "swagger Example", + "scope": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", + "query": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [], + "sorting": [ + { + "direction": "Ascending", + "name": "UsageDate" + } + ] + } + }, + "chart": "Table", + "accumulated": "true", + "metric": "ActualCost", + "kpis": [ + { + "type": "Forecast", + "id": null, + "enabled": true + }, + { + "type": "Budget", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo", + "enabled": true + } + ], + "pivots": [ + { + "type": "Dimension", + "name": "ServiceName" + }, + { + "type": "Dimension", + "name": "MeterCategory" + }, + { + "type": "TagKey", + "name": "swaggerTagKey" + } + ] + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewDeleteByResourceGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewDeleteByResourceGroup.json new file mode 100644 index 000000000000..3a9f210abf3e --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewDeleteByResourceGroup.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "api-version": "2019-04-01-preview", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", + "viewName": "TestView" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewListByResourceGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewListByResourceGroup.json new file mode 100644 index 000000000000..39edbdffbdea --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewListByResourceGroup.json @@ -0,0 +1,132 @@ +{ + "parameters": { + "api-version": "2019-04-01-preview", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/views/swaggerExample", + "name": "swaggerExample", + "type": "Microsoft.CostManagement/Views", + "eTag": "\"1d4ff9fe66f1d10\"", + "properties": { + "displayName": "swagger Example", + "scope": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", + "query": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [], + "sorting": [ + { + "direction": "Ascending", + "name": "UsageDate" + } + ] + } + }, + "chart": "Table", + "accumulated": "true", + "metric": "ActualCost", + "kpis": [ + { + "type": "Forecast", + "id": null, + "enabled": true + }, + { + "type": "Budget", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo", + "enabled": true + } + ], + "pivots": [ + { + "type": "Dimension", + "name": "ServiceName" + }, + { + "type": "Dimension", + "name": "MeterCategory" + }, + { + "type": "TagKey", + "name": "swaggerTagKey" + } + ] + } + }, + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/views/swaggerExample2", + "name": "swaggerExample2", + "type": "Microsoft.CostManagement/Views", + "eTag": "\"1d4ffa5a9c2430c\"", + "properties": { + "displayName": "swagger Example 2", + "scope": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", + "query": { + "type": "Usage", + "timeframe": "LastMonthToDate", + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [], + "sorting": [ + { + "direction": "Ascending", + "name": "UsageDate" + } + ] + } + }, + "chart": "GroupedColumn", + "accumulated": "true", + "metric": "ActualCost", + "kpis": [ + { + "type": "Forecast", + "id": null, + "enabled": true + }, + { + "type": "Budget", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo", + "enabled": true + } + ], + "pivots": [ + { + "type": "Dimension", + "name": "ServiceName" + }, + { + "type": "Dimension", + "name": "MeterCategory" + }, + { + "type": "TagKey", + "name": "swaggerTagKey" + } + ] + } + } + ] + } + } + } +} From 727e1f4f2b03a44e07cf053860b3b7e42a88cb7d Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Wed, 10 Jun 2020 21:26:06 -0700 Subject: [PATCH 02/53] Updates readme --- .../cost-management/resource-manager/readme.md | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/specification/cost-management/resource-manager/readme.md b/specification/cost-management/resource-manager/readme.md index 12dadfcd7709..9afeedc98968 100644 --- a/specification/cost-management/resource-manager/readme.md +++ b/specification/cost-management/resource-manager/readme.md @@ -26,18 +26,26 @@ These are the global settings for the Cost Management API. ``` yaml openapi-type: arm -tag: package-2019-11 +tag: package-preview-2020-03 azure-validator: false ``` --- +### Tag: package-preview-2020-03 + +These settings apply only when `--tag=package-preview-2020-03` is specified on the command line. + +```yaml $(tag) == 'package-preview-2020-03' +input-file: + - Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json +``` ### Tag: package-2019-11 These settings apply only when `--tag=package-2019-11` is specified on the command line. -```yaml $(tag) == 'package-2019-11' +``` yaml $(tag) == 'package-2019-11' input-file: - Microsoft.CostManagement/stable/2019-11-01/costmanagement.json ``` @@ -46,10 +54,11 @@ input-file: These settings apply only when `--tag=package-2019-10` is specified on the command line. -```yaml $(tag) == 'package-2019-10' +``` yaml $(tag) == 'package-2019-10' input-file: - Microsoft.CostManagement/stable/2019-10-01/costmanagement.json ``` + ### Tag: package-2019-09 These settings apply only when `--tag=package-2019-09` is specified on the command line. @@ -207,7 +216,6 @@ csharp: clear-output-folder: true ``` - ## Go See configuration in [readme.go.md](./readme.go.md) From 6c98a4fb7a4fef572ca54cadaa1ddbdf46677126 Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Wed, 10 Jun 2020 21:26:09 -0700 Subject: [PATCH 03/53] Updates API version in new specs and examples --- .../preview/2020-03-01-preview/costmanagement.json | 4 ++-- .../preview/2020-03-01-preview/examples/PrivateView.json | 2 +- .../examples/PrivateViewCreateOrUpdate.json | 2 +- .../2020-03-01-preview/examples/PrivateViewDelete.json | 2 +- .../preview/2020-03-01-preview/examples/PrivateViewList.json | 2 +- .../2020-03-01-preview/examples/ViewByResourceGroup.json | 2 +- .../examples/ViewCreateOrUpdateByResourceGroup.json | 2 +- .../examples/ViewDeleteByResourceGroup.json | 2 +- .../2020-03-01-preview/examples/ViewListByResourceGroup.json | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json index 6ee1ded63ee5..574754378955 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "version": "2019-04-01-preview", + "version": "2020-03-01-preview", "title": "CostManagementClient" }, "host": "management.azure.com", @@ -1399,7 +1399,7 @@ "in": "query", "required": true, "type": "string", - "description": "Version of the API to be used with the client request. The current version is 2019-04-01-preview" + "description": "Version of the API to be used with the client request. The current version is 2020-03-01-preview" }, "subscriptionIdParameter": { "name": "subscriptionId", diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateView.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateView.json index e96ebb9fdf7c..509769280120 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateView.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateView.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2019-04-01-preview", + "api-version": "2020-03-01-preview", "viewName": "swaggerExample" }, "responses": { diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewCreateOrUpdate.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewCreateOrUpdate.json index 85d18a6d302d..b745d0d11755 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewCreateOrUpdate.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewCreateOrUpdate.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2019-04-01-preview", + "api-version": "2020-03-01-preview", "viewName": "swaggerExample", "parameters": { "eTag": "\"1d4ff9fe66f1d10\"", diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewDelete.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewDelete.json index 12a0239b9dc5..5e8d06fa9da3 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewDelete.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewDelete.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2019-04-01-preview", + "api-version": "2020-03-01-preview", "viewName": "TestView" }, "responses": { diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewList.json index 86eb6ee3b68b..7e746c0be585 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewList.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewList.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2019-04-01-preview" + "api-version": "2020-03-01-preview" }, "responses": { "200": { diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewByResourceGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewByResourceGroup.json index 4a76a9b898a0..96ce0e1de322 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewByResourceGroup.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewByResourceGroup.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2019-04-01-preview", + "api-version": "2020-03-01-preview", "viewName": "swaggerExample", "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG" }, diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewCreateOrUpdateByResourceGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewCreateOrUpdateByResourceGroup.json index 1edc69822cad..6b73395fe112 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewCreateOrUpdateByResourceGroup.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewCreateOrUpdateByResourceGroup.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2019-04-01-preview", + "api-version": "2020-03-01-preview", "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", "viewName": "swaggerExample", "parameters": { diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewDeleteByResourceGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewDeleteByResourceGroup.json index 3a9f210abf3e..c2313bebf766 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewDeleteByResourceGroup.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewDeleteByResourceGroup.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2019-04-01-preview", + "api-version": "2020-03-01-preview", "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", "viewName": "TestView" }, diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewListByResourceGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewListByResourceGroup.json index 39edbdffbdea..10a940677e0d 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewListByResourceGroup.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewListByResourceGroup.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2019-04-01-preview", + "api-version": "2020-03-01-preview", "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG" }, "responses": { From ba3043d3cc21b40b7cbe6ec4aeb439610819bc37 Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Wed, 10 Jun 2020 22:10:21 -0700 Subject: [PATCH 04/53] Sync to private repo change set --- .../2020-03-01-preview/costmanagement.json | 1454 +++-------------- .../2020-03-01-preview/examples/Budget.json | 91 -- .../examples/BudgetsList.json | 198 --- ...stAllocationRuleCheckNameAvailability.json | 20 + .../examples/CostAllocationRuleCreate.json | 82 + ...ete.json => CostAllocationRuleDelete.json} | 6 +- .../examples/CostAllocationRuleGet.json | 48 + .../examples/CostAllocationRulesList.json | 89 + .../examples/CreateOrUpdateBudget.json | 242 --- .../examples/DeleteBudget.json | 13 - .../examples/PrivateView.json | 69 - .../examples/PrivateViewCreateOrUpdate.json | 185 --- .../examples/PrivateViewList.json | 131 -- .../examples/ViewByResourceGroup.json | 70 - .../ViewCreateOrUpdateByResourceGroup.json | 186 --- .../examples/ViewDeleteByResourceGroup.json | 11 - .../examples/ViewListByResourceGroup.json | 132 -- 17 files changed, 488 insertions(+), 2539 deletions(-) delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/Budget.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BudgetsList.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCheckNameAvailability.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCreate.json rename specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/{PrivateViewDelete.json => CostAllocationRuleDelete.json} (55%) create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleGet.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRulesList.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CreateOrUpdateBudget.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DeleteBudget.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateView.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewCreateOrUpdate.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewList.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewByResourceGroup.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewCreateOrUpdateByResourceGroup.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewDeleteByResourceGroup.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewListByResourceGroup.json diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json index 574754378955..36d37b53c44f 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json @@ -1,8 +1,8 @@ { "swagger": "2.0", "info": { - "version": "2020-03-01-preview", - "title": "CostManagementClient" + "title": "CostManagementClient", + "version": "2020-03-01-preview" }, "host": "management.azure.com", "schemes": [ @@ -33,137 +33,52 @@ } }, "paths": { - "/providers/Microsoft.CostManagement/views": { + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules": { "get": { "tags": [ - "Views" + "CostAllocationRules" ], - "operationId": "Views_List", - "description": "Lists all views by tenant and object.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" - }, + "operationId": "Get_Rules", + "description": "Get the list of all cost allocation rules", "x-ms-examples": { - "PrivateViewList": { - "$ref": "./examples/PrivateViewList.json" + "CostAllocationRules_List": { + "$ref": "./examples/CostAllocationRulesList.json" } }, "parameters": [ { "$ref": "#/parameters/apiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/ViewListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/{scope}/providers/Microsoft.CostManagement/views": { - "get": { - "tags": [ - "Views" - ], - "operationId": "Views_ListByScope", - "description": "Lists all views at the given scope.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" - }, - "x-ms-examples": { - "ResourceGroupViewList": { - "$ref": "./examples/ViewListByResourceGroup.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/scopeViewParameter" }, { - "$ref": "#/parameters/apiVersionParameter" + "$ref": "#/parameters/billingAccountIdParameter" } ], "responses": { "200": { - "description": "OK. The request has succeeded.", + "description": "List of cost allocation rules for the billing account.", "schema": { - "$ref": "#/definitions/ViewListResult" + "$ref": "#/definitions/CostAllocationRuleListResponse" } }, "default": { - "description": "Error response describing why the operation failed.", + "description": "Error response describing why the operation failed", "schema": { "$ref": "#/definitions/ErrorResponse" } } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" } } }, - "/providers/Microsoft.CostManagement/views/{viewName}": { - "get": { - "tags": [ - "Views" - ], - "operationId": "Views_Get", - "description": "Gets the view by view name.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" - }, - "x-ms-examples": { - "PrivateView": { - "$ref": "./examples/PrivateView.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/apiVersionParameter" - }, - { - "$ref": "#/parameters/viewNameParameter" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/View" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - }, - "put": { + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules/checknameavailability": { + "post": { "tags": [ - "Views" + "CostAllocationRules" ], - "operationId": "Views_CreateOrUpdate", - "description": "The operation to create or update a view. Update operation requires latest eTag to be set in the request. 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/costmanagement/" - }, + "operationId": "Check_CostAllocationRuleNameAvailability", + "description": "Check if a given rule name is in use", "x-ms-examples": { - "CreateOrUpdatePrivateView": { - "$ref": "./examples/PrivateViewCreateOrUpdate.json" + "CostAllocationRuleCheckNameAvailability": { + "$ref": "./examples/CostAllocationRuleCheckNameAvailability.json" } }, "parameters": [ @@ -171,70 +86,27 @@ "$ref": "#/parameters/apiVersionParameter" }, { - "$ref": "#/parameters/viewNameParameter" + "$ref": "#/parameters/billingAccountIdParameter" }, { - "name": "parameters", + "name": "costAllocationRuleCheckNameAvailabilityRequest", + "description": "Cost allocation rule to be created/updated", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/View" - }, - "description": "Parameters supplied to the CreateOrUpdate View operation." + "$ref": "#/definitions/CostAllocationRuleCheckNameAvailabilityRequest" + } } ], "responses": { "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/View" - } - }, - "201": { - "description": "Created.", - "schema": { - "$ref": "#/definitions/View" - } - }, - "default": { - "description": "Error response describing why the operation failed.", + "description": "Response of cost allocation rule name availability.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "#/definitions/CostAllocationRuleCheckNameAvailabilityResponse" } - } - } - }, - "delete": { - "tags": [ - "Views" - ], - "operationId": "Views_Delete", - "description": "The operation to delete a view.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" - }, - "x-ms-examples": { - "DeletePrivateView": { - "$ref": "./examples/PrivateViewDelete.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/apiVersionParameter" - }, - { - "$ref": "#/parameters/viewNameParameter" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded." - }, - "204": { - "description": "NoContent. Resource is not available." }, "default": { - "description": "Error response describing why the operation failed.", + "description": "Error response describing why the operation failed", "schema": { "$ref": "#/definitions/ErrorResponse" } @@ -242,37 +114,34 @@ } } }, - "/{scope}/providers/Microsoft.CostManagement/views/{viewName}": { + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules/{ruleId}": { "get": { "tags": [ - "Views" + "CostAllocationRules" ], - "operationId": "Views_GetByScope", - "description": "Gets the view for the defined scope by view name.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" - }, + "operationId": "Get_Rule", + "description": "Gets the cost allocation rule by rule name.", "x-ms-examples": { - "ResourceGroupView": { - "$ref": "./examples/ViewByResourceGroup.json" + "CostAllocationRules": { + "$ref": "./examples/CostAllocationRuleGet.json" } }, "parameters": [ { - "$ref": "#/parameters/scopeViewParameter" + "$ref": "#/parameters/apiVersionParameter" }, { - "$ref": "#/parameters/apiVersionParameter" + "$ref": "#/parameters/billingAccountIdParameter" }, { - "$ref": "#/parameters/viewNameParameter" + "$ref": "#/parameters/ruleNameParameter" } ], "responses": { "200": { "description": "OK. The request has succeeded.", "schema": { - "$ref": "#/definitions/View" + "$ref": "#/definitions/CostAllocationRuleDefinition" } }, "default": { @@ -285,49 +154,40 @@ }, "put": { "tags": [ - "Views" + "CostAllocationRules" ], - "operationId": "Views_CreateOrUpdateByScope", - "description": "The operation to create or update a view. Update operation requires latest eTag to be set in the request. 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/costmanagement/" - }, + "operationId": "Create_Rule", + "description": "Create/Update cost allocation rule for billing account.", "x-ms-examples": { - "ResourceGroupCreateOrUpdateView": { - "$ref": "./examples/ViewCreateOrUpdateByResourceGroup.json" + "CostAllocationRules": { + "$ref": "./examples/CostAllocationRuleCreate.json" } }, "parameters": [ { - "$ref": "#/parameters/scopeViewParameter" + "$ref": "#/parameters/apiVersionParameter" }, { - "$ref": "#/parameters/apiVersionParameter" + "$ref": "#/parameters/billingAccountIdParameter" }, { - "$ref": "#/parameters/viewNameParameter" + "$ref": "#/parameters/ruleNameParameter" }, { - "name": "parameters", + "name": "costAllocationRule", + "description": "Cost allocation rule to be created/updated", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/View" - }, - "description": "Parameters supplied to the CreateOrUpdate View operation." + "$ref": "#/definitions/CostAllocationRuleDefinition" + } } ], "responses": { "200": { "description": "OK. The request has succeeded.", "schema": { - "$ref": "#/definitions/View" - } - }, - "201": { - "description": "Created.", - "schema": { - "$ref": "#/definitions/View" + "$ref": "#/definitions/CostAllocationRuleDefinition" } }, "default": { @@ -340,36 +200,30 @@ }, "delete": { "tags": [ - "Views" + "CostAllocationRules" ], - "operationId": "Views_DeleteByScope", - "description": "The operation to delete a view.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" - }, + "operationId": "Delete_Rule", + "description": "Delete cost allocation rule for billing account.", "x-ms-examples": { - "ResourceGroupDeleteView": { - "$ref": "./examples/ViewDeleteByResourceGroup.json" + "CostAllocationRules": { + "$ref": "./examples/CostAllocationRuleDelete.json" } }, "parameters": [ { - "$ref": "#/parameters/scopeViewParameter" + "$ref": "#/parameters/apiVersionParameter" }, { - "$ref": "#/parameters/apiVersionParameter" + "$ref": "#/parameters/billingAccountIdParameter" }, { - "$ref": "#/parameters/viewNameParameter" + "$ref": "#/parameters/ruleNameParameter" } ], "responses": { "200": { "description": "OK. The request has succeeded." }, - "204": { - "description": "NoContent. Resource is not available." - }, "default": { "description": "Error response describing why the operation failed.", "schema": { @@ -378,1019 +232,267 @@ } } } - }, - "/{scope}/providers/Microsoft.CostManagement/budgets": { - "get": { - "tags": [ - "Budgets" - ], - "operationId": "Budgets_List", - "description": "Lists all budgets for the defined scope.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/cost-management/" + } + }, + "definitions": { + "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": { + "code": { + "type": "string", + "description": "Error code" }, - "x-ms-examples": { - "BudgetsList": { - "$ref": "./examples/BudgetsList.json" - } + "message": { + "type": "string", + "description": "Error message with additional details." }, - "parameters": [ - { - "$ref": "#/parameters/scopeBudgetParameter" - }, - { - "$ref": "#/parameters/apiVersionParameter" - } - ], - "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" - } + "correlationId": { + "type": "string", + "description": "Tracking id for support reference" + } + } + }, + "CostAllocationRuleListResponse": { + "type": "object", + "description": "Result of listing cost allocation rules. It contains a list of available rules in the billing account provided.", + "properties": { + "value": { + "description": "The list of cost allocation rules.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/CostAllocationRuleDefinition" } }, - "x-ms-pageable": { - "nextLinkName": "nextLink" + "nextLink": { + "description": "URL to get the next set of rule list results if there are any.", + "type": "string", + "readOnly": true } } }, - "/{scope}/providers/Microsoft.CostManagement/budgets/{budgetName}": { - "get": { - "tags": [ - "Budgets" - ], - "operationId": "Budget_Get", - "description": "Gets the budget for the scope by budget name.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/cost-management/" - }, - "x-ms-examples": { - "Budget": { - "$ref": "./examples/Budget.json" - } + "CostAllocationRuleCheckNameAvailabilityRequest": { + "type": "object", + "description": "The cost allocation rule check name availability request", + "properties": { + "name": { + "type": "string", + "description": "Rule name" }, - "parameters": [ - { - "$ref": "#/parameters/scopeBudgetParameter" - }, - { - "$ref": "#/parameters/apiVersionParameter" - }, - { - "$ref": "#/parameters/budgetNameParameter" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/BudgetModel" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } + "type": { + "type": "string", + "description": "Resource type" } - }, - "put": { - "tags": [ - "Budgets" - ], - "operationId": "Budget_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/cost-management/" + } + }, + "CostAllocationRuleCheckNameAvailabilityResponse": { + "type": "object", + "description": "The cost allocation rule check name availability response", + "properties": { + "nameAvailable": { + "type": "boolean", + "description": "Whether this rule name is available" }, - "x-ms-examples": { - "CreateOrUpdateBudget": { - "$ref": "./examples/CreateOrUpdateBudget.json" - } + "reason": { + "$ref": "#/definitions/Reason", + "description": "The reason this name is not available" }, - "parameters": [ - { - "$ref": "#/parameters/scopeBudgetParameter" - }, - { - "$ref": "#/parameters/apiVersionParameter" - }, - { - "$ref": "#/parameters/budgetNameParameter" - }, - { - "name": "parameters", - "in": "body", - "x-required": true, - "schema": { - "$ref": "#/definitions/BudgetModel" - }, - "description": "Parameters supplied to the Create Budget operation." - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/BudgetModel" - } - }, - "201": { - "description": "Created.", - "schema": { - "$ref": "#/definitions/BudgetModel" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } + "message": { + "type": "string", + "description": "Error message if the name is not available" } - }, - "delete": { - "tags": [ - "Budgets" - ], - "operationId": "Budget_Delete", - "description": "The operation to delete a budget.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/cost-management/" + } + }, + "Reason": { + "type": "string", + "description": "The reason this name is not available", + "enum": [ + "Invalid", + "AlreadyExists" + ], + "x-ms-enum": { + "name": "Reason", + "modelAsString": true + } + }, + "CostAllocationRuleDefinition": { + "type": "object", + "description": "The cost allocation rule model definition", + "properties": { + "id": { + "type": "string", + "readOnly": true, + "description": "Rule id" }, - "x-ms-examples": { - "DeleteBudget": { - "$ref": "./examples/DeleteBudget.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/scopeBudgetParameter" - }, - { - "$ref": "#/parameters/apiVersionParameter" - }, - { - "$ref": "#/parameters/budgetNameParameter" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded." - }, - "204": { - "description": "NoContent. Resource is not available." - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/providers/Microsoft.CostManagement/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": { - "ErrorBase": { - "description": "The details of the error.", - "properties": { - "code": { - "type": "string", - "description": "A machine readable error code.", - "readOnly": true - }, - "message": { - "type": "string", - "description": "A human readable error message.", - "readOnly": true - }, - "target": { - "type": "string", - "description": "Indicates which property in the request is responsible for the error.", - "readOnly": true - } - } - }, - "ErrorDetails": { - "description": "The details of the error.", - "properties": { - "code": { - "description": "A machine readable error code.", - "type": "string", - "readOnly": true - }, - "message": { - "description": "A human readable error message.", - "type": "string", - "readOnly": true - }, - "target": { - "description": "Indicates which property in the request is responsible for the error.", - "type": "string" - }, - "details": { - "description": "error details.", - "type": "array", - "items": { - "$ref": "#/definitions/ErrorBase" - } - } - } - }, - "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" - } - } - }, - "Resource": { - "description": "The Resource model definition.", - "properties": { - "id": { - "readOnly": true, - "type": "string", - "description": "Resource Id." - }, - "name": { - "readOnly": true, - "type": "string", - "description": "Resource name." + "name": { + "type": "string", + "readOnly": true, + "description": "Rule name" }, "type": { - "readOnly": true, "type": "string", - "description": "Resource type." - }, - "tags": { "readOnly": true, - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Resource tags." - } - }, - "x-ms-azure-resource": true - }, - "ProxyResource": { - "description": "The Resource model definition.", - "properties": { - "id": { - "readOnly": true, - "type": "string", - "description": "Resource Id." - }, - "name": { - "readOnly": true, - "type": "string", - "description": "Resource name." + "description": "Resource type" }, - "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." + "properties": { + "$ref": "#/definitions/CostAllocationRuleProperties", + "description": "Cost allocation rule properties" } }, "x-ms-azure-resource": true }, - "ReportConfigDefinition": { - "description": "The definition of a report config.", - "properties": { - "type": { - "description": "The type of the report. Usage represents actual usage, forecast represents forecasted data and UsageAndForecast represents both usage and forecasted data. Actual usage and forecasted data can be differentiated based on dates.", - "type": "string", - "enum": [ - "Usage" - ], - "x-ms-enum": { - "name": "ReportType", - "modelAsString": true - } - }, - "timeframe": { - "description": "The time frame for pulling data for the report. If custom, then a specific time period must be provided.", - "type": "string", - "enum": [ - "WeekToDate", - "MonthToDate", - "YearToDate", - "Custom" - ], - "x-ms-enum": { - "name": "TimeframeType", - "modelAsString": true - } - }, - "timePeriod": { - "description": "Has time period for pulling data for the report.", - "$ref": "#/definitions/ReportConfigTimePeriod" - }, - "dataset": { - "description": "Has definition for data in this report config.", - "$ref": "#/definitions/ReportConfigDataset" - } - }, - "required": [ - "type", - "timeframe" - ] - }, - "ReportConfigTimePeriod": { - "description": "The start and end date for pulling data for the report.", - "properties": { - "from": { - "description": "The start date to pull data from.", - "type": "string", - "format": "date-time" - }, - "to": { - "description": "The end date to pull data to.", - "type": "string", - "format": "date-time" - } - }, - "required": [ - "from", - "to" - ] - }, - "ReportConfigDataset": { - "description": "The definition of data present in the report.", - "properties": { - "granularity": { - "description": "The granularity of rows in the report.", - "type": "string", - "enum": [ - "Daily", - "Monthly" - ], - "x-ms-enum": { - "name": "GranularityType", - "modelAsString": true - } - }, - "configuration": { - "description": "Has configuration information for the data in the report. The configuration will be ignored if aggregation and grouping are provided.", - "$ref": "#/definitions/ReportConfigDatasetConfiguration" - }, - "aggregation": { - "type": "object", - "description": "Dictionary of aggregation expression to use in the report. The key of each item in the dictionary is the alias for the aggregated column. Report can have up to 2 aggregation clauses.", - "additionalProperties": { - "type": "object", - "$ref": "#/definitions/ReportConfigAggregation" - }, - "maxItems": 2 - }, - "grouping": { - "description": "Array of group by expression to use in the report. Report can have up to 2 group by clauses.", - "type": "array", - "items": { - "$ref": "#/definitions/ReportConfigGrouping" - }, - "maxItems": 2 - }, - "sorting": { - "description": "Array of order by expression to use in the report.", - "type": "array", - "items": { - "$ref": "#/definitions/ReportConfigSorting" - } - }, - "filter": { - "type": "object", - "description": "Has filter expression to use in the report.", - "$ref": "#/definitions/ReportConfigFilter" - } - } - }, - "ReportConfigDatasetConfiguration": { - "description": "The configuration of dataset in the report.", - "properties": { - "columns": { - "description": "Array of column names to be included in the report. Any valid report column name is allowed. If not provided, then report includes all columns.", - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "ReportConfigAggregation": { - "description": "The aggregation expression to be used in the report.", - "properties": { - "name": { - "description": "The name of the column to aggregate.", - "type": "string" - }, - "function": { - "description": "The name of the aggregation function to use.", - "type": "string", - "enum": [ - "Sum" - ], - "x-ms-enum": { - "name": "FunctionType", - "modelAsString": true - } - } - }, + "CostAllocationRuleProperties": { + "type": "object", + "description": "The properties of a cost allocation rule", + "additionalProperties": false, "required": [ - "name", - "function" - ] - }, - "ReportConfigSorting": { - "description": "The order by expression to be used in the report.", + "status", + "details" + ], "properties": { - "direction": { - "description": "Direction of sort.", - "type": "string", - "enum": [ - "Ascending", - "Descending" - ] - }, - "name": { - "description": "The name of the column to sort.", + "description": { + "description": "Description of a cost allocation rule.", "type": "string" - } - }, - "required": [ - "name" - ] - }, - "ReportConfigGrouping": { - "description": "The group by expression to be used in the report.", - "properties": { - "type": { - "description": "Has type of the column to group.", - "$ref": "#/definitions/ReportConfigColumnType" }, - "name": { - "description": "The name of the column to group. This version supports subscription lowest possible grain.", - "type": "string" - } - }, - "required": [ - "type", - "name" - ] - }, - "ReportConfigFilter": { - "description": "The filter expression to be used in the report.", - "properties": { - "and": { - "description": "The logical \"AND\" expression. Must have at least 2 items.", - "type": "array", - "items": { - "$ref": "#/definitions/ReportConfigFilter" - }, - "minItems": 2 - }, - "or": { - "description": "The logical \"OR\" expression. Must have at least 2 items.", - "type": "array", - "items": { - "$ref": "#/definitions/ReportConfigFilter" - }, - "minItems": 2 - }, - "not": { - "description": "The logical \"NOT\" expression.", - "$ref": "#/definitions/ReportConfigFilter" - }, - "dimension": { - "description": "Has comparison expression for a dimension", - "$ref": "#/definitions/ReportConfigComparisonExpression" + "status": { + "$ref": "#/definitions/RuleStatus", + "description": "Status of the rule" }, - "tag": { - "description": "Has comparison expression for a tag", - "$ref": "#/definitions/ReportConfigComparisonExpression" + "details": { + "description": "Resource information for the cost allocation rule", + "$ref": "#/definitions/CostAllocationRuleDetails" } } }, - "ReportConfigColumnType": { - "description": "The type of the column in the report.", + "RuleStatus": { "type": "string", + "description": "Current status of the rule", "enum": [ - "Tag", - "Dimension" + "NotActive", + "Active", + "Processing" ], "x-ms-enum": { - "name": "ReportConfigColumnType", + "name": "RuleStatus", "modelAsString": true } }, - "ReportConfigComparisonExpression": { - "description": "The comparison expression to be used in the report.", - "properties": { - "name": { - "description": "The name of the column to use in comparison.", - "type": "string" - }, - "operator": { - "description": "The operator to use for comparison.", - "type": "string", - "enum": [ - "In", - "Contains" - ], - "x-ms-enum": { - "name": "OperatorType", - "modelAsString": true - } - }, - "values": { - "description": "Array of values to use for comparison", - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1 - } - }, - "required": [ - "name", - "operator", - "values" - ] - }, - "OperationListResult": { - "description": "Result of listing cost management operations. It contains a list of operations and a URL link to get the next set of results.", + "CostAllocationRuleDetails": { + "type": "object", + "description": "Resource details of the cost allocation rule", "properties": { - "value": { - "description": "List of cost management operations supported by the Microsoft.CostManagement resource provider.", + "sourceResources": { + "description": "Source resources for cost allocation", "type": "array", - "readOnly": true, "items": { - "$ref": "#/definitions/Operation" + "$ref": "#/definitions/CostAllocationResource" } }, - "nextLink": { - "description": "URL to get the next set of operation list results if there are any.", - "type": "string", - "readOnly": true - } - } - }, - "Operation": { - "description": "A Cost management 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.CostManagement.", - "type": "string", - "readOnly": true - }, - "resource": { - "description": "Resource on which the operation is performed: Dimensions, Query.", - "type": "string", - "readOnly": true - }, - "operation": { - "description": "Operation type: Read, write, delete, etc.", - "type": "string", - "readOnly": true - } + "targetResources": { + "type": "array", + "description": "Target resources for cost allocation", + "items": { + "$ref": "#/definitions/TargetCostAllocationResource" } } } }, - "Scope": { + "CostAllocationResource": { "type": "object", - "description": "The Scope model definition", + "description": "Source resources for cost allocation", + "required": [ + "resourceType", + "name", + "values" + ], "properties": { - "id": { - "type": "string", - "description": "Scope id" + "resourceType": { + "description": "Type of resources contained in this cost allocation rule", + "$ref": "#/definitions/CostAllocationResourceType" }, "name": { - "type": "string", - "description": "Scope name" - }, - "type": { - "type": "string", - "description": "Scope type" + "description": "If resource type is dimension, this must be either ResourceGroupName or SubscriptionId. If resource type is tag, this must be a valid Azure tag", + "type": "string" }, - "childScope": { - "$ref": "#/definitions/Scope" - } - } - }, - "ViewListResult": { - "description": "Result of listing views. It contains a list of available views.", - "type": "object", - "properties": { - "value": { - "description": "The list of views.", + "values": { + "description": "Source Resources for cost allocation", "type": "array", - "readOnly": true, "items": { - "$ref": "#/definitions/View" + "description": "Source resource for cost allocation", + "type": "string" } - }, - "nextLink": { - "description": "The link (url) to the next page of results.", - "type": "string", - "readOnly": true } } }, - "View": { - "description": "States and configurations of Cost Analysis.", - "type": "object", + "TargetCostAllocationResource": { + "description": "Target resources for cost allocation", "allOf": [ { - "$ref": "#/definitions/ProxyResource" - } - ], - "properties": { - "properties": { - "x-ms-client-flatten": true, - "$ref": "#/definitions/ViewProperties", - "title": "View properties" - } - } - }, - "ViewProperties": { - "type": "object", - "description": "The properties of the view.", - "properties": { - "displayName": { - "description": "User input name of the view. Required.", - "type": "string" - }, - "scope": { - "description": "Cost Management scope to save the view on. 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, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for BillingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, '/providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for ExternalBillingAccount scope, and '/providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for ExternalSubscription scope.", - "type": "string" - }, - "createdOn": { - "description": "Date the user created this view.", - "type": "string", - "format": "date-time", - "readOnly": true - }, - "modifiedOn": { - "description": "Date when the user last modified this view.", - "type": "string", - "format": "date-time", - "readOnly": true + "$ref": "#/definitions/CostAllocationResource" }, - "query": { - "description": "Query body configuration. Required.", + { "type": "object", - "x-ms-client-flatten": true, - "$ref": "#/definitions/ReportConfigDefinition" - }, - "chart": { - "description": "Chart type of the main view in Cost Analysis. Required.", - "type": "string", - "enum": [ - "Area", - "Line", - "StackedColumn", - "GroupedColumn", - "Table" - ], - "x-ms-enum": { - "name": "ChartType", - "modelAsString": true - } - }, - "accumulated": { - "description": "Show costs accumulated over time.", - "type": "string", - "enum": [ - "true", - "false" - ], - "x-ms-enum": { - "name": "AccumulatedType", - "modelAsString": true - } - }, - "metric": { - "description": "Metric to use when displaying costs.", - "type": "string", - "enum": [ - "ActualCost", - "AmortizedCost", - "AHUB" + "description": "Target resources for cost allocation", + "required": [ + "policyType" ], - "x-ms-enum": { - "name": "MetricType", - "modelAsString": true - } - }, - "kpis": { - "description": "List of KPIs to show in Cost Analysis UI.", - "type": "array", - "items": { - "$ref": "#/definitions/KpiProperties" - } - }, - "pivots": { - "description": "Configuration of 3 sub-views in the Cost Analysis UI.", - "type": "array", - "items": { - "$ref": "#/definitions/PivotProperties" + "properties": { + "values": { + "description": "Target resources for cost allocation", + "type": "array", + "items": { + "$ref": "#/definitions/CostAllocationProportion" + } + }, + "policyType": { + "description": "Method of cost allocation for the rule", + "$ref": "#/definitions/CostAllocationPolicyType" + } } } - } + ] }, - "KpiProperties": { - "description": "Each KPI must contain a 'type' and 'enabled' key.", - "type": "object", - "properties": { - "type": { - "description": "KPI type (Forecast, Budget).", - "type": "string", - "enum": [ - "Forecast", - "Budget" - ], - "x-ms-enum": { - "name": "KpiTypeType", - "modelAsString": true - } - }, - "id": { - "description": "ID of resource related to metric (budget).", - "type": "string" - }, - "enabled": { - "description": "show the KPI in the UI?", - "type": "boolean" - } + "CostAllocationResourceType": { + "type": "string", + "description": "Category of resource to use for allocation", + "enum": [ + "Dimension", + "Tag" + ], + "x-ms-enum": { + "name": "CostAllocationResourceType", + "modelAsString": true } }, - "PivotProperties": { - "description": "Each pivot must contain a 'type' and 'name'.", + "CostAllocationProportion": { "type": "object", + "description" : "Target resources and allocation", + "required": [ + "percentage", + "name" + ], "properties": { - "type": { - "description": "Data type to show in view.", - "type": "string", - "enum": [ - "Dimension", - "TagKey" - ], - "x-ms-enum": { - "name": "PivotTypeType", - "modelAsString": true - } - }, "name": { - "description": "Data field to show in view.", + "description": "Target resource for cost allocation", "type": "string" - } - } - }, - "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/BudgetModel" - } }, - "nextLink": { - "description": "The link (url) to the next page of results.", - "type": "string", - "readOnly": true + "percentage": { + "description" : "Percentage of source cost to allocate to this resource", + "type": "integer" } } }, - "BudgetModel": { - "description": "A budget resource.", - "allOf": [ - { - "$ref": "#/definitions/ProxyResource" - } + "CostAllocationPolicyType": { + "type": "string", + "description": "Method to use for allocating cost", + "enum": [ + "FixedProportion" ], - "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" - }, - "filter": { - "description": "May be used to filter budgets.", - "type": "object", - "$ref": "#/definitions/ReportConfigFilter" - }, - "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 - } + "x-ms-enum": { + "name": "CostAllocationPolicyType", + "modelAsString": 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": "NotificationOperatorType", - "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" - } - }, - "contactGroups": { - "description": "Action groups to send the budget notification to when the threshold is exceeded.", - "type": "array", - "items": { - "type": "string" - }, - "minItems": 0, - "maxItems": 50 - } - }, - "required": [ - "enabled", - "operator", - "threshold", - "contactEmails" - ] } }, "parameters": { @@ -1401,82 +503,18 @@ "type": "string", "description": "Version of the API to be used with the client request. The current version is 2020-03-01-preview" }, - "subscriptionIdParameter": { - "name": "subscriptionId", - "in": "path", - "description": "Azure Subscription ID.", - "required": true, - "type": "string" - }, "billingAccountIdParameter": { "name": "billingAccountId", "in": "path", - "description": "BillingAccount ID", - "required": true, - "type": "string", - "x-ms-parameter-location": "method" - }, - "managementGroupIdParameter": { - "name": "managementGroupId", - "in": "path", - "description": "ManagementGroup ID", + "description": "Billing Account ID", "required": true, "type": "string", "x-ms-parameter-location": "method" }, - "departmentIdParameter": { - "name": "departmentId", - "in": "path", - "description": "Department ID", - "required": true, - "type": "string", - "x-ms-parameter-location": "method" - }, - "enrollmentAccountIdParameter": { - "name": "enrollmentAccountId", - "in": "path", - "description": "Enrollment Account ID", - "required": true, - "type": "string", - "x-ms-parameter-location": "method" - }, - "resourceGroupNameParameter": { - "name": "resourceGroupName", - "in": "path", - "description": "Azure Resource Group Name.", - "required": true, - "type": "string", - "x-ms-parameter-location": "method" - }, - "scopeViewParameter": { - "name": "scope", - "in": "path", - "required": true, - "type": "string", - "description": "The scope associated with view 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, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for BillingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for External Billing Account scope and 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External Subscription scope.", - "x-ms-parameter-location": "method" - }, - "viewNameParameter": { - "name": "viewName", - "in": "path", - "description": "View name", - "required": true, - "type": "string", - "x-ms-parameter-location": "method" - }, - "scopeBudgetParameter": { - "name": "scope", - "in": "path", - "required": true, - "type": "string", - "description": "The scope associated with budget 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, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope.", - "x-ms-parameter-location": "method", - "x-ms-skip-url-encoding": true - }, - "budgetNameParameter": { - "name": "budgetName", + "ruleNameParameter": { + "name": "ruleId", "in": "path", - "description": "Budget Name.", + "description": "Cost allocation rule name", "required": true, "type": "string", "x-ms-parameter-location": "method" diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/Budget.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/Budget.json deleted file mode 100644 index fd2bacba9ef7..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/Budget.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "parameters": { - "api-version": "2019-05-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "MYDEVTESTRG", - "budgetName": "TestBudget", - "scope": "subscriptions/00000000-0000-0000-0000-000000000000" - }, - "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" - }, - "filter": { - "and": [ - { - "dimension": { - "name": "ResourceGroupName", - "operator": "In", - "values": [ - "MYDEVTESTRG" - ] - } - }, - { - "dimension": { - "name": "ResourceId", - "operator": "In", - "values": [ - "/subscriptions/{subscription-id}/resourceGroups/MYDEVTESTRG/providers/Microsoft.Compute/virtualMachines/MYVM2", - "/subscriptions/{subscription-id}/resourceGroups/MYDEVTESTRG/providers/Microsoft.Compute/virtualMachines/platformcloudplatformGeneric1" - ] - } - }, - { - "dimension": { - "name": "Meter", - "operator": "In", - "values": [ - "00000000-0000-0000-0000-000000000000" - ] - } - }, - { - "tag": { - "name": "Dev", - "operator": "In", - "values": [ - "engineering" - ] - } - } - ] - }, - "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" - ], - "contactGroups": [ - "/subscriptions/{subscription-id}/resourceGroups/MYDEVTESTRG/providers/microsoft.insights/actionGroups/SampleActionGroup" - ] - } - } - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BudgetsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BudgetsList.json deleted file mode 100644 index 805e150c0edf..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BudgetsList.json +++ /dev/null @@ -1,198 +0,0 @@ -{ - "parameters": { - "api-version": "2019-05-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "MYDEVTESTRG", - "scope": "subscriptions/00000000-0000-0000-0000-000000000000" - }, - "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" - }, - "filter": { - "and": [ - { - "dimension": { - "name": "ResourceGroupName", - "operator": "In", - "values": [ - "MYDEVTESTRG" - ] - } - }, - { - "dimension": { - "name": "ResourceId", - "operator": "In", - "values": [ - "/subscriptions/{subscription-id}/resourceGroups/MYDEVTESTRG/providers/Microsoft.Compute/virtualMachines/MYVM2", - "/subscriptions/{subscription-id}/resourceGroups/MYDEVTESTRG/providers/Microsoft.Compute/virtualMachines/platformcloudplatformGeneric1" - ] - } - }, - { - "dimension": { - "name": "Meter", - "operator": "In", - "values": [ - "00000000-0000-0000-0000-000000000000" - ] - } - }, - { - "tag": { - "name": "Dev", - "operator": "In", - "values": [ - "engineering" - ] - } - } - ] - }, - "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" - ], - "contactGroups": [ - "/subscriptions/{subscription-id}/resourceGroups/MYDEVTESTRG/providers/microsoft.insights/actionGroups/SampleActionGroup" - ] - } - } - } - }, - { - "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" - }, - "filter": { - "and": [ - { - "dimension": { - "name": "ResourceGroupName", - "operator": "In", - "values": [ - "MYDEVTESTRG" - ] - } - }, - { - "dimension": { - "name": "ResourceId", - "operator": "In", - "values": [ - "/subscriptions/{subscription-id}/resourceGroups/MYDEVTESTRG/providers/Microsoft.Compute/virtualMachines/MYVM2", - "/subscriptions/{subscription-id}/resourceGroups/MYDEVTESTRG/providers/Microsoft.Compute/virtualMachines/platformcloudplatformGeneric1" - ] - } - }, - { - "dimension": { - "name": "Meter", - "operator": "In", - "values": [ - "00000000-0000-0000-0000-000000000000" - ] - } - }, - { - "tag": { - "name": "Dev", - "operator": "In", - "values": [ - "engineering" - ] - } - } - ] - }, - "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" - ], - "contactGroups": [ - "/subscriptions/{subscription-id}/resourceGroups/MYDEVTESTRG/providers/microsoft.insights/actionGroups/SampleActionGroup" - ] - } - } - } - } - ] - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCheckNameAvailability.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCheckNameAvailability.json new file mode 100644 index 000000000000..0c978bbf8cf5 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCheckNameAvailability.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2020-03-01-preview", + "billingAccountId": "100", + "costAllocationRuleCheckNameAvailabilityRequest": + { + "name": "testRule", + "type": "Microsoft.CostManagement/costAllocationRules" + } + }, + "responses": { + "200": { + "body": { + "nameAvailable": false, + "reason": "AlreadyExists", + "message": "A cost allocation rule with name testRule is already present for the billing account 100. Please specify a differnt name." + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCreate.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCreate.json new file mode 100644 index 000000000000..70334b07a9f2 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCreate.json @@ -0,0 +1,82 @@ +{ + "parameters": { + "api-version": "2020-03-01-preview", + "billingAccountId": "100", + "ruleId": "testRule", + "costAllocationRule": { + "properties": { + "description": "This is a testRule", + "status": "Active", + "details": { + "sourceResources" : [ + { + "resourceType": "Dimension", + "name": "ResourceGroupName", + "values": [ + "sampleRG" + ] + } + ], + "targetResources" : [ + { + "resourceType": "Dimension", + "policyType": "FixedProportion", + "name": "ResourceGroupName", + "values": [ + { + "name": "destinationRG", + "percentage": 50 + }, + { + "name": "destinationRG2", + "percentage": 50 + } + ] + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/100/providers/Microsoft.CostManagement/costAllocationRules/testRule", + "name": "testRule", + "type": "Microsoft.CostManagement/costAllocationRules", + "properties": { + "description": "This is a testRule", + "status": "Creating", + "details": { + "sourceResources" : [ + { + "resourceType": "Dimension", + "name": "ResourceGroupName", + "values": [ + "sampleRG" + ] + } + ], + "targetResources" : [ + { + "resourceType": "Dimension", + "policyType": "FixedProportion", + "name": "ResourceGroupName", + "values": [ + { + "name": "destinationRG", + "percentage": 50 + }, + { + "name": "destinationRG2", + "percentage": 50 + } + ] + } + ] + } + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewDelete.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleDelete.json similarity index 55% rename from specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewDelete.json rename to specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleDelete.json index 5e8d06fa9da3..89d43527b557 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewDelete.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleDelete.json @@ -1,10 +1,10 @@ { "parameters": { "api-version": "2020-03-01-preview", - "viewName": "TestView" + "billingAccountId": "100", + "ruleId": "testRule" }, "responses": { - "200": {}, - "204": {} + "200": {} } } diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleGet.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleGet.json new file mode 100644 index 000000000000..125dcd4627d1 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleGet.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "api-version": "2020-03-01-preview", + "billingAccountId": "100", + "ruleId": "testRule" + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/100/providers/Microsoft.CostManagement/costAllocationRules/testRule", + "name": "testRule", + "type": "Microsoft.CostManagement/costAllocationRules", + "properties": { + "description": "This is a testRule", + "status": "NotActive", + "details": { + "sourceResources" : [ + { + "resourceType": "Dimension", + "name": "ResourceGroupName", + "values": [ + "sampleRG" + ] + } + ], + "targetResources" : [ + { + "resourceType": "Dimension", + "policyType": "FixedProportion", + "name": "ResourceGroupName", + "values": [ + { + "name": "destinationRG", + "percentage": 50 + }, + { + "name": "destinationRG2", + "percentage": 50 + } + ] + } + ] + } + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRulesList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRulesList.json new file mode 100644 index 000000000000..0278d38d8158 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRulesList.json @@ -0,0 +1,89 @@ +{ + "parameters": { + "api-version": "2020-03-01-preview", + "billingAccountId": "100" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/100/providers/Microsoft.CostManagement/costAllocationRules/testRule", + "name": "testRule", + "type": "Microsoft.CostManagement/costAllocationRules", + "properties": { + "description": "This is a testRule", + "status": "NotActive", + "details": { + "sourceResources" : [ + { + "resourceType": "Dimension", + "name": "ResourceGroupName", + "values": [ + "sampleRG" + ] + } + ], + "targetResources" : [ + { + "resourceType": "Dimension", + "policyType": "FixedProportion", + "name": "ResourceGroupName", + "values": [ + { + "name": "destinationRG", + "percentage": 50 + }, + { + "name": "destinationRG2", + "percentage": 50 + } + ] + } + ] + } + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/100/providers/Microsoft.CostManagement/costAllocationRules/testRule2", + "name": "testRule2", + "type": "Microsoft.CostManagement/costAllocationRules", + "properties": { + "description": "This is a second test Rule", + "status": "NotActive", + "details": { + "sourceResources" : [ + { + "resourceType": "Dimension", + "name": "ResourceGroupName", + "values": [ + "sampleRG2" + ] + } + ], + "targetResources" : [ + { + "resourceType": "Dimension", + "policyType": "FixedProportion", + "name": "ResourceGroupName", + "values": [ + { + "name": "destination2RG", + "percentage": 50 + }, + { + "name": "destination2RG2", + "percentage": 50 + } + ] + } + ] + } + } + } + ], + "nextLink": "" + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CreateOrUpdateBudget.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CreateOrUpdateBudget.json deleted file mode 100644 index e71edf730de5..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CreateOrUpdateBudget.json +++ /dev/null @@ -1,242 +0,0 @@ -{ - "parameters": { - "api-version": "2019-05-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "MYDEVTESTRG", - "budgetName": "TestBudget", - "scope": "subscriptions/00000000-0000-0000-0000-000000000000", - "parameters": { - "eTag": "\"1d34d016a593709\"", - "properties": { - "category": "Cost", - "amount": 100.65, - "timeGrain": "Monthly", - "timePeriod": { - "startDate": "2017-10-01T00:00:00Z", - "endDate": "2018-10-31T00:00:00Z" - }, - "filter": { - "and": [ - { - "dimension": { - "name": "ResourceGroupName", - "operator": "In", - "values": [ - "MYDEVTESTRG" - ] - } - }, - { - "dimension": { - "name": "ResourceId", - "operator": "In", - "values": [ - "/subscriptions/{subscription-id}/resourceGroups/MYDEVTESTRG/providers/Microsoft.Compute/virtualMachines/MYVM2", - "/subscriptions/{subscription-id}/resourceGroups/MYDEVTESTRG/providers/Microsoft.Compute/virtualMachines/platformcloudplatformGeneric1" - ] - } - }, - { - "dimension": { - "name": "Meter", - "operator": "In", - "values": [ - "00000000-0000-0000-0000-000000000000" - ] - } - }, - { - "tag": { - "name": "Dev", - "operator": "In", - "values": [ - "engineering" - ] - } - } - ] - }, - "notifications": { - "Actual_GreaterThan_80_Percent": { - "enabled": true, - "operator": "GreaterThan", - "threshold": 80, - "contactEmails": [ - "johndoe@contoso.com", - "janesmith@contoso.com" - ], - "contactRoles": [ - "Contributor", - "Reader" - ], - "contactGroups": [ - "/subscriptions/{subscription-id}/resourceGroups/MYDEVTESTRG/providers/microsoft.insights/actionGroups/SampleActionGroup" - ] - } - } - } - } - }, - "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" - }, - "filter": { - "and": [ - { - "dimension": { - "name": "ResourceGroupName", - "operator": "In", - "values": [ - "MYDEVTESTRG" - ] - } - }, - { - "dimension": { - "name": "ResourceId", - "operator": "In", - "values": [ - "/subscriptions/{subscription-id}/resourceGroups/MYDEVTESTRG/providers/Microsoft.Compute/virtualMachines/MYVM2", - "/subscriptions/{subscription-id}/resourceGroups/MYDEVTESTRG/providers/Microsoft.Compute/virtualMachines/platformcloudplatformGeneric1" - ] - } - }, - { - "dimension": { - "name": "Meter", - "operator": "In", - "values": [ - "00000000-0000-0000-0000-000000000000" - ] - } - }, - { - "tag": { - "name": "Dev", - "operator": "In", - "values": [ - "engineering" - ] - } - } - ] - }, - "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" - ], - "contactGroups": [ - "/subscriptions/{subscription-id}/resourceGroups/MYDEVTESTRG/providers/microsoft.insights/actionGroups/SampleActionGroup" - ] - } - } - } - } - }, - "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" - }, - "filter": { - "and": [ - { - "dimension": { - "name": "ResourceGroupName", - "operator": "In", - "values": [ - "MYDEVTESTRG" - ] - } - }, - { - "dimension": { - "name": "ResourceId", - "operator": "In", - "values": [ - "/subscriptions/{subscription-id}/resourceGroups/MYDEVTESTRG/providers/Microsoft.Compute/virtualMachines/MYVM2", - "/subscriptions/{subscription-id}/resourceGroups/MYDEVTESTRG/providers/Microsoft.Compute/virtualMachines/platformcloudplatformGeneric1" - ] - } - }, - { - "dimension": { - "name": "Meter", - "operator": "In", - "values": [ - "00000000-0000-0000-0000-000000000000" - ] - } - }, - { - "tag": { - "name": "Dev", - "operator": "In", - "values": [ - "engineering" - ] - } - } - ] - }, - "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" - ], - "contactGroups": [ - "/subscriptions/{subscription-id}/resourceGroups/MYDEVTESTRG/providers/microsoft.insights/actionGroups/SampleActionGroup" - ] - } - } - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DeleteBudget.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DeleteBudget.json deleted file mode 100644 index 53d0c16c522f..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DeleteBudget.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "parameters": { - "api-version": "2019-05-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "MYDEVTESTRG", - "budgetName": "TestBudget", - "scope": "subscriptions/00000000-0000-0000-0000-000000000000" - }, - "responses": { - "200": {}, - "204": {} - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateView.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateView.json deleted file mode 100644 index 509769280120..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateView.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "parameters": { - "api-version": "2020-03-01-preview", - "viewName": "swaggerExample" - }, - "responses": { - "200": { - "body": { - "id": "/providers/Microsoft.CostManagement/views/swaggerExample", - "name": "swaggerExample", - "type": "Microsoft.CostManagement/Views", - "eTag": "\"1d4ff9fe66f1d10\"", - "properties": { - "displayName": "swagger Example", - "scope": "", - "query": { - "type": "Usage", - "timeframe": "MonthToDate", - "dataset": { - "granularity": "Daily", - "aggregation": { - "totalCost": { - "name": "PreTaxCost", - "function": "Sum" - } - }, - "grouping": [], - "sorting": [ - { - "direction": "Ascending", - "name": "UsageDate" - } - ] - } - }, - "chart": "Table", - "accumulated": "true", - "metric": "ActualCost", - "kpis": [ - { - "type": "Forecast", - "id": null, - "enabled": true - }, - { - "type": "Budget", - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo", - "enabled": true - } - ], - "pivots": [ - { - "type": "Dimension", - "name": "ServiceName" - }, - { - "type": "Dimension", - "name": "MeterCategory" - }, - { - "type": "TagKey", - "name": "swaggerTagKey" - } - ] - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewCreateOrUpdate.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewCreateOrUpdate.json deleted file mode 100644 index b745d0d11755..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewCreateOrUpdate.json +++ /dev/null @@ -1,185 +0,0 @@ -{ - "parameters": { - "api-version": "2020-03-01-preview", - "viewName": "swaggerExample", - "parameters": { - "eTag": "\"1d4ff9fe66f1d10\"", - "properties": { - "displayName": "swagger Example", - "query": { - "type": "Usage", - "timeframe": "MonthToDate", - "dataset": { - "granularity": "Daily", - "aggregation": { - "totalCost": { - "name": "PreTaxCost", - "function": "Sum" - } - }, - "grouping": [], - "sorting": [ - { - "direction": "Ascending", - "name": "UsageDate" - } - ] - } - }, - "chart": "Table", - "accumulated": "true", - "metric": "ActualCost", - "kpis": [ - { - "type": "Forecast", - "id": null, - "enabled": true - }, - { - "type": "Budget", - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo", - "enabled": true - } - ], - "pivots": [ - { - "type": "Dimension", - "name": "ServiceName" - }, - { - "type": "Dimension", - "name": "MeterCategory" - }, - { - "type": "TagKey", - "name": "swaggerTagKey" - } - ] - } - } - }, - "responses": { - "201": { - "body": { - "id": "/providers/Microsoft.CostManagement/views/swaggerExample", - "name": "swaggerExample", - "type": "Microsoft.CostManagement/Views", - "eTag": "\"1d4ffa5a9c2430c\"", - "properties": { - "displayName": "swagger Example", - "scope": "", - "query": { - "type": "Usage", - "timeframe": "MonthToDate", - "dataset": { - "granularity": "Daily", - "aggregation": { - "totalCost": { - "name": "PreTaxCost", - "function": "Sum" - } - }, - "grouping": [], - "sorting": [ - { - "direction": "Ascending", - "name": "UsageDate" - } - ] - } - }, - "chart": "Table", - "accumulated": "true", - "metric": "ActualCost", - "kpis": [ - { - "type": "Forecast", - "id": null, - "enabled": true - }, - { - "type": "Budget", - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo", - "enabled": true - } - ], - "pivots": [ - { - "type": "Dimension", - "name": "ServiceName" - }, - { - "type": "Dimension", - "name": "MeterCategory" - }, - { - "type": "TagKey", - "name": "swaggerTagKey" - } - ] - } - } - }, - "200": { - "body": { - "id": "/providers/Microsoft.CostManagement/views/swaggerExample", - "name": "swaggerExample", - "type": "Microsoft.CostManagement/Views", - "eTag": "\"1d4ffa5a9c2430c\"", - "properties": { - "displayName": "swagger Example", - "scope": "", - "query": { - "type": "Usage", - "timeframe": "MonthToDate", - "dataset": { - "granularity": "Daily", - "aggregation": { - "totalCost": { - "name": "PreTaxCost", - "function": "Sum" - } - }, - "grouping": [], - "sorting": [ - { - "direction": "Ascending", - "name": "UsageDate" - } - ] - } - }, - "chart": "Table", - "accumulated": "true", - "metric": "ActualCost", - "kpis": [ - { - "type": "Forecast", - "id": null, - "enabled": true - }, - { - "type": "Budget", - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo", - "enabled": true - } - ], - "pivots": [ - { - "type": "Dimension", - "name": "ServiceName" - }, - { - "type": "Dimension", - "name": "MeterCategory" - }, - { - "type": "TagKey", - "name": "swaggerTagKey" - } - ] - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewList.json deleted file mode 100644 index 7e746c0be585..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewList.json +++ /dev/null @@ -1,131 +0,0 @@ -{ - "parameters": { - "api-version": "2020-03-01-preview" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "/providers/Microsoft.CostManagement/views/swaggerExample", - "name": "swaggerExample", - "type": "Microsoft.CostManagement/Views", - "eTag": "\"1d4ff9fe66f1d10\"", - "properties": { - "displayName": "swagger Example", - "scope": "", - "query": { - "type": "Usage", - "timeframe": "MonthToDate", - "dataset": { - "granularity": "Daily", - "aggregation": { - "totalCost": { - "name": "PreTaxCost", - "function": "Sum" - } - }, - "grouping": [], - "sorting": [ - { - "direction": "Ascending", - "name": "UsageDate" - } - ] - } - }, - "chart": "Table", - "accumulated": "true", - "metric": "ActualCost", - "kpis": [ - { - "type": "Forecast", - "id": null, - "enabled": true - }, - { - "type": "Budget", - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo", - "enabled": true - } - ], - "pivots": [ - { - "type": "Dimension", - "name": "ServiceName" - }, - { - "type": "Dimension", - "name": "MeterCategory" - }, - { - "type": "TagKey", - "name": "swaggerTagKey" - } - ] - } - }, - { - "id": "/providers/Microsoft.CostManagement/views/swaggerExample2", - "name": "swaggerExample2", - "type": "Microsoft.CostManagement/Views", - "eTag": "\"1d4ffa5a9c2430c\"", - "properties": { - "displayName": "swagger Example 2", - "scope": "", - "query": { - "type": "Usage", - "timeframe": "LastMonthToDate", - "dataset": { - "granularity": "Daily", - "aggregation": { - "totalCost": { - "name": "PreTaxCost", - "function": "Sum" - } - }, - "grouping": [], - "sorting": [ - { - "direction": "Ascending", - "name": "UsageDate" - } - ] - } - }, - "chart": "GroupedColumn", - "accumulated": "true", - "metric": "ActualCost", - "kpis": [ - { - "type": "Forecast", - "id": null, - "enabled": true - }, - { - "type": "Budget", - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo", - "enabled": true - } - ], - "pivots": [ - { - "type": "Dimension", - "name": "ServiceName" - }, - { - "type": "Dimension", - "name": "MeterCategory" - }, - { - "type": "TagKey", - "name": "swaggerTagKey" - } - ] - } - } - ] - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewByResourceGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewByResourceGroup.json deleted file mode 100644 index 96ce0e1de322..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewByResourceGroup.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "parameters": { - "api-version": "2020-03-01-preview", - "viewName": "swaggerExample", - "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG" - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/views/swaggerExample", - "name": "swaggerExample", - "type": "Microsoft.CostManagement/Views", - "eTag": "\"1d4ff9fe66f1d10\"", - "properties": { - "displayName": "swagger Example", - "scope": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", - "query": { - "type": "Usage", - "timeframe": "MonthToDate", - "dataset": { - "granularity": "Daily", - "aggregation": { - "totalCost": { - "name": "PreTaxCost", - "function": "Sum" - } - }, - "grouping": [], - "sorting": [ - { - "direction": "Ascending", - "name": "UsageDate" - } - ] - } - }, - "chart": "Table", - "accumulated": "true", - "metric": "ActualCost", - "kpis": [ - { - "type": "Forecast", - "id": null, - "enabled": true - }, - { - "type": "Budget", - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo", - "enabled": true - } - ], - "pivots": [ - { - "type": "Dimension", - "name": "ServiceName" - }, - { - "type": "Dimension", - "name": "MeterCategory" - }, - { - "type": "TagKey", - "name": "swaggerTagKey" - } - ] - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewCreateOrUpdateByResourceGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewCreateOrUpdateByResourceGroup.json deleted file mode 100644 index 6b73395fe112..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewCreateOrUpdateByResourceGroup.json +++ /dev/null @@ -1,186 +0,0 @@ -{ - "parameters": { - "api-version": "2020-03-01-preview", - "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", - "viewName": "swaggerExample", - "parameters": { - "eTag": "\"1d4ff9fe66f1d10\"", - "properties": { - "displayName": "swagger Example", - "query": { - "type": "Usage", - "timeframe": "MonthToDate", - "dataset": { - "granularity": "Daily", - "aggregation": { - "totalCost": { - "name": "PreTaxCost", - "function": "Sum" - } - }, - "grouping": [], - "sorting": [ - { - "direction": "Ascending", - "name": "UsageDate" - } - ] - } - }, - "chart": "Table", - "accumulated": "true", - "metric": "ActualCost", - "kpis": [ - { - "type": "Forecast", - "id": null, - "enabled": true - }, - { - "type": "Budget", - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo", - "enabled": true - } - ], - "pivots": [ - { - "type": "Dimension", - "name": "ServiceName" - }, - { - "type": "Dimension", - "name": "MeterCategory" - }, - { - "type": "TagKey", - "name": "swaggerTagKey" - } - ] - } - } - }, - "responses": { - "201": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/views/swaggerExample", - "name": "swaggerExample", - "type": "Microsoft.CostManagement/Views", - "eTag": "\"1d4ffa5a9c2430c\"", - "properties": { - "displayName": "swagger Example", - "scope": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", - "query": { - "type": "Usage", - "timeframe": "MonthToDate", - "dataset": { - "granularity": "Daily", - "aggregation": { - "totalCost": { - "name": "PreTaxCost", - "function": "Sum" - } - }, - "grouping": [], - "sorting": [ - { - "direction": "Ascending", - "name": "UsageDate" - } - ] - } - }, - "chart": "Table", - "accumulated": "true", - "metric": "ActualCost", - "kpis": [ - { - "type": "Forecast", - "id": null, - "enabled": true - }, - { - "type": "Budget", - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo", - "enabled": true - } - ], - "pivots": [ - { - "type": "Dimension", - "name": "ServiceName" - }, - { - "type": "Dimension", - "name": "MeterCategory" - }, - { - "type": "TagKey", - "name": "swaggerTagKey" - } - ] - } - } - }, - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/views/swaggerExample", - "name": "swaggerExample", - "type": "Microsoft.CostManagement/Views", - "eTag": "\"1d4ffa5a9c2430c\"", - "properties": { - "displayName": "swagger Example", - "scope": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", - "query": { - "type": "Usage", - "timeframe": "MonthToDate", - "dataset": { - "granularity": "Daily", - "aggregation": { - "totalCost": { - "name": "PreTaxCost", - "function": "Sum" - } - }, - "grouping": [], - "sorting": [ - { - "direction": "Ascending", - "name": "UsageDate" - } - ] - } - }, - "chart": "Table", - "accumulated": "true", - "metric": "ActualCost", - "kpis": [ - { - "type": "Forecast", - "id": null, - "enabled": true - }, - { - "type": "Budget", - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo", - "enabled": true - } - ], - "pivots": [ - { - "type": "Dimension", - "name": "ServiceName" - }, - { - "type": "Dimension", - "name": "MeterCategory" - }, - { - "type": "TagKey", - "name": "swaggerTagKey" - } - ] - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewDeleteByResourceGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewDeleteByResourceGroup.json deleted file mode 100644 index c2313bebf766..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewDeleteByResourceGroup.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "parameters": { - "api-version": "2020-03-01-preview", - "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", - "viewName": "TestView" - }, - "responses": { - "200": {}, - "204": {} - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewListByResourceGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewListByResourceGroup.json deleted file mode 100644 index 10a940677e0d..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewListByResourceGroup.json +++ /dev/null @@ -1,132 +0,0 @@ -{ - "parameters": { - "api-version": "2020-03-01-preview", - "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/views/swaggerExample", - "name": "swaggerExample", - "type": "Microsoft.CostManagement/Views", - "eTag": "\"1d4ff9fe66f1d10\"", - "properties": { - "displayName": "swagger Example", - "scope": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", - "query": { - "type": "Usage", - "timeframe": "MonthToDate", - "dataset": { - "granularity": "Daily", - "aggregation": { - "totalCost": { - "name": "PreTaxCost", - "function": "Sum" - } - }, - "grouping": [], - "sorting": [ - { - "direction": "Ascending", - "name": "UsageDate" - } - ] - } - }, - "chart": "Table", - "accumulated": "true", - "metric": "ActualCost", - "kpis": [ - { - "type": "Forecast", - "id": null, - "enabled": true - }, - { - "type": "Budget", - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo", - "enabled": true - } - ], - "pivots": [ - { - "type": "Dimension", - "name": "ServiceName" - }, - { - "type": "Dimension", - "name": "MeterCategory" - }, - { - "type": "TagKey", - "name": "swaggerTagKey" - } - ] - } - }, - { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/views/swaggerExample2", - "name": "swaggerExample2", - "type": "Microsoft.CostManagement/Views", - "eTag": "\"1d4ffa5a9c2430c\"", - "properties": { - "displayName": "swagger Example 2", - "scope": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", - "query": { - "type": "Usage", - "timeframe": "LastMonthToDate", - "dataset": { - "granularity": "Daily", - "aggregation": { - "totalCost": { - "name": "PreTaxCost", - "function": "Sum" - } - }, - "grouping": [], - "sorting": [ - { - "direction": "Ascending", - "name": "UsageDate" - } - ] - } - }, - "chart": "GroupedColumn", - "accumulated": "true", - "metric": "ActualCost", - "kpis": [ - { - "type": "Forecast", - "id": null, - "enabled": true - }, - { - "type": "Budget", - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo", - "enabled": true - } - ], - "pivots": [ - { - "type": "Dimension", - "name": "ServiceName" - }, - { - "type": "Dimension", - "name": "MeterCategory" - }, - { - "type": "TagKey", - "name": "swaggerTagKey" - } - ] - } - } - ] - } - } - } -} From 7d59c8dda03f1765eb48da3bab7da3eb9e53eb53 Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Thu, 11 Jun 2020 23:31:31 -0700 Subject: [PATCH 05/53] Fix warnings --- .../2020-03-01-preview/costmanagement.json | 23 +++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json index 36d37b53c44f..b22ad408e843 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json @@ -40,6 +40,9 @@ ], "operationId": "Get_Rules", "description": "Get the list of all cost allocation rules", + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, "x-ms-examples": { "CostAllocationRules_List": { "$ref": "./examples/CostAllocationRulesList.json" @@ -57,7 +60,7 @@ "200": { "description": "List of cost allocation rules for the billing account.", "schema": { - "$ref": "#/definitions/CostAllocationRuleListResponse" + "$ref": "#/definitions/CostAllocationRule_list" } }, "default": { @@ -74,7 +77,7 @@ "tags": [ "CostAllocationRules" ], - "operationId": "Check_CostAllocationRuleNameAvailability", + "operationId": "Rule_CheckNameAvailability", "description": "Check if a given rule name is in use", "x-ms-examples": { "CostAllocationRuleCheckNameAvailability": { @@ -253,7 +256,7 @@ } } }, - "CostAllocationRuleListResponse": { + "CostAllocationRule_list": { "type": "object", "description": "Result of listing cost allocation rules. It contains a list of available rules in the billing account provided.", "properties": { @@ -291,7 +294,7 @@ "description": "The cost allocation rule check name availability response", "properties": { "nameAvailable": { - "type": "boolean", + "$ref": "#/definitions/NameAvailable", "description": "Whether this rule name is available" }, "reason": { @@ -304,6 +307,18 @@ } } }, + "NameAvailable": { + "type": "string", + "description": "Whether this rule name is available", + "enum": [ + "True", + "False" + ], + "x-ms-enum": { + "name": "NameAvailable", + "modelAsString": true + } + }, "Reason": { "type": "string", "description": "The reason this name is not available", From eba5f4bc4315b000384bd3fdf63627474cac0889 Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Thu, 11 Jun 2020 23:34:57 -0700 Subject: [PATCH 06/53] Fix example for string over boolean --- .../examples/CostAllocationRuleCheckNameAvailability.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCheckNameAvailability.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCheckNameAvailability.json index 0c978bbf8cf5..e7a6d55a3b84 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCheckNameAvailability.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCheckNameAvailability.json @@ -11,7 +11,7 @@ "responses": { "200": { "body": { - "nameAvailable": false, + "nameAvailable": "False", "reason": "AlreadyExists", "message": "A cost allocation rule with name testRule is already present for the billing account 100. Please specify a differnt name." } From 0dca2aad24f97d977eab4a57f506923da5973464 Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Thu, 11 Jun 2020 23:57:25 -0700 Subject: [PATCH 07/53] List operation id fix --- .../preview/2020-03-01-preview/costmanagement.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json index b22ad408e843..1a0563c84bf2 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json @@ -38,7 +38,7 @@ "tags": [ "CostAllocationRules" ], - "operationId": "Get_Rules", + "operationId": "Rules_list", "description": "Get the list of all cost allocation rules", "x-ms-pageable": { "nextLinkName": "nextLink" From cd1b1af08a0ae910718797e3a5a761ef31e97646 Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Fri, 12 Jun 2020 12:11:32 -0700 Subject: [PATCH 08/53] Implement changes from review --- .../2020-03-01-preview/costmanagement.json | 107 ++++++++++++++---- ...ostAllocationRuleCreateResourceGroup.json} | 4 +- .../examples/CostAllocationRuleCreateTag.json | 86 ++++++++++++++ 3 files changed, 174 insertions(+), 23 deletions(-) rename specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/{CostAllocationRuleCreate.json => CostAllocationRuleCreateResourceGroup.json} (96%) create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCreateTag.json diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json index 1a0563c84bf2..e63400c3a630 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json @@ -36,9 +36,10 @@ "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules": { "get": { "tags": [ - "CostAllocationRules" + "CostAllocation", + "Rules" ], - "operationId": "Rules_list", + "operationId": "List", "description": "Get the list of all cost allocation rules", "x-ms-pageable": { "nextLinkName": "nextLink" @@ -75,9 +76,9 @@ "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules/checknameavailability": { "post": { "tags": [ - "CostAllocationRules" + "CostAllocation" ], - "operationId": "Rule_CheckNameAvailability", + "operationId": "Check Name Availability", "description": "Check if a given rule name is in use", "x-ms-examples": { "CostAllocationRuleCheckNameAvailability": { @@ -117,13 +118,13 @@ } } }, - "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules/{ruleId}": { + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules/{ruleName}": { "get": { "tags": [ - "CostAllocationRules" + "CostAllocation" ], - "operationId": "Get_Rule", - "description": "Gets the cost allocation rule by rule name.", + "operationId": "Get", + "description": "Get the cost allocation rule by rule name.", "x-ms-examples": { "CostAllocationRules": { "$ref": "./examples/CostAllocationRuleGet.json" @@ -157,13 +158,16 @@ }, "put": { "tags": [ - "CostAllocationRules" + "CostAllocation" ], - "operationId": "Create_Rule", - "description": "Create/Update cost allocation rule for billing account.", + "operationId": "CreateOrUpdate", + "description": "Create/Update cost allocation rule for billing account or enterprise enrollment.", "x-ms-examples": { - "CostAllocationRules": { - "$ref": "./examples/CostAllocationRuleCreate.json" + "CreateWithResourceGroup": { + "$ref": "./examples/CostAllocationRuleCreateResourceGroup.json" + }, + "CreateWithTag": { + "$ref": "./examples/CostAllocationRuleCreateTag.json" } }, "parameters": [ @@ -190,7 +194,7 @@ "200": { "description": "OK. The request has succeeded.", "schema": { - "$ref": "#/definitions/CostAllocationRuleDefinition" + "$ref": "#/definitions/CostAllocationRuleDefinitionResponse" } }, "default": { @@ -203,10 +207,10 @@ }, "delete": { "tags": [ - "CostAllocationRules" + "CostAllocation" ], - "operationId": "Delete_Rule", - "description": "Delete cost allocation rule for billing account.", + "operationId": "Delete", + "description": "Delete cost allocation rule for billing account or enterprise enrollment.", "x-ms-examples": { "CostAllocationRules": { "$ref": "./examples/CostAllocationRuleDelete.json" @@ -357,6 +361,32 @@ }, "x-ms-azure-resource": true }, + "CostAllocationRuleDefinitionResponse": { + "type": "object", + "description": "The cost allocation rule model definition response", + "properties": { + "id": { + "type": "string", + "readOnly": true, + "description": "Rule id" + }, + "name": { + "type": "string", + "readOnly": true, + "description": "Rule name" + }, + "type": { + "type": "string", + "readOnly": true, + "description": "Resource type" + }, + "properties": { + "$ref": "#/definitions/CostAllocationRulePropertiesResponse", + "description": "Cost allocation rule properties" + } + }, + "x-ms-azure-resource": true + }, "CostAllocationRuleProperties": { "type": "object", "description": "The properties of a cost allocation rule", @@ -365,6 +395,29 @@ "status", "details" ], + "properties": { + "description": { + "description": "Description of a cost allocation rule.", + "type": "string" + }, + "status": { + "$ref": "#/definitions/InputRuleStatus", + "description": "Status of the rule" + }, + "details": { + "description": "Resource information for the cost allocation rule", + "$ref": "#/definitions/CostAllocationRuleDetails" + } + } + }, + "CostAllocationRulePropertiesResponse": { + "type": "object", + "description": "The properties of a cost allocation rule response", + "additionalProperties": false, + "required": [ + "status", + "details" + ], "properties": { "description": { "description": "Description of a cost allocation rule.", @@ -393,6 +446,18 @@ "modelAsString": true } }, + "InputRuleStatus": { + "type": "string", + "description": "Current status of the rule", + "enum": [ + "NotActive", + "Active" + ], + "x-ms-enum": { + "name": "RuleStatus", + "modelAsString": true + } + }, "CostAllocationRuleDetails": { "type": "object", "description": "Resource details of the cost allocation rule", @@ -401,7 +466,7 @@ "description": "Source resources for cost allocation", "type": "array", "items": { - "$ref": "#/definitions/CostAllocationResource" + "$ref": "#/definitions/SourceCostAllocationResource" } }, "targetResources": { @@ -413,7 +478,7 @@ } } }, - "CostAllocationResource": { + "SourceCostAllocationResource": { "type": "object", "description": "Source resources for cost allocation", "required": [ @@ -521,13 +586,13 @@ "billingAccountIdParameter": { "name": "billingAccountId", "in": "path", - "description": "Billing Account ID", + "description": "Billing Account ID or Enterprise Enrollment", "required": true, "type": "string", "x-ms-parameter-location": "method" }, "ruleNameParameter": { - "name": "ruleId", + "name": "ruleName", "in": "path", "description": "Cost allocation rule name", "required": true, diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCreate.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCreateResourceGroup.json similarity index 96% rename from specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCreate.json rename to specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCreateResourceGroup.json index 70334b07a9f2..2deafb595931 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCreate.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCreateResourceGroup.json @@ -25,11 +25,11 @@ "values": [ { "name": "destinationRG", - "percentage": 50 + "percentage": 45.5 }, { "name": "destinationRG2", - "percentage": 50 + "percentage": 54.5 } ] } diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCreateTag.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCreateTag.json new file mode 100644 index 000000000000..c658b296fad2 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCreateTag.json @@ -0,0 +1,86 @@ +{ + "parameters": { + "api-version": "2020-03-01-preview", + "billingAccountId": "100", + "ruleId": "testRule", + "costAllocationRule": { + "properties": { + "description": "This is a testRule", + "status": "Active", + "details": { + "sourceResources" : [ + { + "resourceType": "Tag", + "name": "category", + "values": [ + "devops" + ] + } + ], + "targetResources" : [ + { + "resourceType": "Dimension", + "policyType": "FixedProportion", + "name": "ResourceGroupName", + "values": [ + { + "name": "destinationRG", + "percentage": 33.33 + }, + { + "name": "destinationRG2", + "percentage": 33.33 + }, + { + "name": "destinationRG3", + "percentage": 33.34 + } + ] + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/100/providers/Microsoft.CostManagement/costAllocationRules/testRule", + "name": "testRule", + "type": "Microsoft.CostManagement/costAllocationRules", + "properties": { + "description": "This is a testRule", + "status": "Creating", + "details": { + "sourceResources" : [ + { + "resourceType": "Dimension", + "name": "ResourceGroupName", + "values": [ + "sampleRG" + ] + } + ], + "targetResources" : [ + { + "resourceType": "Dimension", + "policyType": "FixedProportion", + "name": "ResourceGroupName", + "values": [ + { + "name": "destinationRG", + "percentage": 50 + }, + { + "name": "destinationRG2", + "percentage": 50 + } + ] + } + ] + } + } + } + } + } +} From 95f71bcb612c18f290d06100f1b76528d9dde34f Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Fri, 12 Jun 2020 12:18:39 -0700 Subject: [PATCH 09/53] Fix response types --- .../preview/2020-03-01-preview/costmanagement.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json index e63400c3a630..3a8f20eb2833 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json @@ -145,7 +145,7 @@ "200": { "description": "OK. The request has succeeded.", "schema": { - "$ref": "#/definitions/CostAllocationRuleDefinition" + "$ref": "#/definitions/CostAllocationRuleDefinitionResponse" } }, "default": { @@ -269,7 +269,7 @@ "type": "array", "readOnly": true, "items": { - "$ref": "#/definitions/CostAllocationRuleDefinition" + "$ref": "#/definitions/CostAllocationRuleDefinitionResponse" } }, "nextLink": { From 193c633701ba229b9fcc1d60593dd59c753599c8 Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Fri, 12 Jun 2020 13:56:59 -0700 Subject: [PATCH 10/53] Only one tag --- .../preview/2020-03-01-preview/costmanagement.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json index 3a8f20eb2833..f36e926afa25 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json @@ -36,8 +36,7 @@ "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules": { "get": { "tags": [ - "CostAllocation", - "Rules" + "CostAllocation" ], "operationId": "List", "description": "Get the list of all cost allocation rules", From da876f5b563b1e4718e54d11b610b2c9616f21ac Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Fri, 12 Jun 2020 14:03:04 -0700 Subject: [PATCH 11/53] Fix failures --- .../preview/2020-03-01-preview/costmanagement.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json index f36e926afa25..3b7f6befd4ca 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json @@ -36,7 +36,8 @@ "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules": { "get": { "tags": [ - "CostAllocation" + "CostAllocation", + "Rules" ], "operationId": "List", "description": "Get the list of all cost allocation rules", @@ -77,7 +78,7 @@ "tags": [ "CostAllocation" ], - "operationId": "Check Name Availability", + "operationId": "CheckNameAvailability", "description": "Check if a given rule name is in use", "x-ms-examples": { "CostAllocationRuleCheckNameAvailability": { From 6740f128e59ef22ca0f1a73407861b0f91a2b2b7 Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Fri, 12 Jun 2020 14:53:37 -0700 Subject: [PATCH 12/53] Fix operation Ids --- .../preview/2020-03-01-preview/costmanagement.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json index 3b7f6befd4ca..487894aaf849 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json @@ -39,7 +39,7 @@ "CostAllocation", "Rules" ], - "operationId": "List", + "operationId": "CostAllocationRules_List", "description": "Get the list of all cost allocation rules", "x-ms-pageable": { "nextLinkName": "nextLink" @@ -78,7 +78,7 @@ "tags": [ "CostAllocation" ], - "operationId": "CheckNameAvailability", + "operationId": "CostAllocation_CheckNameAvailability", "description": "Check if a given rule name is in use", "x-ms-examples": { "CostAllocationRuleCheckNameAvailability": { @@ -123,7 +123,7 @@ "tags": [ "CostAllocation" ], - "operationId": "Get", + "operationId": "CostAllocation_Get", "description": "Get the cost allocation rule by rule name.", "x-ms-examples": { "CostAllocationRules": { @@ -160,7 +160,7 @@ "tags": [ "CostAllocation" ], - "operationId": "CreateOrUpdate", + "operationId": "CostAllocation_CreateOrUpdate", "description": "Create/Update cost allocation rule for billing account or enterprise enrollment.", "x-ms-examples": { "CreateWithResourceGroup": { @@ -209,7 +209,7 @@ "tags": [ "CostAllocation" ], - "operationId": "Delete", + "operationId": "CostAllocation_Delete", "description": "Delete cost allocation rule for billing account or enterprise enrollment.", "x-ms-examples": { "CostAllocationRules": { From f4a466d969038c3c2eb056ee16fcf0255b7a9b6c Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Fri, 12 Jun 2020 14:59:53 -0700 Subject: [PATCH 13/53] Just CostAllocation --- .../preview/2020-03-01-preview/costmanagement.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json index 487894aaf849..ea803f19998b 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json @@ -36,10 +36,9 @@ "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules": { "get": { "tags": [ - "CostAllocation", - "Rules" + "CostAllocation" ], - "operationId": "CostAllocationRules_List", + "operationId": "CostAllocation_List", "description": "Get the list of all cost allocation rules", "x-ms-pageable": { "nextLinkName": "nextLink" From 5ac1d56d589a87abe738db1a3307b621efc63443 Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Fri, 12 Jun 2020 17:58:52 -0700 Subject: [PATCH 14/53] Percentage as number --- .../preview/2020-03-01-preview/costmanagement.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json index ea803f19998b..3dc074c809e7 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json @@ -558,7 +558,7 @@ }, "percentage": { "description" : "Percentage of source cost to allocate to this resource", - "type": "integer" + "type": "number" } } }, From fb2744e055fc4b3c9f2a4f49153825bb9bbc9f65 Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Fri, 12 Jun 2020 18:13:40 -0700 Subject: [PATCH 15/53] Revert to working version --- .../2020-03-01-preview/costmanagement.json | 114 ++++-------------- ...oup.json => CostAllocationRuleCreate.json} | 7 +- 2 files changed, 29 insertions(+), 92 deletions(-) rename specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/{CostAllocationRuleCreateResourceGroup.json => CostAllocationRuleCreate.json} (94%) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json index 3dc074c809e7..335cc614c842 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json @@ -36,9 +36,9 @@ "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules": { "get": { "tags": [ - "CostAllocation" + "CostAllocationRules" ], - "operationId": "CostAllocation_List", + "operationId": "Rules_list", "description": "Get the list of all cost allocation rules", "x-ms-pageable": { "nextLinkName": "nextLink" @@ -75,9 +75,9 @@ "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules/checknameavailability": { "post": { "tags": [ - "CostAllocation" + "CostAllocationRules" ], - "operationId": "CostAllocation_CheckNameAvailability", + "operationId": "Rule_CheckNameAvailability", "description": "Check if a given rule name is in use", "x-ms-examples": { "CostAllocationRuleCheckNameAvailability": { @@ -117,13 +117,13 @@ } } }, - "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules/{ruleName}": { + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules/{ruleId}": { "get": { "tags": [ - "CostAllocation" + "CostAllocationRules" ], - "operationId": "CostAllocation_Get", - "description": "Get the cost allocation rule by rule name.", + "operationId": "Get_Rule", + "description": "Gets the cost allocation rule by rule name.", "x-ms-examples": { "CostAllocationRules": { "$ref": "./examples/CostAllocationRuleGet.json" @@ -144,7 +144,7 @@ "200": { "description": "OK. The request has succeeded.", "schema": { - "$ref": "#/definitions/CostAllocationRuleDefinitionResponse" + "$ref": "#/definitions/CostAllocationRuleDefinition" } }, "default": { @@ -157,16 +157,13 @@ }, "put": { "tags": [ - "CostAllocation" + "CostAllocationRules" ], - "operationId": "CostAllocation_CreateOrUpdate", - "description": "Create/Update cost allocation rule for billing account or enterprise enrollment.", + "operationId": "Create_Rule", + "description": "Create/Update cost allocation rule for billing account.", "x-ms-examples": { - "CreateWithResourceGroup": { - "$ref": "./examples/CostAllocationRuleCreateResourceGroup.json" - }, - "CreateWithTag": { - "$ref": "./examples/CostAllocationRuleCreateTag.json" + "CostAllocationRules": { + "$ref": "./examples/CostAllocationRuleCreate.json" } }, "parameters": [ @@ -193,7 +190,7 @@ "200": { "description": "OK. The request has succeeded.", "schema": { - "$ref": "#/definitions/CostAllocationRuleDefinitionResponse" + "$ref": "#/definitions/CostAllocationRuleDefinition" } }, "default": { @@ -206,10 +203,10 @@ }, "delete": { "tags": [ - "CostAllocation" + "CostAllocationRules" ], - "operationId": "CostAllocation_Delete", - "description": "Delete cost allocation rule for billing account or enterprise enrollment.", + "operationId": "Delete_Rule", + "description": "Delete cost allocation rule for billing account.", "x-ms-examples": { "CostAllocationRules": { "$ref": "./examples/CostAllocationRuleDelete.json" @@ -268,7 +265,7 @@ "type": "array", "readOnly": true, "items": { - "$ref": "#/definitions/CostAllocationRuleDefinitionResponse" + "$ref": "#/definitions/CostAllocationRuleDefinition" } }, "nextLink": { @@ -360,32 +357,6 @@ }, "x-ms-azure-resource": true }, - "CostAllocationRuleDefinitionResponse": { - "type": "object", - "description": "The cost allocation rule model definition response", - "properties": { - "id": { - "type": "string", - "readOnly": true, - "description": "Rule id" - }, - "name": { - "type": "string", - "readOnly": true, - "description": "Rule name" - }, - "type": { - "type": "string", - "readOnly": true, - "description": "Resource type" - }, - "properties": { - "$ref": "#/definitions/CostAllocationRulePropertiesResponse", - "description": "Cost allocation rule properties" - } - }, - "x-ms-azure-resource": true - }, "CostAllocationRuleProperties": { "type": "object", "description": "The properties of a cost allocation rule", @@ -394,29 +365,6 @@ "status", "details" ], - "properties": { - "description": { - "description": "Description of a cost allocation rule.", - "type": "string" - }, - "status": { - "$ref": "#/definitions/InputRuleStatus", - "description": "Status of the rule" - }, - "details": { - "description": "Resource information for the cost allocation rule", - "$ref": "#/definitions/CostAllocationRuleDetails" - } - } - }, - "CostAllocationRulePropertiesResponse": { - "type": "object", - "description": "The properties of a cost allocation rule response", - "additionalProperties": false, - "required": [ - "status", - "details" - ], "properties": { "description": { "description": "Description of a cost allocation rule.", @@ -445,18 +393,6 @@ "modelAsString": true } }, - "InputRuleStatus": { - "type": "string", - "description": "Current status of the rule", - "enum": [ - "NotActive", - "Active" - ], - "x-ms-enum": { - "name": "RuleStatus", - "modelAsString": true - } - }, "CostAllocationRuleDetails": { "type": "object", "description": "Resource details of the cost allocation rule", @@ -465,7 +401,7 @@ "description": "Source resources for cost allocation", "type": "array", "items": { - "$ref": "#/definitions/SourceCostAllocationResource" + "$ref": "#/definitions/CostAllocationResource" } }, "targetResources": { @@ -477,7 +413,7 @@ } } }, - "SourceCostAllocationResource": { + "CostAllocationResource": { "type": "object", "description": "Source resources for cost allocation", "required": [ @@ -558,7 +494,7 @@ }, "percentage": { "description" : "Percentage of source cost to allocate to this resource", - "type": "number" + "type": "integer" } } }, @@ -585,13 +521,13 @@ "billingAccountIdParameter": { "name": "billingAccountId", "in": "path", - "description": "Billing Account ID or Enterprise Enrollment", + "description": "Billing Account ID", "required": true, "type": "string", "x-ms-parameter-location": "method" }, "ruleNameParameter": { - "name": "ruleName", + "name": "ruleId", "in": "path", "description": "Cost allocation rule name", "required": true, @@ -599,4 +535,4 @@ "x-ms-parameter-location": "method" } } -} +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCreateResourceGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCreate.json similarity index 94% rename from specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCreateResourceGroup.json rename to specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCreate.json index 2deafb595931..dc48e827f45d 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCreateResourceGroup.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCreate.json @@ -13,7 +13,8 @@ "resourceType": "Dimension", "name": "ResourceGroupName", "values": [ - "sampleRG" + "sampleRG", + "secondRG" ] } ], @@ -25,11 +26,11 @@ "values": [ { "name": "destinationRG", - "percentage": 45.5 + "percentage": 45 }, { "name": "destinationRG2", - "percentage": 54.5 + "percentage": 54 } ] } From 88b6801b62c2675a85002ec42b6259e8ed61a76e Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Fri, 12 Jun 2020 18:31:37 -0700 Subject: [PATCH 16/53] First wave of review changes --- .../2020-03-01-preview/costmanagement.json | 71 ++++++++++--------- 1 file changed, 37 insertions(+), 34 deletions(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json index 335cc614c842..655e9af9a12b 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json @@ -38,7 +38,7 @@ "tags": [ "CostAllocationRules" ], - "operationId": "Rules_list", + "operationId": "CostAllocationRules_List", "description": "Get the list of all cost allocation rules", "x-ms-pageable": { "nextLinkName": "nextLink" @@ -77,7 +77,7 @@ "tags": [ "CostAllocationRules" ], - "operationId": "Rule_CheckNameAvailability", + "operationId": "CostAllocationRules_CheckNameAvailability", "description": "Check if a given rule name is in use", "x-ms-examples": { "CostAllocationRuleCheckNameAvailability": { @@ -117,13 +117,13 @@ } } }, - "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules/{ruleId}": { + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules/{ruleName}": { "get": { "tags": [ "CostAllocationRules" ], - "operationId": "Get_Rule", - "description": "Gets the cost allocation rule by rule name.", + "operationId": "CostAllocationRules_Get", + "description": "Get the cost allocation rule by rule name.", "x-ms-examples": { "CostAllocationRules": { "$ref": "./examples/CostAllocationRuleGet.json" @@ -159,8 +159,8 @@ "tags": [ "CostAllocationRules" ], - "operationId": "Create_Rule", - "description": "Create/Update cost allocation rule for billing account.", + "operationId": "CostAllocationRules_CreateOrUpdate", + "description": "Create/Update cost allocation rule for billing account or enterprise enrollment.", "x-ms-examples": { "CostAllocationRules": { "$ref": "./examples/CostAllocationRuleCreate.json" @@ -205,8 +205,8 @@ "tags": [ "CostAllocationRules" ], - "operationId": "Delete_Rule", - "description": "Delete cost allocation rule for billing account.", + "operationId": "CostAllocationRules_Delete", + "description": "Delete cost allocation rule for billing account or enterprise enrollment.", "x-ms-examples": { "CostAllocationRules": { "$ref": "./examples/CostAllocationRuleDelete.json" @@ -401,7 +401,7 @@ "description": "Source resources for cost allocation", "type": "array", "items": { - "$ref": "#/definitions/CostAllocationResource" + "$ref": "#/definitions/SourceCostAllocationResource" } }, "targetResources": { @@ -413,7 +413,7 @@ } } }, - "CostAllocationResource": { + "SourceCostAllocationResource": { "type": "object", "description": "Source resources for cost allocation", "required": [ @@ -441,32 +441,35 @@ } }, "TargetCostAllocationResource": { + "type": "object", "description": "Target resources for cost allocation", - "allOf": [ - { - "$ref": "#/definitions/CostAllocationResource" + "required": [ + "resourceType", + "name", + "values", + "policyType" + ], + "properties": { + "resourceType": { + "description": "Type of resources contained in this cost allocation rule", + "$ref": "#/definitions/CostAllocationResourceType" + }, + "name": { + "description": "If resource type is dimension, this must be either ResourceGroupName or SubscriptionId. If resource type is tag, this must be a valid Azure tag", + "type": "string" }, - { - "type": "object", + "values": { "description": "Target resources for cost allocation", - "required": [ - "policyType" - ], - "properties": { - "values": { - "description": "Target resources for cost allocation", - "type": "array", - "items": { - "$ref": "#/definitions/CostAllocationProportion" - } - }, - "policyType": { - "description": "Method of cost allocation for the rule", - "$ref": "#/definitions/CostAllocationPolicyType" - } + "type": "array", + "items": { + "$ref": "#/definitions/CostAllocationProportion" } + }, + "policyType": { + "description": "Method of cost allocation for the rule", + "$ref": "#/definitions/CostAllocationPolicyType" } - ] + } }, "CostAllocationResourceType": { "type": "string", @@ -521,13 +524,13 @@ "billingAccountIdParameter": { "name": "billingAccountId", "in": "path", - "description": "Billing Account ID", + "description": "Billing Account ID or Enrollment Number", "required": true, "type": "string", "x-ms-parameter-location": "method" }, "ruleNameParameter": { - "name": "ruleId", + "name": "ruleName", "in": "path", "description": "Cost allocation rule name", "required": true, From 0f7f59cf19875a30b96d682fb0b87c0489b567f3 Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Fri, 12 Jun 2020 18:37:02 -0700 Subject: [PATCH 17/53] ruleName in examples --- .../2020-03-01-preview/examples/CostAllocationRuleCreate.json | 2 +- .../2020-03-01-preview/examples/CostAllocationRuleDelete.json | 2 +- .../2020-03-01-preview/examples/CostAllocationRuleGet.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCreate.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCreate.json index dc48e827f45d..ef4c6c780263 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCreate.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCreate.json @@ -2,7 +2,7 @@ "parameters": { "api-version": "2020-03-01-preview", "billingAccountId": "100", - "ruleId": "testRule", + "ruleName": "testRule", "costAllocationRule": { "properties": { "description": "This is a testRule", diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleDelete.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleDelete.json index 89d43527b557..d9ee660782ca 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleDelete.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleDelete.json @@ -2,7 +2,7 @@ "parameters": { "api-version": "2020-03-01-preview", "billingAccountId": "100", - "ruleId": "testRule" + "ruleName": "testRule" }, "responses": { "200": {} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleGet.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleGet.json index 125dcd4627d1..075159e07ecd 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleGet.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleGet.json @@ -2,7 +2,7 @@ "parameters": { "api-version": "2020-03-01-preview", "billingAccountId": "100", - "ruleId": "testRule" + "ruleName": "testRule" }, "responses": { "200": { From c89db65af4fbb1fdf85b513bbe7722dc22f79006 Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Fri, 12 Jun 2020 18:46:27 -0700 Subject: [PATCH 18/53] Percentage as number, example for tag --- .../preview/2020-03-01-preview/costmanagement.json | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json index 655e9af9a12b..8ec587f2dc26 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json @@ -162,8 +162,11 @@ "operationId": "CostAllocationRules_CreateOrUpdate", "description": "Create/Update cost allocation rule for billing account or enterprise enrollment.", "x-ms-examples": { - "CostAllocationRules": { + "CostAllocationRulesCreateResourceGroup": { "$ref": "./examples/CostAllocationRuleCreate.json" + }, + "CostAllocationRulesCreateTag": { + "$ref": "./examples/CostAllocationRuleCreateTag.json" } }, "parameters": [ @@ -497,7 +500,7 @@ }, "percentage": { "description" : "Percentage of source cost to allocate to this resource", - "type": "integer" + "type": "number" } } }, From 8b3b0df90bb526302ad9ea447eae46cc78f646d7 Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Fri, 12 Jun 2020 19:01:58 -0700 Subject: [PATCH 19/53] ruleName in tag example --- .../examples/CostAllocationRuleCreateTag.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCreateTag.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCreateTag.json index c658b296fad2..a42660c574df 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCreateTag.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCreateTag.json @@ -2,7 +2,7 @@ "parameters": { "api-version": "2020-03-01-preview", "billingAccountId": "100", - "ruleId": "testRule", + "ruleName": "testRule", "costAllocationRule": { "properties": { "description": "This is a testRule", From 56de5cf20c5c324c5da479216e64398123b0048b Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Sat, 13 Jun 2020 00:00:27 -0700 Subject: [PATCH 20/53] Add nesting for list --- .../preview/2020-03-01-preview/costmanagement.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json index 8ec587f2dc26..dcf147fb801f 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json @@ -36,7 +36,8 @@ "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules": { "get": { "tags": [ - "CostAllocationRules" + "CostAllocation", + "Rules" ], "operationId": "CostAllocationRules_List", "description": "Get the list of all cost allocation rules", From 6c3be4b3bf3c07682b6468f71a2d9b718b1a6275 Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Sat, 13 Jun 2020 00:22:43 -0700 Subject: [PATCH 21/53] More changes --- .../2020-03-01-preview/costmanagement.json | 96 ++++++++++++++----- 1 file changed, 74 insertions(+), 22 deletions(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json index dcf147fb801f..7e2e3d3d7744 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json @@ -39,8 +39,9 @@ "CostAllocation", "Rules" ], + "summary": "List", "operationId": "CostAllocationRules_List", - "description": "Get the list of all cost allocation rules", + "description": "Get the list of all cost allocation rules for a billing account or enterprise enrollment.", "x-ms-pageable": { "nextLinkName": "nextLink" }, @@ -61,7 +62,7 @@ "200": { "description": "List of cost allocation rules for the billing account.", "schema": { - "$ref": "#/definitions/CostAllocationRule_list" + "$ref": "#/definitions/CostAllocationRuleList" } }, "default": { @@ -78,6 +79,7 @@ "tags": [ "CostAllocationRules" ], + "summary": "Check Name Availability", "operationId": "CostAllocationRules_CheckNameAvailability", "description": "Check if a given rule name is in use", "x-ms-examples": { @@ -124,7 +126,7 @@ "CostAllocationRules" ], "operationId": "CostAllocationRules_Get", - "description": "Get the cost allocation rule by rule name.", + "description": "Get a cost allocation rule by rule name and billing account or enterprise enrollment.", "x-ms-examples": { "CostAllocationRules": { "$ref": "./examples/CostAllocationRuleGet.json" @@ -161,7 +163,7 @@ "CostAllocationRules" ], "operationId": "CostAllocationRules_CreateOrUpdate", - "description": "Create/Update cost allocation rule for billing account or enterprise enrollment.", + "description": "Create/Update a rule to allocate cost between different resources within a billing account or enterprise enrollment.", "x-ms-examples": { "CostAllocationRulesCreateResourceGroup": { "$ref": "./examples/CostAllocationRuleCreate.json" @@ -260,7 +262,7 @@ } } }, - "CostAllocationRule_list": { + "CostAllocationRuleList": { "type": "object", "description": "Result of listing cost allocation rules. It contains a list of available rules in the billing account provided.", "properties": { @@ -298,7 +300,7 @@ "description": "The cost allocation rule check name availability response", "properties": { "nameAvailable": { - "$ref": "#/definitions/NameAvailable", + "type": "boolean", "description": "Whether this rule name is available" }, "reason": { @@ -311,24 +313,13 @@ } } }, - "NameAvailable": { - "type": "string", - "description": "Whether this rule name is available", - "enum": [ - "True", - "False" - ], - "x-ms-enum": { - "name": "NameAvailable", - "modelAsString": true - } - }, "Reason": { "type": "string", "description": "The reason this name is not available", "enum": [ "Invalid", - "AlreadyExists" + "AlreadyExists", + "Valid" ], "x-ms-enum": { "name": "Reason", @@ -342,17 +333,17 @@ "id": { "type": "string", "readOnly": true, - "description": "Rule id" + "description": "Azure Resource Manager Id for the rule. This is a read ony value." }, "name": { "type": "string", "readOnly": true, - "description": "Rule name" + "description": "Name of the rule. This is a read only value." }, "type": { "type": "string", "readOnly": true, - "description": "Resource type" + "description": "Resource type of the rule. This is a read only value of Microsoft.CostManagement/CostAllocationRule." }, "properties": { "$ref": "#/definitions/CostAllocationRuleProperties", @@ -361,6 +352,32 @@ }, "x-ms-azure-resource": true }, + "CostAllocationRuleDefinitionRequest": { + "type": "object", + "description": "The cost allocation rule model definition", + "properties": { + "id": { + "type": "string", + "readOnly": true, + "description": "Azure Resource Manager Id for the rule. This is a read ony value." + }, + "name": { + "type": "string", + "readOnly": true, + "description": "Name of the rule. This is a read only value." + }, + "type": { + "type": "string", + "readOnly": true, + "description": "Resource type of the rule. This is a read only value of Microsoft.CostManagement/CostAllocationRule." + }, + "properties": { + "$ref": "#/definitions/CostAllocationRulePropertiesRequest", + "description": "Cost allocation rule properties" + } + }, + "x-ms-azure-resource": true + }, "CostAllocationRuleProperties": { "type": "object", "description": "The properties of a cost allocation rule", @@ -384,6 +401,29 @@ } } }, + "CostAllocationRulePropertiesRequest": { + "type": "object", + "description": "The properties of a cost allocation rule", + "additionalProperties": false, + "required": [ + "status", + "details" + ], + "properties": { + "description": { + "description": "Description of a cost allocation rule.", + "type": "string" + }, + "status": { + "$ref": "#/definitions/InputRuleStatus", + "description": "Status of the rule" + }, + "details": { + "description": "Resource information for the cost allocation rule", + "$ref": "#/definitions/CostAllocationRuleDetails" + } + } + }, "RuleStatus": { "type": "string", "description": "Current status of the rule", @@ -397,6 +437,18 @@ "modelAsString": true } }, + "InputRuleStatus": { + "type": "string", + "description": "Current status of the rule", + "enum": [ + "NotActive", + "Active" + ], + "x-ms-enum": { + "name": "RuleStatus", + "modelAsString": true + } + }, "CostAllocationRuleDetails": { "type": "object", "description": "Resource details of the cost allocation rule", From bf0d0637ac3869d63e82c48848baf5036ac19064 Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Sat, 13 Jun 2020 00:31:57 -0700 Subject: [PATCH 22/53] Fix example name --- .../examples/CostAllocationRuleCheckNameAvailability.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCheckNameAvailability.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCheckNameAvailability.json index e7a6d55a3b84..0c978bbf8cf5 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCheckNameAvailability.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCheckNameAvailability.json @@ -11,7 +11,7 @@ "responses": { "200": { "body": { - "nameAvailable": "False", + "nameAvailable": false, "reason": "AlreadyExists", "message": "A cost allocation rule with name testRule is already present for the billing account 100. Please specify a differnt name." } From d139ee60525ced9ce7dd325fbff00a7c05e4f109 Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Sat, 13 Jun 2020 00:38:53 -0700 Subject: [PATCH 23/53] Update tags/summary setup --- .../preview/2020-03-01-preview/costmanagement.json | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json index 7e2e3d3d7744..b5da60cfffe1 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json @@ -36,11 +36,9 @@ "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules": { "get": { "tags": [ - "CostAllocation", - "Rules" + "CostAllocationRules" ], - "summary": "List", - "operationId": "CostAllocationRules_List", + "operationId": "List", "description": "Get the list of all cost allocation rules for a billing account or enterprise enrollment.", "x-ms-pageable": { "nextLinkName": "nextLink" @@ -79,7 +77,6 @@ "tags": [ "CostAllocationRules" ], - "summary": "Check Name Availability", "operationId": "CostAllocationRules_CheckNameAvailability", "description": "Check if a given rule name is in use", "x-ms-examples": { From a19bb98d603079e1f1ea605f10c72af8f6c69d38 Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Sat, 13 Jun 2020 19:48:55 -0700 Subject: [PATCH 24/53] Update based on review --- .../2020-03-01-preview/costmanagement.json | 160 ++++++++++-------- .../examples/CostAllocationRulesList.json | 47 ++++- 2 files changed, 132 insertions(+), 75 deletions(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json index b5da60cfffe1..a5fd74e5f9d0 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json @@ -38,7 +38,7 @@ "tags": [ "CostAllocationRules" ], - "operationId": "List", + "operationId": "CostAllocationRules_List", "description": "Get the list of all cost allocation rules for a billing account or enterprise enrollment.", "x-ms-pageable": { "nextLinkName": "nextLink" @@ -380,7 +380,6 @@ "description": "The properties of a cost allocation rule", "additionalProperties": false, "required": [ - "status", "details" ], "properties": { @@ -388,38 +387,51 @@ "description": "Description of a cost allocation rule.", "type": "string" }, - "status": { - "$ref": "#/definitions/RuleStatus", - "description": "Status of the rule" - }, "details": { "description": "Resource information for the cost allocation rule", "$ref": "#/definitions/CostAllocationRuleDetails" } } }, - "CostAllocationRulePropertiesRequest": { - "type": "object", - "description": "The properties of a cost allocation rule", - "additionalProperties": false, - "required": [ - "status", - "details" - ], - "properties": { - "description": { - "description": "Description of a cost allocation rule.", - "type": "string" + "CostAllocationRulePropertiesResponse": { + "description": "The properties of a cost allocation rule response", + "allOf": [ + { + "$ref": "#/definitions/CostAllocationRuleProperties" }, - "status": { - "$ref": "#/definitions/InputRuleStatus", - "description": "Status of the rule" + { + "type": "object", + "properties": { + "status": { + "$ref": "#/definitions/RuleStatus", + "description": "Status of the rule" + } + }, + "required": [ + "status" + ] + } + ] + }, + "CostAllocationRulePropertiesRequest": { + "description": "The properties of a cost allocation rule response", + "allOf": [ + { + "$ref": "#/definitions/CostAllocationRuleProperties" }, - "details": { - "description": "Resource information for the cost allocation rule", - "$ref": "#/definitions/CostAllocationRuleDetails" + { + "type": "object", + "properties": { + "status": { + "$ref": "#/definitions/InputRuleStatus", + "description": "Status of the rule" + } + }, + "required": [ + "status" + ] } - } + ] }, "RuleStatus": { "type": "string", @@ -451,7 +463,7 @@ "description": "Resource details of the cost allocation rule", "properties": { "sourceResources": { - "description": "Source resources for cost allocation", + "description": "Source resources for cost allocation. Only one type of resource can be used for sourcing cost per rule, so this list can contain no more than one element.", "type": "array", "items": { "$ref": "#/definitions/SourceCostAllocationResource" @@ -459,20 +471,19 @@ }, "targetResources": { "type": "array", - "description": "Target resources for cost allocation", + "description": "Target resources for cost allocation. Only one type of resource can be used for targeting cost per rule, so this list can contain no more than one element.", "items": { "$ref": "#/definitions/TargetCostAllocationResource" } } } }, - "SourceCostAllocationResource": { + "CostAllocationResource": { "type": "object", - "description": "Source resources for cost allocation", + "description": "Common values for resources for cost allocation", "required": [ "resourceType", - "name", - "values" + "name" ], "properties": { "resourceType": { @@ -482,47 +493,60 @@ "name": { "description": "If resource type is dimension, this must be either ResourceGroupName or SubscriptionId. If resource type is tag, this must be a valid Azure tag", "type": "string" - }, - "values": { - "description": "Source Resources for cost allocation", - "type": "array", - "items": { - "description": "Source resource for cost allocation", - "type": "string" - } } } }, - "TargetCostAllocationResource": { - "type": "object", - "description": "Target resources for cost allocation", - "required": [ - "resourceType", - "name", - "values", - "policyType" - ], - "properties": { - "resourceType": { - "description": "Type of resources contained in this cost allocation rule", - "$ref": "#/definitions/CostAllocationResourceType" - }, - "name": { - "description": "If resource type is dimension, this must be either ResourceGroupName or SubscriptionId. If resource type is tag, this must be a valid Azure tag", - "type": "string" + "SourceCostAllocationResource": { + "allOf": [ + { + "$ref": "#/definitions/CostAllocationResource" }, - "values": { - "description": "Target resources for cost allocation", - "type": "array", - "items": { - "$ref": "#/definitions/CostAllocationProportion" - } + { + "type": "object", + "properties": { + "values": { + "description": "Source Resources for cost allocation. This list cannot contain more than 25 values.", + "type": "array", + "items": { + "description": "Source resource for cost allocation", + "type": "string" + } + } + }, + "required": [ + "values" + ] + } + ], + "description": "Source resources for cost allocation" + }, + "TargetCostAllocationResource": { + "description": "Target resources for cost allocation.", + "allOf": [ + { + "$ref": "#/definitions/CostAllocationResource" }, - "policyType": { - "description": "Method of cost allocation for the rule", - "$ref": "#/definitions/CostAllocationPolicyType" + { + "type": "object", + "properties": { + "values": { + "description": "Target resources for cost allocation. This list cannot contain more than 25 values.", + "type": "array", + "items": { + "$ref": "#/definitions/CostAllocationProportion" + } + }, + "policyType": { + "description": "Method of cost allocation for the rule", + "$ref": "#/definitions/CostAllocationPolicyType" + } + }, + "required": [ + "values", + "policyType" + ] } - } + ] }, "CostAllocationResourceType": { "type": "string", @@ -549,7 +573,7 @@ "type": "string" }, "percentage": { - "description" : "Percentage of source cost to allocate to this resource", + "description" : "Percentage of source cost to allocate to this resource. This value can be specified to two decimal places and the total percentage of all resources in this rule must sum to 100.00.", "type": "number" } } @@ -585,7 +609,7 @@ "ruleNameParameter": { "name": "ruleName", "in": "path", - "description": "Cost allocation rule name", + "description": "Cost allocation rule name. The name cannot include spaces or any non alphanumeric characters other than '_' and '-'. The max length is 260 characters.", "required": true, "type": "string", "x-ms-parameter-location": "method" diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRulesList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRulesList.json index 0278d38d8158..6d467540e97f 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRulesList.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRulesList.json @@ -50,14 +50,47 @@ "type": "Microsoft.CostManagement/costAllocationRules", "properties": { "description": "This is a second test Rule", - "status": "NotActive", + "status": "Active", "details": { "sourceResources" : [ { "resourceType": "Dimension", - "name": "ResourceGroupName", + "name": "SubscriptionId", + "values": [ + "2A002F2D-536F-4D7C-90DA-3D0BAE879B0E" + ] + } + ], + "targetResources" : [ + { + "resourceType": "Tag", + "policyType": "FixedProportion", + "name": "category", + "values": [ + { + "name": "devops", + "percentage": 100 + } + ] + } + ] + } + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/100/providers/Microsoft.CostManagement/costAllocationRules/testRule3", + "name": "testRule3", + "type": "Microsoft.CostManagement/costAllocationRules", + "properties": { + "description": "This is a third test Rule", + "status": "Active", + "details": { + "sourceResources" : [ + { + "resourceType": "Tag", + "name": "category", "values": [ - "sampleRG2" + "devops" ] } ], @@ -68,12 +101,12 @@ "name": "ResourceGroupName", "values": [ { - "name": "destination2RG", - "percentage": 50 + "name": "ResourceGroup", + "percentage": 55.55 }, { - "name": "destination2RG2", - "percentage": 50 + "name": "ResourceGroupSecond", + "percentage": 44.45 } ] } From 122c52064f45e913a81f42fddc0e9b766dbd80fa Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Sun, 14 Jun 2020 23:13:52 -0700 Subject: [PATCH 25/53] Complete changes for API review --- .../2020-03-01-preview/costmanagement.json | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json index a5fd74e5f9d0..c56668f5ee90 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json @@ -4,6 +4,12 @@ "title": "CostManagementClient", "version": "2020-03-01-preview" }, + "tags": [ + { + "name": "CostAllocationRules", + "description": "An API for creating and managing cost allocation rules within a billing account or enterprise enrollment. These rules can be used to reallocate cost between resources, filtered by Resource Group, Subscription, or Tag." + } + ], "host": "management.azure.com", "schemes": [ "https" @@ -230,6 +236,9 @@ "200": { "description": "OK. The request has succeeded." }, + "204": { + "description": "NoContent. Rule did not exist." + }, "default": { "description": "Error response describing why the operation failed.", "schema": { @@ -312,7 +321,7 @@ }, "Reason": { "type": "string", - "description": "The reason this name is not available", + "description": "The reason this name is not available.", "enum": [ "Invalid", "AlreadyExists", @@ -435,7 +444,7 @@ }, "RuleStatus": { "type": "string", - "description": "Current status of the rule", + "description": "Current status of the rule. The rule must be active to change billed values. Processing indicates that a saved change has not yet been applied to your account.", "enum": [ "NotActive", "Active", @@ -448,7 +457,7 @@ }, "InputRuleStatus": { "type": "string", - "description": "Current status of the rule", + "description": "Current status of the rule. The rule must be active to change billed values.", "enum": [ "NotActive", "Active" @@ -550,7 +559,7 @@ }, "CostAllocationResourceType": { "type": "string", - "description": "Category of resource to use for allocation", + "description": "Category of resource to use for allocation. Dimension indicates cost for either a resource group or subscription is being changed. Tag allocates cost based on Azure Tag key value pairs.", "enum": [ "Dimension", "Tag" @@ -580,7 +589,7 @@ }, "CostAllocationPolicyType": { "type": "string", - "description": "Method to use for allocating cost", + "description": "Method to use for allocating cost. FixedProportion indicates that cost will be split based on specified percentage values.", "enum": [ "FixedProportion" ], From e6070d81ecb294f00cf02c901b4e1e81a2e9ab3d Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Mon, 15 Jun 2020 00:23:38 -0700 Subject: [PATCH 26/53] remove tags --- .../preview/2020-03-01-preview/costmanagement.json | 6 ------ 1 file changed, 6 deletions(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json index c56668f5ee90..bca92c257708 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json @@ -4,12 +4,6 @@ "title": "CostManagementClient", "version": "2020-03-01-preview" }, - "tags": [ - { - "name": "CostAllocationRules", - "description": "An API for creating and managing cost allocation rules within a billing account or enterprise enrollment. These rules can be used to reallocate cost between resources, filtered by Resource Group, Subscription, or Tag." - } - ], "host": "management.azure.com", "schemes": [ "https" From b1eed5835bea3712d6547701e2051ace4bcec5aa Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Mon, 15 Jun 2020 00:26:17 -0700 Subject: [PATCH 27/53] fix response model, restore tag --- .../preview/2020-03-01-preview/costmanagement.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json index bca92c257708..178e5734bfef 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json @@ -4,6 +4,12 @@ "title": "CostManagementClient", "version": "2020-03-01-preview" }, + "tags": [ + { + "name": "CostAllocationRules", + "description": "An API for creating and managing cost allocation rules within a billing account or enterprise enrollment. These rules can be used to reallocate cost between resources, filtered by Resource Group, Subscription, or Tag." + } + ], "host": "management.azure.com", "schemes": [ "https" @@ -346,7 +352,7 @@ "description": "Resource type of the rule. This is a read only value of Microsoft.CostManagement/CostAllocationRule." }, "properties": { - "$ref": "#/definitions/CostAllocationRuleProperties", + "$ref": "#/definitions/CostAllocationRulePropertiesResponse", "description": "Cost allocation rule properties" } }, From 788a09ae9bf44b7f1b0816508fcd7ac81560b02d Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Mon, 15 Jun 2020 00:38:11 -0700 Subject: [PATCH 28/53] Add 204 to example --- .../2020-03-01-preview/examples/CostAllocationRuleDelete.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleDelete.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleDelete.json index d9ee660782ca..3a796c1a47b5 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleDelete.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleDelete.json @@ -5,6 +5,7 @@ "ruleName": "testRule" }, "responses": { - "200": {} + "200": {}, + "204": {} } } From 6ac27f6315fa394e696ac8826904c50ac75c8fec Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Mon, 15 Jun 2020 16:52:24 -0700 Subject: [PATCH 29/53] Remove actual next link until implemented --- .../preview/2020-03-01-preview/costmanagement.json | 2 +- .../2020-03-01-preview/examples/CostAllocationRulesList.json | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json index 178e5734bfef..a8ed88d848b4 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json @@ -47,7 +47,7 @@ "operationId": "CostAllocationRules_List", "description": "Get the list of all cost allocation rules for a billing account or enterprise enrollment.", "x-ms-pageable": { - "nextLinkName": "nextLink" + "nextLinkName": null }, "x-ms-examples": { "CostAllocationRules_List": { diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRulesList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRulesList.json index 6d467540e97f..7ee3fd7a83b4 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRulesList.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRulesList.json @@ -114,8 +114,7 @@ } } } - ], - "nextLink": "" + ] } } } From 2fc8414c9a4792e296a35d5e731fc51168f9dbd2 Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Mon, 15 Jun 2020 16:53:48 -0700 Subject: [PATCH 30/53] Improve naming --- .../preview/2020-03-01-preview/costmanagement.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json index a8ed88d848b4..1b928702d47b 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json @@ -50,7 +50,7 @@ "nextLinkName": null }, "x-ms-examples": { - "CostAllocationRules_List": { + "CostAllocationRulesList": { "$ref": "./examples/CostAllocationRulesList.json" } }, @@ -463,7 +463,7 @@ "Active" ], "x-ms-enum": { - "name": "RuleStatus", + "name": "InputRuleStatus", "modelAsString": true } }, From 2f28e6e25034e07ed5a70eb12ae43ddbbeaf3da5 Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Mon, 15 Jun 2020 17:02:14 -0700 Subject: [PATCH 31/53] restore paging --- .../preview/2020-03-01-preview/costmanagement.json | 2 +- .../2020-03-01-preview/examples/CostAllocationRulesList.json | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json index 1b928702d47b..d48c1801f0e1 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json @@ -47,7 +47,7 @@ "operationId": "CostAllocationRules_List", "description": "Get the list of all cost allocation rules for a billing account or enterprise enrollment.", "x-ms-pageable": { - "nextLinkName": null + "nextLinkName": "nextLink" }, "x-ms-examples": { "CostAllocationRulesList": { diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRulesList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRulesList.json index 7ee3fd7a83b4..c2185ee6c3ee 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRulesList.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRulesList.json @@ -114,7 +114,8 @@ } } } - ] + ], + "nextLink": null } } } From 712ec9165d3964c6c5fb3c8094a906e56b536745 Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Mon, 15 Jun 2020 23:34:47 -0700 Subject: [PATCH 32/53] fixes found in review --- .../preview/2020-03-01-preview/costmanagement.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json index d48c1801f0e1..97849144ee1c 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json @@ -84,7 +84,7 @@ "CostAllocationRules" ], "operationId": "CostAllocationRules_CheckNameAvailability", - "description": "Check if a given rule name is in use", + "description": "Checks availability and correctness of a name for a cost allocation rule", "x-ms-examples": { "CostAllocationRuleCheckNameAvailability": { "$ref": "./examples/CostAllocationRuleCheckNameAvailability.json" @@ -191,7 +191,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/CostAllocationRuleDefinition" + "$ref": "#/definitions/CostAllocationRuleDefinitionRequest" } } ], @@ -297,7 +297,7 @@ }, "type": { "type": "string", - "description": "Resource type" + "description": "Resource type. This is expected to be Microsoft.CostManagement/costAllocationRules" } } }, From 41527132b42361d8fd618f51ae9666c074daeae2 Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Mon, 15 Jun 2020 23:42:28 -0700 Subject: [PATCH 33/53] Reduce duplication of definition object --- .../2020-03-01-preview/costmanagement.json | 64 ++++++++++--------- 1 file changed, 34 insertions(+), 30 deletions(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json index 97849144ee1c..87197bb4481d 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json @@ -150,7 +150,7 @@ "200": { "description": "OK. The request has succeeded.", "schema": { - "$ref": "#/definitions/CostAllocationRuleDefinition" + "$ref": "#/definitions/CostAllocationRuleDefinitionResponse" } }, "default": { @@ -199,7 +199,7 @@ "200": { "description": "OK. The request has succeeded.", "schema": { - "$ref": "#/definitions/CostAllocationRuleDefinition" + "$ref": "#/definitions/CostAllocationRuleDefinitionResponse" } }, "default": { @@ -277,7 +277,7 @@ "type": "array", "readOnly": true, "items": { - "$ref": "#/definitions/CostAllocationRuleDefinition" + "$ref": "#/definitions/CostAllocationRuleDefinitionResponse" } }, "nextLink": { @@ -350,39 +350,43 @@ "type": "string", "readOnly": true, "description": "Resource type of the rule. This is a read only value of Microsoft.CostManagement/CostAllocationRule." - }, - "properties": { - "$ref": "#/definitions/CostAllocationRulePropertiesResponse", - "description": "Cost allocation rule properties" } }, "x-ms-azure-resource": true }, - "CostAllocationRuleDefinitionRequest": { - "type": "object", - "description": "The cost allocation rule model definition", - "properties": { - "id": { - "type": "string", - "readOnly": true, - "description": "Azure Resource Manager Id for the rule. This is a read ony value." - }, - "name": { - "type": "string", - "readOnly": true, - "description": "Name of the rule. This is a read only value." + "CostAllocationRuleDefinitionResponse": { + "allOf": [ + { + "$ref": "#/definitions/CostAllocationRuleDefinition" }, - "type": { - "type": "string", - "readOnly": true, - "description": "Resource type of the rule. This is a read only value of Microsoft.CostManagement/CostAllocationRule." + { + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/CostAllocationRulePropertiesResponse", + "description": "Cost allocation rule properties" + } + } + } + ], + "description": "The cost allocation rule model definition" + }, + "CostAllocationRuleDefinitionRequest": { + "allOf": [ + { + "$ref": "#/definitions/CostAllocationRuleDefinition" }, - "properties": { - "$ref": "#/definitions/CostAllocationRulePropertiesRequest", - "description": "Cost allocation rule properties" + { + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/CostAllocationRulePropertiesRequest", + "description": "Cost allocation rule properties" + } + } } - }, - "x-ms-azure-resource": true + ], + "description": "The cost allocation rule model definition" }, "CostAllocationRuleProperties": { "type": "object", @@ -423,7 +427,7 @@ ] }, "CostAllocationRulePropertiesRequest": { - "description": "The properties of a cost allocation rule response", + "description": "The properties of a cost allocation rule request", "allOf": [ { "$ref": "#/definitions/CostAllocationRuleProperties" From 45fad22f824e3bfdcd49710c25ff87674ec1e812 Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Tue, 16 Jun 2020 08:57:52 -0700 Subject: [PATCH 34/53] camelcase checkname url --- .../preview/2020-03-01-preview/costmanagement.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json index 87197bb4481d..958c94d8caa5 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json @@ -78,7 +78,7 @@ } } }, - "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules/checknameavailability": { + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules/checkNameAvailability": { "post": { "tags": [ "CostAllocationRules" From 27dc73bb2dc92c1557dd76d6bbc09dca53dc4348 Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Tue, 16 Jun 2020 09:14:00 -0700 Subject: [PATCH 35/53] Make one type limitation clearer --- .../preview/2020-03-01-preview/costmanagement.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json index 958c94d8caa5..fdd1f0271383 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json @@ -476,7 +476,7 @@ "description": "Resource details of the cost allocation rule", "properties": { "sourceResources": { - "description": "Source resources for cost allocation. Only one type of resource can be used for sourcing cost per rule, so this list can contain no more than one element.", + "description": "Source resources for cost allocation. At this time, this list can contain no more than one element.", "type": "array", "items": { "$ref": "#/definitions/SourceCostAllocationResource" @@ -484,7 +484,7 @@ }, "targetResources": { "type": "array", - "description": "Target resources for cost allocation. Only one type of resource can be used for targeting cost per rule, so this list can contain no more than one element.", + "description": "Target resources for cost allocation. At this time, this list can contain no more than one element.", "items": { "$ref": "#/definitions/TargetCostAllocationResource" } From 40adb35d38e68216113e9f820d67e995c4e09c78 Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Wed, 24 Jun 2020 15:46:01 -0700 Subject: [PATCH 36/53] Use enum descriptions --- .../2020-03-01-preview/costmanagement.json | 53 ++++++++++++++++--- 1 file changed, 47 insertions(+), 6 deletions(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json index fdd1f0271383..6e4df25052d0 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json @@ -448,7 +448,7 @@ }, "RuleStatus": { "type": "string", - "description": "Current status of the rule. The rule must be active to change billed values. Processing indicates that a saved change has not yet been applied to your account.", + "description": "Current status of the rule.", "enum": [ "NotActive", "Active", @@ -456,19 +456,48 @@ ], "x-ms-enum": { "name": "RuleStatus", - "modelAsString": true + "modelAsString": true, + "values": [ + { + "value": "NotActive", + "description": "Rule is saved but not used to allocate costs.", + "name": "NotActive" + }, + { + "value": "Active", + "description": "Rule is saved and impacting cost allocation.", + "name": "Active" + }, + { + "value": "Processing", + "description": "Rule is saved and cost allocation is being updated.", + "name": "Processing" + } + ] } }, "InputRuleStatus": { "type": "string", - "description": "Current status of the rule. The rule must be active to change billed values.", + "description": "Desired status of the rule.", "enum": [ "NotActive", "Active" ], "x-ms-enum": { "name": "InputRuleStatus", - "modelAsString": true + "modelAsString": true, + "values": [ + { + "value": "NotActive", + "description": "Rule will be saved but not used to allocate costs.", + "name": "NotActive" + }, + { + "value": "Active", + "description": "Rule will be saved and impacting cost allocation.", + "name": "Active" + } + ] } }, "CostAllocationRuleDetails": { @@ -563,14 +592,26 @@ }, "CostAllocationResourceType": { "type": "string", - "description": "Category of resource to use for allocation. Dimension indicates cost for either a resource group or subscription is being changed. Tag allocates cost based on Azure Tag key value pairs.", + "description": "Category of resource to use for allocation.", "enum": [ "Dimension", "Tag" ], "x-ms-enum": { "name": "CostAllocationResourceType", - "modelAsString": true + "modelAsString": true, + "values": [ + { + "value": "Dimension", + "description": "Indicates an Azure dimension such as a subscription id or resource group name is being used for allocation.", + "name": "Dimension" + }, + { + "value": "Tag", + "description": "Allocates cost based on Azure Tag key value pairs.", + "name": "Tag" + } + ] } }, "CostAllocationProportion": { From 03d8aca4d21396ecc9e3dbe5a1c6c0f2f31323a2 Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Mon, 6 Jul 2020 10:18:27 -0700 Subject: [PATCH 37/53] Add created/updated date to response contract --- .../preview/2020-03-01-preview/costmanagement.json | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json index 6e4df25052d0..331449f323f8 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json @@ -418,6 +418,16 @@ "status": { "$ref": "#/definitions/RuleStatus", "description": "Status of the rule" + }, + "createdDate": { + "type": "string", + "format": "date-time", + "description": "Time at which the rule was created. Rules that change cost for the same resource are applied in order of creation." + }, + "updatedDate": { + "type": "string", + "format": "date-time", + "description": "Time at which the rule was last updated." } }, "required": [ From cc97daf6ee1426ff57bb2559b594b03f4ce81059 Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Mon, 6 Jul 2020 11:29:20 -0700 Subject: [PATCH 38/53] minor style fix --- .../preview/2020-03-01-preview/costmanagement.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json index 331449f323f8..23b456d28bf7 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json @@ -34,7 +34,7 @@ "flow": "implicit", "description": "Azure Active Directory OAuth2 Flow.", "scopes": { - "user_impersonation": "impersonate your user account" + "user_impersonation": "Impersonate your user account" } } }, From 3d0c8675689075664fc3dd4f5eccdfdc41dc042a Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Mon, 6 Jul 2020 11:50:15 -0700 Subject: [PATCH 39/53] Fix examples --- .../examples/CostAllocationRuleCreate.json | 2 ++ .../examples/CostAllocationRuleCreateTag.json | 2 ++ .../2020-03-01-preview/examples/CostAllocationRuleGet.json | 2 ++ .../examples/CostAllocationRulesList.json | 6 ++++++ 4 files changed, 12 insertions(+) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCreate.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCreate.json index ef4c6c780263..7fce65bc3520 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCreate.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCreate.json @@ -47,6 +47,8 @@ "type": "Microsoft.CostManagement/costAllocationRules", "properties": { "description": "This is a testRule", + "createdDate": "2020-06-18T22:21:51.1287144Z", + "updatedDate": "2020-06-18T22:21:51.1287144Z", "status": "Creating", "details": { "sourceResources" : [ diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCreateTag.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCreateTag.json index a42660c574df..ff2c1f4e2137 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCreateTag.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCreateTag.json @@ -50,6 +50,8 @@ "type": "Microsoft.CostManagement/costAllocationRules", "properties": { "description": "This is a testRule", + "createdDate": "2020-06-18T22:21:51.1287144Z", + "updatedDate": "2020-06-18T22:21:51.1287144Z", "status": "Creating", "details": { "sourceResources" : [ diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleGet.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleGet.json index 075159e07ecd..13c6a7446e62 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleGet.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleGet.json @@ -12,6 +12,8 @@ "type": "Microsoft.CostManagement/costAllocationRules", "properties": { "description": "This is a testRule", + "createdDate": "2020-06-18T22:21:51.1287144Z", + "updatedDate": "2020-06-18T22:21:51.1287144Z", "status": "NotActive", "details": { "sourceResources" : [ diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRulesList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRulesList.json index c2185ee6c3ee..5b74392bd8ba 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRulesList.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRulesList.json @@ -13,6 +13,8 @@ "type": "Microsoft.CostManagement/costAllocationRules", "properties": { "description": "This is a testRule", + "createdDate": "2020-06-18T22:21:51.1287144Z", + "updatedDate": "2020-06-18T22:21:51.1287144Z", "status": "NotActive", "details": { "sourceResources" : [ @@ -50,6 +52,8 @@ "type": "Microsoft.CostManagement/costAllocationRules", "properties": { "description": "This is a second test Rule", + "createdDate": "2020-06-18T22:21:51.1287144Z", + "updatedDate": "2020-06-18T22:21:51.1287144Z", "status": "Active", "details": { "sourceResources" : [ @@ -83,6 +87,8 @@ "type": "Microsoft.CostManagement/costAllocationRules", "properties": { "description": "This is a third test Rule", + "createdDate": "2020-06-18T22:21:51.1287144Z", + "updatedDate": "2020-06-18T22:21:51.1287144Z", "status": "Active", "details": { "sourceResources" : [ From 582aaa6c2423f9a2a96fc40a8c30147be8ee5581 Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Mon, 3 Aug 2020 16:20:22 -0700 Subject: [PATCH 40/53] Improve messages --- .../preview/2020-03-01-preview/costmanagement.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json index 23b456d28bf7..32def72ed5c5 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json @@ -64,7 +64,7 @@ ], "responses": { "200": { - "description": "List of cost allocation rules for the billing account.", + "description": "List of cost allocation rules for the billing account or enterprise enrollment.", "schema": { "$ref": "#/definitions/CostAllocationRuleList" } @@ -99,7 +99,7 @@ }, { "name": "costAllocationRuleCheckNameAvailabilityRequest", - "description": "Cost allocation rule to be created/updated", + "description": "Cost allocation rule to be created or updated", "in": "body", "required": true, "schema": { @@ -187,7 +187,7 @@ }, { "name": "costAllocationRule", - "description": "Cost allocation rule to be created/updated", + "description": "Cost allocation rule to be created or updated", "in": "body", "required": true, "schema": { @@ -270,7 +270,7 @@ }, "CostAllocationRuleList": { "type": "object", - "description": "Result of listing cost allocation rules. It contains a list of available rules in the billing account provided.", + "description": "Result of listing cost allocation rules. It contains a list of available rules in the billing account or enterprise enrollment provided.", "properties": { "value": { "description": "The list of cost allocation rules.", From df9e50b97bdbfa7b29fa7b091bd5fb37a72ef51c Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Wed, 12 Aug 2020 01:10:50 -0700 Subject: [PATCH 41/53] Remove correlation id, run prettier --- .../2020-03-01-preview/costmanagement.json | 20 ++++++++----------- ...stAllocationRuleCheckNameAvailability.json | 3 +-- .../examples/CostAllocationRuleCreate.json | 8 ++++---- .../examples/CostAllocationRuleCreateTag.json | 8 ++++---- .../examples/CostAllocationRuleGet.json | 4 ++-- .../examples/CostAllocationRulesList.json | 12 +++++------ 6 files changed, 25 insertions(+), 30 deletions(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json index 32def72ed5c5..f996a910e664 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json @@ -137,13 +137,13 @@ }, "parameters": [ { - "$ref": "#/parameters/apiVersionParameter" + "$ref": "#/parameters/apiVersionParameter" }, { - "$ref": "#/parameters/billingAccountIdParameter" + "$ref": "#/parameters/billingAccountIdParameter" }, { - "$ref": "#/parameters/ruleNameParameter" + "$ref": "#/parameters/ruleNameParameter" } ], "responses": { @@ -180,10 +180,10 @@ "$ref": "#/parameters/apiVersionParameter" }, { - "$ref": "#/parameters/billingAccountIdParameter" + "$ref": "#/parameters/billingAccountIdParameter" }, { - "$ref": "#/parameters/ruleNameParameter" + "$ref": "#/parameters/ruleNameParameter" }, { "name": "costAllocationRule", @@ -261,10 +261,6 @@ "message": { "type": "string", "description": "Error message with additional details." - }, - "correlationId": { - "type": "string", - "description": "Tracking id for support reference" } } }, @@ -626,7 +622,7 @@ }, "CostAllocationProportion": { "type": "object", - "description" : "Target resources and allocation", + "description": "Target resources and allocation", "required": [ "percentage", "name" @@ -637,7 +633,7 @@ "type": "string" }, "percentage": { - "description" : "Percentage of source cost to allocate to this resource. This value can be specified to two decimal places and the total percentage of all resources in this rule must sum to 100.00.", + "description": "Percentage of source cost to allocate to this resource. This value can be specified to two decimal places and the total percentage of all resources in this rule must sum to 100.00.", "type": "number" } } @@ -679,4 +675,4 @@ "x-ms-parameter-location": "method" } } -} \ No newline at end of file +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCheckNameAvailability.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCheckNameAvailability.json index 0c978bbf8cf5..01dce08d0ffc 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCheckNameAvailability.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCheckNameAvailability.json @@ -2,8 +2,7 @@ "parameters": { "api-version": "2020-03-01-preview", "billingAccountId": "100", - "costAllocationRuleCheckNameAvailabilityRequest": - { + "costAllocationRuleCheckNameAvailabilityRequest": { "name": "testRule", "type": "Microsoft.CostManagement/costAllocationRules" } diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCreate.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCreate.json index 7fce65bc3520..82d5cefa2b2e 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCreate.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCreate.json @@ -8,7 +8,7 @@ "description": "This is a testRule", "status": "Active", "details": { - "sourceResources" : [ + "sourceResources": [ { "resourceType": "Dimension", "name": "ResourceGroupName", @@ -18,7 +18,7 @@ ] } ], - "targetResources" : [ + "targetResources": [ { "resourceType": "Dimension", "policyType": "FixedProportion", @@ -51,7 +51,7 @@ "updatedDate": "2020-06-18T22:21:51.1287144Z", "status": "Creating", "details": { - "sourceResources" : [ + "sourceResources": [ { "resourceType": "Dimension", "name": "ResourceGroupName", @@ -60,7 +60,7 @@ ] } ], - "targetResources" : [ + "targetResources": [ { "resourceType": "Dimension", "policyType": "FixedProportion", diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCreateTag.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCreateTag.json index ff2c1f4e2137..87edfcec150c 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCreateTag.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCreateTag.json @@ -8,7 +8,7 @@ "description": "This is a testRule", "status": "Active", "details": { - "sourceResources" : [ + "sourceResources": [ { "resourceType": "Tag", "name": "category", @@ -17,7 +17,7 @@ ] } ], - "targetResources" : [ + "targetResources": [ { "resourceType": "Dimension", "policyType": "FixedProportion", @@ -54,7 +54,7 @@ "updatedDate": "2020-06-18T22:21:51.1287144Z", "status": "Creating", "details": { - "sourceResources" : [ + "sourceResources": [ { "resourceType": "Dimension", "name": "ResourceGroupName", @@ -63,7 +63,7 @@ ] } ], - "targetResources" : [ + "targetResources": [ { "resourceType": "Dimension", "policyType": "FixedProportion", diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleGet.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleGet.json index 13c6a7446e62..c2e38a9710ed 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleGet.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleGet.json @@ -16,7 +16,7 @@ "updatedDate": "2020-06-18T22:21:51.1287144Z", "status": "NotActive", "details": { - "sourceResources" : [ + "sourceResources": [ { "resourceType": "Dimension", "name": "ResourceGroupName", @@ -25,7 +25,7 @@ ] } ], - "targetResources" : [ + "targetResources": [ { "resourceType": "Dimension", "policyType": "FixedProportion", diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRulesList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRulesList.json index 5b74392bd8ba..96642fa6fdb5 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRulesList.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRulesList.json @@ -17,7 +17,7 @@ "updatedDate": "2020-06-18T22:21:51.1287144Z", "status": "NotActive", "details": { - "sourceResources" : [ + "sourceResources": [ { "resourceType": "Dimension", "name": "ResourceGroupName", @@ -26,7 +26,7 @@ ] } ], - "targetResources" : [ + "targetResources": [ { "resourceType": "Dimension", "policyType": "FixedProportion", @@ -56,7 +56,7 @@ "updatedDate": "2020-06-18T22:21:51.1287144Z", "status": "Active", "details": { - "sourceResources" : [ + "sourceResources": [ { "resourceType": "Dimension", "name": "SubscriptionId", @@ -65,7 +65,7 @@ ] } ], - "targetResources" : [ + "targetResources": [ { "resourceType": "Tag", "policyType": "FixedProportion", @@ -91,7 +91,7 @@ "updatedDate": "2020-06-18T22:21:51.1287144Z", "status": "Active", "details": { - "sourceResources" : [ + "sourceResources": [ { "resourceType": "Tag", "name": "category", @@ -100,7 +100,7 @@ ] } ], - "targetResources" : [ + "targetResources": [ { "resourceType": "Dimension", "policyType": "FixedProportion", From 5e60c5272ce5315bfd8d0a2cb7cedbea1d9566de Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Wed, 12 Aug 2020 01:21:25 -0700 Subject: [PATCH 42/53] Fix error format --- .../2020-03-01-preview/costmanagement.json | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json index f996a910e664..ce5d6a504be2 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json @@ -250,17 +250,28 @@ } }, "definitions": { - "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", + "ErrorDetails": { + "description": "The details of the error.", "properties": { "code": { + "description": "A machine readable error code.", "type": "string", - "description": "Error code" + "readOnly": true }, "message": { + "description": "A human readable error message.", "type": "string", - "description": "Error message with additional details." + "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" } } }, From 2c6b61ceb507690afcba2aa9ee8398b1ee9ff745 Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Thu, 13 Aug 2020 12:13:51 -0700 Subject: [PATCH 43/53] Rename new files to costallocation. Include all existing resources in version --- .../2020-03-01-preview/costallocation.json | 689 ++++ .../2020-03-01-preview/costmanagement.json | 3428 +++++++++++++++-- .../examples/BillingAccountAlerts.json | 98 + .../BillingAccountDimensionsList.json | 45 + ...lingAccountDimensionsListExpandAndTop.json | 59 + ...illingAccountDimensionsListWithFilter.json | 40 + .../examples/BillingAccountForecast.json | 117 + .../examples/BillingAccountQuery.json | 107 + .../examples/BillingAccountQueryGrouping.json | 69 + .../examples/BillingProfileAlerts.json | 99 + .../examples/BillingProfileForecast.json | 118 + .../examples/DepartmentAlerts.json | 99 + .../examples/DepartmentDimensionsList.json | 46 + .../DepartmentDimensionsListExpandAndTop.json | 60 + .../DepartmentDimensionsListWithFilter.json | 41 + .../examples/DepartmentForecast.json | 118 + .../examples/DepartmentQuery.json | 108 + .../examples/DepartmentQueryGrouping.json | 70 + .../examples/DismissResourceGroupAlerts.json | 59 + .../examples/DismissSubscriptionAlerts.json | 58 + .../examples/EnrollmentAccountAlerts.json | 99 + .../EnrollmentAccountDimensionsList.json | 46 + ...mentAccountDimensionsListExpandAndTop.json | 60 + ...llmentAccountDimensionsListWithFilter.json | 41 + .../examples/EnrollmentAccountForecast.json | 118 + .../examples/EnrollmentAccountQuery.json | 108 + .../EnrollmentAccountQueryGrouping.json | 77 + .../ExportCreateOrUpdateByBillingAccount.json | 128 + .../ExportCreateOrUpdateByDepartment.json | 129 + ...portCreateOrUpdateByEnrollmentAccount.json | 129 + ...ExportCreateOrUpdateByManagementGroup.json | 128 + .../ExportCreateOrUpdateByResourceGroup.json | 129 + .../ExportCreateOrUpdateBySubscription.json | 128 + .../ExportDeleteByBillingAccount.json | 11 + .../examples/ExportDeleteByDepartment.json | 12 + .../ExportDeleteByEnrollmentAccount.json | 12 + .../ExportDeleteByManagementGroup.json | 11 + .../examples/ExportDeleteByResourceGroup.json | 12 + .../examples/ExportDeleteBySubscription.json | 11 + .../examples/ExportGetByBillingAccount.json | 47 + .../examples/ExportGetByDepartment.json | 48 + .../ExportGetByEnrollmentAccount.json | 48 + .../examples/ExportGetByManagementGroup.json | 47 + .../examples/ExportGetByResourceGroup.json | 48 + .../examples/ExportGetBySubscription.json | 47 + .../examples/ExportRunByBillingAccount.json | 11 + .../examples/ExportRunByDepartment.json | 12 + .../ExportRunByEnrollmentAccount.json | 12 + .../examples/ExportRunByManagementGroup.json | 11 + .../examples/ExportRunByResourceGroup.json | 12 + .../examples/ExportRunBySubscription.json | 11 + .../ExportRunHistoryGetByBillingAccount.json | 100 + .../ExportRunHistoryGetByDepartment.json | 101 + ...xportRunHistoryGetByEnrollmentAccount.json | 101 + .../ExportRunHistoryGetByManagementGroup.json | 100 + .../ExportRunHistoryGetByResourceGroup.json | 101 + .../ExportRunHistoryGetBySubscription.json | 100 + .../examples/ExportsGetByBillingAccount.json | 89 + .../examples/ExportsGetByDepartment.json | 90 + .../ExportsGetByEnrollmentAccount.json | 90 + .../examples/ExportsGetByManagementGroup.json | 89 + .../examples/ExportsGetByResourceGroup.json | 90 + .../examples/ExportsGetBySubscription.json | 89 + .../ExternalBillingAccountAlerts.json | 98 + .../ExternalBillingAccountForecast.json | 99 + .../ExternalBillingAccountsDimensions.json | 45 + .../ExternalBillingAccountsQuery.json | 99 + .../examples/ExternalSubscriptionAlerts.json | 98 + .../ExternalSubscriptionForecast.json | 82 + .../ExternalSubscriptionsDimensions.json | 45 + .../examples/ExternalSubscriptionsQuery.json | 78 + .../examples/InvoiceSectionAlerts.json | 100 + .../examples/InvoiceSectionForecast.json | 119 + .../MCABillingAccountDimensionsList.json | 45 + ...lingAccountDimensionsListExpandAndTop.json | 59 + ...illingAccountDimensionsListWithFilter.json | 40 + .../examples/MCABillingAccountQuery.json | 107 + .../MCABillingAccountQueryGrouping.json | 69 + .../MCABillingProfileDimensionsList.json | 46 + ...lingProfileDimensionsListExpandAndTop.json | 60 + ...illingProfileDimensionsListWithFilter.json | 41 + .../examples/MCABillingProfileQuery.json | 108 + .../MCABillingProfileQueryGrouping.json | 70 + .../examples/MCACustomerDimensionsList.json | 46 + ...MCACustomerDimensionsListExpandAndTop.json | 60 + .../MCACustomerDimensionsListWithFilter.json | 41 + .../examples/MCACustomerQuery.json | 108 + .../examples/MCACustomerQueryGrouping.json | 70 + .../MCAInvoiceSectionDimensionsList.json | 47 + ...oiceSectionDimensionsListExpandAndTop.json | 61 + ...nvoiceSectionDimensionsListWithFilter.json | 42 + .../examples/MCAInvoiceSectionQuery.json | 109 + .../MCAInvoiceSectionQueryGrouping.json | 71 + .../ManagementGroupDimensionsList.json | 45 + ...gementGroupDimensionsListExpandAndTop.json | 59 + ...nagementGroupDimensionsListWithFilter.json | 40 + .../examples/ManagementGroupQuery.json | 107 + .../ManagementGroupQueryGrouping.json | 76 + .../examples/PrivateView.json | 69 + .../examples/PrivateViewCreateOrUpdate.json | 185 + .../examples/PrivateViewDelete.json | 10 + .../examples/PrivateViewList.json | 131 + .../examples/ResourceGroupAlerts.json | 99 + .../examples/ResourceGroupDimensionsList.json | 56 + .../examples/ResourceGroupForecast.json | 97 + .../examples/ResourceGroupQuery.json | 96 + .../examples/ResourceGroupQueryGrouping.json | 71 + .../examples/SingleResourceGroupAlert.json | 54 + .../examples/SingleSubscriptionAlert.json | 53 + .../examples/SubscriptionAlerts.json | 98 + .../examples/SubscriptionDimensionsList.json | 58 + .../examples/SubscriptionForecast.json | 117 + .../examples/SubscriptionQuery.json | 107 + .../examples/SubscriptionQueryGrouping.json | 74 + .../examples/ViewByResourceGroup.json | 70 + .../ViewCreateOrUpdateByResourceGroup.json | 186 + .../examples/ViewDeleteByResourceGroup.json | 11 + .../examples/ViewListByResourceGroup.json | 132 + 118 files changed, 12258 insertions(+), 417 deletions(-) create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costallocation.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountAlerts.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountDimensionsList.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountDimensionsListExpandAndTop.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountDimensionsListWithFilter.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountForecast.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountQuery.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountQueryGrouping.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingProfileAlerts.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingProfileForecast.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentAlerts.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentDimensionsList.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentDimensionsListExpandAndTop.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentDimensionsListWithFilter.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentForecast.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentQuery.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentQueryGrouping.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DismissResourceGroupAlerts.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DismissSubscriptionAlerts.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountAlerts.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountDimensionsList.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountDimensionsListExpandAndTop.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountDimensionsListWithFilter.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountForecast.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountQuery.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountQueryGrouping.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportCreateOrUpdateByBillingAccount.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportCreateOrUpdateByDepartment.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportCreateOrUpdateByEnrollmentAccount.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportCreateOrUpdateByManagementGroup.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportCreateOrUpdateByResourceGroup.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportCreateOrUpdateBySubscription.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportDeleteByBillingAccount.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportDeleteByDepartment.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportDeleteByEnrollmentAccount.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportDeleteByManagementGroup.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportDeleteByResourceGroup.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportDeleteBySubscription.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportGetByBillingAccount.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportGetByDepartment.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportGetByEnrollmentAccount.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportGetByManagementGroup.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportGetByResourceGroup.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportGetBySubscription.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunByBillingAccount.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunByDepartment.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunByEnrollmentAccount.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunByManagementGroup.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunByResourceGroup.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunBySubscription.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunHistoryGetByBillingAccount.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunHistoryGetByDepartment.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunHistoryGetByEnrollmentAccount.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunHistoryGetByManagementGroup.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunHistoryGetByResourceGroup.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunHistoryGetBySubscription.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportsGetByBillingAccount.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportsGetByDepartment.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportsGetByEnrollmentAccount.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportsGetByManagementGroup.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportsGetByResourceGroup.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportsGetBySubscription.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalBillingAccountAlerts.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalBillingAccountForecast.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalBillingAccountsDimensions.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalBillingAccountsQuery.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalSubscriptionAlerts.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalSubscriptionForecast.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalSubscriptionsDimensions.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalSubscriptionsQuery.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/InvoiceSectionAlerts.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/InvoiceSectionForecast.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingAccountDimensionsList.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingAccountDimensionsListExpandAndTop.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingAccountDimensionsListWithFilter.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingAccountQuery.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingAccountQueryGrouping.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingProfileDimensionsList.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingProfileDimensionsListExpandAndTop.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingProfileDimensionsListWithFilter.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingProfileQuery.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingProfileQueryGrouping.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCACustomerDimensionsList.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCACustomerDimensionsListExpandAndTop.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCACustomerDimensionsListWithFilter.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCACustomerQuery.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCACustomerQueryGrouping.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCAInvoiceSectionDimensionsList.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCAInvoiceSectionDimensionsListExpandAndTop.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCAInvoiceSectionDimensionsListWithFilter.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCAInvoiceSectionQuery.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCAInvoiceSectionQueryGrouping.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ManagementGroupDimensionsList.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ManagementGroupDimensionsListExpandAndTop.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ManagementGroupDimensionsListWithFilter.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ManagementGroupQuery.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ManagementGroupQueryGrouping.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateView.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewCreateOrUpdate.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewDelete.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewList.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ResourceGroupAlerts.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ResourceGroupDimensionsList.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ResourceGroupForecast.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ResourceGroupQuery.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ResourceGroupQueryGrouping.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SingleResourceGroupAlert.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SingleSubscriptionAlert.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SubscriptionAlerts.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SubscriptionDimensionsList.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SubscriptionForecast.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SubscriptionQuery.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SubscriptionQueryGrouping.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewByResourceGroup.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewCreateOrUpdateByResourceGroup.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewDeleteByResourceGroup.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewListByResourceGroup.json diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costallocation.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costallocation.json new file mode 100644 index 000000000000..ce5d6a504be2 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costallocation.json @@ -0,0 +1,689 @@ +{ + "swagger": "2.0", + "info": { + "title": "CostManagementClient", + "version": "2020-03-01-preview" + }, + "tags": [ + { + "name": "CostAllocationRules", + "description": "An API for creating and managing cost allocation rules within a billing account or enterprise enrollment. These rules can be used to reallocate cost between resources, filtered by Resource Group, Subscription, or Tag." + } + ], + "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.CostManagement/costAllocationRules": { + "get": { + "tags": [ + "CostAllocationRules" + ], + "operationId": "CostAllocationRules_List", + "description": "Get the list of all cost allocation rules for a billing account or enterprise enrollment.", + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "CostAllocationRulesList": { + "$ref": "./examples/CostAllocationRulesList.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountIdParameter" + } + ], + "responses": { + "200": { + "description": "List of cost allocation rules for the billing account or enterprise enrollment.", + "schema": { + "$ref": "#/definitions/CostAllocationRuleList" + } + }, + "default": { + "description": "Error response describing why the operation failed", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules/checkNameAvailability": { + "post": { + "tags": [ + "CostAllocationRules" + ], + "operationId": "CostAllocationRules_CheckNameAvailability", + "description": "Checks availability and correctness of a name for a cost allocation rule", + "x-ms-examples": { + "CostAllocationRuleCheckNameAvailability": { + "$ref": "./examples/CostAllocationRuleCheckNameAvailability.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountIdParameter" + }, + { + "name": "costAllocationRuleCheckNameAvailabilityRequest", + "description": "Cost allocation rule to be created or updated", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CostAllocationRuleCheckNameAvailabilityRequest" + } + } + ], + "responses": { + "200": { + "description": "Response of cost allocation rule name availability.", + "schema": { + "$ref": "#/definitions/CostAllocationRuleCheckNameAvailabilityResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules/{ruleName}": { + "get": { + "tags": [ + "CostAllocationRules" + ], + "operationId": "CostAllocationRules_Get", + "description": "Get a cost allocation rule by rule name and billing account or enterprise enrollment.", + "x-ms-examples": { + "CostAllocationRules": { + "$ref": "./examples/CostAllocationRuleGet.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountIdParameter" + }, + { + "$ref": "#/parameters/ruleNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/CostAllocationRuleDefinitionResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "tags": [ + "CostAllocationRules" + ], + "operationId": "CostAllocationRules_CreateOrUpdate", + "description": "Create/Update a rule to allocate cost between different resources within a billing account or enterprise enrollment.", + "x-ms-examples": { + "CostAllocationRulesCreateResourceGroup": { + "$ref": "./examples/CostAllocationRuleCreate.json" + }, + "CostAllocationRulesCreateTag": { + "$ref": "./examples/CostAllocationRuleCreateTag.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountIdParameter" + }, + { + "$ref": "#/parameters/ruleNameParameter" + }, + { + "name": "costAllocationRule", + "description": "Cost allocation rule to be created or updated", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CostAllocationRuleDefinitionRequest" + } + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/CostAllocationRuleDefinitionResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "tags": [ + "CostAllocationRules" + ], + "operationId": "CostAllocationRules_Delete", + "description": "Delete cost allocation rule for billing account or enterprise enrollment.", + "x-ms-examples": { + "CostAllocationRules": { + "$ref": "./examples/CostAllocationRuleDelete.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountIdParameter" + }, + { + "$ref": "#/parameters/ruleNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded." + }, + "204": { + "description": "NoContent. Rule did not exist." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + } + }, + "definitions": { + "ErrorDetails": { + "description": "The details of the error.", + "properties": { + "code": { + "description": "A machine readable error code.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "A human readable error message.", + "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" + } + } + }, + "CostAllocationRuleList": { + "type": "object", + "description": "Result of listing cost allocation rules. It contains a list of available rules in the billing account or enterprise enrollment provided.", + "properties": { + "value": { + "description": "The list of cost allocation rules.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/CostAllocationRuleDefinitionResponse" + } + }, + "nextLink": { + "description": "URL to get the next set of rule list results if there are any.", + "type": "string", + "readOnly": true + } + } + }, + "CostAllocationRuleCheckNameAvailabilityRequest": { + "type": "object", + "description": "The cost allocation rule check name availability request", + "properties": { + "name": { + "type": "string", + "description": "Rule name" + }, + "type": { + "type": "string", + "description": "Resource type. This is expected to be Microsoft.CostManagement/costAllocationRules" + } + } + }, + "CostAllocationRuleCheckNameAvailabilityResponse": { + "type": "object", + "description": "The cost allocation rule check name availability response", + "properties": { + "nameAvailable": { + "type": "boolean", + "description": "Whether this rule name is available" + }, + "reason": { + "$ref": "#/definitions/Reason", + "description": "The reason this name is not available" + }, + "message": { + "type": "string", + "description": "Error message if the name is not available" + } + } + }, + "Reason": { + "type": "string", + "description": "The reason this name is not available.", + "enum": [ + "Invalid", + "AlreadyExists", + "Valid" + ], + "x-ms-enum": { + "name": "Reason", + "modelAsString": true + } + }, + "CostAllocationRuleDefinition": { + "type": "object", + "description": "The cost allocation rule model definition", + "properties": { + "id": { + "type": "string", + "readOnly": true, + "description": "Azure Resource Manager Id for the rule. This is a read ony value." + }, + "name": { + "type": "string", + "readOnly": true, + "description": "Name of the rule. This is a read only value." + }, + "type": { + "type": "string", + "readOnly": true, + "description": "Resource type of the rule. This is a read only value of Microsoft.CostManagement/CostAllocationRule." + } + }, + "x-ms-azure-resource": true + }, + "CostAllocationRuleDefinitionResponse": { + "allOf": [ + { + "$ref": "#/definitions/CostAllocationRuleDefinition" + }, + { + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/CostAllocationRulePropertiesResponse", + "description": "Cost allocation rule properties" + } + } + } + ], + "description": "The cost allocation rule model definition" + }, + "CostAllocationRuleDefinitionRequest": { + "allOf": [ + { + "$ref": "#/definitions/CostAllocationRuleDefinition" + }, + { + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/CostAllocationRulePropertiesRequest", + "description": "Cost allocation rule properties" + } + } + } + ], + "description": "The cost allocation rule model definition" + }, + "CostAllocationRuleProperties": { + "type": "object", + "description": "The properties of a cost allocation rule", + "additionalProperties": false, + "required": [ + "details" + ], + "properties": { + "description": { + "description": "Description of a cost allocation rule.", + "type": "string" + }, + "details": { + "description": "Resource information for the cost allocation rule", + "$ref": "#/definitions/CostAllocationRuleDetails" + } + } + }, + "CostAllocationRulePropertiesResponse": { + "description": "The properties of a cost allocation rule response", + "allOf": [ + { + "$ref": "#/definitions/CostAllocationRuleProperties" + }, + { + "type": "object", + "properties": { + "status": { + "$ref": "#/definitions/RuleStatus", + "description": "Status of the rule" + }, + "createdDate": { + "type": "string", + "format": "date-time", + "description": "Time at which the rule was created. Rules that change cost for the same resource are applied in order of creation." + }, + "updatedDate": { + "type": "string", + "format": "date-time", + "description": "Time at which the rule was last updated." + } + }, + "required": [ + "status" + ] + } + ] + }, + "CostAllocationRulePropertiesRequest": { + "description": "The properties of a cost allocation rule request", + "allOf": [ + { + "$ref": "#/definitions/CostAllocationRuleProperties" + }, + { + "type": "object", + "properties": { + "status": { + "$ref": "#/definitions/InputRuleStatus", + "description": "Status of the rule" + } + }, + "required": [ + "status" + ] + } + ] + }, + "RuleStatus": { + "type": "string", + "description": "Current status of the rule.", + "enum": [ + "NotActive", + "Active", + "Processing" + ], + "x-ms-enum": { + "name": "RuleStatus", + "modelAsString": true, + "values": [ + { + "value": "NotActive", + "description": "Rule is saved but not used to allocate costs.", + "name": "NotActive" + }, + { + "value": "Active", + "description": "Rule is saved and impacting cost allocation.", + "name": "Active" + }, + { + "value": "Processing", + "description": "Rule is saved and cost allocation is being updated.", + "name": "Processing" + } + ] + } + }, + "InputRuleStatus": { + "type": "string", + "description": "Desired status of the rule.", + "enum": [ + "NotActive", + "Active" + ], + "x-ms-enum": { + "name": "InputRuleStatus", + "modelAsString": true, + "values": [ + { + "value": "NotActive", + "description": "Rule will be saved but not used to allocate costs.", + "name": "NotActive" + }, + { + "value": "Active", + "description": "Rule will be saved and impacting cost allocation.", + "name": "Active" + } + ] + } + }, + "CostAllocationRuleDetails": { + "type": "object", + "description": "Resource details of the cost allocation rule", + "properties": { + "sourceResources": { + "description": "Source resources for cost allocation. At this time, this list can contain no more than one element.", + "type": "array", + "items": { + "$ref": "#/definitions/SourceCostAllocationResource" + } + }, + "targetResources": { + "type": "array", + "description": "Target resources for cost allocation. At this time, this list can contain no more than one element.", + "items": { + "$ref": "#/definitions/TargetCostAllocationResource" + } + } + } + }, + "CostAllocationResource": { + "type": "object", + "description": "Common values for resources for cost allocation", + "required": [ + "resourceType", + "name" + ], + "properties": { + "resourceType": { + "description": "Type of resources contained in this cost allocation rule", + "$ref": "#/definitions/CostAllocationResourceType" + }, + "name": { + "description": "If resource type is dimension, this must be either ResourceGroupName or SubscriptionId. If resource type is tag, this must be a valid Azure tag", + "type": "string" + } + } + }, + "SourceCostAllocationResource": { + "allOf": [ + { + "$ref": "#/definitions/CostAllocationResource" + }, + { + "type": "object", + "properties": { + "values": { + "description": "Source Resources for cost allocation. This list cannot contain more than 25 values.", + "type": "array", + "items": { + "description": "Source resource for cost allocation", + "type": "string" + } + } + }, + "required": [ + "values" + ] + } + ], + "description": "Source resources for cost allocation" + }, + "TargetCostAllocationResource": { + "description": "Target resources for cost allocation.", + "allOf": [ + { + "$ref": "#/definitions/CostAllocationResource" + }, + { + "type": "object", + "properties": { + "values": { + "description": "Target resources for cost allocation. This list cannot contain more than 25 values.", + "type": "array", + "items": { + "$ref": "#/definitions/CostAllocationProportion" + } + }, + "policyType": { + "description": "Method of cost allocation for the rule", + "$ref": "#/definitions/CostAllocationPolicyType" + } + }, + "required": [ + "values", + "policyType" + ] + } + ] + }, + "CostAllocationResourceType": { + "type": "string", + "description": "Category of resource to use for allocation.", + "enum": [ + "Dimension", + "Tag" + ], + "x-ms-enum": { + "name": "CostAllocationResourceType", + "modelAsString": true, + "values": [ + { + "value": "Dimension", + "description": "Indicates an Azure dimension such as a subscription id or resource group name is being used for allocation.", + "name": "Dimension" + }, + { + "value": "Tag", + "description": "Allocates cost based on Azure Tag key value pairs.", + "name": "Tag" + } + ] + } + }, + "CostAllocationProportion": { + "type": "object", + "description": "Target resources and allocation", + "required": [ + "percentage", + "name" + ], + "properties": { + "name": { + "description": "Target resource for cost allocation", + "type": "string" + }, + "percentage": { + "description": "Percentage of source cost to allocate to this resource. This value can be specified to two decimal places and the total percentage of all resources in this rule must sum to 100.00.", + "type": "number" + } + } + }, + "CostAllocationPolicyType": { + "type": "string", + "description": "Method to use for allocating cost. FixedProportion indicates that cost will be split based on specified percentage values.", + "enum": [ + "FixedProportion" + ], + "x-ms-enum": { + "name": "CostAllocationPolicyType", + "modelAsString": 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 2020-03-01-preview" + }, + "billingAccountIdParameter": { + "name": "billingAccountId", + "in": "path", + "description": "Billing Account ID or Enrollment Number", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ruleNameParameter": { + "name": "ruleName", + "in": "path", + "description": "Cost allocation rule name. The name cannot include spaces or any non alphanumeric characters other than '_' and '-'. The max length is 260 characters.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json index ce5d6a504be2..456686294225 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json @@ -1,15 +1,9 @@ { "swagger": "2.0", "info": { - "title": "CostManagementClient", - "version": "2020-03-01-preview" + "version": "2020-06-01", + "title": "CostManagementClient" }, - "tags": [ - { - "name": "CostAllocationRules", - "description": "An API for creating and managing cost allocation rules within a billing account or enterprise enrollment. These rules can be used to reallocate cost between resources, filtered by Resource Group, Subscription, or Tag." - } - ], "host": "management.azure.com", "schemes": [ "https" @@ -34,60 +28,142 @@ "flow": "implicit", "description": "Azure Active Directory OAuth2 Flow.", "scopes": { - "user_impersonation": "Impersonate your user account" + "user_impersonation": "impersonate your user account" } } }, "paths": { - "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules": { + "/providers/Microsoft.CostManagement/views": { "get": { "tags": [ - "CostAllocationRules" + "Views" + ], + "operationId": "Views_List", + "description": "Lists all views by tenant and object.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "PrivateViewList": { + "$ref": "./examples/PrivateViewList.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + } ], - "operationId": "CostAllocationRules_List", - "description": "Get the list of all cost allocation rules for a billing account or enterprise enrollment.", + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ViewListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, "x-ms-pageable": { "nextLinkName": "nextLink" + } + } + }, + "/{scope}/providers/Microsoft.CostManagement/views": { + "get": { + "tags": [ + "Views" + ], + "operationId": "Views_ListByScope", + "description": "Lists all views at the given scope.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" }, "x-ms-examples": { - "CostAllocationRulesList": { - "$ref": "./examples/CostAllocationRulesList.json" + "ResourceGroupViewList": { + "$ref": "./examples/ViewListByResourceGroup.json" } }, "parameters": [ { - "$ref": "#/parameters/apiVersionParameter" + "$ref": "#/parameters/scopeViewParameter" }, { - "$ref": "#/parameters/billingAccountIdParameter" + "$ref": "#/parameters/apiVersionParameter" } ], "responses": { "200": { - "description": "List of cost allocation rules for the billing account or enterprise enrollment.", + "description": "OK. The request has succeeded.", "schema": { - "$ref": "#/definitions/CostAllocationRuleList" + "$ref": "#/definitions/ViewListResult" } }, "default": { - "description": "Error response describing why the operation failed", + "description": "Error response describing why the operation failed.", "schema": { "$ref": "#/definitions/ErrorResponse" } } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" } } }, - "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules/checkNameAvailability": { - "post": { + "/providers/Microsoft.CostManagement/views/{viewName}": { + "get": { + "tags": [ + "Views" + ], + "operationId": "Views_Get", + "description": "Gets the view by view name.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "PrivateView": { + "$ref": "./examples/PrivateView.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/viewNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/View" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "put": { "tags": [ - "CostAllocationRules" + "Views" ], - "operationId": "CostAllocationRules_CheckNameAvailability", - "description": "Checks availability and correctness of a name for a cost allocation rule", + "operationId": "Views_CreateOrUpdate", + "description": "The operation to create or update a view. Update operation requires latest eTag to be set in the request. 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/costmanagement/" + }, "x-ms-examples": { - "CostAllocationRuleCheckNameAvailability": { - "$ref": "./examples/CostAllocationRuleCheckNameAvailability.json" + "CreateOrUpdatePrivateView": { + "$ref": "./examples/PrivateViewCreateOrUpdate.json" } }, "parameters": [ @@ -95,27 +171,70 @@ "$ref": "#/parameters/apiVersionParameter" }, { - "$ref": "#/parameters/billingAccountIdParameter" + "$ref": "#/parameters/viewNameParameter" }, { - "name": "costAllocationRuleCheckNameAvailabilityRequest", - "description": "Cost allocation rule to be created or updated", + "name": "parameters", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/CostAllocationRuleCheckNameAvailabilityRequest" - } + "$ref": "#/definitions/View" + }, + "description": "Parameters supplied to the CreateOrUpdate View operation." } ], "responses": { "200": { - "description": "Response of cost allocation rule name availability.", + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/View" + } + }, + "201": { + "description": "Created.", + "schema": { + "$ref": "#/definitions/View" + } + }, + "default": { + "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/CostAllocationRuleCheckNameAvailabilityResponse" + "$ref": "#/definitions/ErrorResponse" } + } + } + }, + "delete": { + "tags": [ + "Views" + ], + "operationId": "Views_Delete", + "description": "The operation to delete a view.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "DeletePrivateView": { + "$ref": "./examples/PrivateViewDelete.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/viewNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded." + }, + "204": { + "description": "NoContent. Resource is not available." }, "default": { - "description": "Error response describing why the operation failed", + "description": "Error response describing why the operation failed.", "schema": { "$ref": "#/definitions/ErrorResponse" } @@ -123,34 +242,37 @@ } } }, - "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules/{ruleName}": { + "/{scope}/providers/Microsoft.CostManagement/views/{viewName}": { "get": { "tags": [ - "CostAllocationRules" + "Views" ], - "operationId": "CostAllocationRules_Get", - "description": "Get a cost allocation rule by rule name and billing account or enterprise enrollment.", + "operationId": "Views_GetByScope", + "description": "Gets the view for the defined scope by view name.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, "x-ms-examples": { - "CostAllocationRules": { - "$ref": "./examples/CostAllocationRuleGet.json" + "ResourceGroupView": { + "$ref": "./examples/ViewByResourceGroup.json" } }, "parameters": [ { - "$ref": "#/parameters/apiVersionParameter" + "$ref": "#/parameters/scopeViewParameter" }, { - "$ref": "#/parameters/billingAccountIdParameter" + "$ref": "#/parameters/apiVersionParameter" }, { - "$ref": "#/parameters/ruleNameParameter" + "$ref": "#/parameters/viewNameParameter" } ], "responses": { "200": { "description": "OK. The request has succeeded.", "schema": { - "$ref": "#/definitions/CostAllocationRuleDefinitionResponse" + "$ref": "#/definitions/View" } }, "default": { @@ -163,43 +285,49 @@ }, "put": { "tags": [ - "CostAllocationRules" + "Views" ], - "operationId": "CostAllocationRules_CreateOrUpdate", - "description": "Create/Update a rule to allocate cost between different resources within a billing account or enterprise enrollment.", + "operationId": "Views_CreateOrUpdateByScope", + "description": "The operation to create or update a view. Update operation requires latest eTag to be set in the request. 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/costmanagement/" + }, "x-ms-examples": { - "CostAllocationRulesCreateResourceGroup": { - "$ref": "./examples/CostAllocationRuleCreate.json" - }, - "CostAllocationRulesCreateTag": { - "$ref": "./examples/CostAllocationRuleCreateTag.json" + "ResourceGroupCreateOrUpdateView": { + "$ref": "./examples/ViewCreateOrUpdateByResourceGroup.json" } }, "parameters": [ { - "$ref": "#/parameters/apiVersionParameter" + "$ref": "#/parameters/scopeViewParameter" }, { - "$ref": "#/parameters/billingAccountIdParameter" + "$ref": "#/parameters/apiVersionParameter" }, { - "$ref": "#/parameters/ruleNameParameter" + "$ref": "#/parameters/viewNameParameter" }, { - "name": "costAllocationRule", - "description": "Cost allocation rule to be created or updated", + "name": "parameters", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/CostAllocationRuleDefinitionRequest" - } + "$ref": "#/definitions/View" + }, + "description": "Parameters supplied to the CreateOrUpdate View operation." } ], "responses": { "200": { "description": "OK. The request has succeeded.", "schema": { - "$ref": "#/definitions/CostAllocationRuleDefinitionResponse" + "$ref": "#/definitions/View" + } + }, + "201": { + "description": "Created.", + "schema": { + "$ref": "#/definitions/View" } }, "default": { @@ -212,24 +340,27 @@ }, "delete": { "tags": [ - "CostAllocationRules" + "Views" ], - "operationId": "CostAllocationRules_Delete", - "description": "Delete cost allocation rule for billing account or enterprise enrollment.", + "operationId": "Views_DeleteByScope", + "description": "The operation to delete a view.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, "x-ms-examples": { - "CostAllocationRules": { - "$ref": "./examples/CostAllocationRuleDelete.json" + "ResourceGroupDeleteView": { + "$ref": "./examples/ViewDeleteByResourceGroup.json" } }, "parameters": [ { - "$ref": "#/parameters/apiVersionParameter" + "$ref": "#/parameters/scopeViewParameter" }, { - "$ref": "#/parameters/billingAccountIdParameter" + "$ref": "#/parameters/apiVersionParameter" }, { - "$ref": "#/parameters/ruleNameParameter" + "$ref": "#/parameters/viewNameParameter" } ], "responses": { @@ -237,7 +368,7 @@ "description": "OK. The request has succeeded." }, "204": { - "description": "NoContent. Rule did not exist." + "description": "NoContent. Resource is not available." }, "default": { "description": "Error response describing why the operation failed.", @@ -247,443 +378,2906 @@ } } } - } - }, - "definitions": { - "ErrorDetails": { - "description": "The details of the error.", - "properties": { - "code": { - "description": "A machine readable error code.", - "type": "string", - "readOnly": true - }, - "message": { - "description": "A human readable error message.", - "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" - } - } }, - "CostAllocationRuleList": { - "type": "object", - "description": "Result of listing cost allocation rules. It contains a list of available rules in the billing account or enterprise enrollment provided.", - "properties": { - "value": { - "description": "The list of cost allocation rules.", - "type": "array", - "readOnly": true, - "items": { - "$ref": "#/definitions/CostAllocationRuleDefinitionResponse" + "/{scope}/providers/Microsoft.CostManagement/alerts": { + "get": { + "tags": [ + "Alerts" + ], + "operationId": "Alerts_List", + "description": "Lists the alerts for scope defined.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "BillingAccountAlerts": { + "$ref": "./examples/BillingAccountAlerts.json" + }, + "BillingProfileAlerts": { + "$ref": "./examples/BillingProfileAlerts.json" + }, + "InvoiceSectionAlerts": { + "$ref": "./examples/InvoiceSectionAlerts.json" + }, + "EnrollmentAccountAlerts": { + "$ref": "./examples/EnrollmentAccountAlerts.json" + }, + "DepartmentAlerts": { + "$ref": "./examples/DepartmentAlerts.json" + }, + "SubscriptionAlerts": { + "$ref": "./examples/SubscriptionAlerts.json" + }, + "ResourceGroupAlerts": { + "$ref": "./examples/ResourceGroupAlerts.json" } }, - "nextLink": { - "description": "URL to get the next set of rule list results if there are any.", - "type": "string", - "readOnly": true + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/scopeAlertParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/AlertsResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } } } }, - "CostAllocationRuleCheckNameAvailabilityRequest": { - "type": "object", - "description": "The cost allocation rule check name availability request", - "properties": { - "name": { - "type": "string", - "description": "Rule name" + "/{scope}/providers/Microsoft.CostManagement/alerts/{alertId}": { + "get": { + "tags": [ + "Alerts" + ], + "operationId": "Alerts_Get", + "description": "Gets the alert for the scope by alert ID.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" }, - "type": { - "type": "string", - "description": "Resource type. This is expected to be Microsoft.CostManagement/costAllocationRules" + "x-ms-examples": { + "SubscriptionAlerts": { + "$ref": "./examples/SingleSubscriptionAlert.json" + }, + "ResourceGroupAlerts": { + "$ref": "./examples/SingleResourceGroupAlert.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/scopeAlertParameter" + }, + { + "$ref": "#/parameters/alertIdParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/Alert" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } } - } - }, - "CostAllocationRuleCheckNameAvailabilityResponse": { - "type": "object", - "description": "The cost allocation rule check name availability response", - "properties": { - "nameAvailable": { - "type": "boolean", - "description": "Whether this rule name is available" + }, + "patch": { + "tags": [ + "Alerts" + ], + "operationId": "Alerts_Dismiss", + "description": "Dismisses the specified alert", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" }, - "reason": { - "$ref": "#/definitions/Reason", - "description": "The reason this name is not available" + "x-ms-examples": { + "SubscriptionAlerts": { + "$ref": "./examples/DismissSubscriptionAlerts.json" + }, + "ResourceGroupAlerts": { + "$ref": "./examples/DismissResourceGroupAlerts.json" + } }, - "message": { - "type": "string", - "description": "Error message if the name is not available" + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/scopeAlertParameter" + }, + { + "$ref": "#/parameters/alertIdParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/DismissAlertPayload" + }, + "description": "Parameters supplied to the Dismiss Alert operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/Alert" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } } } }, - "Reason": { + "/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/alerts": { + "get": { + "tags": [ + "Alerts" + ], + "operationId": "Alerts_ListExternal", + "description": "Lists the Alerts for external cloud provider type defined.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ExternalBillingAccountAlerts": { + "$ref": "./examples/ExternalBillingAccountAlerts.json" + }, + "ExternalSubscriptionAlerts": { + "$ref": "./examples/ExternalSubscriptionAlerts.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/externalCloudProviderTypeParameter" + }, + { + "$ref": "#/parameters/externalCloudProviderIdParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/AlertsResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/{scope}/providers/Microsoft.CostManagement/forecast": { + "post": { + "tags": [ + "Forecast" + ], + "operationId": "Forecast_Usage", + "description": "Lists the forecast charges for scope defined.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "BillingAccountForecast": { + "$ref": "./examples/BillingAccountForecast.json" + }, + "BillingProfileForecast": { + "$ref": "./examples/BillingProfileForecast.json" + }, + "InvoiceSectionForecast": { + "$ref": "./examples/InvoiceSectionForecast.json" + }, + "EnrollmentAccountForecast": { + "$ref": "./examples/EnrollmentAccountForecast.json" + }, + "DepartmentForecast": { + "$ref": "./examples/DepartmentForecast.json" + }, + "SubscriptionForecast": { + "$ref": "./examples/SubscriptionForecast.json" + }, + "ResourceGroupForecast": { + "$ref": "./examples/ResourceGroupForecast.json" + } + }, + "parameters": [ + { + "name": "$filter", + "description": "May be used to filter forecasts by properties/usageDate (Utc time), properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'.", + "in": "query", + "required": false, + "type": "string" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/scopeForecastParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ForecastDefinition" + }, + "description": "Parameters supplied to the CreateOrUpdate Forecast Config operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/QueryResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/forecast": { + "post": { + "tags": [ + "Forecast" + ], + "operationId": "Forecast_ExternalCloudProviderUsage", + "description": "Lists the forecast charges for external cloud provider type defined.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ExternalBillingAccountForecast": { + "$ref": "./examples/ExternalBillingAccountForecast.json" + }, + "ExternalSubscriptionForecast": { + "$ref": "./examples/ExternalSubscriptionForecast.json" + } + }, + "parameters": [ + { + "name": "$filter", + "description": "May be used to filter forecasts by properties/usageDate (Utc time), properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'.", + "in": "query", + "required": false, + "type": "string" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/externalCloudProviderTypeParameter" + }, + { + "$ref": "#/parameters/externalCloudProviderIdParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ForecastDefinition" + }, + "description": "Parameters supplied to the CreateOrUpdate Forecast Config operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/QueryResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/{scope}/providers/Microsoft.CostManagement/dimensions": { + "get": { + "tags": [ + "Dimensions" + ], + "x-ms-odata": "#/definitions/Dimension", + "operationId": "Dimensions_List", + "description": "Lists the dimensions by the defined scope.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "SubscriptionDimensionsList-Legacy": { + "$ref": "./examples/SubscriptionDimensionsList.json" + }, + "ResourceGroupDimensionsList-Legacy": { + "$ref": "./examples/ResourceGroupDimensionsList.json" + }, + "ManagementGroupDimensionsList-Legacy": { + "$ref": "./examples/ManagementGroupDimensionsList.json" + }, + "ManagementGroupDimensionsListExpandAndTop-Legacy": { + "$ref": "./examples/ManagementGroupDimensionsListExpandAndTop.json" + }, + "ManagementGroupDimensionsListWithFilter-Legacy": { + "$ref": "./examples/ManagementGroupDimensionsListWithFilter.json" + }, + "DepartmentDimensionsList-Legacy": { + "$ref": "./examples/DepartmentDimensionsList.json" + }, + "DepartmentDimensionsListExpandAndTop-Legacy": { + "$ref": "./examples/DepartmentDimensionsListExpandAndTop.json" + }, + "DepartmentDimensionsListWithFilter-Legacy": { + "$ref": "./examples/DepartmentDimensionsListWithFilter.json" + }, + "EnrollmentAccountDimensionsList-Legacy": { + "$ref": "./examples/EnrollmentAccountDimensionsList.json" + }, + "EnrollmentAccountDimensionsListExpandAndTop-Legacy": { + "$ref": "./examples/EnrollmentAccountDimensionsListExpandAndTop.json" + }, + "EnrollmentAccountDimensionsListWithFilter-Legacy": { + "$ref": "./examples/EnrollmentAccountDimensionsListWithFilter.json" + }, + "BillingAccountDimensionsList-Legacy": { + "$ref": "./examples/BillingAccountDimensionsList.json" + }, + "BillingAccountDimensionsListExpandAndTop-Legacy": { + "$ref": "./examples/BillingAccountDimensionsListExpandAndTop.json" + }, + "BillingAccountDimensionsListWithFilter-Legacy": { + "$ref": "./examples/BillingAccountDimensionsListWithFilter.json" + }, + "BillingAccountDimensionsList-Modern": { + "$ref": "./examples/MCABillingAccountDimensionsList.json" + }, + "BillingAccountDimensionsListExpandAndTop-Modern": { + "$ref": "./examples/MCABillingAccountDimensionsListExpandAndTop.json" + }, + "BillingAccountDimensionsListWithFilter-Modern": { + "$ref": "./examples/MCABillingAccountDimensionsListWithFilter.json" + }, + "BillingProfileDimensionsList-Modern": { + "$ref": "./examples/MCABillingProfileDimensionsList.json" + }, + "BillingProfileDimensionsListExpandAndTop-Modern": { + "$ref": "./examples/MCABillingProfileDimensionsListExpandAndTop.json" + }, + "BillingProfileDimensionsListWithFilter-Modern": { + "$ref": "./examples/MCABillingProfileDimensionsListWithFilter.json" + }, + "InvoiceSectionDimensionsList-Modern": { + "$ref": "./examples/MCAInvoiceSectionDimensionsList.json" + }, + "InvoiceSectionDimensionsListExpandAndTop-Modern": { + "$ref": "./examples/MCAInvoiceSectionDimensionsListExpandAndTop.json" + }, + "InvoiceSectionDimensionsListWithFilter-Modern": { + "$ref": "./examples/MCAInvoiceSectionDimensionsListWithFilter.json" + }, + "CustomerDimensionsList-Modern": { + "$ref": "./examples/MCACustomerDimensionsList.json" + }, + "CustomerDimensionsListExpandAndTop-Modern": { + "$ref": "./examples/MCACustomerDimensionsListExpandAndTop.json" + }, + "CustomerDimensionsListWithFilter-Modern": { + "$ref": "./examples/MCACustomerDimensionsListWithFilter.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scopeDimensionParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "name": "$filter", + "description": "May be used to filter dimensions by properties/category, properties/usageStart, properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$expand", + "description": "May be used to expand the properties/data within a dimension category. By default, data is not included when listing dimensions.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$skiptoken", + "description": "Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$top", + "description": "May be used to limit the number of results to the most recent N dimension data.", + "in": "query", + "required": false, + "type": "integer", + "minimum": 1, + "maximum": 1000 + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/DimensionsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/dimensions": { + "get": { + "tags": [ + "Dimensions" + ], + "x-ms-odata": "#/definitions/Dimension", + "operationId": "Dimensions_ByExternalCloudProviderType", + "description": "Lists the dimensions by the external cloud provider type.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ExternalBillingAccountDimensionList": { + "$ref": "./examples/ExternalBillingAccountsDimensions.json" + }, + "ExternalSubscriptionDimensionList": { + "$ref": "./examples/ExternalSubscriptionsDimensions.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/externalCloudProviderTypeParameter" + }, + { + "$ref": "#/parameters/externalCloudProviderIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "name": "$filter", + "description": "May be used to filter dimensions by properties/category, properties/usageStart, properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$expand", + "description": "May be used to expand the properties/data within a dimension category. By default, data is not included when listing dimensions.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$skiptoken", + "description": "Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$top", + "description": "May be used to limit the number of results to the most recent N dimension data.", + "in": "query", + "required": false, + "type": "integer", + "minimum": 1, + "maximum": 1000 + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/DimensionsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/{scope}/providers/Microsoft.CostManagement/query": { + "post": { + "tags": [ + "Query" + ], + "operationId": "Query_Usage", + "description": "Query the usage data for scope defined.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "SubscriptionQuery-Legacy": { + "$ref": "./examples/SubscriptionQuery.json" + }, + "SubscriptionQueryGrouping-Legacy": { + "$ref": "./examples/SubscriptionQueryGrouping.json" + }, + "ResourceGroupQuery-Legacy": { + "$ref": "./examples/ResourceGroupQuery.json" + }, + "ResourceGroupQueryGrouping-Legacy": { + "$ref": "./examples/ResourceGroupQueryGrouping.json" + }, + "BillingAccountQuery-Legacy": { + "$ref": "./examples/BillingAccountQuery.json" + }, + "BillingAccountQueryGrouping-Legacy": { + "$ref": "./examples/BillingAccountQueryGrouping.json" + }, + "EnrollmentAccountQuery-Legacy": { + "$ref": "./examples/EnrollmentAccountQuery.json" + }, + "EnrollmentAccountQueryGrouping-Legacy": { + "$ref": "./examples/EnrollmentAccountQueryGrouping.json" + }, + "DepartmentQuery-Legacy": { + "$ref": "./examples/DepartmentQuery.json" + }, + "DepartmentQueryGrouping-Legacy": { + "$ref": "./examples/DepartmentQueryGrouping.json" + }, + "ManagementGroupQuery-Legacy": { + "$ref": "./examples/ManagementGroupQuery.json" + }, + "ManagementGroupQueryGrouping-Legacy": { + "$ref": "./examples/ManagementGroupQueryGrouping.json" + }, + "BillingAccountQuery-Modern": { + "$ref": "./examples/MCABillingAccountQuery.json" + }, + "BillingAccountQueryGrouping-Modern": { + "$ref": "./examples/MCABillingAccountQueryGrouping.json" + }, + "BillingProfileQuery-Modern": { + "$ref": "./examples/MCABillingProfileQuery.json" + }, + "BillingProfileQueryGrouping-Modern": { + "$ref": "./examples/MCABillingProfileQueryGrouping.json" + }, + "InvoiceSectionQuery-Modern": { + "$ref": "./examples/MCAInvoiceSectionQuery.json" + }, + "InvoiceSectionQueryGrouping-Modern": { + "$ref": "./examples/MCAInvoiceSectionQueryGrouping.json" + }, + "CustomerQuery-Modern": { + "$ref": "./examples/MCACustomerQuery.json" + }, + "CustomerQueryGrouping-Modern": { + "$ref": "./examples/MCACustomerQueryGrouping.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scopeQueryParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/QueryDefinition" + }, + "description": "Parameters supplied to the CreateOrUpdate Query Config operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/QueryResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/query": { + "post": { + "tags": [ + "Query" + ], + "operationId": "Query_UsageByExternalCloudProviderType", + "description": "Query the usage data for external cloud provider type defined.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ExternalBillingAccountQueryList": { + "$ref": "./examples/ExternalBillingAccountsQuery.json" + }, + "ExternalSubscriptionsQuery": { + "$ref": "./examples/ExternalSubscriptionsQuery.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/externalCloudProviderTypeParameter" + }, + { + "$ref": "#/parameters/externalCloudProviderIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/QueryDefinition" + }, + "description": "Parameters supplied to the CreateOrUpdate Query Config operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/QueryResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/{scope}/providers/Microsoft.CostManagement/exports": { + "get": { + "tags": [ + "Exports" + ], + "operationId": "Exports_List", + "description": "The operation to list all exports at the given scope.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ExportsGetBySubscription": { + "$ref": "./examples/ExportsGetBySubscription.json" + }, + "ExportsGetByResourceGroup": { + "$ref": "./examples/ExportsGetByResourceGroup.json" + }, + "ExportsGetByBillingAccount": { + "$ref": "./examples/ExportsGetByBillingAccount.json" + }, + "ExportsGetByDepartment": { + "$ref": "./examples/ExportsGetByDepartment.json" + }, + "ExportsGetByEnrollmentAccount": { + "$ref": "./examples/ExportsGetByEnrollmentAccount.json" + }, + "ExportsGetByManagementGroup": { + "$ref": "./examples/ExportsGetByManagementGroup.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scopeQueryParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "name": "$expand", + "description": "May be used to expand the properties within an export. Currently only 'runHistory' is supported and will return information for the last execution of each export.", + "in": "query", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ExportListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/{scope}/providers/Microsoft.CostManagement/exports/{exportName}": { + "get": { + "tags": [ + "Exports" + ], + "operationId": "Exports_Get", + "description": "The operation to get the export for the defined scope by export name.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ExportGetBySubscription": { + "$ref": "./examples/ExportGetBySubscription.json" + }, + "ExportGetByResourceGroup": { + "$ref": "./examples/ExportGetByResourceGroup.json" + }, + "ExportGetByBillingAccount": { + "$ref": "./examples/ExportGetByBillingAccount.json" + }, + "ExportGetByDepartment": { + "$ref": "./examples/ExportGetByDepartment.json" + }, + "ExportGetByEnrollmentAccount": { + "$ref": "./examples/ExportGetByEnrollmentAccount.json" + }, + "ExportGetByManagementGroup": { + "$ref": "./examples/ExportGetByManagementGroup.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scopeQueryParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/exportNameParameter" + }, + { + "name": "$expand", + "description": "May be used to expand the properties within an export. Currently only 'runHistory' is supported and will return information for the last 10 executions of the export.", + "in": "query", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/Export" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "tags": [ + "Exports" + ], + "operationId": "Exports_CreateOrUpdate", + "description": "The operation to create or update a export. Update operation requires latest eTag to be set in the request. 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/costmanagement/" + }, + "x-ms-examples": { + "ExportCreateOrUpdateBySubscription": { + "$ref": "./examples/ExportCreateOrUpdateBySubscription.json" + }, + "ExportCreateOrUpdateByResourceGroup": { + "$ref": "./examples/ExportCreateOrUpdateByResourceGroup.json" + }, + "ExportCreateOrUpdateByBillingAccount": { + "$ref": "./examples/ExportCreateOrUpdateByBillingAccount.json" + }, + "ExportCreateOrUpdateByDepartment": { + "$ref": "./examples/ExportCreateOrUpdateByDepartment.json" + }, + "ExportCreateOrUpdateByEnrollmentAccount": { + "$ref": "./examples/ExportCreateOrUpdateByEnrollmentAccount.json" + }, + "ExportCreateOrUpdateByManagementGroup": { + "$ref": "./examples/ExportCreateOrUpdateByManagementGroup.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scopeQueryParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/exportNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Export" + }, + "description": "Parameters supplied to the CreateOrUpdate Export operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/Export" + } + }, + "201": { + "description": "Created.", + "schema": { + "$ref": "#/definitions/Export" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "tags": [ + "Exports" + ], + "operationId": "Exports_Delete", + "description": "The operation to delete a export.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ExportDeleteBySubscription": { + "$ref": "./examples/ExportDeleteBySubscription.json" + }, + "ExportDeleteByResourceGroup": { + "$ref": "./examples/ExportDeleteByResourceGroup.json" + }, + "ExportDeleteByBillingAccount": { + "$ref": "./examples/ExportDeleteByBillingAccount.json" + }, + "ExportDeleteByEnrollmentAccount": { + "$ref": "./examples/ExportDeleteByEnrollmentAccount.json" + }, + "ExportDeleteByDepartment": { + "$ref": "./examples/ExportDeleteByDepartment.json" + }, + "ExportDeleteByManagementGroup": { + "$ref": "./examples/ExportDeleteByManagementGroup.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scopeQueryParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/exportNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/{scope}/providers/Microsoft.CostManagement/exports/{exportName}/run": { + "post": { + "tags": [ + "Exports" + ], + "operationId": "Exports_Execute", + "description": "The operation to execute an export.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ExportRunBySubscription": { + "$ref": "./examples/ExportRunBySubscription.json" + }, + "ExportRunByResourceGroup": { + "$ref": "./examples/ExportRunByResourceGroup.json" + }, + "ExportRunByBillingAccount": { + "$ref": "./examples/ExportRunByBillingAccount.json" + }, + "ExportRunByDepartment": { + "$ref": "./examples/ExportRunByDepartment.json" + }, + "ExportRunByEnrollmentAccount": { + "$ref": "./examples/ExportRunByEnrollmentAccount.json" + }, + "ExportRunByManagementGroup": { + "$ref": "./examples/ExportRunByManagementGroup.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scopeQueryParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/exportNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/{scope}/providers/Microsoft.CostManagement/exports/{exportName}/runHistory": { + "get": { + "tags": [ + "Exports" + ], + "operationId": "Exports_GetExecutionHistory", + "description": "The operation to get the execution history of an export for the defined scope and export name.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ExportRunHistoryGetBySubscription": { + "$ref": "./examples/ExportRunHistoryGetBySubscription.json" + }, + "ExportRunHistoryGetByResourceGroup": { + "$ref": "./examples/ExportRunHistoryGetByResourceGroup.json" + }, + "ExportRunHistoryGetByBillingAccount": { + "$ref": "./examples/ExportRunHistoryGetByBillingAccount.json" + }, + "ExportRunHistoryGetByDepartment": { + "$ref": "./examples/ExportRunHistoryGetByDepartment.json" + }, + "ExportRunHistoryGetByEnrollmentAccount": { + "$ref": "./examples/ExportRunHistoryGetByEnrollmentAccount.json" + }, + "ExportRunHistoryGetByManagementGroup": { + "$ref": "./examples/ExportRunHistoryGetByManagementGroup.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scopeQueryParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/exportNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ExportExecutionListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.CostManagement/operations": { + "get": { + "tags": [ + "Operations" + ], + "operationId": "Operations_List", + "description": "Lists all of the available cost management 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": { + "ReportConfigDefinition": { + "description": "The definition of a report config.", + "properties": { + "type": { + "description": "The type of the report. Usage represents actual usage, forecast represents forecasted data and UsageAndForecast represents both usage and forecasted data. Actual usage and forecasted data can be differentiated based on dates.", + "type": "string", + "enum": [ + "Usage" + ], + "x-ms-enum": { + "name": "ReportType", + "modelAsString": true + } + }, + "timeframe": { + "description": "The time frame for pulling data for the report. If custom, then a specific time period must be provided.", + "type": "string", + "enum": [ + "WeekToDate", + "MonthToDate", + "YearToDate", + "Custom" + ], + "x-ms-enum": { + "name": "ReportTimeframeType", + "modelAsString": true + } + }, + "timePeriod": { + "description": "Has time period for pulling data for the report.", + "$ref": "#/definitions/ReportConfigTimePeriod" + }, + "dataset": { + "description": "Has definition for data in this report config.", + "$ref": "#/definitions/ReportConfigDataset" + } + }, + "required": [ + "type", + "timeframe" + ] + }, + "ReportConfigTimePeriod": { + "description": "The start and end date for pulling data for the report.", + "properties": { + "from": { + "description": "The start date to pull data from.", + "type": "string", + "format": "date-time" + }, + "to": { + "description": "The end date to pull data to.", + "type": "string", + "format": "date-time" + } + }, + "required": [ + "from", + "to" + ] + }, + "ReportConfigDataset": { + "description": "The definition of data present in the report.", + "properties": { + "granularity": { + "description": "The granularity of rows in the report.", + "type": "string", + "enum": [ + "Daily", + "Monthly" + ], + "x-ms-enum": { + "name": "ReportGranularityType", + "modelAsString": true + } + }, + "configuration": { + "description": "Has configuration information for the data in the report. The configuration will be ignored if aggregation and grouping are provided.", + "$ref": "#/definitions/ReportConfigDatasetConfiguration" + }, + "aggregation": { + "type": "object", + "description": "Dictionary of aggregation expression to use in the report. The key of each item in the dictionary is the alias for the aggregated column. Report can have up to 2 aggregation clauses.", + "additionalProperties": { + "type": "object", + "$ref": "#/definitions/ReportConfigAggregation" + }, + "maxItems": 2 + }, + "grouping": { + "description": "Array of group by expression to use in the report. Report can have up to 2 group by clauses.", + "type": "array", + "items": { + "$ref": "#/definitions/ReportConfigGrouping" + }, + "maxItems": 2 + }, + "sorting": { + "description": "Array of order by expression to use in the report.", + "type": "array", + "items": { + "$ref": "#/definitions/ReportConfigSorting" + } + }, + "filter": { + "type": "object", + "description": "Has filter expression to use in the report.", + "$ref": "#/definitions/ReportConfigFilter" + } + } + }, + "ReportConfigDatasetConfiguration": { + "description": "The configuration of dataset in the report.", + "properties": { + "columns": { + "description": "Array of column names to be included in the report. Any valid report column name is allowed. If not provided, then report includes all columns.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "ReportConfigAggregation": { + "description": "The aggregation expression to be used in the report.", + "properties": { + "name": { + "description": "The name of the column to aggregate.", + "type": "string" + }, + "function": { + "description": "The name of the aggregation function to use.", + "type": "string", + "enum": [ + "Sum" + ], + "x-ms-enum": { + "name": "FunctionType", + "modelAsString": true + } + } + }, + "required": [ + "name", + "function" + ] + }, + "ReportConfigSorting": { + "description": "The order by expression to be used in the report.", + "properties": { + "direction": { + "description": "Direction of sort.", + "type": "string", + "enum": [ + "Ascending", + "Descending" + ] + }, + "name": { + "description": "The name of the column to sort.", + "type": "string" + } + }, + "required": [ + "name" + ] + }, + "ReportConfigGrouping": { + "description": "The group by expression to be used in the report.", + "properties": { + "type": { + "description": "Has type of the column to group.", + "$ref": "#/definitions/ReportConfigColumnType" + }, + "name": { + "description": "The name of the column to group. This version supports subscription lowest possible grain.", + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + "ReportConfigFilter": { + "description": "The filter expression to be used in the report.", + "properties": { + "and": { + "description": "The logical \"AND\" expression. Must have at least 2 items.", + "type": "array", + "items": { + "$ref": "#/definitions/ReportConfigFilter" + }, + "minItems": 2 + }, + "or": { + "description": "The logical \"OR\" expression. Must have at least 2 items.", + "type": "array", + "items": { + "$ref": "#/definitions/ReportConfigFilter" + }, + "minItems": 2 + }, + "not": { + "description": "The logical \"NOT\" expression.", + "$ref": "#/definitions/ReportConfigFilter" + }, + "dimension": { + "description": "Has comparison expression for a dimension", + "$ref": "#/definitions/ReportConfigComparisonExpression" + }, + "tag": { + "description": "Has comparison expression for a tag", + "$ref": "#/definitions/ReportConfigComparisonExpression" + } + } + }, + "ReportConfigColumnType": { + "description": "The type of the column in the report.", + "type": "string", + "enum": [ + "Tag", + "Dimension" + ], + "x-ms-enum": { + "name": "ReportConfigColumnType", + "modelAsString": true + } + }, + "ReportConfigComparisonExpression": { + "description": "The comparison expression to be used in the report.", + "properties": { + "name": { + "description": "The name of the column to use in comparison.", + "type": "string" + }, + "operator": { + "description": "The operator to use for comparison.", + "type": "string", + "enum": [ + "In", + "Contains" + ], + "x-ms-enum": { + "name": "OperatorType", + "modelAsString": true + } + }, + "values": { + "description": "Array of values to use for comparison", + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1 + } + }, + "required": [ + "name", + "operator", + "values" + ] + }, + "ViewListResult": { + "description": "Result of listing views. It contains a list of available views.", + "type": "object", + "properties": { + "value": { + "description": "The list of views.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/View" + } + }, + "nextLink": { + "description": "The link (url) to the next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "View": { + "description": "States and configurations of Cost Analysis.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ViewProperties", + "title": "View properties" + } + } + }, + "ViewProperties": { + "type": "object", + "description": "The properties of the view.", + "properties": { + "displayName": { + "description": "User input name of the view. Required.", + "type": "string" + }, + "scope": { + "description": "Cost Management scope to save the view on. 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, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for BillingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, '/providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for ExternalBillingAccount scope, and '/providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for ExternalSubscription scope.", + "type": "string" + }, + "createdOn": { + "description": "Date the user created this view.", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "modifiedOn": { + "description": "Date when the user last modified this view.", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "query": { + "description": "Query body configuration. Required.", + "type": "object", + "x-ms-client-flatten": true, + "$ref": "#/definitions/ReportConfigDefinition" + }, + "chart": { + "description": "Chart type of the main view in Cost Analysis. Required.", + "type": "string", + "enum": [ + "Area", + "Line", + "StackedColumn", + "GroupedColumn", + "Table" + ], + "x-ms-enum": { + "name": "ChartType", + "modelAsString": true + } + }, + "accumulated": { + "description": "Show costs accumulated over time.", + "type": "string", + "enum": [ + "true", + "false" + ], + "x-ms-enum": { + "name": "AccumulatedType", + "modelAsString": true + } + }, + "metric": { + "description": "Metric to use when displaying costs.", + "type": "string", + "enum": [ + "ActualCost", + "AmortizedCost", + "AHUB" + ], + "x-ms-enum": { + "name": "MetricType", + "modelAsString": true + } + }, + "kpis": { + "description": "List of KPIs to show in Cost Analysis UI.", + "type": "array", + "items": { + "$ref": "#/definitions/KpiProperties" + } + }, + "pivots": { + "description": "Configuration of 3 sub-views in the Cost Analysis UI.", + "type": "array", + "items": { + "$ref": "#/definitions/PivotProperties" + } + } + } + }, + "KpiProperties": { + "description": "Each KPI must contain a 'type' and 'enabled' key.", + "type": "object", + "properties": { + "type": { + "description": "KPI type (Forecast, Budget).", + "type": "string", + "enum": [ + "Forecast", + "Budget" + ], + "x-ms-enum": { + "name": "KpiTypeType", + "modelAsString": true + } + }, + "id": { + "description": "ID of resource related to metric (budget).", + "type": "string" + }, + "enabled": { + "description": "show the KPI in the UI?", + "type": "boolean" + } + } + }, + "PivotProperties": { + "description": "Each pivot must contain a 'type' and 'name'.", + "type": "object", + "properties": { + "type": { + "description": "Data type to show in view.", + "type": "string", + "enum": [ + "Dimension", + "TagKey" + ], + "x-ms-enum": { + "name": "PivotTypeType", + "modelAsString": true + } + }, + "name": { + "description": "Data field to show in view.", + "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. \n\nSome Error responses: \n\n * 429 TooManyRequests - Request is throttled. Retry after waiting for the time specified in the \"x-ms-ratelimit-microsoft.consumption-retry-after\" header. \n\n * 503 ServiceUnavailable - Service is temporarily unavailable. Retry after waiting for the time specified in the \"Retry-After\" header.", + "type": "object", + "properties": { + "error": { + "description": "The details of the error.", + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "Resource": { + "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." + }, + "tags": { + "readOnly": true, + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Resource tags." + } + }, + "x-ms-azure-resource": 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 + }, + "DimensionsListResult": { + "description": "Result of listing dimensions. It contains a list of available dimensions.", + "type": "object", + "properties": { + "value": { + "description": "The list of dimensions.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/Dimension" + } + } + } + }, + "Dimension": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/DimensionProperties", + "title": "Dimension properties" + } + } + }, + "DimensionProperties": { + "type": "object", + "properties": { + "description": { + "description": "Dimension description.", + "type": "string", + "readOnly": true + }, + "filterEnabled": { + "description": "Filter enabled.", + "type": "boolean", + "readOnly": true + }, + "groupingEnabled": { + "description": "Grouping enabled.", + "type": "boolean", + "readOnly": true + }, + "data": { + "type": "array", + "items": { + "description": "Dimension data item.", + "type": "string", + "readOnly": true + } + }, + "total": { + "description": "Total number of data for the dimension.", + "format": "int32", + "type": "integer", + "readOnly": true + }, + "category": { + "description": "Dimension category.", + "type": "string", + "readOnly": true + }, + "usageStart": { + "description": "Usage start.", + "format": "date-time", + "type": "string", + "readOnly": true + }, + "usageEnd": { + "description": "Usage end.", + "format": "date-time", + "type": "string", + "readOnly": true + }, + "nextLink": { + "description": "The link (url) to the next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "AlertsResult": { + "description": "Result of alerts.", + "type": "object", + "properties": { + "value": { + "description": "List of alerts.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/Alert" + } + }, + "nextLink": { + "description": "URL to get the next set of alerts results if there are any.", + "type": "string", + "readOnly": true + } + } + }, + "Alert": { + "description": "An individual alert.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/AlertProperties", + "title": "Alert properties" + } + } + }, + "AlertProperties": { + "type": "object", + "properties": { + "definition": { + "description": "defines the type of alert", + "type": "object", + "properties": { + "type": { + "description": "type of alert", + "type": "string", + "enum": [ + "Budget", + "Invoice", + "Credit", + "Quota", + "General", + "xCloud", + "BudgetForecast" + ], + "x-ms-enum": { + "name": "AlertType", + "modelAsString": true + } + }, + "category": { + "description": "Alert category", + "type": "string", + "enum": [ + "Cost", + "Usage", + "Billing", + "System" + ], + "x-ms-enum": { + "name": "AlertCategory", + "modelAsString": true + } + }, + "criteria": { + "description": "Criteria that triggered alert", + "type": "string", + "enum": [ + "CostThresholdExceeded", + "UsageThresholdExceeded", + "CreditThresholdApproaching", + "CreditThresholdReached", + "QuotaThresholdApproaching", + "QuotaThresholdReached", + "MultiCurrency", + "ForecastCostThresholdExceeded", + "ForecastUsageThresholdExceeded", + "InvoiceDueDateApproaching", + "InvoiceDueDateReached", + "CrossCloudNewDataAvailable", + "CrossCloudCollectionError", + "GeneralThresholdError" + ], + "x-ms-enum": { + "name": "AlertCriteria", + "modelAsString": true + } + } + } + }, + "description": { + "description": "Alert description", + "type": "string" + }, + "source": { + "description": "Source of alert", + "type": "string", + "enum": [ + "Preset", + "User" + ], + "x-ms-enum": { + "name": "AlertSource", + "modelAsString": true + } + }, + "details": { + "description": "Alert details", + "type": "object", + "properties": { + "timeGrainType": { + "description": "Type of timegrain cadence", + "type": "string", + "enum": [ + "None", + "Monthly", + "Quarterly", + "Annually", + "BillingMonth", + "BillingQuarter", + "BillingAnnual" + ], + "x-ms-enum": { + "name": "AlertTimeGrainType", + "modelAsString": true + } + }, + "periodStartDate": { + "description": "datetime of periodStartDate", + "type": "string" + }, + "triggeredBy": { + "description": "notificationId that triggered this alert", + "type": "string" + }, + "resourceGroupFilter": { + "description": "array of resourceGroups to filter by", + "type": "array", + "items": {} + }, + "resourceFilter": { + "description": "array of resources to filter by", + "type": "array", + "items": {} + }, + "meterFilter": { + "description": "array of meters to filter by", + "type": "array", + "items": {} + }, + "tagFilter": { + "description": "tags to filter by", + "type": "object", + "properties": {} + }, + "threshold": { + "description": "notification threshold percentage as a decimal which activated this alert", + "type": "number", + "format": "decimal" + }, + "operator": { + "description": "operator used to compare currentSpend with amount", + "type": "string", + "enum": [ + "None", + "EqualTo", + "GreaterThan", + "GreaterThanOrEqualTo", + "LessThan", + "LessThanOrEqualTo" + ], + "x-ms-enum": { + "name": "AlertOperator", + "modelAsString": true + } + }, + "amount": { + "description": "budget threshold amount", + "type": "number", + "format": "decimal" + }, + "unit": { + "description": "unit of currency being used", + "type": "string" + }, + "currentSpend": { + "description": "current spend", + "type": "number", + "format": "decimal" + }, + "contactEmails": { + "description": "list of emails to contact", + "type": "array", + "items": { + "type": "string" + } + }, + "contactGroups": { + "description": "list of action groups to broadcast to", + "type": "array", + "items": { + "type": "string" + } + }, + "contactRoles": { + "description": "list of contact roles", + "type": "array", + "items": { + "type": "string" + } + }, + "overridingAlert": { + "description": "overriding alert", + "type": "string" + } + } + }, + "costEntityId": { + "description": "related budget", + "type": "string" + }, + "status": { + "description": "alert status", + "type": "string", + "enum": [ + "None", + "Active", + "Overridden", + "Resolved", + "Dismissed" + ], + "x-ms-enum": { + "name": "AlertStatus", + "modelAsString": true + } + }, + "creationTime": { + "description": "dateTime in which alert was created", + "type": "string" + }, + "closeTime": { + "description": "dateTime in which alert was closed", + "type": "string" + }, + "modificationTime": { + "description": "dateTime in which alert was last modified", + "type": "string" + }, + "statusModificationUserName": { + "description": "", + "type": "string" + }, + "statusModificationTime": { + "description": "dateTime in which the alert status was last modified", + "type": "string" + } + } + }, + "DismissAlertPayload": { + "description": "The request payload to update an alert", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/AlertProperties", + "title": "Alert properties" + } + } + }, + "QueryResult": { + "description": "Result of query. It contains all columns listed under groupings and aggregation.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/QueryProperties", + "title": "Query properties" + } + } + }, + "QueryProperties": { + "type": "object", + "properties": { + "nextLink": { + "description": "The link (url) to the next page of results.", + "type": "string" + }, + "columns": { + "description": "Array of columns", + "type": "array", + "items": { + "$ref": "#/definitions/QueryColumn" + } + }, + "rows": { + "description": "Array of rows", + "type": "array", + "items": { + "type": "array", + "items": {} + } + } + } + }, + "QueryColumn": { + "type": "object", + "properties": { + "name": { + "description": "The name of column.", + "type": "string" + }, + "type": { + "description": "The type of column.", + "type": "string" + } + } + }, + "OperationListResult": { + "description": "Result of listing cost management operations. It contains a list of operations and a URL link to get the next set of results.", + "properties": { + "value": { + "description": "List of cost management operations supported by the Microsoft.CostManagement 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 + } + } + }, + "Operation": { + "description": "A Cost management 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.CostManagement.", + "type": "string", + "readOnly": true + }, + "resource": { + "description": "Resource on which the operation is performed: Dimensions, Query.", + "type": "string", + "readOnly": true + }, + "operation": { + "description": "Operation type: Read, write, delete, etc.", + "type": "string", + "readOnly": true + } + } + } + } + }, + "ForecastDefinition": { + "description": "The definition of a forecast.", + "properties": { + "type": { + "description": "The type of the forecast.", + "type": "string", + "enum": [ + "Usage", + "ActualCost", + "AmortizedCost" + ], + "x-ms-enum": { + "name": "ForecastType", + "modelAsString": true + } + }, + "timeframe": { + "description": "The time frame for pulling data for the forecast. If custom, then a specific time period must be provided.", + "type": "string", + "enum": [ + "MonthToDate", + "BillingMonthToDate", + "TheLastMonth", + "TheLastBillingMonth", + "WeekToDate", + "Custom" + ], + "x-ms-enum": { + "name": "ForecastTimeframeType", + "modelAsString": true + } + }, + "timePeriod": { + "description": "Has time period for pulling data for the forecast.", + "$ref": "#/definitions/QueryTimePeriod" + }, + "dataset": { + "description": "Has definition for data in this forecast.", + "$ref": "#/definitions/QueryDataset" + }, + "includeActualCost": { + "description": "a boolean determining if actualCost will be included", + "type": "boolean" + }, + "includeFreshPartialCost": { + "description": "a boolean determining if FreshPartialCost will be included", + "type": "boolean" + } + }, + "required": [ + "type", + "timeframe" + ] + }, + "QueryDefinition": { + "description": "The definition of a query.", + "properties": { + "type": { + "description": "The type of the query.", + "type": "string", + "enum": [ + "Usage", + "ActualCost", + "AmortizedCost" + ], + "x-ms-enum": { + "name": "ExportType", + "modelAsString": true + } + }, + "timeframe": { + "description": "The time frame for pulling data for the query. If custom, then a specific time period must be provided.", + "type": "string", + "enum": [ + "MonthToDate", + "BillingMonthToDate", + "TheLastMonth", + "TheLastBillingMonth", + "WeekToDate", + "Custom" + ], + "x-ms-enum": { + "name": "TimeframeType", + "modelAsString": true + } + }, + "timePeriod": { + "description": "Has time period for pulling data for the query.", + "$ref": "#/definitions/QueryTimePeriod" + }, + "dataset": { + "description": "Has definition for data in this query.", + "$ref": "#/definitions/QueryDataset" + } + }, + "required": [ + "type", + "timeframe" + ] + }, + "QueryTimePeriod": { + "description": "The start and end date for pulling data for the query.", + "properties": { + "from": { + "description": "The start date to pull data from.", + "type": "string", + "format": "date-time" + }, + "to": { + "description": "The end date to pull data to.", + "type": "string", + "format": "date-time" + } + }, + "required": [ + "from", + "to" + ] + }, + "QueryDataset": { + "description": "The definition of data present in the query.", + "properties": { + "granularity": { + "description": "The granularity of rows in the query.", + "type": "string", + "enum": [ + "Daily" + ], + "x-ms-enum": { + "name": "GranularityType", + "modelAsString": true + } + }, + "configuration": { + "description": "Has configuration information for the data in the export. The configuration will be ignored if aggregation and grouping are provided.", + "$ref": "#/definitions/QueryDatasetConfiguration" + }, + "aggregation": { + "type": "object", + "description": "Dictionary of aggregation expression to use in the query. The key of each item in the dictionary is the alias for the aggregated column. Query can have up to 2 aggregation clauses.", + "additionalProperties": { + "type": "object", + "$ref": "#/definitions/QueryAggregation" + }, + "maxItems": 2 + }, + "grouping": { + "description": "Array of group by expression to use in the query. Query can have up to 2 group by clauses.", + "type": "array", + "items": { + "$ref": "#/definitions/QueryGrouping" + }, + "maxItems": 2 + }, + "filter": { + "type": "object", + "description": "Has filter expression to use in the query.", + "$ref": "#/definitions/QueryFilter" + } + } + }, + "QueryDatasetConfiguration": { + "description": "The configuration of dataset in the query.", + "properties": { + "columns": { + "description": "Array of column names to be included in the query. Any valid query column name is allowed. If not provided, then query includes all columns.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "QueryAggregation": { + "description": "The aggregation expression to be used in the query.", + "properties": { + "name": { + "description": "The name of the column to aggregate.", + "type": "string" + }, + "function": { + "description": "The name of the aggregation function to use.", + "type": "string", + "enum": [ + "Sum" + ], + "x-ms-enum": { + "name": "FunctionType", + "modelAsString": true + } + } + }, + "required": [ + "name", + "function" + ] + }, + "QueryGrouping": { + "description": "The group by expression to be used in the query.", + "properties": { + "type": { + "description": "Has type of the column to group.", + "$ref": "#/definitions/QueryColumnType" + }, + "name": { + "description": "The name of the column to group.", + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + "QueryFilter": { + "description": "The filter expression to be used in the export.", + "properties": { + "and": { + "description": "The logical \"AND\" expression. Must have at least 2 items.", + "type": "array", + "items": { + "$ref": "#/definitions/QueryFilter" + }, + "minItems": 2 + }, + "or": { + "description": "The logical \"OR\" expression. Must have at least 2 items.", + "type": "array", + "items": { + "$ref": "#/definitions/QueryFilter" + }, + "minItems": 2 + }, + "not": { + "description": "The logical \"NOT\" expression.", + "$ref": "#/definitions/QueryFilter" + }, + "dimension": { + "description": "Has comparison expression for a dimension", + "$ref": "#/definitions/QueryComparisonExpression" + }, + "tag": { + "description": "Has comparison expression for a tag", + "$ref": "#/definitions/QueryComparisonExpression" + } + } + }, + "QueryColumnType": { + "description": "The type of the column in the export.", "type": "string", - "description": "The reason this name is not available.", "enum": [ - "Invalid", - "AlreadyExists", - "Valid" + "Tag", + "Dimension" ], "x-ms-enum": { - "name": "Reason", + "name": "QueryColumnType", "modelAsString": true } }, - "CostAllocationRuleDefinition": { + "QueryComparisonExpression": { + "description": "The comparison expression to be used in the query.", + "properties": { + "name": { + "description": "The name of the column to use in comparison.", + "type": "string" + }, + "operator": { + "description": "The operator to use for comparison.", + "type": "string", + "enum": [ + "In" + ], + "x-ms-enum": { + "name": "OperatorType", + "modelAsString": true + } + }, + "values": { + "description": "Array of values to use for comparison", + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1 + } + }, + "required": [ + "name", + "operator", + "values" + ] + }, + "ExportListResult": { + "description": "Result of listing exports. It contains a list of available exports in the scope provided.", + "type": "object", + "properties": { + "value": { + "description": "The list of exports.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/Export" + } + } + } + }, + "Export": { + "description": "An export resource.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ExportProperties", + "title": "Export properties" + } + } + }, + "ExportProperties": { + "description": "The properties of the export.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/CommonExportProperties" + } + ], + "properties": { + "schedule": { + "description": "Has schedule information for the export.", + "$ref": "#/definitions/ExportSchedule" + } + } + }, + "CommonExportProperties": { + "description": "The common properties of the export.", + "type": "object", + "properties": { + "format": { + "description": "The format of the export being delivered. Currently only 'Csv' is supported.", + "type": "string", + "enum": [ + "Csv" + ], + "x-ms-enum": { + "name": "FormatType", + "modelAsString": true + } + }, + "deliveryInfo": { + "description": "Has delivery information for the export.", + "$ref": "#/definitions/ExportDeliveryInfo" + }, + "definition": { + "description": "Has the definition for the export.", + "$ref": "#/definitions/ExportDefinition" + }, + "runHistory": { + "description": "If requested, has the most recent execution history for the export.", + "$ref": "#/definitions/ExportExecutionListResult" + }, + "nextRunTimeEstimate": { + "description": "If the export has an active schedule, provides an estimate of the next execution time.", + "type": "string", + "format": "date-time", + "readOnly": true + } + }, + "required": [ + "deliveryInfo", + "definition" + ] + }, + "ExportSchedule": { + "description": "The schedule associated with the export.", + "type": "object", + "properties": { + "status": { + "description": "The status of the export's schedule. If 'Inactive', the export's schedule is paused.", + "type": "string", + "enum": [ + "Active", + "Inactive" + ], + "x-ms-enum": { + "name": "StatusType", + "modelAsString": true + } + }, + "recurrence": { + "description": "The schedule recurrence.", + "type": "string", + "enum": [ + "Daily", + "Weekly", + "Monthly", + "Annually" + ], + "x-ms-enum": { + "name": "RecurrenceType", + "modelAsString": true + } + }, + "recurrencePeriod": { + "description": "Has start and end date of the recurrence. The start date must be in future. If present, the end date must be greater than start date.", + "$ref": "#/definitions/ExportRecurrencePeriod" + } + }, + "required": [ + "recurrence" + ] + }, + "ExportDeliveryInfo": { + "description": "The delivery information associated with a export.", + "type": "object", + "properties": { + "destination": { + "description": "Has destination for the export being delivered.", + "$ref": "#/definitions/ExportDeliveryDestination" + } + }, + "required": [ + "destination" + ] + }, + "ExportRecurrencePeriod": { + "description": "The start and end date for recurrence schedule.", "type": "object", - "description": "The cost allocation rule model definition", "properties": { - "id": { - "type": "string", - "readOnly": true, - "description": "Azure Resource Manager Id for the rule. This is a read ony value." - }, - "name": { + "from": { + "description": "The start date of recurrence.", "type": "string", - "readOnly": true, - "description": "Name of the rule. This is a read only value." + "format": "date-time" }, - "type": { + "to": { + "description": "The end date of recurrence.", "type": "string", - "readOnly": true, - "description": "Resource type of the rule. This is a read only value of Microsoft.CostManagement/CostAllocationRule." + "format": "date-time" } }, - "x-ms-azure-resource": true - }, - "CostAllocationRuleDefinitionResponse": { - "allOf": [ - { - "$ref": "#/definitions/CostAllocationRuleDefinition" - }, - { - "type": "object", - "properties": { - "properties": { - "$ref": "#/definitions/CostAllocationRulePropertiesResponse", - "description": "Cost allocation rule properties" - } - } - } - ], - "description": "The cost allocation rule model definition" - }, - "CostAllocationRuleDefinitionRequest": { - "allOf": [ - { - "$ref": "#/definitions/CostAllocationRuleDefinition" - }, - { - "type": "object", - "properties": { - "properties": { - "$ref": "#/definitions/CostAllocationRulePropertiesRequest", - "description": "Cost allocation rule properties" - } - } - } - ], - "description": "The cost allocation rule model definition" + "required": [ + "from" + ] }, - "CostAllocationRuleProperties": { + "ExportDeliveryDestination": { + "description": "The destination information for the delivery of the export. To allow access to a storage account, you must register the account's subscription with the Microsoft.CostManagementExports resource provider. This is required once per subscription. When creating an export in the Azure portal, it is done automatically, however API users need to register the subscription. For more information see https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-supported-services .", "type": "object", - "description": "The properties of a cost allocation rule", - "additionalProperties": false, - "required": [ - "details" - ], "properties": { - "description": { - "description": "Description of a cost allocation rule.", + "resourceId": { + "description": "The resource id of the storage account where exports will be delivered.", "type": "string" }, - "details": { - "description": "Resource information for the cost allocation rule", - "$ref": "#/definitions/CostAllocationRuleDetails" - } - } - }, - "CostAllocationRulePropertiesResponse": { - "description": "The properties of a cost allocation rule response", - "allOf": [ - { - "$ref": "#/definitions/CostAllocationRuleProperties" + "container": { + "description": "The name of the container where exports will be uploaded.", + "type": "string" }, - { - "type": "object", - "properties": { - "status": { - "$ref": "#/definitions/RuleStatus", - "description": "Status of the rule" - }, - "createdDate": { - "type": "string", - "format": "date-time", - "description": "Time at which the rule was created. Rules that change cost for the same resource are applied in order of creation." - }, - "updatedDate": { - "type": "string", - "format": "date-time", - "description": "Time at which the rule was last updated." - } - }, - "required": [ - "status" - ] + "rootFolderPath": { + "description": "The name of the directory where exports will be uploaded.", + "type": "string" } + }, + "required": [ + "resourceId", + "container" ] }, - "CostAllocationRulePropertiesRequest": { - "description": "The properties of a cost allocation rule request", - "allOf": [ - { - "$ref": "#/definitions/CostAllocationRuleProperties" + "ExportDefinition": { + "description": "The definition of an export.", + "type": "object", + "properties": { + "type": { + "description": "The type of the export. Note that 'Usage' is equivalent to 'ActualCost' and is applicable to exports that do not yet provide data for charges or amortization for service reservations.", + "type": "string", + "enum": [ + "Usage", + "ActualCost", + "AmortizedCost" + ], + "x-ms-enum": { + "name": "ExportType", + "modelAsString": true + } }, - { - "type": "object", - "properties": { - "status": { - "$ref": "#/definitions/InputRuleStatus", - "description": "Status of the rule" - } - }, - "required": [ - "status" - ] + "timeframe": { + "description": "The time frame for pulling data for the export. If custom, then a specific time period must be provided.", + "type": "string", + "enum": [ + "MonthToDate", + "BillingMonthToDate", + "TheLastMonth", + "TheLastBillingMonth", + "WeekToDate", + "Custom" + ], + "x-ms-enum": { + "name": "TimeframeType", + "modelAsString": true + } + }, + "timePeriod": { + "description": "Has time period for pulling data for the export.", + "$ref": "#/definitions/ExportTimePeriod" + }, + "dataSet": { + "description": "The definition for data in the export.", + "$ref": "#/definitions/ExportDataset" } + }, + "required": [ + "type", + "timeframe" ] }, - "RuleStatus": { - "type": "string", - "description": "Current status of the rule.", - "enum": [ - "NotActive", - "Active", - "Processing" - ], - "x-ms-enum": { - "name": "RuleStatus", - "modelAsString": true, - "values": [ - { - "value": "NotActive", - "description": "Rule is saved but not used to allocate costs.", - "name": "NotActive" - }, - { - "value": "Active", - "description": "Rule is saved and impacting cost allocation.", - "name": "Active" - }, - { - "value": "Processing", - "description": "Rule is saved and cost allocation is being updated.", - "name": "Processing" - } - ] - } - }, - "InputRuleStatus": { - "type": "string", - "description": "Desired status of the rule.", - "enum": [ - "NotActive", - "Active" - ], - "x-ms-enum": { - "name": "InputRuleStatus", - "modelAsString": true, - "values": [ - { - "value": "NotActive", - "description": "Rule will be saved but not used to allocate costs.", - "name": "NotActive" - }, - { - "value": "Active", - "description": "Rule will be saved and impacting cost allocation.", - "name": "Active" + "ExportDataset": { + "description": "The definition for data in the export.", + "type": "object", + "properties": { + "granularity": { + "description": "The granularity of rows in the export. Currently only 'Daily' is supported.", + "type": "string", + "enum": [ + "Daily" + ], + "x-ms-enum": { + "name": "GranularityType", + "modelAsString": true } - ] + }, + "configuration": { + "description": "The export dataset configuration.", + "$ref": "#/definitions/ExportDatasetConfiguration" + } } }, - "CostAllocationRuleDetails": { + "ExportDatasetConfiguration": { + "description": "The export dataset configuration. Allows columns to be selected for the export. If not provided then the export will include all available columns.", "type": "object", - "description": "Resource details of the cost allocation rule", "properties": { - "sourceResources": { - "description": "Source resources for cost allocation. At this time, this list can contain no more than one element.", - "type": "array", - "items": { - "$ref": "#/definitions/SourceCostAllocationResource" - } - }, - "targetResources": { + "columns": { + "description": "Array of column names to be included in the export. If not provided then the export will include all available columns. The available columns can vary by customer channel (see examples).", "type": "array", - "description": "Target resources for cost allocation. At this time, this list can contain no more than one element.", "items": { - "$ref": "#/definitions/TargetCostAllocationResource" + "type": "string" } } } }, - "CostAllocationResource": { + "ExportTimePeriod": { + "description": "The date range for data in the export. This should only be specified with timeFrame set to 'Custom'. The maximum date range is 3 months.", "type": "object", - "description": "Common values for resources for cost allocation", - "required": [ - "resourceType", - "name" - ], "properties": { - "resourceType": { - "description": "Type of resources contained in this cost allocation rule", - "$ref": "#/definitions/CostAllocationResourceType" + "from": { + "description": "The start date for export data.", + "type": "string", + "format": "date-time" }, - "name": { - "description": "If resource type is dimension, this must be either ResourceGroupName or SubscriptionId. If resource type is tag, this must be a valid Azure tag", - "type": "string" + "to": { + "description": "The end date for export data.", + "type": "string", + "format": "date-time" } - } + }, + "required": [ + "from", + "to" + ] }, - "SourceCostAllocationResource": { - "allOf": [ - { - "$ref": "#/definitions/CostAllocationResource" - }, - { - "type": "object", - "properties": { - "values": { - "description": "Source Resources for cost allocation. This list cannot contain more than 25 values.", - "type": "array", - "items": { - "description": "Source resource for cost allocation", - "type": "string" - } - } - }, - "required": [ - "values" - ] + "ExportExecutionListResult": { + "description": "Result of listing the execution history of an export.", + "type": "object", + "properties": { + "value": { + "description": "A list of export executions.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/ExportExecution" + } } - ], - "description": "Source resources for cost allocation" + } }, - "TargetCostAllocationResource": { - "description": "Target resources for cost allocation.", + "ExportExecution": { + "description": "An export execution.", + "type": "object", "allOf": [ { - "$ref": "#/definitions/CostAllocationResource" - }, - { - "type": "object", - "properties": { - "values": { - "description": "Target resources for cost allocation. This list cannot contain more than 25 values.", - "type": "array", - "items": { - "$ref": "#/definitions/CostAllocationProportion" - } - }, - "policyType": { - "description": "Method of cost allocation for the rule", - "$ref": "#/definitions/CostAllocationPolicyType" - } - }, - "required": [ - "values", - "policyType" - ] + "$ref": "#/definitions/Resource" } - ] - }, - "CostAllocationResourceType": { - "type": "string", - "description": "Category of resource to use for allocation.", - "enum": [ - "Dimension", - "Tag" ], - "x-ms-enum": { - "name": "CostAllocationResourceType", - "modelAsString": true, - "values": [ - { - "value": "Dimension", - "description": "Indicates an Azure dimension such as a subscription id or resource group name is being used for allocation.", - "name": "Dimension" - }, - { - "value": "Tag", - "description": "Allocates cost based on Azure Tag key value pairs.", - "name": "Tag" - } - ] + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ExportExecutionProperties", + "title": "Export execution properties" + } } }, - "CostAllocationProportion": { + "ExportExecutionProperties": { + "description": "The properties of the export execution.", "type": "object", - "description": "Target resources and allocation", - "required": [ - "percentage", - "name" - ], "properties": { - "name": { - "description": "Target resource for cost allocation", + "executionType": { + "description": "The type of the export execution.", + "type": "string", + "enum": [ + "OnDemand", + "Scheduled" + ], + "x-ms-enum": { + "name": "ExecutionType", + "modelAsString": true + } + }, + "status": { + "description": "The last known status of the export execution.", + "type": "string", + "enum": [ + "Queued", + "InProgress", + "Completed", + "Failed", + "Timeout", + "NewDataNotAvailable", + "DataNotAvailable" + ], + "x-ms-enum": { + "name": "ExecutionStatus", + "modelAsString": true + } + }, + "submittedBy": { + "description": "The identifier for the entity that executed the export. For OnDemand executions it is the user email. For scheduled executions it is 'System'.", + "type": "string" + }, + "submittedTime": { + "description": "The time when export was queued to be executed.", + "type": "string", + "format": "date-time" + }, + "processingStartTime": { + "description": "The time when export was picked up to be executed.", + "type": "string", + "format": "date-time" + }, + "processingEndTime": { + "description": "The time when the export execution finished.", + "type": "string", + "format": "date-time" + }, + "fileName": { + "description": "The name of the exported file.", "type": "string" }, - "percentage": { - "description": "Percentage of source cost to allocate to this resource. This value can be specified to two decimal places and the total percentage of all resources in this rule must sum to 100.00.", - "type": "number" + "runSettings": { + "description": "The export settings that were in effect for this execution.", + "$ref": "#/definitions/CommonExportProperties" + }, + "error": { + "description": "The details of any error.", + "$ref": "#/definitions/ErrorDetails" } } - }, - "CostAllocationPolicyType": { - "type": "string", - "description": "Method to use for allocating cost. FixedProportion indicates that cost will be split based on specified percentage values.", - "enum": [ - "FixedProportion" - ], - "x-ms-enum": { - "name": "CostAllocationPolicyType", - "modelAsString": true - } } }, "parameters": { + "viewNameParameter": { + "name": "viewName", + "in": "path", + "description": "View name", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "scopeViewParameter": { + "name": "scope", + "in": "path", + "required": true, + "type": "string", + "description": "The scope associated with view 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, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for BillingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for External Billing Account scope and 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External Subscription scope.", + "x-ms-parameter-location": "method" + }, + "scopeDimensionParameter": { + "name": "scope", + "in": "path", + "required": true, + "type": "string", + "description": "The scope associated with dimension 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, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope, and 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners.", + "x-ms-parameter-location": "method", + "x-ms-skip-url-encoding": true + }, + "scopeAlertParameter": { + "name": "scope", + "in": "path", + "required": true, + "type": "string", + "description": "The scope associated with alerts operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope, and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners.", + "x-ms-parameter-location": "method", + "x-ms-skip-url-encoding": true + }, + "scopeForecastParameter": { + "name": "scope", + "in": "path", + "required": true, + "type": "string", + "description": "The scope associated with forecast operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope, and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners.", + "x-ms-parameter-location": "method", + "x-ms-skip-url-encoding": true + }, + "scopeQueryParameter": { + "name": "scope", + "in": "path", + "required": true, + "type": "string", + "description": "The scope associated with query and export operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope, and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners.", + "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 2020-03-01-preview" + "description": "Version of the API to be used with the client request (e.g. '2020-06-01')." + }, + "subscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "description": "Azure Subscription ID.", + "required": true, + "type": "string" + }, + "resourceGroupNameParameter": { + "name": "resourceGroupName", + "in": "path", + "description": "Azure Resource Group Name.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" }, "billingAccountIdParameter": { "name": "billingAccountId", "in": "path", - "description": "Billing Account ID or Enrollment Number", + "description": "BillingAccount ID", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "managementGroupIdParameter": { + "name": "managementGroupId", + "in": "path", + "description": "ManagementGroup ID", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "departmentIdParameter": { + "name": "departmentId", + "in": "path", + "description": "Department ID", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "enrollmentAccountIdParameter": { + "name": "enrollmentAccountId", + "in": "path", + "description": "Enrollment Account ID", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "exportNameParameter": { + "name": "exportName", + "in": "path", + "description": "Export Name.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "externalCloudProviderTypeParameter": { + "name": "externalCloudProviderType", + "in": "path", "required": true, "type": "string", + "enum": [ + "externalSubscriptions", + "externalBillingAccounts" + ], + "x-ms-enum": { + "name": "externalCloudProviderType", + "modelAsString": true + }, + "description": "The external cloud provider type associated with dimension/query operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account.", "x-ms-parameter-location": "method" }, - "ruleNameParameter": { - "name": "ruleName", + "externalCloudProviderIdParameter": { + "name": "externalCloudProviderId", "in": "path", - "description": "Cost allocation rule name. The name cannot include spaces or any non alphanumeric characters other than '_' and '-'. The max length is 260 characters.", "required": true, "type": "string", + "description": "This can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations.", "x-ms-parameter-location": "method" + }, + "alertIdParameter": { + "name": "alertId", + "in": "path", + "description": "Alert ID", + "required": true, + "type": "string", + "x-ms-parameter-location": "method", + "x-ms-skip-url-encoding": true } } } diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountAlerts.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountAlerts.json new file mode 100644 index 000000000000..8a6b536c3278 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountAlerts.json @@ -0,0 +1,98 @@ +{ + "parameters": { + "api-version": "2018-08-01-preview", + "billingAccountId": "12345:6789", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/providers/Microsoft.CostManagement/alerts/00000000-0000-0000-0000-000000000000", + "name": "00000000-0000-0000-0000-000000000000", + "type": "Microsoft.CostManagement/alerts", + "properties": { + "definition": { + "type": "Budget", + "category": "Cost", + "criteria": "CostThresholdExceeded" + }, + "description": "", + "source": "Preset", + "details": { + "timeGrainType": "Quarterly", + "periodStartDate": "2020-03-01T00:00:00Z", + "triggeredBy": "00000000-0000-0000-0000-000000000000_1_01", + "resourceGroupFilter": [], + "resourceFilter": [], + "meterFilter": [], + "tagFilter": {}, + "threshold": 0.8, + "operator": "GreaterThan", + "amount": 200000.0, + "unit": "USD", + "currentSpend": 161000.12, + "contactEmails": [ + "1234@contoso.com" + ], + "contactGroups": [], + "contactRoles": [], + "overridingAlert": null + }, + "costEntityId": "budget1", + "status": "Active", + "creationTime": "2020-04-27T11:07:52.7143901Z", + "closeTime": "0001-01-01T00:00:00", + "modificationTime": "2020-04-28T11:06:02.8999373Z", + "statusModificationUserName": null, + "statusModificationTime": "0001-01-01T00:00:00" + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/providers/Microsoft.CostManagement/alerts/11111111-1111-1111-111111111111", + "name": "11111111-1111-1111-111111111111", + "type": "Microsoft.CostManagement/alerts", + "properties": { + "definition": { + "type": "Budget", + "category": "Cost", + "criteria": "CostThresholdExceeded" + }, + "description": "", + "source": "Preset", + "details": { + "timeGrainType": "Quarterly", + "periodStartDate": "2020-03-01T00:00:00Z", + "triggeredBy": "11111111-1111-1111-111111111111_1_01", + "resourceGroupFilter": [], + "resourceFilter": [], + "meterFilter": [], + "tagFilter": {}, + "threshold": 0.8, + "operator": "GreaterThan", + "amount": 200000.0, + "unit": "USD", + "currentSpend": 171000.32, + "contactEmails": [ + "1234@contoso.com" + ], + "contactGroups": [], + "contactRoles": [], + "overridingAlert": null + }, + "costEntityId": "budget1", + "status": "Active", + "creationTime": "2019-06-24T05:51:52.8713179Z", + "closeTime": "0001-01-01T00:00:00", + "modificationTime": "2019-08-31T17:51:55.1808807Z", + "statusModificationUserName": null, + "statusModificationTime": "0001-01-01T00:00:00" + } + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountDimensionsList.json new file mode 100644 index 000000000000..8f2f6f365cb4 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountDimensionsList.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "billingAccountId": "100", + "scope": "providers/Microsoft.Billing/billingAccounts/100" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/100/providers/microsoft.CostManagement/dimensions_ResourceGroup_2018-05-01_2018-05-31", + "name": "dimensions_ResourceGroup_2018-05-01_2018-05-31", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/100/providers/microsoft.CostManagement/dimensions_ResourceType_2018-05-01_2018-05-31", + "name": "dimensions_ResourceType_2018-05-01_2018-05-31", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [], + "total": 37, + "category": "ResourceType", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountDimensionsListExpandAndTop.json new file mode 100644 index 000000000000..b5521f5bfb68 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountDimensionsListExpandAndTop.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "billingAccountId": "100", + "$expand": "properties/data", + "$top": 5, + "scope": "providers/Microsoft.Billing/billingAccounts/100" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/100/providers/microsoft.CostManagement/dimensions_ResourceGroup_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceGroup_2018-05-01_2018-05-31_5", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [ + "thoroetrg01", + "default-notificationhubs-westus", + "jedikeyvaultrg", + "contosocodeflow8d4a", + "noobaa" + ], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/100/providers/microsoft.CostManagement/dimensions_ResourceType_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceType_2018-05-01_2018-05-31_5", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [ + "microsoft.automation/automationaccounts", + "microsoft.databricks/workspaces", + "microsoft.dbformysql/servers", + "microsoft.containerregistry/registries", + "microsoft.search/searchservices" + ], + "total": 37, + "category": "ResourceType", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountDimensionsListWithFilter.json new file mode 100644 index 000000000000..572606fcd52a --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountDimensionsListWithFilter.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "billingAccountId": "100", + "$expand": "properties/data", + "$top": 5, + "$filter": "properties/category eq 'resourceId'", + "scope": "providers/Microsoft.Billing/billingAccounts/100" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/100/providers/microsoft.CostManagement/dimensions_ResourceId_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceId_2018-05-01_2018-05-31_5", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/urphealthaccount", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/srphytenaccount", + "/subscriptions/67e24f6b-1ec2-4c90-993a-dc2d25b00b6c/resourcegroups/defaultresourcegroup-eus/providers/microsoft.operationalinsights/workspaces/defaultworkspace-67e24f6b-1ec2-4c90-993a-dc2d25b00b6c-eus", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg-sql-ha/providers/microsoft.compute/virtualmachines/sql-4qqp1", + "/subscriptions/a98d6dc5-eb8f-46cf-8938-f1fb08f03706/resourcegroups/databricks-rg-testwsp-xijmsdubneexm/providers/microsoft.compute/disks/488cdb42bf74474a98075415be3f806c-containerrootvolume" + ], + "total": 1409, + "category": "ResourceId", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource Id", + "filterEnabled": true, + "groupingEnabled": true, + "nextLink": "http://management.azure.com/providers/Microsoft.Billing/billingAccounts/100/providers/Microsoft.CostManagement/Dimensions?$filter=properties/category eq 'resourceId'&$top=5&api-version=2019-10-01&$expand=properties/data&$skiptoken=AQAAAA%3D%3D" + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountForecast.json new file mode 100644 index 000000000000..02e9d2896bfd --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountForecast.json @@ -0,0 +1,117 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "billingAccountId": "12345:6789", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789", + "parameters": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "filter": { + "and": [ + { + "or": [ + { + "dimension": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimension": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + }, + "includeActualCost": false, + "includeFreshPartialCost": false + } + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/providers/Microsoft.CostManagement/query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "type": "microsoft.costmanagement/Query", + "properties": { + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/providers/Microsoft.CostManagement/Forecast?api-version=2019-10-01&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ResourceGroup", + "type": "String" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "CostStatus", + "type": "String" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 2.10333307059661, + "JapanUnifia-Trial", + 20180331, + "Forecast", + "USD" + ], + [ + 218.68795741935486, + "RVIIOT-TRIAL", + 20180331, + "Forecast", + "USD" + ], + [ + 0.14384913581657052, + "VSTSHOL-1595322048000", + 20180401, + "Forecast", + "USD" + ], + [ + 0.009865586851323632, + "gs-stms-dev", + 20180429, + "Forecast", + "USD" + ] + ] + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountQuery.json new file mode 100644 index 000000000000..80d3082985f3 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountQuery.json @@ -0,0 +1,107 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "billingAccountId": "70664866", + "scope": "providers/Microsoft.Billing/billingAccounts/70664866", + "parameters": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "filter": { + "and": [ + { + "or": [ + { + "dimension": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimension": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/70664866/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "type": "microsoft.costmanagement/Query", + "properties": { + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/providers/Microsoft.CostManagement/Query?api-version=2019-10-01&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ResourceGroup", + "type": "String" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + "JapanUnifia-Trial", + 20180331, + "USD" + ], + [ + 173.41979241290323, + "RVIIOT-TRIAL", + 20180331, + "USD" + ], + [ + 20.359416562625452, + "VSTSHOL-1595322048000", + 20180331, + "USD" + ], + [ + 0.16677720329728665, + "gs-stms-dev", + 20180331, + "USD" + ] + ] + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountQueryGrouping.json new file mode 100644 index 000000000000..cc666efa60dd --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountQueryGrouping.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "billingAccountId": "70664866", + "scope": "providers/Microsoft.Billing/billingAccounts/70664866", + "parameters": { + "type": "Usage", + "timeframe": "TheLastMonth", + "dataset": { + "granularity": "None", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [ + { + "type": "Dimension", + "name": "ResourceGroup" + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/70664866/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "type": "microsoft.costmanagement/Query", + "properties": { + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/providers/Microsoft.CostManagement/Query?api-version=2019-10-01&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ResourceGroup", + "type": "String" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + "JapanUnifia-Trial", + "USD" + ], + [ + 173.41979241290323, + "RVIIOT-TRIAL", + "USD" + ], + [ + 20.359416562625452, + "VSTSHOL-1595322048000", + "USD" + ] + ] + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingProfileAlerts.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingProfileAlerts.json new file mode 100644 index 000000000000..4c1bcb9cf37c --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingProfileAlerts.json @@ -0,0 +1,99 @@ +{ + "parameters": { + "api-version": "2018-08-01-preview", + "billingAccountId": "12345:6789", + "billingProfileId": "13579", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/providers/Microsoft.CostManagement/alerts/00000000-0000-0000-0000-000000000000", + "name": "00000000-0000-0000-0000-000000000000", + "type": "Microsoft.CostManagement/alerts", + "properties": { + "definition": { + "type": "Budget", + "category": "Cost", + "criteria": "CostThresholdExceeded" + }, + "description": "", + "source": "Preset", + "details": { + "timeGrainType": "Quarterly", + "periodStartDate": "2020-03-01T00:00:00Z", + "triggeredBy": "00000000-0000-0000-0000-000000000000_1_01", + "resourceGroupFilter": [], + "resourceFilter": [], + "meterFilter": [], + "tagFilter": {}, + "threshold": 0.8, + "operator": "GreaterThan", + "amount": 200000.0, + "unit": "USD", + "currentSpend": 161000.12, + "contactEmails": [ + "1234@contoso.com" + ], + "contactGroups": [], + "contactRoles": [], + "overridingAlert": null + }, + "costEntityId": "budget1", + "status": "Active", + "creationTime": "2020-04-27T11:07:52.7143901Z", + "closeTime": "0001-01-01T00:00:00", + "modificationTime": "2020-04-28T11:06:02.8999373Z", + "statusModificationUserName": null, + "statusModificationTime": "0001-01-01T00:00:00" + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/providers/Microsoft.CostManagement/alerts/11111111-1111-1111-111111111111", + "name": "11111111-1111-1111-111111111111", + "type": "Microsoft.CostManagement/alerts", + "properties": { + "definition": { + "type": "Budget", + "category": "Cost", + "criteria": "CostThresholdExceeded" + }, + "description": "", + "source": "Preset", + "details": { + "timeGrainType": "Quarterly", + "periodStartDate": "2020-03-01T00:00:00Z", + "triggeredBy": "11111111-1111-1111-111111111111_1_01", + "resourceGroupFilter": [], + "resourceFilter": [], + "meterFilter": [], + "tagFilter": {}, + "threshold": 0.8, + "operator": "GreaterThan", + "amount": 200000.0, + "unit": "USD", + "currentSpend": 171000.32, + "contactEmails": [ + "1234@contoso.com" + ], + "contactGroups": [], + "contactRoles": [], + "overridingAlert": null + }, + "costEntityId": "budget1", + "status": "Active", + "creationTime": "2019-06-24T05:51:52.8713179Z", + "closeTime": "0001-01-01T00:00:00", + "modificationTime": "2019-08-31T17:51:55.1808807Z", + "statusModificationUserName": null, + "statusModificationTime": "0001-01-01T00:00:00" + } + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingProfileForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingProfileForecast.json new file mode 100644 index 000000000000..7b29eb2e07db --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingProfileForecast.json @@ -0,0 +1,118 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "billingAccountId": "12345:6789", + "billingProfileId": "13579", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579", + "parameters": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "filter": { + "and": [ + { + "or": [ + { + "dimension": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimension": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + }, + "includeActualCost": false, + "includeFreshPartialCost": false + } + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/providers/Microsoft.CostManagement/query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "type": "microsoft.costmanagement/Query", + "properties": { + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/providers/Microsoft.CostManagement/Forecast?api-version=2019-10-01&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ResourceGroup", + "type": "String" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "CostStatus", + "type": "String" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 2.10333307059661, + "JapanUnifia-Trial", + 20180331, + "Forecast", + "USD" + ], + [ + 218.68795741935486, + "RVIIOT-TRIAL", + 20180331, + "Forecast", + "USD" + ], + [ + 0.14384913581657052, + "VSTSHOL-1595322048000", + 20180401, + "Forecast", + "USD" + ], + [ + 0.009865586851323632, + "gs-stms-dev", + 20180429, + "Forecast", + "USD" + ] + ] + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentAlerts.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentAlerts.json new file mode 100644 index 000000000000..31d5dd87d70d --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentAlerts.json @@ -0,0 +1,99 @@ +{ + "parameters": { + "api-version": "2018-08-01-preview", + "billingAccountId": "12345:6789", + "departmentId": "123", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/departments/123" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/departments/123/providers/Microsoft.CostManagement/alerts/00000000-0000-0000-0000-000000000000", + "name": "00000000-0000-0000-0000-000000000000", + "type": "Microsoft.CostManagement/alerts", + "properties": { + "definition": { + "type": "Budget", + "category": "Cost", + "criteria": "CostThresholdExceeded" + }, + "description": "", + "source": "Preset", + "details": { + "timeGrainType": "Quarterly", + "periodStartDate": "2020-03-01T00:00:00Z", + "triggeredBy": "00000000-0000-0000-0000-000000000000_1_01", + "resourceGroupFilter": [], + "resourceFilter": [], + "meterFilter": [], + "tagFilter": {}, + "threshold": 0.8, + "operator": "GreaterThan", + "amount": 200000.0, + "unit": "USD", + "currentSpend": 161000.12, + "contactEmails": [ + "1234@contoso.com" + ], + "contactGroups": [], + "contactRoles": [], + "overridingAlert": null + }, + "costEntityId": "budget1", + "status": "Active", + "creationTime": "2020-04-27T11:07:52.7143901Z", + "closeTime": "0001-01-01T00:00:00", + "modificationTime": "2020-04-28T11:06:02.8999373Z", + "statusModificationUserName": null, + "statusModificationTime": "0001-01-01T00:00:00" + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/departments/123/providers/Microsoft.CostManagement/alerts/11111111-1111-1111-111111111111", + "name": "11111111-1111-1111-111111111111", + "type": "Microsoft.CostManagement/alerts", + "properties": { + "definition": { + "type": "Budget", + "category": "Cost", + "criteria": "CostThresholdExceeded" + }, + "description": "", + "source": "Preset", + "details": { + "timeGrainType": "Quarterly", + "periodStartDate": "2020-03-01T00:00:00Z", + "triggeredBy": "11111111-1111-1111-111111111111_1_01", + "resourceGroupFilter": [], + "resourceFilter": [], + "meterFilter": [], + "tagFilter": {}, + "threshold": 0.8, + "operator": "GreaterThan", + "amount": 200000.0, + "unit": "USD", + "currentSpend": 171000.32, + "contactEmails": [ + "1234@contoso.com" + ], + "contactGroups": [], + "contactRoles": [], + "overridingAlert": null + }, + "costEntityId": "budget1", + "status": "Active", + "creationTime": "2019-06-24T05:51:52.8713179Z", + "closeTime": "0001-01-01T00:00:00", + "modificationTime": "2019-08-31T17:51:55.1808807Z", + "statusModificationUserName": null, + "statusModificationTime": "0001-01-01T00:00:00" + } + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentDimensionsList.json new file mode 100644 index 000000000000..4aa6dec17440 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentDimensionsList.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "billingAccountId": "100", + "departmentId": "123", + "scope": "providers/Microsoft.Billing/billingAccounts/100/departments/123" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/100/departments/123/providers/microsoft.CostManagement/dimensions_ResourceGroup_2018-05-01_2018-05-31", + "name": "dimensions_ResourceGroup_2018-05-01_2018-05-31", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/100/departments/123/providers/microsoft.CostManagement/dimensions_ResourceType_2018-05-01_2018-05-31", + "name": "dimensions_ResourceType_2018-05-01_2018-05-31", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [], + "total": 37, + "category": "ResourceType", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentDimensionsListExpandAndTop.json new file mode 100644 index 000000000000..066a3bc16f25 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentDimensionsListExpandAndTop.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "billingAccountId": "100", + "departmentId": "123", + "$expand": "properties/data", + "$top": 5, + "scope": "providers/Microsoft.Billing/billingAccounts/100/departments/123" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/100/departments/123/providers/microsoft.CostManagement/dimensions_ResourceGroup_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceGroup_2018-05-01_2018-05-31_5", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [ + "thoroetrg01", + "default-notificationhubs-westus", + "jedikeyvaultrg", + "contosocodeflow8d4a", + "noobaa" + ], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/100/departments/123/providers/microsoft.CostManagement/dimensions_ResourceType_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceType_2018-05-01_2018-05-31_5", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [ + "microsoft.automation/automationaccounts", + "microsoft.databricks/workspaces", + "microsoft.dbformysql/servers", + "microsoft.containerregistry/registries", + "microsoft.search/searchservices" + ], + "total": 37, + "category": "ResourceType", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentDimensionsListWithFilter.json new file mode 100644 index 000000000000..f486f6e36fa2 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentDimensionsListWithFilter.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "billingAccountId": "100", + "departmentId": "123", + "$expand": "properties/data", + "$top": 5, + "$filter": "properties/category eq 'resourceId'", + "scope": "providers/Microsoft.Billing/billingAccounts/100/departments/123" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/100/departments/123/providers/microsoft.CostManagement/dimensions_ResourceId_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceId_2018-05-01_2018-05-31_5", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/urphealthaccount", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/srphytenaccount", + "/subscriptions/67e24f6b-1ec2-4c90-993a-dc2d25b00b6c/resourcegroups/defaultresourcegroup-eus/providers/microsoft.operationalinsights/workspaces/defaultworkspace-67e24f6b-1ec2-4c90-993a-dc2d25b00b6c-eus", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg-sql-ha/providers/microsoft.compute/virtualmachines/sql-4qqp1", + "/subscriptions/a98d6dc5-eb8f-46cf-8938-f1fb08f03706/resourcegroups/databricks-rg-testwsp-xijmsdubneexm/providers/microsoft.compute/disks/488cdb42bf74474a98075415be3f806c-containerrootvolume" + ], + "total": 1409, + "category": "ResourceId", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource Id", + "filterEnabled": true, + "groupingEnabled": true, + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/100/departments/123/providers/Microsoft.CostManagement/Dimensions?$filter=properties/category eq 'resourceId'&$top=5&api-version=2019-10-01&$expand=properties/data&$skiptoken=AQAAAA%3D%3D" + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentForecast.json new file mode 100644 index 000000000000..affaf9d67402 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentForecast.json @@ -0,0 +1,118 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "billingAccountId": "12345:6789", + "departmentId": "123", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/departments/123", + "parameters": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "filter": { + "and": [ + { + "or": [ + { + "dimension": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimension": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + }, + "includeActualCost": false, + "includeFreshPartialCost": false + } + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/departments/123/providers/Microsoft.CostManagement/query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "type": "microsoft.costmanagement/Query", + "properties": { + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/departments/123/providers/Microsoft.CostManagement/Forecast?api-version=2019-10-01&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ResourceGroup", + "type": "String" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "CostStatus", + "type": "String" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 2.10333307059661, + "JapanUnifia-Trial", + 20180331, + "Forecast", + "USD" + ], + [ + 218.68795741935486, + "RVIIOT-TRIAL", + 20180331, + "Forecast", + "USD" + ], + [ + 0.14384913581657052, + "VSTSHOL-1595322048000", + 20180401, + "Forecast", + "USD" + ], + [ + 0.009865586851323632, + "gs-stms-dev", + 20180429, + "Forecast", + "USD" + ] + ] + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentQuery.json new file mode 100644 index 000000000000..59cd36defe51 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentQuery.json @@ -0,0 +1,108 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "billingAccountId": "70664866", + "departmentId": "123", + "scope": "providers/Microsoft.Billing/billingAccounts/100/departments/123", + "parameters": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "filter": { + "and": [ + { + "or": [ + { + "dimension": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimension": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/70664866/departments/123/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "type": "microsoft.costmanagement/Query", + "properties": { + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/departments/123/providers/Microsoft.CostManagement/Query?api-version=2019-10-01&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ResourceGroup", + "type": "String" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + "JapanUnifia-Trial", + 20180331, + "USD" + ], + [ + 173.41979241290323, + "RVIIOT-TRIAL", + 20180331, + "USD" + ], + [ + 20.359416562625452, + "VSTSHOL-1595322048000", + 20180331, + "USD" + ], + [ + 0.16677720329728665, + "gs-stms-dev", + 20180331, + "USD" + ] + ] + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentQueryGrouping.json new file mode 100644 index 000000000000..27ae96d00be2 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentQueryGrouping.json @@ -0,0 +1,70 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "billingAccountId": "70664866", + "departmentId": "123", + "scope": "providers/Microsoft.Billing/billingAccounts/100/departments/123", + "parameters": { + "type": "Usage", + "timeframe": "TheLastMonth", + "dataset": { + "granularity": "None", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [ + { + "type": "Dimension", + "name": "ResourceGroup" + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/70664866/departments/123/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "type": "microsoft.costmanagement/Query", + "properties": { + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/departments/123/providers/Microsoft.CostManagement/Query?api-version=2019-10-01&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ResourceGroup", + "type": "String" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + "JapanUnifia-Trial", + "USD" + ], + [ + 173.41979241290323, + "RVIIOT-TRIAL", + "USD" + ], + [ + 20.359416562625452, + "VSTSHOL-1595322048000", + "USD" + ] + ] + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DismissResourceGroupAlerts.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DismissResourceGroupAlerts.json new file mode 100644 index 000000000000..d72950db27ea --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DismissResourceGroupAlerts.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "api-version": "2018-08-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "ScreenSharingTest-peer", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ScreenSharingTest-peer", + "alertId": "22222222-2222-2222-2222-222222222222", + "parameters": { + "properties": { + "status": "Dismissed" + } + } + }, + "responses": { + "200": { + "body": { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ScreenSharingTest-peer/providers/Microsoft.CostManagement/alerts/22222222-2222-2222-2222-222222222222", + "name": "22222222-2222-2222-2222-222222222222", + "type": "Microsoft.CostManagement/alerts", + "properties": { + "definition": { + "type": "Budget", + "category": "Cost", + "criteria": "CostThresholdExceeded" + }, + "description": "", + "source": "Preset", + "details": { + "timeGrainType": "Quarterly", + "periodStartDate": "2020-03-01T00:00:00Z", + "triggeredBy": "22222222-2222-2222-2222-222222222222_1_01", + "resourceGroupFilter": [], + "resourceFilter": [], + "meterFilter": [], + "tagFilter": {}, + "threshold": 0.8, + "operator": "GreaterThan", + "amount": 200000.0, + "unit": "USD", + "currentSpend": 161000.12, + "contactEmails": [ + "1234@contoso.com" + ], + "contactGroups": [], + "contactRoles": [], + "overridingAlert": null + }, + "costEntityId": "budget1", + "status": "Dismissed", + "creationTime": "2020-04-27T11:07:52.7143901Z", + "closeTime": "0001-01-01T00:00:00", + "modificationTime": "2020-04-28T11:06:02.8999373Z", + "statusModificationUserName": null, + "statusModificationTime": "0001-01-01T00:00:00" + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DismissSubscriptionAlerts.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DismissSubscriptionAlerts.json new file mode 100644 index 000000000000..2b9751ea4241 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DismissSubscriptionAlerts.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "api-version": "2018-08-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "alertId": "22222222-2222-2222-2222-222222222222", + "parameters": { + "properties": { + "status": "Dismissed" + } + } + }, + "responses": { + "200": { + "body": { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/alerts/22222222-2222-2222-2222-222222222222", + "name": "22222222-2222-2222-2222-222222222222", + "type": "Microsoft.CostManagement/alerts", + "properties": { + "definition": { + "type": "Budget", + "category": "Cost", + "criteria": "CostThresholdExceeded" + }, + "description": "", + "source": "Preset", + "details": { + "timeGrainType": "Quarterly", + "periodStartDate": "2020-03-01T00:00:00Z", + "triggeredBy": "22222222-2222-2222-2222-222222222222_1_01", + "resourceGroupFilter": [], + "resourceFilter": [], + "meterFilter": [], + "tagFilter": {}, + "threshold": 0.8, + "operator": "GreaterThan", + "amount": 200000.0, + "unit": "USD", + "currentSpend": 161000.12, + "contactEmails": [ + "1234@contoso.com" + ], + "contactGroups": [], + "contactRoles": [], + "overridingAlert": null + }, + "costEntityId": "budget1", + "status": "Dismissed", + "creationTime": "2020-04-27T11:07:52.7143901Z", + "closeTime": "0001-01-01T00:00:00", + "modificationTime": "2020-04-28T11:06:02.8999373Z", + "statusModificationUserName": null, + "statusModificationTime": "0001-01-01T00:00:00" + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountAlerts.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountAlerts.json new file mode 100644 index 000000000000..eff8e650fe77 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountAlerts.json @@ -0,0 +1,99 @@ +{ + "parameters": { + "api-version": "2018-08-01-preview", + "billingAccountId": "12345:6789", + "enrollmentAccountId": "456", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/enrollmentAccounts/456" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/enrollmentAccounts/456/providers/Microsoft.CostManagement/alerts/00000000-0000-0000-0000-000000000000", + "name": "00000000-0000-0000-0000-000000000000", + "type": "Microsoft.CostManagement/alerts", + "properties": { + "definition": { + "type": "Budget", + "category": "Cost", + "criteria": "CostThresholdExceeded" + }, + "description": "", + "source": "Preset", + "details": { + "timeGrainType": "Quarterly", + "periodStartDate": "2020-03-01T00:00:00Z", + "triggeredBy": "00000000-0000-0000-0000-000000000000_1_01", + "resourceGroupFilter": [], + "resourceFilter": [], + "meterFilter": [], + "tagFilter": {}, + "threshold": 0.8, + "operator": "GreaterThan", + "amount": 200000.0, + "unit": "USD", + "currentSpend": 161000.12, + "contactEmails": [ + "1234@contoso.com" + ], + "contactGroups": [], + "contactRoles": [], + "overridingAlert": null + }, + "costEntityId": "budget1", + "status": "Active", + "creationTime": "2020-04-27T11:07:52.7143901Z", + "closeTime": "0001-01-01T00:00:00", + "modificationTime": "2020-04-28T11:06:02.8999373Z", + "statusModificationUserName": null, + "statusModificationTime": "0001-01-01T00:00:00" + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/enrollmentAccounts/456/providers/Microsoft.CostManagement/alerts/11111111-1111-1111-111111111111", + "name": "11111111-1111-1111-111111111111", + "type": "Microsoft.CostManagement/alerts", + "properties": { + "definition": { + "type": "Budget", + "category": "Cost", + "criteria": "CostThresholdExceeded" + }, + "description": "", + "source": "Preset", + "details": { + "timeGrainType": "Quarterly", + "periodStartDate": "2020-03-01T00:00:00Z", + "triggeredBy": "11111111-1111-1111-111111111111_1_01", + "resourceGroupFilter": [], + "resourceFilter": [], + "meterFilter": [], + "tagFilter": {}, + "threshold": 0.8, + "operator": "GreaterThan", + "amount": 200000.0, + "unit": "USD", + "currentSpend": 171000.32, + "contactEmails": [ + "1234@contoso.com" + ], + "contactGroups": [], + "contactRoles": [], + "overridingAlert": null + }, + "costEntityId": "budget1", + "status": "Active", + "creationTime": "2019-06-24T05:51:52.8713179Z", + "closeTime": "0001-01-01T00:00:00", + "modificationTime": "2019-08-31T17:51:55.1808807Z", + "statusModificationUserName": null, + "statusModificationTime": "0001-01-01T00:00:00" + } + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountDimensionsList.json new file mode 100644 index 000000000000..1c23de80068c --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountDimensionsList.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "billingAccountId": "100", + "enrollmentAccountId": "456", + "scope": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/microsoft.CostManagement/dimensions_ResourceGroup_2018-05-01_2018-05-31", + "name": "dimensions_ResourceGroup_2018-05-01_2018-05-31", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/microsoft.CostManagement/dimensions_ResourceType_2018-05-01_2018-05-31", + "name": "dimensions_ResourceType_2018-05-01_2018-05-31", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [], + "total": 37, + "category": "ResourceType", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountDimensionsListExpandAndTop.json new file mode 100644 index 000000000000..98551eb4e953 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountDimensionsListExpandAndTop.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "billingAccountId": "100", + "enrollmentAccountId": "456", + "$expand": "properties/data", + "$top": 5, + "scope": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/microsoft.CostManagement/dimensions_ResourceGroup_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceGroup_2018-05-01_2018-05-31_5", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [ + "thoroetrg01", + "default-notificationhubs-westus", + "jedikeyvaultrg", + "contosocodeflow8d4a", + "noobaa" + ], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/microsoft.CostManagement/dimensions_ResourceType_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceType_2018-05-01_2018-05-31_5", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [ + "microsoft.automation/automationaccounts", + "microsoft.databricks/workspaces", + "microsoft.dbformysql/servers", + "microsoft.containerregistry/registries", + "microsoft.search/searchservices" + ], + "total": 37, + "category": "ResourceType", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountDimensionsListWithFilter.json new file mode 100644 index 000000000000..7de518cb7769 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountDimensionsListWithFilter.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "billingAccountId": "100", + "enrollmentAccountId": "456", + "$expand": "properties/data", + "$top": 5, + "$filter": "properties/category eq 'resourceId'", + "scope": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/microsoft.CostManagement/dimensions_ResourceId_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceId_2018-05-01_2018-05-31_5", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/urphealthaccount", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/srphytenaccount", + "/subscriptions/67e24f6b-1ec2-4c90-993a-dc2d25b00b6c/resourcegroups/defaultresourcegroup-eus/providers/microsoft.operationalinsights/workspaces/defaultworkspace-67e24f6b-1ec2-4c90-993a-dc2d25b00b6c-eus", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg-sql-ha/providers/microsoft.compute/virtualmachines/sql-4qqp1", + "/subscriptions/a98d6dc5-eb8f-46cf-8938-f1fb08f03706/resourcegroups/databricks-rg-testwsp-xijmsdubneexm/providers/microsoft.compute/disks/488cdb42bf74474a98075415be3f806c-containerrootvolume" + ], + "total": 1409, + "category": "ResourceId", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource Id", + "filterEnabled": true, + "groupingEnabled": true, + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/Microsoft.CostManagement/Dimensions?$filter=properties/category eq 'resourceId'&$top=5&api-version=2019-10-01&$expand=properties/data&$skiptoken=AQAAAA%3D%3D" + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountForecast.json new file mode 100644 index 000000000000..f7673b462b25 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountForecast.json @@ -0,0 +1,118 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "billingAccountId": "12345:6789", + "enrollmentAccountId": "456", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/enrollmentAccounts/456", + "parameters": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "filter": { + "and": [ + { + "or": [ + { + "dimension": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimension": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + }, + "includeActualCost": false, + "includeFreshPartialCost": false + } + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/enrollmentAccounts/456/providers/Microsoft.CostManagement/query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "type": "microsoft.costmanagement/Query", + "properties": { + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/enrollmentAccounts/456/providers/Microsoft.CostManagement/Forecast?api-version=2019-10-01&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ResourceGroup", + "type": "String" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "CostStatus", + "type": "String" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 2.10333307059661, + "JapanUnifia-Trial", + 20180331, + "Forecast", + "USD" + ], + [ + 218.68795741935486, + "RVIIOT-TRIAL", + 20180331, + "Forecast", + "USD" + ], + [ + 0.14384913581657052, + "VSTSHOL-1595322048000", + 20180401, + "Forecast", + "USD" + ], + [ + 0.009865586851323632, + "gs-stms-dev", + 20180429, + "Forecast", + "USD" + ] + ] + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountQuery.json new file mode 100644 index 000000000000..d8adb4734eea --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountQuery.json @@ -0,0 +1,108 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "billingAccountId": "70664866", + "enrollmentAccountId": "456", + "scope": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456", + "parameters": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "filter": { + "and": [ + { + "or": [ + { + "dimension": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimension": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/70664866/enrollmentAccounts/456/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "type": "microsoft.costmanagement/Query", + "properties": { + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/enrollmentAccounts/456/providers/Microsoft.CostManagement/Query?api-version=2019-10-01&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ResourceGroup", + "type": "String" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + "JapanUnifia-Trial", + 20180331, + "USD" + ], + [ + 173.41979241290323, + "RVIIOT-TRIAL", + 20180331, + "USD" + ], + [ + 20.359416562625452, + "VSTSHOL-1595322048000", + 20180331, + "USD" + ], + [ + 0.16677720329728665, + "gs-stms-dev", + 20180331, + "USD" + ] + ] + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountQueryGrouping.json new file mode 100644 index 000000000000..34d2421e5a3a --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountQueryGrouping.json @@ -0,0 +1,77 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "billingAccountId": "70664866", + "enrollmentAccountId": "456", + "scope": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456", + "parameters": { + "type": "Usage", + "timeframe": "TheLastMonth", + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [ + { + "type": "Dimension", + "name": "ResourceGroup" + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/70664866/enrollmentAccounts/456/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "type": "microsoft.costmanagement/Query", + "properties": { + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/enrollmentAccounts/456/providers/Microsoft.CostManagement/Query?api-version=2019-10-01&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ResourceGroup", + "type": "String" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + "JapanUnifia-Trial", + 20180331, + "USD" + ], + [ + 173.41979241290323, + "RVIIOT-TRIAL", + 20180331, + "USD" + ], + [ + 20.359416562625452, + "VSTSHOL-1595322048000", + 20180331, + "USD" + ] + ] + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportCreateOrUpdateByBillingAccount.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportCreateOrUpdateByBillingAccount.json new file mode 100644 index 000000000000..64869be56a4e --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportCreateOrUpdateByBillingAccount.json @@ -0,0 +1,128 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "billingAccountId": "123456", + "scope": "providers/Microsoft.Billing/billingAccounts/123456", + "exportName": "TestExport", + "parameters": { + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "MonthToDate", + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + }, + "responses": { + "201": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.CostManagement/exports/TestExport", + "name": "TestExport", + "type": "Microsoft.CostManagement/exports", + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "MonthToDate", + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + }, + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.CostManagement/exports/TestExport", + "name": "TestExport", + "type": "Microsoft.CostManagement/exports", + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "MonthToDate", + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportCreateOrUpdateByDepartment.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportCreateOrUpdateByDepartment.json new file mode 100644 index 000000000000..1f118968e004 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportCreateOrUpdateByDepartment.json @@ -0,0 +1,129 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "billingAccountId": "12", + "departmentId": "1234", + "scope": "providers/Microsoft.Billing/billingAccounts/12/departments/1234", + "exportName": "TestExport", + "parameters": { + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "MonthToDate", + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + }, + "responses": { + "201": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/12/departments/1234/providers/Microsoft.CostManagement/exports/TestExport", + "name": "TestExport", + "type": "Microsoft.CostManagement/exports", + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "MonthToDate", + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + }, + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/12/departments/1234/providers/Microsoft.CostManagement/exports/TestExport", + "name": "TestExport", + "type": "Microsoft.CostManagement/exports", + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "MonthToDate", + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportCreateOrUpdateByEnrollmentAccount.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportCreateOrUpdateByEnrollmentAccount.json new file mode 100644 index 000000000000..b829ecc1d0eb --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportCreateOrUpdateByEnrollmentAccount.json @@ -0,0 +1,129 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "billingAccountId": "100", + "enrollmentAccountId": "456", + "scope": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456", + "exportName": "TestExport", + "parameters": { + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "MonthToDate", + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + }, + "responses": { + "201": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/Microsoft.CostManagement/exports/TestExport", + "name": "TestExport", + "type": "Microsoft.CostManagement/exports", + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "MonthToDate", + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + }, + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/Microsoft.CostManagement/exports/TestExport", + "name": "TestExport", + "type": "Microsoft.CostManagement/exports", + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "MonthToDate", + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportCreateOrUpdateByManagementGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportCreateOrUpdateByManagementGroup.json new file mode 100644 index 000000000000..5bc26d149df5 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportCreateOrUpdateByManagementGroup.json @@ -0,0 +1,128 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "managementGroupId": "TestMG", + "scope": "providers/Microsoft.Management/managementGroups/TestMG", + "exportName": "TestExport", + "parameters": { + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "MonthToDate", + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + }, + "responses": { + "201": { + "body": { + "id": "providers/Microsoft.Management/managementGroups/TestMG/providers/Microsoft.CostManagement/exports/TestExport", + "name": "TestExport", + "type": "Microsoft.CostManagement/exports", + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "MonthToDate", + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + }, + "200": { + "body": { + "id": "providers/Microsoft.Management/managementGroups/TestMG/providers/Microsoft.CostManagement/exports/TestExport", + "name": "TestExport", + "type": "Microsoft.CostManagement/exports", + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "MonthToDate", + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportCreateOrUpdateByResourceGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportCreateOrUpdateByResourceGroup.json new file mode 100644 index 000000000000..fa215b9ff077 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportCreateOrUpdateByResourceGroup.json @@ -0,0 +1,129 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "MYDEVTESTRG", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", + "exportName": "TestExport", + "parameters": { + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "MonthToDate", + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + }, + "responses": { + "201": { + "body": { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/exports/TestExport", + "name": "TestExport", + "type": "Microsoft.CostManagement/exports", + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "MonthToDate", + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + }, + "200": { + "body": { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/exports/TestExport", + "name": "TestExport", + "type": "Microsoft.CostManagement/exports", + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "MonthToDate", + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportCreateOrUpdateBySubscription.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportCreateOrUpdateBySubscription.json new file mode 100644 index 000000000000..22592d3bfc96 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportCreateOrUpdateBySubscription.json @@ -0,0 +1,128 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "exportName": "TestExport", + "parameters": { + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "MonthToDate", + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + }, + "responses": { + "201": { + "body": { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/exports/TestExport", + "name": "TestExport", + "type": "Microsoft.CostManagement/exports", + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "MonthToDate", + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + }, + "200": { + "body": { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/exports/TestExport", + "name": "TestExport", + "type": "Microsoft.CostManagement/exports", + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "MonthToDate", + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportDeleteByBillingAccount.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportDeleteByBillingAccount.json new file mode 100644 index 000000000000..723a1b70c13d --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportDeleteByBillingAccount.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "billingAccountId": "123456", + "scope": "providers/Microsoft.Billing/billingAccounts/123456", + "exportName": "TestExport" + }, + "responses": { + "200": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportDeleteByDepartment.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportDeleteByDepartment.json new file mode 100644 index 000000000000..9bff0064a096 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportDeleteByDepartment.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "billingAccountId": "12", + "departmentId": "1234", + "scope": "providers/Microsoft.Billing/billingAccounts/12/departments/1234", + "exportName": "TestExport" + }, + "responses": { + "200": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportDeleteByEnrollmentAccount.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportDeleteByEnrollmentAccount.json new file mode 100644 index 000000000000..a9caf9fa5729 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportDeleteByEnrollmentAccount.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "billingAccountId": "100", + "enrollmentAccountId": "456", + "scope": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456", + "exportName": "TestExport" + }, + "responses": { + "200": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportDeleteByManagementGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportDeleteByManagementGroup.json new file mode 100644 index 000000000000..d0d9845db934 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportDeleteByManagementGroup.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "managementGroupId": "TestMG", + "scope": "providers/Microsoft.Management/managementGroups/TestMG", + "exportName": "TestExport" + }, + "responses": { + "200": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportDeleteByResourceGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportDeleteByResourceGroup.json new file mode 100644 index 000000000000..430c0b81c4b2 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportDeleteByResourceGroup.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "MYDEVTESTRG", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", + "exportName": "TestExport" + }, + "responses": { + "200": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportDeleteBySubscription.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportDeleteBySubscription.json new file mode 100644 index 000000000000..74d07239431b --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportDeleteBySubscription.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "exportName": "TestExport" + }, + "responses": { + "200": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportGetByBillingAccount.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportGetByBillingAccount.json new file mode 100644 index 000000000000..bb66830c00b6 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportGetByBillingAccount.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "billingAccountId": "123456", + "scope": "providers/Microsoft.Billing/billingAccounts/123456", + "exportName": "TestExport" + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/{billingAccount-Id}/providers/Microsoft.CostManagement/exports/TestExport", + "name": "TestExport", + "type": "Microsoft.CostManagement/exports", + "properties": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "Custom", + "timePeriod": { + "from": "2020-05-01T00:00:00Z", + "to": "2020-05-31T00:00:00Z" + }, + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportGetByDepartment.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportGetByDepartment.json new file mode 100644 index 000000000000..415eef4ef834 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportGetByDepartment.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "billingAccountId": "12", + "departmentId": "1234", + "scope": "providers/Microsoft.Billing/billingAccounts/12/departments/1234", + "exportName": "TestExport" + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/12/departments/1234/providers/Microsoft.CostManagement/exports/TestExport", + "name": "TestExport", + "type": "Microsoft.CostManagement/exports", + "properties": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "Custom", + "timePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-06-30T00:00:00Z" + }, + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportGetByEnrollmentAccount.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportGetByEnrollmentAccount.json new file mode 100644 index 000000000000..92d21fd96154 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportGetByEnrollmentAccount.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "billingAccountId": "100", + "enrollmentAccountId": "456", + "scope": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456", + "exportName": "TestExport" + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/Microsoft.CostManagement/exports/TestExport", + "name": "TestExport", + "type": "Microsoft.CostManagement/exports", + "properties": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "Custom", + "timePeriod": { + "from": "2019-09-01T00:00:00Z", + "to": "2019-10-31T00:00:00Z" + }, + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportGetByManagementGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportGetByManagementGroup.json new file mode 100644 index 000000000000..d8df71f3ddba --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportGetByManagementGroup.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "managementGroupId": "TestMG", + "scope": "providers/Microsoft.Management/managementGroups/TestMG", + "exportName": "TestExport" + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Management/managementGroups/TestMG/providers/Microsoft.CostManagement/exports/TestExport", + "name": "TestExport", + "type": "Microsoft.CostManagement/exports", + "properties": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "Custom", + "timePeriod": { + "from": "2019-09-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + }, + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "UsageDate", + "MeterId", + "InstanceId", + "ResourceLocation", + "UsageQuantity" + ] + } + } + } + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportGetByResourceGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportGetByResourceGroup.json new file mode 100644 index 000000000000..58dacbf4d372 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportGetByResourceGroup.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "MYDEVTESTRG", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", + "exportName": "TestExport" + }, + "responses": { + "200": { + "body": { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/exports/TestExport", + "name": "TestExport", + "type": "Microsoft.CostManagement/exports", + "properties": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "Custom", + "timePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-06-30T00:00:00Z" + }, + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportGetBySubscription.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportGetBySubscription.json new file mode 100644 index 000000000000..b3c6a550c6f4 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportGetBySubscription.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "exportName": "TestExport" + }, + "responses": { + "200": { + "body": { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/exports/TestExport", + "name": "TestExport", + "type": "Microsoft.CostManagement/exports", + "properties": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "Custom", + "timePeriod": { + "from": "2019-06-01T00:00:00Z", + "to": "2019-07-31T00:00:00Z" + }, + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunByBillingAccount.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunByBillingAccount.json new file mode 100644 index 000000000000..723a1b70c13d --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunByBillingAccount.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "billingAccountId": "123456", + "scope": "providers/Microsoft.Billing/billingAccounts/123456", + "exportName": "TestExport" + }, + "responses": { + "200": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunByDepartment.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunByDepartment.json new file mode 100644 index 000000000000..9bff0064a096 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunByDepartment.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "billingAccountId": "12", + "departmentId": "1234", + "scope": "providers/Microsoft.Billing/billingAccounts/12/departments/1234", + "exportName": "TestExport" + }, + "responses": { + "200": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunByEnrollmentAccount.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunByEnrollmentAccount.json new file mode 100644 index 000000000000..a9caf9fa5729 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunByEnrollmentAccount.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "billingAccountId": "100", + "enrollmentAccountId": "456", + "scope": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456", + "exportName": "TestExport" + }, + "responses": { + "200": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunByManagementGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunByManagementGroup.json new file mode 100644 index 000000000000..d0d9845db934 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunByManagementGroup.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "managementGroupId": "TestMG", + "scope": "providers/Microsoft.Management/managementGroups/TestMG", + "exportName": "TestExport" + }, + "responses": { + "200": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunByResourceGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunByResourceGroup.json new file mode 100644 index 000000000000..430c0b81c4b2 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunByResourceGroup.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "MYDEVTESTRG", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", + "exportName": "TestExport" + }, + "responses": { + "200": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunBySubscription.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunBySubscription.json new file mode 100644 index 000000000000..74d07239431b --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunBySubscription.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "exportName": "TestExport" + }, + "responses": { + "200": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunHistoryGetByBillingAccount.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunHistoryGetByBillingAccount.json new file mode 100644 index 000000000000..23d2afb0ba7c --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunHistoryGetByBillingAccount.json @@ -0,0 +1,100 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "billingAccountId": "123456", + "scope": "providers/Microsoft.Billing/billingAccounts/123456", + "exportName": "TestExport" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/{billingAccount-id}/providers/Microsoft.CostManagement/exports/JohnDoeSchedule/Run/1e25d58a-a3b0-4916-9542-6e04a89bc100", + "properties": { + "executionType": "OnDemand", + "status": "Completed", + "submittedBy": "john.doe@gmail.com", + "submittedTime": "2018-08-03T07:52:15.6016681Z", + "processingStartTime": "2018-08-03T07:52:16.9123797Z", + "processingEndTime": "2018-08-03T07:52:28.0373318Z", + "fileName": "ScheduledTestsForJohnDoe/JohnDoeSchedule/20180729-20180804/JohnDoeSchedule_1e25d58a-a3b0-4916-9542-6e04a89bc100.csv", + "runSettings": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ScheduledTestsForJohnDoe" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "Custom", + "timePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + }, + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/{billingAccount-id}/providers/Microsoft.CostManagement/exports/JohnDoeSchedule/Run/11ac6811-dca3-46ad-b326-4704cf0c58ef", + "properties": { + "executionType": "Scheduled", + "status": "Completed", + "submittedBy": "System", + "submittedTime": "2018-08-03T09:03:58.5710244Z", + "processingStartTime": "2018-08-03T09:03:58.5710244Z", + "processingEndTime": "2018-08-03T09:04:19.7223808Z", + "fileName": "ScheduledTestsForJohnDoe/JohnDoeSchedule/20180729-20180804/JohnDoeSchedule_11ac6811-dca3-46ad-b326-4704cf0c58ef.csv", + "runSettings": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ScheduledTestsForJohnDoe" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "Custom", + "timePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + }, + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunHistoryGetByDepartment.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunHistoryGetByDepartment.json new file mode 100644 index 000000000000..5812ec43b27f --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunHistoryGetByDepartment.json @@ -0,0 +1,101 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "billingAccountId": "12", + "departmentId": "1234", + "scope": "providers/Microsoft.Billing/billingAccounts/12/departments/1234", + "exportName": "TestExport" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/12/departments/1234/providers/Microsoft.CostManagement/exports/JohnDoeSchedule/Run/1e25d58a-a3b0-4916-9542-6e04a89bc100", + "properties": { + "executionType": "OnDemand", + "status": "Completed", + "submittedBy": "john.doe@gmail.com", + "submittedTime": "2018-08-03T07:52:15.6016681Z", + "processingStartTime": "2018-08-03T07:52:16.9123797Z", + "processingEndTime": "2018-08-03T07:52:28.0373318Z", + "fileName": "ScheduledTestsForJohnDoe/JohnDoeSchedule/20180729-20180804/JohnDoeSchedule_1e25d58a-a3b0-4916-9542-6e04a89bc100.csv", + "runSettings": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ScheduledTestsForJohnDoe" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "Custom", + "timePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + }, + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/12/departments/1234/providers/Microsoft.CostManagement/exports/JohnDoeSchedule/Run/11ac6811-dca3-46ad-b326-4704cf0c58ef", + "properties": { + "executionType": "Scheduled", + "status": "Completed", + "submittedBy": "System", + "submittedTime": "2018-08-03T09:03:58.5710244Z", + "processingStartTime": "2018-08-03T09:03:58.5710244Z", + "processingEndTime": "2018-08-03T09:04:19.7223808Z", + "fileName": "ScheduledTestsForJohnDoe/JohnDoeSchedule/20180729-20180804/JohnDoeSchedule_11ac6811-dca3-46ad-b326-4704cf0c58ef.csv", + "runSettings": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ScheduledTestsForJohnDoe" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "Custom", + "timePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + }, + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunHistoryGetByEnrollmentAccount.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunHistoryGetByEnrollmentAccount.json new file mode 100644 index 000000000000..3cc2d9bdd01e --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunHistoryGetByEnrollmentAccount.json @@ -0,0 +1,101 @@ +{ + "parameters": { + "api-version": "2019-01-01", + "billingAccountId": "100", + "enrollmentAccountId": "456", + "scope": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456", + "exportName": "TestExport" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/Microsoft.CostManagement/exports/JohnDoeSchedule/Run/1e25d58a-a3b0-4916-9542-6e04a89bc100", + "properties": { + "executionType": "OnDemand", + "status": "Completed", + "submittedBy": "john.doe@gmail.com", + "submittedTime": "2018-08-03T07:52:15.6016681Z", + "processingStartTime": "2018-08-03T07:52:16.9123797Z", + "processingEndTime": "2018-08-03T07:52:28.0373318Z", + "fileName": "ScheduledTestsForJohnDoe/JohnDoeSchedule/20180729-20180804/JohnDoeSchedule_1e25d58a-a3b0-4916-9542-6e04a89bc100.csv", + "runSettings": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ScheduledTestsForJohnDoe" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "Custom", + "timePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + }, + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/Microsoft.CostManagement/exports/JohnDoeSchedule/Run/11ac6811-dca3-46ad-b326-4704cf0c58ef", + "properties": { + "executionType": "Scheduled", + "status": "Completed", + "submittedBy": "System", + "submittedTime": "2018-08-03T09:03:58.5710244Z", + "processingStartTime": "2018-08-03T09:03:58.5710244Z", + "processingEndTime": "2018-08-03T09:04:19.7223808Z", + "fileName": "ScheduledTestsForJohnDoe/JohnDoeSchedule/20180729-20180804/JohnDoeSchedule_11ac6811-dca3-46ad-b326-4704cf0c58ef.csv", + "runSettings": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ScheduledTestsForJohnDoe" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "Custom", + "timePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + }, + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunHistoryGetByManagementGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunHistoryGetByManagementGroup.json new file mode 100644 index 000000000000..d271d702dd30 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunHistoryGetByManagementGroup.json @@ -0,0 +1,100 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "managementGroupId": "TestMG", + "scope": "providers/Microsoft.Management/managementGroups/TestMG", + "exportName": "TestExport" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Management/managementGroups/TestMG/providers/Microsoft.CostManagement/exports/TestExport/Run/1e25d58a-a3b0-4916-9542-6e04a89bc100", + "properties": { + "executionType": "OnDemand", + "status": "Completed", + "submittedBy": "john.doe@gmail.com", + "submittedTime": "2018-08-03T07:52:15.6016681Z", + "processingStartTime": "2018-08-03T07:52:16.9123797Z", + "processingEndTime": "2018-08-03T07:52:28.0373318Z", + "fileName": "ScheduledForTestExport/TestExportSchedule/20180729-20180804/TestExportSchedule_1e25d58a-a3b0-4916-9542-6e04a89bc100.csv", + "runSettings": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ScheduledTestsForJohnDoe" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "Custom", + "timePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + }, + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + }, + { + "id": "providers/Microsoft.Management/managementGroups/TestMG/providers/Microsoft.CostManagement/exports/TestExport/Run/11ac6811-dca3-46ad-b326-4704cf0c58ef", + "properties": { + "executionType": "Scheduled", + "status": "Completed", + "submittedBy": "System", + "submittedTime": "2018-08-03T09:03:58.5710244Z", + "processingStartTime": "2018-08-03T09:03:58.5710244Z", + "processingEndTime": "2018-08-03T09:04:19.7223808Z", + "fileName": "ScheduledForTestExport/TestExportSchedule/20180729-20180804/TestExportSchedule_11ac6811-dca3-46ad-b326-4704cf0c58ef.csv", + "runSettings": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ScheduledTestsForJohnDoe" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "Custom", + "timePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + }, + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunHistoryGetByResourceGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunHistoryGetByResourceGroup.json new file mode 100644 index 000000000000..b6aaae782d44 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunHistoryGetByResourceGroup.json @@ -0,0 +1,101 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "MYDEVTESTRG", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", + "exportName": "TestExport" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/exports/JohnDoeSchedule/Run/1e25d58a-a3b0-4916-9542-6e04a89bc100", + "properties": { + "executionType": "OnDemand", + "status": "Completed", + "submittedBy": "john.doe@gmail.com", + "submittedTime": "2018-08-03T07:52:15.6016681Z", + "processingStartTime": "2018-08-03T07:52:16.9123797Z", + "processingEndTime": "2018-08-03T07:52:28.0373318Z", + "fileName": "ScheduledTestsForJohnDoe/JohnDoeSchedule/20180729-20180804/JohnDoeSchedule_1e25d58a-a3b0-4916-9542-6e04a89bc100.csv", + "runSettings": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ScheduledTestsForJohnDoe" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "Custom", + "timePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + }, + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + }, + { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/exports/JohnDoeSchedule/Run/11ac6811-dca3-46ad-b326-4704cf0c58ef", + "properties": { + "executionType": "Scheduled", + "status": "Completed", + "submittedBy": "System", + "submittedTime": "2018-08-03T09:03:58.5710244Z", + "processingStartTime": "2018-08-03T09:03:58.5710244Z", + "processingEndTime": "2018-08-03T09:04:19.7223808Z", + "fileName": "ScheduledTestsForJohnDoe/JohnDoeSchedule/20180729-20180804/JohnDoeSchedule_11ac6811-dca3-46ad-b326-4704cf0c58ef.csv", + "runSettings": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ScheduledTestsForJohnDoe" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "Custom", + "timePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + }, + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunHistoryGetBySubscription.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunHistoryGetBySubscription.json new file mode 100644 index 000000000000..1dc83a7d386e --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunHistoryGetBySubscription.json @@ -0,0 +1,100 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "exportName": "TestExport" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/exports/JohnDoeSchedule/Run/1e25d58a-a3b0-4916-9542-6e04a89bc100", + "properties": { + "executionType": "OnDemand", + "status": "Completed", + "submittedBy": "john.doe@gmail.com", + "submittedTime": "2018-08-03T07:52:15.6016681Z", + "processingStartTime": "2018-08-03T07:52:16.9123797Z", + "processingEndTime": "2018-08-03T07:52:28.0373318Z", + "fileName": "ScheduledTestsForJohnDoe/JohnDoeSchedule/20180729-20180804/JohnDoeSchedule_1e25d58a-a3b0-4916-9542-6e04a89bc100.csv", + "runSettings": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ScheduledTestsForJohnDoe" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "Custom", + "timePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + }, + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + }, + { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/exports/JohnDoeSchedule/Run/11ac6811-dca3-46ad-b326-4704cf0c58ef", + "properties": { + "executionType": "Scheduled", + "status": "Completed", + "submittedBy": "System", + "submittedTime": "2018-08-03T09:03:58.5710244Z", + "processingStartTime": "2018-08-03T09:03:58.5710244Z", + "processingEndTime": "2018-08-03T09:04:19.7223808Z", + "fileName": "ScheduledTestsForJohnDoe/JohnDoeSchedule/20180729-20180804/JohnDoeSchedule_11ac6811-dca3-46ad-b326-4704cf0c58ef.csv", + "runSettings": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ScheduledTestsForJohnDoe" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "Custom", + "timePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + }, + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportsGetByBillingAccount.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportsGetByBillingAccount.json new file mode 100644 index 000000000000..e360bb9b5280 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportsGetByBillingAccount.json @@ -0,0 +1,89 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "billingAccountId": "123456", + "scope": "providers/Microsoft.Billing/billingAccounts/123456" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.CostManagement/exports/TestExport1", + "name": "TestExport1", + "type": "Microsoft.CostManagement/exports", + "properties": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "Custom", + "timePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + }, + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.CostManagement/exports/TestExport2", + "name": "TestExport2", + "type": "Microsoft.CostManagement/exports", + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "WeekToDate", + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportsGetByDepartment.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportsGetByDepartment.json new file mode 100644 index 000000000000..3bdc6e63fd5a --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportsGetByDepartment.json @@ -0,0 +1,90 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "billingAccountId": "12", + "departmentId": "1234", + "scope": "providers/Microsoft.Billing/billingAccounts/12/departments/123" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/12/departments/1234/providers/Microsoft.CostManagement/exports/TestExport1", + "name": "TestExport1", + "type": "Microsoft.CostManagement/exports", + "properties": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "Custom", + "timePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + }, + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/12/departments/1234/providers/Microsoft.CostManagement/exports/TestExport2", + "name": "TestExport2", + "type": "Microsoft.CostManagement/exports", + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "WeekToDate", + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportsGetByEnrollmentAccount.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportsGetByEnrollmentAccount.json new file mode 100644 index 000000000000..abbb4951a11e --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportsGetByEnrollmentAccount.json @@ -0,0 +1,90 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "billingAccountId": "100", + "enrollmentAccountId": "456", + "scope": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/Microsoft.CostManagement/exports/TestExport1", + "name": "TestExport1", + "type": "Microsoft.CostManagement/exports", + "properties": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "Custom", + "timePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + }, + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/Microsoft.CostManagement/exports/TestExport2", + "name": "TestExport2", + "type": "Microsoft.CostManagement/exports", + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "WeekToDate", + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportsGetByManagementGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportsGetByManagementGroup.json new file mode 100644 index 000000000000..9bf48014812b --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportsGetByManagementGroup.json @@ -0,0 +1,89 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "managementGroupId": "TestMG", + "scope": "providers/Microsoft.Management/managementGroups/TestMG" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Management/managementGroups/TestMG/providers/Microsoft.CostManagement/exports/TestExport1", + "name": "TestExport1", + "type": "Microsoft.CostManagement/exports", + "properties": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "Custom", + "timePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + }, + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + }, + { + "id": "providers/Microsoft.Management/managementGroups/TestMG/providers/Microsoft.CostManagement/exports/TestExport2", + "name": "TestExport2", + "type": "Microsoft.CostManagement/exports", + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "WeekToDate", + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportsGetByResourceGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportsGetByResourceGroup.json new file mode 100644 index 000000000000..1ba77e1fa614 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportsGetByResourceGroup.json @@ -0,0 +1,90 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "MYDEVTESTRG", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/exports/TestExport1", + "name": "TestExport1", + "type": "Microsoft.CostManagement/exports", + "properties": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "Custom", + "timePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + }, + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + }, + { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/exports/TestExport2", + "name": "TestExport2", + "type": "Microsoft.CostManagement/exports", + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "WeekToDate", + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportsGetBySubscription.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportsGetBySubscription.json new file mode 100644 index 000000000000..c842a554eca8 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportsGetBySubscription.json @@ -0,0 +1,89 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/exports/TestExport1", + "name": "TestExport1", + "type": "Microsoft.CostManagement/exports", + "properties": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "Custom", + "timePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + }, + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + }, + { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/exports/TestExport2", + "name": "TestExport2", + "type": "Microsoft.CostManagement/exports", + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "WeekToDate", + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalBillingAccountAlerts.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalBillingAccountAlerts.json new file mode 100644 index 000000000000..3172c3380a43 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalBillingAccountAlerts.json @@ -0,0 +1,98 @@ +{ + "parameters": { + "api-version": "2018-08-01-preview", + "externalCloudProviderId": "100", + "externalCloudProviderType": "externalBillingAccounts" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.CostManagement/externalBillingAccounts/100/providers/Microsoft.CostManagement/alerts/00000000-0000-0000-0000-000000000000", + "name": "00000000-0000-0000-0000-000000000000", + "type": "Microsoft.CostManagement/alerts", + "properties": { + "definition": { + "type": "Budget", + "category": "Cost", + "criteria": "CostThresholdExceeded" + }, + "description": "", + "source": "Preset", + "details": { + "timeGrainType": "Quarterly", + "periodStartDate": "2020-03-01T00:00:00Z", + "triggeredBy": "00000000-0000-0000-0000-000000000000_1_01", + "resourceGroupFilter": [], + "resourceFilter": [], + "meterFilter": [], + "tagFilter": {}, + "threshold": 0.8, + "operator": "GreaterThan", + "amount": 200000.0, + "unit": "USD", + "currentSpend": 161000.12, + "contactEmails": [ + "1234@contoso.com" + ], + "contactGroups": [], + "contactRoles": [], + "overridingAlert": null + }, + "costEntityId": "budget1", + "status": "Active", + "creationTime": "2020-04-27T11:07:52.7143901Z", + "closeTime": "0001-01-01T00:00:00", + "modificationTime": "2020-04-28T11:06:02.8999373Z", + "statusModificationUserName": null, + "statusModificationTime": "0001-01-01T00:00:00" + } + }, + { + "id": "providers/Microsoft.CostManagement/externalBillingAccounts/100/providers/Microsoft.CostManagement/alerts/11111111-1111-1111-111111111111", + "name": "11111111-1111-1111-111111111111", + "type": "Microsoft.CostManagement/alerts", + "properties": { + "definition": { + "type": "Budget", + "category": "Cost", + "criteria": "CostThresholdExceeded" + }, + "description": "", + "source": "Preset", + "details": { + "timeGrainType": "Quarterly", + "periodStartDate": "2020-03-01T00:00:00Z", + "triggeredBy": "11111111-1111-1111-111111111111_1_01", + "resourceGroupFilter": [], + "resourceFilter": [], + "meterFilter": [], + "tagFilter": {}, + "threshold": 0.8, + "operator": "GreaterThan", + "amount": 200000.0, + "unit": "USD", + "currentSpend": 171000.32, + "contactEmails": [ + "1234@contoso.com" + ], + "contactGroups": [], + "contactRoles": [], + "overridingAlert": null + }, + "costEntityId": "budget1", + "status": "Active", + "creationTime": "2019-06-24T05:51:52.8713179Z", + "closeTime": "0001-01-01T00:00:00", + "modificationTime": "2019-08-31T17:51:55.1808807Z", + "statusModificationUserName": null, + "statusModificationTime": "0001-01-01T00:00:00" + } + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalBillingAccountForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalBillingAccountForecast.json new file mode 100644 index 000000000000..b73840ab14bc --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalBillingAccountForecast.json @@ -0,0 +1,99 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "externalCloudProviderId": "100", + "externalCloudProviderType": "externalBillingAccounts", + "parameters": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "filter": { + "and": [ + { + "or": [ + { + "dimension": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimension": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.CostManagement/externalBillingAccounts/100/query/6dc7b06a-d90a-4df5-b655-ce6cf1c0814d", + "name": "6dc7b06a-d90a-4df5-b655-ce6cf1c0814d", + "type": "Microsoft.CostManagement/query", + "properties": { + "nextLink": null, + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "CostStatus", + "type": "String" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 0.0, + "Forecast", + "USD" + ], + [ + 30.2572751438, + "Forecast", + "USD" + ], + [ + 0.076757602000000022, + "Forecast", + "USD" + ], + [ + 50.430964190400012, + "Forecast", + "USD" + ] + ] + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalBillingAccountsDimensions.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalBillingAccountsDimensions.json new file mode 100644 index 000000000000..5172c0cdcdb6 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalBillingAccountsDimensions.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "externalCloudProviderId": "100", + "externalCloudProviderType": "externalBillingAccounts" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.CostManagement/externalBillingAccounts/100/dimensions_ResourceType_2019-12-01_2019-12-31", + "name": "dimensions_ResourceType_2019-12-01_2019-12-31", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [], + "total": 0, + "category": "ResourceType", + "description": "Resource type", + "usageStart": "2019-12-01T00:00:00Z", + "usageEnd": "2019-12-31T00:00:00Z", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.CostManagement/externalBillingAccounts/100/dimensions_ResourceId_2019-12-01_2019-12-31", + "name": "dimensions_ResourceId_2019-12-01_2019-12-31", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [], + "total": 0, + "category": "ResourceId", + "description": "Resource ID", + "usageStart": "2019-12-01T00:00:00Z", + "usageEnd": "2019-12-31T00:00:00Z", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalBillingAccountsQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalBillingAccountsQuery.json new file mode 100644 index 000000000000..56e1a522099c --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalBillingAccountsQuery.json @@ -0,0 +1,99 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "externalCloudProviderId": "100", + "externalCloudProviderType": "externalBillingAccounts", + "parameters": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "filter": { + "and": [ + { + "or": [ + { + "dimension": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimension": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.CostManagement/externalBillingAccounts/100/query/6dc7b06a-d90a-4df5-b655-ce6cf1c0814d", + "name": "6dc7b06a-d90a-4df5-b655-ce6cf1c0814d", + "type": "Microsoft.CostManagement/query", + "properties": { + "nextLink": null, + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ServiceName", + "type": "String" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 0.0, + "abc db", + "USD" + ], + [ + 30.2572751438, + "abc compute cloud", + "USD" + ], + [ + 0.076757602000000022, + "abc file system", + "USD" + ], + [ + 50.430964190400012, + "abc elasticache", + "USD" + ] + ] + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalSubscriptionAlerts.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalSubscriptionAlerts.json new file mode 100644 index 000000000000..fe966bbe5f8e --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalSubscriptionAlerts.json @@ -0,0 +1,98 @@ +{ + "parameters": { + "api-version": "2018-08-01-preview", + "externalCloudProviderId": "100", + "externalCloudProviderType": "externalSubscriptions" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.CostManagement/externalSubscriptions/100/providers/Microsoft.CostManagement/alerts/00000000-0000-0000-0000-000000000000", + "name": "00000000-0000-0000-0000-000000000000", + "type": "Microsoft.CostManagement/alerts", + "properties": { + "definition": { + "type": "Budget", + "category": "Cost", + "criteria": "CostThresholdExceeded" + }, + "description": "", + "source": "Preset", + "details": { + "timeGrainType": "Quarterly", + "periodStartDate": "2020-03-01T00:00:00Z", + "triggeredBy": "00000000-0000-0000-0000-000000000000_1_01", + "resourceGroupFilter": [], + "resourceFilter": [], + "meterFilter": [], + "tagFilter": {}, + "threshold": 0.8, + "operator": "GreaterThan", + "amount": 200000.0, + "unit": "USD", + "currentSpend": 161000.12, + "contactEmails": [ + "1234@contoso.com" + ], + "contactGroups": [], + "contactRoles": [], + "overridingAlert": null + }, + "costEntityId": "budget1", + "status": "Active", + "creationTime": "2020-04-27T11:07:52.7143901Z", + "closeTime": "0001-01-01T00:00:00", + "modificationTime": "2020-04-28T11:06:02.8999373Z", + "statusModificationUserName": null, + "statusModificationTime": "0001-01-01T00:00:00" + } + }, + { + "id": "providers/Microsoft.CostManagement/externalSubscriptions/100/providers/Microsoft.CostManagement/alerts/11111111-1111-1111-111111111111", + "name": "11111111-1111-1111-111111111111", + "type": "Microsoft.CostManagement/alerts", + "properties": { + "definition": { + "type": "Budget", + "category": "Cost", + "criteria": "CostThresholdExceeded" + }, + "description": "", + "source": "Preset", + "details": { + "timeGrainType": "Quarterly", + "periodStartDate": "2020-03-01T00:00:00Z", + "triggeredBy": "11111111-1111-1111-111111111111_1_01", + "resourceGroupFilter": [], + "resourceFilter": [], + "meterFilter": [], + "tagFilter": {}, + "threshold": 0.8, + "operator": "GreaterThan", + "amount": 200000.0, + "unit": "USD", + "currentSpend": 171000.32, + "contactEmails": [ + "1234@contoso.com" + ], + "contactGroups": [], + "contactRoles": [], + "overridingAlert": null + }, + "costEntityId": "budget1", + "status": "Active", + "creationTime": "2019-06-24T05:51:52.8713179Z", + "closeTime": "0001-01-01T00:00:00", + "modificationTime": "2019-08-31T17:51:55.1808807Z", + "statusModificationUserName": null, + "statusModificationTime": "0001-01-01T00:00:00" + } + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalSubscriptionForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalSubscriptionForecast.json new file mode 100644 index 000000000000..2ffa4801b11d --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalSubscriptionForecast.json @@ -0,0 +1,82 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "externalCloudProviderId": "100", + "externalCloudProviderType": "externalSubscriptions", + "parameters": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "filter": { + "and": [ + { + "or": [ + { + "dimension": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimension": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.CostManagement/externalSubscriptions/100/query/d99477af-7510-40ee-aca2-e59bdca0d10d", + "name": "d99477af-7510-40ee-aca2-e59bdca0d10d", + "type": "Microsoft.CostManagement/query", + "properties": { + "nextLink": null, + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "CostStatus", + "type": "String" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [] + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalSubscriptionsDimensions.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalSubscriptionsDimensions.json new file mode 100644 index 000000000000..5320be178ef0 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalSubscriptionsDimensions.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "externalCloudProviderId": "100", + "externalCloudProviderType": "externalSubscriptions" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.CostManagement/externalSubscriptions/123/dimensions_ResourceType_2019-12-01_2019-12-31", + "name": "dimensions_ResourceType_2019-12-01_2019-12-31", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [], + "total": 0, + "category": "ResourceType", + "description": "Resource type", + "usageStart": "2019-12-01T00:00:00Z", + "usageEnd": "2019-12-31T00:00:00Z", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.CostManagement/externalSubscriptions/123/dimensions_ResourceId_2019-12-01_2019-12-31", + "name": "dimensions_ResourceId_2019-12-01_2019-12-31", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [], + "total": 0, + "category": "ResourceId", + "description": "Resource ID", + "usageStart": "2019-12-01T00:00:00Z", + "usageEnd": "2019-12-31T00:00:00Z", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalSubscriptionsQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalSubscriptionsQuery.json new file mode 100644 index 000000000000..5a4dfd8e3e27 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalSubscriptionsQuery.json @@ -0,0 +1,78 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "externalCloudProviderId": "100", + "externalCloudProviderType": "externalSubscriptions", + "parameters": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "filter": { + "and": [ + { + "or": [ + { + "dimension": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimension": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.CostManagement/externalSubscriptions/100/query/d99477af-7510-40ee-aca2-e59bdca0d10d", + "name": "d99477af-7510-40ee-aca2-e59bdca0d10d", + "type": "Microsoft.CostManagement/query", + "properties": { + "nextLink": null, + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [] + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/InvoiceSectionAlerts.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/InvoiceSectionAlerts.json new file mode 100644 index 000000000000..deaecbf35558 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/InvoiceSectionAlerts.json @@ -0,0 +1,100 @@ +{ + "parameters": { + "api-version": "2018-08-01-preview", + "billingAccountId": "12345:6789", + "billingProfileId": "13579", + "invoiceSectionId": "9876", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876/providers/Microsoft.CostManagement/alerts/00000000-0000-0000-0000-000000000000", + "name": "00000000-0000-0000-0000-000000000000", + "type": "Microsoft.CostManagement/alerts", + "properties": { + "definition": { + "type": "Budget", + "category": "Cost", + "criteria": "CostThresholdExceeded" + }, + "description": "", + "source": "Preset", + "details": { + "timeGrainType": "Quarterly", + "periodStartDate": "2020-03-01T00:00:00Z", + "triggeredBy": "00000000-0000-0000-0000-000000000000_1_01", + "resourceGroupFilter": [], + "resourceFilter": [], + "meterFilter": [], + "tagFilter": {}, + "threshold": 0.8, + "operator": "GreaterThan", + "amount": 200000.0, + "unit": "USD", + "currentSpend": 161000.12, + "contactEmails": [ + "1234@contoso.com" + ], + "contactGroups": [], + "contactRoles": [], + "overridingAlert": null + }, + "costEntityId": "budget1", + "status": "Active", + "creationTime": "2020-04-27T11:07:52.7143901Z", + "closeTime": "0001-01-01T00:00:00", + "modificationTime": "2020-04-28T11:06:02.8999373Z", + "statusModificationUserName": null, + "statusModificationTime": "0001-01-01T00:00:00" + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876/providers/Microsoft.CostManagement/alerts/11111111-1111-1111-111111111111", + "name": "11111111-1111-1111-111111111111", + "type": "Microsoft.CostManagement/alerts", + "properties": { + "definition": { + "type": "Budget", + "category": "Cost", + "criteria": "CostThresholdExceeded" + }, + "description": "", + "source": "Preset", + "details": { + "timeGrainType": "Quarterly", + "periodStartDate": "2020-03-01T00:00:00Z", + "triggeredBy": "11111111-1111-1111-111111111111_1_01", + "resourceGroupFilter": [], + "resourceFilter": [], + "meterFilter": [], + "tagFilter": {}, + "threshold": 0.8, + "operator": "GreaterThan", + "amount": 200000.0, + "unit": "USD", + "currentSpend": 171000.32, + "contactEmails": [ + "1234@contoso.com" + ], + "contactGroups": [], + "contactRoles": [], + "overridingAlert": null + }, + "costEntityId": "budget1", + "status": "Active", + "creationTime": "2019-06-24T05:51:52.8713179Z", + "closeTime": "0001-01-01T00:00:00", + "modificationTime": "2019-08-31T17:51:55.1808807Z", + "statusModificationUserName": null, + "statusModificationTime": "0001-01-01T00:00:00" + } + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/InvoiceSectionForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/InvoiceSectionForecast.json new file mode 100644 index 000000000000..e0b840457c2c --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/InvoiceSectionForecast.json @@ -0,0 +1,119 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "billingAccountId": "12345:6789", + "billingProfileId": "13579", + "invoiceSectionId": "9876", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876", + "parameters": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "filter": { + "and": [ + { + "or": [ + { + "dimension": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimension": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + }, + "includeActualCost": false, + "includeFreshPartialCost": false + } + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876/providers/Microsoft.CostManagement/query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "type": "microsoft.costmanagement/Query", + "properties": { + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876/providers/Microsoft.CostManagement/Forecast?api-version=2019-10-01&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ResourceGroup", + "type": "String" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "CostStatus", + "type": "String" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 2.10333307059661, + "JapanUnifia-Trial", + 20180331, + "Forecast", + "USD" + ], + [ + 218.68795741935486, + "RVIIOT-TRIAL", + 20180331, + "Forecast", + "USD" + ], + [ + 0.14384913581657052, + "VSTSHOL-1595322048000", + 20180401, + "Forecast", + "USD" + ], + [ + 0.009865586851323632, + "gs-stms-dev", + 20180429, + "Forecast", + "USD" + ] + ] + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingAccountDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingAccountDimensionsList.json new file mode 100644 index 000000000000..accdaebf5212 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingAccountDimensionsList.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "billingAccountId": "12345:6789", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/providers/microsoft.CostManagement/dimensions_ResourceGroup_2019-10-01_2019-10-31", + "name": "dimensions_ResourceGroup_2019-10-01_2019-10-31", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2019-10-01T00:00:00-07:00", + "usageEnd": "2019-10-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/providers/microsoft.CostManagement/dimensions_ResourceType_2019-10-01_2019-10-31", + "name": "dimensions_ResourceType_2019-10-01_2019-10-31", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [], + "total": 37, + "category": "ResourceType", + "usageStart": "2019-10-01T00:00:00-07:00", + "usageEnd": "2019-10-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingAccountDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingAccountDimensionsListExpandAndTop.json new file mode 100644 index 000000000000..81839ef51c4e --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingAccountDimensionsListExpandAndTop.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "billingAccountId": "12345:6789", + "$expand": "properties/data", + "$top": 5, + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/providers/microsoft.CostManagement/dimensions_ResourceGroup_2019-10-01_2019-10-31", + "name": "dimensions_ResourceGroup_2019-10-01_2019-10-31", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [ + "thoroetrg01", + "default-notificationhubs-westus", + "jedikeyvaultrg", + "contosocodeflow8d4a", + "noobaa" + ], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2019-10-01T00:00:00-07:00", + "usageEnd": "2019-10-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/providers/microsoft.CostManagement/dimensions_ResourceType_2019-10-01_2019-10-31", + "name": "dimensions_ResourceType_2019-10-01_2019-10-31", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [ + "microsoft.automation/automationaccounts", + "microsoft.databricks/workspaces", + "microsoft.dbformysql/servers", + "microsoft.containerregistry/registries", + "microsoft.search/searchservices" + ], + "total": 37, + "category": "ResourceType", + "usageStart": "2019-10-01T00:00:00-07:00", + "usageEnd": "2019-10-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingAccountDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingAccountDimensionsListWithFilter.json new file mode 100644 index 000000000000..ab76379cbce0 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingAccountDimensionsListWithFilter.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "billingAccountId": "12345:6789", + "$expand": "properties/data", + "$top": 5, + "$filter": "properties/category eq 'resourceId'", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/providers/microsoft.CostManagement/dimensions_ResourceId_2019-10-01_2019-10-31", + "name": "dimensions_ResourceId_2019-10-01_2019-10-31", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/urphealthaccount", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/srphytenaccount", + "/subscriptions/67e24f6b-1ec2-4c90-993a-dc2d25b00b6c/resourcegroups/defaultresourcegroup-eus/providers/microsoft.operationalinsights/workspaces/defaultworkspace-67e24f6b-1ec2-4c90-993a-dc2d25b00b6c-eus", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg-sql-ha/providers/microsoft.compute/virtualmachines/sql-4qqp1", + "/subscriptions/a98d6dc5-eb8f-46cf-8938-f1fb08f03706/resourcegroups/databricks-rg-testwsp-xijmsdubneexm/providers/microsoft.compute/disks/488cdb42bf74474a98075415be3f806c-containerrootvolume" + ], + "total": 1409, + "category": "ResourceId", + "usageStart": "2019-10-01T00:00:00-07:00", + "usageEnd": "2019-10-31T00:00:00-07:00", + "description": "Resource Id", + "filterEnabled": true, + "groupingEnabled": true, + "nextLink": "http://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/providers/Microsoft.CostManagement/Dimensions?$filter=properties/category eq 'resourceId'&$top=5&api-version=2019-10-01&$expand=properties/data&$skiptoken=AQAAAA%3D%3D" + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingAccountQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingAccountQuery.json new file mode 100644 index 000000000000..8abfb5dc2eca --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingAccountQuery.json @@ -0,0 +1,107 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "billingAccountId": "12345:6789", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789", + "parameters": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "filter": { + "and": [ + { + "or": [ + { + "dimension": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimension": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "type": "microsoft.costmanagement/Query", + "properties": { + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/providers/Microsoft.CostManagement/Query?api-version=2019-10-01&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ResourceGroup", + "type": "String" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + "JapanUnifia-Trial", + 20180331, + "USD" + ], + [ + 173.41979241290323, + "RVIIOT-TRIAL", + 20180331, + "USD" + ], + [ + 20.359416562625452, + "VSTSHOL-1595322048000", + 20180331, + "USD" + ], + [ + 0.16677720329728665, + "gs-stms-dev", + 20180331, + "USD" + ] + ] + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingAccountQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingAccountQueryGrouping.json new file mode 100644 index 000000000000..648ebf053be2 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingAccountQueryGrouping.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "billingAccountId": "12345:6789", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789", + "parameters": { + "type": "Usage", + "timeframe": "TheLastMonth", + "dataset": { + "granularity": "None", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [ + { + "type": "Dimension", + "name": "ResourceGroup" + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "type": "microsoft.costmanagement/Query", + "properties": { + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/providers/Microsoft.CostManagement/Query?api-version=2019-10-01&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ResourceGroup", + "type": "String" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + "JapanUnifia-Trial", + "USD" + ], + [ + 173.41979241290323, + "RVIIOT-TRIAL", + "USD" + ], + [ + 20.359416562625452, + "VSTSHOL-1595322048000", + "USD" + ] + ] + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingProfileDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingProfileDimensionsList.json new file mode 100644 index 000000000000..11d84a74f6c9 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingProfileDimensionsList.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "billingAccountId": "12345:6789", + "billingProfileId": "13579", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/providers/microsoft.CostManagement/dimensions_ResourceGroup_2019-10-01_2019-10-31", + "name": "dimensions_ResourceGroup_2019-10-01_2019-10-31", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2019-10-01T00:00:00-07:00", + "usageEnd": "2019-10-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/providers/microsoft.CostManagement/dimensions_ResourceType_2019-10-01_2019-10-31", + "name": "dimensions_ResourceType_2019-10-01_2019-10-31", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [], + "total": 37, + "category": "ResourceType", + "usageStart": "2019-10-01T00:00:00-07:00", + "usageEnd": "2019-10-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingProfileDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingProfileDimensionsListExpandAndTop.json new file mode 100644 index 000000000000..2102cbb9407a --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingProfileDimensionsListExpandAndTop.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "billingAccountId": "12345:6789", + "billingProfileId": "13579", + "$expand": "properties/data", + "$top": 5, + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/providers/microsoft.CostManagement/dimensions_ResourceGroup_2019-10-01_2019-10-31", + "name": "dimensions_ResourceGroup_2019-10-01_2019-10-31", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [ + "thoroetrg01", + "default-notificationhubs-westus", + "jedikeyvaultrg", + "contosocodeflow8d4a", + "noobaa" + ], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2019-10-01T00:00:00-07:00", + "usageEnd": "2019-10-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/providers/microsoft.CostManagement/dimensions_ResourceType_2019-10-01_2019-10-31", + "name": "dimensions_ResourceType_2019-10-01_2019-10-31", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [ + "microsoft.automation/automationaccounts", + "microsoft.databricks/workspaces", + "microsoft.dbformysql/servers", + "microsoft.containerregistry/registries", + "microsoft.search/searchservices" + ], + "total": 37, + "category": "ResourceType", + "usageStart": "2019-10-01T00:00:00-07:00", + "usageEnd": "2019-10-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingProfileDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingProfileDimensionsListWithFilter.json new file mode 100644 index 000000000000..118eda5d0cfd --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingProfileDimensionsListWithFilter.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "billingAccountId": "12345:6789", + "billingProfileId": "13579", + "$expand": "properties/data", + "$top": 5, + "$filter": "properties/category eq 'resourceId'", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/providers/microsoft.CostManagement/dimensions_ResourceId_2019-10-01_2019-10-31", + "name": "dimensions_ResourceId_2019-10-01_2019-10-31", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/urphealthaccount", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/srphytenaccount", + "/subscriptions/67e24f6b-1ec2-4c90-993a-dc2d25b00b6c/resourcegroups/defaultresourcegroup-eus/providers/microsoft.operationalinsights/workspaces/defaultworkspace-67e24f6b-1ec2-4c90-993a-dc2d25b00b6c-eus", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg-sql-ha/providers/microsoft.compute/virtualmachines/sql-4qqp1", + "/subscriptions/a98d6dc5-eb8f-46cf-8938-f1fb08f03706/resourcegroups/databricks-rg-testwsp-xijmsdubneexm/providers/microsoft.compute/disks/488cdb42bf74474a98075415be3f806c-containerrootvolume" + ], + "total": 1409, + "category": "ResourceId", + "usageStart": "2019-10-01T00:00:00-07:00", + "usageEnd": "2019-10-31T00:00:00-07:00", + "description": "Resource Id", + "filterEnabled": true, + "groupingEnabled": true, + "nextLink": "http://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/providers/Microsoft.CostManagement/Dimensions?$filter=properties/category eq 'resourceId'&$top=5&api-version=2019-10-01&$expand=properties/data&$skiptoken=AQAAAA%3D%3D" + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingProfileQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingProfileQuery.json new file mode 100644 index 000000000000..89e2f2fb78ca --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingProfileQuery.json @@ -0,0 +1,108 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "billingAccountId": "12345:6789", + "billingProfileId": "13579", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579", + "parameters": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "filter": { + "and": [ + { + "or": [ + { + "dimension": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimension": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "type": "microsoft.costmanagement/Query", + "properties": { + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/providers/Microsoft.CostManagement/Query?api-version=2019-10-01&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ResourceGroup", + "type": "String" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + "JapanUnifia-Trial", + 20180331, + "USD" + ], + [ + 173.41979241290323, + "RVIIOT-TRIAL", + 20180331, + "USD" + ], + [ + 20.359416562625452, + "VSTSHOL-1595322048000", + 20180331, + "USD" + ], + [ + 0.16677720329728665, + "gs-stms-dev", + 20180331, + "USD" + ] + ] + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingProfileQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingProfileQueryGrouping.json new file mode 100644 index 000000000000..3946eb12c2cf --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingProfileQueryGrouping.json @@ -0,0 +1,70 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "billingAccountId": "12345:6789", + "billingProfileId": "13579", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579", + "parameters": { + "type": "Usage", + "timeframe": "TheLastMonth", + "dataset": { + "granularity": "None", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [ + { + "type": "Dimension", + "name": "ResourceGroup" + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "type": "microsoft.costmanagement/Query", + "properties": { + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/providers/Microsoft.CostManagement/Query?api-version=2019-10-01&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ResourceGroup", + "type": "String" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + "JapanUnifia-Trial", + "USD" + ], + [ + 173.41979241290323, + "RVIIOT-TRIAL", + "USD" + ], + [ + 20.359416562625452, + "VSTSHOL-1595322048000", + "USD" + ] + ] + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCACustomerDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCACustomerDimensionsList.json new file mode 100644 index 000000000000..0a63b2667392 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCACustomerDimensionsList.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "billingAccountId": "12345:6789", + "customerId": "5678", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/customers/5678" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/customers/5678/providers/microsoft.CostManagement/dimensions_ResourceGroup_2019-10-01_2019-10-31", + "name": "dimensions_ResourceGroup_2019-10-01_2019-10-31", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2019-10-01T00:00:00-07:00", + "usageEnd": "2019-10-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/customers/5678/providers/microsoft.CostManagement/dimensions_ResourceType_2019-10-01_2019-10-31", + "name": "dimensions_ResourceType_2019-10-01_2019-10-31", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [], + "total": 37, + "category": "ResourceType", + "usageStart": "2019-10-01T00:00:00-07:00", + "usageEnd": "2019-10-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCACustomerDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCACustomerDimensionsListExpandAndTop.json new file mode 100644 index 000000000000..738eb52bf1f8 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCACustomerDimensionsListExpandAndTop.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "billingAccountId": "12345:6789", + "customerId": "5678", + "$expand": "properties/data", + "$top": 5, + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/customers/5678" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/customers/5678/providers/microsoft.CostManagement/dimensions_ResourceGroup_2019-10-01_2019-10-31", + "name": "dimensions_ResourceGroup_2019-10-01_2019-10-31", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [ + "thoroetrg01", + "default-notificationhubs-westus", + "jedikeyvaultrg", + "contosocodeflow8d4a", + "noobaa" + ], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2019-10-01T00:00:00-07:00", + "usageEnd": "2019-10-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/customers/5678/providers/microsoft.CostManagement/dimensions_ResourceType_2019-10-01_2019-10-31", + "name": "dimensions_ResourceType_2019-10-01_2019-10-31", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [ + "microsoft.automation/automationaccounts", + "microsoft.databricks/workspaces", + "microsoft.dbformysql/servers", + "microsoft.containerregistry/registries", + "microsoft.search/searchservices" + ], + "total": 37, + "category": "ResourceType", + "usageStart": "2019-10-01T00:00:00-07:00", + "usageEnd": "2019-10-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCACustomerDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCACustomerDimensionsListWithFilter.json new file mode 100644 index 000000000000..dc9903eb348a --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCACustomerDimensionsListWithFilter.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "billingAccountId": "12345:6789", + "customerId": "13579", + "$expand": "properties/data", + "$top": 5, + "$filter": "properties/category eq 'resourceId'", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/customers/5678" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/customers/5678/providers/microsoft.CostManagement/dimensions_ResourceId_2019-10-01_2019-10-31", + "name": "dimensions_ResourceId_2019-10-01_2019-10-31", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/urphealthaccount", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/srphytenaccount", + "/subscriptions/67e24f6b-1ec2-4c90-993a-dc2d25b00b6c/resourcegroups/defaultresourcegroup-eus/providers/microsoft.operationalinsights/workspaces/defaultworkspace-67e24f6b-1ec2-4c90-993a-dc2d25b00b6c-eus", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg-sql-ha/providers/microsoft.compute/virtualmachines/sql-4qqp1", + "/subscriptions/a98d6dc5-eb8f-46cf-8938-f1fb08f03706/resourcegroups/databricks-rg-testwsp-xijmsdubneexm/providers/microsoft.compute/disks/488cdb42bf74474a98075415be3f806c-containerrootvolume" + ], + "total": 1409, + "category": "ResourceId", + "usageStart": "2019-10-01T00:00:00-07:00", + "usageEnd": "2019-10-31T00:00:00-07:00", + "description": "Resource Id", + "filterEnabled": true, + "groupingEnabled": true, + "nextLink": "http://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/customers/5678/providers/Microsoft.CostManagement/Dimensions?$filter=properties/category eq 'resourceId'&$top=5&api-version=2019-10-01&$expand=properties/data&$skiptoken=AQAAAA%3D%3D" + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCACustomerQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCACustomerQuery.json new file mode 100644 index 000000000000..41a095e8750c --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCACustomerQuery.json @@ -0,0 +1,108 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "billingAccountId": "12345:6789", + "customerId": "5678", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/customers/5678", + "parameters": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "filter": { + "and": [ + { + "or": [ + { + "dimension": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimension": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/customers/5678/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "type": "microsoft.costmanagement/Query", + "properties": { + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/customers/5678/providers/Microsoft.CostManagement/Query?api-version=2019-10-01&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ResourceGroup", + "type": "String" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + "JapanUnifia-Trial", + 20180331, + "USD" + ], + [ + 173.41979241290323, + "RVIIOT-TRIAL", + 20180331, + "USD" + ], + [ + 20.359416562625452, + "VSTSHOL-1595322048000", + 20180331, + "USD" + ], + [ + 0.16677720329728665, + "gs-stms-dev", + 20180331, + "USD" + ] + ] + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCACustomerQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCACustomerQueryGrouping.json new file mode 100644 index 000000000000..a4629cc12c8c --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCACustomerQueryGrouping.json @@ -0,0 +1,70 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "billingAccountId": "12345:6789", + "customerId": "5678", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/customers/5678", + "parameters": { + "type": "Usage", + "timeframe": "TheLastMonth", + "dataset": { + "granularity": "None", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [ + { + "type": "Dimension", + "name": "ResourceGroup" + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/customers/5678/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "type": "microsoft.costmanagement/Query", + "properties": { + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/customers/5678/providers/Microsoft.CostManagement/Query?api-version=2019-10-01&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ResourceGroup", + "type": "String" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + "JapanUnifia-Trial", + "USD" + ], + [ + 173.41979241290323, + "RVIIOT-TRIAL", + "USD" + ], + [ + 20.359416562625452, + "VSTSHOL-1595322048000", + "USD" + ] + ] + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCAInvoiceSectionDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCAInvoiceSectionDimensionsList.json new file mode 100644 index 000000000000..381d346fa3ba --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCAInvoiceSectionDimensionsList.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "billingAccountId": "12345:6789", + "billingProfileId": "13579", + "invoiceSectionId": "9876", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876/providers/microsoft.CostManagement/dimensions_ResourceGroup_2019-10-01_2019-10-31", + "name": "dimensions_ResourceGroup_2019-10-01_2019-10-31", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2019-10-01T00:00:00-07:00", + "usageEnd": "2019-10-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876/providers/microsoft.CostManagement/dimensions_ResourceType_2019-10-01_2019-10-31", + "name": "dimensions_ResourceType_2019-10-01_2019-10-31", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [], + "total": 37, + "category": "ResourceType", + "usageStart": "2019-10-01T00:00:00-07:00", + "usageEnd": "2019-10-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCAInvoiceSectionDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCAInvoiceSectionDimensionsListExpandAndTop.json new file mode 100644 index 000000000000..17dedb5444fc --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCAInvoiceSectionDimensionsListExpandAndTop.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "billingAccountId": "12345:6789", + "billingProfileId": "13579", + "invoiceSectionId": "9876", + "$expand": "properties/data", + "$top": 5, + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876/providers/microsoft.CostManagement/dimensions_ResourceGroup_2019-10-01_2019-10-31", + "name": "dimensions_ResourceGroup_2019-10-01_2019-10-31", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [ + "thoroetrg01", + "default-notificationhubs-westus", + "jedikeyvaultrg", + "contosocodeflow8d4a", + "noobaa" + ], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2019-10-01T00:00:00-07:00", + "usageEnd": "2019-10-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876/providers/microsoft.CostManagement/dimensions_ResourceType_2019-10-01_2019-10-31", + "name": "dimensions_ResourceType_2019-10-01_2019-10-31", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [ + "microsoft.automation/automationaccounts", + "microsoft.databricks/workspaces", + "microsoft.dbformysql/servers", + "microsoft.containerregistry/registries", + "microsoft.search/searchservices" + ], + "total": 37, + "category": "ResourceType", + "usageStart": "2019-10-01T00:00:00-07:00", + "usageEnd": "2019-10-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCAInvoiceSectionDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCAInvoiceSectionDimensionsListWithFilter.json new file mode 100644 index 000000000000..9dc3219f73e3 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCAInvoiceSectionDimensionsListWithFilter.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "billingAccountId": "12345:6789", + "billingProfileId": "13579", + "invoiceSectionId": "9876", + "$expand": "properties/data", + "$top": 5, + "$filter": "properties/category eq 'resourceId'", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876/providers/microsoft.CostManagement/dimensions_ResourceId_2019-10-01_2019-10-31", + "name": "dimensions_ResourceId_2019-10-01_2019-10-31", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/urphealthaccount", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/srphytenaccount", + "/subscriptions/67e24f6b-1ec2-4c90-993a-dc2d25b00b6c/resourcegroups/defaultresourcegroup-eus/providers/microsoft.operationalinsights/workspaces/defaultworkspace-67e24f6b-1ec2-4c90-993a-dc2d25b00b6c-eus", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg-sql-ha/providers/microsoft.compute/virtualmachines/sql-4qqp1", + "/subscriptions/a98d6dc5-eb8f-46cf-8938-f1fb08f03706/resourcegroups/databricks-rg-testwsp-xijmsdubneexm/providers/microsoft.compute/disks/488cdb42bf74474a98075415be3f806c-containerrootvolume" + ], + "total": 1409, + "category": "ResourceId", + "usageStart": "2019-10-01T00:00:00-07:00", + "usageEnd": "2019-10-31T00:00:00-07:00", + "description": "Resource Id", + "filterEnabled": true, + "groupingEnabled": true, + "nextLink": "http://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876/providers/Microsoft.CostManagement/Dimensions?$filter=properties/category eq 'resourceId'&$top=5&api-version=2019-10-01&$expand=properties/data&$skiptoken=AQAAAA%3D%3D" + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCAInvoiceSectionQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCAInvoiceSectionQuery.json new file mode 100644 index 000000000000..ddacc8d3b487 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCAInvoiceSectionQuery.json @@ -0,0 +1,109 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "billingAccountId": "12345:6789", + "billingProfileId": "13579", + "invoiceSectionId": "9876", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876", + "parameters": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "filter": { + "and": [ + { + "or": [ + { + "dimension": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimension": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "type": "microsoft.costmanagement/Query", + "properties": { + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876/providers/Microsoft.CostManagement/Query?api-version=2019-10-01&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ResourceGroup", + "type": "String" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + "JapanUnifia-Trial", + 20180331, + "USD" + ], + [ + 173.41979241290323, + "RVIIOT-TRIAL", + 20180331, + "USD" + ], + [ + 20.359416562625452, + "VSTSHOL-1595322048000", + 20180331, + "USD" + ], + [ + 0.16677720329728665, + "gs-stms-dev", + 20180331, + "USD" + ] + ] + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCAInvoiceSectionQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCAInvoiceSectionQueryGrouping.json new file mode 100644 index 000000000000..c680c09d1ac3 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCAInvoiceSectionQueryGrouping.json @@ -0,0 +1,71 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "billingAccountId": "12345:6789", + "billingProfileId": "13579", + "invoiceSectionId": "9876", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876", + "parameters": { + "type": "Usage", + "timeframe": "TheLastMonth", + "dataset": { + "granularity": "None", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [ + { + "type": "Dimension", + "name": "ResourceGroup" + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "type": "microsoft.costmanagement/Query", + "properties": { + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876/providers/Microsoft.CostManagement/Query?api-version=2019-10-01&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ResourceGroup", + "type": "String" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + "JapanUnifia-Trial", + "USD" + ], + [ + 173.41979241290323, + "RVIIOT-TRIAL", + "USD" + ], + [ + 20.359416562625452, + "VSTSHOL-1595322048000", + "USD" + ] + ] + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ManagementGroupDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ManagementGroupDimensionsList.json new file mode 100644 index 000000000000..46d654b664b9 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ManagementGroupDimensionsList.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "managementGroupId": "MyMgId", + "scope": "providers/Microsoft.Management/managementGroups/MyMgId" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Management/managementGroups/MyMgId/providers/microsoft.CostManagement/dimensions_ResourceGroup_2018-05-01_2018-05-31", + "name": "dimensions_ResourceGroup_2018-05-01_2018-05-31", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.Management/managementGroups/MyMgId/providers/microsoft.CostManagement/dimensions_ResourceType_2018-05-01_2018-05-31", + "name": "dimensions_ResourceType_2018-05-01_2018-05-31", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [], + "total": 37, + "category": "ResourceType", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ManagementGroupDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ManagementGroupDimensionsListExpandAndTop.json new file mode 100644 index 000000000000..616047e5e4bf --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ManagementGroupDimensionsListExpandAndTop.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "managementGroupId": "MyMgId", + "$expand": "properties/data", + "$top": 5, + "scope": "providers/Microsoft.Management/managementGroups/MyMgId" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Management/managementGroups/MyMgId/providers/microsoft.CostManagement/dimensions_ResourceGroup_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceGroup_2018-05-01_2018-05-31_5", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [ + "thoroetrg01", + "default-notificationhubs-westus", + "jedikeyvaultrg", + "contosocodeflow8d4a", + "noobaa" + ], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.Management/managementGroups/MyMgId/providers/microsoft.CostManagement/dimensions_ResourceType_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceType_2018-05-01_2018-05-31_5", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [ + "microsoft.automation/automationaccounts", + "microsoft.databricks/workspaces", + "microsoft.dbformysql/servers", + "microsoft.containerregistry/registries", + "microsoft.search/searchservices" + ], + "total": 37, + "category": "ResourceType", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ManagementGroupDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ManagementGroupDimensionsListWithFilter.json new file mode 100644 index 000000000000..de501d6cc1ee --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ManagementGroupDimensionsListWithFilter.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "managementGroupId": "MyMgId", + "$expand": "properties/data", + "$top": 5, + "$filter": "properties/category eq 'resourceId'", + "scope": "providers/Microsoft.Management/managementGroups/MyMgId" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Management/managementGroups/MyMgId/providers/microsoft.CostManagement/dimensions_ResourceId_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceId_2018-05-01_2018-05-31_5", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/urphealthaccount", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/srphytenaccount", + "/subscriptions/67e24f6b-1ec2-4c90-993a-dc2d25b00b6c/resourcegroups/defaultresourcegroup-eus/providers/microsoft.operationalinsights/workspaces/defaultworkspace-67e24f6b-1ec2-4c90-993a-dc2d25b00b6c-eus", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg-sql-ha/providers/microsoft.compute/virtualmachines/sql-4qqp1", + "/subscriptions/a98d6dc5-eb8f-46cf-8938-f1fb08f03706/resourcegroups/databricks-rg-testwsp-xijmsdubneexm/providers/microsoft.compute/disks/488cdb42bf74474a98075415be3f806c-containerrootvolume" + ], + "total": 1409, + "category": "ResourceId", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource Id", + "filterEnabled": true, + "groupingEnabled": true, + "nextLink": "http://management.azure.com/providers/Microsoft.Management/managementGroups/MyMgId/providers/Microsoft.CostManagement/Dimensions?$filter=properties/category eq 'resourceId'&$top=5&api-version=2019-10-01&$expand=properties/data&$skiptoken=AQAAAA%3D%3D" + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ManagementGroupQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ManagementGroupQuery.json new file mode 100644 index 000000000000..8bb619cee8e3 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ManagementGroupQuery.json @@ -0,0 +1,107 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "managementGroupId": "MyMgId", + "scope": "providers/Microsoft.Management/managementGroups/MyMgId", + "parameters": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "filter": { + "and": [ + { + "or": [ + { + "dimension": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimension": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Management/managementGroups/MyMgId/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "type": "microsoft.costmanagement/Query", + "properties": { + "nextLink": "https://management.azure.com/providers/Microsoft.Management/managementGroups/MyMgId/providers/Microsoft.CostManagement/Query?api-version=2019-10-01&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ResourceGroup", + "type": "String" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + "JapanUnifia-Trial", + 20180331, + "USD" + ], + [ + 173.41979241290323, + "RVIIOT-TRIAL", + 20180331, + "USD" + ], + [ + 20.359416562625452, + "VSTSHOL-1595322048000", + 20180331, + "USD" + ], + [ + 0.16677720329728665, + "gs-stms-dev", + 20180331, + "USD" + ] + ] + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ManagementGroupQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ManagementGroupQueryGrouping.json new file mode 100644 index 000000000000..0f3b0ef56cd3 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ManagementGroupQueryGrouping.json @@ -0,0 +1,76 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "managementGroupId": "MyMgId", + "scope": "providers/Microsoft.Management/managementGroups/MyMgId", + "parameters": { + "type": "Usage", + "timeframe": "TheLastMonth", + "dataset": { + "granularity": "None", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [ + { + "type": "Dimension", + "name": "ResourceGroup" + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Management/managementGroups/MyMgId/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "type": "microsoft.costmanagement/Query", + "properties": { + "nextLink": "https://management.azure.com/providers/Microsoft.Management/managementGroups/MyMgId/providers/Microsoft.CostManagement/Query?api-version=2019-10-01&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ResourceGroup", + "type": "String" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 20.359416562625452, + "VSTSHOL-1595322048000", + 20180331, + "USD" + ], + [ + 173.41979241290323, + "RVIIOT-TRIAL", + 20180331, + "USD" + ], + [ + 19.545363672276512, + "JapanUnifia-Trial", + 20180331, + "USD" + ] + ] + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateView.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateView.json new file mode 100644 index 000000000000..8128f186ee34 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateView.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "viewName": "swaggerExample" + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.CostManagement/views/swaggerExample", + "name": "swaggerExample", + "type": "Microsoft.CostManagement/Views", + "eTag": "\"1d4ff9fe66f1d10\"", + "properties": { + "displayName": "swagger Example", + "scope": "", + "query": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [], + "sorting": [ + { + "direction": "Ascending", + "name": "UsageDate" + } + ] + } + }, + "chart": "Table", + "accumulated": "true", + "metric": "ActualCost", + "kpis": [ + { + "type": "Forecast", + "id": null, + "enabled": true + }, + { + "type": "Budget", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo", + "enabled": true + } + ], + "pivots": [ + { + "type": "Dimension", + "name": "ServiceName" + }, + { + "type": "Dimension", + "name": "MeterCategory" + }, + { + "type": "TagKey", + "name": "swaggerTagKey" + } + ] + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewCreateOrUpdate.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewCreateOrUpdate.json new file mode 100644 index 000000000000..917f49d96253 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewCreateOrUpdate.json @@ -0,0 +1,185 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "viewName": "swaggerExample", + "parameters": { + "eTag": "\"1d4ff9fe66f1d10\"", + "properties": { + "displayName": "swagger Example", + "query": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [], + "sorting": [ + { + "direction": "Ascending", + "name": "UsageDate" + } + ] + } + }, + "chart": "Table", + "accumulated": "true", + "metric": "ActualCost", + "kpis": [ + { + "type": "Forecast", + "id": null, + "enabled": true + }, + { + "type": "Budget", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo", + "enabled": true + } + ], + "pivots": [ + { + "type": "Dimension", + "name": "ServiceName" + }, + { + "type": "Dimension", + "name": "MeterCategory" + }, + { + "type": "TagKey", + "name": "swaggerTagKey" + } + ] + } + } + }, + "responses": { + "201": { + "body": { + "id": "/providers/Microsoft.CostManagement/views/swaggerExample", + "name": "swaggerExample", + "type": "Microsoft.CostManagement/Views", + "eTag": "\"1d4ffa5a9c2430c\"", + "properties": { + "displayName": "swagger Example", + "scope": "", + "query": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [], + "sorting": [ + { + "direction": "Ascending", + "name": "UsageDate" + } + ] + } + }, + "chart": "Table", + "accumulated": "true", + "metric": "ActualCost", + "kpis": [ + { + "type": "Forecast", + "id": null, + "enabled": true + }, + { + "type": "Budget", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo", + "enabled": true + } + ], + "pivots": [ + { + "type": "Dimension", + "name": "ServiceName" + }, + { + "type": "Dimension", + "name": "MeterCategory" + }, + { + "type": "TagKey", + "name": "swaggerTagKey" + } + ] + } + } + }, + "200": { + "body": { + "id": "/providers/Microsoft.CostManagement/views/swaggerExample", + "name": "swaggerExample", + "type": "Microsoft.CostManagement/Views", + "eTag": "\"1d4ffa5a9c2430c\"", + "properties": { + "displayName": "swagger Example", + "scope": "", + "query": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [], + "sorting": [ + { + "direction": "Ascending", + "name": "UsageDate" + } + ] + } + }, + "chart": "Table", + "accumulated": "true", + "metric": "ActualCost", + "kpis": [ + { + "type": "Forecast", + "id": null, + "enabled": true + }, + { + "type": "Budget", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo", + "enabled": true + } + ], + "pivots": [ + { + "type": "Dimension", + "name": "ServiceName" + }, + { + "type": "Dimension", + "name": "MeterCategory" + }, + { + "type": "TagKey", + "name": "swaggerTagKey" + } + ] + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewDelete.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewDelete.json new file mode 100644 index 000000000000..a03a55d4b016 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewDelete.json @@ -0,0 +1,10 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "viewName": "TestView" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewList.json new file mode 100644 index 000000000000..f70ddf2c6c81 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewList.json @@ -0,0 +1,131 @@ +{ + "parameters": { + "api-version": "2020-06-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/providers/Microsoft.CostManagement/views/swaggerExample", + "name": "swaggerExample", + "type": "Microsoft.CostManagement/Views", + "eTag": "\"1d4ff9fe66f1d10\"", + "properties": { + "displayName": "swagger Example", + "scope": "", + "query": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [], + "sorting": [ + { + "direction": "Ascending", + "name": "UsageDate" + } + ] + } + }, + "chart": "Table", + "accumulated": "true", + "metric": "ActualCost", + "kpis": [ + { + "type": "Forecast", + "id": null, + "enabled": true + }, + { + "type": "Budget", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo", + "enabled": true + } + ], + "pivots": [ + { + "type": "Dimension", + "name": "ServiceName" + }, + { + "type": "Dimension", + "name": "MeterCategory" + }, + { + "type": "TagKey", + "name": "swaggerTagKey" + } + ] + } + }, + { + "id": "/providers/Microsoft.CostManagement/views/swaggerExample2", + "name": "swaggerExample2", + "type": "Microsoft.CostManagement/Views", + "eTag": "\"1d4ffa5a9c2430c\"", + "properties": { + "displayName": "swagger Example 2", + "scope": "", + "query": { + "type": "Usage", + "timeframe": "LastMonthToDate", + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [], + "sorting": [ + { + "direction": "Ascending", + "name": "UsageDate" + } + ] + } + }, + "chart": "GroupedColumn", + "accumulated": "true", + "metric": "ActualCost", + "kpis": [ + { + "type": "Forecast", + "id": null, + "enabled": true + }, + { + "type": "Budget", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo", + "enabled": true + } + ], + "pivots": [ + { + "type": "Dimension", + "name": "ServiceName" + }, + { + "type": "Dimension", + "name": "MeterCategory" + }, + { + "type": "TagKey", + "name": "swaggerTagKey" + } + ] + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ResourceGroupAlerts.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ResourceGroupAlerts.json new file mode 100644 index 000000000000..2db6d3dd5bf8 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ResourceGroupAlerts.json @@ -0,0 +1,99 @@ +{ + "parameters": { + "api-version": "2018-08-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "ScreenSharingTest-peer", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ScreenSharingTest-peer" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ScreenSharingTest-peer/providers/Microsoft.CostManagement/alerts/00000000-0000-0000-0000-000000000000", + "name": "00000000-0000-0000-0000-000000000000", + "type": "Microsoft.CostManagement/alerts", + "properties": { + "definition": { + "type": "Budget", + "category": "Cost", + "criteria": "CostThresholdExceeded" + }, + "description": "", + "source": "Preset", + "details": { + "timeGrainType": "Quarterly", + "periodStartDate": "2020-03-01T00:00:00Z", + "triggeredBy": "00000000-0000-0000-0000-000000000000_1_01", + "resourceGroupFilter": [], + "resourceFilter": [], + "meterFilter": [], + "tagFilter": {}, + "threshold": 0.8, + "operator": "GreaterThan", + "amount": 200000.0, + "unit": "USD", + "currentSpend": 161000.12, + "contactEmails": [ + "1234@contoso.com" + ], + "contactGroups": [], + "contactRoles": [], + "overridingAlert": null + }, + "costEntityId": "budget1", + "status": "Active", + "creationTime": "2020-04-27T11:07:52.7143901Z", + "closeTime": "0001-01-01T00:00:00", + "modificationTime": "2020-04-28T11:06:02.8999373Z", + "statusModificationUserName": null, + "statusModificationTime": "0001-01-01T00:00:00" + } + }, + { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ScreenSharingTest-peer/providers/Microsoft.CostManagement/alerts/11111111-1111-1111-111111111111", + "name": "11111111-1111-1111-111111111111", + "type": "Microsoft.CostManagement/alerts", + "properties": { + "definition": { + "type": "Budget", + "category": "Cost", + "criteria": "CostThresholdExceeded" + }, + "description": "", + "source": "Preset", + "details": { + "timeGrainType": "Quarterly", + "periodStartDate": "2020-03-01T00:00:00Z", + "triggeredBy": "11111111-1111-1111-111111111111_1_01", + "resourceGroupFilter": [], + "resourceFilter": [], + "meterFilter": [], + "tagFilter": {}, + "threshold": 0.8, + "operator": "GreaterThan", + "amount": 200000.0, + "unit": "USD", + "currentSpend": 171000.32, + "contactEmails": [ + "1234@contoso.com" + ], + "contactGroups": [], + "contactRoles": [], + "overridingAlert": null + }, + "costEntityId": "budget1", + "status": "Active", + "creationTime": "2019-06-24T05:51:52.8713179Z", + "closeTime": "0001-01-01T00:00:00", + "modificationTime": "2019-08-31T17:51:55.1808807Z", + "statusModificationUserName": null, + "statusModificationTime": "0001-01-01T00:00:00" + } + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ResourceGroupDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ResourceGroupDimensionsList.json new file mode 100644 index 000000000000..d0f789435863 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ResourceGroupDimensionsList.json @@ -0,0 +1,56 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "system.orlando", + "$expand": "properties/data", + "$top": 5, + "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/system.orlando" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/system.orlando/providers/microsoft.CostManagement/dimensions_ResourceType_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceType_2018-05-01_2018-05-31_5", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [ + "microsoft.storage/storageaccounts" + ], + "total": 1, + "category": "ResourceType", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/system.orlando/providers/microsoft.CostManagement/dimensions_ResourceId_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceId_2018-05-01_2018-05-31_5", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/authprod", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/systemevents", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/armadminprod", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/srphytenaccount", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/publicsystemportal" + ], + "total": 27, + "category": "ResourceId", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource Id", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ResourceGroupForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ResourceGroupForecast.json new file mode 100644 index 000000000000..6ed0b4095bcd --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ResourceGroupForecast.json @@ -0,0 +1,97 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "ScreenSharingTest-peer", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ScreenSharingTest-peer", + "parameters": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "filter": { + "and": [ + { + "or": [ + { + "dimension": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimension": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + }, + "includeActualCost": false, + "includeFreshPartialCost": false + } + }, + "responses": { + "200": { + "body": { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ScreenSharingTest-peer/providers/Microsoft.CostManagement/query/00000000-0000-0000-0000-000000000000", + "name": "55312978-ba1b-415c-9304-cfd9c43c0481", + "type": "microsoft.costmanagement/Query", + "properties": { + "nextLink": null, + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ResourceGroup", + "type": "String" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "CostStatus", + "type": "String" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 2.10333307059661, + "ScreenSharingTest-peer", + 20180331, + "Forecast", + "USD" + ] + ] + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ResourceGroupQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ResourceGroupQuery.json new file mode 100644 index 000000000000..052910483e76 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ResourceGroupQuery.json @@ -0,0 +1,96 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "subscriptionId": "55312978-ba1b-415c-9304-c4b9c43c0481", + "resourceGroupName": "ScreenSharingTest-peer", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ScreenSharingTest-peer", + "parameters": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "filter": { + "and": [ + { + "or": [ + { + "dimension": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimension": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "subscriptions/55312978-ba1b-415c-9304-c4b9c43c0481/resourcegroups/ScreenSharingTest-peer/providers/Microsoft.CostManagement/Query/9af9459d-441d-4055-9ed0-83d4c4a363fb", + "name": "9af9459d-441d-4055-9ed0-83d4c4a363fb", + "type": "microsoft.costmanagement/Query", + "properties": { + "nextLink": null, + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ResourceGroup", + "type": "String" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 2.10333307059661, + "ScreenSharingTest-peer", + 20180417, + "USD" + ], + [ + 20.10333307059661, + "ScreenSharingTest-peer", + 20180418, + "USD" + ] + ] + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ResourceGroupQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ResourceGroupQueryGrouping.json new file mode 100644 index 000000000000..da7cb4d9a91f --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ResourceGroupQueryGrouping.json @@ -0,0 +1,71 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "ScreenSharingTest-peer", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ScreenSharingTest-peer", + "parameters": { + "type": "Usage", + "timeframe": "TheLastMonth", + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [ + { + "type": "Dimension", + "name": "ResourceType" + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/ScreenSharingTest-peer/providers/Microsoft.CostManagement/Query/9af9459d-441d-4055-9ed0-83d4c4a363fb", + "name": "9af9459d-441d-4055-9ed0-83d4c4a363fb", + "type": "microsoft.costmanagement/Query", + "properties": { + "nextLink": null, + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ResourceType", + "type": "String" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 2.10333307059661, + "Microsoft.SqlServer", + 20180417, + "USD" + ], + [ + 20.10333307059661, + "Microsoft.Compute", + 20180418, + "USD" + ] + ] + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SingleResourceGroupAlert.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SingleResourceGroupAlert.json new file mode 100644 index 000000000000..d4f3f72ef83a --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SingleResourceGroupAlert.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "api-version": "2018-08-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "ScreenSharingTest-peer", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ScreenSharingTest-peer", + "alertId": "22222222-2222-2222-2222-222222222222" + }, + "responses": { + "200": { + "body": { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ScreenSharingTest-peer/providers/Microsoft.CostManagement/alerts/22222222-2222-2222-2222-222222222222", + "name": "22222222-2222-2222-2222-222222222222", + "type": "Microsoft.CostManagement/alerts", + "properties": { + "definition": { + "type": "Budget", + "category": "Cost", + "criteria": "CostThresholdExceeded" + }, + "description": "", + "source": "Preset", + "details": { + "timeGrainType": "Quarterly", + "periodStartDate": "2020-03-01T00:00:00Z", + "triggeredBy": "22222222-2222-2222-2222-222222222222_1_01", + "resourceGroupFilter": [], + "resourceFilter": [], + "meterFilter": [], + "tagFilter": {}, + "threshold": 0.8, + "operator": "GreaterThan", + "amount": 200000.0, + "unit": "USD", + "currentSpend": 161000.12, + "contactEmails": [ + "1234@contoso.com" + ], + "contactGroups": [], + "contactRoles": [], + "overridingAlert": null + }, + "costEntityId": "budget1", + "status": "Active", + "creationTime": "2020-04-27T11:07:52.7143901Z", + "closeTime": "0001-01-01T00:00:00", + "modificationTime": "2020-04-28T11:06:02.8999373Z", + "statusModificationUserName": null, + "statusModificationTime": "0001-01-01T00:00:00" + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SingleSubscriptionAlert.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SingleSubscriptionAlert.json new file mode 100644 index 000000000000..cd881b8ea598 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SingleSubscriptionAlert.json @@ -0,0 +1,53 @@ +{ + "parameters": { + "api-version": "2018-08-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "alertId": "22222222-2222-2222-2222-222222222222" + }, + "responses": { + "200": { + "body": { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/alerts/22222222-2222-2222-2222-222222222222", + "name": "22222222-2222-2222-2222-222222222222", + "type": "Microsoft.CostManagement/alerts", + "properties": { + "definition": { + "type": "Budget", + "category": "Cost", + "criteria": "CostThresholdExceeded" + }, + "description": "", + "source": "Preset", + "details": { + "timeGrainType": "Quarterly", + "periodStartDate": "2020-03-01T00:00:00Z", + "triggeredBy": "22222222-2222-2222-2222-222222222222_1_01", + "resourceGroupFilter": [], + "resourceFilter": [], + "meterFilter": [], + "tagFilter": {}, + "threshold": 0.8, + "operator": "GreaterThan", + "amount": 200000.0, + "unit": "USD", + "currentSpend": 161000.12, + "contactEmails": [ + "1234@contoso.com" + ], + "contactGroups": [], + "contactRoles": [], + "overridingAlert": null + }, + "costEntityId": "budget1", + "status": "Active", + "creationTime": "2020-04-27T11:07:52.7143901Z", + "closeTime": "0001-01-01T00:00:00", + "modificationTime": "2020-04-28T11:06:02.8999373Z", + "statusModificationUserName": null, + "statusModificationTime": "0001-01-01T00:00:00" + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SubscriptionAlerts.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SubscriptionAlerts.json new file mode 100644 index 000000000000..0880df01a3b4 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SubscriptionAlerts.json @@ -0,0 +1,98 @@ +{ + "parameters": { + "api-version": "2018-08-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/alerts/00000000-0000-0000-0000-000000000000", + "name": "00000000-0000-0000-0000-000000000000", + "type": "Microsoft.CostManagement/alerts", + "properties": { + "definition": { + "type": "Budget", + "category": "Cost", + "criteria": "CostThresholdExceeded" + }, + "description": "", + "source": "Preset", + "details": { + "timeGrainType": "Quarterly", + "periodStartDate": "2020-03-01T00:00:00Z", + "triggeredBy": "00000000-0000-0000-0000-000000000000_1_01", + "resourceGroupFilter": [], + "resourceFilter": [], + "meterFilter": [], + "tagFilter": {}, + "threshold": 0.8, + "operator": "GreaterThan", + "amount": 200000.0, + "unit": "USD", + "currentSpend": 161000.12, + "contactEmails": [ + "1234@contoso.com" + ], + "contactGroups": [], + "contactRoles": [], + "overridingAlert": null + }, + "costEntityId": "budget1", + "status": "Active", + "creationTime": "2020-04-27T11:07:52.7143901Z", + "closeTime": "0001-01-01T00:00:00", + "modificationTime": "2020-04-28T11:06:02.8999373Z", + "statusModificationUserName": null, + "statusModificationTime": "0001-01-01T00:00:00" + } + }, + { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/alerts/11111111-1111-1111-111111111111", + "name": "11111111-1111-1111-111111111111", + "type": "Microsoft.CostManagement/alerts", + "properties": { + "definition": { + "type": "Budget", + "category": "Cost", + "criteria": "CostThresholdExceeded" + }, + "description": "", + "source": "Preset", + "details": { + "timeGrainType": "Quarterly", + "periodStartDate": "2020-03-01T00:00:00Z", + "triggeredBy": "11111111-1111-1111-111111111111_1_01", + "resourceGroupFilter": [], + "resourceFilter": [], + "meterFilter": [], + "tagFilter": {}, + "threshold": 0.8, + "operator": "GreaterThan", + "amount": 200000.0, + "unit": "USD", + "currentSpend": 171000.32, + "contactEmails": [ + "1234@contoso.com" + ], + "contactGroups": [], + "contactRoles": [], + "overridingAlert": null + }, + "costEntityId": "budget1", + "status": "Active", + "creationTime": "2019-06-24T05:51:52.8713179Z", + "closeTime": "0001-01-01T00:00:00", + "modificationTime": "2019-08-31T17:51:55.1808807Z", + "statusModificationUserName": null, + "statusModificationTime": "0001-01-01T00:00:00" + } + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SubscriptionDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SubscriptionDimensionsList.json new file mode 100644 index 000000000000..89e401409972 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SubscriptionDimensionsList.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "$top": 5, + "$expand": "properties/data", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/dimensions_ResourceGroup_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceGroup_2018-05-01_2018-05-31_5", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [ + "dcrg", + "rg", + "offlinegalleryrg", + "system.orlando.adminkeyvault", + "system.orlando.keyvault" + ], + "total": 68, + "category": "ResourceGroup", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/dimensions_ResourceType_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceType_2018-05-01_2018-05-31_5", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [ + "microsoft.storage/storageaccounts", + "microsoft.web.admin/role", + "microsoft.sql/servers", + "microsoft.compute/virtualmachines" + ], + "total": 4, + "category": "ResourceType", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SubscriptionForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SubscriptionForecast.json new file mode 100644 index 000000000000..dafbb3828f33 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SubscriptionForecast.json @@ -0,0 +1,117 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "parameters": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "filter": { + "and": [ + { + "or": [ + { + "dimension": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimension": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + }, + "includeActualCost": false, + "includeFreshPartialCost": false + } + }, + "responses": { + "200": { + "body": { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/query/00000000-0000-0000-0000-000000000000", + "name": "55312978-ba1b-415c-9304-cfd9c43c0481", + "type": "microsoft.costmanagement/Query", + "properties": { + "nextLink": null, + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ResourceGroup", + "type": "String" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "CostStatus", + "type": "String" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 2.10333307059661, + "ScreenSharingTest-peer", + 20180331, + "Forecast", + "USD" + ], + [ + 218.68795741935486, + "Ict_StratAndPlan_GoldSprova_Prod", + 20180331, + "Forecast", + "USD" + ], + [ + 0.14384913581657052, + "ssbciotelement01", + 20180401, + "Forecast", + "USD" + ], + [ + 0.009865586851323632, + "ict_stratandplan_goldsprova_prod", + 20180429, + "Forecast", + "USD" + ] + ] + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SubscriptionQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SubscriptionQuery.json new file mode 100644 index 000000000000..c9d3f535ad9c --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SubscriptionQuery.json @@ -0,0 +1,107 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "parameters": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "filter": { + "and": [ + { + "or": [ + { + "dimension": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimension": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/Query/00000000-0000-0000-0000-000000000000", + "name": "55312978-ba1b-415c-9304-cfd9c43c0481", + "type": "microsoft.costmanagement/Query", + "properties": { + "nextLink": null, + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ResourceGroup", + "type": "String" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 2.10333307059661, + "ScreenSharingTest-peer", + 20180331, + "USD" + ], + [ + 218.68795741935486, + "Ict_StratAndPlan_GoldSprova_Prod", + 20180331, + "USD" + ], + [ + 0.14384913581657052, + "ssbciotelement01", + 20180401, + "USD" + ], + [ + 0.009865586851323632, + "ict_stratandplan_goldsprova_prod", + 20180429, + "USD" + ] + ] + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SubscriptionQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SubscriptionQueryGrouping.json new file mode 100644 index 000000000000..f155bfd59622 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SubscriptionQueryGrouping.json @@ -0,0 +1,74 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "parameters": { + "type": "Usage", + "timeframe": "TheLastMonth", + "dataset": { + "granularity": "None", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [ + { + "type": "Dimension", + "name": "ResourceGroup" + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/Query/00000000-0000-0000-0000-000000000000", + "name": "55312978-ba1b-415c-9304-cfd9c43c0481", + "type": "microsoft.costmanagement/Query", + "properties": { + "nextLink": null, + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ResourceGroup", + "type": "String" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 0.009865586851323632, + "Ict_StratAndPlan_GoldSprova_Prod_0", + "USD" + ], + [ + 218.68795741935486, + "Ict_StratAndPlan_GoldSprova_Prod_1", + "USD" + ], + [ + 2.10333307059661, + "ScreenSharingTest-peer1", + "USD" + ], + [ + 0.14384913581657052, + "Ssbciotelement01", + "USD" + ] + ] + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewByResourceGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewByResourceGroup.json new file mode 100644 index 000000000000..68f6fe7333ca --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewByResourceGroup.json @@ -0,0 +1,70 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "viewName": "swaggerExample", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/views/swaggerExample", + "name": "swaggerExample", + "type": "Microsoft.CostManagement/Views", + "eTag": "\"1d4ff9fe66f1d10\"", + "properties": { + "displayName": "swagger Example", + "scope": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", + "query": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [], + "sorting": [ + { + "direction": "Ascending", + "name": "UsageDate" + } + ] + } + }, + "chart": "Table", + "accumulated": "true", + "metric": "ActualCost", + "kpis": [ + { + "type": "Forecast", + "id": null, + "enabled": true + }, + { + "type": "Budget", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo", + "enabled": true + } + ], + "pivots": [ + { + "type": "Dimension", + "name": "ServiceName" + }, + { + "type": "Dimension", + "name": "MeterCategory" + }, + { + "type": "TagKey", + "name": "swaggerTagKey" + } + ] + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewCreateOrUpdateByResourceGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewCreateOrUpdateByResourceGroup.json new file mode 100644 index 000000000000..65b1475171ec --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewCreateOrUpdateByResourceGroup.json @@ -0,0 +1,186 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", + "viewName": "swaggerExample", + "parameters": { + "eTag": "\"1d4ff9fe66f1d10\"", + "properties": { + "displayName": "swagger Example", + "query": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [], + "sorting": [ + { + "direction": "Ascending", + "name": "UsageDate" + } + ] + } + }, + "chart": "Table", + "accumulated": "true", + "metric": "ActualCost", + "kpis": [ + { + "type": "Forecast", + "id": null, + "enabled": true + }, + { + "type": "Budget", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo", + "enabled": true + } + ], + "pivots": [ + { + "type": "Dimension", + "name": "ServiceName" + }, + { + "type": "Dimension", + "name": "MeterCategory" + }, + { + "type": "TagKey", + "name": "swaggerTagKey" + } + ] + } + } + }, + "responses": { + "201": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/views/swaggerExample", + "name": "swaggerExample", + "type": "Microsoft.CostManagement/Views", + "eTag": "\"1d4ffa5a9c2430c\"", + "properties": { + "displayName": "swagger Example", + "scope": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", + "query": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [], + "sorting": [ + { + "direction": "Ascending", + "name": "UsageDate" + } + ] + } + }, + "chart": "Table", + "accumulated": "true", + "metric": "ActualCost", + "kpis": [ + { + "type": "Forecast", + "id": null, + "enabled": true + }, + { + "type": "Budget", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo", + "enabled": true + } + ], + "pivots": [ + { + "type": "Dimension", + "name": "ServiceName" + }, + { + "type": "Dimension", + "name": "MeterCategory" + }, + { + "type": "TagKey", + "name": "swaggerTagKey" + } + ] + } + } + }, + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/views/swaggerExample", + "name": "swaggerExample", + "type": "Microsoft.CostManagement/Views", + "eTag": "\"1d4ffa5a9c2430c\"", + "properties": { + "displayName": "swagger Example", + "scope": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", + "query": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [], + "sorting": [ + { + "direction": "Ascending", + "name": "UsageDate" + } + ] + } + }, + "chart": "Table", + "accumulated": "true", + "metric": "ActualCost", + "kpis": [ + { + "type": "Forecast", + "id": null, + "enabled": true + }, + { + "type": "Budget", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo", + "enabled": true + } + ], + "pivots": [ + { + "type": "Dimension", + "name": "ServiceName" + }, + { + "type": "Dimension", + "name": "MeterCategory" + }, + { + "type": "TagKey", + "name": "swaggerTagKey" + } + ] + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewDeleteByResourceGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewDeleteByResourceGroup.json new file mode 100644 index 000000000000..c613cb7cecff --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewDeleteByResourceGroup.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", + "viewName": "TestView" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewListByResourceGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewListByResourceGroup.json new file mode 100644 index 000000000000..9f71cbfbe7f5 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewListByResourceGroup.json @@ -0,0 +1,132 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/views/swaggerExample", + "name": "swaggerExample", + "type": "Microsoft.CostManagement/Views", + "eTag": "\"1d4ff9fe66f1d10\"", + "properties": { + "displayName": "swagger Example", + "scope": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", + "query": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [], + "sorting": [ + { + "direction": "Ascending", + "name": "UsageDate" + } + ] + } + }, + "chart": "Table", + "accumulated": "true", + "metric": "ActualCost", + "kpis": [ + { + "type": "Forecast", + "id": null, + "enabled": true + }, + { + "type": "Budget", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo", + "enabled": true + } + ], + "pivots": [ + { + "type": "Dimension", + "name": "ServiceName" + }, + { + "type": "Dimension", + "name": "MeterCategory" + }, + { + "type": "TagKey", + "name": "swaggerTagKey" + } + ] + } + }, + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/views/swaggerExample2", + "name": "swaggerExample2", + "type": "Microsoft.CostManagement/Views", + "eTag": "\"1d4ffa5a9c2430c\"", + "properties": { + "displayName": "swagger Example 2", + "scope": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", + "query": { + "type": "Usage", + "timeframe": "LastMonthToDate", + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [], + "sorting": [ + { + "direction": "Ascending", + "name": "UsageDate" + } + ] + } + }, + "chart": "GroupedColumn", + "accumulated": "true", + "metric": "ActualCost", + "kpis": [ + { + "type": "Forecast", + "id": null, + "enabled": true + }, + { + "type": "Budget", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo", + "enabled": true + } + ], + "pivots": [ + { + "type": "Dimension", + "name": "ServiceName" + }, + { + "type": "Dimension", + "name": "MeterCategory" + }, + { + "type": "TagKey", + "name": "swaggerTagKey" + } + ] + } + } + ] + } + } + } +} From 68a214aeae3956de15ec54f31bdb5db046fab412 Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Fri, 14 Aug 2020 00:01:01 -0700 Subject: [PATCH 44/53] Include additional json in readme --- specification/cost-management/resource-manager/readme.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/specification/cost-management/resource-manager/readme.md b/specification/cost-management/resource-manager/readme.md index a4aa8493d3af..fa6c15581623 100644 --- a/specification/cost-management/resource-manager/readme.md +++ b/specification/cost-management/resource-manager/readme.md @@ -39,7 +39,8 @@ These settings apply only when `--tag=package-preview-2020-03` is specified on t ```yaml $(tag) == 'package-preview-2020-03' input-file: - - Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json + - Microsoft.CostManagement/stable/2019-11-01/costmanagement.json + - Microsoft.CostManagement/preview/2020-03-01-preview/costallocation.json ``` ### Tag: package-2020-06 From 16b467594fedeb727db467ae2cdfb19c625564a1 Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Fri, 14 Aug 2020 00:21:18 -0700 Subject: [PATCH 45/53] Remove items that aren't changing versions --- .../2020-03-01-preview/costallocation.json | 2 +- .../2020-03-01-preview/costmanagement.json | 3283 ----------------- .../examples/BillingAccountAlerts.json | 98 - .../BillingAccountDimensionsList.json | 45 - ...lingAccountDimensionsListExpandAndTop.json | 59 - ...illingAccountDimensionsListWithFilter.json | 40 - .../examples/BillingAccountForecast.json | 117 - .../examples/BillingAccountQuery.json | 107 - .../examples/BillingAccountQueryGrouping.json | 69 - .../examples/BillingProfileAlerts.json | 99 - .../examples/BillingProfileForecast.json | 118 - .../examples/DepartmentAlerts.json | 99 - .../examples/DepartmentDimensionsList.json | 46 - .../DepartmentDimensionsListExpandAndTop.json | 60 - .../DepartmentDimensionsListWithFilter.json | 41 - .../examples/DepartmentForecast.json | 118 - .../examples/DepartmentQuery.json | 108 - .../examples/DepartmentQueryGrouping.json | 70 - .../examples/DismissResourceGroupAlerts.json | 59 - .../examples/DismissSubscriptionAlerts.json | 58 - .../examples/EnrollmentAccountAlerts.json | 99 - .../EnrollmentAccountDimensionsList.json | 46 - ...mentAccountDimensionsListExpandAndTop.json | 60 - ...llmentAccountDimensionsListWithFilter.json | 41 - .../examples/EnrollmentAccountForecast.json | 118 - .../examples/EnrollmentAccountQuery.json | 108 - .../EnrollmentAccountQueryGrouping.json | 77 - .../ExportCreateOrUpdateByBillingAccount.json | 128 - .../ExportCreateOrUpdateByDepartment.json | 129 - ...portCreateOrUpdateByEnrollmentAccount.json | 129 - ...ExportCreateOrUpdateByManagementGroup.json | 128 - .../ExportCreateOrUpdateByResourceGroup.json | 129 - .../ExportCreateOrUpdateBySubscription.json | 128 - .../ExportDeleteByBillingAccount.json | 11 - .../examples/ExportDeleteByDepartment.json | 12 - .../ExportDeleteByEnrollmentAccount.json | 12 - .../ExportDeleteByManagementGroup.json | 11 - .../examples/ExportDeleteByResourceGroup.json | 12 - .../examples/ExportDeleteBySubscription.json | 11 - .../examples/ExportGetByBillingAccount.json | 47 - .../examples/ExportGetByDepartment.json | 48 - .../ExportGetByEnrollmentAccount.json | 48 - .../examples/ExportGetByManagementGroup.json | 47 - .../examples/ExportGetByResourceGroup.json | 48 - .../examples/ExportGetBySubscription.json | 47 - .../examples/ExportRunByBillingAccount.json | 11 - .../examples/ExportRunByDepartment.json | 12 - .../ExportRunByEnrollmentAccount.json | 12 - .../examples/ExportRunByManagementGroup.json | 11 - .../examples/ExportRunByResourceGroup.json | 12 - .../examples/ExportRunBySubscription.json | 11 - .../ExportRunHistoryGetByBillingAccount.json | 100 - .../ExportRunHistoryGetByDepartment.json | 101 - ...xportRunHistoryGetByEnrollmentAccount.json | 101 - .../ExportRunHistoryGetByManagementGroup.json | 100 - .../ExportRunHistoryGetByResourceGroup.json | 101 - .../ExportRunHistoryGetBySubscription.json | 100 - .../examples/ExportsGetByBillingAccount.json | 89 - .../examples/ExportsGetByDepartment.json | 90 - .../ExportsGetByEnrollmentAccount.json | 90 - .../examples/ExportsGetByManagementGroup.json | 89 - .../examples/ExportsGetByResourceGroup.json | 90 - .../examples/ExportsGetBySubscription.json | 89 - .../ExternalBillingAccountAlerts.json | 98 - .../ExternalBillingAccountForecast.json | 99 - .../ExternalBillingAccountsDimensions.json | 45 - .../ExternalBillingAccountsQuery.json | 99 - .../examples/ExternalSubscriptionAlerts.json | 98 - .../ExternalSubscriptionForecast.json | 82 - .../ExternalSubscriptionsDimensions.json | 45 - .../examples/ExternalSubscriptionsQuery.json | 78 - .../examples/InvoiceSectionAlerts.json | 100 - .../examples/InvoiceSectionForecast.json | 119 - .../MCABillingAccountDimensionsList.json | 45 - ...lingAccountDimensionsListExpandAndTop.json | 59 - ...illingAccountDimensionsListWithFilter.json | 40 - .../examples/MCABillingAccountQuery.json | 107 - .../MCABillingAccountQueryGrouping.json | 69 - .../MCABillingProfileDimensionsList.json | 46 - ...lingProfileDimensionsListExpandAndTop.json | 60 - ...illingProfileDimensionsListWithFilter.json | 41 - .../examples/MCABillingProfileQuery.json | 108 - .../MCABillingProfileQueryGrouping.json | 70 - .../examples/MCACustomerDimensionsList.json | 46 - ...MCACustomerDimensionsListExpandAndTop.json | 60 - .../MCACustomerDimensionsListWithFilter.json | 41 - .../examples/MCACustomerQuery.json | 108 - .../examples/MCACustomerQueryGrouping.json | 70 - .../MCAInvoiceSectionDimensionsList.json | 47 - ...oiceSectionDimensionsListExpandAndTop.json | 61 - ...nvoiceSectionDimensionsListWithFilter.json | 42 - .../examples/MCAInvoiceSectionQuery.json | 109 - .../MCAInvoiceSectionQueryGrouping.json | 71 - .../ManagementGroupDimensionsList.json | 45 - ...gementGroupDimensionsListExpandAndTop.json | 59 - ...nagementGroupDimensionsListWithFilter.json | 40 - .../examples/ManagementGroupQuery.json | 107 - .../ManagementGroupQueryGrouping.json | 76 - .../examples/PrivateView.json | 69 - .../examples/PrivateViewCreateOrUpdate.json | 185 - .../examples/PrivateViewDelete.json | 10 - .../examples/PrivateViewList.json | 131 - .../examples/ResourceGroupAlerts.json | 99 - .../examples/ResourceGroupDimensionsList.json | 56 - .../examples/ResourceGroupForecast.json | 97 - .../examples/ResourceGroupQuery.json | 96 - .../examples/ResourceGroupQueryGrouping.json | 71 - .../examples/SingleResourceGroupAlert.json | 54 - .../examples/SingleSubscriptionAlert.json | 53 - .../examples/SubscriptionAlerts.json | 98 - .../examples/SubscriptionDimensionsList.json | 58 - .../examples/SubscriptionForecast.json | 117 - .../examples/SubscriptionQuery.json | 107 - .../examples/SubscriptionQueryGrouping.json | 74 - .../examples/ViewByResourceGroup.json | 70 - .../ViewCreateOrUpdateByResourceGroup.json | 186 - .../examples/ViewDeleteByResourceGroup.json | 11 - .../examples/ViewListByResourceGroup.json | 132 - 118 files changed, 1 insertion(+), 11842 deletions(-) delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountAlerts.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountDimensionsList.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountDimensionsListExpandAndTop.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountDimensionsListWithFilter.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountForecast.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountQuery.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountQueryGrouping.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingProfileAlerts.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingProfileForecast.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentAlerts.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentDimensionsList.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentDimensionsListExpandAndTop.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentDimensionsListWithFilter.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentForecast.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentQuery.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentQueryGrouping.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DismissResourceGroupAlerts.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DismissSubscriptionAlerts.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountAlerts.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountDimensionsList.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountDimensionsListExpandAndTop.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountDimensionsListWithFilter.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountForecast.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountQuery.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountQueryGrouping.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportCreateOrUpdateByBillingAccount.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportCreateOrUpdateByDepartment.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportCreateOrUpdateByEnrollmentAccount.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportCreateOrUpdateByManagementGroup.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportCreateOrUpdateByResourceGroup.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportCreateOrUpdateBySubscription.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportDeleteByBillingAccount.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportDeleteByDepartment.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportDeleteByEnrollmentAccount.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportDeleteByManagementGroup.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportDeleteByResourceGroup.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportDeleteBySubscription.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportGetByBillingAccount.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportGetByDepartment.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportGetByEnrollmentAccount.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportGetByManagementGroup.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportGetByResourceGroup.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportGetBySubscription.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunByBillingAccount.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunByDepartment.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunByEnrollmentAccount.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunByManagementGroup.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunByResourceGroup.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunBySubscription.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunHistoryGetByBillingAccount.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunHistoryGetByDepartment.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunHistoryGetByEnrollmentAccount.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunHistoryGetByManagementGroup.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunHistoryGetByResourceGroup.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunHistoryGetBySubscription.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportsGetByBillingAccount.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportsGetByDepartment.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportsGetByEnrollmentAccount.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportsGetByManagementGroup.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportsGetByResourceGroup.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportsGetBySubscription.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalBillingAccountAlerts.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalBillingAccountForecast.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalBillingAccountsDimensions.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalBillingAccountsQuery.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalSubscriptionAlerts.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalSubscriptionForecast.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalSubscriptionsDimensions.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalSubscriptionsQuery.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/InvoiceSectionAlerts.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/InvoiceSectionForecast.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingAccountDimensionsList.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingAccountDimensionsListExpandAndTop.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingAccountDimensionsListWithFilter.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingAccountQuery.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingAccountQueryGrouping.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingProfileDimensionsList.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingProfileDimensionsListExpandAndTop.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingProfileDimensionsListWithFilter.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingProfileQuery.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingProfileQueryGrouping.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCACustomerDimensionsList.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCACustomerDimensionsListExpandAndTop.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCACustomerDimensionsListWithFilter.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCACustomerQuery.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCACustomerQueryGrouping.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCAInvoiceSectionDimensionsList.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCAInvoiceSectionDimensionsListExpandAndTop.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCAInvoiceSectionDimensionsListWithFilter.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCAInvoiceSectionQuery.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCAInvoiceSectionQueryGrouping.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ManagementGroupDimensionsList.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ManagementGroupDimensionsListExpandAndTop.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ManagementGroupDimensionsListWithFilter.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ManagementGroupQuery.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ManagementGroupQueryGrouping.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateView.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewCreateOrUpdate.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewDelete.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewList.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ResourceGroupAlerts.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ResourceGroupDimensionsList.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ResourceGroupForecast.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ResourceGroupQuery.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ResourceGroupQueryGrouping.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SingleResourceGroupAlert.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SingleSubscriptionAlert.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SubscriptionAlerts.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SubscriptionDimensionsList.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SubscriptionForecast.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SubscriptionQuery.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SubscriptionQueryGrouping.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewByResourceGroup.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewCreateOrUpdateByResourceGroup.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewDeleteByResourceGroup.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewListByResourceGroup.json diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costallocation.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costallocation.json index ce5d6a504be2..53f62123268d 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costallocation.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costallocation.json @@ -34,7 +34,7 @@ "flow": "implicit", "description": "Azure Active Directory OAuth2 Flow.", "scopes": { - "user_impersonation": "Impersonate your user account" + "user_impersonation": "impersonate your user account" } } }, diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json deleted file mode 100644 index 456686294225..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costmanagement.json +++ /dev/null @@ -1,3283 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "version": "2020-06-01", - "title": "CostManagementClient" - }, - "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.CostManagement/views": { - "get": { - "tags": [ - "Views" - ], - "operationId": "Views_List", - "description": "Lists all views by tenant and object.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" - }, - "x-ms-examples": { - "PrivateViewList": { - "$ref": "./examples/PrivateViewList.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/apiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/ViewListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/{scope}/providers/Microsoft.CostManagement/views": { - "get": { - "tags": [ - "Views" - ], - "operationId": "Views_ListByScope", - "description": "Lists all views at the given scope.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" - }, - "x-ms-examples": { - "ResourceGroupViewList": { - "$ref": "./examples/ViewListByResourceGroup.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/scopeViewParameter" - }, - { - "$ref": "#/parameters/apiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/ViewListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/providers/Microsoft.CostManagement/views/{viewName}": { - "get": { - "tags": [ - "Views" - ], - "operationId": "Views_Get", - "description": "Gets the view by view name.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" - }, - "x-ms-examples": { - "PrivateView": { - "$ref": "./examples/PrivateView.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/apiVersionParameter" - }, - { - "$ref": "#/parameters/viewNameParameter" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/View" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - }, - "put": { - "tags": [ - "Views" - ], - "operationId": "Views_CreateOrUpdate", - "description": "The operation to create or update a view. Update operation requires latest eTag to be set in the request. 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/costmanagement/" - }, - "x-ms-examples": { - "CreateOrUpdatePrivateView": { - "$ref": "./examples/PrivateViewCreateOrUpdate.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/apiVersionParameter" - }, - { - "$ref": "#/parameters/viewNameParameter" - }, - { - "name": "parameters", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/View" - }, - "description": "Parameters supplied to the CreateOrUpdate View operation." - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/View" - } - }, - "201": { - "description": "Created.", - "schema": { - "$ref": "#/definitions/View" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - }, - "delete": { - "tags": [ - "Views" - ], - "operationId": "Views_Delete", - "description": "The operation to delete a view.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" - }, - "x-ms-examples": { - "DeletePrivateView": { - "$ref": "./examples/PrivateViewDelete.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/apiVersionParameter" - }, - { - "$ref": "#/parameters/viewNameParameter" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded." - }, - "204": { - "description": "NoContent. Resource is not available." - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/{scope}/providers/Microsoft.CostManagement/views/{viewName}": { - "get": { - "tags": [ - "Views" - ], - "operationId": "Views_GetByScope", - "description": "Gets the view for the defined scope by view name.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" - }, - "x-ms-examples": { - "ResourceGroupView": { - "$ref": "./examples/ViewByResourceGroup.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/scopeViewParameter" - }, - { - "$ref": "#/parameters/apiVersionParameter" - }, - { - "$ref": "#/parameters/viewNameParameter" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/View" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - }, - "put": { - "tags": [ - "Views" - ], - "operationId": "Views_CreateOrUpdateByScope", - "description": "The operation to create or update a view. Update operation requires latest eTag to be set in the request. 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/costmanagement/" - }, - "x-ms-examples": { - "ResourceGroupCreateOrUpdateView": { - "$ref": "./examples/ViewCreateOrUpdateByResourceGroup.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/scopeViewParameter" - }, - { - "$ref": "#/parameters/apiVersionParameter" - }, - { - "$ref": "#/parameters/viewNameParameter" - }, - { - "name": "parameters", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/View" - }, - "description": "Parameters supplied to the CreateOrUpdate View operation." - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/View" - } - }, - "201": { - "description": "Created.", - "schema": { - "$ref": "#/definitions/View" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - }, - "delete": { - "tags": [ - "Views" - ], - "operationId": "Views_DeleteByScope", - "description": "The operation to delete a view.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" - }, - "x-ms-examples": { - "ResourceGroupDeleteView": { - "$ref": "./examples/ViewDeleteByResourceGroup.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/scopeViewParameter" - }, - { - "$ref": "#/parameters/apiVersionParameter" - }, - { - "$ref": "#/parameters/viewNameParameter" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded." - }, - "204": { - "description": "NoContent. Resource is not available." - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/{scope}/providers/Microsoft.CostManagement/alerts": { - "get": { - "tags": [ - "Alerts" - ], - "operationId": "Alerts_List", - "description": "Lists the alerts for scope defined.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" - }, - "x-ms-examples": { - "BillingAccountAlerts": { - "$ref": "./examples/BillingAccountAlerts.json" - }, - "BillingProfileAlerts": { - "$ref": "./examples/BillingProfileAlerts.json" - }, - "InvoiceSectionAlerts": { - "$ref": "./examples/InvoiceSectionAlerts.json" - }, - "EnrollmentAccountAlerts": { - "$ref": "./examples/EnrollmentAccountAlerts.json" - }, - "DepartmentAlerts": { - "$ref": "./examples/DepartmentAlerts.json" - }, - "SubscriptionAlerts": { - "$ref": "./examples/SubscriptionAlerts.json" - }, - "ResourceGroupAlerts": { - "$ref": "./examples/ResourceGroupAlerts.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/apiVersionParameter" - }, - { - "$ref": "#/parameters/scopeAlertParameter" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/AlertsResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/{scope}/providers/Microsoft.CostManagement/alerts/{alertId}": { - "get": { - "tags": [ - "Alerts" - ], - "operationId": "Alerts_Get", - "description": "Gets the alert for the scope by alert ID.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" - }, - "x-ms-examples": { - "SubscriptionAlerts": { - "$ref": "./examples/SingleSubscriptionAlert.json" - }, - "ResourceGroupAlerts": { - "$ref": "./examples/SingleResourceGroupAlert.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/apiVersionParameter" - }, - { - "$ref": "#/parameters/scopeAlertParameter" - }, - { - "$ref": "#/parameters/alertIdParameter" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/Alert" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - }, - "patch": { - "tags": [ - "Alerts" - ], - "operationId": "Alerts_Dismiss", - "description": "Dismisses the specified alert", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" - }, - "x-ms-examples": { - "SubscriptionAlerts": { - "$ref": "./examples/DismissSubscriptionAlerts.json" - }, - "ResourceGroupAlerts": { - "$ref": "./examples/DismissResourceGroupAlerts.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/apiVersionParameter" - }, - { - "$ref": "#/parameters/scopeAlertParameter" - }, - { - "$ref": "#/parameters/alertIdParameter" - }, - { - "name": "parameters", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/DismissAlertPayload" - }, - "description": "Parameters supplied to the Dismiss Alert operation." - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/Alert" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/alerts": { - "get": { - "tags": [ - "Alerts" - ], - "operationId": "Alerts_ListExternal", - "description": "Lists the Alerts for external cloud provider type defined.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" - }, - "x-ms-examples": { - "ExternalBillingAccountAlerts": { - "$ref": "./examples/ExternalBillingAccountAlerts.json" - }, - "ExternalSubscriptionAlerts": { - "$ref": "./examples/ExternalSubscriptionAlerts.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/apiVersionParameter" - }, - { - "$ref": "#/parameters/externalCloudProviderTypeParameter" - }, - { - "$ref": "#/parameters/externalCloudProviderIdParameter" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/AlertsResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/{scope}/providers/Microsoft.CostManagement/forecast": { - "post": { - "tags": [ - "Forecast" - ], - "operationId": "Forecast_Usage", - "description": "Lists the forecast charges for scope defined.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" - }, - "x-ms-examples": { - "BillingAccountForecast": { - "$ref": "./examples/BillingAccountForecast.json" - }, - "BillingProfileForecast": { - "$ref": "./examples/BillingProfileForecast.json" - }, - "InvoiceSectionForecast": { - "$ref": "./examples/InvoiceSectionForecast.json" - }, - "EnrollmentAccountForecast": { - "$ref": "./examples/EnrollmentAccountForecast.json" - }, - "DepartmentForecast": { - "$ref": "./examples/DepartmentForecast.json" - }, - "SubscriptionForecast": { - "$ref": "./examples/SubscriptionForecast.json" - }, - "ResourceGroupForecast": { - "$ref": "./examples/ResourceGroupForecast.json" - } - }, - "parameters": [ - { - "name": "$filter", - "description": "May be used to filter forecasts by properties/usageDate (Utc time), properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'.", - "in": "query", - "required": false, - "type": "string" - }, - { - "$ref": "#/parameters/apiVersionParameter" - }, - { - "$ref": "#/parameters/scopeForecastParameter" - }, - { - "name": "parameters", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/ForecastDefinition" - }, - "description": "Parameters supplied to the CreateOrUpdate Forecast Config operation." - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/QueryResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/forecast": { - "post": { - "tags": [ - "Forecast" - ], - "operationId": "Forecast_ExternalCloudProviderUsage", - "description": "Lists the forecast charges for external cloud provider type defined.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" - }, - "x-ms-examples": { - "ExternalBillingAccountForecast": { - "$ref": "./examples/ExternalBillingAccountForecast.json" - }, - "ExternalSubscriptionForecast": { - "$ref": "./examples/ExternalSubscriptionForecast.json" - } - }, - "parameters": [ - { - "name": "$filter", - "description": "May be used to filter forecasts by properties/usageDate (Utc time), properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'.", - "in": "query", - "required": false, - "type": "string" - }, - { - "$ref": "#/parameters/apiVersionParameter" - }, - { - "$ref": "#/parameters/externalCloudProviderTypeParameter" - }, - { - "$ref": "#/parameters/externalCloudProviderIdParameter" - }, - { - "name": "parameters", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/ForecastDefinition" - }, - "description": "Parameters supplied to the CreateOrUpdate Forecast Config operation." - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/QueryResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/{scope}/providers/Microsoft.CostManagement/dimensions": { - "get": { - "tags": [ - "Dimensions" - ], - "x-ms-odata": "#/definitions/Dimension", - "operationId": "Dimensions_List", - "description": "Lists the dimensions by the defined scope.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" - }, - "x-ms-examples": { - "SubscriptionDimensionsList-Legacy": { - "$ref": "./examples/SubscriptionDimensionsList.json" - }, - "ResourceGroupDimensionsList-Legacy": { - "$ref": "./examples/ResourceGroupDimensionsList.json" - }, - "ManagementGroupDimensionsList-Legacy": { - "$ref": "./examples/ManagementGroupDimensionsList.json" - }, - "ManagementGroupDimensionsListExpandAndTop-Legacy": { - "$ref": "./examples/ManagementGroupDimensionsListExpandAndTop.json" - }, - "ManagementGroupDimensionsListWithFilter-Legacy": { - "$ref": "./examples/ManagementGroupDimensionsListWithFilter.json" - }, - "DepartmentDimensionsList-Legacy": { - "$ref": "./examples/DepartmentDimensionsList.json" - }, - "DepartmentDimensionsListExpandAndTop-Legacy": { - "$ref": "./examples/DepartmentDimensionsListExpandAndTop.json" - }, - "DepartmentDimensionsListWithFilter-Legacy": { - "$ref": "./examples/DepartmentDimensionsListWithFilter.json" - }, - "EnrollmentAccountDimensionsList-Legacy": { - "$ref": "./examples/EnrollmentAccountDimensionsList.json" - }, - "EnrollmentAccountDimensionsListExpandAndTop-Legacy": { - "$ref": "./examples/EnrollmentAccountDimensionsListExpandAndTop.json" - }, - "EnrollmentAccountDimensionsListWithFilter-Legacy": { - "$ref": "./examples/EnrollmentAccountDimensionsListWithFilter.json" - }, - "BillingAccountDimensionsList-Legacy": { - "$ref": "./examples/BillingAccountDimensionsList.json" - }, - "BillingAccountDimensionsListExpandAndTop-Legacy": { - "$ref": "./examples/BillingAccountDimensionsListExpandAndTop.json" - }, - "BillingAccountDimensionsListWithFilter-Legacy": { - "$ref": "./examples/BillingAccountDimensionsListWithFilter.json" - }, - "BillingAccountDimensionsList-Modern": { - "$ref": "./examples/MCABillingAccountDimensionsList.json" - }, - "BillingAccountDimensionsListExpandAndTop-Modern": { - "$ref": "./examples/MCABillingAccountDimensionsListExpandAndTop.json" - }, - "BillingAccountDimensionsListWithFilter-Modern": { - "$ref": "./examples/MCABillingAccountDimensionsListWithFilter.json" - }, - "BillingProfileDimensionsList-Modern": { - "$ref": "./examples/MCABillingProfileDimensionsList.json" - }, - "BillingProfileDimensionsListExpandAndTop-Modern": { - "$ref": "./examples/MCABillingProfileDimensionsListExpandAndTop.json" - }, - "BillingProfileDimensionsListWithFilter-Modern": { - "$ref": "./examples/MCABillingProfileDimensionsListWithFilter.json" - }, - "InvoiceSectionDimensionsList-Modern": { - "$ref": "./examples/MCAInvoiceSectionDimensionsList.json" - }, - "InvoiceSectionDimensionsListExpandAndTop-Modern": { - "$ref": "./examples/MCAInvoiceSectionDimensionsListExpandAndTop.json" - }, - "InvoiceSectionDimensionsListWithFilter-Modern": { - "$ref": "./examples/MCAInvoiceSectionDimensionsListWithFilter.json" - }, - "CustomerDimensionsList-Modern": { - "$ref": "./examples/MCACustomerDimensionsList.json" - }, - "CustomerDimensionsListExpandAndTop-Modern": { - "$ref": "./examples/MCACustomerDimensionsListExpandAndTop.json" - }, - "CustomerDimensionsListWithFilter-Modern": { - "$ref": "./examples/MCACustomerDimensionsListWithFilter.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/scopeDimensionParameter" - }, - { - "$ref": "#/parameters/apiVersionParameter" - }, - { - "name": "$filter", - "description": "May be used to filter dimensions by properties/category, properties/usageStart, properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "$expand", - "description": "May be used to expand the properties/data within a dimension category. By default, data is not included when listing dimensions.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "$skiptoken", - "description": "Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "$top", - "description": "May be used to limit the number of results to the most recent N dimension data.", - "in": "query", - "required": false, - "type": "integer", - "minimum": 1, - "maximum": 1000 - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/DimensionsListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - }, - "x-ms-pageable": { - "nextLinkName": null - } - } - }, - "/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/dimensions": { - "get": { - "tags": [ - "Dimensions" - ], - "x-ms-odata": "#/definitions/Dimension", - "operationId": "Dimensions_ByExternalCloudProviderType", - "description": "Lists the dimensions by the external cloud provider type.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" - }, - "x-ms-examples": { - "ExternalBillingAccountDimensionList": { - "$ref": "./examples/ExternalBillingAccountsDimensions.json" - }, - "ExternalSubscriptionDimensionList": { - "$ref": "./examples/ExternalSubscriptionsDimensions.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/externalCloudProviderTypeParameter" - }, - { - "$ref": "#/parameters/externalCloudProviderIdParameter" - }, - { - "$ref": "#/parameters/apiVersionParameter" - }, - { - "name": "$filter", - "description": "May be used to filter dimensions by properties/category, properties/usageStart, properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "$expand", - "description": "May be used to expand the properties/data within a dimension category. By default, data is not included when listing dimensions.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "$skiptoken", - "description": "Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "$top", - "description": "May be used to limit the number of results to the most recent N dimension data.", - "in": "query", - "required": false, - "type": "integer", - "minimum": 1, - "maximum": 1000 - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/DimensionsListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - }, - "x-ms-pageable": { - "nextLinkName": null - } - } - }, - "/{scope}/providers/Microsoft.CostManagement/query": { - "post": { - "tags": [ - "Query" - ], - "operationId": "Query_Usage", - "description": "Query the usage data for scope defined.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" - }, - "x-ms-examples": { - "SubscriptionQuery-Legacy": { - "$ref": "./examples/SubscriptionQuery.json" - }, - "SubscriptionQueryGrouping-Legacy": { - "$ref": "./examples/SubscriptionQueryGrouping.json" - }, - "ResourceGroupQuery-Legacy": { - "$ref": "./examples/ResourceGroupQuery.json" - }, - "ResourceGroupQueryGrouping-Legacy": { - "$ref": "./examples/ResourceGroupQueryGrouping.json" - }, - "BillingAccountQuery-Legacy": { - "$ref": "./examples/BillingAccountQuery.json" - }, - "BillingAccountQueryGrouping-Legacy": { - "$ref": "./examples/BillingAccountQueryGrouping.json" - }, - "EnrollmentAccountQuery-Legacy": { - "$ref": "./examples/EnrollmentAccountQuery.json" - }, - "EnrollmentAccountQueryGrouping-Legacy": { - "$ref": "./examples/EnrollmentAccountQueryGrouping.json" - }, - "DepartmentQuery-Legacy": { - "$ref": "./examples/DepartmentQuery.json" - }, - "DepartmentQueryGrouping-Legacy": { - "$ref": "./examples/DepartmentQueryGrouping.json" - }, - "ManagementGroupQuery-Legacy": { - "$ref": "./examples/ManagementGroupQuery.json" - }, - "ManagementGroupQueryGrouping-Legacy": { - "$ref": "./examples/ManagementGroupQueryGrouping.json" - }, - "BillingAccountQuery-Modern": { - "$ref": "./examples/MCABillingAccountQuery.json" - }, - "BillingAccountQueryGrouping-Modern": { - "$ref": "./examples/MCABillingAccountQueryGrouping.json" - }, - "BillingProfileQuery-Modern": { - "$ref": "./examples/MCABillingProfileQuery.json" - }, - "BillingProfileQueryGrouping-Modern": { - "$ref": "./examples/MCABillingProfileQueryGrouping.json" - }, - "InvoiceSectionQuery-Modern": { - "$ref": "./examples/MCAInvoiceSectionQuery.json" - }, - "InvoiceSectionQueryGrouping-Modern": { - "$ref": "./examples/MCAInvoiceSectionQueryGrouping.json" - }, - "CustomerQuery-Modern": { - "$ref": "./examples/MCACustomerQuery.json" - }, - "CustomerQueryGrouping-Modern": { - "$ref": "./examples/MCACustomerQueryGrouping.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/scopeQueryParameter" - }, - { - "$ref": "#/parameters/apiVersionParameter" - }, - { - "name": "parameters", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/QueryDefinition" - }, - "description": "Parameters supplied to the CreateOrUpdate Query Config operation." - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/QueryResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/query": { - "post": { - "tags": [ - "Query" - ], - "operationId": "Query_UsageByExternalCloudProviderType", - "description": "Query the usage data for external cloud provider type defined.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" - }, - "x-ms-examples": { - "ExternalBillingAccountQueryList": { - "$ref": "./examples/ExternalBillingAccountsQuery.json" - }, - "ExternalSubscriptionsQuery": { - "$ref": "./examples/ExternalSubscriptionsQuery.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/externalCloudProviderTypeParameter" - }, - { - "$ref": "#/parameters/externalCloudProviderIdParameter" - }, - { - "$ref": "#/parameters/apiVersionParameter" - }, - { - "name": "parameters", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/QueryDefinition" - }, - "description": "Parameters supplied to the CreateOrUpdate Query Config operation." - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/QueryResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/{scope}/providers/Microsoft.CostManagement/exports": { - "get": { - "tags": [ - "Exports" - ], - "operationId": "Exports_List", - "description": "The operation to list all exports at the given scope.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" - }, - "x-ms-examples": { - "ExportsGetBySubscription": { - "$ref": "./examples/ExportsGetBySubscription.json" - }, - "ExportsGetByResourceGroup": { - "$ref": "./examples/ExportsGetByResourceGroup.json" - }, - "ExportsGetByBillingAccount": { - "$ref": "./examples/ExportsGetByBillingAccount.json" - }, - "ExportsGetByDepartment": { - "$ref": "./examples/ExportsGetByDepartment.json" - }, - "ExportsGetByEnrollmentAccount": { - "$ref": "./examples/ExportsGetByEnrollmentAccount.json" - }, - "ExportsGetByManagementGroup": { - "$ref": "./examples/ExportsGetByManagementGroup.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/scopeQueryParameter" - }, - { - "$ref": "#/parameters/apiVersionParameter" - }, - { - "name": "$expand", - "description": "May be used to expand the properties within an export. Currently only 'runHistory' is supported and will return information for the last execution of each export.", - "in": "query", - "required": false, - "type": "string" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/ExportListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/{scope}/providers/Microsoft.CostManagement/exports/{exportName}": { - "get": { - "tags": [ - "Exports" - ], - "operationId": "Exports_Get", - "description": "The operation to get the export for the defined scope by export name.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" - }, - "x-ms-examples": { - "ExportGetBySubscription": { - "$ref": "./examples/ExportGetBySubscription.json" - }, - "ExportGetByResourceGroup": { - "$ref": "./examples/ExportGetByResourceGroup.json" - }, - "ExportGetByBillingAccount": { - "$ref": "./examples/ExportGetByBillingAccount.json" - }, - "ExportGetByDepartment": { - "$ref": "./examples/ExportGetByDepartment.json" - }, - "ExportGetByEnrollmentAccount": { - "$ref": "./examples/ExportGetByEnrollmentAccount.json" - }, - "ExportGetByManagementGroup": { - "$ref": "./examples/ExportGetByManagementGroup.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/scopeQueryParameter" - }, - { - "$ref": "#/parameters/apiVersionParameter" - }, - { - "$ref": "#/parameters/exportNameParameter" - }, - { - "name": "$expand", - "description": "May be used to expand the properties within an export. Currently only 'runHistory' is supported and will return information for the last 10 executions of the export.", - "in": "query", - "required": false, - "type": "string" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/Export" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - }, - "put": { - "tags": [ - "Exports" - ], - "operationId": "Exports_CreateOrUpdate", - "description": "The operation to create or update a export. Update operation requires latest eTag to be set in the request. 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/costmanagement/" - }, - "x-ms-examples": { - "ExportCreateOrUpdateBySubscription": { - "$ref": "./examples/ExportCreateOrUpdateBySubscription.json" - }, - "ExportCreateOrUpdateByResourceGroup": { - "$ref": "./examples/ExportCreateOrUpdateByResourceGroup.json" - }, - "ExportCreateOrUpdateByBillingAccount": { - "$ref": "./examples/ExportCreateOrUpdateByBillingAccount.json" - }, - "ExportCreateOrUpdateByDepartment": { - "$ref": "./examples/ExportCreateOrUpdateByDepartment.json" - }, - "ExportCreateOrUpdateByEnrollmentAccount": { - "$ref": "./examples/ExportCreateOrUpdateByEnrollmentAccount.json" - }, - "ExportCreateOrUpdateByManagementGroup": { - "$ref": "./examples/ExportCreateOrUpdateByManagementGroup.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/scopeQueryParameter" - }, - { - "$ref": "#/parameters/apiVersionParameter" - }, - { - "$ref": "#/parameters/exportNameParameter" - }, - { - "name": "parameters", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/Export" - }, - "description": "Parameters supplied to the CreateOrUpdate Export operation." - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/Export" - } - }, - "201": { - "description": "Created.", - "schema": { - "$ref": "#/definitions/Export" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - }, - "delete": { - "tags": [ - "Exports" - ], - "operationId": "Exports_Delete", - "description": "The operation to delete a export.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" - }, - "x-ms-examples": { - "ExportDeleteBySubscription": { - "$ref": "./examples/ExportDeleteBySubscription.json" - }, - "ExportDeleteByResourceGroup": { - "$ref": "./examples/ExportDeleteByResourceGroup.json" - }, - "ExportDeleteByBillingAccount": { - "$ref": "./examples/ExportDeleteByBillingAccount.json" - }, - "ExportDeleteByEnrollmentAccount": { - "$ref": "./examples/ExportDeleteByEnrollmentAccount.json" - }, - "ExportDeleteByDepartment": { - "$ref": "./examples/ExportDeleteByDepartment.json" - }, - "ExportDeleteByManagementGroup": { - "$ref": "./examples/ExportDeleteByManagementGroup.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/scopeQueryParameter" - }, - { - "$ref": "#/parameters/apiVersionParameter" - }, - { - "$ref": "#/parameters/exportNameParameter" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded." - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/{scope}/providers/Microsoft.CostManagement/exports/{exportName}/run": { - "post": { - "tags": [ - "Exports" - ], - "operationId": "Exports_Execute", - "description": "The operation to execute an export.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" - }, - "x-ms-examples": { - "ExportRunBySubscription": { - "$ref": "./examples/ExportRunBySubscription.json" - }, - "ExportRunByResourceGroup": { - "$ref": "./examples/ExportRunByResourceGroup.json" - }, - "ExportRunByBillingAccount": { - "$ref": "./examples/ExportRunByBillingAccount.json" - }, - "ExportRunByDepartment": { - "$ref": "./examples/ExportRunByDepartment.json" - }, - "ExportRunByEnrollmentAccount": { - "$ref": "./examples/ExportRunByEnrollmentAccount.json" - }, - "ExportRunByManagementGroup": { - "$ref": "./examples/ExportRunByManagementGroup.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/scopeQueryParameter" - }, - { - "$ref": "#/parameters/apiVersionParameter" - }, - { - "$ref": "#/parameters/exportNameParameter" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded." - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/{scope}/providers/Microsoft.CostManagement/exports/{exportName}/runHistory": { - "get": { - "tags": [ - "Exports" - ], - "operationId": "Exports_GetExecutionHistory", - "description": "The operation to get the execution history of an export for the defined scope and export name.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" - }, - "x-ms-examples": { - "ExportRunHistoryGetBySubscription": { - "$ref": "./examples/ExportRunHistoryGetBySubscription.json" - }, - "ExportRunHistoryGetByResourceGroup": { - "$ref": "./examples/ExportRunHistoryGetByResourceGroup.json" - }, - "ExportRunHistoryGetByBillingAccount": { - "$ref": "./examples/ExportRunHistoryGetByBillingAccount.json" - }, - "ExportRunHistoryGetByDepartment": { - "$ref": "./examples/ExportRunHistoryGetByDepartment.json" - }, - "ExportRunHistoryGetByEnrollmentAccount": { - "$ref": "./examples/ExportRunHistoryGetByEnrollmentAccount.json" - }, - "ExportRunHistoryGetByManagementGroup": { - "$ref": "./examples/ExportRunHistoryGetByManagementGroup.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/scopeQueryParameter" - }, - { - "$ref": "#/parameters/apiVersionParameter" - }, - { - "$ref": "#/parameters/exportNameParameter" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/ExportExecutionListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/providers/Microsoft.CostManagement/operations": { - "get": { - "tags": [ - "Operations" - ], - "operationId": "Operations_List", - "description": "Lists all of the available cost management 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": { - "ReportConfigDefinition": { - "description": "The definition of a report config.", - "properties": { - "type": { - "description": "The type of the report. Usage represents actual usage, forecast represents forecasted data and UsageAndForecast represents both usage and forecasted data. Actual usage and forecasted data can be differentiated based on dates.", - "type": "string", - "enum": [ - "Usage" - ], - "x-ms-enum": { - "name": "ReportType", - "modelAsString": true - } - }, - "timeframe": { - "description": "The time frame for pulling data for the report. If custom, then a specific time period must be provided.", - "type": "string", - "enum": [ - "WeekToDate", - "MonthToDate", - "YearToDate", - "Custom" - ], - "x-ms-enum": { - "name": "ReportTimeframeType", - "modelAsString": true - } - }, - "timePeriod": { - "description": "Has time period for pulling data for the report.", - "$ref": "#/definitions/ReportConfigTimePeriod" - }, - "dataset": { - "description": "Has definition for data in this report config.", - "$ref": "#/definitions/ReportConfigDataset" - } - }, - "required": [ - "type", - "timeframe" - ] - }, - "ReportConfigTimePeriod": { - "description": "The start and end date for pulling data for the report.", - "properties": { - "from": { - "description": "The start date to pull data from.", - "type": "string", - "format": "date-time" - }, - "to": { - "description": "The end date to pull data to.", - "type": "string", - "format": "date-time" - } - }, - "required": [ - "from", - "to" - ] - }, - "ReportConfigDataset": { - "description": "The definition of data present in the report.", - "properties": { - "granularity": { - "description": "The granularity of rows in the report.", - "type": "string", - "enum": [ - "Daily", - "Monthly" - ], - "x-ms-enum": { - "name": "ReportGranularityType", - "modelAsString": true - } - }, - "configuration": { - "description": "Has configuration information for the data in the report. The configuration will be ignored if aggregation and grouping are provided.", - "$ref": "#/definitions/ReportConfigDatasetConfiguration" - }, - "aggregation": { - "type": "object", - "description": "Dictionary of aggregation expression to use in the report. The key of each item in the dictionary is the alias for the aggregated column. Report can have up to 2 aggregation clauses.", - "additionalProperties": { - "type": "object", - "$ref": "#/definitions/ReportConfigAggregation" - }, - "maxItems": 2 - }, - "grouping": { - "description": "Array of group by expression to use in the report. Report can have up to 2 group by clauses.", - "type": "array", - "items": { - "$ref": "#/definitions/ReportConfigGrouping" - }, - "maxItems": 2 - }, - "sorting": { - "description": "Array of order by expression to use in the report.", - "type": "array", - "items": { - "$ref": "#/definitions/ReportConfigSorting" - } - }, - "filter": { - "type": "object", - "description": "Has filter expression to use in the report.", - "$ref": "#/definitions/ReportConfigFilter" - } - } - }, - "ReportConfigDatasetConfiguration": { - "description": "The configuration of dataset in the report.", - "properties": { - "columns": { - "description": "Array of column names to be included in the report. Any valid report column name is allowed. If not provided, then report includes all columns.", - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "ReportConfigAggregation": { - "description": "The aggregation expression to be used in the report.", - "properties": { - "name": { - "description": "The name of the column to aggregate.", - "type": "string" - }, - "function": { - "description": "The name of the aggregation function to use.", - "type": "string", - "enum": [ - "Sum" - ], - "x-ms-enum": { - "name": "FunctionType", - "modelAsString": true - } - } - }, - "required": [ - "name", - "function" - ] - }, - "ReportConfigSorting": { - "description": "The order by expression to be used in the report.", - "properties": { - "direction": { - "description": "Direction of sort.", - "type": "string", - "enum": [ - "Ascending", - "Descending" - ] - }, - "name": { - "description": "The name of the column to sort.", - "type": "string" - } - }, - "required": [ - "name" - ] - }, - "ReportConfigGrouping": { - "description": "The group by expression to be used in the report.", - "properties": { - "type": { - "description": "Has type of the column to group.", - "$ref": "#/definitions/ReportConfigColumnType" - }, - "name": { - "description": "The name of the column to group. This version supports subscription lowest possible grain.", - "type": "string" - } - }, - "required": [ - "type", - "name" - ] - }, - "ReportConfigFilter": { - "description": "The filter expression to be used in the report.", - "properties": { - "and": { - "description": "The logical \"AND\" expression. Must have at least 2 items.", - "type": "array", - "items": { - "$ref": "#/definitions/ReportConfigFilter" - }, - "minItems": 2 - }, - "or": { - "description": "The logical \"OR\" expression. Must have at least 2 items.", - "type": "array", - "items": { - "$ref": "#/definitions/ReportConfigFilter" - }, - "minItems": 2 - }, - "not": { - "description": "The logical \"NOT\" expression.", - "$ref": "#/definitions/ReportConfigFilter" - }, - "dimension": { - "description": "Has comparison expression for a dimension", - "$ref": "#/definitions/ReportConfigComparisonExpression" - }, - "tag": { - "description": "Has comparison expression for a tag", - "$ref": "#/definitions/ReportConfigComparisonExpression" - } - } - }, - "ReportConfigColumnType": { - "description": "The type of the column in the report.", - "type": "string", - "enum": [ - "Tag", - "Dimension" - ], - "x-ms-enum": { - "name": "ReportConfigColumnType", - "modelAsString": true - } - }, - "ReportConfigComparisonExpression": { - "description": "The comparison expression to be used in the report.", - "properties": { - "name": { - "description": "The name of the column to use in comparison.", - "type": "string" - }, - "operator": { - "description": "The operator to use for comparison.", - "type": "string", - "enum": [ - "In", - "Contains" - ], - "x-ms-enum": { - "name": "OperatorType", - "modelAsString": true - } - }, - "values": { - "description": "Array of values to use for comparison", - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1 - } - }, - "required": [ - "name", - "operator", - "values" - ] - }, - "ViewListResult": { - "description": "Result of listing views. It contains a list of available views.", - "type": "object", - "properties": { - "value": { - "description": "The list of views.", - "type": "array", - "readOnly": true, - "items": { - "$ref": "#/definitions/View" - } - }, - "nextLink": { - "description": "The link (url) to the next page of results.", - "type": "string", - "readOnly": true - } - } - }, - "View": { - "description": "States and configurations of Cost Analysis.", - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/ProxyResource" - } - ], - "properties": { - "properties": { - "x-ms-client-flatten": true, - "$ref": "#/definitions/ViewProperties", - "title": "View properties" - } - } - }, - "ViewProperties": { - "type": "object", - "description": "The properties of the view.", - "properties": { - "displayName": { - "description": "User input name of the view. Required.", - "type": "string" - }, - "scope": { - "description": "Cost Management scope to save the view on. 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, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for BillingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, '/providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for ExternalBillingAccount scope, and '/providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for ExternalSubscription scope.", - "type": "string" - }, - "createdOn": { - "description": "Date the user created this view.", - "type": "string", - "format": "date-time", - "readOnly": true - }, - "modifiedOn": { - "description": "Date when the user last modified this view.", - "type": "string", - "format": "date-time", - "readOnly": true - }, - "query": { - "description": "Query body configuration. Required.", - "type": "object", - "x-ms-client-flatten": true, - "$ref": "#/definitions/ReportConfigDefinition" - }, - "chart": { - "description": "Chart type of the main view in Cost Analysis. Required.", - "type": "string", - "enum": [ - "Area", - "Line", - "StackedColumn", - "GroupedColumn", - "Table" - ], - "x-ms-enum": { - "name": "ChartType", - "modelAsString": true - } - }, - "accumulated": { - "description": "Show costs accumulated over time.", - "type": "string", - "enum": [ - "true", - "false" - ], - "x-ms-enum": { - "name": "AccumulatedType", - "modelAsString": true - } - }, - "metric": { - "description": "Metric to use when displaying costs.", - "type": "string", - "enum": [ - "ActualCost", - "AmortizedCost", - "AHUB" - ], - "x-ms-enum": { - "name": "MetricType", - "modelAsString": true - } - }, - "kpis": { - "description": "List of KPIs to show in Cost Analysis UI.", - "type": "array", - "items": { - "$ref": "#/definitions/KpiProperties" - } - }, - "pivots": { - "description": "Configuration of 3 sub-views in the Cost Analysis UI.", - "type": "array", - "items": { - "$ref": "#/definitions/PivotProperties" - } - } - } - }, - "KpiProperties": { - "description": "Each KPI must contain a 'type' and 'enabled' key.", - "type": "object", - "properties": { - "type": { - "description": "KPI type (Forecast, Budget).", - "type": "string", - "enum": [ - "Forecast", - "Budget" - ], - "x-ms-enum": { - "name": "KpiTypeType", - "modelAsString": true - } - }, - "id": { - "description": "ID of resource related to metric (budget).", - "type": "string" - }, - "enabled": { - "description": "show the KPI in the UI?", - "type": "boolean" - } - } - }, - "PivotProperties": { - "description": "Each pivot must contain a 'type' and 'name'.", - "type": "object", - "properties": { - "type": { - "description": "Data type to show in view.", - "type": "string", - "enum": [ - "Dimension", - "TagKey" - ], - "x-ms-enum": { - "name": "PivotTypeType", - "modelAsString": true - } - }, - "name": { - "description": "Data field to show in view.", - "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. \n\nSome Error responses: \n\n * 429 TooManyRequests - Request is throttled. Retry after waiting for the time specified in the \"x-ms-ratelimit-microsoft.consumption-retry-after\" header. \n\n * 503 ServiceUnavailable - Service is temporarily unavailable. Retry after waiting for the time specified in the \"Retry-After\" header.", - "type": "object", - "properties": { - "error": { - "description": "The details of the error.", - "$ref": "#/definitions/ErrorDetails" - } - } - }, - "Resource": { - "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." - }, - "tags": { - "readOnly": true, - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Resource tags." - } - }, - "x-ms-azure-resource": 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 - }, - "DimensionsListResult": { - "description": "Result of listing dimensions. It contains a list of available dimensions.", - "type": "object", - "properties": { - "value": { - "description": "The list of dimensions.", - "type": "array", - "readOnly": true, - "items": { - "$ref": "#/definitions/Dimension" - } - } - } - }, - "Dimension": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/Resource" - } - ], - "properties": { - "properties": { - "x-ms-client-flatten": true, - "$ref": "#/definitions/DimensionProperties", - "title": "Dimension properties" - } - } - }, - "DimensionProperties": { - "type": "object", - "properties": { - "description": { - "description": "Dimension description.", - "type": "string", - "readOnly": true - }, - "filterEnabled": { - "description": "Filter enabled.", - "type": "boolean", - "readOnly": true - }, - "groupingEnabled": { - "description": "Grouping enabled.", - "type": "boolean", - "readOnly": true - }, - "data": { - "type": "array", - "items": { - "description": "Dimension data item.", - "type": "string", - "readOnly": true - } - }, - "total": { - "description": "Total number of data for the dimension.", - "format": "int32", - "type": "integer", - "readOnly": true - }, - "category": { - "description": "Dimension category.", - "type": "string", - "readOnly": true - }, - "usageStart": { - "description": "Usage start.", - "format": "date-time", - "type": "string", - "readOnly": true - }, - "usageEnd": { - "description": "Usage end.", - "format": "date-time", - "type": "string", - "readOnly": true - }, - "nextLink": { - "description": "The link (url) to the next page of results.", - "type": "string", - "readOnly": true - } - } - }, - "AlertsResult": { - "description": "Result of alerts.", - "type": "object", - "properties": { - "value": { - "description": "List of alerts.", - "type": "array", - "readOnly": true, - "items": { - "$ref": "#/definitions/Alert" - } - }, - "nextLink": { - "description": "URL to get the next set of alerts results if there are any.", - "type": "string", - "readOnly": true - } - } - }, - "Alert": { - "description": "An individual alert.", - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/Resource" - } - ], - "properties": { - "properties": { - "x-ms-client-flatten": true, - "$ref": "#/definitions/AlertProperties", - "title": "Alert properties" - } - } - }, - "AlertProperties": { - "type": "object", - "properties": { - "definition": { - "description": "defines the type of alert", - "type": "object", - "properties": { - "type": { - "description": "type of alert", - "type": "string", - "enum": [ - "Budget", - "Invoice", - "Credit", - "Quota", - "General", - "xCloud", - "BudgetForecast" - ], - "x-ms-enum": { - "name": "AlertType", - "modelAsString": true - } - }, - "category": { - "description": "Alert category", - "type": "string", - "enum": [ - "Cost", - "Usage", - "Billing", - "System" - ], - "x-ms-enum": { - "name": "AlertCategory", - "modelAsString": true - } - }, - "criteria": { - "description": "Criteria that triggered alert", - "type": "string", - "enum": [ - "CostThresholdExceeded", - "UsageThresholdExceeded", - "CreditThresholdApproaching", - "CreditThresholdReached", - "QuotaThresholdApproaching", - "QuotaThresholdReached", - "MultiCurrency", - "ForecastCostThresholdExceeded", - "ForecastUsageThresholdExceeded", - "InvoiceDueDateApproaching", - "InvoiceDueDateReached", - "CrossCloudNewDataAvailable", - "CrossCloudCollectionError", - "GeneralThresholdError" - ], - "x-ms-enum": { - "name": "AlertCriteria", - "modelAsString": true - } - } - } - }, - "description": { - "description": "Alert description", - "type": "string" - }, - "source": { - "description": "Source of alert", - "type": "string", - "enum": [ - "Preset", - "User" - ], - "x-ms-enum": { - "name": "AlertSource", - "modelAsString": true - } - }, - "details": { - "description": "Alert details", - "type": "object", - "properties": { - "timeGrainType": { - "description": "Type of timegrain cadence", - "type": "string", - "enum": [ - "None", - "Monthly", - "Quarterly", - "Annually", - "BillingMonth", - "BillingQuarter", - "BillingAnnual" - ], - "x-ms-enum": { - "name": "AlertTimeGrainType", - "modelAsString": true - } - }, - "periodStartDate": { - "description": "datetime of periodStartDate", - "type": "string" - }, - "triggeredBy": { - "description": "notificationId that triggered this alert", - "type": "string" - }, - "resourceGroupFilter": { - "description": "array of resourceGroups to filter by", - "type": "array", - "items": {} - }, - "resourceFilter": { - "description": "array of resources to filter by", - "type": "array", - "items": {} - }, - "meterFilter": { - "description": "array of meters to filter by", - "type": "array", - "items": {} - }, - "tagFilter": { - "description": "tags to filter by", - "type": "object", - "properties": {} - }, - "threshold": { - "description": "notification threshold percentage as a decimal which activated this alert", - "type": "number", - "format": "decimal" - }, - "operator": { - "description": "operator used to compare currentSpend with amount", - "type": "string", - "enum": [ - "None", - "EqualTo", - "GreaterThan", - "GreaterThanOrEqualTo", - "LessThan", - "LessThanOrEqualTo" - ], - "x-ms-enum": { - "name": "AlertOperator", - "modelAsString": true - } - }, - "amount": { - "description": "budget threshold amount", - "type": "number", - "format": "decimal" - }, - "unit": { - "description": "unit of currency being used", - "type": "string" - }, - "currentSpend": { - "description": "current spend", - "type": "number", - "format": "decimal" - }, - "contactEmails": { - "description": "list of emails to contact", - "type": "array", - "items": { - "type": "string" - } - }, - "contactGroups": { - "description": "list of action groups to broadcast to", - "type": "array", - "items": { - "type": "string" - } - }, - "contactRoles": { - "description": "list of contact roles", - "type": "array", - "items": { - "type": "string" - } - }, - "overridingAlert": { - "description": "overriding alert", - "type": "string" - } - } - }, - "costEntityId": { - "description": "related budget", - "type": "string" - }, - "status": { - "description": "alert status", - "type": "string", - "enum": [ - "None", - "Active", - "Overridden", - "Resolved", - "Dismissed" - ], - "x-ms-enum": { - "name": "AlertStatus", - "modelAsString": true - } - }, - "creationTime": { - "description": "dateTime in which alert was created", - "type": "string" - }, - "closeTime": { - "description": "dateTime in which alert was closed", - "type": "string" - }, - "modificationTime": { - "description": "dateTime in which alert was last modified", - "type": "string" - }, - "statusModificationUserName": { - "description": "", - "type": "string" - }, - "statusModificationTime": { - "description": "dateTime in which the alert status was last modified", - "type": "string" - } - } - }, - "DismissAlertPayload": { - "description": "The request payload to update an alert", - "properties": { - "properties": { - "x-ms-client-flatten": true, - "$ref": "#/definitions/AlertProperties", - "title": "Alert properties" - } - } - }, - "QueryResult": { - "description": "Result of query. It contains all columns listed under groupings and aggregation.", - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/Resource" - } - ], - "properties": { - "properties": { - "x-ms-client-flatten": true, - "$ref": "#/definitions/QueryProperties", - "title": "Query properties" - } - } - }, - "QueryProperties": { - "type": "object", - "properties": { - "nextLink": { - "description": "The link (url) to the next page of results.", - "type": "string" - }, - "columns": { - "description": "Array of columns", - "type": "array", - "items": { - "$ref": "#/definitions/QueryColumn" - } - }, - "rows": { - "description": "Array of rows", - "type": "array", - "items": { - "type": "array", - "items": {} - } - } - } - }, - "QueryColumn": { - "type": "object", - "properties": { - "name": { - "description": "The name of column.", - "type": "string" - }, - "type": { - "description": "The type of column.", - "type": "string" - } - } - }, - "OperationListResult": { - "description": "Result of listing cost management operations. It contains a list of operations and a URL link to get the next set of results.", - "properties": { - "value": { - "description": "List of cost management operations supported by the Microsoft.CostManagement 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 - } - } - }, - "Operation": { - "description": "A Cost management 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.CostManagement.", - "type": "string", - "readOnly": true - }, - "resource": { - "description": "Resource on which the operation is performed: Dimensions, Query.", - "type": "string", - "readOnly": true - }, - "operation": { - "description": "Operation type: Read, write, delete, etc.", - "type": "string", - "readOnly": true - } - } - } - } - }, - "ForecastDefinition": { - "description": "The definition of a forecast.", - "properties": { - "type": { - "description": "The type of the forecast.", - "type": "string", - "enum": [ - "Usage", - "ActualCost", - "AmortizedCost" - ], - "x-ms-enum": { - "name": "ForecastType", - "modelAsString": true - } - }, - "timeframe": { - "description": "The time frame for pulling data for the forecast. If custom, then a specific time period must be provided.", - "type": "string", - "enum": [ - "MonthToDate", - "BillingMonthToDate", - "TheLastMonth", - "TheLastBillingMonth", - "WeekToDate", - "Custom" - ], - "x-ms-enum": { - "name": "ForecastTimeframeType", - "modelAsString": true - } - }, - "timePeriod": { - "description": "Has time period for pulling data for the forecast.", - "$ref": "#/definitions/QueryTimePeriod" - }, - "dataset": { - "description": "Has definition for data in this forecast.", - "$ref": "#/definitions/QueryDataset" - }, - "includeActualCost": { - "description": "a boolean determining if actualCost will be included", - "type": "boolean" - }, - "includeFreshPartialCost": { - "description": "a boolean determining if FreshPartialCost will be included", - "type": "boolean" - } - }, - "required": [ - "type", - "timeframe" - ] - }, - "QueryDefinition": { - "description": "The definition of a query.", - "properties": { - "type": { - "description": "The type of the query.", - "type": "string", - "enum": [ - "Usage", - "ActualCost", - "AmortizedCost" - ], - "x-ms-enum": { - "name": "ExportType", - "modelAsString": true - } - }, - "timeframe": { - "description": "The time frame for pulling data for the query. If custom, then a specific time period must be provided.", - "type": "string", - "enum": [ - "MonthToDate", - "BillingMonthToDate", - "TheLastMonth", - "TheLastBillingMonth", - "WeekToDate", - "Custom" - ], - "x-ms-enum": { - "name": "TimeframeType", - "modelAsString": true - } - }, - "timePeriod": { - "description": "Has time period for pulling data for the query.", - "$ref": "#/definitions/QueryTimePeriod" - }, - "dataset": { - "description": "Has definition for data in this query.", - "$ref": "#/definitions/QueryDataset" - } - }, - "required": [ - "type", - "timeframe" - ] - }, - "QueryTimePeriod": { - "description": "The start and end date for pulling data for the query.", - "properties": { - "from": { - "description": "The start date to pull data from.", - "type": "string", - "format": "date-time" - }, - "to": { - "description": "The end date to pull data to.", - "type": "string", - "format": "date-time" - } - }, - "required": [ - "from", - "to" - ] - }, - "QueryDataset": { - "description": "The definition of data present in the query.", - "properties": { - "granularity": { - "description": "The granularity of rows in the query.", - "type": "string", - "enum": [ - "Daily" - ], - "x-ms-enum": { - "name": "GranularityType", - "modelAsString": true - } - }, - "configuration": { - "description": "Has configuration information for the data in the export. The configuration will be ignored if aggregation and grouping are provided.", - "$ref": "#/definitions/QueryDatasetConfiguration" - }, - "aggregation": { - "type": "object", - "description": "Dictionary of aggregation expression to use in the query. The key of each item in the dictionary is the alias for the aggregated column. Query can have up to 2 aggregation clauses.", - "additionalProperties": { - "type": "object", - "$ref": "#/definitions/QueryAggregation" - }, - "maxItems": 2 - }, - "grouping": { - "description": "Array of group by expression to use in the query. Query can have up to 2 group by clauses.", - "type": "array", - "items": { - "$ref": "#/definitions/QueryGrouping" - }, - "maxItems": 2 - }, - "filter": { - "type": "object", - "description": "Has filter expression to use in the query.", - "$ref": "#/definitions/QueryFilter" - } - } - }, - "QueryDatasetConfiguration": { - "description": "The configuration of dataset in the query.", - "properties": { - "columns": { - "description": "Array of column names to be included in the query. Any valid query column name is allowed. If not provided, then query includes all columns.", - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "QueryAggregation": { - "description": "The aggregation expression to be used in the query.", - "properties": { - "name": { - "description": "The name of the column to aggregate.", - "type": "string" - }, - "function": { - "description": "The name of the aggregation function to use.", - "type": "string", - "enum": [ - "Sum" - ], - "x-ms-enum": { - "name": "FunctionType", - "modelAsString": true - } - } - }, - "required": [ - "name", - "function" - ] - }, - "QueryGrouping": { - "description": "The group by expression to be used in the query.", - "properties": { - "type": { - "description": "Has type of the column to group.", - "$ref": "#/definitions/QueryColumnType" - }, - "name": { - "description": "The name of the column to group.", - "type": "string" - } - }, - "required": [ - "type", - "name" - ] - }, - "QueryFilter": { - "description": "The filter expression to be used in the export.", - "properties": { - "and": { - "description": "The logical \"AND\" expression. Must have at least 2 items.", - "type": "array", - "items": { - "$ref": "#/definitions/QueryFilter" - }, - "minItems": 2 - }, - "or": { - "description": "The logical \"OR\" expression. Must have at least 2 items.", - "type": "array", - "items": { - "$ref": "#/definitions/QueryFilter" - }, - "minItems": 2 - }, - "not": { - "description": "The logical \"NOT\" expression.", - "$ref": "#/definitions/QueryFilter" - }, - "dimension": { - "description": "Has comparison expression for a dimension", - "$ref": "#/definitions/QueryComparisonExpression" - }, - "tag": { - "description": "Has comparison expression for a tag", - "$ref": "#/definitions/QueryComparisonExpression" - } - } - }, - "QueryColumnType": { - "description": "The type of the column in the export.", - "type": "string", - "enum": [ - "Tag", - "Dimension" - ], - "x-ms-enum": { - "name": "QueryColumnType", - "modelAsString": true - } - }, - "QueryComparisonExpression": { - "description": "The comparison expression to be used in the query.", - "properties": { - "name": { - "description": "The name of the column to use in comparison.", - "type": "string" - }, - "operator": { - "description": "The operator to use for comparison.", - "type": "string", - "enum": [ - "In" - ], - "x-ms-enum": { - "name": "OperatorType", - "modelAsString": true - } - }, - "values": { - "description": "Array of values to use for comparison", - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1 - } - }, - "required": [ - "name", - "operator", - "values" - ] - }, - "ExportListResult": { - "description": "Result of listing exports. It contains a list of available exports in the scope provided.", - "type": "object", - "properties": { - "value": { - "description": "The list of exports.", - "type": "array", - "readOnly": true, - "items": { - "$ref": "#/definitions/Export" - } - } - } - }, - "Export": { - "description": "An export resource.", - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/ProxyResource" - } - ], - "properties": { - "properties": { - "x-ms-client-flatten": true, - "$ref": "#/definitions/ExportProperties", - "title": "Export properties" - } - } - }, - "ExportProperties": { - "description": "The properties of the export.", - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/CommonExportProperties" - } - ], - "properties": { - "schedule": { - "description": "Has schedule information for the export.", - "$ref": "#/definitions/ExportSchedule" - } - } - }, - "CommonExportProperties": { - "description": "The common properties of the export.", - "type": "object", - "properties": { - "format": { - "description": "The format of the export being delivered. Currently only 'Csv' is supported.", - "type": "string", - "enum": [ - "Csv" - ], - "x-ms-enum": { - "name": "FormatType", - "modelAsString": true - } - }, - "deliveryInfo": { - "description": "Has delivery information for the export.", - "$ref": "#/definitions/ExportDeliveryInfo" - }, - "definition": { - "description": "Has the definition for the export.", - "$ref": "#/definitions/ExportDefinition" - }, - "runHistory": { - "description": "If requested, has the most recent execution history for the export.", - "$ref": "#/definitions/ExportExecutionListResult" - }, - "nextRunTimeEstimate": { - "description": "If the export has an active schedule, provides an estimate of the next execution time.", - "type": "string", - "format": "date-time", - "readOnly": true - } - }, - "required": [ - "deliveryInfo", - "definition" - ] - }, - "ExportSchedule": { - "description": "The schedule associated with the export.", - "type": "object", - "properties": { - "status": { - "description": "The status of the export's schedule. If 'Inactive', the export's schedule is paused.", - "type": "string", - "enum": [ - "Active", - "Inactive" - ], - "x-ms-enum": { - "name": "StatusType", - "modelAsString": true - } - }, - "recurrence": { - "description": "The schedule recurrence.", - "type": "string", - "enum": [ - "Daily", - "Weekly", - "Monthly", - "Annually" - ], - "x-ms-enum": { - "name": "RecurrenceType", - "modelAsString": true - } - }, - "recurrencePeriod": { - "description": "Has start and end date of the recurrence. The start date must be in future. If present, the end date must be greater than start date.", - "$ref": "#/definitions/ExportRecurrencePeriod" - } - }, - "required": [ - "recurrence" - ] - }, - "ExportDeliveryInfo": { - "description": "The delivery information associated with a export.", - "type": "object", - "properties": { - "destination": { - "description": "Has destination for the export being delivered.", - "$ref": "#/definitions/ExportDeliveryDestination" - } - }, - "required": [ - "destination" - ] - }, - "ExportRecurrencePeriod": { - "description": "The start and end date for recurrence schedule.", - "type": "object", - "properties": { - "from": { - "description": "The start date of recurrence.", - "type": "string", - "format": "date-time" - }, - "to": { - "description": "The end date of recurrence.", - "type": "string", - "format": "date-time" - } - }, - "required": [ - "from" - ] - }, - "ExportDeliveryDestination": { - "description": "The destination information for the delivery of the export. To allow access to a storage account, you must register the account's subscription with the Microsoft.CostManagementExports resource provider. This is required once per subscription. When creating an export in the Azure portal, it is done automatically, however API users need to register the subscription. For more information see https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-supported-services .", - "type": "object", - "properties": { - "resourceId": { - "description": "The resource id of the storage account where exports will be delivered.", - "type": "string" - }, - "container": { - "description": "The name of the container where exports will be uploaded.", - "type": "string" - }, - "rootFolderPath": { - "description": "The name of the directory where exports will be uploaded.", - "type": "string" - } - }, - "required": [ - "resourceId", - "container" - ] - }, - "ExportDefinition": { - "description": "The definition of an export.", - "type": "object", - "properties": { - "type": { - "description": "The type of the export. Note that 'Usage' is equivalent to 'ActualCost' and is applicable to exports that do not yet provide data for charges or amortization for service reservations.", - "type": "string", - "enum": [ - "Usage", - "ActualCost", - "AmortizedCost" - ], - "x-ms-enum": { - "name": "ExportType", - "modelAsString": true - } - }, - "timeframe": { - "description": "The time frame for pulling data for the export. If custom, then a specific time period must be provided.", - "type": "string", - "enum": [ - "MonthToDate", - "BillingMonthToDate", - "TheLastMonth", - "TheLastBillingMonth", - "WeekToDate", - "Custom" - ], - "x-ms-enum": { - "name": "TimeframeType", - "modelAsString": true - } - }, - "timePeriod": { - "description": "Has time period for pulling data for the export.", - "$ref": "#/definitions/ExportTimePeriod" - }, - "dataSet": { - "description": "The definition for data in the export.", - "$ref": "#/definitions/ExportDataset" - } - }, - "required": [ - "type", - "timeframe" - ] - }, - "ExportDataset": { - "description": "The definition for data in the export.", - "type": "object", - "properties": { - "granularity": { - "description": "The granularity of rows in the export. Currently only 'Daily' is supported.", - "type": "string", - "enum": [ - "Daily" - ], - "x-ms-enum": { - "name": "GranularityType", - "modelAsString": true - } - }, - "configuration": { - "description": "The export dataset configuration.", - "$ref": "#/definitions/ExportDatasetConfiguration" - } - } - }, - "ExportDatasetConfiguration": { - "description": "The export dataset configuration. Allows columns to be selected for the export. If not provided then the export will include all available columns.", - "type": "object", - "properties": { - "columns": { - "description": "Array of column names to be included in the export. If not provided then the export will include all available columns. The available columns can vary by customer channel (see examples).", - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "ExportTimePeriod": { - "description": "The date range for data in the export. This should only be specified with timeFrame set to 'Custom'. The maximum date range is 3 months.", - "type": "object", - "properties": { - "from": { - "description": "The start date for export data.", - "type": "string", - "format": "date-time" - }, - "to": { - "description": "The end date for export data.", - "type": "string", - "format": "date-time" - } - }, - "required": [ - "from", - "to" - ] - }, - "ExportExecutionListResult": { - "description": "Result of listing the execution history of an export.", - "type": "object", - "properties": { - "value": { - "description": "A list of export executions.", - "type": "array", - "readOnly": true, - "items": { - "$ref": "#/definitions/ExportExecution" - } - } - } - }, - "ExportExecution": { - "description": "An export execution.", - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/Resource" - } - ], - "properties": { - "properties": { - "x-ms-client-flatten": true, - "$ref": "#/definitions/ExportExecutionProperties", - "title": "Export execution properties" - } - } - }, - "ExportExecutionProperties": { - "description": "The properties of the export execution.", - "type": "object", - "properties": { - "executionType": { - "description": "The type of the export execution.", - "type": "string", - "enum": [ - "OnDemand", - "Scheduled" - ], - "x-ms-enum": { - "name": "ExecutionType", - "modelAsString": true - } - }, - "status": { - "description": "The last known status of the export execution.", - "type": "string", - "enum": [ - "Queued", - "InProgress", - "Completed", - "Failed", - "Timeout", - "NewDataNotAvailable", - "DataNotAvailable" - ], - "x-ms-enum": { - "name": "ExecutionStatus", - "modelAsString": true - } - }, - "submittedBy": { - "description": "The identifier for the entity that executed the export. For OnDemand executions it is the user email. For scheduled executions it is 'System'.", - "type": "string" - }, - "submittedTime": { - "description": "The time when export was queued to be executed.", - "type": "string", - "format": "date-time" - }, - "processingStartTime": { - "description": "The time when export was picked up to be executed.", - "type": "string", - "format": "date-time" - }, - "processingEndTime": { - "description": "The time when the export execution finished.", - "type": "string", - "format": "date-time" - }, - "fileName": { - "description": "The name of the exported file.", - "type": "string" - }, - "runSettings": { - "description": "The export settings that were in effect for this execution.", - "$ref": "#/definitions/CommonExportProperties" - }, - "error": { - "description": "The details of any error.", - "$ref": "#/definitions/ErrorDetails" - } - } - } - }, - "parameters": { - "viewNameParameter": { - "name": "viewName", - "in": "path", - "description": "View name", - "required": true, - "type": "string", - "x-ms-parameter-location": "method" - }, - "scopeViewParameter": { - "name": "scope", - "in": "path", - "required": true, - "type": "string", - "description": "The scope associated with view 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, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for BillingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for External Billing Account scope and 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External Subscription scope.", - "x-ms-parameter-location": "method" - }, - "scopeDimensionParameter": { - "name": "scope", - "in": "path", - "required": true, - "type": "string", - "description": "The scope associated with dimension 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, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope, and 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners.", - "x-ms-parameter-location": "method", - "x-ms-skip-url-encoding": true - }, - "scopeAlertParameter": { - "name": "scope", - "in": "path", - "required": true, - "type": "string", - "description": "The scope associated with alerts operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope, and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners.", - "x-ms-parameter-location": "method", - "x-ms-skip-url-encoding": true - }, - "scopeForecastParameter": { - "name": "scope", - "in": "path", - "required": true, - "type": "string", - "description": "The scope associated with forecast operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope, and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners.", - "x-ms-parameter-location": "method", - "x-ms-skip-url-encoding": true - }, - "scopeQueryParameter": { - "name": "scope", - "in": "path", - "required": true, - "type": "string", - "description": "The scope associated with query and export operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope, and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners.", - "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 (e.g. '2020-06-01')." - }, - "subscriptionIdParameter": { - "name": "subscriptionId", - "in": "path", - "description": "Azure Subscription ID.", - "required": true, - "type": "string" - }, - "resourceGroupNameParameter": { - "name": "resourceGroupName", - "in": "path", - "description": "Azure Resource Group Name.", - "required": true, - "type": "string", - "x-ms-parameter-location": "method" - }, - "billingAccountIdParameter": { - "name": "billingAccountId", - "in": "path", - "description": "BillingAccount ID", - "required": true, - "type": "string", - "x-ms-parameter-location": "method" - }, - "managementGroupIdParameter": { - "name": "managementGroupId", - "in": "path", - "description": "ManagementGroup ID", - "required": true, - "type": "string", - "x-ms-parameter-location": "method" - }, - "departmentIdParameter": { - "name": "departmentId", - "in": "path", - "description": "Department ID", - "required": true, - "type": "string", - "x-ms-parameter-location": "method" - }, - "enrollmentAccountIdParameter": { - "name": "enrollmentAccountId", - "in": "path", - "description": "Enrollment Account ID", - "required": true, - "type": "string", - "x-ms-parameter-location": "method" - }, - "exportNameParameter": { - "name": "exportName", - "in": "path", - "description": "Export Name.", - "required": true, - "type": "string", - "x-ms-parameter-location": "method" - }, - "externalCloudProviderTypeParameter": { - "name": "externalCloudProviderType", - "in": "path", - "required": true, - "type": "string", - "enum": [ - "externalSubscriptions", - "externalBillingAccounts" - ], - "x-ms-enum": { - "name": "externalCloudProviderType", - "modelAsString": true - }, - "description": "The external cloud provider type associated with dimension/query operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account.", - "x-ms-parameter-location": "method" - }, - "externalCloudProviderIdParameter": { - "name": "externalCloudProviderId", - "in": "path", - "required": true, - "type": "string", - "description": "This can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations.", - "x-ms-parameter-location": "method" - }, - "alertIdParameter": { - "name": "alertId", - "in": "path", - "description": "Alert ID", - "required": true, - "type": "string", - "x-ms-parameter-location": "method", - "x-ms-skip-url-encoding": true - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountAlerts.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountAlerts.json deleted file mode 100644 index 8a6b536c3278..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountAlerts.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "parameters": { - "api-version": "2018-08-01-preview", - "billingAccountId": "12345:6789", - "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/providers/Microsoft.CostManagement/alerts/00000000-0000-0000-0000-000000000000", - "name": "00000000-0000-0000-0000-000000000000", - "type": "Microsoft.CostManagement/alerts", - "properties": { - "definition": { - "type": "Budget", - "category": "Cost", - "criteria": "CostThresholdExceeded" - }, - "description": "", - "source": "Preset", - "details": { - "timeGrainType": "Quarterly", - "periodStartDate": "2020-03-01T00:00:00Z", - "triggeredBy": "00000000-0000-0000-0000-000000000000_1_01", - "resourceGroupFilter": [], - "resourceFilter": [], - "meterFilter": [], - "tagFilter": {}, - "threshold": 0.8, - "operator": "GreaterThan", - "amount": 200000.0, - "unit": "USD", - "currentSpend": 161000.12, - "contactEmails": [ - "1234@contoso.com" - ], - "contactGroups": [], - "contactRoles": [], - "overridingAlert": null - }, - "costEntityId": "budget1", - "status": "Active", - "creationTime": "2020-04-27T11:07:52.7143901Z", - "closeTime": "0001-01-01T00:00:00", - "modificationTime": "2020-04-28T11:06:02.8999373Z", - "statusModificationUserName": null, - "statusModificationTime": "0001-01-01T00:00:00" - } - }, - { - "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/providers/Microsoft.CostManagement/alerts/11111111-1111-1111-111111111111", - "name": "11111111-1111-1111-111111111111", - "type": "Microsoft.CostManagement/alerts", - "properties": { - "definition": { - "type": "Budget", - "category": "Cost", - "criteria": "CostThresholdExceeded" - }, - "description": "", - "source": "Preset", - "details": { - "timeGrainType": "Quarterly", - "periodStartDate": "2020-03-01T00:00:00Z", - "triggeredBy": "11111111-1111-1111-111111111111_1_01", - "resourceGroupFilter": [], - "resourceFilter": [], - "meterFilter": [], - "tagFilter": {}, - "threshold": 0.8, - "operator": "GreaterThan", - "amount": 200000.0, - "unit": "USD", - "currentSpend": 171000.32, - "contactEmails": [ - "1234@contoso.com" - ], - "contactGroups": [], - "contactRoles": [], - "overridingAlert": null - }, - "costEntityId": "budget1", - "status": "Active", - "creationTime": "2019-06-24T05:51:52.8713179Z", - "closeTime": "0001-01-01T00:00:00", - "modificationTime": "2019-08-31T17:51:55.1808807Z", - "statusModificationUserName": null, - "statusModificationTime": "0001-01-01T00:00:00" - } - } - ], - "nextLink": null - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountDimensionsList.json deleted file mode 100644 index 8f2f6f365cb4..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountDimensionsList.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "parameters": { - "api-version": "2019-10-01", - "billingAccountId": "100", - "scope": "providers/Microsoft.Billing/billingAccounts/100" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "providers/Microsoft.Billing/billingAccounts/100/providers/microsoft.CostManagement/dimensions_ResourceGroup_2018-05-01_2018-05-31", - "name": "dimensions_ResourceGroup_2018-05-01_2018-05-31", - "type": "microsoft.CostManagement/dimensions", - "properties": { - "data": [], - "total": 377, - "category": "ResourceGroup", - "usageStart": "2018-05-01T00:00:00-07:00", - "usageEnd": "2018-05-31T00:00:00-07:00", - "description": "Resource group", - "filterEnabled": true, - "groupingEnabled": true - } - }, - { - "id": "providers/Microsoft.Billing/billingAccounts/100/providers/microsoft.CostManagement/dimensions_ResourceType_2018-05-01_2018-05-31", - "name": "dimensions_ResourceType_2018-05-01_2018-05-31", - "type": "microsoft.CostManagement/dimensions", - "properties": { - "data": [], - "total": 37, - "category": "ResourceType", - "usageStart": "2018-05-01T00:00:00-07:00", - "usageEnd": "2018-05-31T00:00:00-07:00", - "description": "Resource type", - "filterEnabled": true, - "groupingEnabled": true - } - } - ] - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountDimensionsListExpandAndTop.json deleted file mode 100644 index b5521f5bfb68..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountDimensionsListExpandAndTop.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "parameters": { - "api-version": "2019-10-01", - "billingAccountId": "100", - "$expand": "properties/data", - "$top": 5, - "scope": "providers/Microsoft.Billing/billingAccounts/100" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "providers/Microsoft.Billing/billingAccounts/100/providers/microsoft.CostManagement/dimensions_ResourceGroup_2018-05-01_2018-05-31_5", - "name": "dimensions_ResourceGroup_2018-05-01_2018-05-31_5", - "type": "microsoft.CostManagement/dimensions", - "properties": { - "data": [ - "thoroetrg01", - "default-notificationhubs-westus", - "jedikeyvaultrg", - "contosocodeflow8d4a", - "noobaa" - ], - "total": 377, - "category": "ResourceGroup", - "usageStart": "2018-05-01T00:00:00-07:00", - "usageEnd": "2018-05-31T00:00:00-07:00", - "description": "Resource group", - "filterEnabled": true, - "groupingEnabled": true - } - }, - { - "id": "providers/Microsoft.Billing/billingAccounts/100/providers/microsoft.CostManagement/dimensions_ResourceType_2018-05-01_2018-05-31_5", - "name": "dimensions_ResourceType_2018-05-01_2018-05-31_5", - "type": "microsoft.CostManagement/dimensions", - "properties": { - "data": [ - "microsoft.automation/automationaccounts", - "microsoft.databricks/workspaces", - "microsoft.dbformysql/servers", - "microsoft.containerregistry/registries", - "microsoft.search/searchservices" - ], - "total": 37, - "category": "ResourceType", - "usageStart": "2018-05-01T00:00:00-07:00", - "usageEnd": "2018-05-31T00:00:00-07:00", - "description": "Resource type", - "filterEnabled": true, - "groupingEnabled": true - } - } - ] - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountDimensionsListWithFilter.json deleted file mode 100644 index 572606fcd52a..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountDimensionsListWithFilter.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "parameters": { - "api-version": "2019-10-01", - "billingAccountId": "100", - "$expand": "properties/data", - "$top": 5, - "$filter": "properties/category eq 'resourceId'", - "scope": "providers/Microsoft.Billing/billingAccounts/100" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "providers/Microsoft.Billing/billingAccounts/100/providers/microsoft.CostManagement/dimensions_ResourceId_2018-05-01_2018-05-31_5", - "name": "dimensions_ResourceId_2018-05-01_2018-05-31_5", - "type": "microsoft.CostManagement/dimensions", - "properties": { - "data": [ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/urphealthaccount", - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/srphytenaccount", - "/subscriptions/67e24f6b-1ec2-4c90-993a-dc2d25b00b6c/resourcegroups/defaultresourcegroup-eus/providers/microsoft.operationalinsights/workspaces/defaultworkspace-67e24f6b-1ec2-4c90-993a-dc2d25b00b6c-eus", - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg-sql-ha/providers/microsoft.compute/virtualmachines/sql-4qqp1", - "/subscriptions/a98d6dc5-eb8f-46cf-8938-f1fb08f03706/resourcegroups/databricks-rg-testwsp-xijmsdubneexm/providers/microsoft.compute/disks/488cdb42bf74474a98075415be3f806c-containerrootvolume" - ], - "total": 1409, - "category": "ResourceId", - "usageStart": "2018-05-01T00:00:00-07:00", - "usageEnd": "2018-05-31T00:00:00-07:00", - "description": "Resource Id", - "filterEnabled": true, - "groupingEnabled": true, - "nextLink": "http://management.azure.com/providers/Microsoft.Billing/billingAccounts/100/providers/Microsoft.CostManagement/Dimensions?$filter=properties/category eq 'resourceId'&$top=5&api-version=2019-10-01&$expand=properties/data&$skiptoken=AQAAAA%3D%3D" - } - } - ] - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountForecast.json deleted file mode 100644 index 02e9d2896bfd..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountForecast.json +++ /dev/null @@ -1,117 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "billingAccountId": "12345:6789", - "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789", - "parameters": { - "type": "Usage", - "timeframe": "MonthToDate", - "dataset": { - "granularity": "Daily", - "filter": { - "and": [ - { - "or": [ - { - "dimension": { - "name": "ResourceLocation", - "operator": "In", - "values": [ - "East US", - "West Europe" - ] - } - }, - { - "tag": { - "name": "Environment", - "operator": "In", - "values": [ - "UAT", - "Prod" - ] - } - } - ] - }, - { - "dimension": { - "name": "ResourceGroup", - "operator": "In", - "values": [ - "API" - ] - } - } - ] - } - }, - "includeActualCost": false, - "includeFreshPartialCost": false - } - }, - "responses": { - "200": { - "body": { - "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/providers/Microsoft.CostManagement/query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", - "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", - "type": "microsoft.costmanagement/Query", - "properties": { - "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/providers/Microsoft.CostManagement/Forecast?api-version=2019-10-01&$skiptoken=AQAAAA%3D%3D", - "columns": [ - { - "name": "PreTaxCost", - "type": "Number" - }, - { - "name": "ResourceGroup", - "type": "String" - }, - { - "name": "UsageDate", - "type": "Number" - }, - { - "name": "CostStatus", - "type": "String" - }, - { - "name": "Currency", - "type": "String" - } - ], - "rows": [ - [ - 2.10333307059661, - "JapanUnifia-Trial", - 20180331, - "Forecast", - "USD" - ], - [ - 218.68795741935486, - "RVIIOT-TRIAL", - 20180331, - "Forecast", - "USD" - ], - [ - 0.14384913581657052, - "VSTSHOL-1595322048000", - 20180401, - "Forecast", - "USD" - ], - [ - 0.009865586851323632, - "gs-stms-dev", - 20180429, - "Forecast", - "USD" - ] - ] - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountQuery.json deleted file mode 100644 index 80d3082985f3..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountQuery.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "parameters": { - "api-version": "2019-10-01", - "billingAccountId": "70664866", - "scope": "providers/Microsoft.Billing/billingAccounts/70664866", - "parameters": { - "type": "Usage", - "timeframe": "MonthToDate", - "dataset": { - "granularity": "Daily", - "filter": { - "and": [ - { - "or": [ - { - "dimension": { - "name": "ResourceLocation", - "operator": "In", - "values": [ - "East US", - "West Europe" - ] - } - }, - { - "tag": { - "name": "Environment", - "operator": "In", - "values": [ - "UAT", - "Prod" - ] - } - } - ] - }, - { - "dimension": { - "name": "ResourceGroup", - "operator": "In", - "values": [ - "API" - ] - } - } - ] - } - } - } - }, - "responses": { - "200": { - "body": { - "id": "providers/Microsoft.Billing/billingAccounts/70664866/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", - "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", - "type": "microsoft.costmanagement/Query", - "properties": { - "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/providers/Microsoft.CostManagement/Query?api-version=2019-10-01&$skiptoken=AQAAAA%3D%3D", - "columns": [ - { - "name": "PreTaxCost", - "type": "Number" - }, - { - "name": "ResourceGroup", - "type": "String" - }, - { - "name": "UsageDate", - "type": "Number" - }, - { - "name": "Currency", - "type": "String" - } - ], - "rows": [ - [ - 19.545363672276512, - "JapanUnifia-Trial", - 20180331, - "USD" - ], - [ - 173.41979241290323, - "RVIIOT-TRIAL", - 20180331, - "USD" - ], - [ - 20.359416562625452, - "VSTSHOL-1595322048000", - 20180331, - "USD" - ], - [ - 0.16677720329728665, - "gs-stms-dev", - 20180331, - "USD" - ] - ] - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountQueryGrouping.json deleted file mode 100644 index cc666efa60dd..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingAccountQueryGrouping.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "parameters": { - "api-version": "2019-10-01", - "billingAccountId": "70664866", - "scope": "providers/Microsoft.Billing/billingAccounts/70664866", - "parameters": { - "type": "Usage", - "timeframe": "TheLastMonth", - "dataset": { - "granularity": "None", - "aggregation": { - "totalCost": { - "name": "PreTaxCost", - "function": "Sum" - } - }, - "grouping": [ - { - "type": "Dimension", - "name": "ResourceGroup" - } - ] - } - } - }, - "responses": { - "200": { - "body": { - "id": "providers/Microsoft.Billing/billingAccounts/70664866/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", - "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", - "type": "microsoft.costmanagement/Query", - "properties": { - "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/providers/Microsoft.CostManagement/Query?api-version=2019-10-01&$skiptoken=AQAAAA%3D%3D", - "columns": [ - { - "name": "PreTaxCost", - "type": "Number" - }, - { - "name": "ResourceGroup", - "type": "String" - }, - { - "name": "Currency", - "type": "String" - } - ], - "rows": [ - [ - 19.545363672276512, - "JapanUnifia-Trial", - "USD" - ], - [ - 173.41979241290323, - "RVIIOT-TRIAL", - "USD" - ], - [ - 20.359416562625452, - "VSTSHOL-1595322048000", - "USD" - ] - ] - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingProfileAlerts.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingProfileAlerts.json deleted file mode 100644 index 4c1bcb9cf37c..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingProfileAlerts.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "parameters": { - "api-version": "2018-08-01-preview", - "billingAccountId": "12345:6789", - "billingProfileId": "13579", - "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/providers/Microsoft.CostManagement/alerts/00000000-0000-0000-0000-000000000000", - "name": "00000000-0000-0000-0000-000000000000", - "type": "Microsoft.CostManagement/alerts", - "properties": { - "definition": { - "type": "Budget", - "category": "Cost", - "criteria": "CostThresholdExceeded" - }, - "description": "", - "source": "Preset", - "details": { - "timeGrainType": "Quarterly", - "periodStartDate": "2020-03-01T00:00:00Z", - "triggeredBy": "00000000-0000-0000-0000-000000000000_1_01", - "resourceGroupFilter": [], - "resourceFilter": [], - "meterFilter": [], - "tagFilter": {}, - "threshold": 0.8, - "operator": "GreaterThan", - "amount": 200000.0, - "unit": "USD", - "currentSpend": 161000.12, - "contactEmails": [ - "1234@contoso.com" - ], - "contactGroups": [], - "contactRoles": [], - "overridingAlert": null - }, - "costEntityId": "budget1", - "status": "Active", - "creationTime": "2020-04-27T11:07:52.7143901Z", - "closeTime": "0001-01-01T00:00:00", - "modificationTime": "2020-04-28T11:06:02.8999373Z", - "statusModificationUserName": null, - "statusModificationTime": "0001-01-01T00:00:00" - } - }, - { - "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/providers/Microsoft.CostManagement/alerts/11111111-1111-1111-111111111111", - "name": "11111111-1111-1111-111111111111", - "type": "Microsoft.CostManagement/alerts", - "properties": { - "definition": { - "type": "Budget", - "category": "Cost", - "criteria": "CostThresholdExceeded" - }, - "description": "", - "source": "Preset", - "details": { - "timeGrainType": "Quarterly", - "periodStartDate": "2020-03-01T00:00:00Z", - "triggeredBy": "11111111-1111-1111-111111111111_1_01", - "resourceGroupFilter": [], - "resourceFilter": [], - "meterFilter": [], - "tagFilter": {}, - "threshold": 0.8, - "operator": "GreaterThan", - "amount": 200000.0, - "unit": "USD", - "currentSpend": 171000.32, - "contactEmails": [ - "1234@contoso.com" - ], - "contactGroups": [], - "contactRoles": [], - "overridingAlert": null - }, - "costEntityId": "budget1", - "status": "Active", - "creationTime": "2019-06-24T05:51:52.8713179Z", - "closeTime": "0001-01-01T00:00:00", - "modificationTime": "2019-08-31T17:51:55.1808807Z", - "statusModificationUserName": null, - "statusModificationTime": "0001-01-01T00:00:00" - } - } - ], - "nextLink": null - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingProfileForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingProfileForecast.json deleted file mode 100644 index 7b29eb2e07db..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/BillingProfileForecast.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "billingAccountId": "12345:6789", - "billingProfileId": "13579", - "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579", - "parameters": { - "type": "Usage", - "timeframe": "MonthToDate", - "dataset": { - "granularity": "Daily", - "filter": { - "and": [ - { - "or": [ - { - "dimension": { - "name": "ResourceLocation", - "operator": "In", - "values": [ - "East US", - "West Europe" - ] - } - }, - { - "tag": { - "name": "Environment", - "operator": "In", - "values": [ - "UAT", - "Prod" - ] - } - } - ] - }, - { - "dimension": { - "name": "ResourceGroup", - "operator": "In", - "values": [ - "API" - ] - } - } - ] - } - }, - "includeActualCost": false, - "includeFreshPartialCost": false - } - }, - "responses": { - "200": { - "body": { - "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/providers/Microsoft.CostManagement/query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", - "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", - "type": "microsoft.costmanagement/Query", - "properties": { - "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/providers/Microsoft.CostManagement/Forecast?api-version=2019-10-01&$skiptoken=AQAAAA%3D%3D", - "columns": [ - { - "name": "PreTaxCost", - "type": "Number" - }, - { - "name": "ResourceGroup", - "type": "String" - }, - { - "name": "UsageDate", - "type": "Number" - }, - { - "name": "CostStatus", - "type": "String" - }, - { - "name": "Currency", - "type": "String" - } - ], - "rows": [ - [ - 2.10333307059661, - "JapanUnifia-Trial", - 20180331, - "Forecast", - "USD" - ], - [ - 218.68795741935486, - "RVIIOT-TRIAL", - 20180331, - "Forecast", - "USD" - ], - [ - 0.14384913581657052, - "VSTSHOL-1595322048000", - 20180401, - "Forecast", - "USD" - ], - [ - 0.009865586851323632, - "gs-stms-dev", - 20180429, - "Forecast", - "USD" - ] - ] - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentAlerts.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentAlerts.json deleted file mode 100644 index 31d5dd87d70d..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentAlerts.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "parameters": { - "api-version": "2018-08-01-preview", - "billingAccountId": "12345:6789", - "departmentId": "123", - "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/departments/123" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/departments/123/providers/Microsoft.CostManagement/alerts/00000000-0000-0000-0000-000000000000", - "name": "00000000-0000-0000-0000-000000000000", - "type": "Microsoft.CostManagement/alerts", - "properties": { - "definition": { - "type": "Budget", - "category": "Cost", - "criteria": "CostThresholdExceeded" - }, - "description": "", - "source": "Preset", - "details": { - "timeGrainType": "Quarterly", - "periodStartDate": "2020-03-01T00:00:00Z", - "triggeredBy": "00000000-0000-0000-0000-000000000000_1_01", - "resourceGroupFilter": [], - "resourceFilter": [], - "meterFilter": [], - "tagFilter": {}, - "threshold": 0.8, - "operator": "GreaterThan", - "amount": 200000.0, - "unit": "USD", - "currentSpend": 161000.12, - "contactEmails": [ - "1234@contoso.com" - ], - "contactGroups": [], - "contactRoles": [], - "overridingAlert": null - }, - "costEntityId": "budget1", - "status": "Active", - "creationTime": "2020-04-27T11:07:52.7143901Z", - "closeTime": "0001-01-01T00:00:00", - "modificationTime": "2020-04-28T11:06:02.8999373Z", - "statusModificationUserName": null, - "statusModificationTime": "0001-01-01T00:00:00" - } - }, - { - "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/departments/123/providers/Microsoft.CostManagement/alerts/11111111-1111-1111-111111111111", - "name": "11111111-1111-1111-111111111111", - "type": "Microsoft.CostManagement/alerts", - "properties": { - "definition": { - "type": "Budget", - "category": "Cost", - "criteria": "CostThresholdExceeded" - }, - "description": "", - "source": "Preset", - "details": { - "timeGrainType": "Quarterly", - "periodStartDate": "2020-03-01T00:00:00Z", - "triggeredBy": "11111111-1111-1111-111111111111_1_01", - "resourceGroupFilter": [], - "resourceFilter": [], - "meterFilter": [], - "tagFilter": {}, - "threshold": 0.8, - "operator": "GreaterThan", - "amount": 200000.0, - "unit": "USD", - "currentSpend": 171000.32, - "contactEmails": [ - "1234@contoso.com" - ], - "contactGroups": [], - "contactRoles": [], - "overridingAlert": null - }, - "costEntityId": "budget1", - "status": "Active", - "creationTime": "2019-06-24T05:51:52.8713179Z", - "closeTime": "0001-01-01T00:00:00", - "modificationTime": "2019-08-31T17:51:55.1808807Z", - "statusModificationUserName": null, - "statusModificationTime": "0001-01-01T00:00:00" - } - } - ], - "nextLink": null - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentDimensionsList.json deleted file mode 100644 index 4aa6dec17440..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentDimensionsList.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "parameters": { - "api-version": "2019-10-01", - "billingAccountId": "100", - "departmentId": "123", - "scope": "providers/Microsoft.Billing/billingAccounts/100/departments/123" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "providers/Microsoft.Billing/billingAccounts/100/departments/123/providers/microsoft.CostManagement/dimensions_ResourceGroup_2018-05-01_2018-05-31", - "name": "dimensions_ResourceGroup_2018-05-01_2018-05-31", - "type": "microsoft.CostManagement/dimensions", - "properties": { - "data": [], - "total": 377, - "category": "ResourceGroup", - "usageStart": "2018-05-01T00:00:00-07:00", - "usageEnd": "2018-05-31T00:00:00-07:00", - "description": "Resource group", - "filterEnabled": true, - "groupingEnabled": true - } - }, - { - "id": "providers/Microsoft.Billing/billingAccounts/100/departments/123/providers/microsoft.CostManagement/dimensions_ResourceType_2018-05-01_2018-05-31", - "name": "dimensions_ResourceType_2018-05-01_2018-05-31", - "type": "microsoft.CostManagement/dimensions", - "properties": { - "data": [], - "total": 37, - "category": "ResourceType", - "usageStart": "2018-05-01T00:00:00-07:00", - "usageEnd": "2018-05-31T00:00:00-07:00", - "description": "Resource type", - "filterEnabled": true, - "groupingEnabled": true - } - } - ] - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentDimensionsListExpandAndTop.json deleted file mode 100644 index 066a3bc16f25..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentDimensionsListExpandAndTop.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "parameters": { - "api-version": "2019-10-01", - "billingAccountId": "100", - "departmentId": "123", - "$expand": "properties/data", - "$top": 5, - "scope": "providers/Microsoft.Billing/billingAccounts/100/departments/123" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "providers/Microsoft.Billing/billingAccounts/100/departments/123/providers/microsoft.CostManagement/dimensions_ResourceGroup_2018-05-01_2018-05-31_5", - "name": "dimensions_ResourceGroup_2018-05-01_2018-05-31_5", - "type": "microsoft.CostManagement/dimensions", - "properties": { - "data": [ - "thoroetrg01", - "default-notificationhubs-westus", - "jedikeyvaultrg", - "contosocodeflow8d4a", - "noobaa" - ], - "total": 377, - "category": "ResourceGroup", - "usageStart": "2018-05-01T00:00:00-07:00", - "usageEnd": "2018-05-31T00:00:00-07:00", - "description": "Resource group", - "filterEnabled": true, - "groupingEnabled": true - } - }, - { - "id": "providers/Microsoft.Billing/billingAccounts/100/departments/123/providers/microsoft.CostManagement/dimensions_ResourceType_2018-05-01_2018-05-31_5", - "name": "dimensions_ResourceType_2018-05-01_2018-05-31_5", - "type": "microsoft.CostManagement/dimensions", - "properties": { - "data": [ - "microsoft.automation/automationaccounts", - "microsoft.databricks/workspaces", - "microsoft.dbformysql/servers", - "microsoft.containerregistry/registries", - "microsoft.search/searchservices" - ], - "total": 37, - "category": "ResourceType", - "usageStart": "2018-05-01T00:00:00-07:00", - "usageEnd": "2018-05-31T00:00:00-07:00", - "description": "Resource type", - "filterEnabled": true, - "groupingEnabled": true - } - } - ] - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentDimensionsListWithFilter.json deleted file mode 100644 index f486f6e36fa2..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentDimensionsListWithFilter.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "parameters": { - "api-version": "2019-10-01", - "billingAccountId": "100", - "departmentId": "123", - "$expand": "properties/data", - "$top": 5, - "$filter": "properties/category eq 'resourceId'", - "scope": "providers/Microsoft.Billing/billingAccounts/100/departments/123" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "providers/Microsoft.Billing/billingAccounts/100/departments/123/providers/microsoft.CostManagement/dimensions_ResourceId_2018-05-01_2018-05-31_5", - "name": "dimensions_ResourceId_2018-05-01_2018-05-31_5", - "type": "microsoft.CostManagement/dimensions", - "properties": { - "data": [ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/urphealthaccount", - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/srphytenaccount", - "/subscriptions/67e24f6b-1ec2-4c90-993a-dc2d25b00b6c/resourcegroups/defaultresourcegroup-eus/providers/microsoft.operationalinsights/workspaces/defaultworkspace-67e24f6b-1ec2-4c90-993a-dc2d25b00b6c-eus", - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg-sql-ha/providers/microsoft.compute/virtualmachines/sql-4qqp1", - "/subscriptions/a98d6dc5-eb8f-46cf-8938-f1fb08f03706/resourcegroups/databricks-rg-testwsp-xijmsdubneexm/providers/microsoft.compute/disks/488cdb42bf74474a98075415be3f806c-containerrootvolume" - ], - "total": 1409, - "category": "ResourceId", - "usageStart": "2018-05-01T00:00:00-07:00", - "usageEnd": "2018-05-31T00:00:00-07:00", - "description": "Resource Id", - "filterEnabled": true, - "groupingEnabled": true, - "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/100/departments/123/providers/Microsoft.CostManagement/Dimensions?$filter=properties/category eq 'resourceId'&$top=5&api-version=2019-10-01&$expand=properties/data&$skiptoken=AQAAAA%3D%3D" - } - } - ] - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentForecast.json deleted file mode 100644 index affaf9d67402..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentForecast.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "billingAccountId": "12345:6789", - "departmentId": "123", - "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/departments/123", - "parameters": { - "type": "Usage", - "timeframe": "MonthToDate", - "dataset": { - "granularity": "Daily", - "filter": { - "and": [ - { - "or": [ - { - "dimension": { - "name": "ResourceLocation", - "operator": "In", - "values": [ - "East US", - "West Europe" - ] - } - }, - { - "tag": { - "name": "Environment", - "operator": "In", - "values": [ - "UAT", - "Prod" - ] - } - } - ] - }, - { - "dimension": { - "name": "ResourceGroup", - "operator": "In", - "values": [ - "API" - ] - } - } - ] - } - }, - "includeActualCost": false, - "includeFreshPartialCost": false - } - }, - "responses": { - "200": { - "body": { - "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/departments/123/providers/Microsoft.CostManagement/query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", - "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", - "type": "microsoft.costmanagement/Query", - "properties": { - "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/departments/123/providers/Microsoft.CostManagement/Forecast?api-version=2019-10-01&$skiptoken=AQAAAA%3D%3D", - "columns": [ - { - "name": "PreTaxCost", - "type": "Number" - }, - { - "name": "ResourceGroup", - "type": "String" - }, - { - "name": "UsageDate", - "type": "Number" - }, - { - "name": "CostStatus", - "type": "String" - }, - { - "name": "Currency", - "type": "String" - } - ], - "rows": [ - [ - 2.10333307059661, - "JapanUnifia-Trial", - 20180331, - "Forecast", - "USD" - ], - [ - 218.68795741935486, - "RVIIOT-TRIAL", - 20180331, - "Forecast", - "USD" - ], - [ - 0.14384913581657052, - "VSTSHOL-1595322048000", - 20180401, - "Forecast", - "USD" - ], - [ - 0.009865586851323632, - "gs-stms-dev", - 20180429, - "Forecast", - "USD" - ] - ] - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentQuery.json deleted file mode 100644 index 59cd36defe51..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentQuery.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "parameters": { - "api-version": "2019-10-01", - "billingAccountId": "70664866", - "departmentId": "123", - "scope": "providers/Microsoft.Billing/billingAccounts/100/departments/123", - "parameters": { - "type": "Usage", - "timeframe": "MonthToDate", - "dataset": { - "granularity": "Daily", - "filter": { - "and": [ - { - "or": [ - { - "dimension": { - "name": "ResourceLocation", - "operator": "In", - "values": [ - "East US", - "West Europe" - ] - } - }, - { - "tag": { - "name": "Environment", - "operator": "In", - "values": [ - "UAT", - "Prod" - ] - } - } - ] - }, - { - "dimension": { - "name": "ResourceGroup", - "operator": "In", - "values": [ - "API" - ] - } - } - ] - } - } - } - }, - "responses": { - "200": { - "body": { - "id": "providers/Microsoft.Billing/billingAccounts/70664866/departments/123/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", - "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", - "type": "microsoft.costmanagement/Query", - "properties": { - "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/departments/123/providers/Microsoft.CostManagement/Query?api-version=2019-10-01&$skiptoken=AQAAAA%3D%3D", - "columns": [ - { - "name": "PreTaxCost", - "type": "Number" - }, - { - "name": "ResourceGroup", - "type": "String" - }, - { - "name": "UsageDate", - "type": "Number" - }, - { - "name": "Currency", - "type": "String" - } - ], - "rows": [ - [ - 19.545363672276512, - "JapanUnifia-Trial", - 20180331, - "USD" - ], - [ - 173.41979241290323, - "RVIIOT-TRIAL", - 20180331, - "USD" - ], - [ - 20.359416562625452, - "VSTSHOL-1595322048000", - 20180331, - "USD" - ], - [ - 0.16677720329728665, - "gs-stms-dev", - 20180331, - "USD" - ] - ] - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentQueryGrouping.json deleted file mode 100644 index 27ae96d00be2..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DepartmentQueryGrouping.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "parameters": { - "api-version": "2019-10-01", - "billingAccountId": "70664866", - "departmentId": "123", - "scope": "providers/Microsoft.Billing/billingAccounts/100/departments/123", - "parameters": { - "type": "Usage", - "timeframe": "TheLastMonth", - "dataset": { - "granularity": "None", - "aggregation": { - "totalCost": { - "name": "PreTaxCost", - "function": "Sum" - } - }, - "grouping": [ - { - "type": "Dimension", - "name": "ResourceGroup" - } - ] - } - } - }, - "responses": { - "200": { - "body": { - "id": "providers/Microsoft.Billing/billingAccounts/70664866/departments/123/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", - "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", - "type": "microsoft.costmanagement/Query", - "properties": { - "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/departments/123/providers/Microsoft.CostManagement/Query?api-version=2019-10-01&$skiptoken=AQAAAA%3D%3D", - "columns": [ - { - "name": "PreTaxCost", - "type": "Number" - }, - { - "name": "ResourceGroup", - "type": "String" - }, - { - "name": "Currency", - "type": "String" - } - ], - "rows": [ - [ - 19.545363672276512, - "JapanUnifia-Trial", - "USD" - ], - [ - 173.41979241290323, - "RVIIOT-TRIAL", - "USD" - ], - [ - 20.359416562625452, - "VSTSHOL-1595322048000", - "USD" - ] - ] - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DismissResourceGroupAlerts.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DismissResourceGroupAlerts.json deleted file mode 100644 index d72950db27ea..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DismissResourceGroupAlerts.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "parameters": { - "api-version": "2018-08-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "ScreenSharingTest-peer", - "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ScreenSharingTest-peer", - "alertId": "22222222-2222-2222-2222-222222222222", - "parameters": { - "properties": { - "status": "Dismissed" - } - } - }, - "responses": { - "200": { - "body": { - "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ScreenSharingTest-peer/providers/Microsoft.CostManagement/alerts/22222222-2222-2222-2222-222222222222", - "name": "22222222-2222-2222-2222-222222222222", - "type": "Microsoft.CostManagement/alerts", - "properties": { - "definition": { - "type": "Budget", - "category": "Cost", - "criteria": "CostThresholdExceeded" - }, - "description": "", - "source": "Preset", - "details": { - "timeGrainType": "Quarterly", - "periodStartDate": "2020-03-01T00:00:00Z", - "triggeredBy": "22222222-2222-2222-2222-222222222222_1_01", - "resourceGroupFilter": [], - "resourceFilter": [], - "meterFilter": [], - "tagFilter": {}, - "threshold": 0.8, - "operator": "GreaterThan", - "amount": 200000.0, - "unit": "USD", - "currentSpend": 161000.12, - "contactEmails": [ - "1234@contoso.com" - ], - "contactGroups": [], - "contactRoles": [], - "overridingAlert": null - }, - "costEntityId": "budget1", - "status": "Dismissed", - "creationTime": "2020-04-27T11:07:52.7143901Z", - "closeTime": "0001-01-01T00:00:00", - "modificationTime": "2020-04-28T11:06:02.8999373Z", - "statusModificationUserName": null, - "statusModificationTime": "0001-01-01T00:00:00" - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DismissSubscriptionAlerts.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DismissSubscriptionAlerts.json deleted file mode 100644 index 2b9751ea4241..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/DismissSubscriptionAlerts.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "parameters": { - "api-version": "2018-08-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "scope": "subscriptions/00000000-0000-0000-0000-000000000000", - "alertId": "22222222-2222-2222-2222-222222222222", - "parameters": { - "properties": { - "status": "Dismissed" - } - } - }, - "responses": { - "200": { - "body": { - "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/alerts/22222222-2222-2222-2222-222222222222", - "name": "22222222-2222-2222-2222-222222222222", - "type": "Microsoft.CostManagement/alerts", - "properties": { - "definition": { - "type": "Budget", - "category": "Cost", - "criteria": "CostThresholdExceeded" - }, - "description": "", - "source": "Preset", - "details": { - "timeGrainType": "Quarterly", - "periodStartDate": "2020-03-01T00:00:00Z", - "triggeredBy": "22222222-2222-2222-2222-222222222222_1_01", - "resourceGroupFilter": [], - "resourceFilter": [], - "meterFilter": [], - "tagFilter": {}, - "threshold": 0.8, - "operator": "GreaterThan", - "amount": 200000.0, - "unit": "USD", - "currentSpend": 161000.12, - "contactEmails": [ - "1234@contoso.com" - ], - "contactGroups": [], - "contactRoles": [], - "overridingAlert": null - }, - "costEntityId": "budget1", - "status": "Dismissed", - "creationTime": "2020-04-27T11:07:52.7143901Z", - "closeTime": "0001-01-01T00:00:00", - "modificationTime": "2020-04-28T11:06:02.8999373Z", - "statusModificationUserName": null, - "statusModificationTime": "0001-01-01T00:00:00" - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountAlerts.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountAlerts.json deleted file mode 100644 index eff8e650fe77..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountAlerts.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "parameters": { - "api-version": "2018-08-01-preview", - "billingAccountId": "12345:6789", - "enrollmentAccountId": "456", - "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/enrollmentAccounts/456" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/enrollmentAccounts/456/providers/Microsoft.CostManagement/alerts/00000000-0000-0000-0000-000000000000", - "name": "00000000-0000-0000-0000-000000000000", - "type": "Microsoft.CostManagement/alerts", - "properties": { - "definition": { - "type": "Budget", - "category": "Cost", - "criteria": "CostThresholdExceeded" - }, - "description": "", - "source": "Preset", - "details": { - "timeGrainType": "Quarterly", - "periodStartDate": "2020-03-01T00:00:00Z", - "triggeredBy": "00000000-0000-0000-0000-000000000000_1_01", - "resourceGroupFilter": [], - "resourceFilter": [], - "meterFilter": [], - "tagFilter": {}, - "threshold": 0.8, - "operator": "GreaterThan", - "amount": 200000.0, - "unit": "USD", - "currentSpend": 161000.12, - "contactEmails": [ - "1234@contoso.com" - ], - "contactGroups": [], - "contactRoles": [], - "overridingAlert": null - }, - "costEntityId": "budget1", - "status": "Active", - "creationTime": "2020-04-27T11:07:52.7143901Z", - "closeTime": "0001-01-01T00:00:00", - "modificationTime": "2020-04-28T11:06:02.8999373Z", - "statusModificationUserName": null, - "statusModificationTime": "0001-01-01T00:00:00" - } - }, - { - "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/enrollmentAccounts/456/providers/Microsoft.CostManagement/alerts/11111111-1111-1111-111111111111", - "name": "11111111-1111-1111-111111111111", - "type": "Microsoft.CostManagement/alerts", - "properties": { - "definition": { - "type": "Budget", - "category": "Cost", - "criteria": "CostThresholdExceeded" - }, - "description": "", - "source": "Preset", - "details": { - "timeGrainType": "Quarterly", - "periodStartDate": "2020-03-01T00:00:00Z", - "triggeredBy": "11111111-1111-1111-111111111111_1_01", - "resourceGroupFilter": [], - "resourceFilter": [], - "meterFilter": [], - "tagFilter": {}, - "threshold": 0.8, - "operator": "GreaterThan", - "amount": 200000.0, - "unit": "USD", - "currentSpend": 171000.32, - "contactEmails": [ - "1234@contoso.com" - ], - "contactGroups": [], - "contactRoles": [], - "overridingAlert": null - }, - "costEntityId": "budget1", - "status": "Active", - "creationTime": "2019-06-24T05:51:52.8713179Z", - "closeTime": "0001-01-01T00:00:00", - "modificationTime": "2019-08-31T17:51:55.1808807Z", - "statusModificationUserName": null, - "statusModificationTime": "0001-01-01T00:00:00" - } - } - ], - "nextLink": null - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountDimensionsList.json deleted file mode 100644 index 1c23de80068c..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountDimensionsList.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "parameters": { - "api-version": "2019-10-01", - "billingAccountId": "100", - "enrollmentAccountId": "456", - "scope": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/microsoft.CostManagement/dimensions_ResourceGroup_2018-05-01_2018-05-31", - "name": "dimensions_ResourceGroup_2018-05-01_2018-05-31", - "type": "microsoft.CostManagement/dimensions", - "properties": { - "data": [], - "total": 377, - "category": "ResourceGroup", - "usageStart": "2018-05-01T00:00:00-07:00", - "usageEnd": "2018-05-31T00:00:00-07:00", - "description": "Resource group", - "filterEnabled": true, - "groupingEnabled": true - } - }, - { - "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/microsoft.CostManagement/dimensions_ResourceType_2018-05-01_2018-05-31", - "name": "dimensions_ResourceType_2018-05-01_2018-05-31", - "type": "microsoft.CostManagement/dimensions", - "properties": { - "data": [], - "total": 37, - "category": "ResourceType", - "usageStart": "2018-05-01T00:00:00-07:00", - "usageEnd": "2018-05-31T00:00:00-07:00", - "description": "Resource type", - "filterEnabled": true, - "groupingEnabled": true - } - } - ] - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountDimensionsListExpandAndTop.json deleted file mode 100644 index 98551eb4e953..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountDimensionsListExpandAndTop.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "parameters": { - "api-version": "2019-10-01", - "billingAccountId": "100", - "enrollmentAccountId": "456", - "$expand": "properties/data", - "$top": 5, - "scope": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/microsoft.CostManagement/dimensions_ResourceGroup_2018-05-01_2018-05-31_5", - "name": "dimensions_ResourceGroup_2018-05-01_2018-05-31_5", - "type": "microsoft.CostManagement/dimensions", - "properties": { - "data": [ - "thoroetrg01", - "default-notificationhubs-westus", - "jedikeyvaultrg", - "contosocodeflow8d4a", - "noobaa" - ], - "total": 377, - "category": "ResourceGroup", - "usageStart": "2018-05-01T00:00:00-07:00", - "usageEnd": "2018-05-31T00:00:00-07:00", - "description": "Resource group", - "filterEnabled": true, - "groupingEnabled": true - } - }, - { - "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/microsoft.CostManagement/dimensions_ResourceType_2018-05-01_2018-05-31_5", - "name": "dimensions_ResourceType_2018-05-01_2018-05-31_5", - "type": "microsoft.CostManagement/dimensions", - "properties": { - "data": [ - "microsoft.automation/automationaccounts", - "microsoft.databricks/workspaces", - "microsoft.dbformysql/servers", - "microsoft.containerregistry/registries", - "microsoft.search/searchservices" - ], - "total": 37, - "category": "ResourceType", - "usageStart": "2018-05-01T00:00:00-07:00", - "usageEnd": "2018-05-31T00:00:00-07:00", - "description": "Resource type", - "filterEnabled": true, - "groupingEnabled": true - } - } - ] - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountDimensionsListWithFilter.json deleted file mode 100644 index 7de518cb7769..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountDimensionsListWithFilter.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "parameters": { - "api-version": "2019-10-01", - "billingAccountId": "100", - "enrollmentAccountId": "456", - "$expand": "properties/data", - "$top": 5, - "$filter": "properties/category eq 'resourceId'", - "scope": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/microsoft.CostManagement/dimensions_ResourceId_2018-05-01_2018-05-31_5", - "name": "dimensions_ResourceId_2018-05-01_2018-05-31_5", - "type": "microsoft.CostManagement/dimensions", - "properties": { - "data": [ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/urphealthaccount", - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/srphytenaccount", - "/subscriptions/67e24f6b-1ec2-4c90-993a-dc2d25b00b6c/resourcegroups/defaultresourcegroup-eus/providers/microsoft.operationalinsights/workspaces/defaultworkspace-67e24f6b-1ec2-4c90-993a-dc2d25b00b6c-eus", - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg-sql-ha/providers/microsoft.compute/virtualmachines/sql-4qqp1", - "/subscriptions/a98d6dc5-eb8f-46cf-8938-f1fb08f03706/resourcegroups/databricks-rg-testwsp-xijmsdubneexm/providers/microsoft.compute/disks/488cdb42bf74474a98075415be3f806c-containerrootvolume" - ], - "total": 1409, - "category": "ResourceId", - "usageStart": "2018-05-01T00:00:00-07:00", - "usageEnd": "2018-05-31T00:00:00-07:00", - "description": "Resource Id", - "filterEnabled": true, - "groupingEnabled": true, - "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/Microsoft.CostManagement/Dimensions?$filter=properties/category eq 'resourceId'&$top=5&api-version=2019-10-01&$expand=properties/data&$skiptoken=AQAAAA%3D%3D" - } - } - ] - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountForecast.json deleted file mode 100644 index f7673b462b25..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountForecast.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "billingAccountId": "12345:6789", - "enrollmentAccountId": "456", - "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/enrollmentAccounts/456", - "parameters": { - "type": "Usage", - "timeframe": "MonthToDate", - "dataset": { - "granularity": "Daily", - "filter": { - "and": [ - { - "or": [ - { - "dimension": { - "name": "ResourceLocation", - "operator": "In", - "values": [ - "East US", - "West Europe" - ] - } - }, - { - "tag": { - "name": "Environment", - "operator": "In", - "values": [ - "UAT", - "Prod" - ] - } - } - ] - }, - { - "dimension": { - "name": "ResourceGroup", - "operator": "In", - "values": [ - "API" - ] - } - } - ] - } - }, - "includeActualCost": false, - "includeFreshPartialCost": false - } - }, - "responses": { - "200": { - "body": { - "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/enrollmentAccounts/456/providers/Microsoft.CostManagement/query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", - "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", - "type": "microsoft.costmanagement/Query", - "properties": { - "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/enrollmentAccounts/456/providers/Microsoft.CostManagement/Forecast?api-version=2019-10-01&$skiptoken=AQAAAA%3D%3D", - "columns": [ - { - "name": "PreTaxCost", - "type": "Number" - }, - { - "name": "ResourceGroup", - "type": "String" - }, - { - "name": "UsageDate", - "type": "Number" - }, - { - "name": "CostStatus", - "type": "String" - }, - { - "name": "Currency", - "type": "String" - } - ], - "rows": [ - [ - 2.10333307059661, - "JapanUnifia-Trial", - 20180331, - "Forecast", - "USD" - ], - [ - 218.68795741935486, - "RVIIOT-TRIAL", - 20180331, - "Forecast", - "USD" - ], - [ - 0.14384913581657052, - "VSTSHOL-1595322048000", - 20180401, - "Forecast", - "USD" - ], - [ - 0.009865586851323632, - "gs-stms-dev", - 20180429, - "Forecast", - "USD" - ] - ] - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountQuery.json deleted file mode 100644 index d8adb4734eea..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountQuery.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "parameters": { - "api-version": "2019-10-01", - "billingAccountId": "70664866", - "enrollmentAccountId": "456", - "scope": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456", - "parameters": { - "type": "Usage", - "timeframe": "MonthToDate", - "dataset": { - "granularity": "Daily", - "filter": { - "and": [ - { - "or": [ - { - "dimension": { - "name": "ResourceLocation", - "operator": "In", - "values": [ - "East US", - "West Europe" - ] - } - }, - { - "tag": { - "name": "Environment", - "operator": "In", - "values": [ - "UAT", - "Prod" - ] - } - } - ] - }, - { - "dimension": { - "name": "ResourceGroup", - "operator": "In", - "values": [ - "API" - ] - } - } - ] - } - } - } - }, - "responses": { - "200": { - "body": { - "id": "providers/Microsoft.Billing/billingAccounts/70664866/enrollmentAccounts/456/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", - "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", - "type": "microsoft.costmanagement/Query", - "properties": { - "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/enrollmentAccounts/456/providers/Microsoft.CostManagement/Query?api-version=2019-10-01&$skiptoken=AQAAAA%3D%3D", - "columns": [ - { - "name": "PreTaxCost", - "type": "Number" - }, - { - "name": "ResourceGroup", - "type": "String" - }, - { - "name": "UsageDate", - "type": "Number" - }, - { - "name": "Currency", - "type": "String" - } - ], - "rows": [ - [ - 19.545363672276512, - "JapanUnifia-Trial", - 20180331, - "USD" - ], - [ - 173.41979241290323, - "RVIIOT-TRIAL", - 20180331, - "USD" - ], - [ - 20.359416562625452, - "VSTSHOL-1595322048000", - 20180331, - "USD" - ], - [ - 0.16677720329728665, - "gs-stms-dev", - 20180331, - "USD" - ] - ] - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountQueryGrouping.json deleted file mode 100644 index 34d2421e5a3a..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/EnrollmentAccountQueryGrouping.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "parameters": { - "api-version": "2019-10-01", - "billingAccountId": "70664866", - "enrollmentAccountId": "456", - "scope": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456", - "parameters": { - "type": "Usage", - "timeframe": "TheLastMonth", - "dataset": { - "granularity": "Daily", - "aggregation": { - "totalCost": { - "name": "PreTaxCost", - "function": "Sum" - } - }, - "grouping": [ - { - "type": "Dimension", - "name": "ResourceGroup" - } - ] - } - } - }, - "responses": { - "200": { - "body": { - "id": "providers/Microsoft.Billing/billingAccounts/70664866/enrollmentAccounts/456/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", - "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", - "type": "microsoft.costmanagement/Query", - "properties": { - "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/enrollmentAccounts/456/providers/Microsoft.CostManagement/Query?api-version=2019-10-01&$skiptoken=AQAAAA%3D%3D", - "columns": [ - { - "name": "PreTaxCost", - "type": "Number" - }, - { - "name": "ResourceGroup", - "type": "String" - }, - { - "name": "UsageDate", - "type": "Number" - }, - { - "name": "Currency", - "type": "String" - } - ], - "rows": [ - [ - 19.545363672276512, - "JapanUnifia-Trial", - 20180331, - "USD" - ], - [ - 173.41979241290323, - "RVIIOT-TRIAL", - 20180331, - "USD" - ], - [ - 20.359416562625452, - "VSTSHOL-1595322048000", - 20180331, - "USD" - ] - ] - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportCreateOrUpdateByBillingAccount.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportCreateOrUpdateByBillingAccount.json deleted file mode 100644 index 64869be56a4e..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportCreateOrUpdateByBillingAccount.json +++ /dev/null @@ -1,128 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "billingAccountId": "123456", - "scope": "providers/Microsoft.Billing/billingAccounts/123456", - "exportName": "TestExport", - "parameters": { - "properties": { - "schedule": { - "status": "Active", - "recurrence": "Weekly", - "recurrencePeriod": { - "from": "2020-06-01T00:00:00Z", - "to": "2020-10-31T00:00:00Z" - } - }, - "format": "Csv", - "deliveryInfo": { - "destination": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", - "container": "exports", - "rootFolderPath": "ad-hoc" - } - }, - "definition": { - "type": "ActualCost", - "timeframe": "MonthToDate", - "dataSet": { - "granularity": "Daily", - "configuration": { - "columns": [ - "Date", - "MeterId", - "ResourceId", - "ResourceLocation", - "Quantity" - ] - } - } - } - } - } - }, - "responses": { - "201": { - "body": { - "id": "providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.CostManagement/exports/TestExport", - "name": "TestExport", - "type": "Microsoft.CostManagement/exports", - "properties": { - "schedule": { - "status": "Active", - "recurrence": "Weekly", - "recurrencePeriod": { - "from": "2020-06-01T00:00:00Z", - "to": "2020-10-31T00:00:00Z" - } - }, - "format": "Csv", - "deliveryInfo": { - "destination": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", - "container": "exports", - "rootFolderPath": "ad-hoc" - } - }, - "definition": { - "type": "ActualCost", - "timeframe": "MonthToDate", - "dataSet": { - "granularity": "Daily", - "configuration": { - "columns": [ - "Date", - "MeterId", - "ResourceId", - "ResourceLocation", - "Quantity" - ] - } - } - } - } - } - }, - "200": { - "body": { - "id": "providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.CostManagement/exports/TestExport", - "name": "TestExport", - "type": "Microsoft.CostManagement/exports", - "properties": { - "schedule": { - "status": "Active", - "recurrence": "Weekly", - "recurrencePeriod": { - "from": "2020-06-01T00:00:00Z", - "to": "2020-10-31T00:00:00Z" - } - }, - "format": "Csv", - "deliveryInfo": { - "destination": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", - "container": "exports", - "rootFolderPath": "ad-hoc" - } - }, - "definition": { - "type": "ActualCost", - "timeframe": "MonthToDate", - "dataSet": { - "granularity": "Daily", - "configuration": { - "columns": [ - "Date", - "MeterId", - "ResourceId", - "ResourceLocation", - "Quantity" - ] - } - } - } - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportCreateOrUpdateByDepartment.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportCreateOrUpdateByDepartment.json deleted file mode 100644 index 1f118968e004..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportCreateOrUpdateByDepartment.json +++ /dev/null @@ -1,129 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "billingAccountId": "12", - "departmentId": "1234", - "scope": "providers/Microsoft.Billing/billingAccounts/12/departments/1234", - "exportName": "TestExport", - "parameters": { - "properties": { - "schedule": { - "status": "Active", - "recurrence": "Weekly", - "recurrencePeriod": { - "from": "2020-06-01T00:00:00Z", - "to": "2020-10-31T00:00:00Z" - } - }, - "format": "Csv", - "deliveryInfo": { - "destination": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", - "container": "exports", - "rootFolderPath": "ad-hoc" - } - }, - "definition": { - "type": "ActualCost", - "timeframe": "MonthToDate", - "dataSet": { - "granularity": "Daily", - "configuration": { - "columns": [ - "Date", - "MeterId", - "ResourceId", - "ResourceLocation", - "Quantity" - ] - } - } - } - } - } - }, - "responses": { - "201": { - "body": { - "id": "providers/Microsoft.Billing/billingAccounts/12/departments/1234/providers/Microsoft.CostManagement/exports/TestExport", - "name": "TestExport", - "type": "Microsoft.CostManagement/exports", - "properties": { - "schedule": { - "status": "Active", - "recurrence": "Weekly", - "recurrencePeriod": { - "from": "2020-06-01T00:00:00Z", - "to": "2020-10-31T00:00:00Z" - } - }, - "format": "Csv", - "deliveryInfo": { - "destination": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", - "container": "exports", - "rootFolderPath": "ad-hoc" - } - }, - "definition": { - "type": "ActualCost", - "timeframe": "MonthToDate", - "dataSet": { - "granularity": "Daily", - "configuration": { - "columns": [ - "Date", - "MeterId", - "ResourceId", - "ResourceLocation", - "Quantity" - ] - } - } - } - } - } - }, - "200": { - "body": { - "id": "providers/Microsoft.Billing/billingAccounts/12/departments/1234/providers/Microsoft.CostManagement/exports/TestExport", - "name": "TestExport", - "type": "Microsoft.CostManagement/exports", - "properties": { - "schedule": { - "status": "Active", - "recurrence": "Weekly", - "recurrencePeriod": { - "from": "2020-06-01T00:00:00Z", - "to": "2020-10-31T00:00:00Z" - } - }, - "format": "Csv", - "deliveryInfo": { - "destination": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", - "container": "exports", - "rootFolderPath": "ad-hoc" - } - }, - "definition": { - "type": "ActualCost", - "timeframe": "MonthToDate", - "dataSet": { - "granularity": "Daily", - "configuration": { - "columns": [ - "Date", - "MeterId", - "ResourceId", - "ResourceLocation", - "Quantity" - ] - } - } - } - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportCreateOrUpdateByEnrollmentAccount.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportCreateOrUpdateByEnrollmentAccount.json deleted file mode 100644 index b829ecc1d0eb..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportCreateOrUpdateByEnrollmentAccount.json +++ /dev/null @@ -1,129 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "billingAccountId": "100", - "enrollmentAccountId": "456", - "scope": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456", - "exportName": "TestExport", - "parameters": { - "properties": { - "schedule": { - "status": "Active", - "recurrence": "Weekly", - "recurrencePeriod": { - "from": "2020-06-01T00:00:00Z", - "to": "2020-10-31T00:00:00Z" - } - }, - "format": "Csv", - "deliveryInfo": { - "destination": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", - "container": "exports", - "rootFolderPath": "ad-hoc" - } - }, - "definition": { - "type": "ActualCost", - "timeframe": "MonthToDate", - "dataSet": { - "granularity": "Daily", - "configuration": { - "columns": [ - "Date", - "MeterId", - "ResourceId", - "ResourceLocation", - "Quantity" - ] - } - } - } - } - } - }, - "responses": { - "201": { - "body": { - "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/Microsoft.CostManagement/exports/TestExport", - "name": "TestExport", - "type": "Microsoft.CostManagement/exports", - "properties": { - "schedule": { - "status": "Active", - "recurrence": "Weekly", - "recurrencePeriod": { - "from": "2020-06-01T00:00:00Z", - "to": "2020-10-31T00:00:00Z" - } - }, - "format": "Csv", - "deliveryInfo": { - "destination": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", - "container": "exports", - "rootFolderPath": "ad-hoc" - } - }, - "definition": { - "type": "ActualCost", - "timeframe": "MonthToDate", - "dataSet": { - "granularity": "Daily", - "configuration": { - "columns": [ - "Date", - "MeterId", - "ResourceId", - "ResourceLocation", - "Quantity" - ] - } - } - } - } - } - }, - "200": { - "body": { - "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/Microsoft.CostManagement/exports/TestExport", - "name": "TestExport", - "type": "Microsoft.CostManagement/exports", - "properties": { - "schedule": { - "status": "Active", - "recurrence": "Weekly", - "recurrencePeriod": { - "from": "2020-06-01T00:00:00Z", - "to": "2020-10-31T00:00:00Z" - } - }, - "format": "Csv", - "deliveryInfo": { - "destination": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", - "container": "exports", - "rootFolderPath": "ad-hoc" - } - }, - "definition": { - "type": "ActualCost", - "timeframe": "MonthToDate", - "dataSet": { - "granularity": "Daily", - "configuration": { - "columns": [ - "Date", - "MeterId", - "ResourceId", - "ResourceLocation", - "Quantity" - ] - } - } - } - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportCreateOrUpdateByManagementGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportCreateOrUpdateByManagementGroup.json deleted file mode 100644 index 5bc26d149df5..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportCreateOrUpdateByManagementGroup.json +++ /dev/null @@ -1,128 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "managementGroupId": "TestMG", - "scope": "providers/Microsoft.Management/managementGroups/TestMG", - "exportName": "TestExport", - "parameters": { - "properties": { - "schedule": { - "status": "Active", - "recurrence": "Weekly", - "recurrencePeriod": { - "from": "2020-06-01T00:00:00Z", - "to": "2020-10-31T00:00:00Z" - } - }, - "format": "Csv", - "deliveryInfo": { - "destination": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", - "container": "exports", - "rootFolderPath": "ad-hoc" - } - }, - "definition": { - "type": "ActualCost", - "timeframe": "MonthToDate", - "dataSet": { - "granularity": "Daily", - "configuration": { - "columns": [ - "Date", - "MeterId", - "ResourceId", - "ResourceLocation", - "Quantity" - ] - } - } - } - } - } - }, - "responses": { - "201": { - "body": { - "id": "providers/Microsoft.Management/managementGroups/TestMG/providers/Microsoft.CostManagement/exports/TestExport", - "name": "TestExport", - "type": "Microsoft.CostManagement/exports", - "properties": { - "schedule": { - "status": "Active", - "recurrence": "Weekly", - "recurrencePeriod": { - "from": "2020-06-01T00:00:00Z", - "to": "2020-10-31T00:00:00Z" - } - }, - "format": "Csv", - "deliveryInfo": { - "destination": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", - "container": "exports", - "rootFolderPath": "ad-hoc" - } - }, - "definition": { - "type": "ActualCost", - "timeframe": "MonthToDate", - "dataSet": { - "granularity": "Daily", - "configuration": { - "columns": [ - "Date", - "MeterId", - "ResourceId", - "ResourceLocation", - "Quantity" - ] - } - } - } - } - } - }, - "200": { - "body": { - "id": "providers/Microsoft.Management/managementGroups/TestMG/providers/Microsoft.CostManagement/exports/TestExport", - "name": "TestExport", - "type": "Microsoft.CostManagement/exports", - "properties": { - "schedule": { - "status": "Active", - "recurrence": "Weekly", - "recurrencePeriod": { - "from": "2020-06-01T00:00:00Z", - "to": "2020-10-31T00:00:00Z" - } - }, - "format": "Csv", - "deliveryInfo": { - "destination": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", - "container": "exports", - "rootFolderPath": "ad-hoc" - } - }, - "definition": { - "type": "ActualCost", - "timeframe": "MonthToDate", - "dataSet": { - "granularity": "Daily", - "configuration": { - "columns": [ - "Date", - "MeterId", - "ResourceId", - "ResourceLocation", - "Quantity" - ] - } - } - } - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportCreateOrUpdateByResourceGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportCreateOrUpdateByResourceGroup.json deleted file mode 100644 index fa215b9ff077..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportCreateOrUpdateByResourceGroup.json +++ /dev/null @@ -1,129 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "MYDEVTESTRG", - "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", - "exportName": "TestExport", - "parameters": { - "properties": { - "schedule": { - "status": "Active", - "recurrence": "Weekly", - "recurrencePeriod": { - "from": "2020-06-01T00:00:00Z", - "to": "2020-10-31T00:00:00Z" - } - }, - "format": "Csv", - "deliveryInfo": { - "destination": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", - "container": "exports", - "rootFolderPath": "ad-hoc" - } - }, - "definition": { - "type": "ActualCost", - "timeframe": "MonthToDate", - "dataSet": { - "granularity": "Daily", - "configuration": { - "columns": [ - "Date", - "MeterId", - "ResourceId", - "ResourceLocation", - "Quantity" - ] - } - } - } - } - } - }, - "responses": { - "201": { - "body": { - "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/exports/TestExport", - "name": "TestExport", - "type": "Microsoft.CostManagement/exports", - "properties": { - "schedule": { - "status": "Active", - "recurrence": "Weekly", - "recurrencePeriod": { - "from": "2020-06-01T00:00:00Z", - "to": "2020-10-31T00:00:00Z" - } - }, - "format": "Csv", - "deliveryInfo": { - "destination": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", - "container": "exports", - "rootFolderPath": "ad-hoc" - } - }, - "definition": { - "type": "ActualCost", - "timeframe": "MonthToDate", - "dataSet": { - "granularity": "Daily", - "configuration": { - "columns": [ - "Date", - "MeterId", - "ResourceId", - "ResourceLocation", - "Quantity" - ] - } - } - } - } - } - }, - "200": { - "body": { - "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/exports/TestExport", - "name": "TestExport", - "type": "Microsoft.CostManagement/exports", - "properties": { - "schedule": { - "status": "Active", - "recurrence": "Weekly", - "recurrencePeriod": { - "from": "2020-06-01T00:00:00Z", - "to": "2020-10-31T00:00:00Z" - } - }, - "format": "Csv", - "deliveryInfo": { - "destination": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", - "container": "exports", - "rootFolderPath": "ad-hoc" - } - }, - "definition": { - "type": "ActualCost", - "timeframe": "MonthToDate", - "dataSet": { - "granularity": "Daily", - "configuration": { - "columns": [ - "Date", - "MeterId", - "ResourceId", - "ResourceLocation", - "Quantity" - ] - } - } - } - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportCreateOrUpdateBySubscription.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportCreateOrUpdateBySubscription.json deleted file mode 100644 index 22592d3bfc96..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportCreateOrUpdateBySubscription.json +++ /dev/null @@ -1,128 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "scope": "subscriptions/00000000-0000-0000-0000-000000000000", - "exportName": "TestExport", - "parameters": { - "properties": { - "schedule": { - "status": "Active", - "recurrence": "Weekly", - "recurrencePeriod": { - "from": "2020-06-01T00:00:00Z", - "to": "2020-10-31T00:00:00Z" - } - }, - "format": "Csv", - "deliveryInfo": { - "destination": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", - "container": "exports", - "rootFolderPath": "ad-hoc" - } - }, - "definition": { - "type": "ActualCost", - "timeframe": "MonthToDate", - "dataSet": { - "granularity": "Daily", - "configuration": { - "columns": [ - "Date", - "MeterId", - "ResourceId", - "ResourceLocation", - "Quantity" - ] - } - } - } - } - } - }, - "responses": { - "201": { - "body": { - "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/exports/TestExport", - "name": "TestExport", - "type": "Microsoft.CostManagement/exports", - "properties": { - "schedule": { - "status": "Active", - "recurrence": "Weekly", - "recurrencePeriod": { - "from": "2020-06-01T00:00:00Z", - "to": "2020-10-31T00:00:00Z" - } - }, - "format": "Csv", - "deliveryInfo": { - "destination": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", - "container": "exports", - "rootFolderPath": "ad-hoc" - } - }, - "definition": { - "type": "ActualCost", - "timeframe": "MonthToDate", - "dataSet": { - "granularity": "Daily", - "configuration": { - "columns": [ - "Date", - "MeterId", - "ResourceId", - "ResourceLocation", - "Quantity" - ] - } - } - } - } - } - }, - "200": { - "body": { - "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/exports/TestExport", - "name": "TestExport", - "type": "Microsoft.CostManagement/exports", - "properties": { - "schedule": { - "status": "Active", - "recurrence": "Weekly", - "recurrencePeriod": { - "from": "2020-06-01T00:00:00Z", - "to": "2020-10-31T00:00:00Z" - } - }, - "format": "Csv", - "deliveryInfo": { - "destination": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", - "container": "exports", - "rootFolderPath": "ad-hoc" - } - }, - "definition": { - "type": "ActualCost", - "timeframe": "MonthToDate", - "dataSet": { - "granularity": "Daily", - "configuration": { - "columns": [ - "Date", - "MeterId", - "ResourceId", - "ResourceLocation", - "Quantity" - ] - } - } - } - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportDeleteByBillingAccount.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportDeleteByBillingAccount.json deleted file mode 100644 index 723a1b70c13d..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportDeleteByBillingAccount.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "billingAccountId": "123456", - "scope": "providers/Microsoft.Billing/billingAccounts/123456", - "exportName": "TestExport" - }, - "responses": { - "200": {} - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportDeleteByDepartment.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportDeleteByDepartment.json deleted file mode 100644 index 9bff0064a096..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportDeleteByDepartment.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "billingAccountId": "12", - "departmentId": "1234", - "scope": "providers/Microsoft.Billing/billingAccounts/12/departments/1234", - "exportName": "TestExport" - }, - "responses": { - "200": {} - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportDeleteByEnrollmentAccount.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportDeleteByEnrollmentAccount.json deleted file mode 100644 index a9caf9fa5729..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportDeleteByEnrollmentAccount.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "billingAccountId": "100", - "enrollmentAccountId": "456", - "scope": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456", - "exportName": "TestExport" - }, - "responses": { - "200": {} - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportDeleteByManagementGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportDeleteByManagementGroup.json deleted file mode 100644 index d0d9845db934..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportDeleteByManagementGroup.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "managementGroupId": "TestMG", - "scope": "providers/Microsoft.Management/managementGroups/TestMG", - "exportName": "TestExport" - }, - "responses": { - "200": {} - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportDeleteByResourceGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportDeleteByResourceGroup.json deleted file mode 100644 index 430c0b81c4b2..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportDeleteByResourceGroup.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "MYDEVTESTRG", - "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", - "exportName": "TestExport" - }, - "responses": { - "200": {} - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportDeleteBySubscription.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportDeleteBySubscription.json deleted file mode 100644 index 74d07239431b..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportDeleteBySubscription.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "scope": "subscriptions/00000000-0000-0000-0000-000000000000", - "exportName": "TestExport" - }, - "responses": { - "200": {} - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportGetByBillingAccount.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportGetByBillingAccount.json deleted file mode 100644 index bb66830c00b6..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportGetByBillingAccount.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "billingAccountId": "123456", - "scope": "providers/Microsoft.Billing/billingAccounts/123456", - "exportName": "TestExport" - }, - "responses": { - "200": { - "body": { - "id": "providers/Microsoft.Billing/billingAccounts/{billingAccount-Id}/providers/Microsoft.CostManagement/exports/TestExport", - "name": "TestExport", - "type": "Microsoft.CostManagement/exports", - "properties": { - "format": "Csv", - "deliveryInfo": { - "destination": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", - "container": "exports", - "rootFolderPath": "ad-hoc" - } - }, - "definition": { - "type": "ActualCost", - "timeframe": "Custom", - "timePeriod": { - "from": "2020-05-01T00:00:00Z", - "to": "2020-05-31T00:00:00Z" - }, - "dataSet": { - "granularity": "Daily", - "configuration": { - "columns": [ - "Date", - "MeterId", - "ResourceId", - "ResourceLocation", - "Quantity" - ] - } - } - } - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportGetByDepartment.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportGetByDepartment.json deleted file mode 100644 index 415eef4ef834..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportGetByDepartment.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "billingAccountId": "12", - "departmentId": "1234", - "scope": "providers/Microsoft.Billing/billingAccounts/12/departments/1234", - "exportName": "TestExport" - }, - "responses": { - "200": { - "body": { - "id": "providers/Microsoft.Billing/billingAccounts/12/departments/1234/providers/Microsoft.CostManagement/exports/TestExport", - "name": "TestExport", - "type": "Microsoft.CostManagement/exports", - "properties": { - "format": "Csv", - "deliveryInfo": { - "destination": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", - "container": "exports", - "rootFolderPath": "ad-hoc" - } - }, - "definition": { - "type": "ActualCost", - "timeframe": "Custom", - "timePeriod": { - "from": "2020-06-01T00:00:00Z", - "to": "2020-06-30T00:00:00Z" - }, - "dataSet": { - "granularity": "Daily", - "configuration": { - "columns": [ - "Date", - "MeterId", - "ResourceId", - "ResourceLocation", - "Quantity" - ] - } - } - } - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportGetByEnrollmentAccount.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportGetByEnrollmentAccount.json deleted file mode 100644 index 92d21fd96154..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportGetByEnrollmentAccount.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "billingAccountId": "100", - "enrollmentAccountId": "456", - "scope": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456", - "exportName": "TestExport" - }, - "responses": { - "200": { - "body": { - "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/Microsoft.CostManagement/exports/TestExport", - "name": "TestExport", - "type": "Microsoft.CostManagement/exports", - "properties": { - "format": "Csv", - "deliveryInfo": { - "destination": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", - "container": "exports", - "rootFolderPath": "ad-hoc" - } - }, - "definition": { - "type": "ActualCost", - "timeframe": "Custom", - "timePeriod": { - "from": "2019-09-01T00:00:00Z", - "to": "2019-10-31T00:00:00Z" - }, - "dataSet": { - "granularity": "Daily", - "configuration": { - "columns": [ - "Date", - "MeterId", - "ResourceId", - "ResourceLocation", - "Quantity" - ] - } - } - } - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportGetByManagementGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportGetByManagementGroup.json deleted file mode 100644 index d8df71f3ddba..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportGetByManagementGroup.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "managementGroupId": "TestMG", - "scope": "providers/Microsoft.Management/managementGroups/TestMG", - "exportName": "TestExport" - }, - "responses": { - "200": { - "body": { - "id": "providers/Microsoft.Management/managementGroups/TestMG/providers/Microsoft.CostManagement/exports/TestExport", - "name": "TestExport", - "type": "Microsoft.CostManagement/exports", - "properties": { - "format": "Csv", - "deliveryInfo": { - "destination": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", - "container": "exports", - "rootFolderPath": "ad-hoc" - } - }, - "definition": { - "type": "ActualCost", - "timeframe": "Custom", - "timePeriod": { - "from": "2019-09-01T00:00:00Z", - "to": "2020-10-31T00:00:00Z" - }, - "dataSet": { - "granularity": "Daily", - "configuration": { - "columns": [ - "UsageDate", - "MeterId", - "InstanceId", - "ResourceLocation", - "UsageQuantity" - ] - } - } - } - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportGetByResourceGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportGetByResourceGroup.json deleted file mode 100644 index 58dacbf4d372..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportGetByResourceGroup.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "MYDEVTESTRG", - "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", - "exportName": "TestExport" - }, - "responses": { - "200": { - "body": { - "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/exports/TestExport", - "name": "TestExport", - "type": "Microsoft.CostManagement/exports", - "properties": { - "format": "Csv", - "deliveryInfo": { - "destination": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", - "container": "exports", - "rootFolderPath": "ad-hoc" - } - }, - "definition": { - "type": "ActualCost", - "timeframe": "Custom", - "timePeriod": { - "from": "2020-06-01T00:00:00Z", - "to": "2020-06-30T00:00:00Z" - }, - "dataSet": { - "granularity": "Daily", - "configuration": { - "columns": [ - "Date", - "MeterId", - "ResourceId", - "ResourceLocation", - "Quantity" - ] - } - } - } - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportGetBySubscription.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportGetBySubscription.json deleted file mode 100644 index b3c6a550c6f4..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportGetBySubscription.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "scope": "subscriptions/00000000-0000-0000-0000-000000000000", - "exportName": "TestExport" - }, - "responses": { - "200": { - "body": { - "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/exports/TestExport", - "name": "TestExport", - "type": "Microsoft.CostManagement/exports", - "properties": { - "format": "Csv", - "deliveryInfo": { - "destination": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", - "container": "exports", - "rootFolderPath": "ad-hoc" - } - }, - "definition": { - "type": "ActualCost", - "timeframe": "Custom", - "timePeriod": { - "from": "2019-06-01T00:00:00Z", - "to": "2019-07-31T00:00:00Z" - }, - "dataSet": { - "granularity": "Daily", - "configuration": { - "columns": [ - "Date", - "MeterId", - "ResourceId", - "ResourceLocation", - "Quantity" - ] - } - } - } - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunByBillingAccount.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunByBillingAccount.json deleted file mode 100644 index 723a1b70c13d..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunByBillingAccount.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "billingAccountId": "123456", - "scope": "providers/Microsoft.Billing/billingAccounts/123456", - "exportName": "TestExport" - }, - "responses": { - "200": {} - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunByDepartment.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunByDepartment.json deleted file mode 100644 index 9bff0064a096..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunByDepartment.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "billingAccountId": "12", - "departmentId": "1234", - "scope": "providers/Microsoft.Billing/billingAccounts/12/departments/1234", - "exportName": "TestExport" - }, - "responses": { - "200": {} - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunByEnrollmentAccount.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunByEnrollmentAccount.json deleted file mode 100644 index a9caf9fa5729..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunByEnrollmentAccount.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "billingAccountId": "100", - "enrollmentAccountId": "456", - "scope": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456", - "exportName": "TestExport" - }, - "responses": { - "200": {} - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunByManagementGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunByManagementGroup.json deleted file mode 100644 index d0d9845db934..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunByManagementGroup.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "managementGroupId": "TestMG", - "scope": "providers/Microsoft.Management/managementGroups/TestMG", - "exportName": "TestExport" - }, - "responses": { - "200": {} - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunByResourceGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunByResourceGroup.json deleted file mode 100644 index 430c0b81c4b2..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunByResourceGroup.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "MYDEVTESTRG", - "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", - "exportName": "TestExport" - }, - "responses": { - "200": {} - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunBySubscription.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunBySubscription.json deleted file mode 100644 index 74d07239431b..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunBySubscription.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "scope": "subscriptions/00000000-0000-0000-0000-000000000000", - "exportName": "TestExport" - }, - "responses": { - "200": {} - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunHistoryGetByBillingAccount.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunHistoryGetByBillingAccount.json deleted file mode 100644 index 23d2afb0ba7c..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunHistoryGetByBillingAccount.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "billingAccountId": "123456", - "scope": "providers/Microsoft.Billing/billingAccounts/123456", - "exportName": "TestExport" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "providers/Microsoft.Billing/billingAccounts/{billingAccount-id}/providers/Microsoft.CostManagement/exports/JohnDoeSchedule/Run/1e25d58a-a3b0-4916-9542-6e04a89bc100", - "properties": { - "executionType": "OnDemand", - "status": "Completed", - "submittedBy": "john.doe@gmail.com", - "submittedTime": "2018-08-03T07:52:15.6016681Z", - "processingStartTime": "2018-08-03T07:52:16.9123797Z", - "processingEndTime": "2018-08-03T07:52:28.0373318Z", - "fileName": "ScheduledTestsForJohnDoe/JohnDoeSchedule/20180729-20180804/JohnDoeSchedule_1e25d58a-a3b0-4916-9542-6e04a89bc100.csv", - "runSettings": { - "format": "Csv", - "deliveryInfo": { - "destination": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", - "container": "exports", - "rootFolderPath": "ScheduledTestsForJohnDoe" - } - }, - "definition": { - "type": "ActualCost", - "timeframe": "Custom", - "timePeriod": { - "from": "2020-06-01T00:00:00Z", - "to": "2020-10-31T00:00:00Z" - }, - "dataSet": { - "granularity": "Daily", - "configuration": { - "columns": [ - "Date", - "MeterId", - "ResourceId", - "ResourceLocation", - "Quantity" - ] - } - } - } - } - } - }, - { - "id": "providers/Microsoft.Billing/billingAccounts/{billingAccount-id}/providers/Microsoft.CostManagement/exports/JohnDoeSchedule/Run/11ac6811-dca3-46ad-b326-4704cf0c58ef", - "properties": { - "executionType": "Scheduled", - "status": "Completed", - "submittedBy": "System", - "submittedTime": "2018-08-03T09:03:58.5710244Z", - "processingStartTime": "2018-08-03T09:03:58.5710244Z", - "processingEndTime": "2018-08-03T09:04:19.7223808Z", - "fileName": "ScheduledTestsForJohnDoe/JohnDoeSchedule/20180729-20180804/JohnDoeSchedule_11ac6811-dca3-46ad-b326-4704cf0c58ef.csv", - "runSettings": { - "format": "Csv", - "deliveryInfo": { - "destination": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", - "container": "exports", - "rootFolderPath": "ScheduledTestsForJohnDoe" - } - }, - "definition": { - "type": "ActualCost", - "timeframe": "Custom", - "timePeriod": { - "from": "2020-06-01T00:00:00Z", - "to": "2020-10-31T00:00:00Z" - }, - "dataSet": { - "granularity": "Daily", - "configuration": { - "columns": [ - "Date", - "MeterId", - "ResourceId", - "ResourceLocation", - "Quantity" - ] - } - } - } - } - } - } - ] - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunHistoryGetByDepartment.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunHistoryGetByDepartment.json deleted file mode 100644 index 5812ec43b27f..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunHistoryGetByDepartment.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "billingAccountId": "12", - "departmentId": "1234", - "scope": "providers/Microsoft.Billing/billingAccounts/12/departments/1234", - "exportName": "TestExport" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "providers/Microsoft.Billing/billingAccounts/12/departments/1234/providers/Microsoft.CostManagement/exports/JohnDoeSchedule/Run/1e25d58a-a3b0-4916-9542-6e04a89bc100", - "properties": { - "executionType": "OnDemand", - "status": "Completed", - "submittedBy": "john.doe@gmail.com", - "submittedTime": "2018-08-03T07:52:15.6016681Z", - "processingStartTime": "2018-08-03T07:52:16.9123797Z", - "processingEndTime": "2018-08-03T07:52:28.0373318Z", - "fileName": "ScheduledTestsForJohnDoe/JohnDoeSchedule/20180729-20180804/JohnDoeSchedule_1e25d58a-a3b0-4916-9542-6e04a89bc100.csv", - "runSettings": { - "format": "Csv", - "deliveryInfo": { - "destination": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", - "container": "exports", - "rootFolderPath": "ScheduledTestsForJohnDoe" - } - }, - "definition": { - "type": "ActualCost", - "timeframe": "Custom", - "timePeriod": { - "from": "2020-06-01T00:00:00Z", - "to": "2020-10-31T00:00:00Z" - }, - "dataSet": { - "granularity": "Daily", - "configuration": { - "columns": [ - "Date", - "MeterId", - "ResourceId", - "ResourceLocation", - "Quantity" - ] - } - } - } - } - } - }, - { - "id": "providers/Microsoft.Billing/billingAccounts/12/departments/1234/providers/Microsoft.CostManagement/exports/JohnDoeSchedule/Run/11ac6811-dca3-46ad-b326-4704cf0c58ef", - "properties": { - "executionType": "Scheduled", - "status": "Completed", - "submittedBy": "System", - "submittedTime": "2018-08-03T09:03:58.5710244Z", - "processingStartTime": "2018-08-03T09:03:58.5710244Z", - "processingEndTime": "2018-08-03T09:04:19.7223808Z", - "fileName": "ScheduledTestsForJohnDoe/JohnDoeSchedule/20180729-20180804/JohnDoeSchedule_11ac6811-dca3-46ad-b326-4704cf0c58ef.csv", - "runSettings": { - "format": "Csv", - "deliveryInfo": { - "destination": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", - "container": "exports", - "rootFolderPath": "ScheduledTestsForJohnDoe" - } - }, - "definition": { - "type": "ActualCost", - "timeframe": "Custom", - "timePeriod": { - "from": "2020-06-01T00:00:00Z", - "to": "2020-10-31T00:00:00Z" - }, - "dataSet": { - "granularity": "Daily", - "configuration": { - "columns": [ - "Date", - "MeterId", - "ResourceId", - "ResourceLocation", - "Quantity" - ] - } - } - } - } - } - } - ] - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunHistoryGetByEnrollmentAccount.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunHistoryGetByEnrollmentAccount.json deleted file mode 100644 index 3cc2d9bdd01e..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunHistoryGetByEnrollmentAccount.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "parameters": { - "api-version": "2019-01-01", - "billingAccountId": "100", - "enrollmentAccountId": "456", - "scope": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456", - "exportName": "TestExport" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/Microsoft.CostManagement/exports/JohnDoeSchedule/Run/1e25d58a-a3b0-4916-9542-6e04a89bc100", - "properties": { - "executionType": "OnDemand", - "status": "Completed", - "submittedBy": "john.doe@gmail.com", - "submittedTime": "2018-08-03T07:52:15.6016681Z", - "processingStartTime": "2018-08-03T07:52:16.9123797Z", - "processingEndTime": "2018-08-03T07:52:28.0373318Z", - "fileName": "ScheduledTestsForJohnDoe/JohnDoeSchedule/20180729-20180804/JohnDoeSchedule_1e25d58a-a3b0-4916-9542-6e04a89bc100.csv", - "runSettings": { - "format": "Csv", - "deliveryInfo": { - "destination": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", - "container": "exports", - "rootFolderPath": "ScheduledTestsForJohnDoe" - } - }, - "definition": { - "type": "ActualCost", - "timeframe": "Custom", - "timePeriod": { - "from": "2020-06-01T00:00:00Z", - "to": "2020-10-31T00:00:00Z" - }, - "dataSet": { - "granularity": "Daily", - "configuration": { - "columns": [ - "Date", - "MeterId", - "ResourceId", - "ResourceLocation", - "Quantity" - ] - } - } - } - } - } - }, - { - "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/Microsoft.CostManagement/exports/JohnDoeSchedule/Run/11ac6811-dca3-46ad-b326-4704cf0c58ef", - "properties": { - "executionType": "Scheduled", - "status": "Completed", - "submittedBy": "System", - "submittedTime": "2018-08-03T09:03:58.5710244Z", - "processingStartTime": "2018-08-03T09:03:58.5710244Z", - "processingEndTime": "2018-08-03T09:04:19.7223808Z", - "fileName": "ScheduledTestsForJohnDoe/JohnDoeSchedule/20180729-20180804/JohnDoeSchedule_11ac6811-dca3-46ad-b326-4704cf0c58ef.csv", - "runSettings": { - "format": "Csv", - "deliveryInfo": { - "destination": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", - "container": "exports", - "rootFolderPath": "ScheduledTestsForJohnDoe" - } - }, - "definition": { - "type": "ActualCost", - "timeframe": "Custom", - "timePeriod": { - "from": "2020-06-01T00:00:00Z", - "to": "2020-10-31T00:00:00Z" - }, - "dataSet": { - "granularity": "Daily", - "configuration": { - "columns": [ - "Date", - "MeterId", - "ResourceId", - "ResourceLocation", - "Quantity" - ] - } - } - } - } - } - } - ] - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunHistoryGetByManagementGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunHistoryGetByManagementGroup.json deleted file mode 100644 index d271d702dd30..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunHistoryGetByManagementGroup.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "managementGroupId": "TestMG", - "scope": "providers/Microsoft.Management/managementGroups/TestMG", - "exportName": "TestExport" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "providers/Microsoft.Management/managementGroups/TestMG/providers/Microsoft.CostManagement/exports/TestExport/Run/1e25d58a-a3b0-4916-9542-6e04a89bc100", - "properties": { - "executionType": "OnDemand", - "status": "Completed", - "submittedBy": "john.doe@gmail.com", - "submittedTime": "2018-08-03T07:52:15.6016681Z", - "processingStartTime": "2018-08-03T07:52:16.9123797Z", - "processingEndTime": "2018-08-03T07:52:28.0373318Z", - "fileName": "ScheduledForTestExport/TestExportSchedule/20180729-20180804/TestExportSchedule_1e25d58a-a3b0-4916-9542-6e04a89bc100.csv", - "runSettings": { - "format": "Csv", - "deliveryInfo": { - "destination": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", - "container": "exports", - "rootFolderPath": "ScheduledTestsForJohnDoe" - } - }, - "definition": { - "type": "ActualCost", - "timeframe": "Custom", - "timePeriod": { - "from": "2020-06-01T00:00:00Z", - "to": "2020-10-31T00:00:00Z" - }, - "dataSet": { - "granularity": "Daily", - "configuration": { - "columns": [ - "Date", - "MeterId", - "ResourceId", - "ResourceLocation", - "Quantity" - ] - } - } - } - } - } - }, - { - "id": "providers/Microsoft.Management/managementGroups/TestMG/providers/Microsoft.CostManagement/exports/TestExport/Run/11ac6811-dca3-46ad-b326-4704cf0c58ef", - "properties": { - "executionType": "Scheduled", - "status": "Completed", - "submittedBy": "System", - "submittedTime": "2018-08-03T09:03:58.5710244Z", - "processingStartTime": "2018-08-03T09:03:58.5710244Z", - "processingEndTime": "2018-08-03T09:04:19.7223808Z", - "fileName": "ScheduledForTestExport/TestExportSchedule/20180729-20180804/TestExportSchedule_11ac6811-dca3-46ad-b326-4704cf0c58ef.csv", - "runSettings": { - "format": "Csv", - "deliveryInfo": { - "destination": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", - "container": "exports", - "rootFolderPath": "ScheduledTestsForJohnDoe" - } - }, - "definition": { - "type": "ActualCost", - "timeframe": "Custom", - "timePeriod": { - "from": "2020-06-01T00:00:00Z", - "to": "2020-10-31T00:00:00Z" - }, - "dataSet": { - "granularity": "Daily", - "configuration": { - "columns": [ - "Date", - "MeterId", - "ResourceId", - "ResourceLocation", - "Quantity" - ] - } - } - } - } - } - } - ] - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunHistoryGetByResourceGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunHistoryGetByResourceGroup.json deleted file mode 100644 index b6aaae782d44..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunHistoryGetByResourceGroup.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "MYDEVTESTRG", - "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", - "exportName": "TestExport" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/exports/JohnDoeSchedule/Run/1e25d58a-a3b0-4916-9542-6e04a89bc100", - "properties": { - "executionType": "OnDemand", - "status": "Completed", - "submittedBy": "john.doe@gmail.com", - "submittedTime": "2018-08-03T07:52:15.6016681Z", - "processingStartTime": "2018-08-03T07:52:16.9123797Z", - "processingEndTime": "2018-08-03T07:52:28.0373318Z", - "fileName": "ScheduledTestsForJohnDoe/JohnDoeSchedule/20180729-20180804/JohnDoeSchedule_1e25d58a-a3b0-4916-9542-6e04a89bc100.csv", - "runSettings": { - "format": "Csv", - "deliveryInfo": { - "destination": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", - "container": "exports", - "rootFolderPath": "ScheduledTestsForJohnDoe" - } - }, - "definition": { - "type": "ActualCost", - "timeframe": "Custom", - "timePeriod": { - "from": "2020-06-01T00:00:00Z", - "to": "2020-10-31T00:00:00Z" - }, - "dataSet": { - "granularity": "Daily", - "configuration": { - "columns": [ - "Date", - "MeterId", - "ResourceId", - "ResourceLocation", - "Quantity" - ] - } - } - } - } - } - }, - { - "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/exports/JohnDoeSchedule/Run/11ac6811-dca3-46ad-b326-4704cf0c58ef", - "properties": { - "executionType": "Scheduled", - "status": "Completed", - "submittedBy": "System", - "submittedTime": "2018-08-03T09:03:58.5710244Z", - "processingStartTime": "2018-08-03T09:03:58.5710244Z", - "processingEndTime": "2018-08-03T09:04:19.7223808Z", - "fileName": "ScheduledTestsForJohnDoe/JohnDoeSchedule/20180729-20180804/JohnDoeSchedule_11ac6811-dca3-46ad-b326-4704cf0c58ef.csv", - "runSettings": { - "format": "Csv", - "deliveryInfo": { - "destination": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", - "container": "exports", - "rootFolderPath": "ScheduledTestsForJohnDoe" - } - }, - "definition": { - "type": "ActualCost", - "timeframe": "Custom", - "timePeriod": { - "from": "2020-06-01T00:00:00Z", - "to": "2020-10-31T00:00:00Z" - }, - "dataSet": { - "granularity": "Daily", - "configuration": { - "columns": [ - "Date", - "MeterId", - "ResourceId", - "ResourceLocation", - "Quantity" - ] - } - } - } - } - } - } - ] - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunHistoryGetBySubscription.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunHistoryGetBySubscription.json deleted file mode 100644 index 1dc83a7d386e..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportRunHistoryGetBySubscription.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "scope": "subscriptions/00000000-0000-0000-0000-000000000000", - "exportName": "TestExport" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/exports/JohnDoeSchedule/Run/1e25d58a-a3b0-4916-9542-6e04a89bc100", - "properties": { - "executionType": "OnDemand", - "status": "Completed", - "submittedBy": "john.doe@gmail.com", - "submittedTime": "2018-08-03T07:52:15.6016681Z", - "processingStartTime": "2018-08-03T07:52:16.9123797Z", - "processingEndTime": "2018-08-03T07:52:28.0373318Z", - "fileName": "ScheduledTestsForJohnDoe/JohnDoeSchedule/20180729-20180804/JohnDoeSchedule_1e25d58a-a3b0-4916-9542-6e04a89bc100.csv", - "runSettings": { - "format": "Csv", - "deliveryInfo": { - "destination": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", - "container": "exports", - "rootFolderPath": "ScheduledTestsForJohnDoe" - } - }, - "definition": { - "type": "ActualCost", - "timeframe": "Custom", - "timePeriod": { - "from": "2020-06-01T00:00:00Z", - "to": "2020-10-31T00:00:00Z" - }, - "dataSet": { - "granularity": "Daily", - "configuration": { - "columns": [ - "Date", - "MeterId", - "ResourceId", - "ResourceLocation", - "Quantity" - ] - } - } - } - } - } - }, - { - "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/exports/JohnDoeSchedule/Run/11ac6811-dca3-46ad-b326-4704cf0c58ef", - "properties": { - "executionType": "Scheduled", - "status": "Completed", - "submittedBy": "System", - "submittedTime": "2018-08-03T09:03:58.5710244Z", - "processingStartTime": "2018-08-03T09:03:58.5710244Z", - "processingEndTime": "2018-08-03T09:04:19.7223808Z", - "fileName": "ScheduledTestsForJohnDoe/JohnDoeSchedule/20180729-20180804/JohnDoeSchedule_11ac6811-dca3-46ad-b326-4704cf0c58ef.csv", - "runSettings": { - "format": "Csv", - "deliveryInfo": { - "destination": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", - "container": "exports", - "rootFolderPath": "ScheduledTestsForJohnDoe" - } - }, - "definition": { - "type": "ActualCost", - "timeframe": "Custom", - "timePeriod": { - "from": "2020-06-01T00:00:00Z", - "to": "2020-10-31T00:00:00Z" - }, - "dataSet": { - "granularity": "Daily", - "configuration": { - "columns": [ - "Date", - "MeterId", - "ResourceId", - "ResourceLocation", - "Quantity" - ] - } - } - } - } - } - } - ] - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportsGetByBillingAccount.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportsGetByBillingAccount.json deleted file mode 100644 index e360bb9b5280..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportsGetByBillingAccount.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "billingAccountId": "123456", - "scope": "providers/Microsoft.Billing/billingAccounts/123456" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.CostManagement/exports/TestExport1", - "name": "TestExport1", - "type": "Microsoft.CostManagement/exports", - "properties": { - "format": "Csv", - "deliveryInfo": { - "destination": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", - "container": "exports", - "rootFolderPath": "ad-hoc" - } - }, - "definition": { - "type": "ActualCost", - "timeframe": "Custom", - "timePeriod": { - "from": "2020-06-01T00:00:00Z", - "to": "2020-10-31T00:00:00Z" - }, - "dataSet": { - "granularity": "Daily", - "configuration": { - "columns": [ - "Date", - "MeterId", - "ResourceId", - "ResourceLocation", - "Quantity" - ] - } - } - } - } - }, - { - "id": "providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.CostManagement/exports/TestExport2", - "name": "TestExport2", - "type": "Microsoft.CostManagement/exports", - "properties": { - "schedule": { - "status": "Active", - "recurrence": "Weekly", - "recurrencePeriod": { - "from": "2020-06-01T00:00:00Z", - "to": "2020-10-31T00:00:00Z" - } - }, - "format": "Csv", - "deliveryInfo": { - "destination": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", - "container": "exports", - "rootFolderPath": "ad-hoc" - } - }, - "definition": { - "type": "ActualCost", - "timeframe": "WeekToDate", - "dataSet": { - "granularity": "Daily", - "configuration": { - "columns": [ - "Date", - "MeterId", - "ResourceId", - "ResourceLocation", - "Quantity" - ] - } - } - } - } - } - ] - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportsGetByDepartment.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportsGetByDepartment.json deleted file mode 100644 index 3bdc6e63fd5a..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportsGetByDepartment.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "billingAccountId": "12", - "departmentId": "1234", - "scope": "providers/Microsoft.Billing/billingAccounts/12/departments/123" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "providers/Microsoft.Billing/billingAccounts/12/departments/1234/providers/Microsoft.CostManagement/exports/TestExport1", - "name": "TestExport1", - "type": "Microsoft.CostManagement/exports", - "properties": { - "format": "Csv", - "deliveryInfo": { - "destination": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", - "container": "exports", - "rootFolderPath": "ad-hoc" - } - }, - "definition": { - "type": "ActualCost", - "timeframe": "Custom", - "timePeriod": { - "from": "2020-06-01T00:00:00Z", - "to": "2020-10-31T00:00:00Z" - }, - "dataSet": { - "granularity": "Daily", - "configuration": { - "columns": [ - "Date", - "MeterId", - "ResourceId", - "ResourceLocation", - "Quantity" - ] - } - } - } - } - }, - { - "id": "providers/Microsoft.Billing/billingAccounts/12/departments/1234/providers/Microsoft.CostManagement/exports/TestExport2", - "name": "TestExport2", - "type": "Microsoft.CostManagement/exports", - "properties": { - "schedule": { - "status": "Active", - "recurrence": "Weekly", - "recurrencePeriod": { - "from": "2020-06-01T00:00:00Z", - "to": "2020-10-31T00:00:00Z" - } - }, - "format": "Csv", - "deliveryInfo": { - "destination": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", - "container": "exports", - "rootFolderPath": "ad-hoc" - } - }, - "definition": { - "type": "ActualCost", - "timeframe": "WeekToDate", - "dataSet": { - "granularity": "Daily", - "configuration": { - "columns": [ - "Date", - "MeterId", - "ResourceId", - "ResourceLocation", - "Quantity" - ] - } - } - } - } - } - ] - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportsGetByEnrollmentAccount.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportsGetByEnrollmentAccount.json deleted file mode 100644 index abbb4951a11e..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportsGetByEnrollmentAccount.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "billingAccountId": "100", - "enrollmentAccountId": "456", - "scope": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/Microsoft.CostManagement/exports/TestExport1", - "name": "TestExport1", - "type": "Microsoft.CostManagement/exports", - "properties": { - "format": "Csv", - "deliveryInfo": { - "destination": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", - "container": "exports", - "rootFolderPath": "ad-hoc" - } - }, - "definition": { - "type": "ActualCost", - "timeframe": "Custom", - "timePeriod": { - "from": "2020-06-01T00:00:00Z", - "to": "2020-10-31T00:00:00Z" - }, - "dataSet": { - "granularity": "Daily", - "configuration": { - "columns": [ - "Date", - "MeterId", - "ResourceId", - "ResourceLocation", - "Quantity" - ] - } - } - } - } - }, - { - "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/Microsoft.CostManagement/exports/TestExport2", - "name": "TestExport2", - "type": "Microsoft.CostManagement/exports", - "properties": { - "schedule": { - "status": "Active", - "recurrence": "Weekly", - "recurrencePeriod": { - "from": "2020-06-01T00:00:00Z", - "to": "2020-10-31T00:00:00Z" - } - }, - "format": "Csv", - "deliveryInfo": { - "destination": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", - "container": "exports", - "rootFolderPath": "ad-hoc" - } - }, - "definition": { - "type": "ActualCost", - "timeframe": "WeekToDate", - "dataSet": { - "granularity": "Daily", - "configuration": { - "columns": [ - "Date", - "MeterId", - "ResourceId", - "ResourceLocation", - "Quantity" - ] - } - } - } - } - } - ] - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportsGetByManagementGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportsGetByManagementGroup.json deleted file mode 100644 index 9bf48014812b..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportsGetByManagementGroup.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "managementGroupId": "TestMG", - "scope": "providers/Microsoft.Management/managementGroups/TestMG" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "providers/Microsoft.Management/managementGroups/TestMG/providers/Microsoft.CostManagement/exports/TestExport1", - "name": "TestExport1", - "type": "Microsoft.CostManagement/exports", - "properties": { - "format": "Csv", - "deliveryInfo": { - "destination": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", - "container": "exports", - "rootFolderPath": "ad-hoc" - } - }, - "definition": { - "type": "ActualCost", - "timeframe": "Custom", - "timePeriod": { - "from": "2020-06-01T00:00:00Z", - "to": "2020-10-31T00:00:00Z" - }, - "dataSet": { - "granularity": "Daily", - "configuration": { - "columns": [ - "Date", - "MeterId", - "ResourceId", - "ResourceLocation", - "Quantity" - ] - } - } - } - } - }, - { - "id": "providers/Microsoft.Management/managementGroups/TestMG/providers/Microsoft.CostManagement/exports/TestExport2", - "name": "TestExport2", - "type": "Microsoft.CostManagement/exports", - "properties": { - "schedule": { - "status": "Active", - "recurrence": "Weekly", - "recurrencePeriod": { - "from": "2020-06-01T00:00:00Z", - "to": "2020-10-31T00:00:00Z" - } - }, - "format": "Csv", - "deliveryInfo": { - "destination": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", - "container": "exports", - "rootFolderPath": "ad-hoc" - } - }, - "definition": { - "type": "ActualCost", - "timeframe": "WeekToDate", - "dataSet": { - "granularity": "Daily", - "configuration": { - "columns": [ - "Date", - "MeterId", - "ResourceId", - "ResourceLocation", - "Quantity" - ] - } - } - } - } - } - ] - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportsGetByResourceGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportsGetByResourceGroup.json deleted file mode 100644 index 1ba77e1fa614..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportsGetByResourceGroup.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "MYDEVTESTRG", - "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/exports/TestExport1", - "name": "TestExport1", - "type": "Microsoft.CostManagement/exports", - "properties": { - "format": "Csv", - "deliveryInfo": { - "destination": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", - "container": "exports", - "rootFolderPath": "ad-hoc" - } - }, - "definition": { - "type": "ActualCost", - "timeframe": "Custom", - "timePeriod": { - "from": "2020-06-01T00:00:00Z", - "to": "2020-10-31T00:00:00Z" - }, - "dataSet": { - "granularity": "Daily", - "configuration": { - "columns": [ - "Date", - "MeterId", - "ResourceId", - "ResourceLocation", - "Quantity" - ] - } - } - } - } - }, - { - "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/exports/TestExport2", - "name": "TestExport2", - "type": "Microsoft.CostManagement/exports", - "properties": { - "schedule": { - "status": "Active", - "recurrence": "Weekly", - "recurrencePeriod": { - "from": "2020-06-01T00:00:00Z", - "to": "2020-10-31T00:00:00Z" - } - }, - "format": "Csv", - "deliveryInfo": { - "destination": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", - "container": "exports", - "rootFolderPath": "ad-hoc" - } - }, - "definition": { - "type": "ActualCost", - "timeframe": "WeekToDate", - "dataSet": { - "granularity": "Daily", - "configuration": { - "columns": [ - "Date", - "MeterId", - "ResourceId", - "ResourceLocation", - "Quantity" - ] - } - } - } - } - } - ] - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportsGetBySubscription.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportsGetBySubscription.json deleted file mode 100644 index c842a554eca8..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExportsGetBySubscription.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "scope": "subscriptions/00000000-0000-0000-0000-000000000000" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/exports/TestExport1", - "name": "TestExport1", - "type": "Microsoft.CostManagement/exports", - "properties": { - "format": "Csv", - "deliveryInfo": { - "destination": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", - "container": "exports", - "rootFolderPath": "ad-hoc" - } - }, - "definition": { - "type": "ActualCost", - "timeframe": "Custom", - "timePeriod": { - "from": "2020-06-01T00:00:00Z", - "to": "2020-10-31T00:00:00Z" - }, - "dataSet": { - "granularity": "Daily", - "configuration": { - "columns": [ - "Date", - "MeterId", - "ResourceId", - "ResourceLocation", - "Quantity" - ] - } - } - } - } - }, - { - "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/exports/TestExport2", - "name": "TestExport2", - "type": "Microsoft.CostManagement/exports", - "properties": { - "schedule": { - "status": "Active", - "recurrence": "Weekly", - "recurrencePeriod": { - "from": "2020-06-01T00:00:00Z", - "to": "2020-10-31T00:00:00Z" - } - }, - "format": "Csv", - "deliveryInfo": { - "destination": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", - "container": "exports", - "rootFolderPath": "ad-hoc" - } - }, - "definition": { - "type": "ActualCost", - "timeframe": "WeekToDate", - "dataSet": { - "granularity": "Daily", - "configuration": { - "columns": [ - "Date", - "MeterId", - "ResourceId", - "ResourceLocation", - "Quantity" - ] - } - } - } - } - } - ] - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalBillingAccountAlerts.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalBillingAccountAlerts.json deleted file mode 100644 index 3172c3380a43..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalBillingAccountAlerts.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "parameters": { - "api-version": "2018-08-01-preview", - "externalCloudProviderId": "100", - "externalCloudProviderType": "externalBillingAccounts" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "providers/Microsoft.CostManagement/externalBillingAccounts/100/providers/Microsoft.CostManagement/alerts/00000000-0000-0000-0000-000000000000", - "name": "00000000-0000-0000-0000-000000000000", - "type": "Microsoft.CostManagement/alerts", - "properties": { - "definition": { - "type": "Budget", - "category": "Cost", - "criteria": "CostThresholdExceeded" - }, - "description": "", - "source": "Preset", - "details": { - "timeGrainType": "Quarterly", - "periodStartDate": "2020-03-01T00:00:00Z", - "triggeredBy": "00000000-0000-0000-0000-000000000000_1_01", - "resourceGroupFilter": [], - "resourceFilter": [], - "meterFilter": [], - "tagFilter": {}, - "threshold": 0.8, - "operator": "GreaterThan", - "amount": 200000.0, - "unit": "USD", - "currentSpend": 161000.12, - "contactEmails": [ - "1234@contoso.com" - ], - "contactGroups": [], - "contactRoles": [], - "overridingAlert": null - }, - "costEntityId": "budget1", - "status": "Active", - "creationTime": "2020-04-27T11:07:52.7143901Z", - "closeTime": "0001-01-01T00:00:00", - "modificationTime": "2020-04-28T11:06:02.8999373Z", - "statusModificationUserName": null, - "statusModificationTime": "0001-01-01T00:00:00" - } - }, - { - "id": "providers/Microsoft.CostManagement/externalBillingAccounts/100/providers/Microsoft.CostManagement/alerts/11111111-1111-1111-111111111111", - "name": "11111111-1111-1111-111111111111", - "type": "Microsoft.CostManagement/alerts", - "properties": { - "definition": { - "type": "Budget", - "category": "Cost", - "criteria": "CostThresholdExceeded" - }, - "description": "", - "source": "Preset", - "details": { - "timeGrainType": "Quarterly", - "periodStartDate": "2020-03-01T00:00:00Z", - "triggeredBy": "11111111-1111-1111-111111111111_1_01", - "resourceGroupFilter": [], - "resourceFilter": [], - "meterFilter": [], - "tagFilter": {}, - "threshold": 0.8, - "operator": "GreaterThan", - "amount": 200000.0, - "unit": "USD", - "currentSpend": 171000.32, - "contactEmails": [ - "1234@contoso.com" - ], - "contactGroups": [], - "contactRoles": [], - "overridingAlert": null - }, - "costEntityId": "budget1", - "status": "Active", - "creationTime": "2019-06-24T05:51:52.8713179Z", - "closeTime": "0001-01-01T00:00:00", - "modificationTime": "2019-08-31T17:51:55.1808807Z", - "statusModificationUserName": null, - "statusModificationTime": "0001-01-01T00:00:00" - } - } - ], - "nextLink": null - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalBillingAccountForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalBillingAccountForecast.json deleted file mode 100644 index b73840ab14bc..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalBillingAccountForecast.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "externalCloudProviderId": "100", - "externalCloudProviderType": "externalBillingAccounts", - "parameters": { - "type": "Usage", - "timeframe": "MonthToDate", - "dataset": { - "granularity": "Daily", - "filter": { - "and": [ - { - "or": [ - { - "dimension": { - "name": "ResourceLocation", - "operator": "In", - "values": [ - "East US", - "West Europe" - ] - } - }, - { - "tag": { - "name": "Environment", - "operator": "In", - "values": [ - "UAT", - "Prod" - ] - } - } - ] - }, - { - "dimension": { - "name": "ResourceGroup", - "operator": "In", - "values": [ - "API" - ] - } - } - ] - } - } - } - }, - "responses": { - "200": { - "body": { - "id": "providers/Microsoft.CostManagement/externalBillingAccounts/100/query/6dc7b06a-d90a-4df5-b655-ce6cf1c0814d", - "name": "6dc7b06a-d90a-4df5-b655-ce6cf1c0814d", - "type": "Microsoft.CostManagement/query", - "properties": { - "nextLink": null, - "columns": [ - { - "name": "PreTaxCost", - "type": "Number" - }, - { - "name": "CostStatus", - "type": "String" - }, - { - "name": "Currency", - "type": "String" - } - ], - "rows": [ - [ - 0.0, - "Forecast", - "USD" - ], - [ - 30.2572751438, - "Forecast", - "USD" - ], - [ - 0.076757602000000022, - "Forecast", - "USD" - ], - [ - 50.430964190400012, - "Forecast", - "USD" - ] - ] - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalBillingAccountsDimensions.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalBillingAccountsDimensions.json deleted file mode 100644 index 5172c0cdcdb6..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalBillingAccountsDimensions.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "externalCloudProviderId": "100", - "externalCloudProviderType": "externalBillingAccounts" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "providers/Microsoft.CostManagement/externalBillingAccounts/100/dimensions_ResourceType_2019-12-01_2019-12-31", - "name": "dimensions_ResourceType_2019-12-01_2019-12-31", - "type": "microsoft.consumption/dimensions", - "properties": { - "data": [], - "total": 0, - "category": "ResourceType", - "description": "Resource type", - "usageStart": "2019-12-01T00:00:00Z", - "usageEnd": "2019-12-31T00:00:00Z", - "filterEnabled": true, - "groupingEnabled": true - } - }, - { - "id": "providers/Microsoft.CostManagement/externalBillingAccounts/100/dimensions_ResourceId_2019-12-01_2019-12-31", - "name": "dimensions_ResourceId_2019-12-01_2019-12-31", - "type": "microsoft.consumption/dimensions", - "properties": { - "data": [], - "total": 0, - "category": "ResourceId", - "description": "Resource ID", - "usageStart": "2019-12-01T00:00:00Z", - "usageEnd": "2019-12-31T00:00:00Z", - "filterEnabled": true, - "groupingEnabled": true - } - } - ] - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalBillingAccountsQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalBillingAccountsQuery.json deleted file mode 100644 index 56e1a522099c..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalBillingAccountsQuery.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "externalCloudProviderId": "100", - "externalCloudProviderType": "externalBillingAccounts", - "parameters": { - "type": "Usage", - "timeframe": "MonthToDate", - "dataset": { - "granularity": "Daily", - "filter": { - "and": [ - { - "or": [ - { - "dimension": { - "name": "ResourceLocation", - "operator": "In", - "values": [ - "East US", - "West Europe" - ] - } - }, - { - "tag": { - "name": "Environment", - "operator": "In", - "values": [ - "UAT", - "Prod" - ] - } - } - ] - }, - { - "dimension": { - "name": "ResourceGroup", - "operator": "In", - "values": [ - "API" - ] - } - } - ] - } - } - } - }, - "responses": { - "200": { - "body": { - "id": "providers/Microsoft.CostManagement/externalBillingAccounts/100/query/6dc7b06a-d90a-4df5-b655-ce6cf1c0814d", - "name": "6dc7b06a-d90a-4df5-b655-ce6cf1c0814d", - "type": "Microsoft.CostManagement/query", - "properties": { - "nextLink": null, - "columns": [ - { - "name": "PreTaxCost", - "type": "Number" - }, - { - "name": "ServiceName", - "type": "String" - }, - { - "name": "Currency", - "type": "String" - } - ], - "rows": [ - [ - 0.0, - "abc db", - "USD" - ], - [ - 30.2572751438, - "abc compute cloud", - "USD" - ], - [ - 0.076757602000000022, - "abc file system", - "USD" - ], - [ - 50.430964190400012, - "abc elasticache", - "USD" - ] - ] - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalSubscriptionAlerts.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalSubscriptionAlerts.json deleted file mode 100644 index fe966bbe5f8e..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalSubscriptionAlerts.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "parameters": { - "api-version": "2018-08-01-preview", - "externalCloudProviderId": "100", - "externalCloudProviderType": "externalSubscriptions" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "providers/Microsoft.CostManagement/externalSubscriptions/100/providers/Microsoft.CostManagement/alerts/00000000-0000-0000-0000-000000000000", - "name": "00000000-0000-0000-0000-000000000000", - "type": "Microsoft.CostManagement/alerts", - "properties": { - "definition": { - "type": "Budget", - "category": "Cost", - "criteria": "CostThresholdExceeded" - }, - "description": "", - "source": "Preset", - "details": { - "timeGrainType": "Quarterly", - "periodStartDate": "2020-03-01T00:00:00Z", - "triggeredBy": "00000000-0000-0000-0000-000000000000_1_01", - "resourceGroupFilter": [], - "resourceFilter": [], - "meterFilter": [], - "tagFilter": {}, - "threshold": 0.8, - "operator": "GreaterThan", - "amount": 200000.0, - "unit": "USD", - "currentSpend": 161000.12, - "contactEmails": [ - "1234@contoso.com" - ], - "contactGroups": [], - "contactRoles": [], - "overridingAlert": null - }, - "costEntityId": "budget1", - "status": "Active", - "creationTime": "2020-04-27T11:07:52.7143901Z", - "closeTime": "0001-01-01T00:00:00", - "modificationTime": "2020-04-28T11:06:02.8999373Z", - "statusModificationUserName": null, - "statusModificationTime": "0001-01-01T00:00:00" - } - }, - { - "id": "providers/Microsoft.CostManagement/externalSubscriptions/100/providers/Microsoft.CostManagement/alerts/11111111-1111-1111-111111111111", - "name": "11111111-1111-1111-111111111111", - "type": "Microsoft.CostManagement/alerts", - "properties": { - "definition": { - "type": "Budget", - "category": "Cost", - "criteria": "CostThresholdExceeded" - }, - "description": "", - "source": "Preset", - "details": { - "timeGrainType": "Quarterly", - "periodStartDate": "2020-03-01T00:00:00Z", - "triggeredBy": "11111111-1111-1111-111111111111_1_01", - "resourceGroupFilter": [], - "resourceFilter": [], - "meterFilter": [], - "tagFilter": {}, - "threshold": 0.8, - "operator": "GreaterThan", - "amount": 200000.0, - "unit": "USD", - "currentSpend": 171000.32, - "contactEmails": [ - "1234@contoso.com" - ], - "contactGroups": [], - "contactRoles": [], - "overridingAlert": null - }, - "costEntityId": "budget1", - "status": "Active", - "creationTime": "2019-06-24T05:51:52.8713179Z", - "closeTime": "0001-01-01T00:00:00", - "modificationTime": "2019-08-31T17:51:55.1808807Z", - "statusModificationUserName": null, - "statusModificationTime": "0001-01-01T00:00:00" - } - } - ], - "nextLink": null - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalSubscriptionForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalSubscriptionForecast.json deleted file mode 100644 index 2ffa4801b11d..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalSubscriptionForecast.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "externalCloudProviderId": "100", - "externalCloudProviderType": "externalSubscriptions", - "parameters": { - "type": "Usage", - "timeframe": "MonthToDate", - "dataset": { - "granularity": "Daily", - "filter": { - "and": [ - { - "or": [ - { - "dimension": { - "name": "ResourceLocation", - "operator": "In", - "values": [ - "East US", - "West Europe" - ] - } - }, - { - "tag": { - "name": "Environment", - "operator": "In", - "values": [ - "UAT", - "Prod" - ] - } - } - ] - }, - { - "dimension": { - "name": "ResourceGroup", - "operator": "In", - "values": [ - "API" - ] - } - } - ] - } - } - } - }, - "responses": { - "200": { - "body": { - "id": "providers/Microsoft.CostManagement/externalSubscriptions/100/query/d99477af-7510-40ee-aca2-e59bdca0d10d", - "name": "d99477af-7510-40ee-aca2-e59bdca0d10d", - "type": "Microsoft.CostManagement/query", - "properties": { - "nextLink": null, - "columns": [ - { - "name": "PreTaxCost", - "type": "Number" - }, - { - "name": "UsageDate", - "type": "Number" - }, - { - "name": "CostStatus", - "type": "String" - }, - { - "name": "Currency", - "type": "String" - } - ], - "rows": [] - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalSubscriptionsDimensions.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalSubscriptionsDimensions.json deleted file mode 100644 index 5320be178ef0..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalSubscriptionsDimensions.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "externalCloudProviderId": "100", - "externalCloudProviderType": "externalSubscriptions" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "providers/Microsoft.CostManagement/externalSubscriptions/123/dimensions_ResourceType_2019-12-01_2019-12-31", - "name": "dimensions_ResourceType_2019-12-01_2019-12-31", - "type": "microsoft.consumption/dimensions", - "properties": { - "data": [], - "total": 0, - "category": "ResourceType", - "description": "Resource type", - "usageStart": "2019-12-01T00:00:00Z", - "usageEnd": "2019-12-31T00:00:00Z", - "filterEnabled": true, - "groupingEnabled": true - } - }, - { - "id": "providers/Microsoft.CostManagement/externalSubscriptions/123/dimensions_ResourceId_2019-12-01_2019-12-31", - "name": "dimensions_ResourceId_2019-12-01_2019-12-31", - "type": "microsoft.consumption/dimensions", - "properties": { - "data": [], - "total": 0, - "category": "ResourceId", - "description": "Resource ID", - "usageStart": "2019-12-01T00:00:00Z", - "usageEnd": "2019-12-31T00:00:00Z", - "filterEnabled": true, - "groupingEnabled": true - } - } - ] - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalSubscriptionsQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalSubscriptionsQuery.json deleted file mode 100644 index 5a4dfd8e3e27..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ExternalSubscriptionsQuery.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "externalCloudProviderId": "100", - "externalCloudProviderType": "externalSubscriptions", - "parameters": { - "type": "Usage", - "timeframe": "MonthToDate", - "dataset": { - "granularity": "Daily", - "filter": { - "and": [ - { - "or": [ - { - "dimension": { - "name": "ResourceLocation", - "operator": "In", - "values": [ - "East US", - "West Europe" - ] - } - }, - { - "tag": { - "name": "Environment", - "operator": "In", - "values": [ - "UAT", - "Prod" - ] - } - } - ] - }, - { - "dimension": { - "name": "ResourceGroup", - "operator": "In", - "values": [ - "API" - ] - } - } - ] - } - } - } - }, - "responses": { - "200": { - "body": { - "id": "providers/Microsoft.CostManagement/externalSubscriptions/100/query/d99477af-7510-40ee-aca2-e59bdca0d10d", - "name": "d99477af-7510-40ee-aca2-e59bdca0d10d", - "type": "Microsoft.CostManagement/query", - "properties": { - "nextLink": null, - "columns": [ - { - "name": "PreTaxCost", - "type": "Number" - }, - { - "name": "UsageDate", - "type": "Number" - }, - { - "name": "Currency", - "type": "String" - } - ], - "rows": [] - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/InvoiceSectionAlerts.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/InvoiceSectionAlerts.json deleted file mode 100644 index deaecbf35558..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/InvoiceSectionAlerts.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "parameters": { - "api-version": "2018-08-01-preview", - "billingAccountId": "12345:6789", - "billingProfileId": "13579", - "invoiceSectionId": "9876", - "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876/providers/Microsoft.CostManagement/alerts/00000000-0000-0000-0000-000000000000", - "name": "00000000-0000-0000-0000-000000000000", - "type": "Microsoft.CostManagement/alerts", - "properties": { - "definition": { - "type": "Budget", - "category": "Cost", - "criteria": "CostThresholdExceeded" - }, - "description": "", - "source": "Preset", - "details": { - "timeGrainType": "Quarterly", - "periodStartDate": "2020-03-01T00:00:00Z", - "triggeredBy": "00000000-0000-0000-0000-000000000000_1_01", - "resourceGroupFilter": [], - "resourceFilter": [], - "meterFilter": [], - "tagFilter": {}, - "threshold": 0.8, - "operator": "GreaterThan", - "amount": 200000.0, - "unit": "USD", - "currentSpend": 161000.12, - "contactEmails": [ - "1234@contoso.com" - ], - "contactGroups": [], - "contactRoles": [], - "overridingAlert": null - }, - "costEntityId": "budget1", - "status": "Active", - "creationTime": "2020-04-27T11:07:52.7143901Z", - "closeTime": "0001-01-01T00:00:00", - "modificationTime": "2020-04-28T11:06:02.8999373Z", - "statusModificationUserName": null, - "statusModificationTime": "0001-01-01T00:00:00" - } - }, - { - "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876/providers/Microsoft.CostManagement/alerts/11111111-1111-1111-111111111111", - "name": "11111111-1111-1111-111111111111", - "type": "Microsoft.CostManagement/alerts", - "properties": { - "definition": { - "type": "Budget", - "category": "Cost", - "criteria": "CostThresholdExceeded" - }, - "description": "", - "source": "Preset", - "details": { - "timeGrainType": "Quarterly", - "periodStartDate": "2020-03-01T00:00:00Z", - "triggeredBy": "11111111-1111-1111-111111111111_1_01", - "resourceGroupFilter": [], - "resourceFilter": [], - "meterFilter": [], - "tagFilter": {}, - "threshold": 0.8, - "operator": "GreaterThan", - "amount": 200000.0, - "unit": "USD", - "currentSpend": 171000.32, - "contactEmails": [ - "1234@contoso.com" - ], - "contactGroups": [], - "contactRoles": [], - "overridingAlert": null - }, - "costEntityId": "budget1", - "status": "Active", - "creationTime": "2019-06-24T05:51:52.8713179Z", - "closeTime": "0001-01-01T00:00:00", - "modificationTime": "2019-08-31T17:51:55.1808807Z", - "statusModificationUserName": null, - "statusModificationTime": "0001-01-01T00:00:00" - } - } - ], - "nextLink": null - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/InvoiceSectionForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/InvoiceSectionForecast.json deleted file mode 100644 index e0b840457c2c..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/InvoiceSectionForecast.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "billingAccountId": "12345:6789", - "billingProfileId": "13579", - "invoiceSectionId": "9876", - "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876", - "parameters": { - "type": "Usage", - "timeframe": "MonthToDate", - "dataset": { - "granularity": "Daily", - "filter": { - "and": [ - { - "or": [ - { - "dimension": { - "name": "ResourceLocation", - "operator": "In", - "values": [ - "East US", - "West Europe" - ] - } - }, - { - "tag": { - "name": "Environment", - "operator": "In", - "values": [ - "UAT", - "Prod" - ] - } - } - ] - }, - { - "dimension": { - "name": "ResourceGroup", - "operator": "In", - "values": [ - "API" - ] - } - } - ] - } - }, - "includeActualCost": false, - "includeFreshPartialCost": false - } - }, - "responses": { - "200": { - "body": { - "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876/providers/Microsoft.CostManagement/query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", - "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", - "type": "microsoft.costmanagement/Query", - "properties": { - "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876/providers/Microsoft.CostManagement/Forecast?api-version=2019-10-01&$skiptoken=AQAAAA%3D%3D", - "columns": [ - { - "name": "PreTaxCost", - "type": "Number" - }, - { - "name": "ResourceGroup", - "type": "String" - }, - { - "name": "UsageDate", - "type": "Number" - }, - { - "name": "CostStatus", - "type": "String" - }, - { - "name": "Currency", - "type": "String" - } - ], - "rows": [ - [ - 2.10333307059661, - "JapanUnifia-Trial", - 20180331, - "Forecast", - "USD" - ], - [ - 218.68795741935486, - "RVIIOT-TRIAL", - 20180331, - "Forecast", - "USD" - ], - [ - 0.14384913581657052, - "VSTSHOL-1595322048000", - 20180401, - "Forecast", - "USD" - ], - [ - 0.009865586851323632, - "gs-stms-dev", - 20180429, - "Forecast", - "USD" - ] - ] - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingAccountDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingAccountDimensionsList.json deleted file mode 100644 index accdaebf5212..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingAccountDimensionsList.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "parameters": { - "api-version": "2019-10-01", - "billingAccountId": "12345:6789", - "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/providers/microsoft.CostManagement/dimensions_ResourceGroup_2019-10-01_2019-10-31", - "name": "dimensions_ResourceGroup_2019-10-01_2019-10-31", - "type": "microsoft.CostManagement/dimensions", - "properties": { - "data": [], - "total": 377, - "category": "ResourceGroup", - "usageStart": "2019-10-01T00:00:00-07:00", - "usageEnd": "2019-10-31T00:00:00-07:00", - "description": "Resource group", - "filterEnabled": true, - "groupingEnabled": true - } - }, - { - "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/providers/microsoft.CostManagement/dimensions_ResourceType_2019-10-01_2019-10-31", - "name": "dimensions_ResourceType_2019-10-01_2019-10-31", - "type": "microsoft.CostManagement/dimensions", - "properties": { - "data": [], - "total": 37, - "category": "ResourceType", - "usageStart": "2019-10-01T00:00:00-07:00", - "usageEnd": "2019-10-31T00:00:00-07:00", - "description": "Resource type", - "filterEnabled": true, - "groupingEnabled": true - } - } - ] - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingAccountDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingAccountDimensionsListExpandAndTop.json deleted file mode 100644 index 81839ef51c4e..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingAccountDimensionsListExpandAndTop.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "parameters": { - "api-version": "2019-10-01", - "billingAccountId": "12345:6789", - "$expand": "properties/data", - "$top": 5, - "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/providers/microsoft.CostManagement/dimensions_ResourceGroup_2019-10-01_2019-10-31", - "name": "dimensions_ResourceGroup_2019-10-01_2019-10-31", - "type": "microsoft.CostManagement/dimensions", - "properties": { - "data": [ - "thoroetrg01", - "default-notificationhubs-westus", - "jedikeyvaultrg", - "contosocodeflow8d4a", - "noobaa" - ], - "total": 377, - "category": "ResourceGroup", - "usageStart": "2019-10-01T00:00:00-07:00", - "usageEnd": "2019-10-31T00:00:00-07:00", - "description": "Resource group", - "filterEnabled": true, - "groupingEnabled": true - } - }, - { - "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/providers/microsoft.CostManagement/dimensions_ResourceType_2019-10-01_2019-10-31", - "name": "dimensions_ResourceType_2019-10-01_2019-10-31", - "type": "microsoft.CostManagement/dimensions", - "properties": { - "data": [ - "microsoft.automation/automationaccounts", - "microsoft.databricks/workspaces", - "microsoft.dbformysql/servers", - "microsoft.containerregistry/registries", - "microsoft.search/searchservices" - ], - "total": 37, - "category": "ResourceType", - "usageStart": "2019-10-01T00:00:00-07:00", - "usageEnd": "2019-10-31T00:00:00-07:00", - "description": "Resource type", - "filterEnabled": true, - "groupingEnabled": true - } - } - ] - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingAccountDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingAccountDimensionsListWithFilter.json deleted file mode 100644 index ab76379cbce0..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingAccountDimensionsListWithFilter.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "parameters": { - "api-version": "2019-10-01", - "billingAccountId": "12345:6789", - "$expand": "properties/data", - "$top": 5, - "$filter": "properties/category eq 'resourceId'", - "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/providers/microsoft.CostManagement/dimensions_ResourceId_2019-10-01_2019-10-31", - "name": "dimensions_ResourceId_2019-10-01_2019-10-31", - "type": "microsoft.CostManagement/dimensions", - "properties": { - "data": [ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/urphealthaccount", - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/srphytenaccount", - "/subscriptions/67e24f6b-1ec2-4c90-993a-dc2d25b00b6c/resourcegroups/defaultresourcegroup-eus/providers/microsoft.operationalinsights/workspaces/defaultworkspace-67e24f6b-1ec2-4c90-993a-dc2d25b00b6c-eus", - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg-sql-ha/providers/microsoft.compute/virtualmachines/sql-4qqp1", - "/subscriptions/a98d6dc5-eb8f-46cf-8938-f1fb08f03706/resourcegroups/databricks-rg-testwsp-xijmsdubneexm/providers/microsoft.compute/disks/488cdb42bf74474a98075415be3f806c-containerrootvolume" - ], - "total": 1409, - "category": "ResourceId", - "usageStart": "2019-10-01T00:00:00-07:00", - "usageEnd": "2019-10-31T00:00:00-07:00", - "description": "Resource Id", - "filterEnabled": true, - "groupingEnabled": true, - "nextLink": "http://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/providers/Microsoft.CostManagement/Dimensions?$filter=properties/category eq 'resourceId'&$top=5&api-version=2019-10-01&$expand=properties/data&$skiptoken=AQAAAA%3D%3D" - } - } - ] - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingAccountQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingAccountQuery.json deleted file mode 100644 index 8abfb5dc2eca..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingAccountQuery.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "parameters": { - "api-version": "2019-10-01", - "billingAccountId": "12345:6789", - "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789", - "parameters": { - "type": "Usage", - "timeframe": "MonthToDate", - "dataset": { - "granularity": "Daily", - "filter": { - "and": [ - { - "or": [ - { - "dimension": { - "name": "ResourceLocation", - "operator": "In", - "values": [ - "East US", - "West Europe" - ] - } - }, - { - "tag": { - "name": "Environment", - "operator": "In", - "values": [ - "UAT", - "Prod" - ] - } - } - ] - }, - { - "dimension": { - "name": "ResourceGroup", - "operator": "In", - "values": [ - "API" - ] - } - } - ] - } - } - } - }, - "responses": { - "200": { - "body": { - "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", - "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", - "type": "microsoft.costmanagement/Query", - "properties": { - "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/providers/Microsoft.CostManagement/Query?api-version=2019-10-01&$skiptoken=AQAAAA%3D%3D", - "columns": [ - { - "name": "PreTaxCost", - "type": "Number" - }, - { - "name": "ResourceGroup", - "type": "String" - }, - { - "name": "UsageDate", - "type": "Number" - }, - { - "name": "Currency", - "type": "String" - } - ], - "rows": [ - [ - 19.545363672276512, - "JapanUnifia-Trial", - 20180331, - "USD" - ], - [ - 173.41979241290323, - "RVIIOT-TRIAL", - 20180331, - "USD" - ], - [ - 20.359416562625452, - "VSTSHOL-1595322048000", - 20180331, - "USD" - ], - [ - 0.16677720329728665, - "gs-stms-dev", - 20180331, - "USD" - ] - ] - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingAccountQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingAccountQueryGrouping.json deleted file mode 100644 index 648ebf053be2..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingAccountQueryGrouping.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "parameters": { - "api-version": "2019-10-01", - "billingAccountId": "12345:6789", - "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789", - "parameters": { - "type": "Usage", - "timeframe": "TheLastMonth", - "dataset": { - "granularity": "None", - "aggregation": { - "totalCost": { - "name": "PreTaxCost", - "function": "Sum" - } - }, - "grouping": [ - { - "type": "Dimension", - "name": "ResourceGroup" - } - ] - } - } - }, - "responses": { - "200": { - "body": { - "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", - "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", - "type": "microsoft.costmanagement/Query", - "properties": { - "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/providers/Microsoft.CostManagement/Query?api-version=2019-10-01&$skiptoken=AQAAAA%3D%3D", - "columns": [ - { - "name": "PreTaxCost", - "type": "Number" - }, - { - "name": "ResourceGroup", - "type": "String" - }, - { - "name": "Currency", - "type": "String" - } - ], - "rows": [ - [ - 19.545363672276512, - "JapanUnifia-Trial", - "USD" - ], - [ - 173.41979241290323, - "RVIIOT-TRIAL", - "USD" - ], - [ - 20.359416562625452, - "VSTSHOL-1595322048000", - "USD" - ] - ] - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingProfileDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingProfileDimensionsList.json deleted file mode 100644 index 11d84a74f6c9..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingProfileDimensionsList.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "parameters": { - "api-version": "2019-10-01", - "billingAccountId": "12345:6789", - "billingProfileId": "13579", - "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/providers/microsoft.CostManagement/dimensions_ResourceGroup_2019-10-01_2019-10-31", - "name": "dimensions_ResourceGroup_2019-10-01_2019-10-31", - "type": "microsoft.CostManagement/dimensions", - "properties": { - "data": [], - "total": 377, - "category": "ResourceGroup", - "usageStart": "2019-10-01T00:00:00-07:00", - "usageEnd": "2019-10-31T00:00:00-07:00", - "description": "Resource group", - "filterEnabled": true, - "groupingEnabled": true - } - }, - { - "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/providers/microsoft.CostManagement/dimensions_ResourceType_2019-10-01_2019-10-31", - "name": "dimensions_ResourceType_2019-10-01_2019-10-31", - "type": "microsoft.CostManagement/dimensions", - "properties": { - "data": [], - "total": 37, - "category": "ResourceType", - "usageStart": "2019-10-01T00:00:00-07:00", - "usageEnd": "2019-10-31T00:00:00-07:00", - "description": "Resource type", - "filterEnabled": true, - "groupingEnabled": true - } - } - ] - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingProfileDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingProfileDimensionsListExpandAndTop.json deleted file mode 100644 index 2102cbb9407a..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingProfileDimensionsListExpandAndTop.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "parameters": { - "api-version": "2019-10-01", - "billingAccountId": "12345:6789", - "billingProfileId": "13579", - "$expand": "properties/data", - "$top": 5, - "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/providers/microsoft.CostManagement/dimensions_ResourceGroup_2019-10-01_2019-10-31", - "name": "dimensions_ResourceGroup_2019-10-01_2019-10-31", - "type": "microsoft.CostManagement/dimensions", - "properties": { - "data": [ - "thoroetrg01", - "default-notificationhubs-westus", - "jedikeyvaultrg", - "contosocodeflow8d4a", - "noobaa" - ], - "total": 377, - "category": "ResourceGroup", - "usageStart": "2019-10-01T00:00:00-07:00", - "usageEnd": "2019-10-31T00:00:00-07:00", - "description": "Resource group", - "filterEnabled": true, - "groupingEnabled": true - } - }, - { - "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/providers/microsoft.CostManagement/dimensions_ResourceType_2019-10-01_2019-10-31", - "name": "dimensions_ResourceType_2019-10-01_2019-10-31", - "type": "microsoft.CostManagement/dimensions", - "properties": { - "data": [ - "microsoft.automation/automationaccounts", - "microsoft.databricks/workspaces", - "microsoft.dbformysql/servers", - "microsoft.containerregistry/registries", - "microsoft.search/searchservices" - ], - "total": 37, - "category": "ResourceType", - "usageStart": "2019-10-01T00:00:00-07:00", - "usageEnd": "2019-10-31T00:00:00-07:00", - "description": "Resource type", - "filterEnabled": true, - "groupingEnabled": true - } - } - ] - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingProfileDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingProfileDimensionsListWithFilter.json deleted file mode 100644 index 118eda5d0cfd..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingProfileDimensionsListWithFilter.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "parameters": { - "api-version": "2019-10-01", - "billingAccountId": "12345:6789", - "billingProfileId": "13579", - "$expand": "properties/data", - "$top": 5, - "$filter": "properties/category eq 'resourceId'", - "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/providers/microsoft.CostManagement/dimensions_ResourceId_2019-10-01_2019-10-31", - "name": "dimensions_ResourceId_2019-10-01_2019-10-31", - "type": "microsoft.CostManagement/dimensions", - "properties": { - "data": [ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/urphealthaccount", - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/srphytenaccount", - "/subscriptions/67e24f6b-1ec2-4c90-993a-dc2d25b00b6c/resourcegroups/defaultresourcegroup-eus/providers/microsoft.operationalinsights/workspaces/defaultworkspace-67e24f6b-1ec2-4c90-993a-dc2d25b00b6c-eus", - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg-sql-ha/providers/microsoft.compute/virtualmachines/sql-4qqp1", - "/subscriptions/a98d6dc5-eb8f-46cf-8938-f1fb08f03706/resourcegroups/databricks-rg-testwsp-xijmsdubneexm/providers/microsoft.compute/disks/488cdb42bf74474a98075415be3f806c-containerrootvolume" - ], - "total": 1409, - "category": "ResourceId", - "usageStart": "2019-10-01T00:00:00-07:00", - "usageEnd": "2019-10-31T00:00:00-07:00", - "description": "Resource Id", - "filterEnabled": true, - "groupingEnabled": true, - "nextLink": "http://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/providers/Microsoft.CostManagement/Dimensions?$filter=properties/category eq 'resourceId'&$top=5&api-version=2019-10-01&$expand=properties/data&$skiptoken=AQAAAA%3D%3D" - } - } - ] - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingProfileQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingProfileQuery.json deleted file mode 100644 index 89e2f2fb78ca..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingProfileQuery.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "parameters": { - "api-version": "2019-10-01", - "billingAccountId": "12345:6789", - "billingProfileId": "13579", - "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579", - "parameters": { - "type": "Usage", - "timeframe": "MonthToDate", - "dataset": { - "granularity": "Daily", - "filter": { - "and": [ - { - "or": [ - { - "dimension": { - "name": "ResourceLocation", - "operator": "In", - "values": [ - "East US", - "West Europe" - ] - } - }, - { - "tag": { - "name": "Environment", - "operator": "In", - "values": [ - "UAT", - "Prod" - ] - } - } - ] - }, - { - "dimension": { - "name": "ResourceGroup", - "operator": "In", - "values": [ - "API" - ] - } - } - ] - } - } - } - }, - "responses": { - "200": { - "body": { - "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", - "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", - "type": "microsoft.costmanagement/Query", - "properties": { - "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/providers/Microsoft.CostManagement/Query?api-version=2019-10-01&$skiptoken=AQAAAA%3D%3D", - "columns": [ - { - "name": "PreTaxCost", - "type": "Number" - }, - { - "name": "ResourceGroup", - "type": "String" - }, - { - "name": "UsageDate", - "type": "Number" - }, - { - "name": "Currency", - "type": "String" - } - ], - "rows": [ - [ - 19.545363672276512, - "JapanUnifia-Trial", - 20180331, - "USD" - ], - [ - 173.41979241290323, - "RVIIOT-TRIAL", - 20180331, - "USD" - ], - [ - 20.359416562625452, - "VSTSHOL-1595322048000", - 20180331, - "USD" - ], - [ - 0.16677720329728665, - "gs-stms-dev", - 20180331, - "USD" - ] - ] - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingProfileQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingProfileQueryGrouping.json deleted file mode 100644 index 3946eb12c2cf..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCABillingProfileQueryGrouping.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "parameters": { - "api-version": "2019-10-01", - "billingAccountId": "12345:6789", - "billingProfileId": "13579", - "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579", - "parameters": { - "type": "Usage", - "timeframe": "TheLastMonth", - "dataset": { - "granularity": "None", - "aggregation": { - "totalCost": { - "name": "PreTaxCost", - "function": "Sum" - } - }, - "grouping": [ - { - "type": "Dimension", - "name": "ResourceGroup" - } - ] - } - } - }, - "responses": { - "200": { - "body": { - "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", - "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", - "type": "microsoft.costmanagement/Query", - "properties": { - "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/providers/Microsoft.CostManagement/Query?api-version=2019-10-01&$skiptoken=AQAAAA%3D%3D", - "columns": [ - { - "name": "PreTaxCost", - "type": "Number" - }, - { - "name": "ResourceGroup", - "type": "String" - }, - { - "name": "Currency", - "type": "String" - } - ], - "rows": [ - [ - 19.545363672276512, - "JapanUnifia-Trial", - "USD" - ], - [ - 173.41979241290323, - "RVIIOT-TRIAL", - "USD" - ], - [ - 20.359416562625452, - "VSTSHOL-1595322048000", - "USD" - ] - ] - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCACustomerDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCACustomerDimensionsList.json deleted file mode 100644 index 0a63b2667392..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCACustomerDimensionsList.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "parameters": { - "api-version": "2019-10-01", - "billingAccountId": "12345:6789", - "customerId": "5678", - "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/customers/5678" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/customers/5678/providers/microsoft.CostManagement/dimensions_ResourceGroup_2019-10-01_2019-10-31", - "name": "dimensions_ResourceGroup_2019-10-01_2019-10-31", - "type": "microsoft.CostManagement/dimensions", - "properties": { - "data": [], - "total": 377, - "category": "ResourceGroup", - "usageStart": "2019-10-01T00:00:00-07:00", - "usageEnd": "2019-10-31T00:00:00-07:00", - "description": "Resource group", - "filterEnabled": true, - "groupingEnabled": true - } - }, - { - "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/customers/5678/providers/microsoft.CostManagement/dimensions_ResourceType_2019-10-01_2019-10-31", - "name": "dimensions_ResourceType_2019-10-01_2019-10-31", - "type": "microsoft.CostManagement/dimensions", - "properties": { - "data": [], - "total": 37, - "category": "ResourceType", - "usageStart": "2019-10-01T00:00:00-07:00", - "usageEnd": "2019-10-31T00:00:00-07:00", - "description": "Resource type", - "filterEnabled": true, - "groupingEnabled": true - } - } - ] - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCACustomerDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCACustomerDimensionsListExpandAndTop.json deleted file mode 100644 index 738eb52bf1f8..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCACustomerDimensionsListExpandAndTop.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "parameters": { - "api-version": "2019-10-01", - "billingAccountId": "12345:6789", - "customerId": "5678", - "$expand": "properties/data", - "$top": 5, - "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/customers/5678" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/customers/5678/providers/microsoft.CostManagement/dimensions_ResourceGroup_2019-10-01_2019-10-31", - "name": "dimensions_ResourceGroup_2019-10-01_2019-10-31", - "type": "microsoft.CostManagement/dimensions", - "properties": { - "data": [ - "thoroetrg01", - "default-notificationhubs-westus", - "jedikeyvaultrg", - "contosocodeflow8d4a", - "noobaa" - ], - "total": 377, - "category": "ResourceGroup", - "usageStart": "2019-10-01T00:00:00-07:00", - "usageEnd": "2019-10-31T00:00:00-07:00", - "description": "Resource group", - "filterEnabled": true, - "groupingEnabled": true - } - }, - { - "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/customers/5678/providers/microsoft.CostManagement/dimensions_ResourceType_2019-10-01_2019-10-31", - "name": "dimensions_ResourceType_2019-10-01_2019-10-31", - "type": "microsoft.CostManagement/dimensions", - "properties": { - "data": [ - "microsoft.automation/automationaccounts", - "microsoft.databricks/workspaces", - "microsoft.dbformysql/servers", - "microsoft.containerregistry/registries", - "microsoft.search/searchservices" - ], - "total": 37, - "category": "ResourceType", - "usageStart": "2019-10-01T00:00:00-07:00", - "usageEnd": "2019-10-31T00:00:00-07:00", - "description": "Resource type", - "filterEnabled": true, - "groupingEnabled": true - } - } - ] - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCACustomerDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCACustomerDimensionsListWithFilter.json deleted file mode 100644 index dc9903eb348a..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCACustomerDimensionsListWithFilter.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "parameters": { - "api-version": "2019-10-01", - "billingAccountId": "12345:6789", - "customerId": "13579", - "$expand": "properties/data", - "$top": 5, - "$filter": "properties/category eq 'resourceId'", - "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/customers/5678" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/customers/5678/providers/microsoft.CostManagement/dimensions_ResourceId_2019-10-01_2019-10-31", - "name": "dimensions_ResourceId_2019-10-01_2019-10-31", - "type": "microsoft.CostManagement/dimensions", - "properties": { - "data": [ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/urphealthaccount", - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/srphytenaccount", - "/subscriptions/67e24f6b-1ec2-4c90-993a-dc2d25b00b6c/resourcegroups/defaultresourcegroup-eus/providers/microsoft.operationalinsights/workspaces/defaultworkspace-67e24f6b-1ec2-4c90-993a-dc2d25b00b6c-eus", - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg-sql-ha/providers/microsoft.compute/virtualmachines/sql-4qqp1", - "/subscriptions/a98d6dc5-eb8f-46cf-8938-f1fb08f03706/resourcegroups/databricks-rg-testwsp-xijmsdubneexm/providers/microsoft.compute/disks/488cdb42bf74474a98075415be3f806c-containerrootvolume" - ], - "total": 1409, - "category": "ResourceId", - "usageStart": "2019-10-01T00:00:00-07:00", - "usageEnd": "2019-10-31T00:00:00-07:00", - "description": "Resource Id", - "filterEnabled": true, - "groupingEnabled": true, - "nextLink": "http://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/customers/5678/providers/Microsoft.CostManagement/Dimensions?$filter=properties/category eq 'resourceId'&$top=5&api-version=2019-10-01&$expand=properties/data&$skiptoken=AQAAAA%3D%3D" - } - } - ] - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCACustomerQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCACustomerQuery.json deleted file mode 100644 index 41a095e8750c..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCACustomerQuery.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "parameters": { - "api-version": "2019-10-01", - "billingAccountId": "12345:6789", - "customerId": "5678", - "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/customers/5678", - "parameters": { - "type": "Usage", - "timeframe": "MonthToDate", - "dataset": { - "granularity": "Daily", - "filter": { - "and": [ - { - "or": [ - { - "dimension": { - "name": "ResourceLocation", - "operator": "In", - "values": [ - "East US", - "West Europe" - ] - } - }, - { - "tag": { - "name": "Environment", - "operator": "In", - "values": [ - "UAT", - "Prod" - ] - } - } - ] - }, - { - "dimension": { - "name": "ResourceGroup", - "operator": "In", - "values": [ - "API" - ] - } - } - ] - } - } - } - }, - "responses": { - "200": { - "body": { - "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/customers/5678/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", - "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", - "type": "microsoft.costmanagement/Query", - "properties": { - "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/customers/5678/providers/Microsoft.CostManagement/Query?api-version=2019-10-01&$skiptoken=AQAAAA%3D%3D", - "columns": [ - { - "name": "PreTaxCost", - "type": "Number" - }, - { - "name": "ResourceGroup", - "type": "String" - }, - { - "name": "UsageDate", - "type": "Number" - }, - { - "name": "Currency", - "type": "String" - } - ], - "rows": [ - [ - 19.545363672276512, - "JapanUnifia-Trial", - 20180331, - "USD" - ], - [ - 173.41979241290323, - "RVIIOT-TRIAL", - 20180331, - "USD" - ], - [ - 20.359416562625452, - "VSTSHOL-1595322048000", - 20180331, - "USD" - ], - [ - 0.16677720329728665, - "gs-stms-dev", - 20180331, - "USD" - ] - ] - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCACustomerQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCACustomerQueryGrouping.json deleted file mode 100644 index a4629cc12c8c..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCACustomerQueryGrouping.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "parameters": { - "api-version": "2019-10-01", - "billingAccountId": "12345:6789", - "customerId": "5678", - "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/customers/5678", - "parameters": { - "type": "Usage", - "timeframe": "TheLastMonth", - "dataset": { - "granularity": "None", - "aggregation": { - "totalCost": { - "name": "PreTaxCost", - "function": "Sum" - } - }, - "grouping": [ - { - "type": "Dimension", - "name": "ResourceGroup" - } - ] - } - } - }, - "responses": { - "200": { - "body": { - "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/customers/5678/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", - "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", - "type": "microsoft.costmanagement/Query", - "properties": { - "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/customers/5678/providers/Microsoft.CostManagement/Query?api-version=2019-10-01&$skiptoken=AQAAAA%3D%3D", - "columns": [ - { - "name": "PreTaxCost", - "type": "Number" - }, - { - "name": "ResourceGroup", - "type": "String" - }, - { - "name": "Currency", - "type": "String" - } - ], - "rows": [ - [ - 19.545363672276512, - "JapanUnifia-Trial", - "USD" - ], - [ - 173.41979241290323, - "RVIIOT-TRIAL", - "USD" - ], - [ - 20.359416562625452, - "VSTSHOL-1595322048000", - "USD" - ] - ] - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCAInvoiceSectionDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCAInvoiceSectionDimensionsList.json deleted file mode 100644 index 381d346fa3ba..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCAInvoiceSectionDimensionsList.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "parameters": { - "api-version": "2019-10-01", - "billingAccountId": "12345:6789", - "billingProfileId": "13579", - "invoiceSectionId": "9876", - "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876/providers/microsoft.CostManagement/dimensions_ResourceGroup_2019-10-01_2019-10-31", - "name": "dimensions_ResourceGroup_2019-10-01_2019-10-31", - "type": "microsoft.CostManagement/dimensions", - "properties": { - "data": [], - "total": 377, - "category": "ResourceGroup", - "usageStart": "2019-10-01T00:00:00-07:00", - "usageEnd": "2019-10-31T00:00:00-07:00", - "description": "Resource group", - "filterEnabled": true, - "groupingEnabled": true - } - }, - { - "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876/providers/microsoft.CostManagement/dimensions_ResourceType_2019-10-01_2019-10-31", - "name": "dimensions_ResourceType_2019-10-01_2019-10-31", - "type": "microsoft.CostManagement/dimensions", - "properties": { - "data": [], - "total": 37, - "category": "ResourceType", - "usageStart": "2019-10-01T00:00:00-07:00", - "usageEnd": "2019-10-31T00:00:00-07:00", - "description": "Resource type", - "filterEnabled": true, - "groupingEnabled": true - } - } - ] - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCAInvoiceSectionDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCAInvoiceSectionDimensionsListExpandAndTop.json deleted file mode 100644 index 17dedb5444fc..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCAInvoiceSectionDimensionsListExpandAndTop.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "parameters": { - "api-version": "2019-10-01", - "billingAccountId": "12345:6789", - "billingProfileId": "13579", - "invoiceSectionId": "9876", - "$expand": "properties/data", - "$top": 5, - "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876/providers/microsoft.CostManagement/dimensions_ResourceGroup_2019-10-01_2019-10-31", - "name": "dimensions_ResourceGroup_2019-10-01_2019-10-31", - "type": "microsoft.CostManagement/dimensions", - "properties": { - "data": [ - "thoroetrg01", - "default-notificationhubs-westus", - "jedikeyvaultrg", - "contosocodeflow8d4a", - "noobaa" - ], - "total": 377, - "category": "ResourceGroup", - "usageStart": "2019-10-01T00:00:00-07:00", - "usageEnd": "2019-10-31T00:00:00-07:00", - "description": "Resource group", - "filterEnabled": true, - "groupingEnabled": true - } - }, - { - "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876/providers/microsoft.CostManagement/dimensions_ResourceType_2019-10-01_2019-10-31", - "name": "dimensions_ResourceType_2019-10-01_2019-10-31", - "type": "microsoft.CostManagement/dimensions", - "properties": { - "data": [ - "microsoft.automation/automationaccounts", - "microsoft.databricks/workspaces", - "microsoft.dbformysql/servers", - "microsoft.containerregistry/registries", - "microsoft.search/searchservices" - ], - "total": 37, - "category": "ResourceType", - "usageStart": "2019-10-01T00:00:00-07:00", - "usageEnd": "2019-10-31T00:00:00-07:00", - "description": "Resource type", - "filterEnabled": true, - "groupingEnabled": true - } - } - ] - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCAInvoiceSectionDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCAInvoiceSectionDimensionsListWithFilter.json deleted file mode 100644 index 9dc3219f73e3..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCAInvoiceSectionDimensionsListWithFilter.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "parameters": { - "api-version": "2019-10-01", - "billingAccountId": "12345:6789", - "billingProfileId": "13579", - "invoiceSectionId": "9876", - "$expand": "properties/data", - "$top": 5, - "$filter": "properties/category eq 'resourceId'", - "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876/providers/microsoft.CostManagement/dimensions_ResourceId_2019-10-01_2019-10-31", - "name": "dimensions_ResourceId_2019-10-01_2019-10-31", - "type": "microsoft.CostManagement/dimensions", - "properties": { - "data": [ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/urphealthaccount", - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/srphytenaccount", - "/subscriptions/67e24f6b-1ec2-4c90-993a-dc2d25b00b6c/resourcegroups/defaultresourcegroup-eus/providers/microsoft.operationalinsights/workspaces/defaultworkspace-67e24f6b-1ec2-4c90-993a-dc2d25b00b6c-eus", - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg-sql-ha/providers/microsoft.compute/virtualmachines/sql-4qqp1", - "/subscriptions/a98d6dc5-eb8f-46cf-8938-f1fb08f03706/resourcegroups/databricks-rg-testwsp-xijmsdubneexm/providers/microsoft.compute/disks/488cdb42bf74474a98075415be3f806c-containerrootvolume" - ], - "total": 1409, - "category": "ResourceId", - "usageStart": "2019-10-01T00:00:00-07:00", - "usageEnd": "2019-10-31T00:00:00-07:00", - "description": "Resource Id", - "filterEnabled": true, - "groupingEnabled": true, - "nextLink": "http://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876/providers/Microsoft.CostManagement/Dimensions?$filter=properties/category eq 'resourceId'&$top=5&api-version=2019-10-01&$expand=properties/data&$skiptoken=AQAAAA%3D%3D" - } - } - ] - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCAInvoiceSectionQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCAInvoiceSectionQuery.json deleted file mode 100644 index ddacc8d3b487..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCAInvoiceSectionQuery.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "parameters": { - "api-version": "2019-10-01", - "billingAccountId": "12345:6789", - "billingProfileId": "13579", - "invoiceSectionId": "9876", - "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876", - "parameters": { - "type": "Usage", - "timeframe": "MonthToDate", - "dataset": { - "granularity": "Daily", - "filter": { - "and": [ - { - "or": [ - { - "dimension": { - "name": "ResourceLocation", - "operator": "In", - "values": [ - "East US", - "West Europe" - ] - } - }, - { - "tag": { - "name": "Environment", - "operator": "In", - "values": [ - "UAT", - "Prod" - ] - } - } - ] - }, - { - "dimension": { - "name": "ResourceGroup", - "operator": "In", - "values": [ - "API" - ] - } - } - ] - } - } - } - }, - "responses": { - "200": { - "body": { - "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", - "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", - "type": "microsoft.costmanagement/Query", - "properties": { - "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876/providers/Microsoft.CostManagement/Query?api-version=2019-10-01&$skiptoken=AQAAAA%3D%3D", - "columns": [ - { - "name": "PreTaxCost", - "type": "Number" - }, - { - "name": "ResourceGroup", - "type": "String" - }, - { - "name": "UsageDate", - "type": "Number" - }, - { - "name": "Currency", - "type": "String" - } - ], - "rows": [ - [ - 19.545363672276512, - "JapanUnifia-Trial", - 20180331, - "USD" - ], - [ - 173.41979241290323, - "RVIIOT-TRIAL", - 20180331, - "USD" - ], - [ - 20.359416562625452, - "VSTSHOL-1595322048000", - 20180331, - "USD" - ], - [ - 0.16677720329728665, - "gs-stms-dev", - 20180331, - "USD" - ] - ] - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCAInvoiceSectionQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCAInvoiceSectionQueryGrouping.json deleted file mode 100644 index c680c09d1ac3..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/MCAInvoiceSectionQueryGrouping.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "parameters": { - "api-version": "2019-10-01", - "billingAccountId": "12345:6789", - "billingProfileId": "13579", - "invoiceSectionId": "9876", - "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876", - "parameters": { - "type": "Usage", - "timeframe": "TheLastMonth", - "dataset": { - "granularity": "None", - "aggregation": { - "totalCost": { - "name": "PreTaxCost", - "function": "Sum" - } - }, - "grouping": [ - { - "type": "Dimension", - "name": "ResourceGroup" - } - ] - } - } - }, - "responses": { - "200": { - "body": { - "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", - "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", - "type": "microsoft.costmanagement/Query", - "properties": { - "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876/providers/Microsoft.CostManagement/Query?api-version=2019-10-01&$skiptoken=AQAAAA%3D%3D", - "columns": [ - { - "name": "PreTaxCost", - "type": "Number" - }, - { - "name": "ResourceGroup", - "type": "String" - }, - { - "name": "Currency", - "type": "String" - } - ], - "rows": [ - [ - 19.545363672276512, - "JapanUnifia-Trial", - "USD" - ], - [ - 173.41979241290323, - "RVIIOT-TRIAL", - "USD" - ], - [ - 20.359416562625452, - "VSTSHOL-1595322048000", - "USD" - ] - ] - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ManagementGroupDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ManagementGroupDimensionsList.json deleted file mode 100644 index 46d654b664b9..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ManagementGroupDimensionsList.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "parameters": { - "api-version": "2019-10-01", - "managementGroupId": "MyMgId", - "scope": "providers/Microsoft.Management/managementGroups/MyMgId" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "providers/Microsoft.Management/managementGroups/MyMgId/providers/microsoft.CostManagement/dimensions_ResourceGroup_2018-05-01_2018-05-31", - "name": "dimensions_ResourceGroup_2018-05-01_2018-05-31", - "type": "microsoft.CostManagement/dimensions", - "properties": { - "data": [], - "total": 377, - "category": "ResourceGroup", - "usageStart": "2018-05-01T00:00:00-07:00", - "usageEnd": "2018-05-31T00:00:00-07:00", - "description": "Resource group", - "filterEnabled": true, - "groupingEnabled": true - } - }, - { - "id": "providers/Microsoft.Management/managementGroups/MyMgId/providers/microsoft.CostManagement/dimensions_ResourceType_2018-05-01_2018-05-31", - "name": "dimensions_ResourceType_2018-05-01_2018-05-31", - "type": "microsoft.CostManagement/dimensions", - "properties": { - "data": [], - "total": 37, - "category": "ResourceType", - "usageStart": "2018-05-01T00:00:00-07:00", - "usageEnd": "2018-05-31T00:00:00-07:00", - "description": "Resource type", - "filterEnabled": true, - "groupingEnabled": true - } - } - ] - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ManagementGroupDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ManagementGroupDimensionsListExpandAndTop.json deleted file mode 100644 index 616047e5e4bf..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ManagementGroupDimensionsListExpandAndTop.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "parameters": { - "api-version": "2019-10-01", - "managementGroupId": "MyMgId", - "$expand": "properties/data", - "$top": 5, - "scope": "providers/Microsoft.Management/managementGroups/MyMgId" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "providers/Microsoft.Management/managementGroups/MyMgId/providers/microsoft.CostManagement/dimensions_ResourceGroup_2018-05-01_2018-05-31_5", - "name": "dimensions_ResourceGroup_2018-05-01_2018-05-31_5", - "type": "microsoft.CostManagement/dimensions", - "properties": { - "data": [ - "thoroetrg01", - "default-notificationhubs-westus", - "jedikeyvaultrg", - "contosocodeflow8d4a", - "noobaa" - ], - "total": 377, - "category": "ResourceGroup", - "usageStart": "2018-05-01T00:00:00-07:00", - "usageEnd": "2018-05-31T00:00:00-07:00", - "description": "Resource group", - "filterEnabled": true, - "groupingEnabled": true - } - }, - { - "id": "providers/Microsoft.Management/managementGroups/MyMgId/providers/microsoft.CostManagement/dimensions_ResourceType_2018-05-01_2018-05-31_5", - "name": "dimensions_ResourceType_2018-05-01_2018-05-31_5", - "type": "microsoft.CostManagement/dimensions", - "properties": { - "data": [ - "microsoft.automation/automationaccounts", - "microsoft.databricks/workspaces", - "microsoft.dbformysql/servers", - "microsoft.containerregistry/registries", - "microsoft.search/searchservices" - ], - "total": 37, - "category": "ResourceType", - "usageStart": "2018-05-01T00:00:00-07:00", - "usageEnd": "2018-05-31T00:00:00-07:00", - "description": "Resource type", - "filterEnabled": true, - "groupingEnabled": true - } - } - ] - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ManagementGroupDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ManagementGroupDimensionsListWithFilter.json deleted file mode 100644 index de501d6cc1ee..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ManagementGroupDimensionsListWithFilter.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "parameters": { - "api-version": "2019-10-01", - "managementGroupId": "MyMgId", - "$expand": "properties/data", - "$top": 5, - "$filter": "properties/category eq 'resourceId'", - "scope": "providers/Microsoft.Management/managementGroups/MyMgId" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "providers/Microsoft.Management/managementGroups/MyMgId/providers/microsoft.CostManagement/dimensions_ResourceId_2018-05-01_2018-05-31_5", - "name": "dimensions_ResourceId_2018-05-01_2018-05-31_5", - "type": "microsoft.CostManagement/dimensions", - "properties": { - "data": [ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/urphealthaccount", - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/srphytenaccount", - "/subscriptions/67e24f6b-1ec2-4c90-993a-dc2d25b00b6c/resourcegroups/defaultresourcegroup-eus/providers/microsoft.operationalinsights/workspaces/defaultworkspace-67e24f6b-1ec2-4c90-993a-dc2d25b00b6c-eus", - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg-sql-ha/providers/microsoft.compute/virtualmachines/sql-4qqp1", - "/subscriptions/a98d6dc5-eb8f-46cf-8938-f1fb08f03706/resourcegroups/databricks-rg-testwsp-xijmsdubneexm/providers/microsoft.compute/disks/488cdb42bf74474a98075415be3f806c-containerrootvolume" - ], - "total": 1409, - "category": "ResourceId", - "usageStart": "2018-05-01T00:00:00-07:00", - "usageEnd": "2018-05-31T00:00:00-07:00", - "description": "Resource Id", - "filterEnabled": true, - "groupingEnabled": true, - "nextLink": "http://management.azure.com/providers/Microsoft.Management/managementGroups/MyMgId/providers/Microsoft.CostManagement/Dimensions?$filter=properties/category eq 'resourceId'&$top=5&api-version=2019-10-01&$expand=properties/data&$skiptoken=AQAAAA%3D%3D" - } - } - ] - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ManagementGroupQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ManagementGroupQuery.json deleted file mode 100644 index 8bb619cee8e3..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ManagementGroupQuery.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "parameters": { - "api-version": "2019-10-01", - "managementGroupId": "MyMgId", - "scope": "providers/Microsoft.Management/managementGroups/MyMgId", - "parameters": { - "type": "Usage", - "timeframe": "MonthToDate", - "dataset": { - "granularity": "Daily", - "filter": { - "and": [ - { - "or": [ - { - "dimension": { - "name": "ResourceLocation", - "operator": "In", - "values": [ - "East US", - "West Europe" - ] - } - }, - { - "tag": { - "name": "Environment", - "operator": "In", - "values": [ - "UAT", - "Prod" - ] - } - } - ] - }, - { - "dimension": { - "name": "ResourceGroup", - "operator": "In", - "values": [ - "API" - ] - } - } - ] - } - } - } - }, - "responses": { - "200": { - "body": { - "id": "providers/Microsoft.Management/managementGroups/MyMgId/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", - "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", - "type": "microsoft.costmanagement/Query", - "properties": { - "nextLink": "https://management.azure.com/providers/Microsoft.Management/managementGroups/MyMgId/providers/Microsoft.CostManagement/Query?api-version=2019-10-01&$skiptoken=AQAAAA%3D%3D", - "columns": [ - { - "name": "PreTaxCost", - "type": "Number" - }, - { - "name": "ResourceGroup", - "type": "String" - }, - { - "name": "UsageDate", - "type": "Number" - }, - { - "name": "Currency", - "type": "String" - } - ], - "rows": [ - [ - 19.545363672276512, - "JapanUnifia-Trial", - 20180331, - "USD" - ], - [ - 173.41979241290323, - "RVIIOT-TRIAL", - 20180331, - "USD" - ], - [ - 20.359416562625452, - "VSTSHOL-1595322048000", - 20180331, - "USD" - ], - [ - 0.16677720329728665, - "gs-stms-dev", - 20180331, - "USD" - ] - ] - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ManagementGroupQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ManagementGroupQueryGrouping.json deleted file mode 100644 index 0f3b0ef56cd3..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ManagementGroupQueryGrouping.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "parameters": { - "api-version": "2019-10-01", - "managementGroupId": "MyMgId", - "scope": "providers/Microsoft.Management/managementGroups/MyMgId", - "parameters": { - "type": "Usage", - "timeframe": "TheLastMonth", - "dataset": { - "granularity": "None", - "aggregation": { - "totalCost": { - "name": "PreTaxCost", - "function": "Sum" - } - }, - "grouping": [ - { - "type": "Dimension", - "name": "ResourceGroup" - } - ] - } - } - }, - "responses": { - "200": { - "body": { - "id": "providers/Microsoft.Management/managementGroups/MyMgId/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", - "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", - "type": "microsoft.costmanagement/Query", - "properties": { - "nextLink": "https://management.azure.com/providers/Microsoft.Management/managementGroups/MyMgId/providers/Microsoft.CostManagement/Query?api-version=2019-10-01&$skiptoken=AQAAAA%3D%3D", - "columns": [ - { - "name": "PreTaxCost", - "type": "Number" - }, - { - "name": "ResourceGroup", - "type": "String" - }, - { - "name": "UsageDate", - "type": "Number" - }, - { - "name": "Currency", - "type": "String" - } - ], - "rows": [ - [ - 20.359416562625452, - "VSTSHOL-1595322048000", - 20180331, - "USD" - ], - [ - 173.41979241290323, - "RVIIOT-TRIAL", - 20180331, - "USD" - ], - [ - 19.545363672276512, - "JapanUnifia-Trial", - 20180331, - "USD" - ] - ] - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateView.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateView.json deleted file mode 100644 index 8128f186ee34..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateView.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "viewName": "swaggerExample" - }, - "responses": { - "200": { - "body": { - "id": "/providers/Microsoft.CostManagement/views/swaggerExample", - "name": "swaggerExample", - "type": "Microsoft.CostManagement/Views", - "eTag": "\"1d4ff9fe66f1d10\"", - "properties": { - "displayName": "swagger Example", - "scope": "", - "query": { - "type": "Usage", - "timeframe": "MonthToDate", - "dataset": { - "granularity": "Daily", - "aggregation": { - "totalCost": { - "name": "PreTaxCost", - "function": "Sum" - } - }, - "grouping": [], - "sorting": [ - { - "direction": "Ascending", - "name": "UsageDate" - } - ] - } - }, - "chart": "Table", - "accumulated": "true", - "metric": "ActualCost", - "kpis": [ - { - "type": "Forecast", - "id": null, - "enabled": true - }, - { - "type": "Budget", - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo", - "enabled": true - } - ], - "pivots": [ - { - "type": "Dimension", - "name": "ServiceName" - }, - { - "type": "Dimension", - "name": "MeterCategory" - }, - { - "type": "TagKey", - "name": "swaggerTagKey" - } - ] - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewCreateOrUpdate.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewCreateOrUpdate.json deleted file mode 100644 index 917f49d96253..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewCreateOrUpdate.json +++ /dev/null @@ -1,185 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "viewName": "swaggerExample", - "parameters": { - "eTag": "\"1d4ff9fe66f1d10\"", - "properties": { - "displayName": "swagger Example", - "query": { - "type": "Usage", - "timeframe": "MonthToDate", - "dataset": { - "granularity": "Daily", - "aggregation": { - "totalCost": { - "name": "PreTaxCost", - "function": "Sum" - } - }, - "grouping": [], - "sorting": [ - { - "direction": "Ascending", - "name": "UsageDate" - } - ] - } - }, - "chart": "Table", - "accumulated": "true", - "metric": "ActualCost", - "kpis": [ - { - "type": "Forecast", - "id": null, - "enabled": true - }, - { - "type": "Budget", - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo", - "enabled": true - } - ], - "pivots": [ - { - "type": "Dimension", - "name": "ServiceName" - }, - { - "type": "Dimension", - "name": "MeterCategory" - }, - { - "type": "TagKey", - "name": "swaggerTagKey" - } - ] - } - } - }, - "responses": { - "201": { - "body": { - "id": "/providers/Microsoft.CostManagement/views/swaggerExample", - "name": "swaggerExample", - "type": "Microsoft.CostManagement/Views", - "eTag": "\"1d4ffa5a9c2430c\"", - "properties": { - "displayName": "swagger Example", - "scope": "", - "query": { - "type": "Usage", - "timeframe": "MonthToDate", - "dataset": { - "granularity": "Daily", - "aggregation": { - "totalCost": { - "name": "PreTaxCost", - "function": "Sum" - } - }, - "grouping": [], - "sorting": [ - { - "direction": "Ascending", - "name": "UsageDate" - } - ] - } - }, - "chart": "Table", - "accumulated": "true", - "metric": "ActualCost", - "kpis": [ - { - "type": "Forecast", - "id": null, - "enabled": true - }, - { - "type": "Budget", - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo", - "enabled": true - } - ], - "pivots": [ - { - "type": "Dimension", - "name": "ServiceName" - }, - { - "type": "Dimension", - "name": "MeterCategory" - }, - { - "type": "TagKey", - "name": "swaggerTagKey" - } - ] - } - } - }, - "200": { - "body": { - "id": "/providers/Microsoft.CostManagement/views/swaggerExample", - "name": "swaggerExample", - "type": "Microsoft.CostManagement/Views", - "eTag": "\"1d4ffa5a9c2430c\"", - "properties": { - "displayName": "swagger Example", - "scope": "", - "query": { - "type": "Usage", - "timeframe": "MonthToDate", - "dataset": { - "granularity": "Daily", - "aggregation": { - "totalCost": { - "name": "PreTaxCost", - "function": "Sum" - } - }, - "grouping": [], - "sorting": [ - { - "direction": "Ascending", - "name": "UsageDate" - } - ] - } - }, - "chart": "Table", - "accumulated": "true", - "metric": "ActualCost", - "kpis": [ - { - "type": "Forecast", - "id": null, - "enabled": true - }, - { - "type": "Budget", - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo", - "enabled": true - } - ], - "pivots": [ - { - "type": "Dimension", - "name": "ServiceName" - }, - { - "type": "Dimension", - "name": "MeterCategory" - }, - { - "type": "TagKey", - "name": "swaggerTagKey" - } - ] - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewDelete.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewDelete.json deleted file mode 100644 index a03a55d4b016..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewDelete.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "viewName": "TestView" - }, - "responses": { - "200": {}, - "204": {} - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewList.json deleted file mode 100644 index f70ddf2c6c81..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/PrivateViewList.json +++ /dev/null @@ -1,131 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "/providers/Microsoft.CostManagement/views/swaggerExample", - "name": "swaggerExample", - "type": "Microsoft.CostManagement/Views", - "eTag": "\"1d4ff9fe66f1d10\"", - "properties": { - "displayName": "swagger Example", - "scope": "", - "query": { - "type": "Usage", - "timeframe": "MonthToDate", - "dataset": { - "granularity": "Daily", - "aggregation": { - "totalCost": { - "name": "PreTaxCost", - "function": "Sum" - } - }, - "grouping": [], - "sorting": [ - { - "direction": "Ascending", - "name": "UsageDate" - } - ] - } - }, - "chart": "Table", - "accumulated": "true", - "metric": "ActualCost", - "kpis": [ - { - "type": "Forecast", - "id": null, - "enabled": true - }, - { - "type": "Budget", - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo", - "enabled": true - } - ], - "pivots": [ - { - "type": "Dimension", - "name": "ServiceName" - }, - { - "type": "Dimension", - "name": "MeterCategory" - }, - { - "type": "TagKey", - "name": "swaggerTagKey" - } - ] - } - }, - { - "id": "/providers/Microsoft.CostManagement/views/swaggerExample2", - "name": "swaggerExample2", - "type": "Microsoft.CostManagement/Views", - "eTag": "\"1d4ffa5a9c2430c\"", - "properties": { - "displayName": "swagger Example 2", - "scope": "", - "query": { - "type": "Usage", - "timeframe": "LastMonthToDate", - "dataset": { - "granularity": "Daily", - "aggregation": { - "totalCost": { - "name": "PreTaxCost", - "function": "Sum" - } - }, - "grouping": [], - "sorting": [ - { - "direction": "Ascending", - "name": "UsageDate" - } - ] - } - }, - "chart": "GroupedColumn", - "accumulated": "true", - "metric": "ActualCost", - "kpis": [ - { - "type": "Forecast", - "id": null, - "enabled": true - }, - { - "type": "Budget", - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo", - "enabled": true - } - ], - "pivots": [ - { - "type": "Dimension", - "name": "ServiceName" - }, - { - "type": "Dimension", - "name": "MeterCategory" - }, - { - "type": "TagKey", - "name": "swaggerTagKey" - } - ] - } - } - ] - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ResourceGroupAlerts.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ResourceGroupAlerts.json deleted file mode 100644 index 2db6d3dd5bf8..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ResourceGroupAlerts.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "parameters": { - "api-version": "2018-08-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "ScreenSharingTest-peer", - "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ScreenSharingTest-peer" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ScreenSharingTest-peer/providers/Microsoft.CostManagement/alerts/00000000-0000-0000-0000-000000000000", - "name": "00000000-0000-0000-0000-000000000000", - "type": "Microsoft.CostManagement/alerts", - "properties": { - "definition": { - "type": "Budget", - "category": "Cost", - "criteria": "CostThresholdExceeded" - }, - "description": "", - "source": "Preset", - "details": { - "timeGrainType": "Quarterly", - "periodStartDate": "2020-03-01T00:00:00Z", - "triggeredBy": "00000000-0000-0000-0000-000000000000_1_01", - "resourceGroupFilter": [], - "resourceFilter": [], - "meterFilter": [], - "tagFilter": {}, - "threshold": 0.8, - "operator": "GreaterThan", - "amount": 200000.0, - "unit": "USD", - "currentSpend": 161000.12, - "contactEmails": [ - "1234@contoso.com" - ], - "contactGroups": [], - "contactRoles": [], - "overridingAlert": null - }, - "costEntityId": "budget1", - "status": "Active", - "creationTime": "2020-04-27T11:07:52.7143901Z", - "closeTime": "0001-01-01T00:00:00", - "modificationTime": "2020-04-28T11:06:02.8999373Z", - "statusModificationUserName": null, - "statusModificationTime": "0001-01-01T00:00:00" - } - }, - { - "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ScreenSharingTest-peer/providers/Microsoft.CostManagement/alerts/11111111-1111-1111-111111111111", - "name": "11111111-1111-1111-111111111111", - "type": "Microsoft.CostManagement/alerts", - "properties": { - "definition": { - "type": "Budget", - "category": "Cost", - "criteria": "CostThresholdExceeded" - }, - "description": "", - "source": "Preset", - "details": { - "timeGrainType": "Quarterly", - "periodStartDate": "2020-03-01T00:00:00Z", - "triggeredBy": "11111111-1111-1111-111111111111_1_01", - "resourceGroupFilter": [], - "resourceFilter": [], - "meterFilter": [], - "tagFilter": {}, - "threshold": 0.8, - "operator": "GreaterThan", - "amount": 200000.0, - "unit": "USD", - "currentSpend": 171000.32, - "contactEmails": [ - "1234@contoso.com" - ], - "contactGroups": [], - "contactRoles": [], - "overridingAlert": null - }, - "costEntityId": "budget1", - "status": "Active", - "creationTime": "2019-06-24T05:51:52.8713179Z", - "closeTime": "0001-01-01T00:00:00", - "modificationTime": "2019-08-31T17:51:55.1808807Z", - "statusModificationUserName": null, - "statusModificationTime": "0001-01-01T00:00:00" - } - } - ], - "nextLink": null - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ResourceGroupDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ResourceGroupDimensionsList.json deleted file mode 100644 index d0f789435863..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ResourceGroupDimensionsList.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "parameters": { - "api-version": "2019-10-01", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "system.orlando", - "$expand": "properties/data", - "$top": 5, - "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/system.orlando" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/system.orlando/providers/microsoft.CostManagement/dimensions_ResourceType_2018-05-01_2018-05-31_5", - "name": "dimensions_ResourceType_2018-05-01_2018-05-31_5", - "type": "microsoft.CostManagement/dimensions", - "properties": { - "data": [ - "microsoft.storage/storageaccounts" - ], - "total": 1, - "category": "ResourceType", - "usageStart": "2018-05-01T00:00:00-07:00", - "usageEnd": "2018-05-31T00:00:00-07:00", - "description": "Resource type", - "filterEnabled": true, - "groupingEnabled": true - } - }, - { - "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/system.orlando/providers/microsoft.CostManagement/dimensions_ResourceId_2018-05-01_2018-05-31_5", - "name": "dimensions_ResourceId_2018-05-01_2018-05-31_5", - "type": "microsoft.CostManagement/dimensions", - "properties": { - "data": [ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/authprod", - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/systemevents", - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/armadminprod", - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/srphytenaccount", - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/publicsystemportal" - ], - "total": 27, - "category": "ResourceId", - "usageStart": "2018-05-01T00:00:00-07:00", - "usageEnd": "2018-05-31T00:00:00-07:00", - "description": "Resource Id", - "filterEnabled": true, - "groupingEnabled": true - } - } - ] - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ResourceGroupForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ResourceGroupForecast.json deleted file mode 100644 index 6ed0b4095bcd..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ResourceGroupForecast.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "ScreenSharingTest-peer", - "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ScreenSharingTest-peer", - "parameters": { - "type": "Usage", - "timeframe": "MonthToDate", - "dataset": { - "granularity": "Daily", - "filter": { - "and": [ - { - "or": [ - { - "dimension": { - "name": "ResourceLocation", - "operator": "In", - "values": [ - "East US", - "West Europe" - ] - } - }, - { - "tag": { - "name": "Environment", - "operator": "In", - "values": [ - "UAT", - "Prod" - ] - } - } - ] - }, - { - "dimension": { - "name": "ResourceGroup", - "operator": "In", - "values": [ - "API" - ] - } - } - ] - } - }, - "includeActualCost": false, - "includeFreshPartialCost": false - } - }, - "responses": { - "200": { - "body": { - "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ScreenSharingTest-peer/providers/Microsoft.CostManagement/query/00000000-0000-0000-0000-000000000000", - "name": "55312978-ba1b-415c-9304-cfd9c43c0481", - "type": "microsoft.costmanagement/Query", - "properties": { - "nextLink": null, - "columns": [ - { - "name": "PreTaxCost", - "type": "Number" - }, - { - "name": "ResourceGroup", - "type": "String" - }, - { - "name": "UsageDate", - "type": "Number" - }, - { - "name": "CostStatus", - "type": "String" - }, - { - "name": "Currency", - "type": "String" - } - ], - "rows": [ - [ - 2.10333307059661, - "ScreenSharingTest-peer", - 20180331, - "Forecast", - "USD" - ] - ] - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ResourceGroupQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ResourceGroupQuery.json deleted file mode 100644 index 052910483e76..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ResourceGroupQuery.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "parameters": { - "api-version": "2019-10-01", - "subscriptionId": "55312978-ba1b-415c-9304-c4b9c43c0481", - "resourceGroupName": "ScreenSharingTest-peer", - "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ScreenSharingTest-peer", - "parameters": { - "type": "Usage", - "timeframe": "MonthToDate", - "dataset": { - "granularity": "Daily", - "filter": { - "and": [ - { - "or": [ - { - "dimension": { - "name": "ResourceLocation", - "operator": "In", - "values": [ - "East US", - "West Europe" - ] - } - }, - { - "tag": { - "name": "Environment", - "operator": "In", - "values": [ - "UAT", - "Prod" - ] - } - } - ] - }, - { - "dimension": { - "name": "ResourceGroup", - "operator": "In", - "values": [ - "API" - ] - } - } - ] - } - } - } - }, - "responses": { - "200": { - "body": { - "id": "subscriptions/55312978-ba1b-415c-9304-c4b9c43c0481/resourcegroups/ScreenSharingTest-peer/providers/Microsoft.CostManagement/Query/9af9459d-441d-4055-9ed0-83d4c4a363fb", - "name": "9af9459d-441d-4055-9ed0-83d4c4a363fb", - "type": "microsoft.costmanagement/Query", - "properties": { - "nextLink": null, - "columns": [ - { - "name": "PreTaxCost", - "type": "Number" - }, - { - "name": "ResourceGroup", - "type": "String" - }, - { - "name": "UsageDate", - "type": "Number" - }, - { - "name": "Currency", - "type": "String" - } - ], - "rows": [ - [ - 2.10333307059661, - "ScreenSharingTest-peer", - 20180417, - "USD" - ], - [ - 20.10333307059661, - "ScreenSharingTest-peer", - 20180418, - "USD" - ] - ] - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ResourceGroupQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ResourceGroupQueryGrouping.json deleted file mode 100644 index da7cb4d9a91f..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ResourceGroupQueryGrouping.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "parameters": { - "api-version": "2019-10-01", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "ScreenSharingTest-peer", - "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ScreenSharingTest-peer", - "parameters": { - "type": "Usage", - "timeframe": "TheLastMonth", - "dataset": { - "granularity": "Daily", - "aggregation": { - "totalCost": { - "name": "PreTaxCost", - "function": "Sum" - } - }, - "grouping": [ - { - "type": "Dimension", - "name": "ResourceType" - } - ] - } - } - }, - "responses": { - "200": { - "body": { - "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/ScreenSharingTest-peer/providers/Microsoft.CostManagement/Query/9af9459d-441d-4055-9ed0-83d4c4a363fb", - "name": "9af9459d-441d-4055-9ed0-83d4c4a363fb", - "type": "microsoft.costmanagement/Query", - "properties": { - "nextLink": null, - "columns": [ - { - "name": "PreTaxCost", - "type": "Number" - }, - { - "name": "ResourceType", - "type": "String" - }, - { - "name": "UsageDate", - "type": "Number" - }, - { - "name": "Currency", - "type": "String" - } - ], - "rows": [ - [ - 2.10333307059661, - "Microsoft.SqlServer", - 20180417, - "USD" - ], - [ - 20.10333307059661, - "Microsoft.Compute", - 20180418, - "USD" - ] - ] - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SingleResourceGroupAlert.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SingleResourceGroupAlert.json deleted file mode 100644 index d4f3f72ef83a..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SingleResourceGroupAlert.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "parameters": { - "api-version": "2018-08-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "ScreenSharingTest-peer", - "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ScreenSharingTest-peer", - "alertId": "22222222-2222-2222-2222-222222222222" - }, - "responses": { - "200": { - "body": { - "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ScreenSharingTest-peer/providers/Microsoft.CostManagement/alerts/22222222-2222-2222-2222-222222222222", - "name": "22222222-2222-2222-2222-222222222222", - "type": "Microsoft.CostManagement/alerts", - "properties": { - "definition": { - "type": "Budget", - "category": "Cost", - "criteria": "CostThresholdExceeded" - }, - "description": "", - "source": "Preset", - "details": { - "timeGrainType": "Quarterly", - "periodStartDate": "2020-03-01T00:00:00Z", - "triggeredBy": "22222222-2222-2222-2222-222222222222_1_01", - "resourceGroupFilter": [], - "resourceFilter": [], - "meterFilter": [], - "tagFilter": {}, - "threshold": 0.8, - "operator": "GreaterThan", - "amount": 200000.0, - "unit": "USD", - "currentSpend": 161000.12, - "contactEmails": [ - "1234@contoso.com" - ], - "contactGroups": [], - "contactRoles": [], - "overridingAlert": null - }, - "costEntityId": "budget1", - "status": "Active", - "creationTime": "2020-04-27T11:07:52.7143901Z", - "closeTime": "0001-01-01T00:00:00", - "modificationTime": "2020-04-28T11:06:02.8999373Z", - "statusModificationUserName": null, - "statusModificationTime": "0001-01-01T00:00:00" - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SingleSubscriptionAlert.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SingleSubscriptionAlert.json deleted file mode 100644 index cd881b8ea598..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SingleSubscriptionAlert.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "parameters": { - "api-version": "2018-08-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "scope": "subscriptions/00000000-0000-0000-0000-000000000000", - "alertId": "22222222-2222-2222-2222-222222222222" - }, - "responses": { - "200": { - "body": { - "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/alerts/22222222-2222-2222-2222-222222222222", - "name": "22222222-2222-2222-2222-222222222222", - "type": "Microsoft.CostManagement/alerts", - "properties": { - "definition": { - "type": "Budget", - "category": "Cost", - "criteria": "CostThresholdExceeded" - }, - "description": "", - "source": "Preset", - "details": { - "timeGrainType": "Quarterly", - "periodStartDate": "2020-03-01T00:00:00Z", - "triggeredBy": "22222222-2222-2222-2222-222222222222_1_01", - "resourceGroupFilter": [], - "resourceFilter": [], - "meterFilter": [], - "tagFilter": {}, - "threshold": 0.8, - "operator": "GreaterThan", - "amount": 200000.0, - "unit": "USD", - "currentSpend": 161000.12, - "contactEmails": [ - "1234@contoso.com" - ], - "contactGroups": [], - "contactRoles": [], - "overridingAlert": null - }, - "costEntityId": "budget1", - "status": "Active", - "creationTime": "2020-04-27T11:07:52.7143901Z", - "closeTime": "0001-01-01T00:00:00", - "modificationTime": "2020-04-28T11:06:02.8999373Z", - "statusModificationUserName": null, - "statusModificationTime": "0001-01-01T00:00:00" - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SubscriptionAlerts.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SubscriptionAlerts.json deleted file mode 100644 index 0880df01a3b4..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SubscriptionAlerts.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "parameters": { - "api-version": "2018-08-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "scope": "subscriptions/00000000-0000-0000-0000-000000000000" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/alerts/00000000-0000-0000-0000-000000000000", - "name": "00000000-0000-0000-0000-000000000000", - "type": "Microsoft.CostManagement/alerts", - "properties": { - "definition": { - "type": "Budget", - "category": "Cost", - "criteria": "CostThresholdExceeded" - }, - "description": "", - "source": "Preset", - "details": { - "timeGrainType": "Quarterly", - "periodStartDate": "2020-03-01T00:00:00Z", - "triggeredBy": "00000000-0000-0000-0000-000000000000_1_01", - "resourceGroupFilter": [], - "resourceFilter": [], - "meterFilter": [], - "tagFilter": {}, - "threshold": 0.8, - "operator": "GreaterThan", - "amount": 200000.0, - "unit": "USD", - "currentSpend": 161000.12, - "contactEmails": [ - "1234@contoso.com" - ], - "contactGroups": [], - "contactRoles": [], - "overridingAlert": null - }, - "costEntityId": "budget1", - "status": "Active", - "creationTime": "2020-04-27T11:07:52.7143901Z", - "closeTime": "0001-01-01T00:00:00", - "modificationTime": "2020-04-28T11:06:02.8999373Z", - "statusModificationUserName": null, - "statusModificationTime": "0001-01-01T00:00:00" - } - }, - { - "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/alerts/11111111-1111-1111-111111111111", - "name": "11111111-1111-1111-111111111111", - "type": "Microsoft.CostManagement/alerts", - "properties": { - "definition": { - "type": "Budget", - "category": "Cost", - "criteria": "CostThresholdExceeded" - }, - "description": "", - "source": "Preset", - "details": { - "timeGrainType": "Quarterly", - "periodStartDate": "2020-03-01T00:00:00Z", - "triggeredBy": "11111111-1111-1111-111111111111_1_01", - "resourceGroupFilter": [], - "resourceFilter": [], - "meterFilter": [], - "tagFilter": {}, - "threshold": 0.8, - "operator": "GreaterThan", - "amount": 200000.0, - "unit": "USD", - "currentSpend": 171000.32, - "contactEmails": [ - "1234@contoso.com" - ], - "contactGroups": [], - "contactRoles": [], - "overridingAlert": null - }, - "costEntityId": "budget1", - "status": "Active", - "creationTime": "2019-06-24T05:51:52.8713179Z", - "closeTime": "0001-01-01T00:00:00", - "modificationTime": "2019-08-31T17:51:55.1808807Z", - "statusModificationUserName": null, - "statusModificationTime": "0001-01-01T00:00:00" - } - } - ], - "nextLink": null - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SubscriptionDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SubscriptionDimensionsList.json deleted file mode 100644 index 89e401409972..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SubscriptionDimensionsList.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "parameters": { - "api-version": "2019-10-01", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "$top": 5, - "$expand": "properties/data", - "scope": "subscriptions/00000000-0000-0000-0000-000000000000" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/dimensions_ResourceGroup_2018-05-01_2018-05-31_5", - "name": "dimensions_ResourceGroup_2018-05-01_2018-05-31_5", - "type": "microsoft.CostManagement/dimensions", - "properties": { - "data": [ - "dcrg", - "rg", - "offlinegalleryrg", - "system.orlando.adminkeyvault", - "system.orlando.keyvault" - ], - "total": 68, - "category": "ResourceGroup", - "usageStart": "2018-05-01T00:00:00-07:00", - "usageEnd": "2018-05-31T00:00:00-07:00", - "description": "Resource group", - "filterEnabled": true, - "groupingEnabled": true - } - }, - { - "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/dimensions_ResourceType_2018-05-01_2018-05-31_5", - "name": "dimensions_ResourceType_2018-05-01_2018-05-31_5", - "type": "microsoft.CostManagement/dimensions", - "properties": { - "data": [ - "microsoft.storage/storageaccounts", - "microsoft.web.admin/role", - "microsoft.sql/servers", - "microsoft.compute/virtualmachines" - ], - "total": 4, - "category": "ResourceType", - "usageStart": "2018-05-01T00:00:00-07:00", - "usageEnd": "2018-05-31T00:00:00-07:00", - "description": "Resource type", - "filterEnabled": true, - "groupingEnabled": true - } - } - ] - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SubscriptionForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SubscriptionForecast.json deleted file mode 100644 index dafbb3828f33..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SubscriptionForecast.json +++ /dev/null @@ -1,117 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "scope": "subscriptions/00000000-0000-0000-0000-000000000000", - "parameters": { - "type": "Usage", - "timeframe": "MonthToDate", - "dataset": { - "granularity": "Daily", - "filter": { - "and": [ - { - "or": [ - { - "dimension": { - "name": "ResourceLocation", - "operator": "In", - "values": [ - "East US", - "West Europe" - ] - } - }, - { - "tag": { - "name": "Environment", - "operator": "In", - "values": [ - "UAT", - "Prod" - ] - } - } - ] - }, - { - "dimension": { - "name": "ResourceGroup", - "operator": "In", - "values": [ - "API" - ] - } - } - ] - } - }, - "includeActualCost": false, - "includeFreshPartialCost": false - } - }, - "responses": { - "200": { - "body": { - "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/query/00000000-0000-0000-0000-000000000000", - "name": "55312978-ba1b-415c-9304-cfd9c43c0481", - "type": "microsoft.costmanagement/Query", - "properties": { - "nextLink": null, - "columns": [ - { - "name": "PreTaxCost", - "type": "Number" - }, - { - "name": "ResourceGroup", - "type": "String" - }, - { - "name": "UsageDate", - "type": "Number" - }, - { - "name": "CostStatus", - "type": "String" - }, - { - "name": "Currency", - "type": "String" - } - ], - "rows": [ - [ - 2.10333307059661, - "ScreenSharingTest-peer", - 20180331, - "Forecast", - "USD" - ], - [ - 218.68795741935486, - "Ict_StratAndPlan_GoldSprova_Prod", - 20180331, - "Forecast", - "USD" - ], - [ - 0.14384913581657052, - "ssbciotelement01", - 20180401, - "Forecast", - "USD" - ], - [ - 0.009865586851323632, - "ict_stratandplan_goldsprova_prod", - 20180429, - "Forecast", - "USD" - ] - ] - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SubscriptionQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SubscriptionQuery.json deleted file mode 100644 index c9d3f535ad9c..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SubscriptionQuery.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "parameters": { - "api-version": "2019-10-01", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "scope": "subscriptions/00000000-0000-0000-0000-000000000000", - "parameters": { - "type": "Usage", - "timeframe": "MonthToDate", - "dataset": { - "granularity": "Daily", - "filter": { - "and": [ - { - "or": [ - { - "dimension": { - "name": "ResourceLocation", - "operator": "In", - "values": [ - "East US", - "West Europe" - ] - } - }, - { - "tag": { - "name": "Environment", - "operator": "In", - "values": [ - "UAT", - "Prod" - ] - } - } - ] - }, - { - "dimension": { - "name": "ResourceGroup", - "operator": "In", - "values": [ - "API" - ] - } - } - ] - } - } - } - }, - "responses": { - "200": { - "body": { - "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/Query/00000000-0000-0000-0000-000000000000", - "name": "55312978-ba1b-415c-9304-cfd9c43c0481", - "type": "microsoft.costmanagement/Query", - "properties": { - "nextLink": null, - "columns": [ - { - "name": "PreTaxCost", - "type": "Number" - }, - { - "name": "ResourceGroup", - "type": "String" - }, - { - "name": "UsageDate", - "type": "Number" - }, - { - "name": "Currency", - "type": "String" - } - ], - "rows": [ - [ - 2.10333307059661, - "ScreenSharingTest-peer", - 20180331, - "USD" - ], - [ - 218.68795741935486, - "Ict_StratAndPlan_GoldSprova_Prod", - 20180331, - "USD" - ], - [ - 0.14384913581657052, - "ssbciotelement01", - 20180401, - "USD" - ], - [ - 0.009865586851323632, - "ict_stratandplan_goldsprova_prod", - 20180429, - "USD" - ] - ] - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SubscriptionQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SubscriptionQueryGrouping.json deleted file mode 100644 index f155bfd59622..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/SubscriptionQueryGrouping.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "parameters": { - "api-version": "2019-10-01", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "scope": "subscriptions/00000000-0000-0000-0000-000000000000", - "parameters": { - "type": "Usage", - "timeframe": "TheLastMonth", - "dataset": { - "granularity": "None", - "aggregation": { - "totalCost": { - "name": "PreTaxCost", - "function": "Sum" - } - }, - "grouping": [ - { - "type": "Dimension", - "name": "ResourceGroup" - } - ] - } - } - }, - "responses": { - "200": { - "body": { - "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/Query/00000000-0000-0000-0000-000000000000", - "name": "55312978-ba1b-415c-9304-cfd9c43c0481", - "type": "microsoft.costmanagement/Query", - "properties": { - "nextLink": null, - "columns": [ - { - "name": "PreTaxCost", - "type": "Number" - }, - { - "name": "ResourceGroup", - "type": "String" - }, - { - "name": "Currency", - "type": "String" - } - ], - "rows": [ - [ - 0.009865586851323632, - "Ict_StratAndPlan_GoldSprova_Prod_0", - "USD" - ], - [ - 218.68795741935486, - "Ict_StratAndPlan_GoldSprova_Prod_1", - "USD" - ], - [ - 2.10333307059661, - "ScreenSharingTest-peer1", - "USD" - ], - [ - 0.14384913581657052, - "Ssbciotelement01", - "USD" - ] - ] - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewByResourceGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewByResourceGroup.json deleted file mode 100644 index 68f6fe7333ca..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewByResourceGroup.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "viewName": "swaggerExample", - "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG" - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/views/swaggerExample", - "name": "swaggerExample", - "type": "Microsoft.CostManagement/Views", - "eTag": "\"1d4ff9fe66f1d10\"", - "properties": { - "displayName": "swagger Example", - "scope": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", - "query": { - "type": "Usage", - "timeframe": "MonthToDate", - "dataset": { - "granularity": "Daily", - "aggregation": { - "totalCost": { - "name": "PreTaxCost", - "function": "Sum" - } - }, - "grouping": [], - "sorting": [ - { - "direction": "Ascending", - "name": "UsageDate" - } - ] - } - }, - "chart": "Table", - "accumulated": "true", - "metric": "ActualCost", - "kpis": [ - { - "type": "Forecast", - "id": null, - "enabled": true - }, - { - "type": "Budget", - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo", - "enabled": true - } - ], - "pivots": [ - { - "type": "Dimension", - "name": "ServiceName" - }, - { - "type": "Dimension", - "name": "MeterCategory" - }, - { - "type": "TagKey", - "name": "swaggerTagKey" - } - ] - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewCreateOrUpdateByResourceGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewCreateOrUpdateByResourceGroup.json deleted file mode 100644 index 65b1475171ec..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewCreateOrUpdateByResourceGroup.json +++ /dev/null @@ -1,186 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", - "viewName": "swaggerExample", - "parameters": { - "eTag": "\"1d4ff9fe66f1d10\"", - "properties": { - "displayName": "swagger Example", - "query": { - "type": "Usage", - "timeframe": "MonthToDate", - "dataset": { - "granularity": "Daily", - "aggregation": { - "totalCost": { - "name": "PreTaxCost", - "function": "Sum" - } - }, - "grouping": [], - "sorting": [ - { - "direction": "Ascending", - "name": "UsageDate" - } - ] - } - }, - "chart": "Table", - "accumulated": "true", - "metric": "ActualCost", - "kpis": [ - { - "type": "Forecast", - "id": null, - "enabled": true - }, - { - "type": "Budget", - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo", - "enabled": true - } - ], - "pivots": [ - { - "type": "Dimension", - "name": "ServiceName" - }, - { - "type": "Dimension", - "name": "MeterCategory" - }, - { - "type": "TagKey", - "name": "swaggerTagKey" - } - ] - } - } - }, - "responses": { - "201": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/views/swaggerExample", - "name": "swaggerExample", - "type": "Microsoft.CostManagement/Views", - "eTag": "\"1d4ffa5a9c2430c\"", - "properties": { - "displayName": "swagger Example", - "scope": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", - "query": { - "type": "Usage", - "timeframe": "MonthToDate", - "dataset": { - "granularity": "Daily", - "aggregation": { - "totalCost": { - "name": "PreTaxCost", - "function": "Sum" - } - }, - "grouping": [], - "sorting": [ - { - "direction": "Ascending", - "name": "UsageDate" - } - ] - } - }, - "chart": "Table", - "accumulated": "true", - "metric": "ActualCost", - "kpis": [ - { - "type": "Forecast", - "id": null, - "enabled": true - }, - { - "type": "Budget", - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo", - "enabled": true - } - ], - "pivots": [ - { - "type": "Dimension", - "name": "ServiceName" - }, - { - "type": "Dimension", - "name": "MeterCategory" - }, - { - "type": "TagKey", - "name": "swaggerTagKey" - } - ] - } - } - }, - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/views/swaggerExample", - "name": "swaggerExample", - "type": "Microsoft.CostManagement/Views", - "eTag": "\"1d4ffa5a9c2430c\"", - "properties": { - "displayName": "swagger Example", - "scope": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", - "query": { - "type": "Usage", - "timeframe": "MonthToDate", - "dataset": { - "granularity": "Daily", - "aggregation": { - "totalCost": { - "name": "PreTaxCost", - "function": "Sum" - } - }, - "grouping": [], - "sorting": [ - { - "direction": "Ascending", - "name": "UsageDate" - } - ] - } - }, - "chart": "Table", - "accumulated": "true", - "metric": "ActualCost", - "kpis": [ - { - "type": "Forecast", - "id": null, - "enabled": true - }, - { - "type": "Budget", - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo", - "enabled": true - } - ], - "pivots": [ - { - "type": "Dimension", - "name": "ServiceName" - }, - { - "type": "Dimension", - "name": "MeterCategory" - }, - { - "type": "TagKey", - "name": "swaggerTagKey" - } - ] - } - } - } - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewDeleteByResourceGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewDeleteByResourceGroup.json deleted file mode 100644 index c613cb7cecff..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewDeleteByResourceGroup.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", - "viewName": "TestView" - }, - "responses": { - "200": {}, - "204": {} - } -} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewListByResourceGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewListByResourceGroup.json deleted file mode 100644 index 9f71cbfbe7f5..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/examples/ViewListByResourceGroup.json +++ /dev/null @@ -1,132 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01", - "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/views/swaggerExample", - "name": "swaggerExample", - "type": "Microsoft.CostManagement/Views", - "eTag": "\"1d4ff9fe66f1d10\"", - "properties": { - "displayName": "swagger Example", - "scope": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", - "query": { - "type": "Usage", - "timeframe": "MonthToDate", - "dataset": { - "granularity": "Daily", - "aggregation": { - "totalCost": { - "name": "PreTaxCost", - "function": "Sum" - } - }, - "grouping": [], - "sorting": [ - { - "direction": "Ascending", - "name": "UsageDate" - } - ] - } - }, - "chart": "Table", - "accumulated": "true", - "metric": "ActualCost", - "kpis": [ - { - "type": "Forecast", - "id": null, - "enabled": true - }, - { - "type": "Budget", - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo", - "enabled": true - } - ], - "pivots": [ - { - "type": "Dimension", - "name": "ServiceName" - }, - { - "type": "Dimension", - "name": "MeterCategory" - }, - { - "type": "TagKey", - "name": "swaggerTagKey" - } - ] - } - }, - { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/views/swaggerExample2", - "name": "swaggerExample2", - "type": "Microsoft.CostManagement/Views", - "eTag": "\"1d4ffa5a9c2430c\"", - "properties": { - "displayName": "swagger Example 2", - "scope": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", - "query": { - "type": "Usage", - "timeframe": "LastMonthToDate", - "dataset": { - "granularity": "Daily", - "aggregation": { - "totalCost": { - "name": "PreTaxCost", - "function": "Sum" - } - }, - "grouping": [], - "sorting": [ - { - "direction": "Ascending", - "name": "UsageDate" - } - ] - } - }, - "chart": "GroupedColumn", - "accumulated": "true", - "metric": "ActualCost", - "kpis": [ - { - "type": "Forecast", - "id": null, - "enabled": true - }, - { - "type": "Budget", - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo", - "enabled": true - } - ], - "pivots": [ - { - "type": "Dimension", - "name": "ServiceName" - }, - { - "type": "Dimension", - "name": "MeterCategory" - }, - { - "type": "TagKey", - "name": "swaggerTagKey" - } - ] - } - } - ] - } - } - } -} From f60d21befffde84c1769b66a3a9ea92d2f743b84 Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Fri, 14 Aug 2020 00:26:11 -0700 Subject: [PATCH 46/53] Use 2020-06-01 to avoid lint errors --- specification/cost-management/resource-manager/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/cost-management/resource-manager/readme.md b/specification/cost-management/resource-manager/readme.md index fa6c15581623..9706afd7c397 100644 --- a/specification/cost-management/resource-manager/readme.md +++ b/specification/cost-management/resource-manager/readme.md @@ -39,7 +39,7 @@ These settings apply only when `--tag=package-preview-2020-03` is specified on t ```yaml $(tag) == 'package-preview-2020-03' input-file: - - Microsoft.CostManagement/stable/2019-11-01/costmanagement.json + - Microsoft.CostManagement/stable/2020-06-01/costmanagement.json - Microsoft.CostManagement/preview/2020-03-01-preview/costallocation.json ``` From 7d057439f2a849b21a38235eeb8dd22aa81ff365 Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Fri, 14 Aug 2020 00:47:17 -0700 Subject: [PATCH 47/53] Fix more object mismatches --- .../preview/2020-03-01-preview/costallocation.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costallocation.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costallocation.json index 53f62123268d..65fae4020c2d 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costallocation.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costallocation.json @@ -254,19 +254,19 @@ "description": "The details of the error.", "properties": { "code": { - "description": "A machine readable error code.", + "description": "Error code.", "type": "string", "readOnly": true }, "message": { - "description": "A human readable error 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.", + "description": "Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message. \n\nSome Error responses: \n\n * 429 TooManyRequests - Request is throttled. Retry after waiting for the time specified in the \"x-ms-ratelimit-microsoft.consumption-retry-after\" header. \n\n * 503 ServiceUnavailable - Service is temporarily unavailable. Retry after waiting for the time specified in the \"Retry-After\" header.", "type": "object", "properties": { "error": { From 032ba6bde27f78374f42c7fabe3d070eb9a98850 Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Fri, 14 Aug 2020 00:59:27 -0700 Subject: [PATCH 48/53] Match parameter descriptions --- .../preview/2020-03-01-preview/costallocation.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costallocation.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costallocation.json index 65fae4020c2d..ad2e405acf2c 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costallocation.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costallocation.json @@ -667,12 +667,12 @@ "in": "query", "required": true, "type": "string", - "description": "Version of the API to be used with the client request. The current version is 2020-03-01-preview" + "description": "Version of the API to be used with the client request (e.g. '2020-06-01')." }, "billingAccountIdParameter": { "name": "billingAccountId", "in": "path", - "description": "Billing Account ID or Enrollment Number", + "description": "BillingAccount ID", "required": true, "type": "string", "x-ms-parameter-location": "method" From 5141fda3fc0b4bf3ad42a89f11775e04b3d8eb5f Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Tue, 18 Aug 2020 20:06:48 -0700 Subject: [PATCH 49/53] Remove request/response differences --- .../2020-03-01-preview/costallocation.json | 139 ++++-------------- 1 file changed, 26 insertions(+), 113 deletions(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costallocation.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costallocation.json index ad2e405acf2c..048d6efbb693 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costallocation.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costallocation.json @@ -150,7 +150,7 @@ "200": { "description": "OK. The request has succeeded.", "schema": { - "$ref": "#/definitions/CostAllocationRuleDefinitionResponse" + "$ref": "#/definitions/CostAllocationRuleDefinition" } }, "default": { @@ -191,7 +191,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/CostAllocationRuleDefinitionRequest" + "$ref": "#/definitions/CostAllocationRuleDefinition" } } ], @@ -199,7 +199,7 @@ "200": { "description": "OK. The request has succeeded.", "schema": { - "$ref": "#/definitions/CostAllocationRuleDefinitionResponse" + "$ref": "#/definitions/CostAllocationRuleDefinition" } }, "default": { @@ -284,7 +284,7 @@ "type": "array", "readOnly": true, "items": { - "$ref": "#/definitions/CostAllocationRuleDefinitionResponse" + "$ref": "#/definitions/CostAllocationRuleDefinition" } }, "nextLink": { @@ -357,50 +357,21 @@ "type": "string", "readOnly": true, "description": "Resource type of the rule. This is a read only value of Microsoft.CostManagement/CostAllocationRule." + }, + "properties": { + "description": "Cost allocation rule properties", + "$ref": "#/definitions/CostAllocationRuleProperties" } }, "x-ms-azure-resource": true }, - "CostAllocationRuleDefinitionResponse": { - "allOf": [ - { - "$ref": "#/definitions/CostAllocationRuleDefinition" - }, - { - "type": "object", - "properties": { - "properties": { - "$ref": "#/definitions/CostAllocationRulePropertiesResponse", - "description": "Cost allocation rule properties" - } - } - } - ], - "description": "The cost allocation rule model definition" - }, - "CostAllocationRuleDefinitionRequest": { - "allOf": [ - { - "$ref": "#/definitions/CostAllocationRuleDefinition" - }, - { - "type": "object", - "properties": { - "properties": { - "$ref": "#/definitions/CostAllocationRulePropertiesRequest", - "description": "Cost allocation rule properties" - } - } - } - ], - "description": "The cost allocation rule model definition" - }, "CostAllocationRuleProperties": { "type": "object", "description": "The properties of a cost allocation rule", "additionalProperties": false, "required": [ - "details" + "details", + "status" ], "properties": { "description": { @@ -410,58 +381,24 @@ "details": { "description": "Resource information for the cost allocation rule", "$ref": "#/definitions/CostAllocationRuleDetails" - } - } - }, - "CostAllocationRulePropertiesResponse": { - "description": "The properties of a cost allocation rule response", - "allOf": [ - { - "$ref": "#/definitions/CostAllocationRuleProperties" }, - { - "type": "object", - "properties": { - "status": { - "$ref": "#/definitions/RuleStatus", - "description": "Status of the rule" - }, - "createdDate": { - "type": "string", - "format": "date-time", - "description": "Time at which the rule was created. Rules that change cost for the same resource are applied in order of creation." - }, - "updatedDate": { - "type": "string", - "format": "date-time", - "description": "Time at which the rule was last updated." - } - }, - "required": [ - "status" - ] - } - ] - }, - "CostAllocationRulePropertiesRequest": { - "description": "The properties of a cost allocation rule request", - "allOf": [ - { - "$ref": "#/definitions/CostAllocationRuleProperties" + "status": { + "$ref": "#/definitions/RuleStatus", + "description": "Status of the rule" }, - { - "type": "object", - "properties": { - "status": { - "$ref": "#/definitions/InputRuleStatus", - "description": "Status of the rule" - } - }, - "required": [ - "status" - ] + "createdDate": { + "type": "string", + "format": "date-time", + "readonly": true, + "description": "Time at which the rule was created. Rules that change cost for the same resource are applied in order of creation." + }, + "updatedDate": { + "type": "string", + "format": "date-time", + "readonly": true, + "description": "Time at which the rule was last updated." } - ] + } }, "RuleStatus": { "type": "string", @@ -487,36 +424,12 @@ }, { "value": "Processing", - "description": "Rule is saved and cost allocation is being updated.", + "description": "Rule is saved and cost allocation is being updated. Readonly value that cannot be submitted in a put request.", "name": "Processing" } ] } }, - "InputRuleStatus": { - "type": "string", - "description": "Desired status of the rule.", - "enum": [ - "NotActive", - "Active" - ], - "x-ms-enum": { - "name": "InputRuleStatus", - "modelAsString": true, - "values": [ - { - "value": "NotActive", - "description": "Rule will be saved but not used to allocate costs.", - "name": "NotActive" - }, - { - "value": "Active", - "description": "Rule will be saved and impacting cost allocation.", - "name": "Active" - } - ] - } - }, "CostAllocationRuleDetails": { "type": "object", "description": "Resource details of the cost allocation rule", From 73d093af8fddb70fcaacbc28cea0503d7d6cb0f8 Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Wed, 19 Aug 2020 10:54:11 -0700 Subject: [PATCH 50/53] Fix semantics --- .../preview/2020-03-01-preview/costallocation.json | 1 - 1 file changed, 1 deletion(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costallocation.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costallocation.json index 048d6efbb693..028bd48b6fda 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costallocation.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costallocation.json @@ -368,7 +368,6 @@ "CostAllocationRuleProperties": { "type": "object", "description": "The properties of a cost allocation rule", - "additionalProperties": false, "required": [ "details", "status" From 2bf0282b36cfaf070bc8c9fd45ccd54bf9326f5f Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Thu, 20 Aug 2020 02:28:56 -0700 Subject: [PATCH 51/53] Fix readonly setup --- .../preview/2020-03-01-preview/costallocation.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costallocation.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costallocation.json index 028bd48b6fda..86cfc9173650 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costallocation.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costallocation.json @@ -282,7 +282,6 @@ "value": { "description": "The list of cost allocation rules.", "type": "array", - "readOnly": true, "items": { "$ref": "#/definitions/CostAllocationRuleDefinition" } @@ -368,6 +367,7 @@ "CostAllocationRuleProperties": { "type": "object", "description": "The properties of a cost allocation rule", + "additionalProperties": false, "required": [ "details", "status" From 12494b4521f2bd3aa11545867838add01c9b0eaa Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Thu, 20 Aug 2020 02:54:26 -0700 Subject: [PATCH 52/53] Remove format from readonly field --- .../preview/2020-03-01-preview/costallocation.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costallocation.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costallocation.json index 86cfc9173650..e612f7fa28bd 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costallocation.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costallocation.json @@ -387,13 +387,11 @@ }, "createdDate": { "type": "string", - "format": "date-time", "readonly": true, "description": "Time at which the rule was created. Rules that change cost for the same resource are applied in order of creation." }, "updatedDate": { "type": "string", - "format": "date-time", "readonly": true, "description": "Time at which the rule was last updated." } From 6be6f494716af33bb0dbf25f99d330c9775381bb Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Thu, 20 Aug 2020 11:29:26 -0700 Subject: [PATCH 53/53] Fix capitalization --- .../preview/2020-03-01-preview/costallocation.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costallocation.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costallocation.json index e612f7fa28bd..58ed986b82aa 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costallocation.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costallocation.json @@ -387,12 +387,14 @@ }, "createdDate": { "type": "string", - "readonly": true, + "format": "date-time", + "readOnly": true, "description": "Time at which the rule was created. Rules that change cost for the same resource are applied in order of creation." }, "updatedDate": { "type": "string", - "readonly": true, + "format": "date-time", + "readOnly": true, "description": "Time at which the rule was last updated." } }