diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-08-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-08-01-preview/costmanagement.json index f5509a27a7e1..bcb6e47357e6 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-08-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-08-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,14 @@ "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": [ @@ -375,7 +375,7 @@ "$ref": "#/parameters/resourceGroupNameParameter" }, { - "$ref": "#/parameters/reportConfigNameParameter" + "$ref": "#/parameters/reportNameParameter" } ], "responses": { @@ -391,6 +391,174 @@ } } }, + "/subscriptions/{subscriptionId}/providers/Microsoft.CostManagement/reports/{reportName}/run": { + "post": { + "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": { + "post": { + "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": [ + { + "$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}/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": { + "type": { "description": "Has type of the column to group.", - "$ref": "#/definitions/ReportConfigColumnType" + "$ref": "#/definitions/ReportColumnType" }, "name": { "description": "The name of the column to group.", @@ -1447,18 +1624,18 @@ } }, "required": [ - "columnType", + "type", "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-08-01-preview/examples/ReportConfig.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-08-01-preview/examples/Report.json similarity index 89% rename from specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-08-01-preview/examples/ReportConfig.json rename to specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-08-01-preview/examples/Report.json index c02bfe835494..f26608b34c6c 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-08-01-preview/examples/ReportConfig.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-08-01-preview/examples/Report.json @@ -3,14 +3,14 @@ "api-version": "2018-08-01-preview", "subscriptionId": "00000000-0000-0000-0000-000000000000", "resourceGroupName": "MYDEVTESTRG", - "reportConfigName": "TestReportConfig" + "reportName": "TestReport" }, "responses": { "200": { "body": { - "id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/reportconfigs/TestReportConfig", - "name": "TestReportConfig", - "type": "Microsoft.Consumption/reportconfigs", + "id": "subscriptions/{subscription-id}/providers/Microsoft.CostManagement/reports/TestReport", + "name": "TestReport", + "type": "Microsoft.CostManagement/reports", "properties": { "format": "Csv", "deliveryInfo": { @@ -46,11 +46,11 @@ }, "grouping": [ { - "columnType": "Dimension", + "type": "Dimension", "name": "SubscriptionName" }, { - "columnType": "Tag", + "type": "Tag", "name": "Environment" } ], diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-08-01-preview/examples/ReportConfigCreateOrUpdate.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-08-01-preview/examples/ReportCreateOrUpdate.json similarity index 93% rename from specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-08-01-preview/examples/ReportConfigCreateOrUpdate.json rename to specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-08-01-preview/examples/ReportCreateOrUpdate.json index 7a0bbfc71cf2..2baf4bec33cf 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-08-01-preview/examples/ReportConfigCreateOrUpdate.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-08-01-preview/examples/ReportCreateOrUpdate.json @@ -3,7 +3,7 @@ "api-version": "2018-08-01-preview", "subscriptionId": "00000000-0000-0000-0000-000000000000", "resourceGroupName": "MYDEVTESTRG", - "reportConfigName": "TestReportConfig", + "reportName": "TestReport", "parameters": { "properties": { "schedule":{ @@ -44,11 +44,11 @@ }, "grouping": [ { - "columnType": "Dimension", + "type": "Dimension", "name": "SubscriptionName" }, { - "columnType": "Tag", + "type": "Tag", "name": "Environment" } ], @@ -97,9 +97,9 @@ "responses": { "201": { "body": { - "id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/reportconfigs/TestReportConfig", - "name": "TestReportConfig", - "type": "Microsoft.Consumption/reportconfigs", + "id": "subscriptions/{subscription-id}/providers/Microsoft.CostManagement/reports/TestReport", + "name": "TestReport", + "type": "Microsoft.CostManagement/reports", "properties": { "schedule":{ "status": "Active", @@ -139,11 +139,11 @@ }, "grouping": [ { - "columnType": "Dimension", + "type": "Dimension", "name": "SubscriptionName" }, { - "columnType": "Tag", + "type": "Tag", "name": "Environment" } ], @@ -191,9 +191,9 @@ }, "200": { "body": { - "id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/reportconfigs/TestReportConfig", - "name": "TestReportConfig", - "type": "Microsoft.Consumption/reportconfigs", + "id": "subscriptions/{subscription-id}/providers/Microsoft.CostManagement/reports/TestReport", + "name": "TestReport", + "type": "Microsoft.CostManagement/reports", "properties": { "schedule":{ "status": "Active", @@ -233,11 +233,11 @@ }, "grouping": [ { - "columnType": "Dimension", + "type": "Dimension", "name": "SubscriptionName" }, { - "columnType": "Tag", + "type": "Tag", "name": "Environment" } ], diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-08-01-preview/examples/ReportConfigDelete.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-08-01-preview/examples/ReportDelete.json similarity index 84% rename from specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-08-01-preview/examples/ReportConfigDelete.json rename to specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-08-01-preview/examples/ReportDelete.json index c965fc80a015..8a0a9bac45dc 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-08-01-preview/examples/ReportConfigDelete.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-08-01-preview/examples/ReportDelete.json @@ -3,7 +3,7 @@ "api-version": "2018-08-01-preview", "subscriptionId": "00000000-0000-0000-0000-000000000000", "resourceGroupName": "MYDEVTESTRG", - "reportConfigName": "TestReport" + "reportName": "TestReport" }, "responses": { "200": { diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-08-01-preview/examples/ReportExecution.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-08-01-preview/examples/ReportExecution.json new file mode 100644 index 000000000000..bfb06083036c --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-08-01-preview/examples/ReportExecution.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "api-version": "2018-09-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "MYDEVTESTRG", + "reportName": "TestReport" + }, + "responses": { + "200": { + } + } + } \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-08-01-preview/examples/ReportExecutionList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-08-01-preview/examples/ReportExecutionList.json new file mode 100644 index 000000000000..4f4a87092399 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-08-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/reports/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": [ + { + "type": "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/reports/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": [ + { + "type": "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-08-01-preview/examples/ReportConfigList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-08-01-preview/examples/ReportList.json similarity index 93% rename from specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-08-01-preview/examples/ReportConfigList.json rename to specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-08-01-preview/examples/ReportList.json index d804939b41cf..e2411f79e956 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-08-01-preview/examples/ReportConfigList.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2018-08-01-preview/examples/ReportList.json @@ -9,9 +9,9 @@ "body": { "value": [ { - "id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/reportconfigs/TestReportConfig1", - "name": "TestReportConfig1", - "type": "Microsoft.Consumption/reportconfigs", + "id": "subscriptions/{subscription-id}/providers/Microsoft.CostManagement/reports/TestReport1", + "name": "TestReport1", + "type": "Microsoft.CostManagement/reports", "properties": { "format": "Csv", "deliveryInfo": { @@ -47,7 +47,7 @@ }, "grouping": [ { - "columnType": "Dimension", + "type": "Dimension", "name": "SubscriptionName" } ], @@ -93,9 +93,9 @@ } }, { - "id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/reportconfigs/TestReportConfig2", - "name": "TestReportConfig2", - "type": "Microsoft.Consumption/reportconfigs", + "id": "subscriptions/{subscription-id}/providers/Microsoft.CostManagement/reports/TestReport2", + "name": "TestReport2", + "type": "Microsoft.CostManagement/reports", "properties": { "schedule":{ "status": "Active", @@ -135,7 +135,7 @@ }, "grouping": [ { - "columnType": "Tag", + "type": "Tag", "name": "Environment" } ], 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 index 4e247bd74fc9..228c1752d768 100644 --- 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 @@ -20,7 +20,7 @@ "rootFolderPath": "ad-hoc" } }, - "definition":{ + "definition": { "type": "Usage", "timeframe": "Custom", "timePeriod": { @@ -54,7 +54,7 @@ "name": "Environment" } ], - "filter":{ + "filter": { "and": [ { "dimension": { @@ -76,7 +76,7 @@ ] } } - ] + ] } } } 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 index 2125aa4fd520..57353a5bde94 100644 --- 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 @@ -6,12 +6,12 @@ "reportConfigName": "TestReportConfig", "parameters": { "properties": { - "schedule":{ + "schedule": { "status": "Active", "recurrence": "Weekly", "recurrencePeriod": { - "from":"2018-06-01T00:00:00Z", - "to":"2018-10-31T00:00:00Z" + "from": "2018-06-01T00:00:00Z", + "to": "2018-10-31T00:00:00Z" } }, "format": "Csv", @@ -22,7 +22,7 @@ "rootFolderPath": "ad-hoc" } }, - "definition":{ + "definition": { "type": "Usage", "timeframe": "MonthToDate", "dataset": { @@ -52,10 +52,10 @@ "name": "Environment" } ], - "filter":{ + "filter": { "and": [ { - "or":[ + "or": [ { "dimension": { "name": "ResourceLocation", @@ -87,7 +87,7 @@ ] } } - ] + ] } } } @@ -101,12 +101,12 @@ "name": "TestReportConfig", "type": "Microsoft.Consumption/reportconfigs", "properties": { - "schedule":{ + "schedule": { "status": "Active", "recurrence": "Weekly", "recurrencePeriod": { - "from":"2018-06-01T00:00:00Z", - "to":"2018-10-31T00:00:00Z" + "from": "2018-06-01T00:00:00Z", + "to": "2018-10-31T00:00:00Z" } }, "format": "Csv", @@ -117,7 +117,7 @@ "rootFolderPath": "ad-hoc" } }, - "definition":{ + "definition": { "type": "Usage", "timeframe": "MonthToDate", "dataset": { @@ -147,10 +147,10 @@ "name": "Environment" } ], - "filter":{ + "filter": { "and": [ { - "or":[ + "or": [ { "dimension": { "name": "ResourceLocation", @@ -182,7 +182,7 @@ ] } } - ] + ] } } } @@ -195,12 +195,12 @@ "name": "TestReportConfig", "type": "Microsoft.Consumption/reportconfigs", "properties": { - "schedule":{ + "schedule": { "status": "Active", "recurrence": "Weekly", "recurrencePeriod": { - "from":"2018-06-01T00:00:00Z", - "to":"2018-10-31T00:00:00Z" + "from": "2018-06-01T00:00:00Z", + "to": "2018-10-31T00:00:00Z" } }, "format": "Csv", @@ -211,7 +211,7 @@ "rootFolderPath": "ad-hoc" } }, - "definition":{ + "definition": { "type": "Usage", "timeframe": "MonthToDate", "dataset": { @@ -241,10 +241,10 @@ "name": "Environment" } ], - "filter":{ + "filter": { "and": [ { - "or":[ + "or": [ { "dimension": { "name": "ResourceLocation", 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 index 0a47186446a0..456c1dfc1662 100644 --- 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 @@ -6,7 +6,6 @@ "reportConfigName": "TestReport" }, "responses": { - "200": { - } + "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 index 6988b522bdb3..76b8d07fec46 100644 --- 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 @@ -21,7 +21,7 @@ "rootFolderPath": "ad-hoc" } }, - "definition":{ + "definition": { "type": "Usage", "timeframe": "Custom", "timePeriod": { @@ -51,10 +51,10 @@ "name": "SubscriptionName" } ], - "filter":{ + "filter": { "and": [ { - "or":[ + "or": [ { "dimension": { "name": "ResourceLocation", @@ -86,7 +86,7 @@ ] } } - ] + ] } } } @@ -97,12 +97,12 @@ "name": "TestReportConfig2", "type": "Microsoft.Consumption/reportconfigs", "properties": { - "schedule":{ + "schedule": { "status": "Active", "recurrence": "Weekly", "recurrencePeriod": { - "from":"2018-06-01T00:00:00Z", - "to":"2018-10-31T00:00:00Z" + "from": "2018-06-01T00:00:00Z", + "to": "2018-10-31T00:00:00Z" } }, "format": "Csv", @@ -113,7 +113,7 @@ "rootFolderPath": "ad-hoc" } }, - "definition":{ + "definition": { "type": "Usage", "timeframe": "WeekToDate", "dataset": { @@ -139,7 +139,7 @@ "name": "Environment" } ], - "filter":{ + "filter": { "and": [ { "dimension": { @@ -161,7 +161,7 @@ ] } } - ] + ] } } }