From bc1c2b3d6a371610d2c0f938e3d53fd172c3c0c8 Mon Sep 17 00:00:00 2001 From: olrakovs Date: Sun, 25 Nov 2018 14:08:15 +0200 Subject: [PATCH 1/2] Adding new resource type name Forecast to Microsoft.CostManagment RP --- .../2018-12-01-preview/costmanagement.json | 350 ++++++++++++++++-- ...Usage.json => BillingAccountForecast.json} | 49 ++- .../examples/BillingAccountQuery.json | 52 +-- .../examples/BillingAccountQueryForecast.json | 110 ------ ....json => BillingAccountQueryGrouping.json} | 0 ...ueryUsage.json => DepartmentForecast.json} | 49 ++- .../examples/DepartmentQuery.json | 45 +-- .../examples/DepartmentQueryForecast.json | 111 ------ ...sage.json => DepartmentQueryGrouping.json} | 0 ...ge.json => EnrollmentAccountForecast.json} | 49 ++- .../examples/EnrollmentAccountQuery.json | 51 +-- .../EnrollmentAccountQueryForecast.json | 98 ----- ...on => EnrollmentAccountQueryGrouping.json} | 0 ...sage.json => ManagementGroupForecast.json} | 49 ++- .../examples/ManagementGroupQuery.json | 49 +-- .../ManagementGroupQueryForecast.json | 97 ----- ...json => ManagementGroupQueryGrouping.json} | 0 ...yUsage.json => ResourceGroupForecast.json} | 28 +- .../examples/ResourceGroupQuery.json | 34 +- .../examples/ResourceGroupQueryForecast.json | 103 ------ .../examples/SubscriptionForecast.json | 124 +++++++ .../examples/SubscriptionQuery.json | 47 +-- .../examples/SubscriptionQueryForecast.json | 82 ---- .../examples/SubscriptionQueryUsage.json | 75 ---- 24 files changed, 646 insertions(+), 1006 deletions(-) rename specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/{BillingAccountQueryUsage.json => BillingAccountForecast.json} (67%) delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/BillingAccountQueryForecast.json rename specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/{BillingAccountQueryGroupingUsage.json => BillingAccountQueryGrouping.json} (100%) rename specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/{DepartmentQueryUsage.json => DepartmentForecast.json} (67%) delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/DepartmentQueryForecast.json rename specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/{DepartmentQueryGroupingUsage.json => DepartmentQueryGrouping.json} (100%) rename specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/{EnrollmentAccountQueryUsage.json => EnrollmentAccountForecast.json} (64%) delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/EnrollmentAccountQueryForecast.json rename specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/{EnrollmentAccountQueryGroupingUsage.json => EnrollmentAccountQueryGrouping.json} (100%) rename specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/{ManagementGroupQueryUsage.json => ManagementGroupForecast.json} (62%) delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/ManagementGroupQueryForecast.json rename specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/{ManagementGroupQueryGroupingUsage.json => ManagementGroupQueryGrouping.json} (100%) rename specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/{ResourceGroupQueryUsage.json => ResourceGroupForecast.json} (76%) delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/ResourceGroupQueryForecast.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/SubscriptionForecast.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/SubscriptionQueryForecast.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/SubscriptionQueryUsage.json diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/costmanagement.json index a72b04509131..f0d08a3877cb 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/costmanagement.json @@ -441,12 +441,57 @@ "x-ms-examples": { "SubscriptionQuery": { "$ref": "./examples/SubscriptionQuery.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" }, - "SubscriptionQueryUsage": { - "$ref": "./examples/SubscriptionQueryUsage.json" + { + "$ref": "#/parameters/subscriptionIdParameter" }, - "SubscriptionQueryForecast": { - "$ref": "./examples/SubscriptionQueryForecast.json" + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ReportConfigDefinition" + }, + "description": "Parameters supplied to the CreateOrUpdate Report 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" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.CostManagement/Forecast": { + "post": { + "tags": [ + "Forecast" + ], + "operationId": "Forecast_UsageBySubscription", + "description": "Forecast the usage data for subscriptionId.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "SubscriptionForecast": { + "$ref": "./examples/SubscriptionForecast.json" } }, "parameters": [ @@ -574,14 +619,63 @@ "x-ms-examples": { "ResourceGroupQuery": { "$ref": "./examples/ResourceGroupQuery.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" }, - "ResourceGroupQueryGroupingUsage": { - "$ref": "./examples/ResourceGroupQueryUsage.json" + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ReportConfigDefinition" + }, + "description": "Parameters supplied to the CreateOrUpdate Report Config operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/QueryResult" + } }, - "ResourceGroupQueryGroupingForecast": { - "$ref": "./examples/ResourceGroupQueryForecast.json" + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.CostManagement/Forecast": { + "post": { + "tags": [ + "Forecast" + ], + "operationId": "Forecast_UsageByResourceGroup", + "description": "Forecast the usage data for subscriptionId and resource group.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ResourceGroupForecast": { + "$ref": "./examples/ResourceGroupForecast.json" + } + + }, "parameters": [ { "$ref": "#/parameters/apiVersionParameter" @@ -634,16 +728,61 @@ "x-ms-examples": { "BillingAccountQuery": { "$ref": "./examples/BillingAccountQuery.json" - }, - "BillingAccountQueryUsage": { - "$ref": "./examples/BillingAccountQueryUsage.json" }, "BillingAccountQueryGroupingUsage": { - "$ref": "./examples/BillingAccountQueryGroupingUsage.json" + "$ref": "./examples/BillingAccountQueryGrouping.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" }, - "BillingAccountQueryForecast": { - "$ref": "./examples/BillingAccountQueryForecast.json" - } + { + "$ref": "#/parameters/billingAccountIdParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ReportConfigDefinition" + }, + "description": "Parameters supplied to the CreateOrUpdate Report 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" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/Forecast": { + "post": { + "tags": [ + "Forecast" + ], + "operationId": "Forecast_UsageByBillingAccount", + "description": "Forecast the usage data for billing account.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "BillingAccountForecast": { + "$ref": "./examples/BillingAccountForecast.json" + } }, "parameters": [ { @@ -694,16 +833,64 @@ "x-ms-examples": { "EnrollmentAccountQuery": { "$ref": "./examples/EnrollmentAccountQuery.json" - }, - "EnrollmentAccountQueryUsage": { - "$ref": "./examples/EnrollmentAccountQueryUsage.json" }, "EnrollmentAccountQueryGroupingUsage": { - "$ref": "./examples/EnrollmentAccountQueryGroupingUsage.json" + "$ref": "./examples/EnrollmentAccountQueryGrouping.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" }, - "EnrollmentAccountQueryForecast": { - "$ref": "./examples/EnrollmentAccountQueryForecast.json" - } + { + "$ref": "#/parameters/billingAccountIdParameter" + }, + { + "$ref": "#/parameters/enrollmentAccountIdParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ReportConfigDefinition" + }, + "description": "Parameters supplied to the CreateOrUpdate Report 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" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}/providers/Microsoft.CostManagement/Forecast": { + "post": { + "tags": [ + "Forecast" + ], + "operationId": "Forecast_UsageByEnrollmentAccount", + "description": "Forecast the usage data for an enrollment account.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "EnrollmentAccountForecast": { + "$ref": "./examples/EnrollmentAccountForecast.json" + } }, "parameters": [ { @@ -757,16 +944,64 @@ "x-ms-examples": { "DepartmentQuery": { "$ref": "./examples/DepartmentQuery.json" - }, - "DepartmentQueryUsage": { - "$ref": "./examples/DepartmentQueryUsage.json" }, "DepartmentQueryGroupingUsage": { - "$ref": "./examples/DepartmentQueryGroupingUsage.json" + "$ref": "./examples/DepartmentQueryGrouping.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountIdParameter" }, - "DepartmentQueryForecast": { - "$ref": "./examples/DepartmentQueryForecast.json" - } + { + "$ref": "#/parameters/departmentIdParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ReportConfigDefinition" + }, + "description": "Parameters supplied to the CreateOrUpdate Report 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" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}/providers/Microsoft.CostManagement/Forecast": { + "post": { + "tags": [ + "Forecast" + ], + "operationId": "Forecast_UsageByDepartment", + "description": "Forecast the usage data for department.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "DepartmentForecast": { + "$ref": "./examples/DepartmentForecast.json" + } }, "parameters": [ { @@ -820,15 +1055,60 @@ "x-ms-examples": { "ManagementGroupQuery": { "$ref": "./examples/ManagementGroupQuery.json" - }, - "ManagementGroupQueryUsage": { - "$ref": "./examples/ManagementGroupQueryUsage.json" }, "ManagementGroupQueryGroupingUsage": { - "$ref": "./examples/ManagementGroupQueryGroupingUsage.json" + "$ref": "./examples/ManagementGroupQueryGrouping.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/managementGroupIdParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ReportConfigDefinition" + }, + "description": "Parameters supplied to the CreateOrUpdate Report Config operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/QueryResult" + } }, - "ManagementGroupQueryForecast": { - "$ref": "./examples/ManagementGroupQueryForecast.json" + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.CostManagement/Forecast": { + "post": { + "tags": [ + "Forecast" + ], + "operationId": "Forecast_UsageByManagmentGroup", + "description": "Lists the usage data for managment group.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ManagementGroupForecast": { + "$ref": "./examples/ManagementGroupForecast.json" } }, "parameters": [ diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/BillingAccountQueryUsage.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/BillingAccountForecast.json similarity index 67% rename from specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/BillingAccountQueryUsage.json rename to specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/BillingAccountForecast.json index a25ce920278b..e47da91768e7 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/BillingAccountQueryUsage.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/BillingAccountForecast.json @@ -58,20 +58,24 @@ "body": { "value": [ { - "id": "providers/Microsoft.Billing/billingAccounts/70664866/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "id": "providers/Microsoft.Billing/billingAccounts/70664866/providers/Microsoft.CostManagement/Forecast/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", - "type": "microsoft.costmanagement/Query", + "type": "microsoft.costmanagement/Forecast", "properties": { - "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/providers/Microsoft.CostManagement/Query?api-version=2018-12-01-preview&$skiptoken=AQAAAA%3D%3D", + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/providers/Microsoft.CostManagement/Forecast?api-version=2018-12-01-preview&$skiptoken=AQAAAA%3D%3D", "columns": [ { "name": "PreTaxCost", "type": "Number" - }, + }, { "name": "UsageDate", "type": "Number" - }, + }, + { + "name": "CostStatus", + "type": "String" + }, { "name": "Currency", "type": "String" @@ -79,20 +83,41 @@ ], "rows": [ [ - 19.545363672276512, - 20180831, + 19.545363672276512, + 20180831, + "Actual", + "USD" + ], + [ + 20.41979233490323, + 20180930, + "Actual", "USD" ], [ - 173.41979241290323, - 20180930, + 21.322216562625452, + 20181031, + "Actual", "USD" ], [ - 20.359416562625452, - 20181031, + 22.545363672276532, + 20180831, + "Actual", "USD" - ] + ], + [ + 23.41979675590323, + 20180930, + "Forecast", + "USD" + ], + [ + 24.359416562626652, + 20181031, + "Forecast", + "USD" + ] ] } } diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/BillingAccountQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/BillingAccountQuery.json index d3ea12d457dc..a25ce920278b 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/BillingAccountQuery.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/BillingAccountQuery.json @@ -3,11 +3,11 @@ "api-version": "2018-12-01-preview", "billingAccountId": "70664866", "parameters":{ - "type": "UsageAndForecast", + "type": "Usage", "timeframe": "Custom", "timePeriod": { - "from": "2018-10-01T00:00:00.000Z", - "to": "2018-12-31T00:00:00.000Z" + "from": "2018-08-01T00:00:00.000Z", + "to": "2018-10-31T00:00:00.000Z" }, "dataset": { "granularity": "Daily", @@ -71,15 +71,7 @@ { "name": "UsageDate", "type": "Number" - }, - { - "name": "ConfidenceLevelsLower", - "type": "String" - }, - { - "name": "ConfidenceLevelsUpper", - "type": "Number" - }, + }, { "name": "Currency", "type": "String" @@ -88,47 +80,19 @@ "rows": [ [ 19.545363672276512, - 20181031, - 0, - 0, + 20180831, "USD" ], [ 173.41979241290323, - 20181031, - 0, - 0, + 20180930, "USD" ], [ 20.359416562625452, - 20181031, - 0, - 0, - "USD" - ], - [ - 0, - 20181231, - 9.4567, - 37.9876, - "USD" - ], - [ - 0, - 20181231, - 78.9887, - 316.87654, + 20181031, "USD" - ], - [ - 0, - "Azue Prod Account", - 20181231, - 10.4567, - 40.564433, - "USD" - ] + ] ] } } diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/BillingAccountQueryForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/BillingAccountQueryForecast.json deleted file mode 100644 index 60f1e92e6982..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/BillingAccountQueryForecast.json +++ /dev/null @@ -1,110 +0,0 @@ -{ - "parameters": { - "api-version": "2018-12-01-preview", - "billingAccountId": "70664866", - "parameters":{ - "type": "Forecast", - "timeframe": "Custom", - "timePeriod": { - "from": "2018-11-01T00:00:00.000Z", - "to": "2019-01-31T00:00:00.000Z" - }, - "dataset": { - "granularity": "Daily", - "filter":{ - "and": [ - { - "or":[ - { - "dimension": { - "name": "SubscriptionName", - "operator": "In", - "values": [ - "Azure Dev", - "Azure Prod", - "Azure PPE" - ] - } - }, - { - "tag": { - "name": "Environment", - "operator": "In", - "values": [ - "Dev", - "PPE", - "Prod" - ] - } - } - ] - }, - { - "dimension": { - "name": "DepartmentName", - "operator": "In", - "values": [ - "Azure Dept" - ] - } - } - ] - } - } - } - }, - "responses": { - "200": { - "body": { - "value": [ - { - "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=2018-12-01-preview&$skiptoken=AQAAAA%3D%3D", - "columns": [ - { - "name": "UsageDate", - "type": "Number" - }, - { - "name": "ConfidenceLevelsLower", - "type": "String" - }, - { - "name": "ConfidenceLevelsUpper", - "type": "Number" - }, - { - "name": "Currency", - "type": "String" - } - ], - "rows": [ - [ - 20181131, - 9.4567, - 37.9876, - "USD" - ], - [ - 20181231, - 78.9887, - 316.87654, - "USD" - ], - [ - 20190131, - 10.4567, - 40.564433, - "USD" - ] - ] - } - } - ] - } - } - } -} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/BillingAccountQueryGroupingUsage.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/BillingAccountQueryGrouping.json similarity index 100% rename from specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/BillingAccountQueryGroupingUsage.json rename to specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/BillingAccountQueryGrouping.json diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/DepartmentQueryUsage.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/DepartmentForecast.json similarity index 67% rename from specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/DepartmentQueryUsage.json rename to specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/DepartmentForecast.json index 57a9053bedd1..8d2842b87a33 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/DepartmentQueryUsage.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/DepartmentForecast.json @@ -59,20 +59,24 @@ "body": { "value": [ { - "id": "providers/Microsoft.Billing/billingAccounts/70664866/departments/123/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "id": "providers/Microsoft.Billing/billingAccounts/70664866/departments/123/providers/Microsoft.CostManagement/Forecast/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", - "type": "microsoft.costmanagement/Query", + "type": "microsoft.costmanagement/Forecast", "properties": { - "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/departments/123/providers/Microsoft.CostManagement/Query?api-version=2018-12-01-preview&$skiptoken=AQAAAA%3D%3D", + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/departments/123/providers/Microsoft.CostManagement/Forecast?api-version=2018-12-01-preview&$skiptoken=AQAAAA%3D%3D", "columns": [ { "name": "PreTaxCost", "type": "Number" - }, + }, { "name": "UsageDate", "type": "Number" - }, + }, + { + "name": "CostStatus", + "type": "String" + }, { "name": "Currency", "type": "String" @@ -80,20 +84,41 @@ ], "rows": [ [ - 19.545363672276512, - 20181031, + 19.545363672276512, + 20181026, + "Actual", + "USD" + ], + [ + 20.41179241293923, + 20181027, + "Actual", "USD" ], [ - 173.41979241290323, - 20181031, + 21.359416562625452, + 20181028, + "Actual", "USD" ], [ - 20.359416562625452, - 20181031, + 22.545363672276512, + 20181029, + "Forecast", "USD" - ] + ], + [ + 23.41979241290323, + 20181030, + "Forecast", + "USD" + ], + [ + 24.359416562625452, + 20181031, + "Forecast", + "USD" + ] ] } } diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/DepartmentQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/DepartmentQuery.json index 65a77a3aaee2..57a9053bedd1 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/DepartmentQuery.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/DepartmentQuery.json @@ -72,15 +72,7 @@ { "name": "UsageDate", "type": "Number" - }, - { - "name": "ConfidenceLevelsLower", - "type": "String" - }, - { - "name": "ConfidenceLevelsUpper", - "type": "Number" - }, + }, { "name": "Currency", "type": "String" @@ -89,46 +81,19 @@ "rows": [ [ 19.545363672276512, - 20181031, - 0, - 0, + 20181031, "USD" ], [ 173.41979241290323, - 20181031, - 0, - 0, + 20181031, "USD" ], [ 20.359416562625452, - 20181031, - 0, - 0, + 20181031, "USD" - ], - [ - 19.545363672276512, - 20181231, - 9.4567, - 37.9876, - "USD" - ], - [ - 173.41979241290323, - 20181231, - 79.4567, - 437.9876, - "USD" - ], - [ - 20.359416562625452, - 20181231, - 10.24567, - 37.19876, - "USD" - ] + ] ] } } diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/DepartmentQueryForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/DepartmentQueryForecast.json deleted file mode 100644 index 5a3329776bba..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/DepartmentQueryForecast.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "parameters": { - "api-version": "2018-12-01-preview", - "billingAccountId": "70664866", - "departmentId": "123", - "parameters":{ - "type": "Forecast", - "timeframe": "Custom", - "timePeriod": { - "from": "2018-11-01T00:00:00.000Z", - "to": "2019-01-31T00:00:00.000Z" - }, - "dataset": { - "granularity": "Daily", - "filter":{ - "and": [ - { - "or":[ - { - "dimension": { - "name": "SubscriptionName", - "operator": "In", - "values": [ - "Azure Dev Subscription", - "Azure Prod Subscription", - "Azure PPE Subscription" - ] - } - }, - { - "tag": { - "name": "Environment", - "operator": "In", - "values": [ - "Dev", - "PPE", - "Prod" - ] - } - } - ] - }, - { - "dimension": { - "name": "AccountName", - "operator": "In", - "values": [ - "Azure Account" - ] - } - } - ] - } - } - } - }, - "responses": { - "200": { - "body": { - "value": [ - { - "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=2018-12-01-preview&$skiptoken=AQAAAA%3D%3D", - "columns": [ - { - "name": "UsageDate", - "type": "Number" - }, - { - "name": "ConfidenceLevelsLower", - "type": "String" - }, - { - "name": "ConfidenceLevelsUpper", - "type": "Number" - }, - { - "name": "Currency", - "type": "String" - } - ], - "rows": [ - [ - 20181131, - 9.4567, - 37.9876, - "USD" - ], - [ - 20181231, - 79.4567, - 437.9876, - "USD" - ], - [ - 20190131, - 10.24567, - 37.19876, - "USD" - ] - ] - } - } - ] - } - } - } -} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/DepartmentQueryGroupingUsage.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/DepartmentQueryGrouping.json similarity index 100% rename from specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/DepartmentQueryGroupingUsage.json rename to specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/DepartmentQueryGrouping.json diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/EnrollmentAccountQueryUsage.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/EnrollmentAccountForecast.json similarity index 64% rename from specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/EnrollmentAccountQueryUsage.json rename to specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/EnrollmentAccountForecast.json index 1dfc1ebdeff8..2857e80970b4 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/EnrollmentAccountQueryUsage.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/EnrollmentAccountForecast.json @@ -46,20 +46,24 @@ "body": { "value": [ { - "id": "providers/Microsoft.Billing/billingAccounts/70664866/enrollmentAccounts/456/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "id": "providers/Microsoft.Billing/billingAccounts/70664866/enrollmentAccounts/456/providers/Microsoft.CostManagement/Forecast/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", - "type": "microsoft.costmanagement/Query", + "type": "microsoft.costmanagement/Forecast", "properties": { - "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/enrollmentAccounts/456/providers/Microsoft.CostManagement/Query?api-version=2018-12-01-preview&$skiptoken=AQAAAA%3D%3D", + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/enrollmentAccounts/456/providers/Microsoft.CostManagement/Forecast?api-version=2018-12-01-preview&$skiptoken=AQAAAA%3D%3D", "columns": [ { "name": "PreTaxCost", "type": "Number" - }, + }, { "name": "UsageDate", "type": "Number" - }, + }, + { + "name": "CostStatus", + "type": "String" + }, { "name": "Currency", "type": "String" @@ -67,20 +71,41 @@ ], "rows": [ [ - 19.545363672276512, - 20180831, + 168.545323467227622, + 20180826, + "Actual", + "USD" + ], + [ + 169.41979241290344, + 20180927, + "Actual", + "USD" + ], + [ + 170.359416562338452, + 20181028, + "Actual", + "USD" + ], + [ + 172.545363234276512, + 20180829, + "Forecast", "USD" ], [ - 173.41979241290323, - 20180930, + 173.41979241290323, + 20180930, + "Forecast", "USD" ], [ - 20.359416562625452, - 20181031, + 174.359416562625452, + 20181031, + "Forecast", "USD" - ] + ] ] } } diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/EnrollmentAccountQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/EnrollmentAccountQuery.json index ae1e4c4caff1..1dfc1ebdeff8 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/EnrollmentAccountQuery.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/EnrollmentAccountQuery.json @@ -7,8 +7,8 @@ "type": "Usage", "timeframe": "Custom", "timePeriod": { - "from": "2018-10-01T00:00:00.000Z", - "to": "2018-12-31T00:00:00.000Z" + "from": "2018-08-01T00:00:00.000Z", + "to": "2018-10-31T00:00:00.000Z" }, "dataset": { "granularity": "Daily", @@ -55,19 +55,11 @@ { "name": "PreTaxCost", "type": "Number" - }, + }, { "name": "UsageDate", "type": "Number" - }, - { - "name": "ConfidenceLevelsLower", - "type": "String" - }, - { - "name": "ConfidenceLevelsUpper", - "type": "Number" - }, + }, { "name": "Currency", "type": "String" @@ -76,46 +68,19 @@ "rows": [ [ 19.545363672276512, - 20181031, - 0, - 0, - "USD" - ], - [ - 173.41979241290323, - 20181031, - 0, - 0, - "USD" - ], - [ - 20.359416562625452, - 20181031, - 0, - 0, - "USD" - ], - [ - 19.545363672276512, - 20181231, - 9.6776786, - 23.7889, + 20180831, "USD" ], [ 173.41979241290323, - 20181231, - 89.5679, - 389.566777, + 20180930, "USD" ], [ 20.359416562625452, - 20181231, - 11.26777655, - 43.64432, + 20181031, "USD" - ] + ] ] } } diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/EnrollmentAccountQueryForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/EnrollmentAccountQueryForecast.json deleted file mode 100644 index f10b007d89c3..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/EnrollmentAccountQueryForecast.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "parameters": { - "api-version": "2018-12-01-preview", - "billingAccountId": "70664866", - "enrollmentAccountId": "456", - "parameters":{ - "type": "Forecast", - "timeframe": "Custom", - "timePeriod": { - "from": "2018-10-01T00:00:00.000Z", - "to": "2018-12-31T00:00:00.000Z" - }, - "dataset": { - "granularity": "Daily", - "filter":{ - "or":[ - { - "dimension": { - "name": "SubscriptionName", - "operator": "In", - "values": [ - "Azure Dev Subscription", - "Azure Prod Subscription", - "Azure PPE Subscription" - ] - } - }, - { - "tag": { - "name": "Environment", - "operator": "In", - "values": [ - "Dev", - "PPE", - "Prod" - ] - } - } - ] - } - } - } - }, - "responses": { - "200": { - "body": { - "value": [ - { - "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=2018-12-01-preview&$skiptoken=AQAAAA%3D%3D", - "columns": [ - { - "name": "UsageDate", - "type": "Number" - }, - { - "name": "ConfidenceLevelsLower", - "type": "String" - }, - { - "name": "ConfidenceLevelsUpper", - "type": "Number" - }, - { - "name": "Currency", - "type": "String" - } - ], - "rows": [ - [ - 20181231, - 9.6776786, - 23.7889, - "USD" - ], - [ - 20181231, - 89.5679, - 389.566777, - "USD" - ], - [ - 20181231, - 11.26777655, - 43.64432, - "USD" - ] - ] - } - } - ] - } - } - } -} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/EnrollmentAccountQueryGroupingUsage.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/EnrollmentAccountQueryGrouping.json similarity index 100% rename from specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/EnrollmentAccountQueryGroupingUsage.json rename to specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/EnrollmentAccountQueryGrouping.json diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/ManagementGroupQueryUsage.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/ManagementGroupForecast.json similarity index 62% rename from specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/ManagementGroupQueryUsage.json rename to specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/ManagementGroupForecast.json index 605abffa2f5b..f29b980bf41e 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/ManagementGroupQueryUsage.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/ManagementGroupForecast.json @@ -45,20 +45,24 @@ "body": { "value": [ { - "id": "providers/Microsoft.Management/managementGroups/MyMgId/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "id": "providers/Microsoft.Management/managementGroups/MyMgId/providers/Microsoft.CostManagement/Forecast/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", - "type": "microsoft.costmanagement/Query", + "type": "microsoft.costmanagement/Forecast", "properties": { - "nextLink": "https://management.azure.com/providers/Microsoft.Management/managementGroups/MyMgId/providers/Microsoft.CostManagement/Query?api-version=2018-12-01-preview&$skiptoken=AQAAAA%3D%3D", + "nextLink": "https://management.azure.com/providers/Microsoft.Management/managementGroups/MyMgId/providers/Microsoft.CostManagement/Forecast?api-version=2018-12-01-preview&$skiptoken=AQAAAA%3D%3D", "columns": [ { "name": "PreTaxCost", "type": "Number" - }, + }, { "name": "UsageDate", "type": "Number" - }, + }, + { + "name": "CostStatus", + "type": "String" + }, { "name": "Currency", "type": "String" @@ -66,20 +70,41 @@ ], "rows": [ [ - 19.545363672276512, - 20181131, + 19.045363672276512, + 20190126, + "Actual", + "USD" + ], + [ + 19.41979241290323, + 20190127, + "Actual", + "USD" + ], + [ + 20.359416562625452, + 20190128, + "Actual", + "USD" + ], + [ + 19.045363672276512, + 20190129, + "Forecast", "USD" ], [ - 173.41979241290323, - 20181231, + 19.41979241290323, + 20190130, + "Forecast", "USD" ], [ - 20.359416562625452, - 20190131, + 20.359416562625452, + 20190131, + "Forecast", "USD" - ] + ] ] } } diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/ManagementGroupQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/ManagementGroupQuery.json index 4ef611a90d69..605abffa2f5b 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/ManagementGroupQuery.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/ManagementGroupQuery.json @@ -6,8 +6,8 @@ "type": "Usage", "timeframe": "Custom", "timePeriod": { - "from": "2018-10-01T00:00:00.000Z", - "to": "2018-12-31T00:00:00.000Z" + "from": "2018-11-01T00:00:00.000Z", + "to": "2019-01-31T00:00:00.000Z" }, "dataset": { "granularity": "Daily", @@ -58,15 +58,7 @@ { "name": "UsageDate", "type": "Number" - }, - { - "name": "ConfidenceLevelsLower", - "type": "String" - }, - { - "name": "ConfidenceLevelsUpper", - "type": "Number" - }, + }, { "name": "Currency", "type": "String" @@ -75,46 +67,19 @@ "rows": [ [ 19.545363672276512, - 20181031, - 0, - 0, + 20181131, "USD" ], [ 173.41979241290323, - 20181031, - 0, - 0, + 20181231, "USD" ], [ 20.359416562625452, - 20181031, - 0, - 0, + 20190131, "USD" - ], - [ - 19.545363672276512, - 20181231, - 9.4567, - 37.9876, - "USD" - ], - [ - 173.41979241290323, - 20181231, - 78.9887, - 316.87654, - "USD" - ], - [ - 20.359416562625452, - 20181231, - 10.4567, - 40.564433, - "USD" - ] + ] ] } } diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/ManagementGroupQueryForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/ManagementGroupQueryForecast.json deleted file mode 100644 index 38384eb0c2b3..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/ManagementGroupQueryForecast.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "parameters": { - "api-version": "2018-12-01-preview", - "managementGroupId": "MyMgId", - "parameters":{ - "type": "Forecast", - "timeframe": "Custom", - "timePeriod": { - "from": "2018-10-01T00:00:00.000Z", - "to": "2018-12-31T00:00:00.000Z" - }, - "dataset": { - "granularity": "Daily", - "filter":{ - "or":[ - { - "dimension": { - "name": "SubscriptionName", - "operator": "In", - "values": [ - "Azure Dev", - "Azure Prod", - "Azure PPE" - ] - } - }, - { - "tag": { - "name": "Environment", - "operator": "In", - "values": [ - "Dev", - "PPE", - "Prod" - ] - } - } - ] - } - } - } - }, - "responses": { - "200": { - "body": { - "value": [ - { - "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=2018-12-01-preview&$skiptoken=AQAAAA%3D%3D", - "columns": [ - { - "name": "UsageDate", - "type": "Number" - }, - { - "name": "ConfidenceLevelsLower", - "type": "String" - }, - { - "name": "ConfidenceLevelsUpper", - "type": "Number" - }, - { - "name": "Currency", - "type": "String" - } - ], - "rows": [ - [ - 20181231, - 9.4567, - 37.9876, - "USD" - ], - [ - 20181231, - 78.9887, - 316.87654, - "USD" - ], - [ - 20181231, - 10.4567, - 40.564433, - "USD" - ] - ] - } - } - ] - } - } - } -} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/ManagementGroupQueryGroupingUsage.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/ManagementGroupQueryGrouping.json similarity index 100% rename from specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/ManagementGroupQueryGroupingUsage.json rename to specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/ManagementGroupQueryGrouping.json diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/ResourceGroupQueryUsage.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/ResourceGroupForecast.json similarity index 76% rename from specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/ResourceGroupQueryUsage.json rename to specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/ResourceGroupForecast.json index ef7aefedfdfd..137391629751 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/ResourceGroupQueryUsage.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/ResourceGroupForecast.json @@ -53,20 +53,24 @@ "body": { "value": [ { - "id": "subscriptions/55312978-ba1b-415c-9304-c4b9c43c0481/resourcegroups/ScreenSharingTest-peer/providers/Microsoft.CostManagement/Query/9af9459d-441d-4055-9ed0-83d4c4a363fb", + "id": "subscriptions/55312978-ba1b-415c-9304-c4b9c43c0481/resourcegroups/ScreenSharingTest-peer/providers/Microsoft.CostManagement/Forecast/9af9459d-441d-4055-9ed0-83d4c4a363fb", "name": "9af9459d-441d-4055-9ed0-83d4c4a363fb", - "type": "microsoft.costmanagement/Query", + "type": "microsoft.costmanagement/Forecast", "properties": { "nextLink": null, "columns": [ { "name": "PreTaxCost", "type": "Number" - }, + }, { "name": "UsageDate", "type": "Number" }, + { + "name": "CostStatus", + "type": "String" + }, { "name": "Currency", "type": "String" @@ -74,13 +78,27 @@ ], "rows": [ [ - 2.10333307059661, + 19.10333307059661, 20180417, + "Actual", "USD" ], [ - 20.10333307059661, + 20.10333307059661, 20180418, + "Actual", + "USD" + ], + [ + 21.10333307059661, + 20180419, + "Forecast", + "USD" + ], + [ + 22.10333307059661, + 20180420, + "Forecast", "USD" ] ] diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/ResourceGroupQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/ResourceGroupQuery.json index 007a4cf7e265..ef7aefedfdfd 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/ResourceGroupQuery.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/ResourceGroupQuery.json @@ -4,12 +4,8 @@ "subscriptionId": "55312978-ba1b-415c-9304-c4b9c43c0481", "resourceGroupName": "ScreenSharingTest-peer", "parameters":{ - "type": "UsageAndForecast", - "timeframe": "Custom", - "timePeriod": { - "from": "2018-10-01T00:00:00.000Z", - "to": "2019-12-31T00:00:00.000Z" - }, + "type": "Usage", + "timeframe": "MonthToDate", "dataset": { "granularity": "Daily", "filter":{ @@ -71,14 +67,6 @@ "name": "UsageDate", "type": "Number" }, - { - "name": "ConfidenceLevelsLower", - "type": "String" - }, - { - "name": "ConfidenceLevelsUpper", - "type": "Number" - }, { "name": "Currency", "type": "String" @@ -88,29 +76,11 @@ [ 2.10333307059661, 20180417, - 0, - 0, "USD" ], [ 20.10333307059661, 20180418, - 0, - 0, - "USD" - ], - [ - 0, - 20190417, - 1.2087, - 4.35788, - "USD" - ], - [ - 0, - 20190418, - 10.44657, - 43.565767, "USD" ] ] diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/ResourceGroupQueryForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/ResourceGroupQueryForecast.json deleted file mode 100644 index 5497057f5b8a..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/ResourceGroupQueryForecast.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "parameters": { - "api-version": "2018-12-01-preview", - "subscriptionId": "55312978-ba1b-415c-9304-c4b9c43c0481", - "resourceGroupName": "ScreenSharingTest-peer", - "parameters":{ - "type": "Forecast", - "timeframe": "Custom", - "timePeriod": { - "from": "2019-10-01T00:00:00.000Z", - "to": "2019-12-31T00:00:00.000Z" - }, - "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": { - "value": [ - { - "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": "UsageDate", - "type": "Number" - }, - { - "name": "ConfidenceLevelsLower", - "type": "String" - }, - { - "name": "ConfidenceLevelsUpper", - "type": "Number" - }, - { - "name": "Currency", - "type": "String" - } - ], - "rows": [ - [ - 20190417, - 545.33555, - 1000.434344, - "USD" - ], - [ - 20190418, - 344.5677, - 789.7666, - "USD" - ] - ] - } - } - ] - } - } - } -} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/SubscriptionForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/SubscriptionForecast.json new file mode 100644 index 000000000000..5616d3b57ffb --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/SubscriptionForecast.json @@ -0,0 +1,124 @@ +{ + "parameters": { + "api-version": "2018-12-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "parameters":{ + "type": "Usage", + "timeframe": "Custom", + "timePeriod": { + "from": "2018-10-01T00:00:00.000Z", + "to": "2018-12-31T00:00:00.000Z" + }, + "dataset": { + "granularity": "Daily", + "filter":{ + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "Dev", + "PPE", + "Prod" + ] + } + } + } + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/Forecast/00000000-0000-0000-0000-000000000000", + "name": "55312978-ba1b-415c-9304-cfd9c43c0481", + "type": "microsoft.costmanagement/Forecast", + "properties": { + "nextLink": null, + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "CostStatus", + "type": "String" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 214.68795741935486, + 20181222, + "Actual", + "USD" + ], + [ + 215.68795741935486, + 20181223, + "Actual", + "USD" + ], + [ + 216.68795741935486, + 20181224, + "Actual", + "USD" + ], + [ + 217.68795741935486, + 20181225, + "Actual", + "USD" + ], + [ + 218.68795741935486, + 20181226, + "Actual", + "USD" + ], + [ + 219.143849143581657052, + 20181227, + "Actual", + "USD" + ], + [ + 220.143849143588766052, + 20181228, + "Forecast", + "USD" + ], + [ + 221.143433143588766052, + 20181229, + "Forecast", + "USD" + ], + [ + 222.143433555588766052, + 20181230, + "Forecast", + "USD" + ], + [ + 223.143433555588743252, + 20181231, + "Forecast", + "USD" + ] + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/SubscriptionQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/SubscriptionQuery.json index ac26dc88e042..6847e8584028 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/SubscriptionQuery.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/SubscriptionQuery.json @@ -3,7 +3,7 @@ "api-version": "2018-12-01-preview", "subscriptionId": "00000000-0000-0000-0000-000000000000", "parameters":{ - "type": "UsageAndForecast", + "type": "Usage", "timeframe": "Custom", "timePeriod": { "from": "2018-10-01T00:00:00.000Z", @@ -43,15 +43,7 @@ { "name": "UsageDate", "type": "Number" - }, - { - "name": "ConfidenceLevelsLower", - "type": "String" - }, - { - "name": "ConfidenceLevelsUpper", - "type": "Number" - }, + }, { "name": "Currency", "type": "String" @@ -60,46 +52,19 @@ "rows": [ [ 2.10333307059661, - 20181017, - 0, - 0, + 20181017, "USD" ], [ 218.68795741935486, - 20181018, - 0, - 0, + 20181018, "USD" ], [ 0.14384913581657052, - 20181019, - 0, - 0, - "USD" - ], - [ - 0, - 20181217, - 1.67777, - 5.9787, - "USD" - ], - [ - 0, - 20181218, - 102.78787, - 456.976554, - "USD" - ], - [ - 0, - 20181219, - 0.07233, - 0.287766, + 20181019, "USD" - ] + ] ] } } diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/SubscriptionQueryForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/SubscriptionQueryForecast.json deleted file mode 100644 index 9294ae12287f..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/SubscriptionQueryForecast.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "parameters": { - "api-version": "2018-12-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "parameters":{ - "type": "Forecast", - "timeframe": "Custom", - "timePeriod": { - "from": "2018-10-01T00:00:00.000Z", - "to": "2018-12-31T00:00:00.000Z" - }, - "dataset": { - "granularity": "Daily", - "filter":{ - "tag": { - "name": "Environment", - "operator": "In", - "values": [ - "Dev", - "PPE", - "Prod" - ] - } - } - } - } - }, - "responses": { - "200": { - "body": { - "value": [ - { - "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": "UsageDate", - "type": "Number" - }, - { - "name": "ConfidenceLevelsLower", - "type": "String" - }, - { - "name": "ConfidenceLevelsUpper", - "type": "Number" - }, - { - "name": "Currency", - "type": "String" - } - ], - "rows": [ - [ - 20181217, - 1.67777, - 5.9787, - "USD" - ], - [ - 20181218, - 102.78787, - 456.976554, - "USD" - ], - [ - 20181219, - 0.07233, - 0.287766, - "USD" - ] - ] - } - } - ] - } - } - } -} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/SubscriptionQueryUsage.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/SubscriptionQueryUsage.json deleted file mode 100644 index 6847e8584028..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/examples/SubscriptionQueryUsage.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "parameters": { - "api-version": "2018-12-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "parameters":{ - "type": "Usage", - "timeframe": "Custom", - "timePeriod": { - "from": "2018-10-01T00:00:00.000Z", - "to": "2018-12-31T00:00:00.000Z" - }, - "dataset": { - "granularity": "Daily", - "filter":{ - "tag": { - "name": "Environment", - "operator": "In", - "values": [ - "Dev", - "PPE", - "Prod" - ] - } - } - } - } - }, - "responses": { - "200": { - "body": { - "value": [ - { - "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": "UsageDate", - "type": "Number" - }, - { - "name": "Currency", - "type": "String" - } - ], - "rows": [ - [ - 2.10333307059661, - 20181017, - "USD" - ], - [ - 218.68795741935486, - 20181018, - "USD" - ], - [ - 0.14384913581657052, - 20181019, - "USD" - ] - ] - } - } - ] - } - } - } -} \ No newline at end of file From b8cf9929ebdfb86ad9dc833eb1920e0e7108f940 Mon Sep 17 00:00:00 2001 From: olrakovs Date: Wed, 5 Dec 2018 11:31:40 +0200 Subject: [PATCH 2/2] editing ReportConfigDefinition --- .../preview/2018-12-01-preview/costmanagement.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/costmanagement.json index f0d08a3877cb..8fbc74edd45d 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-12-01-preview/costmanagement.json @@ -1241,9 +1241,7 @@ "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", - "Forecast", - "UsageAndForecast" + "Usage" ], "x-ms-enum": { "name": "ReportType",