diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2019-11-01/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2019-11-01/costmanagement.json index bcdd8b1b3960..ec60e4649fdb 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2019-11-01/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2019-11-01/costmanagement.json @@ -260,6 +260,146 @@ } } }, + "/{scope}/providers/Microsoft.CostManagement/forecast": { + "post": { + "tags": [ + "Forecast" + ], + "operationId": "Forecast_List", + "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" + }, + "ExternalSubscriptionForecast": { + "$ref": "./examples/ExternalSubscriptionForecast.json" + }, + "ExternalresourceGroupForecast": { + "$ref": "./examples/ExternalBillingAccountForecast.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_ListExternal", + "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/query": { "post": { "tags": [ @@ -1037,6 +1177,60 @@ } } }, + "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": "ExportType", + "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": "TimeframeType", + "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": { @@ -1536,6 +1730,15 @@ "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", diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2019-11-01/examples/BillingAccountForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2019-11-01/examples/BillingAccountForecast.json new file mode 100644 index 000000000000..d967b7363ef9 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2019-11-01/examples/BillingAccountForecast.json @@ -0,0 +1,118 @@ +{ + "parameters": { + "api-version": "2019-11-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/Forecast/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" + ] + ] + } + } + } + } + } + \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2019-11-01/examples/BillingProfileForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2019-11-01/examples/BillingProfileForecast.json new file mode 100644 index 000000000000..127ba3254105 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2019-11-01/examples/BillingProfileForecast.json @@ -0,0 +1,119 @@ +{ + "parameters": { + "api-version": "2019-11-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/Forecast/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" + ] + ] + } + } + } + } + } + \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2019-11-01/examples/DepartmentForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2019-11-01/examples/DepartmentForecast.json new file mode 100644 index 000000000000..fe5df9c1c6e5 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2019-11-01/examples/DepartmentForecast.json @@ -0,0 +1,119 @@ +{ + "parameters": { + "api-version": "2019-11-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/Forecast/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" + ] + ] + } + } + } + } + } + \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2019-11-01/examples/EnrollmentAccountForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2019-11-01/examples/EnrollmentAccountForecast.json new file mode 100644 index 000000000000..bc523767df96 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2019-11-01/examples/EnrollmentAccountForecast.json @@ -0,0 +1,119 @@ +{ + "parameters": { + "api-version": "2019-11-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/Forecast/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" + ] + ] + } + } + } + } + } + \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2019-11-01/examples/ExternalBillingAccountForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2019-11-01/examples/ExternalBillingAccountForecast.json new file mode 100644 index 000000000000..28f78fad171f --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2019-11-01/examples/ExternalBillingAccountForecast.json @@ -0,0 +1,100 @@ +{ + "parameters": { + "api-version": "2019-11-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/forecast/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" + ] + ] + } + } + } + } + } + \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2019-11-01/examples/ExternalSubscriptionForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2019-11-01/examples/ExternalSubscriptionForecast.json new file mode 100644 index 000000000000..b5887d10300b --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2019-11-01/examples/ExternalSubscriptionForecast.json @@ -0,0 +1,83 @@ +{ + "parameters": { + "api-version": "2019-11-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/forecast/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": [] + } + } + } + } + } + \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2019-11-01/examples/InvoiceSectionForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2019-11-01/examples/InvoiceSectionForecast.json new file mode 100644 index 000000000000..2f054df7e53e --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2019-11-01/examples/InvoiceSectionForecast.json @@ -0,0 +1,120 @@ +{ + "parameters": { + "api-version": "2019-11-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/Forecast/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" + ] + ] + } + } + } + } + } + \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2019-11-01/examples/ResourceGroupForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2019-11-01/examples/ResourceGroupForecast.json new file mode 100644 index 000000000000..07b72ad22f6b --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2019-11-01/examples/ResourceGroupForecast.json @@ -0,0 +1,98 @@ +{ + "parameters": { + "api-version": "2019-11-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/Forecast/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" + ] + ] + } + } + } + } + } + \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2019-11-01/examples/SubscriptionForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2019-11-01/examples/SubscriptionForecast.json new file mode 100644 index 000000000000..80f2841b6c65 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2019-11-01/examples/SubscriptionForecast.json @@ -0,0 +1,117 @@ +{ + "parameters": { + "api-version": "2019-11-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/Forecast/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" + ] + ] + } + } + } + } +}