From e2fbb507006697fc60e7a7c70c5f54e0797c6f4a Mon Sep 17 00:00:00 2001 From: Shalin Ved Date: Thu, 31 May 2018 20:51:11 -0700 Subject: [PATCH 01/13] Consumption specifications for cost insights and reporting operations --- .../stable/2018-05-31/consumption.json | 1593 +++++++++++++++-- .../BillingAccountDimensionsList.json | 38 + ...lingAccountDimensionsListExpandAndTop.json | 52 + ...illingAccountDimensionsListWithFilter.json | 36 + .../examples/BillingAccountInsightList.json | 61 + .../2018-05-31/examples/ReportConfig.json | 91 + .../examples/ReportConfigCreateOrUpdate.json | 299 ++++ .../examples/ReportConfigDelete.json | 12 + .../2018-05-31/examples/ReportConfigList.json | 182 ++ .../examples/ResourceGroupDimensionsList.json | 49 + .../examples/ResourceGroupInsightList.json | 52 + .../examples/SubscriptionDimensionsList.json | 51 + .../examples/SubscriptionInsightList.json | 61 + 13 files changed, 2427 insertions(+), 150 deletions(-) create mode 100644 specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/BillingAccountDimensionsList.json create mode 100644 specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/BillingAccountDimensionsListExpandAndTop.json create mode 100644 specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/BillingAccountDimensionsListWithFilter.json create mode 100644 specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/BillingAccountInsightList.json create mode 100644 specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfig.json create mode 100644 specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfigCreateOrUpdate.json create mode 100644 specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfigDelete.json create mode 100644 specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfigList.json create mode 100644 specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ResourceGroupDimensionsList.json create mode 100644 specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ResourceGroupInsightList.json create mode 100644 specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/SubscriptionDimensionsList.json create mode 100644 specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/SubscriptionInsightList.json diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/consumption.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/consumption.json index e09560e3bec9..5de94b9abffe 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/consumption.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/consumption.json @@ -120,115 +120,1386 @@ "nextLinkName": "nextLink" } } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Consumption/reportconfigs": { + "get": { + "tags": [ + "Reports" + ], + "operationId": "ReportConfig_List", + "description": "Lists all report configs for a subscription.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "ReportConfigList": { + "$ref": "./examples/ReportConfigList.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ReportConfigListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Consumption/reportconfigs": { + "get": { + "tags": [ + "Reports" + ], + "operationId": "ReportConfig_ListByResourceGroupName", + "description": "Lists all report configs for a resource group under a subscription.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "ReportConfigList": { + "$ref": "./examples/ReportConfigList.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ReportConfigListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Consumption/reportconfigs/{reportConfigName}": { + "get": { + "tags": [ + "Reports" + ], + "operationId": "ReportConfig_Get", + "description": "Gets the report config for a subscription by report config name.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "Report": { + "$ref": "./examples/ReportConfig.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/reportConfigNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ReportConfig" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "tags": [ + "Reports" + ], + "operationId": "ReportConfig_CreateOrUpdate", + "description": "The operation to create or update a report config. Update operation requires latest eTag to be set in the request mandatorily. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "CreateOrUpdateReport": { + "$ref": "./examples/ReportConfigCreateOrUpdate.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/reportConfigNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ReportConfig" + }, + "description": "Parameters supplied to the CreateOrUpdate Report Config operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ReportConfig" + } + }, + "201": { + "description": "Created.", + "schema": { + "$ref": "#/definitions/ReportConfig" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "tags": [ + "Reports" + ], + "operationId": "ReportConfig_Delete", + "description": "The operation to delete a report.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "DeleteReport": { + "$ref": "e./examples/ReportConfigDelete.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/reportConfigNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Consumption/reportconfigs/{reportConfigName}": { + "get": { + "tags": [ + "Reports" + ], + "operationId": "ReportConfig_GetByResourceGroupName", + "description": "Gets the report config for a resource group under a subscription by report config name.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "ReportConfig": { + "$ref": "./examples/ReportConfig.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/reportConfigNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ReportConfig" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "tags": [ + "Reports" + ], + "operationId": "ReportConfig_CreateOrUpdateByResourceGroupName", + "description": "The operation to create or update a report config. Update operation requires latest eTag to be set in the request mandatorily. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "CreateOrUpdateReport": { + "$ref": "./examples/ReportConfigCreateOrUpdate.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/reportConfigNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ReportConfig" + }, + "description": "Parameters supplied to the CreateOrUpdate Report Config operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ReportConfig" + } + }, + "201": { + "description": "Created.", + "schema": { + "$ref": "#/definitions/ReportConfig" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "tags": [ + "Reports" + ], + "operationId": "ReportConfig_DeleteByResourceGroupName", + "description": "The operation to delete a report config.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "DeleteReport": { + "$ref": "./examples/ReportConfigDelete.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/reportConfigNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/dimensions": { + "get": { + "tags": [ + "Dimensions" + ], + "x-ms-odata": "#/definitions/Dimension", + "operationId": "BillingAccount_Dimensions_List", + "description": "Lists the dimensions by billingAccount Id.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "BillingAccountDimensionsList": { + "$ref": "./examples/BillingAccountDimensionsList.json" + }, + "BillingAccountDimensionsListExpandAndTop": { + "$ref": "./examples/BillingAccountDimensionsListExpandAndTop.json" + }, + "BillingAccountDimensionsListWithFilter": { + "$ref": "./examples/BillingAccountDimensionsListWithFilter.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountIdParameter" + }, + { + "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 dategory. 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 + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Consumption/dimensions": { + "get": { + "tags": [ + "Dimensions" + ], + "x-ms-odata": "#/definitions/Dimension", + "operationId": "Subscription_Dimensions_List", + "description": "Lists the dimensions by subscription Id.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "SubscriptionDimensionsList": { + "$ref": "./examples/SubscriptionDimensionsList.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "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 dategory. 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 + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Consumption/dimensions": { + "get": { + "tags": [ + "Dimensions" + ], + "x-ms-odata": "#/definitions/Dimension", + "operationId": "ResourceGroup_Dimensions_List", + "description": "Lists the dimensions by resource group Id.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "ResourceGroupDimensionsList": { + "$ref": "./examples/ResourceGroupDimensionsList.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "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 dategory. 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 + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Consumption/Insights": { + "post": { + "tags": [ + "Insights" + ], + "x-ms-odata": "#/definitions/Insight", + "operationId": "SubscriptionInsights_Post", + "description": "Lists the consumption data for subscriptionId.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "SubscriptionInsightsList": { + "$ref": "./examples/SubscriptionInsightList.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "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/InsightsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Consumption/Insights": { + "post": { + "tags": [ + "Insights" + ], + "x-ms-odata": "#/definitions/Insight", + "operationId": "ResourceGroupInsights_Post", + "description": "Lists the consumption data for subscriptionId and resource group.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "ResourceGroupInsightsList": { + "$ref": "./examples/ResourceGroupInsightList.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "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/InsightsListResult" + } + }, + "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.Consumption/insights": { + "post": { + "tags": [ + "Insights" + ], + "x-ms-odata": "#/definitions/Insight", + "operationId": "BillingAccountInsights_Post", + "description": "Lists the consumption data for billing account.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "BillingAccountInsightsList": { + "$ref": "./examples/BillingAccountInsightList.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$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/InsightsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } } }, "definitions": { "ErrorDetails": { "description": "The details of the error.", "properties": { - "code": { - "description": "Error code.", + "code": { + "description": "Error code.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "Error message indicating why the operation failed.", + "type": "string", + "readOnly": true + } + } + }, + "ErrorResponse": { + "description": "Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.", + "type": "object", + "properties": { + "error": { + "description": "The details of the error.", + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "Operation": { + "description": "A Consumption REST API operation.", + "type": "object", + "properties": { + "name": { + "description": "Operation name: {provider}/{resource}/{operation}.", + "type": "string", + "readOnly": true + }, + "display": { + "description": "The object that represents the operation.", + "properties": { + "provider": { + "description": "Service provider: Microsoft.Consumption.", + "type": "string", + "readOnly": true + }, + "resource": { + "description": "Resource on which the operation is performed: UsageDetail, etc.", + "type": "string", + "readOnly": true + }, + "operation": { + "description": "Operation type: Read, write, delete, etc.", + "type": "string", + "readOnly": true + } + } + } + } + }, + "OperationListResult": { + "description": "Result of listing consumption operations. It contains a list of operations and a URL link to get the next set of results.", + "properties": { + "value": { + "description": "List of consumption operations supported by the Microsoft.Consumption resource provider.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/Operation" + } + }, + "nextLink": { + "description": "URL to get the next set of operation list results if there are any.", + "type": "string", + "readOnly": true + } + } + }, + "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 + }, + "Forecast": { + "description": "A forecast resource.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ForecastProperties", + "title": "Forecast properties" + } + } + }, + "ForecastsListResult": { + "description": "Result of listing forecasts. It contains a list of available forecasts.", + "type": "object", + "properties": { + "value": { + "description": "The list of forecasts.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/Forecast" + } + } + } + }, + "ForecastProperties": { + "description": "The properties of the forecast charge.", + "type": "object", + "properties": { + "usageDate": { + "description": "The usage date of the forecast.", + "type": "string", + "readOnly": true + }, + "grain": { + "description": "The granularity of forecast.", + "type": "string", + "enum": [ + "Daily", + "Monthly", + "Yearly" + ], + "x-ms-enum": { + "name": "Grain", + "modelAsString": true + } + }, + "charge": { + "description": "The amount of charge", + "type": "number", + "format": "decimal", + "readOnly": true + }, + "currency": { + "description": "The ISO currency in which the meter is charged, for example, USD.", + "type": "string", + "readOnly": true + }, + "chargeType": { + "description": "The type of the charge. Could be actual or forecast", "type": "string", + "enum": [ + "Actual", + "Forecast" + ], + "x-ms-enum": { + "name": "ChargeType", + "modelAsString": true + } + }, + "confidenceLevels": { + "description": "The details about the forecast confidence levels. This is populated only when chargeType is Forecast.", + "type": "array", + "items": { + "type": "object", + "properties": { + "percentage": { + "description": "The percentage level of the confidence", + "type": "number", + "format": "decimal", + "readOnly": true + }, + "bound": { + "description": "The boundary of the percentage, values could be 'Upper' or 'Lower'", + "type": "string", + "enum": [ + "Upper", + "Lower" + ], + "x-ms-enum": { + "name": "Bound", + "modelAsString": true + } + }, + "value": { + "description": "The amount of forecast within the percentage level", + "type": "number", + "format": "decimal", + "readOnly": true + } + } + }, + "readOnly": true + } + } + }, + "ReportConfigListResult": { + "description": "Result of listing report configs. It contains a list of available report configurations in the scope provided.", + "properties": { + "value": { + "description": "The list of report configs.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/ReportConfig" + } + } + } + }, + "ReportConfig": { + "description": "A report config resource.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ReportConfigProperties", + "title": "Report config properties" + } + } + }, + "ReportConfigProperties": { + "description": "The properties of the report config.", + "properties": { + "schedule": { + "description": "Has schedule information for the report config.", + "$ref": "#/definitions/ReportConfigSchedule" + }, + "format": { + "description": "The format of the report being delivered.", + "type": "string", + "enum": [ + "Csv" + ], + "x-ms-enum": { + "name": "FormatType", + "modelAsString": true + } + }, + "deliveryInfo": { + "description": "Has delivery information for the report config.", + "$ref": "#/definitions/ReportConfigDeliveryInfo" + }, + "definition": { + "description": "Has definition for the report config.", + "$ref": "#/definitions/ReportConfigDefinition" + } + }, + "required": [ + "deliveryInfo", + "definition" + ] + }, + "ReportConfigSchedule": { + "description": "The schedule associated with a report config.", + "properties": { + "status": { + "description": "The status of the schedule. Whether active or not. If inactive, the report's scheduled execution 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/ReportConfigRecurrencePeriod" + } + }, + "required": [ + "recurrence", + "recurrencePeriod" + ] + }, + "ReportConfigDeliveryInfo": { + "description": "The delivery information associated with a report config.", + "properties": { + "destination": { + "description": "Has destination for the report being delivered.", + "$ref": "#/definitions/ReportConfigDeliveryDestination" + } + }, + "required": [ + "format", + "destination" + ] + }, + "ReportConfigDefinition":{ + "description": "The definition of a report config.", + "properties": { + "type": { + "description": "The type of the report.", + "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" + ] + }, + "ReportConfigRecurrencePeriod": { + "description": "The start and end date for recurrence schedule.", + "properties": { + "from": { + "description": "The start date of recurrence.", + "type": "string", + "format": "date-time" + }, + "to": { + "description": "The end date of recurrence. If not provided, we default this to 10 years from the start date.", + "type": "string", + "format": "date-time" + } + }, + "required": [ + "from" + ] + }, + "ReportConfigDeliveryDestination": { + "description": "The destination information for the delivery of the report.", + "properties": { + "subscriptionId": { + "description": "The subscription id of the storage account where reports will be delivered.", + "type": "string" + }, + "resourceGroup": { + "description": "The resource group of the storage account here reports will be delivered.", + "type": "string" + }, + "storageAccount": { + "description": "The storage account here reports will be delivered.", + "type": "string" + }, + "endpoint": { + "description": "The endpoint of the storage service where reports will be delivered.", + "type": "string" + }, + "container": { + "description": "The name of the container where reports will be uploaded.", + "type": "string" + }, + "category": { + "description": "The name of the directory where reports will be uploaded.", + "type": "string" + } + }, + "required": [ + "subscriptionId", + "resourceGroup", + "storageAccount", + "endpoint", + "container", + "category" + ] + }, + "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" + ], + "x-ms-enum": { + "name": "GranularityType", + "modelAsString": true + } }, - "message": { - "description": "Error message indicating why the operation failed.", - "type": "string", - "readOnly": 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 upto 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 upto 2 group by clauses.", + "type": "array", + "items": { + "$ref": "#/definitions/ReportConfigGrouping" + }, + "maxItems": 2 + }, + "filter": { + "type": "object", + "description": "Has filter expression to use in the report.", + "$ref": "#/definitions/ReportConfigFilter" } } }, - "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", + "ReportConfigDatasetConfiguration": { + "description": "The configuration of dataset in the report.", "properties": { - "error": { - "description": "The details of the error.", - "$ref": "#/definitions/ErrorDetails" + "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" + } } } }, - "Operation": { - "description": "A Consumption REST API operation.", - "type": "object", - "properties": { + "ReportConfigAggregation": { + "description": "The aggregation expression to be used in the report.", + "properties":{ "name": { - "description": "Operation name: {provider}/{resource}/{operation}.", - "type": "string", - "readOnly": true + "description": "The name of the column to aggregate.", + "type": "string" }, - "display": { - "description": "The object that represents the operation.", - "properties": { - "provider": { - "description": "Service provider: Microsoft.Consumption.", - "type": "string", - "readOnly": true - }, - "resource": { - "description": "Resource on which the operation is performed: UsageDetail, etc.", - "type": "string", - "readOnly": true - }, - "operation": { - "description": "Operation type: Read, write, delete, etc.", - "type": "string", - "readOnly": true - } + "function": { + "description": "The name of the aggregation function to use.", + "type": "string", + "enum": [ + "Sum" + ], + "x-ms-enum": { + "name": "FunctionType", + "modelAsString": true } } - } + }, + "required": [ + "name", + "function" + ] }, - "OperationListResult": { - "description": "Result of listing consumption operations. It contains a list of operations and a URL link to get the next set of results.", - "properties": { - "value": { - "description": "List of consumption operations supported by the Microsoft.Consumption resource provider.", + "ReportConfigGrouping": { + "description": "The group by expression to be used in the report.", + "properties":{ + "columnType": { + "description": "Has type of the column to group.", + "$ref": "#/definitions/ReportConfigColumnType" + }, + "name": { + "description": "The name of the column to group.", + "type": "string" + } + }, + "required": [ + "columnType", + "name" + ] + }, + "ReportConfigFilter": { + "description": "The filter expression to be used in the report.", + "properties": { + "and": { + "description": "The logical \"AND\" expression. Must have atleast 2 items.", "type": "array", - "readOnly": true, "items": { - "$ref": "#/definitions/Operation" - } + "$ref": "#/definitions/ReportConfigFilter" + }, + "minItems": 2 }, - "nextLink": { - "description": "URL to get the next set of operation list results if there are any.", - "type": "string", - "readOnly": true + "or": { + "description": "The logical \"OR\" expression. Must have atleast 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" } } }, - "Resource": { - "description": "The Resource model definition.", - "properties": { - "id": { - "readOnly": true, - "type": "string", - "description": "Resource Id." - }, + "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": { - "readOnly": true, - "type": "string", - "description": "Resource name." + "description": "The name of the column to use in comaprison.", + "type": "string" }, - "type": { - "readOnly": true, + "operator": { + "description": "The operator to use for comparison.", "type": "string", - "description": "Resource type." + "enum": [ + "In" + ], + "x-ms-enum": { + "name": "OperatorType", + "modelAsString": true + } }, - "tags": { - "readOnly": true, - "type": "object", - "additionalProperties": { + "values": { + "description": "Array of values to use for comparison", + "type": "array", + "items": { "type": "string" }, - "description": "Resource tags." + "minItems": 1 } }, - "x-ms-azure-resource": true + "required": [ + "name", + "operator", + "values" + ] }, - - "Forecast": { - "description": "A forecast resource.", + "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": [ { @@ -238,104 +1509,102 @@ "properties": { "properties": { "x-ms-client-flatten": true, - "$ref": "#/definitions/ForecastProperties", - "title": "Forecast properties" + "$ref": "#/definitions/DimensionProperties", + "title": "Dimension properties" } } }, - "ForecastsListResult": { - "description": "Result of listing forecasts. It contains a list of available forecasts.", + "DimensionProperties": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "string" + } + }, + "total": { + "format": "int32", + "type": "integer" + }, + "category": { + "type": "string" + }, + "usageStart": { + "format": "date-time", + "type": "string" + }, + "usageEnd": { + "format": "date-time", + "type": "string" + }, + "nextLink": { + "type": "string" + } + } + }, + "InsightsListResult": { + "description": "Result of listing insights. It contains all columns listed under groupings and aggregation.", "type": "object", "properties": { "value": { - "description": "The list of forecasts.", + "description": "The list of insights.", "type": "array", "readOnly": true, "items": { - "$ref": "#/definitions/Forecast" + "$ref": "#/definitions/Insight" } } } }, - "ForecastProperties": { - "description": "The properties of the forecast charge.", + "Insight": { "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], "properties": { - "usageDate": { - "description": "The usage date of the forecast.", - "type": "string", - "readOnly": true - }, - "grain": { - "description": "The granularity of forecast.", - "type": "string", - "enum": [ - "Daily", - "Monthly", - "Yearly" - ], - "x-ms-enum": { - "name": "Grain", - "modelAsString": true - } - }, - "charge": { - "description": "The amount of charge", - "type": "number", - "format": "decimal", - "readOnly": true - }, - "currency": { - "description": "The ISO currency in which the meter is charged, for example, USD.", - "type": "string", - "readOnly": true + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/InsightProperties", + "title": "Insight properties" + } + } + }, + "InsightProperties": { + "type": "object", + "properties": { + "nextLink": { + "type": "string" }, - "chargeType": { - "description": "The type of the charge. Could be actual or forecast", - "type": "string", - "enum": [ - "Actual", - "Forecast" - ], - "x-ms-enum": { - "name": "ChargeType", - "modelAsString": true + "columns": { + "description": "Array of columns", + "type": "array", + "items": { + "$ref": "#/definitions/InsightColumn" } }, - "confidenceLevels": { - "description": "The details about the forecast confidence levels. This is populated only when chargeType is Forecast.", + "rows": { "type": "array", "items": { - "type": "object", - "properties": { - "percentage": { - "description": "The percentage level of the confidence", - "type": "number", - "format": "decimal", - "readOnly": true - }, - "bound": { - "description": "The boundary of the percentage, values could be 'Upper' or 'Lower'", - "type": "string", - "enum": [ - "Upper", - "Lower" - ], - "x-ms-enum": { - "name": "Bound", - "modelAsString": true - } - }, - "value": { - "description": "The amount of forecast within the percentage level", - "type": "number", - "format": "decimal", - "readOnly": true - } + "type": "array", + "items": { + "type": "object", + "properties": {} } - }, - - "readOnly": true + } + } + } + }, + "InsightColumn":{ + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" } } } @@ -354,6 +1623,30 @@ "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" + }, + "reportConfigNameParameter": { + "name": "reportConfigName", + "in": "path", + "description": "Report Config 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" } } } diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/BillingAccountDimensionsList.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/BillingAccountDimensionsList.json new file mode 100644 index 000000000000..23a7b5d6e43a --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/BillingAccountDimensionsList.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "api-version": "2018-05-31", + "billingAccountId": "100" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/100/providers/microsoft.consumption/dimensions_ResourceGroup_2018-05-01_2018-05-31", + "name": "dimensions_ResourceGroup_2018-05-01_2018-05-31", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00" + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/100/providers/microsoft.consumption/dimensions_ResourceType_2018-05-01_2018-05-31", + "name": "dimensions_ResourceType_2018-05-01_2018-05-31", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [], + "total": 37, + "category": "ResourceType", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/BillingAccountDimensionsListExpandAndTop.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/BillingAccountDimensionsListExpandAndTop.json new file mode 100644 index 000000000000..87d9d31d7bc9 --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/BillingAccountDimensionsListExpandAndTop.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "api-version": "2018-05-31", + "billingAccountId": "100", + "$expand": "properties/data", + "$top": "5" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/100/providers/microsoft.consumption/dimensions_ResourceGroup_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceGroup_2018-05-01_2018-05-31_5", + "type": "microsoft.consumption/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" + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/100/providers/microsoft.consumption/dimensions_ResourceType_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceType_2018-05-01_2018-05-31_5", + "type": "microsoft.consumption/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" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/BillingAccountDimensionsListWithFilter.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/BillingAccountDimensionsListWithFilter.json new file mode 100644 index 000000000000..db8aab50eec2 --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/BillingAccountDimensionsListWithFilter.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "api-version": "2018-05-31", + "billingAccountId": "100", + "$expand": "properties/data", + "$top": "5", + "$filter": "properties/category eq 'instanceId'" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/100/providers/microsoft.consumption/dimensions_InstanceId_2018-05-01_2018-05-31_5", + "name": "dimensions_InstanceId_2018-05-01_2018-05-31_5", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [ + "/subscriptions/39ae8bea-c3fd-4e24-8936-7c34974326ce/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/urphealthaccount", + "/subscriptions/39ae8bea-c3fd-4e24-8936-7c34974326ce/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/39ae8bea-c3fd-4e24-8936-7c34974326ce/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": "InstanceId", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "nextLink": "http://management.azure.com/ccmapi/providers/Microsoft.Billing/billingAccounts/100/providers/Microsoft.Consumption/Dimensions?$filter=properties/category eq 'instanceId'&$top=5&api-version=2018-05-31&$expand=properties/data&$skiptoken=AQAAAA%3D%3D" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/BillingAccountInsightList.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/BillingAccountInsightList.json new file mode 100644 index 000000000000..0ba0a1a9f4b3 --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/BillingAccountInsightList.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "api-version": "2018-05-31", + "billingAccountId": "70664866" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/70664866/providers/Microsoft.Consumption/Insights/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "type": "microsoft.consumption/insights", + "location": null, + "sku": null, + "eTag": null, + "properties": { + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/providers/Microsoft.Consumption/insights?api-version=2018-05-31&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ResourceGroup", + "type": "String" + }, + { + "name": "UsageDate", + "type": "Number" + } + ], + "rows": [ + [ + 19.545363672276512, + "JapanUnifia-Trial", + 20180331 + ], + [ + 173.41979241290323, + "RVIIOT-TRIAL", + 20180331 + ], + [ + 20.359416562625452, + "VSTSHOL-1595322048000", + 20180331 + ], + [ + 0.16677720329728665, + "gs-stms-dev", + 20180331 + ] + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfig.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfig.json new file mode 100644 index 000000000000..6194cb2fa9ef --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfig.json @@ -0,0 +1,91 @@ +{ + "parameters": { + "api-version": "2018-05-31", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "MYDEVTESTRG", + "reportConfigName": "TestReportConfig" + }, + "responses": { + "200": { + "body": { + "id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/reportconfigs/TestReportConfig", + "name": "TestReportConfig", + "type": "Microsoft.Consumption/reportconfigs", + "eTag": "\"1d34d012214157f\"", + "properties": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "subscriptionId":"00000000-0000-0000-0000-000000000000", + "resourceGroup":"MYDEVTESTRG", + "storageAccount":"ccmeastusdiag182", + "endpoint": "https://ccmeastusdiag182.blob.core.windows.net/", + "container": "reports", + "category": "ad-hoc" + } + }, + "definition":{ + "type": "Usage", + "timeframe": "Custom", + "timePeriod": { + "from": "2018-06-01T00:00:00Z", + "to": "2018-10-31T00:00:00Z" + }, + "dataset": { + "granularity": "Daily", + "configuration": { + "columns": [ + "UsageDate", + "MeterId", + "InstanceId", + "ResourceLocation", + "UsageQuantity" + ] + }, + "aggregation": { + "usageSum": { + "name": "UsageQuantity", + "function": "Sum" + } + }, + "grouping": [ + { + "columnType": "Dimension", + "name": "SubscriptionName" + }, + { + "columnType": "Tag", + "name": "Environment" + } + ], + "filter":{ + "and": [ + { + "dimension": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "Contains", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfigCreateOrUpdate.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfigCreateOrUpdate.json new file mode 100644 index 000000000000..ea484ce27749 --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfigCreateOrUpdate.json @@ -0,0 +1,299 @@ +{ + "parameters": { + "api-version": "2018-05-31", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "MYDEVTESTRG", + "reportConfigName": "TestReportConfig", + "parameters": { + "eTag": "\"1d34d016a593709\"", + "properties": { + "schedule":{ + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from":"2018-06-01", + "to":"2018-10-31" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "subscriptionId":"00000000-0000-0000-0000-000000000000", + "resourceGroup":"MYDEVTESTRG", + "storageAccount":"ccmeastusdiag182", + "endpoint": "https://ccmeastusdiag182.blob.core.windows.net/", + "container": "reports", + "category": "ad-hoc" + } + }, + "definition":{ + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "InstanceId", + "ResourceLocation", + "PreTaxCost" + ] + }, + "aggregation": { + "costSum": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [ + { + "columnType": "Dimension", + "name": "SubscriptionName" + }, + { + "columnType": "Tag", + "name": "Environment" + } + ], + "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": { + "201": { + "body": { + "id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/reportconfigs/TestReportConfig", + "name": "TestReportConfig", + "type": "Microsoft.Consumption/reportconfigs", + "eTag": "\"1d34d012214157f\"", + "properties": { + "schedule":{ + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from":"2018-06-01", + "to":"2018-10-31" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "subscriptionId":"00000000-0000-0000-0000-000000000000", + "resourceGroup":"MYDEVTESTRG", + "storageAccount":"ccmeastusdiag182", + "endpoint": "https://ccmeastusdiag182.blob.core.windows.net/", + "container": "reports", + "category": "ad-hoc" + } + }, + "definition":{ + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "InstanceId", + "ResourceLocation", + "PreTaxCost" + ] + }, + "aggregation": { + "costSum": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [ + { + "columnType": "Dimension", + "name": "SubscriptionName" + }, + { + "columnType": "Tag", + "name": "Environment" + } + ], + "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" + ] + } + } + ] + } + } + } + } + } + }, + "200": { + "body": { + "id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/reportconfigs/TestReportConfig", + "name": "TestReportConfig", + "type": "Microsoft.Consumption/reportconfigs", + "eTag": "\"1d34d012214157f\"", + "properties": { + "schedule":{ + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from":"2018-06-01", + "to":"2018-10-31" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "subscriptionId":"00000000-0000-0000-0000-000000000000", + "resourceGroup":"MYDEVTESTRG", + "storageAccount":"ccmeastusdiag182", + "endpoint": "https://ccmeastusdiag182.blob.core.windows.net/", + "container": "reports", + "category": "ad-hoc" + } + }, + "definition":{ + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "InstanceId", + "ResourceLocation", + "PreTaxCost" + ] + }, + "aggregation": { + "costSum": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [ + { + "columnType": "Dimension", + "name": "SubscriptionName" + }, + { + "columnType": "Tag", + "name": "Environment" + } + ], + "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" + ] + } + } + ] + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfigDelete.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfigDelete.json new file mode 100644 index 000000000000..3b1065ad7c4e --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfigDelete.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "api-version": "2018-05-31", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "MYDEVTESTRG", + "reportName": "TestReport" + }, + "responses": { + "200": { + } + } +} \ No newline at end of file diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfigList.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfigList.json new file mode 100644 index 000000000000..e50c48cc1c46 --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfigList.json @@ -0,0 +1,182 @@ +{ + "parameters": { + "api-version": "2018-05-31", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "MYDEVTESTRG" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/reportconfigs/TestReportConfig1", + "name": "TestReportConfig1", + "type": "Microsoft.Consumption/reportconfigs", + "eTag": "\"1d34d012214157f\"", + "properties": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "subscriptionId":"00000000-0000-0000-0000-000000000000", + "resourceGroup":"MYDEVTESTRG", + "storageAccount":"ccmeastusdiag182", + "endpoint": "https://ccmeastusdiag182.blob.core.windows.net/", + "container": "reports", + "category": "ad-hoc" + } + }, + "definition":{ + "type": "Usage", + "timeframe": "Custom", + "timePeriod": { + "from": "2018-06-01T00:00:00Z", + "to": "2018-10-31T00:00:00Z" + }, + "dataset": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "InstanceId", + "ResourceLocation", + "PreTaxCost" + ] + }, + "aggregation": { + "costSum": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [ + { + "columnType": "Dimension", + "name": "SubscriptionName" + } + ], + "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" + ] + } + } + ] + } + } + } + } + }, + { + "id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/reportconfigs/TestReportConfig2", + "name": "TestReportConfig2", + "type": "Microsoft.Consumption/reportconfigs", + "eTag": "\"1d34d012214157f\"", + "properties": { + "schedule":{ + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from":"2018-06-01", + "to":"2018-10-31" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "subscriptionId":"00000000-0000-0000-0000-000000000000", + "resourceGroup":"MYDEVTESTRG", + "storageAccount":"ccmeastusdiag182", + "endpoint": "https://ccmeastusdiag182.blob.core.windows.net/", + "container": "reports", + "category": "ad-hoc" + } + }, + "definition":{ + "type": "Usage", + "timeframe": "WeekToDate", + "dataset": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "InstanceId", + "ResourceLocation", + "UsageQuantity" + ] + }, + "aggregation": { + "usageSum": { + "name": "UsageQuantity", + "function": "Sum" + } + }, + "grouping": [ + { + "columnType": "Tag", + "name": "Environment" + } + ], + "filter":{ + "and": [ + { + "dimension": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + } + } + } + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ResourceGroupDimensionsList.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ResourceGroupDimensionsList.json new file mode 100644 index 000000000000..6bd76a0a90b9 --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ResourceGroupDimensionsList.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "api-version": "2018-05-31", + "subscriptionId": "39ae8bea-c3fd-4e24-8936-7c34974326ce", + "resourceGroupName": "system.orlando", + "$expand": "properties/data", + "$top": "5" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/39ae8bea-c3fd-4e24-8936-7c34974326ce/resourceGroups/system.orlando/providers/microsoft.consumption/dimensions_ResourceType_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceType_2018-05-01_2018-05-31_5", + "type": "microsoft.consumption/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" + } + }, + { + "id": "subscriptions/39ae8bea-c3fd-4e24-8936-7c34974326ce/resourceGroups/system.orlando/providers/microsoft.consumption/dimensions_InstanceId_2018-05-01_2018-05-31_5", + "name": "dimensions_InstanceId_2018-05-01_2018-05-31_5", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [ + "/subscriptions/39ae8bea-c3fd-4e24-8936-7c34974326ce/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/authprod", + "/subscriptions/39ae8bea-c3fd-4e24-8936-7c34974326ce/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/systemevents", + "/subscriptions/39ae8bea-c3fd-4e24-8936-7c34974326ce/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/armadminprod", + "/subscriptions/39ae8bea-c3fd-4e24-8936-7c34974326ce/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/srphytenaccount", + "/subscriptions/39ae8bea-c3fd-4e24-8936-7c34974326ce/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/publicsystemportal" + ], + "total": 27, + "category": "InstanceId", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ResourceGroupInsightList.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ResourceGroupInsightList.json new file mode 100644 index 000000000000..5ae9de27528e --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ResourceGroupInsightList.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "api-version": "2018-05-31", + "subscriptionId": "55312978-ba1b-415c-9304-c4b9c43c0481", + "resourceGroup": "ScreenSharingTest-peer" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/55312978-ba1b-415c-9304-c4b9c43c0481/resourcegroups/ScreenSharingTest-peer/providers/Microsoft.Consumption/Insights/9af9459d-441d-4055-9ed0-83d4c4a363fb", + "name": "9af9459d-441d-4055-9ed0-83d4c4a363fb", + "type": "microsoft.consumption/insights", + "location": null, + "sku": null, + "eTag": null, + "properties": { + "nextLink": null, + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ResourceGroup", + "type": "String" + }, + { + "name": "UsageDate", + "type": "Number" + } + ], + "rows": [ + [ + 2.10333307059661, + "ScreenSharingTest-peer", + 20180417 + ], + [ + 20.10333307059661, + "ScreenSharingTest-peer", + 20180418 + ] + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/SubscriptionDimensionsList.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/SubscriptionDimensionsList.json new file mode 100644 index 000000000000..a1bf887e7aeb --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/SubscriptionDimensionsList.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "api-version": "2018-05-31", + "subscriptionId": "39ae8bea-c3fd-4e24-8936-7c34974326ce", + "$top": "5", + "$expand": "properties/data" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/39ae8bea-c3fd-4e24-8936-7c34974326ce/providers/Microsoft.Consumption/dimensions_ResourceGroup_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceGroup_2018-05-01_2018-05-31_5", + "type": "microsoft.consumption/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" + } + }, + { + "id": "subscriptions/39ae8bea-c3fd-4e24-8936-7c34974326ce/providers/Microsoft.Consumption/dimensions_ResourceType_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceType_2018-05-01_2018-05-31_5", + "type": "microsoft.consumption/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" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/SubscriptionInsightList.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/SubscriptionInsightList.json new file mode 100644 index 000000000000..0026078f81b6 --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/SubscriptionInsightList.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "api-version": "2018-05-31", + "subscriptionId": "55312978-ba1b-415c-9304-c6b9c43c0481" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/55312978-ba1b-415c-9304-c6b9c43c0481/providers/Microsoft.Consumption/Insights/55312978-ba1b-415c-9304-c6b9c43c0481", + "name": "55312978-ba1b-415c-9304-cfd9c43c0481", + "type": "microsoft.consumption/insights", + "location": null, + "sku": null, + "eTag": null, + "properties": { + "nextLink": null, + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ResourceGroup", + "type": "String" + }, + { + "name": "UsageDate", + "type": "Number" + } + ], + "rows": [ + [ + 2.10333307059661, + "ScreenSharingTest-peer", + 20180417 + ], + [ + 218.68795741935486, + "Ict_StratAndPlan_GoldSprova_Prod", + 20180331 + ], + [ + 0.14384913581657052, + "ssbciotelement01", + 20180331 + ], + [ + 0.009865586851323632, + "ict_stratandplan_goldsprova_prod", + 20180331 + ] + ] + } + } + ] + } + } + } +} \ No newline at end of file From dcb8e9845286079533c22068301894d45a95f03c Mon Sep 17 00:00:00 2001 From: Shalin Ved Date: Fri, 1 Jun 2018 10:21:20 -0700 Subject: [PATCH 02/13] Fixed $ref for ReportConfigDelete --- .../Microsoft.Consumption/stable/2018-05-31/consumption.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/consumption.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/consumption.json index 5de94b9abffe..e52aead19a18 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/consumption.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/consumption.json @@ -309,7 +309,7 @@ }, "x-ms-examples": { "DeleteReport": { - "$ref": "e./examples/ReportConfigDelete.json" + "$ref": "#/examples/ReportConfigDelete.json" } }, "parameters": [ From 4e8e15b929f65041c1e50b5c495fd88310aa6bc0 Mon Sep 17 00:00:00 2001 From: Shalin Ved Date: Fri, 1 Jun 2018 12:17:01 -0700 Subject: [PATCH 03/13] Silly me!! Fixed bad reference again --- .../Microsoft.Consumption/stable/2018-05-31/consumption.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/consumption.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/consumption.json index e52aead19a18..1075e5cfdf73 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/consumption.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/consumption.json @@ -309,7 +309,7 @@ }, "x-ms-examples": { "DeleteReport": { - "$ref": "#/examples/ReportConfigDelete.json" + "$ref": "./examples/ReportConfigDelete.json" } }, "parameters": [ From e70251779bef07947e0ae0edc53ab7cf1b69b304 Mon Sep 17 00:00:00 2001 From: Shalin Ved Date: Fri, 1 Jun 2018 13:39:50 -0700 Subject: [PATCH 04/13] Fixed schema validation issues --- .../stable/2018-05-31/consumption.json | 7 +++---- .../2018-05-31/examples/BillingAccountInsightList.json | 3 --- .../stable/2018-05-31/examples/ReportConfig.json | 1 - .../2018-05-31/examples/ReportConfigCreateOrUpdate.json | 3 --- .../stable/2018-05-31/examples/ReportConfigList.json | 2 -- .../2018-05-31/examples/ResourceGroupInsightList.json | 3 --- .../2018-05-31/examples/SubscriptionInsightList.json | 3 --- 7 files changed, 3 insertions(+), 19 deletions(-) diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/consumption.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/consumption.json index 1075e5cfdf73..92ebcced1b7c 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/consumption.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/consumption.json @@ -485,7 +485,7 @@ "Dimensions" ], "x-ms-odata": "#/definitions/Dimension", - "operationId": "BillingAccount_Dimensions_List", + "operationId": "BillingAccountDimensions_List", "description": "Lists the dimensions by billingAccount Id.", "externalDocs": { "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" @@ -564,7 +564,7 @@ "Dimensions" ], "x-ms-odata": "#/definitions/Dimension", - "operationId": "Subscription_Dimensions_List", + "operationId": "SubscriptionDimensions_List", "description": "Lists the dimensions by subscription Id.", "externalDocs": { "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" @@ -637,7 +637,7 @@ "Dimensions" ], "x-ms-odata": "#/definitions/Dimension", - "operationId": "ResourceGroup_Dimensions_List", + "operationId": "ResourceGroupDimensions_List", "description": "Lists the dimensions by resource group Id.", "externalDocs": { "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" @@ -1192,7 +1192,6 @@ } }, "required": [ - "format", "destination" ] }, diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/BillingAccountInsightList.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/BillingAccountInsightList.json index 0ba0a1a9f4b3..a68d1ac97c80 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/BillingAccountInsightList.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/BillingAccountInsightList.json @@ -11,9 +11,6 @@ "id": "providers/Microsoft.Billing/billingAccounts/70664866/providers/Microsoft.Consumption/Insights/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", "type": "microsoft.consumption/insights", - "location": null, - "sku": null, - "eTag": null, "properties": { "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/providers/Microsoft.Consumption/insights?api-version=2018-05-31&$skiptoken=AQAAAA%3D%3D", "columns": [ diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfig.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfig.json index 6194cb2fa9ef..c5e69b85375c 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfig.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfig.json @@ -11,7 +11,6 @@ "id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/reportconfigs/TestReportConfig", "name": "TestReportConfig", "type": "Microsoft.Consumption/reportconfigs", - "eTag": "\"1d34d012214157f\"", "properties": { "format": "Csv", "deliveryInfo": { diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfigCreateOrUpdate.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfigCreateOrUpdate.json index ea484ce27749..8ce5765a2452 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfigCreateOrUpdate.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfigCreateOrUpdate.json @@ -5,7 +5,6 @@ "resourceGroupName": "MYDEVTESTRG", "reportConfigName": "TestReportConfig", "parameters": { - "eTag": "\"1d34d016a593709\"", "properties": { "schedule":{ "status": "Active", @@ -104,7 +103,6 @@ "id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/reportconfigs/TestReportConfig", "name": "TestReportConfig", "type": "Microsoft.Consumption/reportconfigs", - "eTag": "\"1d34d012214157f\"", "properties": { "schedule":{ "status": "Active", @@ -202,7 +200,6 @@ "id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/reportconfigs/TestReportConfig", "name": "TestReportConfig", "type": "Microsoft.Consumption/reportconfigs", - "eTag": "\"1d34d012214157f\"", "properties": { "schedule":{ "status": "Active", diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfigList.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfigList.json index e50c48cc1c46..6424f0f0ae36 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfigList.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfigList.json @@ -12,7 +12,6 @@ "id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/reportconfigs/TestReportConfig1", "name": "TestReportConfig1", "type": "Microsoft.Consumption/reportconfigs", - "eTag": "\"1d34d012214157f\"", "properties": { "format": "Csv", "deliveryInfo": { @@ -100,7 +99,6 @@ "id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/reportconfigs/TestReportConfig2", "name": "TestReportConfig2", "type": "Microsoft.Consumption/reportconfigs", - "eTag": "\"1d34d012214157f\"", "properties": { "schedule":{ "status": "Active", diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ResourceGroupInsightList.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ResourceGroupInsightList.json index 5ae9de27528e..44a0ee38f900 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ResourceGroupInsightList.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ResourceGroupInsightList.json @@ -12,9 +12,6 @@ "id": "subscriptions/55312978-ba1b-415c-9304-c4b9c43c0481/resourcegroups/ScreenSharingTest-peer/providers/Microsoft.Consumption/Insights/9af9459d-441d-4055-9ed0-83d4c4a363fb", "name": "9af9459d-441d-4055-9ed0-83d4c4a363fb", "type": "microsoft.consumption/insights", - "location": null, - "sku": null, - "eTag": null, "properties": { "nextLink": null, "columns": [ diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/SubscriptionInsightList.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/SubscriptionInsightList.json index 0026078f81b6..10616d8dd970 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/SubscriptionInsightList.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/SubscriptionInsightList.json @@ -11,9 +11,6 @@ "id": "subscriptions/55312978-ba1b-415c-9304-c6b9c43c0481/providers/Microsoft.Consumption/Insights/55312978-ba1b-415c-9304-c6b9c43c0481", "name": "55312978-ba1b-415c-9304-cfd9c43c0481", "type": "microsoft.consumption/insights", - "location": null, - "sku": null, - "eTag": null, "properties": { "nextLink": null, "columns": [ From 4aaf2ca23d7a9374e5bfa95b1777336fd89a2673 Mon Sep 17 00:00:00 2001 From: Shalin Ved Date: Mon, 4 Jun 2018 11:10:50 -0700 Subject: [PATCH 05/13] Fixing validation errors around datetime and dynamic respones --- .../stable/2018-05-31/consumption.json | 5 +---- .../examples/ReportConfigCreateOrUpdate.json | 12 ++++++------ .../stable/2018-05-31/examples/ReportConfigList.json | 4 ++-- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/consumption.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/consumption.json index 92ebcced1b7c..f74252e9a8af 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/consumption.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/consumption.json @@ -1588,10 +1588,7 @@ "type": "array", "items": { "type": "array", - "items": { - "type": "object", - "properties": {} - } + "items": {} } } } diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfigCreateOrUpdate.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfigCreateOrUpdate.json index 8ce5765a2452..a58edcf77223 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfigCreateOrUpdate.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfigCreateOrUpdate.json @@ -10,8 +10,8 @@ "status": "Active", "recurrence": "Weekly", "recurrencePeriod": { - "from":"2018-06-01", - "to":"2018-10-31" + "from":"2018-06-01T00:00:00Z", + "to":"2018-10-31T00:00:00Z" } }, "format": "Csv", @@ -108,8 +108,8 @@ "status": "Active", "recurrence": "Weekly", "recurrencePeriod": { - "from":"2018-06-01", - "to":"2018-10-31" + "from":"2018-06-01T00:00:00Z", + "to":"2018-10-31T00:00:00Z" } }, "format": "Csv", @@ -205,8 +205,8 @@ "status": "Active", "recurrence": "Weekly", "recurrencePeriod": { - "from":"2018-06-01", - "to":"2018-10-31" + "from":"2018-06-01T00:00:00Z", + "to":"2018-10-31T00:00:00Z" } }, "format": "Csv", diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfigList.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfigList.json index 6424f0f0ae36..a98cbdb9470c 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfigList.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfigList.json @@ -104,8 +104,8 @@ "status": "Active", "recurrence": "Weekly", "recurrencePeriod": { - "from":"2018-06-01", - "to":"2018-10-31" + "from":"2018-06-01T00:00:00Z", + "to":"2018-10-31T00:00:00Z" } }, "format": "Csv", From b51ba78731f5b4efceddff8aba2901b51788874d Mon Sep 17 00:00:00 2001 From: Shalin Ved Date: Mon, 4 Jun 2018 13:05:36 -0700 Subject: [PATCH 06/13] Fixed parameters in examples --- .../examples/BillingAccountInsightList.json | 53 ++++++++++++++++++- .../examples/ReportConfigDelete.json | 2 +- .../examples/ResourceGroupInsightList.json | 53 ++++++++++++++++++- .../examples/SubscriptionInsightList.json | 53 ++++++++++++++++++- 4 files changed, 157 insertions(+), 4 deletions(-) diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/BillingAccountInsightList.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/BillingAccountInsightList.json index a68d1ac97c80..8ee85e5f785b 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/BillingAccountInsightList.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/BillingAccountInsightList.json @@ -1,7 +1,58 @@ { "parameters": { "api-version": "2018-05-31", - "billingAccountId": "70664866" + "billingAccountId": "70664866", + "parameters":{ + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "configuration": { + "columns": [ + "PreTaxCost", + "ResourceGroup", + "UsageDate" + ] + }, + "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": { diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfigDelete.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfigDelete.json index 3b1065ad7c4e..0a47186446a0 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfigDelete.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfigDelete.json @@ -3,7 +3,7 @@ "api-version": "2018-05-31", "subscriptionId": "00000000-0000-0000-0000-000000000000", "resourceGroupName": "MYDEVTESTRG", - "reportName": "TestReport" + "reportConfigName": "TestReport" }, "responses": { "200": { diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ResourceGroupInsightList.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ResourceGroupInsightList.json index 44a0ee38f900..6cc21ba9d1fc 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ResourceGroupInsightList.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ResourceGroupInsightList.json @@ -2,7 +2,58 @@ "parameters": { "api-version": "2018-05-31", "subscriptionId": "55312978-ba1b-415c-9304-c4b9c43c0481", - "resourceGroup": "ScreenSharingTest-peer" + "resourceGroup": "ScreenSharingTest-peer", + "parameters":{ + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "configuration": { + "columns": [ + "PreTaxCost", + "ResourceGroup", + "UsageDate" + ] + }, + "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": { diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/SubscriptionInsightList.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/SubscriptionInsightList.json index 10616d8dd970..3ed38135159a 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/SubscriptionInsightList.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/SubscriptionInsightList.json @@ -1,7 +1,58 @@ { "parameters": { "api-version": "2018-05-31", - "subscriptionId": "55312978-ba1b-415c-9304-c6b9c43c0481" + "subscriptionId": "55312978-ba1b-415c-9304-c6b9c43c0481", + "parameters":{ + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "configuration": { + "columns": [ + "PreTaxCost", + "ResourceGroup", + "UsageDate" + ] + }, + "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": { From 5b1ce953aab3605a2ae122c6bb0469b20c9b176a Mon Sep 17 00:00:00 2001 From: Shalin Ved Date: Mon, 4 Jun 2018 14:49:32 -0700 Subject: [PATCH 07/13] Fixed parameter name in example --- .../stable/2018-05-31/examples/ResourceGroupInsightList.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ResourceGroupInsightList.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ResourceGroupInsightList.json index 6cc21ba9d1fc..caaa17e9ab8b 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ResourceGroupInsightList.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ResourceGroupInsightList.json @@ -2,7 +2,7 @@ "parameters": { "api-version": "2018-05-31", "subscriptionId": "55312978-ba1b-415c-9304-c4b9c43c0481", - "resourceGroup": "ScreenSharingTest-peer", + "resourceGroupName": "ScreenSharingTest-peer", "parameters":{ "type": "Usage", "timeframe": "MonthToDate", From 1d5842324bcb1bfe92271adacb25ea0a144eab4c Mon Sep 17 00:00:00 2001 From: Shalin Ved Date: Tue, 5 Jun 2018 15:37:06 -0700 Subject: [PATCH 08/13] Removed x-ms-odata method for POST op --- .../Microsoft.Consumption/stable/2018-05-31/consumption.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/consumption.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/consumption.json index f74252e9a8af..546638bb44be 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/consumption.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/consumption.json @@ -712,7 +712,6 @@ "tags": [ "Insights" ], - "x-ms-odata": "#/definitions/Insight", "operationId": "SubscriptionInsights_Post", "description": "Lists the consumption data for subscriptionId.", "externalDocs": { @@ -764,7 +763,6 @@ "tags": [ "Insights" ], - "x-ms-odata": "#/definitions/Insight", "operationId": "ResourceGroupInsights_Post", "description": "Lists the consumption data for subscriptionId and resource group.", "externalDocs": { @@ -819,7 +817,6 @@ "tags": [ "Insights" ], - "x-ms-odata": "#/definitions/Insight", "operationId": "BillingAccountInsights_Post", "description": "Lists the consumption data for billing account.", "externalDocs": { From 03c3377bd9fc04deb0087aedf13214300e0cf97c Mon Sep 17 00:00:00 2001 From: Shalin Ved Date: Wed, 13 Jun 2018 11:48:50 -0700 Subject: [PATCH 09/13] Fixed ARM review comments --- .../stable/2018-05-31/consumption.json | 88 ++++++++----------- ...ightList.json => BillingAccountUsage.json} | 6 +- .../2018-05-31/examples/ReportConfig.json | 7 +- .../examples/ReportConfigCreateOrUpdate.json | 21 ++--- .../2018-05-31/examples/ReportConfigList.json | 14 +-- ...sightList.json => ResourceGroupUsage.json} | 4 +- ...nsightList.json => SubscriptionUsage.json} | 4 +- 7 files changed, 55 insertions(+), 89 deletions(-) rename specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/{BillingAccountInsightList.json => BillingAccountUsage.json} (92%) rename specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/{ResourceGroupInsightList.json => ResourceGroupUsage.json} (95%) rename specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/{SubscriptionInsightList.json => SubscriptionUsage.json} (94%) diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/consumption.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/consumption.json index 546638bb44be..090941e9e27c 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/consumption.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/consumption.json @@ -707,19 +707,19 @@ } } }, - "/subscriptions/{subscriptionId}/providers/Microsoft.Consumption/Insights": { + "/subscriptions/{subscriptionId}/providers/Microsoft.Consumption/AnalyzeUsage": { "post": { "tags": [ - "Insights" + "UsageAnalysis" ], - "operationId": "SubscriptionInsights_Post", - "description": "Lists the consumption data for subscriptionId.", + "operationId": "AnalyzeSubscriptionUsage", + "description": "Lists the usage data for subscriptionId.", "externalDocs": { "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" }, "x-ms-examples": { - "SubscriptionInsightsList": { - "$ref": "./examples/SubscriptionInsightList.json" + "SubscriptionUsage": { + "$ref": "./examples/SubscriptionUsage.json" } }, "parameters": [ @@ -743,7 +743,7 @@ "200": { "description": "OK. The request has succeeded.", "schema": { - "$ref": "#/definitions/InsightsListResult" + "$ref": "#/definitions/UsageAnalysisResult" } }, "default": { @@ -758,19 +758,19 @@ } } }, - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Consumption/Insights": { + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Consumption/AnalyzeUsage": { "post": { "tags": [ - "Insights" + "UsageAnalysis" ], - "operationId": "ResourceGroupInsights_Post", - "description": "Lists the consumption data for subscriptionId and resource group.", + "operationId": "AnalyzeResourceGroupUsage", + "description": "Lists the usage data for subscriptionId and resource group.", "externalDocs": { "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" }, "x-ms-examples": { - "ResourceGroupInsightsList": { - "$ref": "./examples/ResourceGroupInsightList.json" + "ResourceGroupUsage": { + "$ref": "./examples/ResourceGroupUsage.json" } }, "parameters": [ @@ -797,7 +797,7 @@ "200": { "description": "OK. The request has succeeded.", "schema": { - "$ref": "#/definitions/InsightsListResult" + "$ref": "#/definitions/UsageAnalysisResult" } }, "default": { @@ -812,19 +812,19 @@ } } }, - "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/insights": { + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/AnalyzeUsage": { "post": { "tags": [ - "Insights" + "UsageAnalysis" ], - "operationId": "BillingAccountInsights_Post", - "description": "Lists the consumption data for billing account.", + "operationId": "AnalyzeBillingAccountUsage", + "description": "Lists the usage data for billing account.", "externalDocs": { "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" }, "x-ms-examples": { - "BillingAccountInsightsList": { - "$ref": "./examples/BillingAccountInsightList.json" + "BillingAccountUsage": { + "$ref": "./examples/BillingAccountUsage.json" } }, "parameters": [ @@ -848,7 +848,7 @@ "200": { "description": "OK. The request has succeeded.", "schema": { - "$ref": "#/definitions/InsightsListResult" + "$ref": "#/definitions/UsageAnalysisResult" } }, "default": { @@ -1255,38 +1255,22 @@ "ReportConfigDeliveryDestination": { "description": "The destination information for the delivery of the report.", "properties": { - "subscriptionId": { - "description": "The subscription id of the storage account where reports will be delivered.", - "type": "string" - }, - "resourceGroup": { - "description": "The resource group of the storage account here reports will be delivered.", - "type": "string" - }, - "storageAccount": { - "description": "The storage account here reports will be delivered.", - "type": "string" - }, - "endpoint": { - "description": "The endpoint of the storage service where reports will be delivered.", + "resourceId": { + "description": "The resource id of the storage account where reports will be delivered.", "type": "string" }, "container": { "description": "The name of the container where reports will be uploaded.", "type": "string" }, - "category": { + "rootFolderPath": { "description": "The name of the directory where reports will be uploaded.", "type": "string" } }, "required": [ - "subscriptionId", - "resourceGroup", - "storageAccount", - "endpoint", - "container", - "category" + "resourceId", + "container" ] }, "ReportConfigTimePeriod": { @@ -1539,21 +1523,21 @@ } } }, - "InsightsListResult": { - "description": "Result of listing insights. It contains all columns listed under groupings and aggregation.", + "UsageAnalysisResult": { + "description": "Result of listing usages. It contains all columns listed under groupings and aggregation.", "type": "object", "properties": { "value": { - "description": "The list of insights.", + "description": "The list of usage data.", "type": "array", "readOnly": true, "items": { - "$ref": "#/definitions/Insight" + "$ref": "#/definitions/UsageAnalysis" } } } }, - "Insight": { + "UsageAnalysis": { "type": "object", "allOf": [ { @@ -1563,12 +1547,12 @@ "properties": { "properties": { "x-ms-client-flatten": true, - "$ref": "#/definitions/InsightProperties", - "title": "Insight properties" + "$ref": "#/definitions/UsageAnalysisProperties", + "title": "Usage analysis properties" } } }, - "InsightProperties": { + "UsageAnalysisProperties": { "type": "object", "properties": { "nextLink": { @@ -1578,7 +1562,7 @@ "description": "Array of columns", "type": "array", "items": { - "$ref": "#/definitions/InsightColumn" + "$ref": "#/definitions/UsageAnalysisColumn" } }, "rows": { @@ -1590,7 +1574,7 @@ } } }, - "InsightColumn":{ + "UsageAnalysisColumn":{ "type": "object", "properties": { "name": { diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/BillingAccountInsightList.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/BillingAccountUsage.json similarity index 92% rename from specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/BillingAccountInsightList.json rename to specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/BillingAccountUsage.json index 8ee85e5f785b..efe0eefcf05d 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/BillingAccountInsightList.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/BillingAccountUsage.json @@ -59,11 +59,11 @@ "body": { "value": [ { - "id": "providers/Microsoft.Billing/billingAccounts/70664866/providers/Microsoft.Consumption/Insights/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "id": "providers/Microsoft.Billing/billingAccounts/70664866/providers/Microsoft.Consumption/AnalyzeUsage/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", - "type": "microsoft.consumption/insights", + "type": "microsoft.consumption/AnalyzeUsage", "properties": { - "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/providers/Microsoft.Consumption/insights?api-version=2018-05-31&$skiptoken=AQAAAA%3D%3D", + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/providers/Microsoft.Consumption/AnalyzeUsage?api-version=2018-05-31&$skiptoken=AQAAAA%3D%3D", "columns": [ { "name": "PreTaxCost", diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfig.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfig.json index c5e69b85375c..4e247bd74fc9 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfig.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfig.json @@ -15,12 +15,9 @@ "format": "Csv", "deliveryInfo": { "destination": { - "subscriptionId":"00000000-0000-0000-0000-000000000000", - "resourceGroup":"MYDEVTESTRG", - "storageAccount":"ccmeastusdiag182", - "endpoint": "https://ccmeastusdiag182.blob.core.windows.net/", + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", "container": "reports", - "category": "ad-hoc" + "rootFolderPath": "ad-hoc" } }, "definition":{ diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfigCreateOrUpdate.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfigCreateOrUpdate.json index a58edcf77223..2125aa4fd520 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfigCreateOrUpdate.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfigCreateOrUpdate.json @@ -17,12 +17,9 @@ "format": "Csv", "deliveryInfo": { "destination": { - "subscriptionId":"00000000-0000-0000-0000-000000000000", - "resourceGroup":"MYDEVTESTRG", - "storageAccount":"ccmeastusdiag182", - "endpoint": "https://ccmeastusdiag182.blob.core.windows.net/", + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", "container": "reports", - "category": "ad-hoc" + "rootFolderPath": "ad-hoc" } }, "definition":{ @@ -115,12 +112,9 @@ "format": "Csv", "deliveryInfo": { "destination": { - "subscriptionId":"00000000-0000-0000-0000-000000000000", - "resourceGroup":"MYDEVTESTRG", - "storageAccount":"ccmeastusdiag182", - "endpoint": "https://ccmeastusdiag182.blob.core.windows.net/", + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", "container": "reports", - "category": "ad-hoc" + "rootFolderPath": "ad-hoc" } }, "definition":{ @@ -212,12 +206,9 @@ "format": "Csv", "deliveryInfo": { "destination": { - "subscriptionId":"00000000-0000-0000-0000-000000000000", - "resourceGroup":"MYDEVTESTRG", - "storageAccount":"ccmeastusdiag182", - "endpoint": "https://ccmeastusdiag182.blob.core.windows.net/", + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", "container": "reports", - "category": "ad-hoc" + "rootFolderPath": "ad-hoc" } }, "definition":{ diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfigList.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfigList.json index a98cbdb9470c..6988b522bdb3 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfigList.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfigList.json @@ -16,12 +16,9 @@ "format": "Csv", "deliveryInfo": { "destination": { - "subscriptionId":"00000000-0000-0000-0000-000000000000", - "resourceGroup":"MYDEVTESTRG", - "storageAccount":"ccmeastusdiag182", - "endpoint": "https://ccmeastusdiag182.blob.core.windows.net/", + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", "container": "reports", - "category": "ad-hoc" + "rootFolderPath": "ad-hoc" } }, "definition":{ @@ -111,12 +108,9 @@ "format": "Csv", "deliveryInfo": { "destination": { - "subscriptionId":"00000000-0000-0000-0000-000000000000", - "resourceGroup":"MYDEVTESTRG", - "storageAccount":"ccmeastusdiag182", - "endpoint": "https://ccmeastusdiag182.blob.core.windows.net/", + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", "container": "reports", - "category": "ad-hoc" + "rootFolderPath": "ad-hoc" } }, "definition":{ diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ResourceGroupInsightList.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ResourceGroupUsage.json similarity index 95% rename from specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ResourceGroupInsightList.json rename to specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ResourceGroupUsage.json index caaa17e9ab8b..ee432bd674a7 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ResourceGroupInsightList.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ResourceGroupUsage.json @@ -60,9 +60,9 @@ "body": { "value": [ { - "id": "subscriptions/55312978-ba1b-415c-9304-c4b9c43c0481/resourcegroups/ScreenSharingTest-peer/providers/Microsoft.Consumption/Insights/9af9459d-441d-4055-9ed0-83d4c4a363fb", + "id": "subscriptions/55312978-ba1b-415c-9304-c4b9c43c0481/resourcegroups/ScreenSharingTest-peer/providers/Microsoft.Consumption/AnalyzeUsage/9af9459d-441d-4055-9ed0-83d4c4a363fb", "name": "9af9459d-441d-4055-9ed0-83d4c4a363fb", - "type": "microsoft.consumption/insights", + "type": "microsoft.consumption/AnalyzeUsage", "properties": { "nextLink": null, "columns": [ diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/SubscriptionInsightList.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/SubscriptionUsage.json similarity index 94% rename from specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/SubscriptionInsightList.json rename to specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/SubscriptionUsage.json index 3ed38135159a..4a953f3a8a84 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/SubscriptionInsightList.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/SubscriptionUsage.json @@ -59,9 +59,9 @@ "body": { "value": [ { - "id": "subscriptions/55312978-ba1b-415c-9304-c6b9c43c0481/providers/Microsoft.Consumption/Insights/55312978-ba1b-415c-9304-c6b9c43c0481", + "id": "subscriptions/55312978-ba1b-415c-9304-c6b9c43c0481/providers/Microsoft.Consumption/AnalyzeUsage/55312978-ba1b-415c-9304-c6b9c43c0481", "name": "55312978-ba1b-415c-9304-cfd9c43c0481", - "type": "microsoft.consumption/insights", + "type": "microsoft.consumption/AnalyzeUsage", "properties": { "nextLink": null, "columns": [ From 94373fe87f31853926094aea443669abebd24bd8 Mon Sep 17 00:00:00 2001 From: Shalin Ved Date: Fri, 15 Jun 2018 15:02:30 -0700 Subject: [PATCH 10/13] Moved reports and usage analysis from microsoft.consumption to microsoft.costmanagament --- .../stable/2018-05-31/consumption.json | 1473 ++--------------- .../stable/2018-05-31/costmanagement.json | 1380 +++++++++++++++ .../BillingAccountDimensionsList.json | 0 ...lingAccountDimensionsListExpandAndTop.json | 0 ...illingAccountDimensionsListWithFilter.json | 0 .../examples/BillingAccountQuery.json} | 6 +- .../2018-05-31/examples/ReportConfig.json | 0 .../examples/ReportConfigCreateOrUpdate.json | 0 .../examples/ReportConfigDelete.json | 0 .../2018-05-31/examples/ReportConfigList.json | 0 .../examples/ResourceGroupDimensionsList.json | 0 .../examples/ResourceGroupQuery.json} | 4 +- .../examples/SubscriptionDimensionsList.json | 0 .../examples/SubscriptionQuery.json} | 4 +- 14 files changed, 1492 insertions(+), 1375 deletions(-) create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/costmanagement.json rename specification/{consumption/resource-manager/Microsoft.Consumption => cost-management/resource-manager/Microsoft.CostManagement}/stable/2018-05-31/examples/BillingAccountDimensionsList.json (100%) rename specification/{consumption/resource-manager/Microsoft.Consumption => cost-management/resource-manager/Microsoft.CostManagement}/stable/2018-05-31/examples/BillingAccountDimensionsListExpandAndTop.json (100%) rename specification/{consumption/resource-manager/Microsoft.Consumption => cost-management/resource-manager/Microsoft.CostManagement}/stable/2018-05-31/examples/BillingAccountDimensionsListWithFilter.json (100%) rename specification/{consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/BillingAccountUsage.json => cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/BillingAccountQuery.json} (92%) rename specification/{consumption/resource-manager/Microsoft.Consumption => cost-management/resource-manager/Microsoft.CostManagement}/stable/2018-05-31/examples/ReportConfig.json (100%) rename specification/{consumption/resource-manager/Microsoft.Consumption => cost-management/resource-manager/Microsoft.CostManagement}/stable/2018-05-31/examples/ReportConfigCreateOrUpdate.json (100%) rename specification/{consumption/resource-manager/Microsoft.Consumption => cost-management/resource-manager/Microsoft.CostManagement}/stable/2018-05-31/examples/ReportConfigDelete.json (100%) rename specification/{consumption/resource-manager/Microsoft.Consumption => cost-management/resource-manager/Microsoft.CostManagement}/stable/2018-05-31/examples/ReportConfigList.json (100%) rename specification/{consumption/resource-manager/Microsoft.Consumption => cost-management/resource-manager/Microsoft.CostManagement}/stable/2018-05-31/examples/ResourceGroupDimensionsList.json (100%) rename specification/{consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ResourceGroupUsage.json => cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/ResourceGroupQuery.json} (95%) rename specification/{consumption/resource-manager/Microsoft.Consumption => cost-management/resource-manager/Microsoft.CostManagement}/stable/2018-05-31/examples/SubscriptionDimensionsList.json (100%) rename specification/{consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/SubscriptionUsage.json => cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/SubscriptionQuery.json} (94%) diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/consumption.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/consumption.json index bb438a777076..bdf310dff7d2 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/consumption.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/consumption.json @@ -946,748 +946,6 @@ "nextLinkName": "nextLink" } } - }, - "/subscriptions/{subscriptionId}/providers/Microsoft.Consumption/reportconfigs": { - "get": { - "tags": [ - "Reports" - ], - "operationId": "ReportConfig_List", - "description": "Lists all report configs for a subscription.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" - }, - "x-ms-examples": { - "ReportConfigList": { - "$ref": "./examples/ReportConfigList.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/apiVersionParameter" - }, - { - "$ref": "#/parameters/subscriptionIdParameter" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/ReportConfigListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Consumption/reportconfigs": { - "get": { - "tags": [ - "Reports" - ], - "operationId": "ReportConfig_ListByResourceGroupName", - "description": "Lists all report configs for a resource group under a subscription.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" - }, - "x-ms-examples": { - "ReportConfigList": { - "$ref": "./examples/ReportConfigList.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/apiVersionParameter" - }, - { - "$ref": "#/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/parameters/resourceGroupNameParameter" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/ReportConfigListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/subscriptions/{subscriptionId}/providers/Microsoft.Consumption/reportconfigs/{reportConfigName}": { - "get": { - "tags": [ - "Reports" - ], - "operationId": "ReportConfig_Get", - "description": "Gets the report config for a subscription by report config name.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" - }, - "x-ms-examples": { - "Report": { - "$ref": "./examples/ReportConfig.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/apiVersionParameter" - }, - { - "$ref": "#/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/parameters/reportConfigNameParameter" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/ReportConfig" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - }, - "put": { - "tags": [ - "Reports" - ], - "operationId": "ReportConfig_CreateOrUpdate", - "description": "The operation to create or update a report config. Update operation requires latest eTag to be set in the request mandatorily. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" - }, - "x-ms-examples": { - "CreateOrUpdateReport": { - "$ref": "./examples/ReportConfigCreateOrUpdate.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/apiVersionParameter" - }, - { - "$ref": "#/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/parameters/reportConfigNameParameter" - }, - { - "name": "parameters", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/ReportConfig" - }, - "description": "Parameters supplied to the CreateOrUpdate Report Config operation." - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/ReportConfig" - } - }, - "201": { - "description": "Created.", - "schema": { - "$ref": "#/definitions/ReportConfig" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - }, - "delete": { - "tags": [ - "Reports" - ], - "operationId": "ReportConfig_Delete", - "description": "The operation to delete a report.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" - }, - "x-ms-examples": { - "DeleteReport": { - "$ref": "./examples/ReportConfigDelete.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/apiVersionParameter" - }, - { - "$ref": "#/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/parameters/reportConfigNameParameter" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded." - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Consumption/reportconfigs/{reportConfigName}": { - "get": { - "tags": [ - "Reports" - ], - "operationId": "ReportConfig_GetByResourceGroupName", - "description": "Gets the report config for a resource group under a subscription by report config name.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" - }, - "x-ms-examples": { - "ReportConfig": { - "$ref": "./examples/ReportConfig.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/apiVersionParameter" - }, - { - "$ref": "#/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/parameters/reportConfigNameParameter" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/ReportConfig" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - }, - "put": { - "tags": [ - "Reports" - ], - "operationId": "ReportConfig_CreateOrUpdateByResourceGroupName", - "description": "The operation to create or update a report config. Update operation requires latest eTag to be set in the request mandatorily. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" - }, - "x-ms-examples": { - "CreateOrUpdateReport": { - "$ref": "./examples/ReportConfigCreateOrUpdate.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/apiVersionParameter" - }, - { - "$ref": "#/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/parameters/reportConfigNameParameter" - }, - { - "name": "parameters", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/ReportConfig" - }, - "description": "Parameters supplied to the CreateOrUpdate Report Config operation." - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/ReportConfig" - } - }, - "201": { - "description": "Created.", - "schema": { - "$ref": "#/definitions/ReportConfig" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - }, - "delete": { - "tags": [ - "Reports" - ], - "operationId": "ReportConfig_DeleteByResourceGroupName", - "description": "The operation to delete a report config.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" - }, - "x-ms-examples": { - "DeleteReport": { - "$ref": "./examples/ReportConfigDelete.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/apiVersionParameter" - }, - { - "$ref": "#/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/parameters/reportConfigNameParameter" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded." - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/dimensions": { - "get": { - "tags": [ - "Dimensions" - ], - "x-ms-odata": "#/definitions/Dimension", - "operationId": "BillingAccountDimensions_List", - "description": "Lists the dimensions by billingAccount Id.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" - }, - "x-ms-examples": { - "BillingAccountDimensionsList": { - "$ref": "./examples/BillingAccountDimensionsList.json" - }, - "BillingAccountDimensionsListExpandAndTop": { - "$ref": "./examples/BillingAccountDimensionsListExpandAndTop.json" - }, - "BillingAccountDimensionsListWithFilter": { - "$ref": "./examples/BillingAccountDimensionsListWithFilter.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/apiVersionParameter" - }, - { - "$ref": "#/parameters/billingAccountIdParameter" - }, - { - "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 dategory. 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 - } - } - }, - "/subscriptions/{subscriptionId}/providers/Microsoft.Consumption/dimensions": { - "get": { - "tags": [ - "Dimensions" - ], - "x-ms-odata": "#/definitions/Dimension", - "operationId": "SubscriptionDimensions_List", - "description": "Lists the dimensions by subscription Id.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" - }, - "x-ms-examples": { - "SubscriptionDimensionsList": { - "$ref": "./examples/SubscriptionDimensionsList.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/apiVersionParameter" - }, - { - "$ref": "#/parameters/subscriptionIdParameter" - }, - { - "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 dategory. 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 - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Consumption/dimensions": { - "get": { - "tags": [ - "Dimensions" - ], - "x-ms-odata": "#/definitions/Dimension", - "operationId": "ResourceGroupDimensions_List", - "description": "Lists the dimensions by resource group Id.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" - }, - "x-ms-examples": { - "ResourceGroupDimensionsList": { - "$ref": "./examples/ResourceGroupDimensionsList.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/apiVersionParameter" - }, - { - "$ref": "#/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/parameters/resourceGroupNameParameter" - }, - { - "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 dategory. 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 - } - } - }, - "/subscriptions/{subscriptionId}/providers/Microsoft.Consumption/AnalyzeUsage": { - "post": { - "tags": [ - "UsageAnalysis" - ], - "operationId": "AnalyzeSubscriptionUsage", - "description": "Lists the usage data for subscriptionId.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" - }, - "x-ms-examples": { - "SubscriptionUsage": { - "$ref": "./examples/SubscriptionUsage.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/apiVersionParameter" - }, - { - "$ref": "#/parameters/subscriptionIdParameter" - }, - { - "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/UsageAnalysisResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - }, - "x-ms-pageable": { - "nextLinkName": null - } - } - }, - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Consumption/AnalyzeUsage": { - "post": { - "tags": [ - "UsageAnalysis" - ], - "operationId": "AnalyzeResourceGroupUsage", - "description": "Lists the usage data for subscriptionId and resource group.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" - }, - "x-ms-examples": { - "ResourceGroupUsage": { - "$ref": "./examples/ResourceGroupUsage.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/apiVersionParameter" - }, - { - "$ref": "#/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/parameters/resourceGroupNameParameter" - }, - { - "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/UsageAnalysisResult" - } - }, - "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.Consumption/AnalyzeUsage": { - "post": { - "tags": [ - "UsageAnalysis" - ], - "operationId": "AnalyzeBillingAccountUsage", - "description": "Lists the usage data for billing account.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" - }, - "x-ms-examples": { - "BillingAccountUsage": { - "$ref": "./examples/BillingAccountUsage.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/apiVersionParameter" - }, - { - "$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/UsageAnalysisResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - }, - "x-ms-pageable": { - "nextLinkName": null - } - } } }, "definitions": { @@ -2063,656 +1321,151 @@ "type": "string", "readOnly": true }, - "accountName": { - "description": "Account name.", - "type": "string", - "readOnly": true - }, - "departmentName": { - "description": "Department name.", - "type": "string", - "readOnly": true - }, - "product": { - "description": "Product name.", - "type": "string", - "readOnly": true - }, - "consumedService": { - "description": "Consumed service name.", - "type": "string", - "readOnly": true - }, - "costCenter": { - "description": "The cost center of this department if it is a department and a costcenter exists", - "type": "string", - "readOnly": true - }, - "partNumber": { - "description": "Part Number", - "type": "string", - "readOnly": true - }, - "resourceGuid": { - "description": "Resource Guid", - "type": "string", - "readOnly": true - }, - "offerId": { - "description": "Offer Id", - "type": "string", - "readOnly": true - }, - "chargesBilledSeparately": { - "description": "Charges billed separately", - "type": "boolean", - "readOnly": true - }, - "additionalProperties": { - "description": "Additional details of this usage item. By default this is not populated, unless it's specified in $expand.", - "type": "string", - "readOnly": true - } - } - }, - "ForecastsListResult": { - "description": "Result of listing forecasts. It contains a list of available forecasts.", - "type": "object", - "properties": { - "value": { - "description": "The list of forecasts.", - "type": "array", - "readOnly": true, - "items": { - "$ref": "#/definitions/Forecast" - } - } - } - }, - "ForecastProperties": { - "description": "The properties of the forecast charge.", - "type": "object", - "properties": { - "usageDate": { - "description": "The usage date of the forecast.", - "type": "string", - "readOnly": true - }, - "grain": { - "description": "The granularity of forecast.", - "type": "string", - "enum": [ - "Daily", - "Monthly", - "Yearly" - ], - "x-ms-enum": { - "name": "Grain", - "modelAsString": true - } - }, - "charge": { - "description": "The amount of charge", - "type": "number", - "format": "decimal", - "readOnly": true - }, - "currency": { - "description": "The ISO currency in which the meter is charged, for example, USD.", - "type": "string", - "readOnly": true - }, - "chargeType": { - "description": "The type of the charge. Could be actual or forecast", - "type": "string", - "enum": [ - "Actual", - "Forecast" - ], - "x-ms-enum": { - "name": "ChargeType", - "modelAsString": true - } - }, - "confidenceLevels": { - "description": "The details about the forecast confidence levels. This is populated only when chargeType is Forecast.", - "type": "array", - "items": { - "type": "object", - "properties": { - "percentage": { - "description": "The percentage level of the confidence", - "type": "number", - "format": "decimal", - "readOnly": true - }, - "bound": { - "description": "The boundary of the percentage, values could be 'Upper' or 'Lower'", - "type": "string", - "enum": [ - "Upper", - "Lower" - ], - "x-ms-enum": { - "name": "Bound", - "modelAsString": true - } - }, - "value": { - "description": "The amount of forecast within the percentage level", - "type": "number", - "format": "decimal", - "readOnly": true - } - } - }, - - "readOnly": true - } - } - }, - "ReportConfigListResult": { - "description": "Result of listing report configs. It contains a list of available report configurations in the scope provided.", - "properties": { - "value": { - "description": "The list of report configs.", - "type": "array", - "readOnly": true, - "items": { - "$ref": "#/definitions/ReportConfig" - } - } - } - }, - "ReportConfig": { - "description": "A report config resource.", - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/Resource" - } - ], - "properties": { - "properties": { - "x-ms-client-flatten": true, - "$ref": "#/definitions/ReportConfigProperties", - "title": "Report config properties" - } - } - }, - "ReportConfigProperties": { - "description": "The properties of the report config.", - "properties": { - "schedule": { - "description": "Has schedule information for the report config.", - "$ref": "#/definitions/ReportConfigSchedule" - }, - "format": { - "description": "The format of the report being delivered.", - "type": "string", - "enum": [ - "Csv" - ], - "x-ms-enum": { - "name": "FormatType", - "modelAsString": true - } - }, - "deliveryInfo": { - "description": "Has delivery information for the report config.", - "$ref": "#/definitions/ReportConfigDeliveryInfo" - }, - "definition": { - "description": "Has definition for the report config.", - "$ref": "#/definitions/ReportConfigDefinition" - } - }, - "required": [ - "deliveryInfo", - "definition" - ] - }, - "ReportConfigSchedule": { - "description": "The schedule associated with a report config.", - "properties": { - "status": { - "description": "The status of the schedule. Whether active or not. If inactive, the report's scheduled execution 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/ReportConfigRecurrencePeriod" - } - }, - "required": [ - "recurrence", - "recurrencePeriod" - ] - }, - "ReportConfigDeliveryInfo": { - "description": "The delivery information associated with a report config.", - "properties": { - "destination": { - "description": "Has destination for the report being delivered.", - "$ref": "#/definitions/ReportConfigDeliveryDestination" - } - }, - "required": [ - "destination" - ] - }, - "ReportConfigDefinition":{ - "description": "The definition of a report config.", - "properties": { - "type": { - "description": "The type of the report.", - "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" - ] - }, - "ReportConfigRecurrencePeriod": { - "description": "The start and end date for recurrence schedule.", - "properties": { - "from": { - "description": "The start date of recurrence.", + "accountName": { + "description": "Account name.", "type": "string", - "format": "date-time" + "readOnly": true }, - "to": { - "description": "The end date of recurrence. If not provided, we default this to 10 years from the start date.", + "departmentName": { + "description": "Department name.", "type": "string", - "format": "date-time" - } - }, - "required": [ - "from" - ] - }, - "ReportConfigDeliveryDestination": { - "description": "The destination information for the delivery of the report.", - "properties": { - "resourceId": { - "description": "The resource id of the storage account where reports will be delivered.", - "type": "string" + "readOnly": true }, - "container": { - "description": "The name of the container where reports will be uploaded.", - "type": "string" + "product": { + "description": "Product name.", + "type": "string", + "readOnly": true }, - "rootFolderPath": { - "description": "The name of the directory where reports will be uploaded.", - "type": "string" - } - }, - "required": [ - "resourceId", - "container" - ] - }, - "ReportConfigTimePeriod": { - "description": "The start and end date for pulling data for the report.", - "properties": { - "from": { - "description": "The start date to pull data from.", + "consumedService": { + "description": "Consumed service name.", "type": "string", - "format": "date-time" + "readOnly": true }, - "to": { - "description": "The end date to pull data to.", + "costCenter": { + "description": "The cost center of this department if it is a department and a costcenter exists", "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.", + "readOnly": true + }, + "partNumber": { + "description": "Part Number", "type": "string", - "enum": [ - "Daily" - ], - "x-ms-enum": { - "name": "GranularityType", - "modelAsString": true - } + "readOnly": 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" + "resourceGuid": { + "description": "Resource Guid", + "type": "string", + "readOnly": true }, - "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 upto 2 aggregation clauses.", - "additionalProperties": { - "type": "object", - "$ref": "#/definitions/ReportConfigAggregation" - }, - "maxItems": 2 + "offerId": { + "description": "Offer Id", + "type": "string", + "readOnly": true }, - "grouping": { - "description": "Array of group by expression to use in the report. Report can have upto 2 group by clauses.", - "type": "array", - "items": { - "$ref": "#/definitions/ReportConfigGrouping" - }, - "maxItems": 2 + "chargesBilledSeparately": { + "description": "Charges billed separately", + "type": "boolean", + "readOnly": true }, - "filter": { - "type": "object", - "description": "Has filter expression to use in the report.", - "$ref": "#/definitions/ReportConfigFilter" + "additionalProperties": { + "description": "Additional details of this usage item. By default this is not populated, unless it's specified in $expand.", + "type": "string", + "readOnly": true } } }, - "ReportConfigDatasetConfiguration": { - "description": "The configuration of dataset in the report.", + "ForecastsListResult": { + "description": "Result of listing forecasts. It contains a list of available forecasts.", + "type": "object", "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.", + "value": { + "description": "The list of forecasts.", "type": "array", + "readOnly": true, "items": { - "type": "string" + "$ref": "#/definitions/Forecast" } } } }, - "ReportConfigAggregation": { - "description": "The aggregation expression to be used in the report.", - "properties":{ - "name": { - "description": "The name of the column to aggregate.", - "type": "string" + "ForecastProperties": { + "description": "The properties of the forecast charge.", + "type": "object", + "properties": { + "usageDate": { + "description": "The usage date of the forecast.", + "type": "string", + "readOnly": true }, - "function": { - "description": "The name of the aggregation function to use.", + "grain": { + "description": "The granularity of forecast.", "type": "string", "enum": [ - "Sum" + "Daily", + "Monthly", + "Yearly" ], "x-ms-enum": { - "name": "FunctionType", + "name": "Grain", "modelAsString": true } - } - }, - "required": [ - "name", - "function" - ] - }, - "ReportConfigGrouping": { - "description": "The group by expression to be used in the report.", - "properties":{ - "columnType": { - "description": "Has type of the column to group.", - "$ref": "#/definitions/ReportConfigColumnType" - }, - "name": { - "description": "The name of the column to group.", - "type": "string" - } - }, - "required": [ - "columnType", - "name" - ] - }, - "ReportConfigFilter": { - "description": "The filter expression to be used in the report.", - "properties": { - "and": { - "description": "The logical \"AND\" expression. Must have atleast 2 items.", - "type": "array", - "items": { - "$ref": "#/definitions/ReportConfigFilter" - }, - "minItems": 2 - }, - "or": { - "description": "The logical \"OR\" expression. Must have atleast 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" + "charge": { + "description": "The amount of charge", + "type": "number", + "format": "decimal", + "readOnly": true }, - "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 comaprison.", - "type": "string" + "currency": { + "description": "The ISO currency in which the meter is charged, for example, USD.", + "type": "string", + "readOnly": true }, - "operator": { - "description": "The operator to use for comparison.", + "chargeType": { + "description": "The type of the charge. Could be actual or forecast", "type": "string", "enum": [ - "In" + "Actual", + "Forecast" ], "x-ms-enum": { - "name": "OperatorType", - "modelAsString": true + "name": "ChargeType", + "modelAsString": true } }, - "values": { - "description": "Array of values to use for comparison", + "confidenceLevels": { + "description": "The details about the forecast confidence levels. This is populated only when chargeType is Forecast.", "type": "array", "items": { - "type": "string" + "type": "object", + "properties": { + "percentage": { + "description": "The percentage level of the confidence", + "type": "number", + "format": "decimal", + "readOnly": true + }, + "bound": { + "description": "The boundary of the percentage, values could be 'Upper' or 'Lower'", + "type": "string", + "enum": [ + "Upper", + "Lower" + ], + "x-ms-enum": { + "name": "Bound", + "modelAsString": true + } + }, + "value": { + "description": "The amount of forecast within the percentage level", + "type": "number", + "format": "decimal", + "readOnly": true + } + } }, - "minItems": 1 - } - }, - "required": [ - "name", - "operator", - "values" - ] - }, - "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": { - "data": { - "type": "array", - "items": { - "type": "string" - } - }, - "total": { - "format": "int32", - "type": "integer" - }, - "category": { - "type": "string" - }, - "usageStart": { - "format": "date-time", - "type": "string" - }, - "usageEnd": { - "format": "date-time", - "type": "string" - }, - "nextLink": { - "type": "string" - } - } - }, - "UsageAnalysisResult": { - "description": "Result of listing usages. It contains all columns listed under groupings and aggregation.", - "type": "object", - "properties": { - "value": { - "description": "The list of usage data.", - "type": "array", - "readOnly": true, - "items": { - "$ref": "#/definitions/UsageAnalysis" - } - } - } - }, - "UsageAnalysis": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/Resource" - } - ], - "properties": { - "properties": { - "x-ms-client-flatten": true, - "$ref": "#/definitions/UsageAnalysisProperties", - "title": "Usage analysis properties" - } - } - }, - "UsageAnalysisProperties": { - "type": "object", - "properties": { - "nextLink": { - "type": "string" - }, - "columns": { - "description": "Array of columns", - "type": "array", - "items": { - "$ref": "#/definitions/UsageAnalysisColumn" - } - }, - "rows": { - "type": "array", - "items": { - "type": "array", - "items": {} - } - } - } - }, - "UsageAnalysisColumn":{ - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" + + "readOnly": true } } } @@ -2732,14 +1485,6 @@ "required": true, "type": "string" }, - "resourceGroupNameParameter": { - "name": "resourceGroupName", - "in": "path", - "description": "Azure Resource Group Name.", - "required": true, - "type": "string", - "x-ms-parameter-location": "method" - }, "billingPeriodNameParameter": { "name": "billingPeriodName", "in": "path", @@ -2756,7 +1501,7 @@ "type": "string", "x-ms-parameter-location": "method" }, - "departmentIdParameter": { + "departmentIdParameter": { "name": "departmentId", "in": "path", "description": "Department ID", @@ -2764,21 +1509,13 @@ "type": "string", "x-ms-parameter-location": "method" }, - "enrollmentAccountIdParameter": { + "enrollmentAccountIdParameter": { "name": "enrollmentAccountId", "in": "path", "description": "EnrollmentAccount ID", "required": true, "type": "string", "x-ms-parameter-location": "method" - }, - "reportConfigNameParameter": { - "name": "reportConfigName", - "in": "path", - "description": "Report Config Name.", - "required": true, - "type": "string", - "x-ms-parameter-location": "method" } } } \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/costmanagement.json new file mode 100644 index 000000000000..8de2e71171c7 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/costmanagement.json @@ -0,0 +1,1380 @@ +{ + "swagger": "2.0", + "info": { + "version": "2018-05-31", + "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": { + "/subscriptions/{subscriptionId}/providers/Microsoft.CostManagement/reportconfigs": { + "get": { + "tags": [ + "Reports" + ], + "operationId": "ReportConfig_List", + "description": "Lists all report configs for a subscription.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "ReportConfigList": { + "$ref": "./examples/ReportConfigList.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ReportConfigListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CostManagement/reportconfigs": { + "get": { + "tags": [ + "Reports" + ], + "operationId": "ReportConfig_ListByResourceGroupName", + "description": "Lists all report configs for a resource group under a subscription.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "ReportConfigList": { + "$ref": "./examples/ReportConfigList.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ReportConfigListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.CostManagement/reportconfigs/{reportConfigName}": { + "get": { + "tags": [ + "Reports" + ], + "operationId": "ReportConfig_Get", + "description": "Gets the report config for a subscription by report config name.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "Report": { + "$ref": "./examples/ReportConfig.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/reportConfigNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ReportConfig" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "tags": [ + "Reports" + ], + "operationId": "ReportConfig_CreateOrUpdate", + "description": "The operation to create or update a report config. Update operation requires latest eTag to be set in the request mandatorily. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "CreateOrUpdateReport": { + "$ref": "./examples/ReportConfigCreateOrUpdate.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/reportConfigNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ReportConfig" + }, + "description": "Parameters supplied to the CreateOrUpdate Report Config operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ReportConfig" + } + }, + "201": { + "description": "Created.", + "schema": { + "$ref": "#/definitions/ReportConfig" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "tags": [ + "Reports" + ], + "operationId": "ReportConfig_Delete", + "description": "The operation to delete a report.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "DeleteReport": { + "$ref": "./examples/ReportConfigDelete.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/reportConfigNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CostManagement/reportconfigs/{reportConfigName}": { + "get": { + "tags": [ + "Reports" + ], + "operationId": "ReportConfig_GetByResourceGroupName", + "description": "Gets the report config for a resource group under a subscription by report config name.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "ReportConfig": { + "$ref": "./examples/ReportConfig.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/reportConfigNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ReportConfig" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "tags": [ + "Reports" + ], + "operationId": "ReportConfig_CreateOrUpdateByResourceGroupName", + "description": "The operation to create or update a report config. Update operation requires latest eTag to be set in the request mandatorily. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "CreateOrUpdateReport": { + "$ref": "./examples/ReportConfigCreateOrUpdate.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/reportConfigNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ReportConfig" + }, + "description": "Parameters supplied to the CreateOrUpdate Report Config operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ReportConfig" + } + }, + "201": { + "description": "Created.", + "schema": { + "$ref": "#/definitions/ReportConfig" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "tags": [ + "Reports" + ], + "operationId": "ReportConfig_DeleteByResourceGroupName", + "description": "The operation to delete a report config.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "DeleteReport": { + "$ref": "./examples/ReportConfigDelete.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/reportConfigNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/dimensions": { + "get": { + "tags": [ + "Dimensions" + ], + "x-ms-odata": "#/definitions/Dimension", + "operationId": "BillingAccountDimensions_List", + "description": "Lists the dimensions by billingAccount Id.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "BillingAccountDimensionsList": { + "$ref": "./examples/BillingAccountDimensionsList.json" + }, + "BillingAccountDimensionsListExpandAndTop": { + "$ref": "./examples/BillingAccountDimensionsListExpandAndTop.json" + }, + "BillingAccountDimensionsListWithFilter": { + "$ref": "./examples/BillingAccountDimensionsListWithFilter.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountIdParameter" + }, + { + "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 dategory. 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 + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.CostManagement/dimensions": { + "get": { + "tags": [ + "Dimensions" + ], + "x-ms-odata": "#/definitions/Dimension", + "operationId": "SubscriptionDimensions_List", + "description": "Lists the dimensions by subscription Id.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "SubscriptionDimensionsList": { + "$ref": "./examples/SubscriptionDimensionsList.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "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 dategory. 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 + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CostManagement/dimensions": { + "get": { + "tags": [ + "Dimensions" + ], + "x-ms-odata": "#/definitions/Dimension", + "operationId": "ResourceGroupDimensions_List", + "description": "Lists the dimensions by resource group Id.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "ResourceGroupDimensionsList": { + "$ref": "./examples/ResourceGroupDimensionsList.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "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 dategory. 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 + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.CostManagement/Query": { + "post": { + "tags": [ + "Query" + ], + "operationId": "QuerySubscription", + "description": "Lists the usage data for subscriptionId.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "SubscriptionQuery": { + "$ref": "./examples/SubscriptionQuery.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "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}/resourcegroups/{resourceGroupName}/providers/Microsoft.CostManagement/Query": { + "post": { + "tags": [ + "Query" + ], + "operationId": "QueryResourceGroup", + "description": "Lists the usage data for subscriptionId and resource group.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "ResourceGroupQuery": { + "$ref": "./examples/ResourceGroupQuery.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "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/Query": { + "post": { + "tags": [ + "Query" + ], + "operationId": "QueryBillingAccount", + "description": "Lists the usage data for billing account.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "BillingAccountQuery": { + "$ref": "./examples/BillingAccountQuery.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$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 + } + } + } + }, + "definitions": { + "ErrorDetails": { + "description": "The details of the error.", + "properties": { + "code": { + "description": "Error code.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "Error message indicating why the operation failed.", + "type": "string", + "readOnly": true + } + } + }, + "ErrorResponse": { + "description": "Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.", + "type": "object", + "properties": { + "error": { + "description": "The details of the error.", + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "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 + }, + "ReportConfigListResult": { + "description": "Result of listing report configs. It contains a list of available report configurations in the scope provided.", + "properties": { + "value": { + "description": "The list of report configs.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/ReportConfig" + } + } + } + }, + "ReportConfig": { + "description": "A report config resource.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ReportConfigProperties", + "title": "Report config properties" + } + } + }, + "ReportConfigProperties": { + "description": "The properties of the report config.", + "properties": { + "schedule": { + "description": "Has schedule information for the report config.", + "$ref": "#/definitions/ReportConfigSchedule" + }, + "format": { + "description": "The format of the report being delivered.", + "type": "string", + "enum": [ + "Csv" + ], + "x-ms-enum": { + "name": "FormatType", + "modelAsString": true + } + }, + "deliveryInfo": { + "description": "Has delivery information for the report config.", + "$ref": "#/definitions/ReportConfigDeliveryInfo" + }, + "definition": { + "description": "Has definition for the report config.", + "$ref": "#/definitions/ReportConfigDefinition" + } + }, + "required": [ + "deliveryInfo", + "definition" + ] + }, + "ReportConfigSchedule": { + "description": "The schedule associated with a report config.", + "properties": { + "status": { + "description": "The status of the schedule. Whether active or not. If inactive, the report's scheduled execution 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/ReportConfigRecurrencePeriod" + } + }, + "required": [ + "recurrence", + "recurrencePeriod" + ] + }, + "ReportConfigDeliveryInfo": { + "description": "The delivery information associated with a report config.", + "properties": { + "destination": { + "description": "Has destination for the report being delivered.", + "$ref": "#/definitions/ReportConfigDeliveryDestination" + } + }, + "required": [ + "destination" + ] + }, + "ReportConfigDefinition": { + "description": "The definition of a report config.", + "properties": { + "type": { + "description": "The type of the report.", + "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" + ] + }, + "ReportConfigRecurrencePeriod": { + "description": "The start and end date for recurrence schedule.", + "properties": { + "from": { + "description": "The start date of recurrence.", + "type": "string", + "format": "date-time" + }, + "to": { + "description": "The end date of recurrence. If not provided, we default this to 10 years from the start date.", + "type": "string", + "format": "date-time" + } + }, + "required": [ + "from" + ] + }, + "ReportConfigDeliveryDestination": { + "description": "The destination information for the delivery of the report.", + "properties": { + "resourceId": { + "description": "The resource id of the storage account where reports will be delivered.", + "type": "string" + }, + "container": { + "description": "The name of the container where reports will be uploaded.", + "type": "string" + }, + "rootFolderPath": { + "description": "The name of the directory where reports will be uploaded.", + "type": "string" + } + }, + "required": [ + "resourceId", + "container" + ] + }, + "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" + ], + "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 upto 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 upto 2 group by clauses.", + "type": "array", + "items": { + "$ref": "#/definitions/ReportConfigGrouping" + }, + "maxItems": 2 + }, + "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" + ] + }, + "ReportConfigGrouping": { + "description": "The group by expression to be used in the report.", + "properties": { + "columnType": { + "description": "Has type of the column to group.", + "$ref": "#/definitions/ReportConfigColumnType" + }, + "name": { + "description": "The name of the column to group.", + "type": "string" + } + }, + "required": [ + "columnType", + "name" + ] + }, + "ReportConfigFilter": { + "description": "The filter expression to be used in the report.", + "properties": { + "and": { + "description": "The logical \"AND\" expression. Must have atleast 2 items.", + "type": "array", + "items": { + "$ref": "#/definitions/ReportConfigFilter" + }, + "minItems": 2 + }, + "or": { + "description": "The logical \"OR\" expression. Must have atleast 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 comaprison.", + "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" + ] + }, + "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": { + "data": { + "type": "array", + "items": { + "type": "string" + } + }, + "total": { + "format": "int32", + "type": "integer" + }, + "category": { + "type": "string" + }, + "usageStart": { + "format": "date-time", + "type": "string" + }, + "usageEnd": { + "format": "date-time", + "type": "string" + }, + "nextLink": { + "type": "string" + } + } + }, + "QueryResult": { + "description": "Result of query. It contains all columns listed under groupings and aggregation.", + "type": "object", + "properties": { + "value": { + "description": "The list of usage data.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/Query" + } + } + } + }, + "Query": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/QueryProperties", + "title": "Query properties" + } + } + }, + "QueryProperties": { + "type": "object", + "properties": { + "nextLink": { + "type": "string" + }, + "columns": { + "description": "Array of columns", + "type": "array", + "items": { + "$ref": "#/definitions/QueryColumn" + } + }, + "rows": { + "type": "array", + "items": { + "type": "array", + "items": {} + } + } + } + }, + "QueryColumn": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + } + } + }, + "parameters": { + "apiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "Version of the API to be used with the client request. The current version is 2018-05-31." + }, + "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" + }, + "reportConfigNameParameter": { + "name": "reportConfigName", + "in": "path", + "description": "Report Config Name.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + } +} \ No newline at end of file diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/BillingAccountDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/BillingAccountDimensionsList.json similarity index 100% rename from specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/BillingAccountDimensionsList.json rename to specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/BillingAccountDimensionsList.json diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/BillingAccountDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/BillingAccountDimensionsListExpandAndTop.json similarity index 100% rename from specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/BillingAccountDimensionsListExpandAndTop.json rename to specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/BillingAccountDimensionsListExpandAndTop.json diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/BillingAccountDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/BillingAccountDimensionsListWithFilter.json similarity index 100% rename from specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/BillingAccountDimensionsListWithFilter.json rename to specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/BillingAccountDimensionsListWithFilter.json diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/BillingAccountUsage.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/BillingAccountQuery.json similarity index 92% rename from specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/BillingAccountUsage.json rename to specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/BillingAccountQuery.json index efe0eefcf05d..1ef7260472f9 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/BillingAccountUsage.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/BillingAccountQuery.json @@ -59,11 +59,11 @@ "body": { "value": [ { - "id": "providers/Microsoft.Billing/billingAccounts/70664866/providers/Microsoft.Consumption/AnalyzeUsage/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "id": "providers/Microsoft.Billing/billingAccounts/70664866/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", - "type": "microsoft.consumption/AnalyzeUsage", + "type": "microsoft.costmanagement/Query", "properties": { - "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/providers/Microsoft.Consumption/AnalyzeUsage?api-version=2018-05-31&$skiptoken=AQAAAA%3D%3D", + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/providers/Microsoft.CostManagement/Query?api-version=2018-05-31&$skiptoken=AQAAAA%3D%3D", "columns": [ { "name": "PreTaxCost", diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfig.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/ReportConfig.json similarity index 100% rename from specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfig.json rename to specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/ReportConfig.json diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfigCreateOrUpdate.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/ReportConfigCreateOrUpdate.json similarity index 100% rename from specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfigCreateOrUpdate.json rename to specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/ReportConfigCreateOrUpdate.json diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfigDelete.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/ReportConfigDelete.json similarity index 100% rename from specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfigDelete.json rename to specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/ReportConfigDelete.json diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfigList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/ReportConfigList.json similarity index 100% rename from specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ReportConfigList.json rename to specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/ReportConfigList.json diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ResourceGroupDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/ResourceGroupDimensionsList.json similarity index 100% rename from specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ResourceGroupDimensionsList.json rename to specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/ResourceGroupDimensionsList.json diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ResourceGroupUsage.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/ResourceGroupQuery.json similarity index 95% rename from specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ResourceGroupUsage.json rename to specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/ResourceGroupQuery.json index ee432bd674a7..24b99ae93eab 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/ResourceGroupUsage.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/ResourceGroupQuery.json @@ -60,9 +60,9 @@ "body": { "value": [ { - "id": "subscriptions/55312978-ba1b-415c-9304-c4b9c43c0481/resourcegroups/ScreenSharingTest-peer/providers/Microsoft.Consumption/AnalyzeUsage/9af9459d-441d-4055-9ed0-83d4c4a363fb", + "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.consumption/AnalyzeUsage", + "type": "microsoft.costmanagement/Query", "properties": { "nextLink": null, "columns": [ diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/SubscriptionDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/SubscriptionDimensionsList.json similarity index 100% rename from specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/SubscriptionDimensionsList.json rename to specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/SubscriptionDimensionsList.json diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/SubscriptionUsage.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/SubscriptionQuery.json similarity index 94% rename from specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/SubscriptionUsage.json rename to specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/SubscriptionQuery.json index 4a953f3a8a84..b84af6a0ab53 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/SubscriptionUsage.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/SubscriptionQuery.json @@ -59,9 +59,9 @@ "body": { "value": [ { - "id": "subscriptions/55312978-ba1b-415c-9304-c6b9c43c0481/providers/Microsoft.Consumption/AnalyzeUsage/55312978-ba1b-415c-9304-c6b9c43c0481", + "id": "subscriptions/55312978-ba1b-415c-9304-c6b9c43c0481/providers/Microsoft.CostManagement/Query/55312978-ba1b-415c-9304-c6b9c43c0481", "name": "55312978-ba1b-415c-9304-cfd9c43c0481", - "type": "microsoft.consumption/AnalyzeUsage", + "type": "microsoft.costmanagement/Query", "properties": { "nextLink": null, "columns": [ From 4661d6b8c314ae9794c4825ec8cc08c7f23775d0 Mon Sep 17 00:00:00 2001 From: Shalin Ved Date: Mon, 13 Aug 2018 12:23:30 -0700 Subject: [PATCH 11/13] Merged with master again --- .../stable/2018-05-31/costmanagement.json | 56 ------------------- 1 file changed, 56 deletions(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/costmanagement.json index a175bf304145..c3183d2873c9 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/costmanagement.json @@ -41,11 +41,7 @@ "operationId": "ReportConfig_List", "description": "Lists all report configs for a subscription.", "externalDocs": { -<<<<<<< HEAD - "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" -======= "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" ->>>>>>> e418225e3be1ce960bf4da2d3b7132a1d5b8e166 }, "x-ms-examples": { "ReportConfigList": { @@ -84,11 +80,7 @@ "operationId": "ReportConfig_ListByResourceGroupName", "description": "Lists all report configs for a resource group under a subscription.", "externalDocs": { -<<<<<<< HEAD - "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" -======= "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" ->>>>>>> e418225e3be1ce960bf4da2d3b7132a1d5b8e166 }, "x-ms-examples": { "ReportConfigList": { @@ -130,11 +122,7 @@ "operationId": "ReportConfig_Get", "description": "Gets the report config for a subscription by report config name.", "externalDocs": { -<<<<<<< HEAD - "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" -======= "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" ->>>>>>> e418225e3be1ce960bf4da2d3b7132a1d5b8e166 }, "x-ms-examples": { "Report": { @@ -174,11 +162,7 @@ "operationId": "ReportConfig_CreateOrUpdate", "description": "The operation to create or update a report config. 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": { -<<<<<<< HEAD - "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" -======= "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" ->>>>>>> e418225e3be1ce960bf4da2d3b7132a1d5b8e166 }, "x-ms-examples": { "CreateOrUpdateReport": { @@ -233,11 +217,7 @@ "operationId": "ReportConfig_Delete", "description": "The operation to delete a report.", "externalDocs": { -<<<<<<< HEAD - "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" -======= "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" ->>>>>>> e418225e3be1ce960bf4da2d3b7132a1d5b8e166 }, "x-ms-examples": { "DeleteReport": { @@ -276,11 +256,7 @@ "operationId": "ReportConfig_GetByResourceGroupName", "description": "Gets the report config for a resource group under a subscription by report config name.", "externalDocs": { -<<<<<<< HEAD - "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" -======= "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" ->>>>>>> e418225e3be1ce960bf4da2d3b7132a1d5b8e166 }, "x-ms-examples": { "ReportConfig": { @@ -323,11 +299,7 @@ "operationId": "ReportConfig_CreateOrUpdateByResourceGroupName", "description": "The operation to create or update a report config. 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": { -<<<<<<< HEAD - "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" -======= "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" ->>>>>>> e418225e3be1ce960bf4da2d3b7132a1d5b8e166 }, "x-ms-examples": { "CreateOrUpdateReport": { @@ -385,11 +357,7 @@ "operationId": "ReportConfig_DeleteByResourceGroupName", "description": "The operation to delete a report config.", "externalDocs": { -<<<<<<< HEAD - "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" -======= "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" ->>>>>>> e418225e3be1ce960bf4da2d3b7132a1d5b8e166 }, "x-ms-examples": { "DeleteReport": { @@ -432,11 +400,7 @@ "operationId": "BillingAccountDimensions_List", "description": "Lists the dimensions by billingAccount Id.", "externalDocs": { -<<<<<<< HEAD - "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" -======= "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" ->>>>>>> e418225e3be1ce960bf4da2d3b7132a1d5b8e166 }, "x-ms-examples": { "BillingAccountDimensionsList": { @@ -515,11 +479,7 @@ "operationId": "SubscriptionDimensions_List", "description": "Lists the dimensions by subscription Id.", "externalDocs": { -<<<<<<< HEAD - "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" -======= "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" ->>>>>>> e418225e3be1ce960bf4da2d3b7132a1d5b8e166 }, "x-ms-examples": { "SubscriptionDimensionsList": { @@ -592,11 +552,7 @@ "operationId": "ResourceGroupDimensions_List", "description": "Lists the dimensions by resource group Id.", "externalDocs": { -<<<<<<< HEAD - "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" -======= "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" ->>>>>>> e418225e3be1ce960bf4da2d3b7132a1d5b8e166 }, "x-ms-examples": { "ResourceGroupDimensionsList": { @@ -671,11 +627,7 @@ "operationId": "QuerySubscription", "description": "Lists the usage data for subscriptionId.", "externalDocs": { -<<<<<<< HEAD - "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" -======= "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" ->>>>>>> e418225e3be1ce960bf4da2d3b7132a1d5b8e166 }, "x-ms-examples": { "SubscriptionQuery": { @@ -726,11 +678,7 @@ "operationId": "QueryResourceGroup", "description": "Lists the usage data for subscriptionId and resource group.", "externalDocs": { -<<<<<<< HEAD - "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" -======= "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" ->>>>>>> e418225e3be1ce960bf4da2d3b7132a1d5b8e166 }, "x-ms-examples": { "ResourceGroupQuery": { @@ -784,11 +732,7 @@ "operationId": "QueryBillingAccount", "description": "Lists the usage data for billing account.", "externalDocs": { -<<<<<<< HEAD - "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" -======= "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" ->>>>>>> e418225e3be1ce960bf4da2d3b7132a1d5b8e166 }, "x-ms-examples": { "BillingAccountQuery": { From 9f3607b94b9c3f9b6c2fa12ae00ed71a80d42699 Mon Sep 17 00:00:00 2001 From: Shalin Ved Date: Tue, 14 Aug 2018 14:15:36 -0700 Subject: [PATCH 12/13] Updated reports api documentation --- .../2018-09-01-preview/costmanagement.json | 484 ++++++++++++---- .../{ReportConfig.json => Report.json} | 0 ...rUpdate.json => ReportCreateOrUpdate.json} | 0 ...ortConfigDelete.json => ReportDelete.json} | 0 .../examples/ReportExecution.json | 12 + .../examples/ReportExecutionList.json | 203 +++++++ ...{ReportConfigList.json => ReportList.json} | 0 .../stable/2018-05-31/costmanagement.json | 517 ------------------ .../2018-05-31/examples/ReportConfig.json | 87 --- .../examples/ReportConfigCreateOrUpdate.json | 287 ---------- .../examples/ReportConfigDelete.json | 12 - .../2018-05-31/examples/ReportConfigList.json | 174 ------ 12 files changed, 589 insertions(+), 1187 deletions(-) rename specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-09-01-preview/examples/{ReportConfig.json => Report.json} (100%) rename specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-09-01-preview/examples/{ReportConfigCreateOrUpdate.json => ReportCreateOrUpdate.json} (100%) rename specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-09-01-preview/examples/{ReportConfigDelete.json => ReportDelete.json} (100%) create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-09-01-preview/examples/ReportExecution.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-09-01-preview/examples/ReportExecutionList.json rename specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-09-01-preview/examples/{ReportConfigList.json => ReportList.json} (100%) delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/ReportConfig.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/ReportConfigCreateOrUpdate.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/ReportConfigDelete.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/ReportConfigList.json diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-09-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-09-01-preview/costmanagement.json index 580ce3027bb2..cfaa42813206 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-09-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-09-01-preview/costmanagement.json @@ -33,19 +33,19 @@ } }, "paths": { - "/subscriptions/{subscriptionId}/providers/Microsoft.CostManagement/reportconfigs": { + "/subscriptions/{subscriptionId}/providers/Microsoft.CostManagement/reports": { "get": { "tags": [ "Reports" ], - "operationId": "ReportConfig_List", - "description": "Lists all report configs for a subscription.", + "operationId": "Report_List", + "description": "Lists all reports for a subscription.", "externalDocs": { "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" }, "x-ms-examples": { - "ReportConfigList": { - "$ref": "./examples/ReportConfigList.json" + "ReportList": { + "$ref": "./examples/ReportList.json" } }, "parameters": [ @@ -60,7 +60,7 @@ "200": { "description": "OK. The request has succeeded.", "schema": { - "$ref": "#/definitions/ReportConfigListResult" + "$ref": "#/definitions/ReportListResult" } }, "default": { @@ -72,19 +72,19 @@ } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CostManagement/reportconfigs": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CostManagement/reports": { "get": { "tags": [ "Reports" ], - "operationId": "ReportConfig_ListByResourceGroupName", - "description": "Lists all report configs for a resource group under a subscription.", + "operationId": "Report_ListByResourceGroupName", + "description": "Lists all reports for a resource group under a subscription.", "externalDocs": { "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" }, "x-ms-examples": { - "ReportConfigList": { - "$ref": "./examples/ReportConfigList.json" + "ReportList": { + "$ref": "./examples/ReportList.json" } }, "parameters": [ @@ -102,7 +102,7 @@ "200": { "description": "OK. The request has succeeded.", "schema": { - "$ref": "#/definitions/ReportConfigListResult" + "$ref": "#/definitions/ReportListResult" } }, "default": { @@ -114,19 +114,19 @@ } } }, - "/subscriptions/{subscriptionId}/providers/Microsoft.CostManagement/reportconfigs/{reportConfigName}": { + "/subscriptions/{subscriptionId}/providers/Microsoft.CostManagement/reports/{reportName}": { "get": { "tags": [ "Reports" ], - "operationId": "ReportConfig_Get", - "description": "Gets the report config for a subscription by report config name.", + "operationId": "Report_Get", + "description": "Gets the report for a subscription by report name.", "externalDocs": { "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" }, "x-ms-examples": { "Report": { - "$ref": "./examples/ReportConfig.json" + "$ref": "./examples/Report.json" } }, "parameters": [ @@ -137,14 +137,14 @@ "$ref": "#/parameters/subscriptionIdParameter" }, { - "$ref": "#/parameters/reportConfigNameParameter" + "$ref": "#/parameters/reportNameParameter" } ], "responses": { "200": { "description": "OK. The request has succeeded.", "schema": { - "$ref": "#/definitions/ReportConfig" + "$ref": "#/definitions/Report" } }, "default": { @@ -159,14 +159,14 @@ "tags": [ "Reports" ], - "operationId": "ReportConfig_CreateOrUpdate", - "description": "The operation to create or update a report config. 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.", + "operationId": "Report_CreateOrUpdate", + "description": "The operation to create or update a report. 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/costmanagement/" }, "x-ms-examples": { "CreateOrUpdateReport": { - "$ref": "./examples/ReportConfigCreateOrUpdate.json" + "$ref": "./examples/ReportCreateOrUpdate.json" } }, "parameters": [ @@ -177,29 +177,29 @@ "$ref": "#/parameters/subscriptionIdParameter" }, { - "$ref": "#/parameters/reportConfigNameParameter" + "$ref": "#/parameters/reportNameParameter" }, { "name": "parameters", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/ReportConfig" + "$ref": "#/definitions/Report" }, - "description": "Parameters supplied to the CreateOrUpdate Report Config operation." + "description": "Parameters supplied to the CreateOrUpdate Report operation." } ], "responses": { "200": { "description": "OK. The request has succeeded.", "schema": { - "$ref": "#/definitions/ReportConfig" + "$ref": "#/definitions/Report" } }, "201": { "description": "Created.", "schema": { - "$ref": "#/definitions/ReportConfig" + "$ref": "#/definitions/Report" } }, "default": { @@ -214,14 +214,14 @@ "tags": [ "Reports" ], - "operationId": "ReportConfig_Delete", + "operationId": "Report_Delete", "description": "The operation to delete a report.", "externalDocs": { "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" }, "x-ms-examples": { "DeleteReport": { - "$ref": "./examples/ReportConfigDelete.json" + "$ref": "./examples/ReportDelete.json" } }, "parameters": [ @@ -232,7 +232,7 @@ "$ref": "#/parameters/subscriptionIdParameter" }, { - "$ref": "#/parameters/reportConfigNameParameter" + "$ref": "#/parameters/reportNameParameter" } ], "responses": { @@ -248,19 +248,19 @@ } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CostManagement/reportconfigs/{reportConfigName}": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CostManagement/reports/{reportName}": { "get": { "tags": [ "Reports" ], - "operationId": "ReportConfig_GetByResourceGroupName", - "description": "Gets the report config for a resource group under a subscription by report config name.", + "operationId": "Report_GetByResourceGroupName", + "description": "Gets the report for a resource group under a subscription by report name.", "externalDocs": { "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" }, "x-ms-examples": { - "ReportConfig": { - "$ref": "./examples/ReportConfig.json" + "Report": { + "$ref": "./examples/Report.json" } }, "parameters": [ @@ -274,14 +274,14 @@ "$ref": "#/parameters/resourceGroupNameParameter" }, { - "$ref": "#/parameters/reportConfigNameParameter" + "$ref": "#/parameters/reportNameParameter" } ], "responses": { "200": { "description": "OK. The request has succeeded.", "schema": { - "$ref": "#/definitions/ReportConfig" + "$ref": "#/definitions/Report" } }, "default": { @@ -296,14 +296,14 @@ "tags": [ "Reports" ], - "operationId": "ReportConfig_CreateOrUpdateByResourceGroupName", - "description": "The operation to create or update a report config. 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.", + "operationId": "Report_CreateOrUpdateByResourceGroupName", + "description": "The operation to create or update a report. 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/costmanagement/" }, "x-ms-examples": { "CreateOrUpdateReport": { - "$ref": "./examples/ReportConfigCreateOrUpdate.json" + "$ref": "./examples/ReportCreateOrUpdate.json" } }, "parameters": [ @@ -317,29 +317,29 @@ "$ref": "#/parameters/resourceGroupNameParameter" }, { - "$ref": "#/parameters/reportConfigNameParameter" + "$ref": "#/parameters/reportNameParameter" }, { "name": "parameters", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/ReportConfig" + "$ref": "#/definitions/Report" }, - "description": "Parameters supplied to the CreateOrUpdate Report Config operation." + "description": "Parameters supplied to the CreateOrUpdate Report operation." } ], "responses": { "200": { "description": "OK. The request has succeeded.", "schema": { - "$ref": "#/definitions/ReportConfig" + "$ref": "#/definitions/Report" } }, "201": { "description": "Created.", "schema": { - "$ref": "#/definitions/ReportConfig" + "$ref": "#/definitions/Report" } }, "default": { @@ -354,14 +354,95 @@ "tags": [ "Reports" ], - "operationId": "ReportConfig_DeleteByResourceGroupName", - "description": "The operation to delete a report config.", + "operationId": "Report_DeleteByResourceGroupName", + "description": "The operation to delete a report.", "externalDocs": { "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" }, "x-ms-examples": { "DeleteReport": { - "$ref": "./examples/ReportConfigDelete.json" + "$ref": "./examples/ReportDelete.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/reportNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.CostManagement/reports/{reportName}/run": { + "put": { + "tags": [ + "Reports" + ], + "operationId": "Report_Execute", + "description": "The operation to execute a report.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ExecuteReport": { + "$ref": "./examples/ReportExecution.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/reportNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CostManagement/reports/{reportName}/run": { + "put": { + "tags": [ + "Reports" + ], + "operationId": "Report_ExecuteByResourceGroupName", + "description": "The operation to execute a report.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ExecuteReport": { + "$ref": "./examples/ReportExecution.json" } }, "parameters": [ @@ -375,7 +456,7 @@ "$ref": "#/parameters/resourceGroupNameParameter" }, { - "$ref": "#/parameters/reportConfigNameParameter" + "$ref": "#/parameters/reportNameParameter" } ], "responses": { @@ -391,6 +472,93 @@ } } }, + "/subscriptions/{subscriptionId}/providers/Microsoft.CostManagement/reports/{reportName}/runHistory": { + "get": { + "tags": [ + "Reports" + ], + "operationId": "Report_GetExecutionHistory", + "description": "Gets the execution history of a report for a subscription by report name.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ExecutionHistoryReport": { + "$ref": "./examples/ReportExecutionList.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/reportNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ReportExecutionListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CostManagement/reports/{reportName}/runHistory": { + "get": { + "tags": [ + "Reports" + ], + "operationId": "Report_GetExecutionHistoryByResourceGroupName", + "description": "Gets the execution history of a report for a resource group by report name.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ExecutionHistoryReport": { + "$ref": "./examples/ReportExecutionList.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/reportNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ReportExecutionListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/dimensions": { "get": { "tags": [ @@ -646,9 +814,9 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/ReportConfigDefinition" + "$ref": "#/definitions/ReportDefinition" }, - "description": "Parameters supplied to the CreateOrUpdate Report Config operation." + "description": "Parameters supplied to the CreateOrUpdate Report operation." } ], "responses": { @@ -700,9 +868,9 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/ReportConfigDefinition" + "$ref": "#/definitions/ReportDefinition" }, - "description": "Parameters supplied to the CreateOrUpdate Report Config operation." + "description": "Parameters supplied to the CreateOrUpdate Report operation." } ], "responses": { @@ -751,9 +919,9 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/ReportConfigDefinition" + "$ref": "#/definitions/ReportDefinition" }, - "description": "Parameters supplied to the CreateOrUpdate Report Config operation." + "description": "Parameters supplied to the CreateOrUpdate Report operation." } ], "responses": { @@ -1144,21 +1312,21 @@ }, "x-ms-azure-resource": true }, - "ReportConfigListResult": { - "description": "Result of listing report configs. It contains a list of available report configurations in the scope provided.", + "ReportListResult": { + "description": "Result of listing reports. It contains a list of available reports in the scope provided.", "properties": { "value": { - "description": "The list of report configs.", + "description": "The list of reports.", "type": "array", "readOnly": true, "items": { - "$ref": "#/definitions/ReportConfig" + "$ref": "#/definitions/Report" } } } }, - "ReportConfig": { - "description": "A report config resource.", + "Report": { + "description": "A report resource.", "type": "object", "allOf": [ { @@ -1168,18 +1336,29 @@ "properties": { "properties": { "x-ms-client-flatten": true, - "$ref": "#/definitions/ReportConfigProperties", - "title": "Report config properties" + "$ref": "#/definitions/ReportProperties", + "title": "Report properties" } } }, - "ReportConfigProperties": { - "description": "The properties of the report config.", + "ReportProperties": { + "description": "The properties of the report.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/CommonReportProperties" + } + ], "properties": { "schedule": { - "description": "Has schedule information for the report config.", - "$ref": "#/definitions/ReportConfigSchedule" - }, + "description": "Has schedule information for the report.", + "$ref": "#/definitions/ReportSchedule" + } + } + }, + "CommonReportProperties": { + "description": "The common properties of the report.", + "properties": { "format": { "description": "The format of the report being delivered.", "type": "string", @@ -1192,12 +1371,12 @@ } }, "deliveryInfo": { - "description": "Has delivery information for the report config.", - "$ref": "#/definitions/ReportConfigDeliveryInfo" + "description": "Has delivery information for the report.", + "$ref": "#/definitions/ReportDeliveryInfo" }, "definition": { - "description": "Has definition for the report config.", - "$ref": "#/definitions/ReportConfigDefinition" + "description": "Has definition for the report.", + "$ref": "#/definitions/ReportDefinition" } }, "required": [ @@ -1205,8 +1384,8 @@ "definition" ] }, - "ReportConfigSchedule": { - "description": "The schedule associated with a report config.", + "ReportSchedule": { + "description": "The schedule associated with a report.", "properties": { "status": { "description": "The status of the schedule. Whether active or not. If inactive, the report's scheduled execution is paused.", @@ -1236,28 +1415,27 @@ }, "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/ReportConfigRecurrencePeriod" + "$ref": "#/definitions/ReportRecurrencePeriod" } }, "required": [ - "recurrence", - "recurrencePeriod" + "recurrence" ] }, - "ReportConfigDeliveryInfo": { - "description": "The delivery information associated with a report config.", + "ReportDeliveryInfo": { + "description": "The delivery information associated with a report.", "properties": { "destination": { "description": "Has destination for the report being delivered.", - "$ref": "#/definitions/ReportConfigDeliveryDestination" + "$ref": "#/definitions/ReportDeliveryDestination" } }, "required": [ "destination" ] }, - "ReportConfigDefinition": { - "description": "The definition of a report config.", + "ReportDefinition": { + "description": "The definition of a report.", "properties": { "type": { "description": "The type of the report.", @@ -1276,7 +1454,6 @@ "enum": [ "WeekToDate", "MonthToDate", - "YearToDate", "Custom" ], "x-ms-enum": { @@ -1286,11 +1463,11 @@ }, "timePeriod": { "description": "Has time period for pulling data for the report.", - "$ref": "#/definitions/ReportConfigTimePeriod" + "$ref": "#/definitions/ReportTimePeriod" }, "dataset": { - "description": "Has definition for data in this report config.", - "$ref": "#/definitions/ReportConfigDataset" + "description": "Has definition for data in this report.", + "$ref": "#/definitions/ReportDataset" } }, "required": [ @@ -1298,7 +1475,7 @@ "timeframe" ] }, - "ReportConfigRecurrencePeriod": { + "ReportRecurrencePeriod": { "description": "The start and end date for recurrence schedule.", "properties": { "from": { @@ -1307,7 +1484,7 @@ "format": "date-time" }, "to": { - "description": "The end date of recurrence. If not provided, we default this to 10 years from the start date.", + "description": "The end date of recurrence.", "type": "string", "format": "date-time" } @@ -1316,7 +1493,7 @@ "from" ] }, - "ReportConfigDeliveryDestination": { + "ReportDeliveryDestination": { "description": "The destination information for the delivery of the report.", "properties": { "resourceId": { @@ -1337,7 +1514,7 @@ "container" ] }, - "ReportConfigTimePeriod": { + "ReportTimePeriod": { "description": "The start and end date for pulling data for the report.", "properties": { "from": { @@ -1356,7 +1533,7 @@ "to" ] }, - "ReportConfigDataset": { + "ReportDataset": { "description": "The definition of data present in the report.", "properties": { "granularity": { @@ -1372,14 +1549,14 @@ }, "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" + "$ref": "#/definitions/ReportDatasetConfiguration" }, "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 upto 2 aggregation clauses.", "additionalProperties": { "type": "object", - "$ref": "#/definitions/ReportConfigAggregation" + "$ref": "#/definitions/ReportAggregation" }, "maxItems": 2 }, @@ -1387,18 +1564,18 @@ "description": "Array of group by expression to use in the report. Report can have upto 2 group by clauses.", "type": "array", "items": { - "$ref": "#/definitions/ReportConfigGrouping" + "$ref": "#/definitions/ReportGrouping" }, "maxItems": 2 }, "filter": { "type": "object", "description": "Has filter expression to use in the report.", - "$ref": "#/definitions/ReportConfigFilter" + "$ref": "#/definitions/ReportFilter" } } }, - "ReportConfigDatasetConfiguration": { + "ReportDatasetConfiguration": { "description": "The configuration of dataset in the report.", "properties": { "columns": { @@ -1410,7 +1587,7 @@ } } }, - "ReportConfigAggregation": { + "ReportAggregation": { "description": "The aggregation expression to be used in the report.", "properties": { "name": { @@ -1434,12 +1611,12 @@ "function" ] }, - "ReportConfigGrouping": { + "ReportGrouping": { "description": "The group by expression to be used in the report.", "properties": { "columnType": { "description": "Has type of the column to group.", - "$ref": "#/definitions/ReportConfigColumnType" + "$ref": "#/definitions/ReportColumnType" }, "name": { "description": "The name of the column to group.", @@ -1451,14 +1628,14 @@ "name" ] }, - "ReportConfigFilter": { + "ReportFilter": { "description": "The filter expression to be used in the report.", "properties": { "and": { "description": "The logical \"AND\" expression. Must have atleast 2 items.", "type": "array", "items": { - "$ref": "#/definitions/ReportConfigFilter" + "$ref": "#/definitions/ReportFilter" }, "minItems": 2 }, @@ -1466,25 +1643,25 @@ "description": "The logical \"OR\" expression. Must have atleast 2 items.", "type": "array", "items": { - "$ref": "#/definitions/ReportConfigFilter" + "$ref": "#/definitions/ReportFilter" }, "minItems": 2 }, "not": { "description": "The logical \"NOT\" expression.", - "$ref": "#/definitions/ReportConfigFilter" + "$ref": "#/definitions/ReportFilter" }, "dimension": { "description": "Has comparison expression for a dimension", - "$ref": "#/definitions/ReportConfigComparisonExpression" + "$ref": "#/definitions/ReportComparisonExpression" }, "tag": { "description": "Has comparison expression for a tag", - "$ref": "#/definitions/ReportConfigComparisonExpression" + "$ref": "#/definitions/ReportComparisonExpression" } } }, - "ReportConfigColumnType": { + "ReportColumnType": { "description": "The type of the column in the report.", "type": "string", "enum": [ @@ -1492,11 +1669,11 @@ "Dimension" ], "x-ms-enum": { - "name": "ReportConfigColumnType", + "name": "ReportColumnType", "modelAsString": true } }, - "ReportConfigComparisonExpression": { + "ReportComparisonExpression": { "description": "The comparison expression to be used in the report.", "properties": { "name": { @@ -1529,6 +1706,93 @@ "values" ] }, + "ReportExecutionListResult": { + "description": "Result of listing reports execution history of a report by name", + "properties": { + "value": { + "description": "The list of report executions.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/ReportExecution" + } + } + } + }, + "ReportExecution" : { + "description": "A report exeuction.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ReportExecutionProperties", + "title": "Report execution properties" + } + } + }, + "ReportExecutionProperties": { + "description": "The properties of the report execution.", + "properties": { + "executionType": { + "description": "The type of the report execution.", + "type": "string", + "enum": [ + "OnDemand", + "Scheduled" + ], + "x-ms-enum": { + "name": "ExecutionType", + "modelAsString": true + } + }, + "status": { + "description": "The status of the report execution.", + "type": "string", + "enum": [ + "Queud", + "InProgress", + "Completed", + "Failed", + "Timeout" + ], + "x-ms-enum": { + "name": "ExecutionStatus", + "modelAsString": true + } + }, + "submittedBy": { + "description": "The identifier for the entity that executed the report. For OnDemand executions, it is the email id. For Scheduled executions, it is the constant value - System.", + "type": "string" + }, + "submittedTime": { + "description": "The time when report was queued to be executed.", + "type": "string", + "format": "date-time" + }, + "processingStartTime": { + "description": "The time when report was picked up to be executed.", + "type": "string", + "format": "date-time" + }, + "processingEndTime": { + "description": "The time when report execution finished.", + "type": "string", + "format": "date-time" + }, + "fileName": { + "description": "The name of the file report got written to.", + "type": "string" + }, + "reportSettings": { + "$ref": "#/definitions/CommonReportProperties" + } + } + }, "DimensionsListResult": { "description": "Result of listing dimensions. It contains a list of available dimensions.", "type": "object", @@ -1897,10 +2161,10 @@ "type": "string", "x-ms-parameter-location": "method" }, - "reportConfigNameParameter": { - "name": "reportConfigName", + "reportNameParameter": { + "name": "reportName", "in": "path", - "description": "Report Config Name.", + "description": "Report Name.", "required": true, "type": "string", "x-ms-parameter-location": "method" diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-09-01-preview/examples/ReportConfig.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-09-01-preview/examples/Report.json similarity index 100% rename from specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-09-01-preview/examples/ReportConfig.json rename to specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-09-01-preview/examples/Report.json diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-09-01-preview/examples/ReportConfigCreateOrUpdate.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-09-01-preview/examples/ReportCreateOrUpdate.json similarity index 100% rename from specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-09-01-preview/examples/ReportConfigCreateOrUpdate.json rename to specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-09-01-preview/examples/ReportCreateOrUpdate.json diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-09-01-preview/examples/ReportConfigDelete.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-09-01-preview/examples/ReportDelete.json similarity index 100% rename from specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-09-01-preview/examples/ReportConfigDelete.json rename to specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-09-01-preview/examples/ReportDelete.json diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-09-01-preview/examples/ReportExecution.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-09-01-preview/examples/ReportExecution.json new file mode 100644 index 000000000000..9e6d48eeefe9 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-09-01-preview/examples/ReportExecution.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "api-version": "2018-09-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "MYDEVTESTRG", + "reportConfigName": "TestReport" + }, + "responses": { + "200": { + } + } + } \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-09-01-preview/examples/ReportExecutionList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-09-01-preview/examples/ReportExecutionList.json new file mode 100644 index 000000000000..04dc6871db39 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-09-01-preview/examples/ReportExecutionList.json @@ -0,0 +1,203 @@ +{ + "parameters": { + "api-version": "2018-09-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "MYDEVTESTRG" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/{subscription-id}/providers/Microsoft.CostManagement/reportconfigs/JohnDoeSchedule/Run/1e25d58a-a3b0-4916-9542-6e04a89bc100", + "name": null, + "type": null, + "eTag": null, + "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", + "reportSettings": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "reports", + "rootFolderPath": "ScheduledTestsForJohnDoe" + } + }, + "definition": { + "type": "Usage", + "timeframe": "Custom", + "timePeriod": { + "from": "2018-06-01T00:00:00Z", + "to": "2018-10-31T00:00:00Z" + }, + "dataset": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "InstanceId", + "ResourceLocation", + "PreTaxCost" + ] + }, + "aggregation": { + "costSum": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [ + { + "columnType": "Dimension", + "name": "SubscriptionName" + } + ], + "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" + ] + } + } + ] + } + } + } + } + } + }, + { + "id": "subscriptions/{subscription-id}/providers/Microsoft.CostManagement/reportconfigs/JohnDoeSchedule/Run/11ac6811-dca3-46ad-b326-4704cf0c58ef", + "name": null, + "type": null, + "eTag": null, + "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", + "reportSettings": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "reports", + "rootFolderPath": "ScheduledTestsForJohnDoe" + } + }, + "definition": { + "type": "Usage", + "timeframe": "Custom", + "timePeriod": { + "from": "2018-06-01T00:00:00Z", + "to": "2018-10-31T00:00:00Z" + }, + "dataset": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "InstanceId", + "ResourceLocation", + "PreTaxCost" + ] + }, + "aggregation": { + "costSum": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [ + { + "columnType": "Dimension", + "name": "SubscriptionName" + } + ], + "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" + ] + } + } + ] + } + } + } + } + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-09-01-preview/examples/ReportConfigList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-09-01-preview/examples/ReportList.json similarity index 100% rename from specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-09-01-preview/examples/ReportConfigList.json rename to specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-09-01-preview/examples/ReportList.json diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/costmanagement.json index c3183d2873c9..b9a8f16842b7 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/costmanagement.json @@ -33,364 +33,6 @@ } }, "paths": { - "/subscriptions/{subscriptionId}/providers/Microsoft.CostManagement/reportconfigs": { - "get": { - "tags": [ - "Reports" - ], - "operationId": "ReportConfig_List", - "description": "Lists all report configs for a subscription.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" - }, - "x-ms-examples": { - "ReportConfigList": { - "$ref": "./examples/ReportConfigList.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/apiVersionParameter" - }, - { - "$ref": "#/parameters/subscriptionIdParameter" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/ReportConfigListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CostManagement/reportconfigs": { - "get": { - "tags": [ - "Reports" - ], - "operationId": "ReportConfig_ListByResourceGroupName", - "description": "Lists all report configs for a resource group under a subscription.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" - }, - "x-ms-examples": { - "ReportConfigList": { - "$ref": "./examples/ReportConfigList.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/apiVersionParameter" - }, - { - "$ref": "#/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/parameters/resourceGroupNameParameter" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/ReportConfigListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/subscriptions/{subscriptionId}/providers/Microsoft.CostManagement/reportconfigs/{reportConfigName}": { - "get": { - "tags": [ - "Reports" - ], - "operationId": "ReportConfig_Get", - "description": "Gets the report config for a subscription by report config name.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" - }, - "x-ms-examples": { - "Report": { - "$ref": "./examples/ReportConfig.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/apiVersionParameter" - }, - { - "$ref": "#/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/parameters/reportConfigNameParameter" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/ReportConfig" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - }, - "put": { - "tags": [ - "Reports" - ], - "operationId": "ReportConfig_CreateOrUpdate", - "description": "The operation to create or update a report config. 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/costmanagement/" - }, - "x-ms-examples": { - "CreateOrUpdateReport": { - "$ref": "./examples/ReportConfigCreateOrUpdate.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/apiVersionParameter" - }, - { - "$ref": "#/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/parameters/reportConfigNameParameter" - }, - { - "name": "parameters", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/ReportConfig" - }, - "description": "Parameters supplied to the CreateOrUpdate Report Config operation." - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/ReportConfig" - } - }, - "201": { - "description": "Created.", - "schema": { - "$ref": "#/definitions/ReportConfig" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - }, - "delete": { - "tags": [ - "Reports" - ], - "operationId": "ReportConfig_Delete", - "description": "The operation to delete a report.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" - }, - "x-ms-examples": { - "DeleteReport": { - "$ref": "./examples/ReportConfigDelete.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/apiVersionParameter" - }, - { - "$ref": "#/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/parameters/reportConfigNameParameter" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded." - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CostManagement/reportconfigs/{reportConfigName}": { - "get": { - "tags": [ - "Reports" - ], - "operationId": "ReportConfig_GetByResourceGroupName", - "description": "Gets the report config for a resource group under a subscription by report config name.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" - }, - "x-ms-examples": { - "ReportConfig": { - "$ref": "./examples/ReportConfig.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/apiVersionParameter" - }, - { - "$ref": "#/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/parameters/reportConfigNameParameter" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/ReportConfig" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - }, - "put": { - "tags": [ - "Reports" - ], - "operationId": "ReportConfig_CreateOrUpdateByResourceGroupName", - "description": "The operation to create or update a report config. 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/costmanagement/" - }, - "x-ms-examples": { - "CreateOrUpdateReport": { - "$ref": "./examples/ReportConfigCreateOrUpdate.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/apiVersionParameter" - }, - { - "$ref": "#/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/parameters/reportConfigNameParameter" - }, - { - "name": "parameters", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/ReportConfig" - }, - "description": "Parameters supplied to the CreateOrUpdate Report Config operation." - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/ReportConfig" - } - }, - "201": { - "description": "Created.", - "schema": { - "$ref": "#/definitions/ReportConfig" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - }, - "delete": { - "tags": [ - "Reports" - ], - "operationId": "ReportConfig_DeleteByResourceGroupName", - "description": "The operation to delete a report config.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" - }, - "x-ms-examples": { - "DeleteReport": { - "$ref": "./examples/ReportConfigDelete.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/apiVersionParameter" - }, - { - "$ref": "#/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/parameters/reportConfigNameParameter" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded." - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/dimensions": { "get": { "tags": [ @@ -831,118 +473,6 @@ }, "x-ms-azure-resource": true }, - "ReportConfigListResult": { - "description": "Result of listing report configs. It contains a list of available report configurations in the scope provided.", - "properties": { - "value": { - "description": "The list of report configs.", - "type": "array", - "readOnly": true, - "items": { - "$ref": "#/definitions/ReportConfig" - } - } - } - }, - "ReportConfig": { - "description": "A report config resource.", - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/Resource" - } - ], - "properties": { - "properties": { - "x-ms-client-flatten": true, - "$ref": "#/definitions/ReportConfigProperties", - "title": "Report config properties" - } - } - }, - "ReportConfigProperties": { - "description": "The properties of the report config.", - "properties": { - "schedule": { - "description": "Has schedule information for the report config.", - "$ref": "#/definitions/ReportConfigSchedule" - }, - "format": { - "description": "The format of the report being delivered.", - "type": "string", - "enum": [ - "Csv" - ], - "x-ms-enum": { - "name": "FormatType", - "modelAsString": true - } - }, - "deliveryInfo": { - "description": "Has delivery information for the report config.", - "$ref": "#/definitions/ReportConfigDeliveryInfo" - }, - "definition": { - "description": "Has definition for the report config.", - "$ref": "#/definitions/ReportConfigDefinition" - } - }, - "required": [ - "deliveryInfo", - "definition" - ] - }, - "ReportConfigSchedule": { - "description": "The schedule associated with a report config.", - "properties": { - "status": { - "description": "The status of the schedule. Whether active or not. If inactive, the report's scheduled execution 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/ReportConfigRecurrencePeriod" - } - }, - "required": [ - "recurrence", - "recurrencePeriod" - ] - }, - "ReportConfigDeliveryInfo": { - "description": "The delivery information associated with a report config.", - "properties": { - "destination": { - "description": "Has destination for the report being delivered.", - "$ref": "#/definitions/ReportConfigDeliveryDestination" - } - }, - "required": [ - "destination" - ] - }, "ReportConfigDefinition": { "description": "The definition of a report config.", "properties": { @@ -985,45 +515,6 @@ "timeframe" ] }, - "ReportConfigRecurrencePeriod": { - "description": "The start and end date for recurrence schedule.", - "properties": { - "from": { - "description": "The start date of recurrence.", - "type": "string", - "format": "date-time" - }, - "to": { - "description": "The end date of recurrence. If not provided, we default this to 10 years from the start date.", - "type": "string", - "format": "date-time" - } - }, - "required": [ - "from" - ] - }, - "ReportConfigDeliveryDestination": { - "description": "The destination information for the delivery of the report.", - "properties": { - "resourceId": { - "description": "The resource id of the storage account where reports will be delivered.", - "type": "string" - }, - "container": { - "description": "The name of the container where reports will be uploaded.", - "type": "string" - }, - "rootFolderPath": { - "description": "The name of the directory where reports will be uploaded.", - "type": "string" - } - }, - "required": [ - "resourceId", - "container" - ] - }, "ReportConfigTimePeriod": { "description": "The start and end date for pulling data for the report.", "properties": { @@ -1367,14 +858,6 @@ "required": true, "type": "string", "x-ms-parameter-location": "method" - }, - "reportConfigNameParameter": { - "name": "reportConfigName", - "in": "path", - "description": "Report Config Name.", - "required": true, - "type": "string", - "x-ms-parameter-location": "method" } } } \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/ReportConfig.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/ReportConfig.json deleted file mode 100644 index 4e247bd74fc9..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/ReportConfig.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "parameters": { - "api-version": "2018-05-31", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "MYDEVTESTRG", - "reportConfigName": "TestReportConfig" - }, - "responses": { - "200": { - "body": { - "id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/reportconfigs/TestReportConfig", - "name": "TestReportConfig", - "type": "Microsoft.Consumption/reportconfigs", - "properties": { - "format": "Csv", - "deliveryInfo": { - "destination": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", - "container": "reports", - "rootFolderPath": "ad-hoc" - } - }, - "definition":{ - "type": "Usage", - "timeframe": "Custom", - "timePeriod": { - "from": "2018-06-01T00:00:00Z", - "to": "2018-10-31T00:00:00Z" - }, - "dataset": { - "granularity": "Daily", - "configuration": { - "columns": [ - "UsageDate", - "MeterId", - "InstanceId", - "ResourceLocation", - "UsageQuantity" - ] - }, - "aggregation": { - "usageSum": { - "name": "UsageQuantity", - "function": "Sum" - } - }, - "grouping": [ - { - "columnType": "Dimension", - "name": "SubscriptionName" - }, - { - "columnType": "Tag", - "name": "Environment" - } - ], - "filter":{ - "and": [ - { - "dimension": { - "name": "ResourceLocation", - "operator": "In", - "values": [ - "East US", - "West Europe" - ] - } - }, - { - "tag": { - "name": "Environment", - "operator": "Contains", - "values": [ - "UAT", - "Prod" - ] - } - } - ] - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/ReportConfigCreateOrUpdate.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/ReportConfigCreateOrUpdate.json deleted file mode 100644 index 2125aa4fd520..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/ReportConfigCreateOrUpdate.json +++ /dev/null @@ -1,287 +0,0 @@ -{ - "parameters": { - "api-version": "2018-05-31", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "MYDEVTESTRG", - "reportConfigName": "TestReportConfig", - "parameters": { - "properties": { - "schedule":{ - "status": "Active", - "recurrence": "Weekly", - "recurrencePeriod": { - "from":"2018-06-01T00:00:00Z", - "to":"2018-10-31T00:00:00Z" - } - }, - "format": "Csv", - "deliveryInfo": { - "destination": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", - "container": "reports", - "rootFolderPath": "ad-hoc" - } - }, - "definition":{ - "type": "Usage", - "timeframe": "MonthToDate", - "dataset": { - "granularity": "Daily", - "configuration": { - "columns": [ - "Date", - "MeterId", - "InstanceId", - "ResourceLocation", - "PreTaxCost" - ] - }, - "aggregation": { - "costSum": { - "name": "PreTaxCost", - "function": "Sum" - } - }, - "grouping": [ - { - "columnType": "Dimension", - "name": "SubscriptionName" - }, - { - "columnType": "Tag", - "name": "Environment" - } - ], - "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": { - "201": { - "body": { - "id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/reportconfigs/TestReportConfig", - "name": "TestReportConfig", - "type": "Microsoft.Consumption/reportconfigs", - "properties": { - "schedule":{ - "status": "Active", - "recurrence": "Weekly", - "recurrencePeriod": { - "from":"2018-06-01T00:00:00Z", - "to":"2018-10-31T00:00:00Z" - } - }, - "format": "Csv", - "deliveryInfo": { - "destination": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", - "container": "reports", - "rootFolderPath": "ad-hoc" - } - }, - "definition":{ - "type": "Usage", - "timeframe": "MonthToDate", - "dataset": { - "granularity": "Daily", - "configuration": { - "columns": [ - "Date", - "MeterId", - "InstanceId", - "ResourceLocation", - "PreTaxCost" - ] - }, - "aggregation": { - "costSum": { - "name": "PreTaxCost", - "function": "Sum" - } - }, - "grouping": [ - { - "columnType": "Dimension", - "name": "SubscriptionName" - }, - { - "columnType": "Tag", - "name": "Environment" - } - ], - "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" - ] - } - } - ] - } - } - } - } - } - }, - "200": { - "body": { - "id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/reportconfigs/TestReportConfig", - "name": "TestReportConfig", - "type": "Microsoft.Consumption/reportconfigs", - "properties": { - "schedule":{ - "status": "Active", - "recurrence": "Weekly", - "recurrencePeriod": { - "from":"2018-06-01T00:00:00Z", - "to":"2018-10-31T00:00:00Z" - } - }, - "format": "Csv", - "deliveryInfo": { - "destination": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", - "container": "reports", - "rootFolderPath": "ad-hoc" - } - }, - "definition":{ - "type": "Usage", - "timeframe": "MonthToDate", - "dataset": { - "granularity": "Daily", - "configuration": { - "columns": [ - "Date", - "MeterId", - "InstanceId", - "ResourceLocation", - "PreTaxCost" - ] - }, - "aggregation": { - "costSum": { - "name": "PreTaxCost", - "function": "Sum" - } - }, - "grouping": [ - { - "columnType": "Dimension", - "name": "SubscriptionName" - }, - { - "columnType": "Tag", - "name": "Environment" - } - ], - "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" - ] - } - } - ] - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/ReportConfigDelete.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/ReportConfigDelete.json deleted file mode 100644 index 0a47186446a0..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/ReportConfigDelete.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "parameters": { - "api-version": "2018-05-31", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "MYDEVTESTRG", - "reportConfigName": "TestReport" - }, - "responses": { - "200": { - } - } -} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/ReportConfigList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/ReportConfigList.json deleted file mode 100644 index 6988b522bdb3..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/ReportConfigList.json +++ /dev/null @@ -1,174 +0,0 @@ -{ - "parameters": { - "api-version": "2018-05-31", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "MYDEVTESTRG" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/reportconfigs/TestReportConfig1", - "name": "TestReportConfig1", - "type": "Microsoft.Consumption/reportconfigs", - "properties": { - "format": "Csv", - "deliveryInfo": { - "destination": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", - "container": "reports", - "rootFolderPath": "ad-hoc" - } - }, - "definition":{ - "type": "Usage", - "timeframe": "Custom", - "timePeriod": { - "from": "2018-06-01T00:00:00Z", - "to": "2018-10-31T00:00:00Z" - }, - "dataset": { - "granularity": "Daily", - "configuration": { - "columns": [ - "Date", - "MeterId", - "InstanceId", - "ResourceLocation", - "PreTaxCost" - ] - }, - "aggregation": { - "costSum": { - "name": "PreTaxCost", - "function": "Sum" - } - }, - "grouping": [ - { - "columnType": "Dimension", - "name": "SubscriptionName" - } - ], - "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" - ] - } - } - ] - } - } - } - } - }, - { - "id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/reportconfigs/TestReportConfig2", - "name": "TestReportConfig2", - "type": "Microsoft.Consumption/reportconfigs", - "properties": { - "schedule":{ - "status": "Active", - "recurrence": "Weekly", - "recurrencePeriod": { - "from":"2018-06-01T00:00:00Z", - "to":"2018-10-31T00:00:00Z" - } - }, - "format": "Csv", - "deliveryInfo": { - "destination": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", - "container": "reports", - "rootFolderPath": "ad-hoc" - } - }, - "definition":{ - "type": "Usage", - "timeframe": "WeekToDate", - "dataset": { - "granularity": "Daily", - "configuration": { - "columns": [ - "Date", - "MeterId", - "InstanceId", - "ResourceLocation", - "UsageQuantity" - ] - }, - "aggregation": { - "usageSum": { - "name": "UsageQuantity", - "function": "Sum" - } - }, - "grouping": [ - { - "columnType": "Tag", - "name": "Environment" - } - ], - "filter":{ - "and": [ - { - "dimension": { - "name": "ResourceLocation", - "operator": "In", - "values": [ - "East US", - "West Europe" - ] - } - }, - { - "tag": { - "name": "Environment", - "operator": "In", - "values": [ - "UAT", - "Prod" - ] - } - } - ] - } - } - } - } - } - ] - } - } - } -} \ No newline at end of file From 41ff04d4ffb063505850fbecd4dd6061f4072f29 Mon Sep 17 00:00:00 2001 From: Shalin Ved Date: Tue, 21 Aug 2018 14:47:46 -0700 Subject: [PATCH 13/13] Undo remove of API from stable version --- .../2018-09-01-preview/costmanagement.json | 4 +- .../stable/2018-05-31/costmanagement.json | 517 ++++++++++++++++++ .../2018-05-31/examples/ReportConfig.json | 87 +++ .../examples/ReportConfigCreateOrUpdate.json | 287 ++++++++++ .../examples/ReportConfigDelete.json | 11 + .../2018-05-31/examples/ReportConfigList.json | 174 ++++++ 6 files changed, 1078 insertions(+), 2 deletions(-) create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/ReportConfig.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/ReportConfigCreateOrUpdate.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/ReportConfigDelete.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/ReportConfigList.json diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-09-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-09-01-preview/costmanagement.json index cfaa42813206..0a61fc0efb72 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-09-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-09-01-preview/costmanagement.json @@ -392,7 +392,7 @@ } }, "/subscriptions/{subscriptionId}/providers/Microsoft.CostManagement/reports/{reportName}/run": { - "put": { + "post": { "tags": [ "Reports" ], @@ -431,7 +431,7 @@ } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CostManagement/reports/{reportName}/run": { - "put": { + "post": { "tags": [ "Reports" ], diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/costmanagement.json index b9a8f16842b7..c3183d2873c9 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/costmanagement.json @@ -33,6 +33,364 @@ } }, "paths": { + "/subscriptions/{subscriptionId}/providers/Microsoft.CostManagement/reportconfigs": { + "get": { + "tags": [ + "Reports" + ], + "operationId": "ReportConfig_List", + "description": "Lists all report configs for a subscription.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ReportConfigList": { + "$ref": "./examples/ReportConfigList.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ReportConfigListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CostManagement/reportconfigs": { + "get": { + "tags": [ + "Reports" + ], + "operationId": "ReportConfig_ListByResourceGroupName", + "description": "Lists all report configs for a resource group under a subscription.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ReportConfigList": { + "$ref": "./examples/ReportConfigList.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ReportConfigListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.CostManagement/reportconfigs/{reportConfigName}": { + "get": { + "tags": [ + "Reports" + ], + "operationId": "ReportConfig_Get", + "description": "Gets the report config for a subscription by report config name.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "Report": { + "$ref": "./examples/ReportConfig.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/reportConfigNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ReportConfig" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "tags": [ + "Reports" + ], + "operationId": "ReportConfig_CreateOrUpdate", + "description": "The operation to create or update a report config. 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/costmanagement/" + }, + "x-ms-examples": { + "CreateOrUpdateReport": { + "$ref": "./examples/ReportConfigCreateOrUpdate.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/reportConfigNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ReportConfig" + }, + "description": "Parameters supplied to the CreateOrUpdate Report Config operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ReportConfig" + } + }, + "201": { + "description": "Created.", + "schema": { + "$ref": "#/definitions/ReportConfig" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "tags": [ + "Reports" + ], + "operationId": "ReportConfig_Delete", + "description": "The operation to delete a report.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "DeleteReport": { + "$ref": "./examples/ReportConfigDelete.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/reportConfigNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CostManagement/reportconfigs/{reportConfigName}": { + "get": { + "tags": [ + "Reports" + ], + "operationId": "ReportConfig_GetByResourceGroupName", + "description": "Gets the report config for a resource group under a subscription by report config name.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ReportConfig": { + "$ref": "./examples/ReportConfig.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/reportConfigNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ReportConfig" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "tags": [ + "Reports" + ], + "operationId": "ReportConfig_CreateOrUpdateByResourceGroupName", + "description": "The operation to create or update a report config. 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/costmanagement/" + }, + "x-ms-examples": { + "CreateOrUpdateReport": { + "$ref": "./examples/ReportConfigCreateOrUpdate.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/reportConfigNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ReportConfig" + }, + "description": "Parameters supplied to the CreateOrUpdate Report Config operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ReportConfig" + } + }, + "201": { + "description": "Created.", + "schema": { + "$ref": "#/definitions/ReportConfig" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "tags": [ + "Reports" + ], + "operationId": "ReportConfig_DeleteByResourceGroupName", + "description": "The operation to delete a report config.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "DeleteReport": { + "$ref": "./examples/ReportConfigDelete.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/reportConfigNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/dimensions": { "get": { "tags": [ @@ -473,6 +831,118 @@ }, "x-ms-azure-resource": true }, + "ReportConfigListResult": { + "description": "Result of listing report configs. It contains a list of available report configurations in the scope provided.", + "properties": { + "value": { + "description": "The list of report configs.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/ReportConfig" + } + } + } + }, + "ReportConfig": { + "description": "A report config resource.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ReportConfigProperties", + "title": "Report config properties" + } + } + }, + "ReportConfigProperties": { + "description": "The properties of the report config.", + "properties": { + "schedule": { + "description": "Has schedule information for the report config.", + "$ref": "#/definitions/ReportConfigSchedule" + }, + "format": { + "description": "The format of the report being delivered.", + "type": "string", + "enum": [ + "Csv" + ], + "x-ms-enum": { + "name": "FormatType", + "modelAsString": true + } + }, + "deliveryInfo": { + "description": "Has delivery information for the report config.", + "$ref": "#/definitions/ReportConfigDeliveryInfo" + }, + "definition": { + "description": "Has definition for the report config.", + "$ref": "#/definitions/ReportConfigDefinition" + } + }, + "required": [ + "deliveryInfo", + "definition" + ] + }, + "ReportConfigSchedule": { + "description": "The schedule associated with a report config.", + "properties": { + "status": { + "description": "The status of the schedule. Whether active or not. If inactive, the report's scheduled execution 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/ReportConfigRecurrencePeriod" + } + }, + "required": [ + "recurrence", + "recurrencePeriod" + ] + }, + "ReportConfigDeliveryInfo": { + "description": "The delivery information associated with a report config.", + "properties": { + "destination": { + "description": "Has destination for the report being delivered.", + "$ref": "#/definitions/ReportConfigDeliveryDestination" + } + }, + "required": [ + "destination" + ] + }, "ReportConfigDefinition": { "description": "The definition of a report config.", "properties": { @@ -515,6 +985,45 @@ "timeframe" ] }, + "ReportConfigRecurrencePeriod": { + "description": "The start and end date for recurrence schedule.", + "properties": { + "from": { + "description": "The start date of recurrence.", + "type": "string", + "format": "date-time" + }, + "to": { + "description": "The end date of recurrence. If not provided, we default this to 10 years from the start date.", + "type": "string", + "format": "date-time" + } + }, + "required": [ + "from" + ] + }, + "ReportConfigDeliveryDestination": { + "description": "The destination information for the delivery of the report.", + "properties": { + "resourceId": { + "description": "The resource id of the storage account where reports will be delivered.", + "type": "string" + }, + "container": { + "description": "The name of the container where reports will be uploaded.", + "type": "string" + }, + "rootFolderPath": { + "description": "The name of the directory where reports will be uploaded.", + "type": "string" + } + }, + "required": [ + "resourceId", + "container" + ] + }, "ReportConfigTimePeriod": { "description": "The start and end date for pulling data for the report.", "properties": { @@ -858,6 +1367,14 @@ "required": true, "type": "string", "x-ms-parameter-location": "method" + }, + "reportConfigNameParameter": { + "name": "reportConfigName", + "in": "path", + "description": "Report Config Name.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" } } } \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/ReportConfig.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/ReportConfig.json new file mode 100644 index 000000000000..228c1752d768 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/ReportConfig.json @@ -0,0 +1,87 @@ +{ + "parameters": { + "api-version": "2018-05-31", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "MYDEVTESTRG", + "reportConfigName": "TestReportConfig" + }, + "responses": { + "200": { + "body": { + "id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/reportconfigs/TestReportConfig", + "name": "TestReportConfig", + "type": "Microsoft.Consumption/reportconfigs", + "properties": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "reports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "Usage", + "timeframe": "Custom", + "timePeriod": { + "from": "2018-06-01T00:00:00Z", + "to": "2018-10-31T00:00:00Z" + }, + "dataset": { + "granularity": "Daily", + "configuration": { + "columns": [ + "UsageDate", + "MeterId", + "InstanceId", + "ResourceLocation", + "UsageQuantity" + ] + }, + "aggregation": { + "usageSum": { + "name": "UsageQuantity", + "function": "Sum" + } + }, + "grouping": [ + { + "columnType": "Dimension", + "name": "SubscriptionName" + }, + { + "columnType": "Tag", + "name": "Environment" + } + ], + "filter": { + "and": [ + { + "dimension": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "Contains", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/ReportConfigCreateOrUpdate.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/ReportConfigCreateOrUpdate.json new file mode 100644 index 000000000000..57353a5bde94 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/ReportConfigCreateOrUpdate.json @@ -0,0 +1,287 @@ +{ + "parameters": { + "api-version": "2018-05-31", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "MYDEVTESTRG", + "reportConfigName": "TestReportConfig", + "parameters": { + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2018-06-01T00:00:00Z", + "to": "2018-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "reports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "InstanceId", + "ResourceLocation", + "PreTaxCost" + ] + }, + "aggregation": { + "costSum": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [ + { + "columnType": "Dimension", + "name": "SubscriptionName" + }, + { + "columnType": "Tag", + "name": "Environment" + } + ], + "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": { + "201": { + "body": { + "id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/reportconfigs/TestReportConfig", + "name": "TestReportConfig", + "type": "Microsoft.Consumption/reportconfigs", + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2018-06-01T00:00:00Z", + "to": "2018-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "reports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "InstanceId", + "ResourceLocation", + "PreTaxCost" + ] + }, + "aggregation": { + "costSum": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [ + { + "columnType": "Dimension", + "name": "SubscriptionName" + }, + { + "columnType": "Tag", + "name": "Environment" + } + ], + "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" + ] + } + } + ] + } + } + } + } + } + }, + "200": { + "body": { + "id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/reportconfigs/TestReportConfig", + "name": "TestReportConfig", + "type": "Microsoft.Consumption/reportconfigs", + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2018-06-01T00:00:00Z", + "to": "2018-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "reports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "InstanceId", + "ResourceLocation", + "PreTaxCost" + ] + }, + "aggregation": { + "costSum": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [ + { + "columnType": "Dimension", + "name": "SubscriptionName" + }, + { + "columnType": "Tag", + "name": "Environment" + } + ], + "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" + ] + } + } + ] + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/ReportConfigDelete.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/ReportConfigDelete.json new file mode 100644 index 000000000000..456c1dfc1662 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/ReportConfigDelete.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "api-version": "2018-05-31", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "MYDEVTESTRG", + "reportConfigName": "TestReport" + }, + "responses": { + "200": {} + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/ReportConfigList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/ReportConfigList.json new file mode 100644 index 000000000000..76b8d07fec46 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/ReportConfigList.json @@ -0,0 +1,174 @@ +{ + "parameters": { + "api-version": "2018-05-31", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "MYDEVTESTRG" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/reportconfigs/TestReportConfig1", + "name": "TestReportConfig1", + "type": "Microsoft.Consumption/reportconfigs", + "properties": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "reports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "Usage", + "timeframe": "Custom", + "timePeriod": { + "from": "2018-06-01T00:00:00Z", + "to": "2018-10-31T00:00:00Z" + }, + "dataset": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "InstanceId", + "ResourceLocation", + "PreTaxCost" + ] + }, + "aggregation": { + "costSum": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [ + { + "columnType": "Dimension", + "name": "SubscriptionName" + } + ], + "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" + ] + } + } + ] + } + } + } + } + }, + { + "id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/reportconfigs/TestReportConfig2", + "name": "TestReportConfig2", + "type": "Microsoft.Consumption/reportconfigs", + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2018-06-01T00:00:00Z", + "to": "2018-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "reports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "Usage", + "timeframe": "WeekToDate", + "dataset": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "InstanceId", + "ResourceLocation", + "UsageQuantity" + ] + }, + "aggregation": { + "usageSum": { + "name": "UsageQuantity", + "function": "Sum" + } + }, + "grouping": [ + { + "columnType": "Tag", + "name": "Environment" + } + ], + "filter": { + "and": [ + { + "dimension": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + } + } + } + } + } + ] + } + } + } +} \ No newline at end of file