From a699e23b09f75a7e60143ba40e7ecad82669cfa5 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 8 Feb 2021 23:45:41 +0000 Subject: [PATCH] CodeGen from PR 12884 in Azure/azure-rest-api-specs Merge d9e0eca8393bce3337b2e2162287d2b677190f98 into 4d1cfdb75ea7ba87f91caf3c943205730c739101 --- .../2018-05-31/Microsoft.CostManagement.json | 602 +++++++++ .../Microsoft.CostManagement.json | 742 ++++++++++ .../2019-01-01/Microsoft.CostManagement.json | 606 +++++++++ .../Microsoft.CostManagement.json | 374 ++++++ .../Microsoft.CostManagement.json | 892 ++++++++++++ .../2019-09-01/Microsoft.CostManagement.json | 604 +++++++++ .../2019-10-01/Microsoft.CostManagement.json | 604 +++++++++ .../2019-11-01/Microsoft.CostManagement.json | 1195 +++++++++++++++++ .../Microsoft.CostManagement.json | 253 ++++ .../2020-06-01/Microsoft.CostManagement.json | 1011 ++++++++++++++ 10 files changed, 6883 insertions(+) create mode 100644 schemas/2018-05-31/Microsoft.CostManagement.json create mode 100644 schemas/2018-08-01-preview/Microsoft.CostManagement.json create mode 100644 schemas/2019-01-01/Microsoft.CostManagement.json create mode 100644 schemas/2019-03-01-preview/Microsoft.CostManagement.json create mode 100644 schemas/2019-04-01-preview/Microsoft.CostManagement.json create mode 100644 schemas/2019-09-01/Microsoft.CostManagement.json create mode 100644 schemas/2019-10-01/Microsoft.CostManagement.json create mode 100644 schemas/2019-11-01/Microsoft.CostManagement.json create mode 100644 schemas/2020-03-01-preview/Microsoft.CostManagement.json create mode 100644 schemas/2020-06-01/Microsoft.CostManagement.json diff --git a/schemas/2018-05-31/Microsoft.CostManagement.json b/schemas/2018-05-31/Microsoft.CostManagement.json new file mode 100644 index 0000000000..d9eb1ba9d0 --- /dev/null +++ b/schemas/2018-05-31/Microsoft.CostManagement.json @@ -0,0 +1,602 @@ +{ + "id": "https://schema.management.azure.com/schemas/2018-05-31/Microsoft.CostManagement.json#", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Microsoft.CostManagement", + "description": "Microsoft CostManagement Resource Types", + "resourceDefinitions": { + "reportconfigs": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2018-05-31" + ] + }, + "name": { + "type": "string", + "description": "Report Config Name." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/ReportConfigProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The properties of the report config." + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.CostManagement/reportconfigs" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.CostManagement/reportconfigs" + } + }, + "subscription_resourceDefinitions": { + "reportconfigs": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2018-05-31" + ] + }, + "name": { + "type": "string", + "description": "Report Config Name." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/ReportConfigProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The properties of the report config." + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.CostManagement/reportconfigs" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.CostManagement/reportconfigs" + } + }, + "definitions": { + "ReportConfigAggregation": { + "type": "object", + "properties": { + "function": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Sum" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The name of the aggregation function to use." + }, + "name": { + "type": "string", + "description": "The name of the column to aggregate." + } + }, + "required": [ + "function", + "name" + ], + "description": "The aggregation expression to be used in the report." + }, + "ReportConfigComparisonExpression": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the column to use in comparison." + }, + "operator": { + "oneOf": [ + { + "type": "string", + "enum": [ + "In" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The operator to use for comparison." + }, + "values": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Array of values to use for comparison" + } + }, + "required": [ + "name", + "operator", + "values" + ], + "description": "The comparison expression to be used in the report." + }, + "ReportConfigDataset": { + "type": "object", + "properties": { + "aggregation": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/ReportConfigAggregation" + }, + "properties": {} + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Dictionary of aggregation expression to use in the report. The key of each item in the dictionary is the alias for the aggregated column. Report can have up to 2 aggregation clauses." + }, + "configuration": { + "oneOf": [ + { + "$ref": "#/definitions/ReportConfigDatasetConfiguration" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The configuration of dataset in the report." + }, + "filter": { + "oneOf": [ + { + "$ref": "#/definitions/ReportConfigFilter" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The filter expression to be used in the report." + }, + "granularity": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Daily" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The granularity of rows in the report." + }, + "grouping": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/ReportConfigGrouping" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Array of group by expression to use in the report. Report can have up to 2 group by clauses." + } + }, + "description": "The definition of data present in the report." + }, + "ReportConfigDatasetConfiguration": { + "type": "object", + "properties": { + "columns": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "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." + } + }, + "description": "The configuration of dataset in the report." + }, + "ReportConfigDefinition": { + "type": "object", + "properties": { + "dataset": { + "oneOf": [ + { + "$ref": "#/definitions/ReportConfigDataset" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The definition of data present in the report." + }, + "timeframe": { + "oneOf": [ + { + "type": "string", + "enum": [ + "WeekToDate", + "MonthToDate", + "YearToDate", + "Custom" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The time frame for pulling data for the report. If custom, then a specific time period must be provided." + }, + "timePeriod": { + "oneOf": [ + { + "$ref": "#/definitions/ReportConfigTimePeriod" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The start and end date for pulling data for the report." + }, + "type": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Usage" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The type of the report." + } + }, + "required": [ + "timeframe", + "type" + ], + "description": "The definition of a report config." + }, + "ReportConfigDeliveryDestination": { + "type": "object", + "properties": { + "container": { + "type": "string", + "description": "The name of the container where reports will be uploaded." + }, + "resourceId": { + "type": "string", + "description": "The resource id of the storage account where reports will be delivered." + }, + "rootFolderPath": { + "type": "string", + "description": "The name of the directory where reports will be uploaded." + } + }, + "required": [ + "container", + "resourceId" + ], + "description": "The destination information for the delivery of the report." + }, + "ReportConfigDeliveryInfo": { + "type": "object", + "properties": { + "destination": { + "oneOf": [ + { + "$ref": "#/definitions/ReportConfigDeliveryDestination" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The destination information for the delivery of the report." + } + }, + "required": [ + "destination" + ], + "description": "The delivery information associated with a report config." + }, + "ReportConfigFilter": { + "type": "object", + "properties": { + "and": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/ReportConfigFilter" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The logical \"AND\" expression. Must have at least 2 items." + }, + "dimension": { + "oneOf": [ + { + "$ref": "#/definitions/ReportConfigComparisonExpression" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The comparison expression to be used in the report." + }, + "not": { + "oneOf": [ + { + "$ref": "#/definitions/ReportConfigFilter" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The filter expression to be used in the report." + }, + "or": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/ReportConfigFilter" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The logical \"OR\" expression. Must have at least 2 items." + }, + "tag": { + "oneOf": [ + { + "$ref": "#/definitions/ReportConfigComparisonExpression" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The comparison expression to be used in the report." + } + }, + "description": "The filter expression to be used in the report." + }, + "ReportConfigGrouping": { + "type": "object", + "properties": { + "columnType": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Tag", + "Dimension" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Has type of the column to group." + }, + "name": { + "type": "string", + "description": "The name of the column to group." + } + }, + "required": [ + "columnType", + "name" + ], + "description": "The group by expression to be used in the report." + }, + "ReportConfigProperties": { + "type": "object", + "properties": { + "definition": { + "oneOf": [ + { + "$ref": "#/definitions/ReportConfigDefinition" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The definition of a report config." + }, + "deliveryInfo": { + "oneOf": [ + { + "$ref": "#/definitions/ReportConfigDeliveryInfo" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The delivery information associated with a report config." + }, + "format": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Csv" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The format of the report being delivered." + }, + "schedule": { + "oneOf": [ + { + "$ref": "#/definitions/ReportConfigSchedule" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The schedule associated with a report config." + } + }, + "required": [ + "definition", + "deliveryInfo" + ], + "description": "The properties of the report config." + }, + "ReportConfigRecurrencePeriod": { + "type": "object", + "properties": { + "from": { + "type": "string", + "format": "date-time", + "description": "The start date of recurrence." + }, + "to": { + "type": "string", + "format": "date-time", + "description": "The end date of recurrence. If not provided, we default this to 10 years from the start date." + } + }, + "required": [ + "from" + ], + "description": "The start and end date for recurrence schedule." + }, + "ReportConfigSchedule": { + "type": "object", + "properties": { + "recurrence": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Daily", + "Weekly", + "Monthly", + "Annually" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The schedule recurrence." + }, + "recurrencePeriod": { + "oneOf": [ + { + "$ref": "#/definitions/ReportConfigRecurrencePeriod" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The start and end date for recurrence schedule." + }, + "status": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Active", + "Inactive" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The status of the schedule. Whether active or not. If inactive, the report's scheduled execution is paused." + } + }, + "required": [ + "recurrence", + "recurrencePeriod" + ], + "description": "The schedule associated with a report config." + }, + "ReportConfigTimePeriod": { + "type": "object", + "properties": { + "from": { + "type": "string", + "format": "date-time", + "description": "The start date to pull data from." + }, + "to": { + "type": "string", + "format": "date-time", + "description": "The end date to pull data to." + } + }, + "required": [ + "from", + "to" + ], + "description": "The start and end date for pulling data for the report." + } + } +} diff --git a/schemas/2018-08-01-preview/Microsoft.CostManagement.json b/schemas/2018-08-01-preview/Microsoft.CostManagement.json new file mode 100644 index 0000000000..73ee5a515b --- /dev/null +++ b/schemas/2018-08-01-preview/Microsoft.CostManagement.json @@ -0,0 +1,742 @@ +{ + "id": "https://schema.management.azure.com/schemas/2018-08-01-preview/Microsoft.CostManagement.json#", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Microsoft.CostManagement", + "description": "Microsoft CostManagement Resource Types", + "resourceDefinitions": { + "connectors": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2018-08-01-preview" + ] + }, + "kind": { + "type": "string", + "description": "Connector kind (eg aws)" + }, + "location": { + "type": "string", + "description": "Connector location" + }, + "name": { + "type": "string", + "description": "Connector Name." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/ConnectorProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The properties of a Connector" + }, + "tags": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "properties": {} + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Resource tags." + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.CostManagement/connectors" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.CostManagement/connectors" + }, + "reports": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2018-08-01-preview" + ] + }, + "name": { + "type": "string", + "description": "Report Name." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/ReportProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The properties of the report." + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.CostManagement/reports" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.CostManagement/reports" + } + }, + "subscription_resourceDefinitions": { + "reports": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2018-08-01-preview" + ] + }, + "name": { + "type": "string", + "description": "Report Name." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/ReportProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The properties of the report." + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.CostManagement/reports" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.CostManagement/reports" + } + }, + "extension_resourceDefinitions": { + "reports": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2018-08-01-preview" + ] + }, + "name": { + "type": "string", + "description": "Report Name." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/ReportProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The properties of the report." + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.CostManagement/reports" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.CostManagement/reports" + } + }, + "definitions": { + "ConnectorProperties": { + "type": "object", + "properties": { + "credentialsKey": { + "type": "string", + "description": "Credentials authentication key (eg AWS ARN)" + }, + "credentialsSecret": { + "type": "string", + "description": "Credentials secret (eg AWS ExternalId)" + }, + "displayName": { + "type": "string", + "description": "Connector DisplayName (defaults to Name)" + }, + "reportId": { + "type": "string", + "description": "Identifying source report. (For AWS this is a CUR report name, defined with Daily and with Resources)" + }, + "status": { + "oneOf": [ + { + "type": "string", + "enum": [ + "active", + "error", + "suspended" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Connector status." + } + }, + "description": "The properties of a Connector" + }, + "ReportAggregation": { + "type": "object", + "properties": { + "function": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Sum" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The name of the aggregation function to use." + }, + "name": { + "type": "string", + "description": "The name of the column to aggregate." + } + }, + "required": [ + "function", + "name" + ], + "description": "The aggregation expression to be used in the report." + }, + "ReportComparisonExpression": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the column to use in comparison." + }, + "operator": { + "oneOf": [ + { + "type": "string", + "enum": [ + "In" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The operator to use for comparison." + }, + "values": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Array of values to use for comparison" + } + }, + "required": [ + "name", + "operator", + "values" + ], + "description": "The comparison expression to be used in the report." + }, + "ReportDataset": { + "type": "object", + "properties": { + "aggregation": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/ReportAggregation" + }, + "properties": {} + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Dictionary of aggregation expression to use in the report. The key of each item in the dictionary is the alias for the aggregated column. Report can have up to 2 aggregation clauses." + }, + "configuration": { + "oneOf": [ + { + "$ref": "#/definitions/ReportDatasetConfiguration" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The configuration of dataset in the report." + }, + "filter": { + "oneOf": [ + { + "$ref": "#/definitions/ReportFilter" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The filter expression to be used in the report." + }, + "granularity": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Daily", + "Hourly" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The granularity of rows in the report." + }, + "grouping": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/ReportGrouping" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Array of group by expression to use in the report. Report can have up to 2 group by clauses." + } + }, + "description": "The definition of data present in the report." + }, + "ReportDatasetConfiguration": { + "type": "object", + "properties": { + "columns": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "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." + } + }, + "description": "The configuration of dataset in the report." + }, + "ReportDefinition": { + "type": "object", + "properties": { + "dataset": { + "oneOf": [ + { + "$ref": "#/definitions/ReportDataset" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The definition of data present in the report." + }, + "timeframe": { + "oneOf": [ + { + "type": "string", + "enum": [ + "WeekToDate", + "MonthToDate", + "Custom" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The time frame for pulling data for the report. If custom, then a specific time period must be provided." + }, + "timePeriod": { + "oneOf": [ + { + "$ref": "#/definitions/ReportTimePeriod" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The start and end date for pulling data for the report." + }, + "type": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Usage" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The type of the report." + } + }, + "required": [ + "timeframe", + "type" + ], + "description": "The definition of a report." + }, + "ReportDeliveryDestination": { + "type": "object", + "properties": { + "container": { + "type": "string", + "description": "The name of the container where reports will be uploaded." + }, + "resourceId": { + "type": "string", + "description": "The resource id of the storage account where reports will be delivered." + }, + "rootFolderPath": { + "type": "string", + "description": "The name of the directory where reports will be uploaded." + } + }, + "required": [ + "container", + "resourceId" + ], + "description": "The destination information for the delivery of the report." + }, + "ReportDeliveryInfo": { + "type": "object", + "properties": { + "destination": { + "oneOf": [ + { + "$ref": "#/definitions/ReportDeliveryDestination" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The destination information for the delivery of the report." + } + }, + "required": [ + "destination" + ], + "description": "The delivery information associated with a report." + }, + "ReportFilter": { + "type": "object", + "properties": { + "and": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/ReportFilter" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The logical \"AND\" expression. Must have at least 2 items." + }, + "dimension": { + "oneOf": [ + { + "$ref": "#/definitions/ReportComparisonExpression" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The comparison expression to be used in the report." + }, + "not": { + "oneOf": [ + { + "$ref": "#/definitions/ReportFilter" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The filter expression to be used in the report." + }, + "or": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/ReportFilter" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The logical \"OR\" expression. Must have at least 2 items." + }, + "tag": { + "oneOf": [ + { + "$ref": "#/definitions/ReportComparisonExpression" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The comparison expression to be used in the report." + } + }, + "description": "The filter expression to be used in the report." + }, + "ReportGrouping": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the column to group." + }, + "type": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Tag", + "Dimension" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Has type of the column to group." + } + }, + "required": [ + "name", + "type" + ], + "description": "The group by expression to be used in the report." + }, + "ReportProperties": { + "type": "object", + "properties": { + "definition": { + "oneOf": [ + { + "$ref": "#/definitions/ReportDefinition" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The definition of a report." + }, + "deliveryInfo": { + "oneOf": [ + { + "$ref": "#/definitions/ReportDeliveryInfo" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The delivery information associated with a report." + }, + "format": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Csv" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The format of the report being delivered." + }, + "schedule": { + "oneOf": [ + { + "$ref": "#/definitions/ReportSchedule" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The schedule associated with a report." + } + }, + "required": [ + "definition", + "deliveryInfo" + ], + "description": "The properties of the report." + }, + "ReportRecurrencePeriod": { + "type": "object", + "properties": { + "from": { + "type": "string", + "format": "date-time", + "description": "The start date of recurrence." + }, + "to": { + "type": "string", + "format": "date-time", + "description": "The end date of recurrence." + } + }, + "required": [ + "from" + ], + "description": "The start and end date for recurrence schedule." + }, + "ReportSchedule": { + "type": "object", + "properties": { + "recurrence": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Daily", + "Weekly", + "Monthly", + "Annually" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The schedule recurrence." + }, + "recurrencePeriod": { + "oneOf": [ + { + "$ref": "#/definitions/ReportRecurrencePeriod" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The start and end date for recurrence schedule." + }, + "status": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Active", + "Inactive" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The status of the schedule. Whether active or not. If inactive, the report's scheduled execution is paused." + } + }, + "required": [ + "recurrence" + ], + "description": "The schedule associated with a report." + }, + "ReportTimePeriod": { + "type": "object", + "properties": { + "from": { + "type": "string", + "format": "date-time", + "description": "The start date to pull data from." + }, + "to": { + "type": "string", + "format": "date-time", + "description": "The end date to pull data to." + } + }, + "required": [ + "from", + "to" + ], + "description": "The start and end date for pulling data for the report." + } + } +} diff --git a/schemas/2019-01-01/Microsoft.CostManagement.json b/schemas/2019-01-01/Microsoft.CostManagement.json new file mode 100644 index 0000000000..607427d86e --- /dev/null +++ b/schemas/2019-01-01/Microsoft.CostManagement.json @@ -0,0 +1,606 @@ +{ + "id": "https://schema.management.azure.com/schemas/2019-01-01/Microsoft.CostManagement.json#", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Microsoft.CostManagement", + "description": "Microsoft CostManagement Resource Types", + "resourceDefinitions": {}, + "unknown_resourceDefinitions": { + "exports": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2019-01-01" + ] + }, + "name": { + "type": "string", + "description": "Export Name." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/ExportProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The properties of the export." + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.CostManagement/exports" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.CostManagement/exports" + } + }, + "definitions": { + "ExportDeliveryDestination": { + "type": "object", + "properties": { + "container": { + "type": "string", + "description": "The name of the container where exports will be uploaded." + }, + "resourceId": { + "type": "string", + "description": "The resource id of the storage account where exports will be delivered." + }, + "rootFolderPath": { + "type": "string", + "description": "The name of the directory where exports will be uploaded." + } + }, + "required": [ + "container", + "resourceId" + ], + "description": "The destination information for the delivery of the export. To allow access to a storage account, you must register the account's subscription with the Microsoft.CostManagementExports resource provider. This is required once per subscription. When creating an export in the Azure portal, it is done automatically. However, API users need to register the subscription. For more information see https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-supported-services ." + }, + "ExportDeliveryInfo": { + "type": "object", + "properties": { + "destination": { + "oneOf": [ + { + "$ref": "#/definitions/ExportDeliveryDestination" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The destination information for the delivery of the export. To allow access to a storage account, you must register the account's subscription with the Microsoft.CostManagementExports resource provider. This is required once per subscription. When creating an export in the Azure portal, it is done automatically. However, API users need to register the subscription. For more information see https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-supported-services ." + } + }, + "required": [ + "destination" + ], + "description": "The delivery information associated with a export." + }, + "ExportProperties": { + "type": "object", + "properties": { + "definition": { + "oneOf": [ + { + "$ref": "#/definitions/QueryDefinition" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The definition of a query." + }, + "deliveryInfo": { + "oneOf": [ + { + "$ref": "#/definitions/ExportDeliveryInfo" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The delivery information associated with a export." + }, + "format": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Csv" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The format of the export being delivered." + }, + "schedule": { + "oneOf": [ + { + "$ref": "#/definitions/ExportSchedule" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The schedule associated with a export." + } + }, + "required": [ + "definition", + "deliveryInfo" + ], + "description": "The properties of the export." + }, + "ExportRecurrencePeriod": { + "type": "object", + "properties": { + "from": { + "type": "string", + "format": "date-time", + "description": "The start date of recurrence." + }, + "to": { + "type": "string", + "format": "date-time", + "description": "The end date of recurrence." + } + }, + "required": [ + "from" + ], + "description": "The start and end date for recurrence schedule." + }, + "ExportSchedule": { + "type": "object", + "properties": { + "recurrence": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Daily", + "Weekly", + "Monthly", + "Annually" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The schedule recurrence." + }, + "recurrencePeriod": { + "oneOf": [ + { + "$ref": "#/definitions/ExportRecurrencePeriod" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The start and end date for recurrence schedule." + }, + "status": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Active", + "Inactive" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The status of the schedule. Whether active or not. If inactive, the export's scheduled execution is paused." + } + }, + "required": [ + "recurrence" + ], + "description": "The schedule associated with a export." + }, + "QueryAggregation": { + "type": "object", + "properties": { + "function": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Sum" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The name of the aggregation function to use." + }, + "name": { + "type": "string", + "description": "The name of the column to aggregate." + } + }, + "required": [ + "function", + "name" + ], + "description": "The aggregation expression to be used in the query." + }, + "QueryComparisonExpression": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the column to use in comparison." + }, + "operator": { + "oneOf": [ + { + "type": "string", + "enum": [ + "In" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The operator to use for comparison." + }, + "values": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Array of values to use for comparison" + } + }, + "required": [ + "name", + "operator", + "values" + ], + "description": "The comparison expression to be used in the query." + }, + "QueryDataset": { + "type": "object", + "properties": { + "aggregation": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/QueryAggregation" + }, + "properties": {} + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Dictionary of aggregation expression to use in the query. The key of each item in the dictionary is the alias for the aggregated column. Query can have up to 2 aggregation clauses." + }, + "configuration": { + "oneOf": [ + { + "$ref": "#/definitions/QueryDatasetConfiguration" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The configuration of dataset in the query." + }, + "filter": { + "oneOf": [ + { + "$ref": "#/definitions/QueryFilter" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The filter expression to be used in the export." + }, + "granularity": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Daily", + "Hourly" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The granularity of rows in the query." + }, + "grouping": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/QueryGrouping" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Array of group by expression to use in the query. Query can have up to 2 group by clauses." + }, + "sorting": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/QuerySortingConfiguration" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Array of sorting by columns in query." + } + }, + "description": "The definition of data present in the query." + }, + "QueryDatasetConfiguration": { + "type": "object", + "properties": { + "columns": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Array of column names to be included in the query. Any valid query column name is allowed. If not provided, then query includes all columns." + } + }, + "description": "The configuration of dataset in the query." + }, + "QueryDefinition": { + "type": "object", + "properties": { + "dataset": { + "oneOf": [ + { + "$ref": "#/definitions/QueryDataset" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The definition of data present in the query." + }, + "timeframe": { + "oneOf": [ + { + "type": "string", + "enum": [ + "WeekToDate", + "MonthToDate", + "YearToDate", + "TheLastWeek", + "TheLastMonth", + "TheLastYear", + "Custom", + "BillingMonthToDate", + "TheLastBillingMonth" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The time frame for pulling data for the query. If custom, then a specific time period must be provided." + }, + "timePeriod": { + "oneOf": [ + { + "$ref": "#/definitions/QueryTimePeriod" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The start and end date for pulling data for the query." + }, + "type": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Usage" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The type of the query." + } + }, + "required": [ + "timeframe", + "type" + ], + "description": "The definition of a query." + }, + "QueryFilter": { + "type": "object", + "properties": { + "and": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/QueryFilter" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The logical \"AND\" expression. Must have at least 2 items." + }, + "dimension": { + "oneOf": [ + { + "$ref": "#/definitions/QueryComparisonExpression" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The comparison expression to be used in the query." + }, + "not": { + "oneOf": [ + { + "$ref": "#/definitions/QueryFilter" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The filter expression to be used in the export." + }, + "or": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/QueryFilter" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The logical \"OR\" expression. Must have at least 2 items." + }, + "tag": { + "oneOf": [ + { + "$ref": "#/definitions/QueryComparisonExpression" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The comparison expression to be used in the query." + } + }, + "description": "The filter expression to be used in the export." + }, + "QueryGrouping": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the column to group." + }, + "type": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Tag", + "Dimension" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Has type of the column to group." + } + }, + "required": [ + "name", + "type" + ], + "description": "The group by expression to be used in the query." + }, + "QuerySortingConfiguration": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the column to use in sorting." + }, + "querySortingDirection": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Ascending", + "Descending" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The sorting direction." + } + }, + "description": "The configuration for sorting in the query." + }, + "QueryTimePeriod": { + "type": "object", + "properties": { + "from": { + "type": "string", + "format": "date-time", + "description": "The start date to pull data from." + }, + "to": { + "type": "string", + "format": "date-time", + "description": "The end date to pull data to." + } + }, + "required": [ + "from", + "to" + ], + "description": "The start and end date for pulling data for the query." + } + } +} diff --git a/schemas/2019-03-01-preview/Microsoft.CostManagement.json b/schemas/2019-03-01-preview/Microsoft.CostManagement.json new file mode 100644 index 0000000000..017b41b1fb --- /dev/null +++ b/schemas/2019-03-01-preview/Microsoft.CostManagement.json @@ -0,0 +1,374 @@ +{ + "id": "https://schema.management.azure.com/schemas/2019-03-01-preview/Microsoft.CostManagement.json#", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Microsoft.CostManagement", + "description": "Microsoft CostManagement Resource Types", + "resourceDefinitions": {}, + "managementGroup_resourceDefinitions": { + "externalSubscriptions": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2019-03-01-preview" + ] + }, + "name": { + "type": "string", + "description": "External Subscription Name. (eg 'aws-{UsageAccountId}')" + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.CostManagement/externalSubscriptions" + ] + } + }, + "required": [ + "apiVersion", + "name", + "type" + ], + "description": "Microsoft.CostManagement/externalSubscriptions" + } + }, + "tenant_resourceDefinitions": { + "cloudConnectors": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2019-03-01-preview" + ] + }, + "kind": { + "type": "string", + "description": "Connector kind (eg aws)" + }, + "name": { + "type": "string", + "description": "Connector Name." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/ConnectorProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The properties of a Connector" + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.CostManagement/cloudConnectors" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.CostManagement/cloudConnectors" + } + }, + "extension_resourceDefinitions": { + "showbackRules": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2019-03-01-preview" + ] + }, + "name": { + "type": "string", + "description": "Showback rule name" + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/ShowbackRuleProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The properties of a showback rule." + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.CostManagement/showbackRules" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.CostManagement/showbackRules" + } + }, + "definitions": { + "ConnectorProperties": { + "type": "object", + "properties": { + "billingModel": { + "oneOf": [ + { + "type": "string", + "enum": [ + "trial", + "autoUpgrade", + "premium", + "expired" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Connector billing model." + }, + "credentialsKey": { + "type": "string", + "description": "Credentials authentication key (eg AWS ARN)" + }, + "credentialsSecret": { + "type": "string", + "description": "Credentials secret (eg AWS ExternalId)" + }, + "defaultManagementGroupId": { + "type": "string", + "description": "Default ManagementGroupId" + }, + "displayName": { + "type": "string", + "description": "Connector DisplayName" + }, + "reportId": { + "type": "string", + "description": "Identifying source report. (For AWS this is a CUR report name, defined with Daily and with Resources)" + }, + "subscriptionId": { + "type": "string", + "description": "Billing SubscriptionId" + } + }, + "description": "The properties of a Connector" + }, + "CostAllocationDetails": { + "type": "object", + "properties": { + "policy": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Proportional", + "Evenly", + "Fixed" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Cost allocation policy." + } + }, + "description": "Represents CostAllocation showback rule model" + }, + "CostAllocationDetailsKind": { + "type": "object", + "properties": { + "details": { + "oneOf": [ + { + "$ref": "#/definitions/CostAllocationDetails" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Represents CostAllocation showback rule model" + }, + "ruleType": { + "type": "string", + "enum": [ + "CostAllocation" + ] + } + }, + "required": [ + "ruleType" + ], + "description": "Represents CostAllocation showback rule model" + }, + "CustomPriceDetails": { + "type": "object", + "properties": { + "benefits": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string", + "enum": [ + "Sum", + "None", + "All", + "AHUB", + "Reservations" + ] + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Array of benefits." + }, + "markups": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/Markup" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "List of markups." + }, + "pricesheet": { + "type": "string" + } + }, + "description": "Represents Custom price showback rule model" + }, + "CustomPriceDetailsKind": { + "type": "object", + "properties": { + "details": { + "oneOf": [ + { + "$ref": "#/definitions/CustomPriceDetails" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Represents Custom price showback rule model" + }, + "ruleType": { + "type": "string", + "enum": [ + "CustomPrice" + ] + } + }, + "required": [ + "ruleType" + ], + "description": "Represents Custom price showback rule model" + }, + "Markup": { + "type": "object", + "properties": { + "percentage": { + "type": "string" + } + }, + "description": "The Markup model definition" + }, + "Scope": { + "type": "object", + "properties": { + "childScope": { + "oneOf": [ + { + "$ref": "#/definitions/Scope" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The Scope model definition" + }, + "id": { + "type": "string", + "description": "Scope id" + }, + "name": { + "type": "string", + "description": "Scope name" + }, + "type": { + "type": "string", + "description": "Scope type" + } + }, + "description": "The Scope model definition" + }, + "ShowbackRuleProperties": { + "type": "object", + "oneOf": [ + { + "$ref": "#/definitions/CustomPriceDetailsKind" + }, + { + "$ref": "#/definitions/CostAllocationDetailsKind" + } + ], + "properties": { + "description": { + "type": "string", + "description": "Description of a showback rule." + }, + "scopes": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/Scope" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "List of authorized assigned scopes." + }, + "status": { + "oneOf": [ + { + "type": "string", + "enum": [ + "NotActive", + "Active" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The current status of the showback rule." + } + }, + "description": "The properties of a showback rule." + } + } +} diff --git a/schemas/2019-04-01-preview/Microsoft.CostManagement.json b/schemas/2019-04-01-preview/Microsoft.CostManagement.json new file mode 100644 index 0000000000..02190a2e96 --- /dev/null +++ b/schemas/2019-04-01-preview/Microsoft.CostManagement.json @@ -0,0 +1,892 @@ +{ + "id": "https://schema.management.azure.com/schemas/2019-04-01-preview/Microsoft.CostManagement.json#", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Microsoft.CostManagement", + "description": "Microsoft CostManagement Resource Types", + "resourceDefinitions": {}, + "tenant_resourceDefinitions": { + "views": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2019-04-01-preview" + ] + }, + "eTag": { + "type": "string", + "description": "eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not." + }, + "name": { + "type": "string", + "description": "View name" + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/ViewProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The properties of the view." + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.CostManagement/views" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.CostManagement/views" + } + }, + "unknown_resourceDefinitions": { + "budgets": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2019-04-01-preview" + ] + }, + "eTag": { + "type": "string", + "description": "eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not." + }, + "name": { + "type": "string", + "description": "Budget Name." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/BudgetProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The properties of the budget." + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.CostManagement/budgets" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.CostManagement/budgets" + }, + "views": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2019-04-01-preview" + ] + }, + "eTag": { + "type": "string", + "description": "eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not." + }, + "name": { + "type": "string", + "description": "View name" + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/ViewProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The properties of the view." + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.CostManagement/views" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.CostManagement/views" + } + }, + "definitions": { + "BudgetProperties": { + "type": "object", + "properties": { + "amount": { + "oneOf": [ + { + "type": "number" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The total amount of cost to track with the budget" + }, + "category": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Cost", + "Usage" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The category of the budget, whether the budget tracks cost or usage." + }, + "filter": { + "oneOf": [ + { + "$ref": "#/definitions/ReportConfigFilter" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The filter expression to be used in the report." + }, + "notifications": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/Notification" + }, + "properties": {} + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Dictionary of notifications associated with the budget. Budget can have up to five notifications." + }, + "timeGrain": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Monthly", + "Quarterly", + "Annually" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The time covered by a budget. Tracking of the amount will be reset based on the time grain." + }, + "timePeriod": { + "oneOf": [ + { + "$ref": "#/definitions/BudgetTimePeriod" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The start and end date for a budget." + } + }, + "required": [ + "amount", + "category", + "timeGrain", + "timePeriod" + ], + "description": "The properties of the budget." + }, + "BudgetTimePeriod": { + "type": "object", + "properties": { + "endDate": { + "type": "string", + "format": "date-time", + "description": "The end date for the budget. If not provided, we default this to 10 years from the start date." + }, + "startDate": { + "type": "string", + "format": "date-time", + "description": "The start date for the budget." + } + }, + "required": [ + "startDate" + ], + "description": "The start and end date for a budget." + }, + "KpiProperties": { + "type": "object", + "properties": { + "enabled": { + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "show the KPI in the UI?" + }, + "id": { + "type": "string", + "description": "ID of resource related to metric (budget)." + }, + "type": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Forecast", + "Budget" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "KPI type (Forecast, Budget)." + } + }, + "description": "Each KPI must contain a 'type' and 'enabled' key." + }, + "Notification": { + "type": "object", + "properties": { + "contactEmails": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Email addresses to send the budget notification to when the threshold is exceeded." + }, + "contactGroups": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Action groups to send the budget notification to when the threshold is exceeded." + }, + "contactRoles": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Contact roles to send the budget notification to when the threshold is exceeded." + }, + "enabled": { + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The notification is enabled or not." + }, + "operator": { + "oneOf": [ + { + "type": "string", + "enum": [ + "EqualTo", + "GreaterThan", + "GreaterThanOrEqualTo" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The comparison operator." + }, + "threshold": { + "oneOf": [ + { + "type": "number" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Threshold value associated with a notification. Notification is sent when the cost exceeded the threshold. It is always percent and has to be between 0 and 1000." + } + }, + "required": [ + "contactEmails", + "enabled", + "operator", + "threshold" + ], + "description": "The notification associated with a budget." + }, + "PivotProperties": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Data field to show in view." + }, + "type": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Dimension", + "TagKey" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Data type to show in view." + } + }, + "description": "Each pivot must contain a 'type' and 'name'." + }, + "ReportConfigAggregation": { + "type": "object", + "properties": { + "function": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Sum" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The name of the aggregation function to use." + }, + "name": { + "type": "string", + "description": "The name of the column to aggregate." + } + }, + "required": [ + "function", + "name" + ], + "description": "The aggregation expression to be used in the report." + }, + "ReportConfigComparisonExpression": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the column to use in comparison." + }, + "operator": { + "oneOf": [ + { + "type": "string", + "enum": [ + "In", + "Contains" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The operator to use for comparison." + }, + "values": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Array of values to use for comparison" + } + }, + "required": [ + "name", + "operator", + "values" + ], + "description": "The comparison expression to be used in the report." + }, + "ReportConfigDataset": { + "type": "object", + "properties": { + "aggregation": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/ReportConfigAggregation" + }, + "properties": {} + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Dictionary of aggregation expression to use in the report. The key of each item in the dictionary is the alias for the aggregated column. Report can have up to 2 aggregation clauses." + }, + "configuration": { + "oneOf": [ + { + "$ref": "#/definitions/ReportConfigDatasetConfiguration" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The configuration of dataset in the report." + }, + "filter": { + "oneOf": [ + { + "$ref": "#/definitions/ReportConfigFilter" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The filter expression to be used in the report." + }, + "granularity": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Daily", + "Monthly" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The granularity of rows in the report." + }, + "grouping": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/ReportConfigGrouping" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Array of group by expression to use in the report. Report can have up to 2 group by clauses." + }, + "sorting": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/ReportConfigSorting" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Array of order by expression to use in the report." + } + }, + "description": "The definition of data present in the report." + }, + "ReportConfigDatasetConfiguration": { + "type": "object", + "properties": { + "columns": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "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." + } + }, + "description": "The configuration of dataset in the report." + }, + "ReportConfigDefinition": { + "type": "object", + "properties": { + "dataset": { + "oneOf": [ + { + "$ref": "#/definitions/ReportConfigDataset" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The definition of data present in the report." + }, + "timeframe": { + "oneOf": [ + { + "type": "string", + "enum": [ + "WeekToDate", + "MonthToDate", + "YearToDate", + "Custom" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The time frame for pulling data for the report. If custom, then a specific time period must be provided." + }, + "timePeriod": { + "oneOf": [ + { + "$ref": "#/definitions/ReportConfigTimePeriod" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The start and end date for pulling data for the report." + }, + "type": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Usage" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The type of the report. Usage represents actual usage, forecast represents forecasted data and UsageAndForecast represents both usage and forecasted data. Actual usage and forecasted data can be differentiated based on dates." + } + }, + "required": [ + "timeframe", + "type" + ], + "description": "The definition of a report config." + }, + "ReportConfigFilter": { + "type": "object", + "properties": { + "and": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/ReportConfigFilter" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The logical \"AND\" expression. Must have at least 2 items." + }, + "dimension": { + "oneOf": [ + { + "$ref": "#/definitions/ReportConfigComparisonExpression" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The comparison expression to be used in the report." + }, + "not": { + "oneOf": [ + { + "$ref": "#/definitions/ReportConfigFilter" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The filter expression to be used in the report." + }, + "or": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/ReportConfigFilter" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The logical \"OR\" expression. Must have at least 2 items." + }, + "tag": { + "oneOf": [ + { + "$ref": "#/definitions/ReportConfigComparisonExpression" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The comparison expression to be used in the report." + } + }, + "description": "The filter expression to be used in the report." + }, + "ReportConfigGrouping": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the column to group. This version supports subscription lowest possible grain." + }, + "type": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Tag", + "Dimension" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Has type of the column to group." + } + }, + "required": [ + "name", + "type" + ], + "description": "The group by expression to be used in the report." + }, + "ReportConfigSorting": { + "type": "object", + "properties": { + "direction": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Ascending", + "Descending" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Direction of sort." + }, + "name": { + "type": "string", + "description": "The name of the column to sort." + } + }, + "required": [ + "name" + ], + "description": "The order by expression to be used in the report." + }, + "ReportConfigTimePeriod": { + "type": "object", + "properties": { + "from": { + "type": "string", + "format": "date-time", + "description": "The start date to pull data from." + }, + "to": { + "type": "string", + "format": "date-time", + "description": "The end date to pull data to." + } + }, + "required": [ + "from", + "to" + ], + "description": "The start and end date for pulling data for the report." + }, + "ViewProperties": { + "type": "object", + "properties": { + "accumulated": { + "oneOf": [ + { + "type": "string", + "enum": [ + "true", + "false" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Show costs accumulated over time." + }, + "chart": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Area", + "Line", + "StackedColumn", + "GroupedColumn", + "Table" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Chart type of the main view in Cost Analysis. Required." + }, + "displayName": { + "type": "string", + "description": "User input name of the view. Required." + }, + "kpis": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/KpiProperties" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "List of KPIs to show in Cost Analysis UI." + }, + "metric": { + "oneOf": [ + { + "type": "string", + "enum": [ + "ActualCost", + "AmortizedCost", + "AHUB" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Metric to use when displaying costs." + }, + "pivots": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/PivotProperties" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Configuration of 3 sub-views in the Cost Analysis UI." + }, + "query": { + "oneOf": [ + { + "$ref": "#/definitions/ReportConfigDefinition" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The definition of a report config." + }, + "scope": { + "type": "string", + "description": "Cost Management scope to save the view on. This includes 'subscriptions/{subscriptionId}' for subscription scope, 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for BillingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, '/providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for ExternalBillingAccount scope, and '/providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for ExternalSubscription scope." + } + }, + "description": "The properties of the view." + } + } +} diff --git a/schemas/2019-09-01/Microsoft.CostManagement.json b/schemas/2019-09-01/Microsoft.CostManagement.json new file mode 100644 index 0000000000..8a9b28cebd --- /dev/null +++ b/schemas/2019-09-01/Microsoft.CostManagement.json @@ -0,0 +1,604 @@ +{ + "id": "https://schema.management.azure.com/schemas/2019-09-01/Microsoft.CostManagement.json#", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Microsoft.CostManagement", + "description": "Microsoft CostManagement Resource Types", + "resourceDefinitions": {}, + "unknown_resourceDefinitions": { + "exports": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2019-09-01" + ] + }, + "name": { + "type": "string", + "description": "Export Name." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/ExportProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The properties of the export." + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.CostManagement/exports" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.CostManagement/exports" + } + }, + "definitions": { + "ExportDeliveryDestination": { + "type": "object", + "properties": { + "container": { + "type": "string", + "description": "The name of the container where exports will be uploaded." + }, + "resourceId": { + "type": "string", + "description": "The resource id of the storage account where exports will be delivered." + }, + "rootFolderPath": { + "type": "string", + "description": "The name of the directory where exports will be uploaded." + } + }, + "required": [ + "container", + "resourceId" + ], + "description": "The destination information for the delivery of the export." + }, + "ExportDeliveryInfo": { + "type": "object", + "properties": { + "destination": { + "oneOf": [ + { + "$ref": "#/definitions/ExportDeliveryDestination" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The destination information for the delivery of the export." + } + }, + "required": [ + "destination" + ], + "description": "The delivery information associated with a export." + }, + "ExportProperties": { + "type": "object", + "properties": { + "definition": { + "oneOf": [ + { + "$ref": "#/definitions/QueryDefinition" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The definition of a query." + }, + "deliveryInfo": { + "oneOf": [ + { + "$ref": "#/definitions/ExportDeliveryInfo" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The delivery information associated with a export." + }, + "format": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Csv" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The format of the export being delivered." + }, + "schedule": { + "oneOf": [ + { + "$ref": "#/definitions/ExportSchedule" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The schedule associated with a export." + } + }, + "required": [ + "definition", + "deliveryInfo" + ], + "description": "The properties of the export." + }, + "ExportRecurrencePeriod": { + "type": "object", + "properties": { + "from": { + "type": "string", + "format": "date-time", + "description": "The start date of recurrence." + }, + "to": { + "type": "string", + "format": "date-time", + "description": "The end date of recurrence." + } + }, + "required": [ + "from" + ], + "description": "The start and end date for recurrence schedule." + }, + "ExportSchedule": { + "type": "object", + "properties": { + "recurrence": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Daily", + "Weekly", + "Monthly", + "Annually" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The schedule recurrence." + }, + "recurrencePeriod": { + "oneOf": [ + { + "$ref": "#/definitions/ExportRecurrencePeriod" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The start and end date for recurrence schedule." + }, + "status": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Active", + "Inactive" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The status of the schedule. Whether active or not. If inactive, the export's scheduled execution is paused." + } + }, + "required": [ + "recurrence" + ], + "description": "The schedule associated with a export." + }, + "QueryAggregation": { + "type": "object", + "properties": { + "function": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Sum" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The name of the aggregation function to use." + }, + "name": { + "type": "string", + "description": "The name of the column to aggregate." + } + }, + "required": [ + "function", + "name" + ], + "description": "The aggregation expression to be used in the query." + }, + "QueryComparisonExpression": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the column to use in comparison." + }, + "operator": { + "oneOf": [ + { + "type": "string", + "enum": [ + "In" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The operator to use for comparison." + }, + "values": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Array of values to use for comparison" + } + }, + "required": [ + "name", + "operator", + "values" + ], + "description": "The comparison expression to be used in the query." + }, + "QueryDataset": { + "type": "object", + "properties": { + "aggregation": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/QueryAggregation" + }, + "properties": {} + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Dictionary of aggregation expression to use in the query. The key of each item in the dictionary is the alias for the aggregated column. Query can have up to 2 aggregation clauses." + }, + "configuration": { + "oneOf": [ + { + "$ref": "#/definitions/QueryDatasetConfiguration" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The configuration of dataset in the query." + }, + "filter": { + "oneOf": [ + { + "$ref": "#/definitions/QueryFilter" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The filter expression to be used in the export." + }, + "granularity": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Daily", + "Hourly" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The granularity of rows in the query." + }, + "grouping": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/QueryGrouping" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Array of group by expression to use in the query. Query can have up to 2 group by clauses." + }, + "sorting": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/QuerySortingConfiguration" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Array of sorting by columns in query." + } + }, + "description": "The definition of data present in the query." + }, + "QueryDatasetConfiguration": { + "type": "object", + "properties": { + "columns": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Array of column names to be included in the query. Any valid query column name is allowed. If not provided, then query includes all columns." + } + }, + "description": "The configuration of dataset in the query." + }, + "QueryDefinition": { + "type": "object", + "properties": { + "dataset": { + "oneOf": [ + { + "$ref": "#/definitions/QueryDataset" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The definition of data present in the query." + }, + "timeframe": { + "oneOf": [ + { + "type": "string", + "enum": [ + "WeekToDate", + "MonthToDate", + "YearToDate", + "TheLastWeek", + "TheLastMonth", + "TheLastYear", + "Custom" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The time frame for pulling data for the query. If custom, then a specific time period must be provided." + }, + "timePeriod": { + "oneOf": [ + { + "$ref": "#/definitions/QueryTimePeriod" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The start and end date for pulling data for the query." + }, + "type": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Usage" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The type of the query." + } + }, + "required": [ + "timeframe", + "type" + ], + "description": "The definition of a query." + }, + "QueryFilter": { + "type": "object", + "properties": { + "and": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/QueryFilter" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The logical \"AND\" expression. Must have at least 2 items." + }, + "dimension": { + "oneOf": [ + { + "$ref": "#/definitions/QueryComparisonExpression" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The comparison expression to be used in the query." + }, + "not": { + "oneOf": [ + { + "$ref": "#/definitions/QueryFilter" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The filter expression to be used in the export." + }, + "or": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/QueryFilter" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The logical \"OR\" expression. Must have at least 2 items." + }, + "tag": { + "oneOf": [ + { + "$ref": "#/definitions/QueryComparisonExpression" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The comparison expression to be used in the query." + } + }, + "description": "The filter expression to be used in the export." + }, + "QueryGrouping": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the column to group." + }, + "type": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Tag", + "Dimension" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Has type of the column to group." + } + }, + "required": [ + "name", + "type" + ], + "description": "The group by expression to be used in the query." + }, + "QuerySortingConfiguration": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the column to use in sorting." + }, + "querySortingDirection": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Ascending", + "Descending" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The sorting direction." + } + }, + "description": "The configuration for sorting in the query." + }, + "QueryTimePeriod": { + "type": "object", + "properties": { + "from": { + "type": "string", + "format": "date-time", + "description": "The start date to pull data from." + }, + "to": { + "type": "string", + "format": "date-time", + "description": "The end date to pull data to." + } + }, + "required": [ + "from", + "to" + ], + "description": "The start and end date for pulling data for the query." + } + } +} diff --git a/schemas/2019-10-01/Microsoft.CostManagement.json b/schemas/2019-10-01/Microsoft.CostManagement.json new file mode 100644 index 0000000000..40638d82cb --- /dev/null +++ b/schemas/2019-10-01/Microsoft.CostManagement.json @@ -0,0 +1,604 @@ +{ + "id": "https://schema.management.azure.com/schemas/2019-10-01/Microsoft.CostManagement.json#", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Microsoft.CostManagement", + "description": "Microsoft CostManagement Resource Types", + "resourceDefinitions": {}, + "unknown_resourceDefinitions": { + "exports": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2019-10-01" + ] + }, + "name": { + "type": "string", + "description": "Export Name." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/ExportProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The properties of the export." + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.CostManagement/exports" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.CostManagement/exports" + } + }, + "definitions": { + "ExportDeliveryDestination": { + "type": "object", + "properties": { + "container": { + "type": "string", + "description": "The name of the container where exports will be uploaded." + }, + "resourceId": { + "type": "string", + "description": "The resource id of the storage account where exports will be delivered." + }, + "rootFolderPath": { + "type": "string", + "description": "The name of the directory where exports will be uploaded." + } + }, + "required": [ + "container", + "resourceId" + ], + "description": "The destination information for the delivery of the export." + }, + "ExportDeliveryInfo": { + "type": "object", + "properties": { + "destination": { + "oneOf": [ + { + "$ref": "#/definitions/ExportDeliveryDestination" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The destination information for the delivery of the export." + } + }, + "required": [ + "destination" + ], + "description": "The delivery information associated with a export." + }, + "ExportProperties": { + "type": "object", + "properties": { + "definition": { + "oneOf": [ + { + "$ref": "#/definitions/QueryDefinition" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The definition of a query." + }, + "deliveryInfo": { + "oneOf": [ + { + "$ref": "#/definitions/ExportDeliveryInfo" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The delivery information associated with a export." + }, + "format": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Csv" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The format of the export being delivered." + }, + "schedule": { + "oneOf": [ + { + "$ref": "#/definitions/ExportSchedule" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The schedule associated with a export." + } + }, + "required": [ + "definition", + "deliveryInfo" + ], + "description": "The properties of the export." + }, + "ExportRecurrencePeriod": { + "type": "object", + "properties": { + "from": { + "type": "string", + "format": "date-time", + "description": "The start date of recurrence." + }, + "to": { + "type": "string", + "format": "date-time", + "description": "The end date of recurrence." + } + }, + "required": [ + "from" + ], + "description": "The start and end date for recurrence schedule." + }, + "ExportSchedule": { + "type": "object", + "properties": { + "recurrence": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Daily", + "Weekly", + "Monthly", + "Annually" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The schedule recurrence." + }, + "recurrencePeriod": { + "oneOf": [ + { + "$ref": "#/definitions/ExportRecurrencePeriod" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The start and end date for recurrence schedule." + }, + "status": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Active", + "Inactive" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The status of the schedule. Whether active or not. If inactive, the export's scheduled execution is paused." + } + }, + "required": [ + "recurrence" + ], + "description": "The schedule associated with a export." + }, + "QueryAggregation": { + "type": "object", + "properties": { + "function": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Sum" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The name of the aggregation function to use." + }, + "name": { + "type": "string", + "description": "The name of the column to aggregate." + } + }, + "required": [ + "function", + "name" + ], + "description": "The aggregation expression to be used in the query." + }, + "QueryComparisonExpression": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the column to use in comparison." + }, + "operator": { + "oneOf": [ + { + "type": "string", + "enum": [ + "In" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The operator to use for comparison." + }, + "values": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Array of values to use for comparison" + } + }, + "required": [ + "name", + "operator", + "values" + ], + "description": "The comparison expression to be used in the query." + }, + "QueryDataset": { + "type": "object", + "properties": { + "aggregation": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/QueryAggregation" + }, + "properties": {} + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Dictionary of aggregation expression to use in the query. The key of each item in the dictionary is the alias for the aggregated column. Query can have up to 2 aggregation clauses." + }, + "configuration": { + "oneOf": [ + { + "$ref": "#/definitions/QueryDatasetConfiguration" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The configuration of dataset in the query." + }, + "filter": { + "oneOf": [ + { + "$ref": "#/definitions/QueryFilter" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The filter expression to be used in the export." + }, + "granularity": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Daily", + "Hourly" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The granularity of rows in the query." + }, + "grouping": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/QueryGrouping" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Array of group by expression to use in the query. Query can have up to 2 group by clauses." + }, + "sorting": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/QuerySortingConfiguration" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Array of sorting by columns in query." + } + }, + "description": "The definition of data present in the query." + }, + "QueryDatasetConfiguration": { + "type": "object", + "properties": { + "columns": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Array of column names to be included in the query. Any valid query column name is allowed. If not provided, then query includes all columns." + } + }, + "description": "The configuration of dataset in the query." + }, + "QueryDefinition": { + "type": "object", + "properties": { + "dataset": { + "oneOf": [ + { + "$ref": "#/definitions/QueryDataset" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The definition of data present in the query." + }, + "timeframe": { + "oneOf": [ + { + "type": "string", + "enum": [ + "WeekToDate", + "MonthToDate", + "YearToDate", + "TheLastWeek", + "TheLastMonth", + "TheLastYear", + "Custom" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The time frame for pulling data for the query. If custom, then a specific time period must be provided." + }, + "timePeriod": { + "oneOf": [ + { + "$ref": "#/definitions/QueryTimePeriod" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The start and end date for pulling data for the query." + }, + "type": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Usage" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The type of the query." + } + }, + "required": [ + "timeframe", + "type" + ], + "description": "The definition of a query." + }, + "QueryFilter": { + "type": "object", + "properties": { + "and": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/QueryFilter" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The logical \"AND\" expression. Must have at least 2 items." + }, + "dimension": { + "oneOf": [ + { + "$ref": "#/definitions/QueryComparisonExpression" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The comparison expression to be used in the query." + }, + "not": { + "oneOf": [ + { + "$ref": "#/definitions/QueryFilter" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The filter expression to be used in the export." + }, + "or": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/QueryFilter" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The logical \"OR\" expression. Must have at least 2 items." + }, + "tag": { + "oneOf": [ + { + "$ref": "#/definitions/QueryComparisonExpression" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The comparison expression to be used in the query." + } + }, + "description": "The filter expression to be used in the export." + }, + "QueryGrouping": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the column to group." + }, + "type": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Tag", + "Dimension" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Has type of the column to group." + } + }, + "required": [ + "name", + "type" + ], + "description": "The group by expression to be used in the query." + }, + "QuerySortingConfiguration": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the column to use in sorting." + }, + "querySortingDirection": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Ascending", + "Descending" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The sorting direction." + } + }, + "description": "The configuration for sorting in the query." + }, + "QueryTimePeriod": { + "type": "object", + "properties": { + "from": { + "type": "string", + "format": "date-time", + "description": "The start date to pull data from." + }, + "to": { + "type": "string", + "format": "date-time", + "description": "The end date to pull data to." + } + }, + "required": [ + "from", + "to" + ], + "description": "The start and end date for pulling data for the query." + } + } +} diff --git a/schemas/2019-11-01/Microsoft.CostManagement.json b/schemas/2019-11-01/Microsoft.CostManagement.json new file mode 100644 index 0000000000..bfcdceb840 --- /dev/null +++ b/schemas/2019-11-01/Microsoft.CostManagement.json @@ -0,0 +1,1195 @@ +{ + "id": "https://schema.management.azure.com/schemas/2019-11-01/Microsoft.CostManagement.json#", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Microsoft.CostManagement", + "description": "Microsoft CostManagement Resource Types", + "resourceDefinitions": {}, + "tenant_resourceDefinitions": { + "views": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2019-11-01" + ] + }, + "eTag": { + "type": "string", + "description": "eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not." + }, + "name": { + "type": "string", + "description": "View name" + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/ViewProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The properties of the view." + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.CostManagement/views" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.CostManagement/views" + } + }, + "unknown_resourceDefinitions": { + "exports": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2019-11-01" + ] + }, + "eTag": { + "type": "string", + "description": "eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not." + }, + "name": { + "type": "string", + "description": "Export Name." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/ExportProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The properties of the export." + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.CostManagement/exports" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.CostManagement/exports" + }, + "views": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2019-11-01" + ] + }, + "eTag": { + "type": "string", + "description": "eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not." + }, + "name": { + "type": "string", + "description": "View name" + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/ViewProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The properties of the view." + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.CostManagement/views" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.CostManagement/views" + } + }, + "definitions": { + "ExportDefinition": { + "type": "object", + "properties": { + "dataSet": { + "oneOf": [ + { + "$ref": "#/definitions/QueryDatasetModel" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The definition of data present in the query." + }, + "timeframe": { + "oneOf": [ + { + "type": "string", + "enum": [ + "MonthToDate", + "BillingMonthToDate", + "TheLastMonth", + "TheLastBillingMonth", + "WeekToDate", + "Custom" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The time frame for pulling data for the query. If custom, then a specific time period must be provided." + }, + "timePeriod": { + "oneOf": [ + { + "$ref": "#/definitions/QueryTimePeriod" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The start and end date for pulling data for the query." + }, + "type": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Usage", + "ActualCost", + "AmortizedCost" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The type of the query." + } + }, + "required": [ + "timeframe", + "type" + ], + "description": "The definition of a query." + }, + "ExportDeliveryDestination": { + "type": "object", + "properties": { + "container": { + "type": "string", + "description": "The name of the container where exports will be uploaded." + }, + "resourceId": { + "type": "string", + "description": "The resource id of the storage account where exports will be delivered." + }, + "rootFolderPath": { + "type": "string", + "description": "The name of the directory where exports will be uploaded." + } + }, + "required": [ + "container", + "resourceId" + ], + "description": "The destination information for the delivery of the export. To allow access to a storage account, you must register the account's subscription with the Microsoft.CostManagementExports resource provider. This is required once per subscription. When creating an export in the Azure portal, it is done automatically, however API users need to register the subscription. For more information see https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-supported-services ." + }, + "ExportDeliveryInfo": { + "type": "object", + "properties": { + "destination": { + "oneOf": [ + { + "$ref": "#/definitions/ExportDeliveryDestination" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The destination information for the delivery of the export. To allow access to a storage account, you must register the account's subscription with the Microsoft.CostManagementExports resource provider. This is required once per subscription. When creating an export in the Azure portal, it is done automatically, however API users need to register the subscription. For more information see https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-supported-services ." + } + }, + "required": [ + "destination" + ], + "description": "The delivery information associated with a export." + }, + "ExportProperties": { + "type": "object", + "properties": { + "definition": { + "oneOf": [ + { + "$ref": "#/definitions/ExportDefinition" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The definition of a query." + }, + "deliveryInfo": { + "oneOf": [ + { + "$ref": "#/definitions/ExportDeliveryInfo" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The delivery information associated with a export." + }, + "format": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Csv" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The format of the export being delivered." + }, + "schedule": { + "oneOf": [ + { + "$ref": "#/definitions/ExportSchedule" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The schedule associated with a export." + } + }, + "required": [ + "definition", + "deliveryInfo" + ], + "description": "The properties of the export." + }, + "ExportRecurrencePeriod": { + "type": "object", + "properties": { + "from": { + "type": "string", + "format": "date-time", + "description": "The start date of recurrence." + }, + "to": { + "type": "string", + "format": "date-time", + "description": "The end date of recurrence." + } + }, + "required": [ + "from" + ], + "description": "The start and end date for recurrence schedule." + }, + "ExportSchedule": { + "type": "object", + "properties": { + "recurrence": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Daily", + "Weekly", + "Monthly", + "Annually" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The schedule recurrence." + }, + "recurrencePeriod": { + "oneOf": [ + { + "$ref": "#/definitions/ExportRecurrencePeriod" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The start and end date for recurrence schedule." + }, + "status": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Active", + "Inactive" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The status of the schedule. Whether active or not. If inactive, the export's scheduled execution is paused." + } + }, + "required": [ + "recurrence" + ], + "description": "The schedule associated with a export." + }, + "KpiProperties": { + "type": "object", + "properties": { + "enabled": { + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "show the KPI in the UI?" + }, + "id": { + "type": "string", + "description": "ID of resource related to metric (budget)." + }, + "type": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Forecast", + "Budget" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "KPI type (Forecast, Budget)." + } + }, + "description": "Each KPI must contain a 'type' and 'enabled' key." + }, + "PivotProperties": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Data field to show in view." + }, + "type": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Dimension", + "TagKey" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Data type to show in view." + } + }, + "description": "Each pivot must contain a 'type' and 'name'." + }, + "QueryAggregation": { + "type": "object", + "properties": { + "function": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Sum" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The name of the aggregation function to use." + }, + "name": { + "type": "string", + "description": "The name of the column to aggregate." + } + }, + "required": [ + "function", + "name" + ], + "description": "The aggregation expression to be used in the query." + }, + "QueryComparisonExpression": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the column to use in comparison." + }, + "operator": { + "oneOf": [ + { + "type": "string", + "enum": [ + "In", + "Contains" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The operator to use for comparison." + }, + "values": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Array of values to use for comparison" + } + }, + "required": [ + "name", + "operator", + "values" + ], + "description": "The comparison expression to be used in the query." + }, + "QueryDatasetConfiguration": { + "type": "object", + "properties": { + "columns": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Array of column names to be included in the query. Any valid query column name is allowed. If not provided, then query includes all columns." + } + }, + "description": "The configuration of dataset in the query." + }, + "QueryDatasetModel": { + "type": "object", + "properties": { + "aggregation": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/QueryAggregation" + }, + "properties": {} + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Dictionary of aggregation expression to use in the query. The key of each item in the dictionary is the alias for the aggregated column. Query can have up to 2 aggregation clauses." + }, + "configuration": { + "oneOf": [ + { + "$ref": "#/definitions/QueryDatasetConfiguration" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The configuration of dataset in the query." + }, + "filter": { + "oneOf": [ + { + "$ref": "#/definitions/QueryFilterModel" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The filter expression to be used in the export." + }, + "granularity": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Daily" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The granularity of rows in the query." + }, + "grouping": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/QueryGrouping" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Array of group by expression to use in the query. Query can have up to 2 group by clauses." + } + }, + "description": "The definition of data present in the query." + }, + "QueryFilterModel": { + "type": "object", + "properties": { + "and": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/QueryFilterModel" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The logical \"AND\" expression. Must have at least 2 items." + }, + "dimensions": { + "oneOf": [ + { + "$ref": "#/definitions/QueryComparisonExpression" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The comparison expression to be used in the query." + }, + "or": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/QueryFilterModel" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The logical \"OR\" expression. Must have at least 2 items." + }, + "tags": { + "oneOf": [ + { + "$ref": "#/definitions/QueryComparisonExpression" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The comparison expression to be used in the query." + } + }, + "description": "The filter expression to be used in the export." + }, + "QueryGrouping": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the column to group." + }, + "type": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Tag", + "Dimension" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Has type of the column to group." + } + }, + "required": [ + "name", + "type" + ], + "description": "The group by expression to be used in the query." + }, + "QueryTimePeriod": { + "type": "object", + "properties": { + "from": { + "type": "string", + "format": "date-time", + "description": "The start date to pull data from." + }, + "to": { + "type": "string", + "format": "date-time", + "description": "The end date to pull data to." + } + }, + "required": [ + "from", + "to" + ], + "description": "The start and end date for pulling data for the query." + }, + "ReportConfigAggregation": { + "type": "object", + "properties": { + "function": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Sum" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The name of the aggregation function to use." + }, + "name": { + "type": "string", + "description": "The name of the column to aggregate." + } + }, + "required": [ + "function", + "name" + ], + "description": "The aggregation expression to be used in the report." + }, + "ReportConfigComparisonExpression": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the column to use in comparison." + }, + "operator": { + "oneOf": [ + { + "type": "string", + "enum": [ + "In", + "Contains" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The operator to use for comparison." + }, + "values": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Array of values to use for comparison" + } + }, + "required": [ + "name", + "operator", + "values" + ], + "description": "The comparison expression to be used in the report." + }, + "ReportConfigDataset": { + "type": "object", + "properties": { + "aggregation": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/ReportConfigAggregation" + }, + "properties": {} + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Dictionary of aggregation expression to use in the report. The key of each item in the dictionary is the alias for the aggregated column. Report can have up to 2 aggregation clauses." + }, + "configuration": { + "oneOf": [ + { + "$ref": "#/definitions/ReportConfigDatasetConfiguration" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The configuration of dataset in the report." + }, + "filter": { + "oneOf": [ + { + "$ref": "#/definitions/ReportConfigFilter" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The filter expression to be used in the report." + }, + "granularity": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Daily", + "Monthly" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The granularity of rows in the report." + }, + "grouping": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/ReportConfigGrouping" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Array of group by expression to use in the report. Report can have up to 2 group by clauses." + }, + "sorting": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/ReportConfigSorting" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Array of order by expression to use in the report." + } + }, + "description": "The definition of data present in the report." + }, + "ReportConfigDatasetConfiguration": { + "type": "object", + "properties": { + "columns": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "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." + } + }, + "description": "The configuration of dataset in the report." + }, + "ReportConfigDefinition": { + "type": "object", + "properties": { + "dataSet": { + "oneOf": [ + { + "$ref": "#/definitions/ReportConfigDataset" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The definition of data present in the report." + }, + "timeframe": { + "oneOf": [ + { + "type": "string", + "enum": [ + "WeekToDate", + "MonthToDate", + "YearToDate", + "Custom" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The time frame for pulling data for the report. If custom, then a specific time period must be provided." + }, + "timePeriod": { + "oneOf": [ + { + "$ref": "#/definitions/ReportConfigTimePeriod" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The start and end date for pulling data for the report." + }, + "type": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Usage" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The type of the report. Usage represents actual usage, forecast represents forecasted data and UsageAndForecast represents both usage and forecasted data. Actual usage and forecasted data can be differentiated based on dates." + } + }, + "required": [ + "timeframe", + "type" + ], + "description": "The definition of a report config." + }, + "ReportConfigFilter": { + "type": "object", + "properties": { + "and": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/ReportConfigFilter" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The logical \"AND\" expression. Must have at least 2 items." + }, + "dimensions": { + "oneOf": [ + { + "$ref": "#/definitions/ReportConfigComparisonExpression" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The comparison expression to be used in the report." + }, + "or": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/ReportConfigFilter" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The logical \"OR\" expression. Must have at least 2 items." + }, + "tagKey": { + "oneOf": [ + { + "$ref": "#/definitions/ReportConfigComparisonExpression" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The comparison expression to be used in the report." + }, + "tags": { + "oneOf": [ + { + "$ref": "#/definitions/ReportConfigComparisonExpression" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The comparison expression to be used in the report." + } + }, + "description": "The filter expression to be used in the report." + }, + "ReportConfigGrouping": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the column to group. This version supports subscription lowest possible grain." + }, + "type": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Tag", + "Dimension" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Has type of the column to group." + } + }, + "required": [ + "name", + "type" + ], + "description": "The group by expression to be used in the report." + }, + "ReportConfigSorting": { + "type": "object", + "properties": { + "direction": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Ascending", + "Descending" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Direction of sort." + }, + "name": { + "type": "string", + "description": "The name of the column to sort." + } + }, + "required": [ + "name" + ], + "description": "The order by expression to be used in the report." + }, + "ReportConfigTimePeriod": { + "type": "object", + "properties": { + "from": { + "type": "string", + "format": "date-time", + "description": "The start date to pull data from." + }, + "to": { + "type": "string", + "format": "date-time", + "description": "The end date to pull data to." + } + }, + "required": [ + "from", + "to" + ], + "description": "The start and end date for pulling data for the report." + }, + "ViewProperties": { + "type": "object", + "properties": { + "accumulated": { + "oneOf": [ + { + "type": "string", + "enum": [ + "true", + "false" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Show costs accumulated over time." + }, + "chart": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Area", + "Line", + "StackedColumn", + "GroupedColumn", + "Table" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Chart type of the main view in Cost Analysis. Required." + }, + "displayName": { + "type": "string", + "description": "User input name of the view. Required." + }, + "kpis": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/KpiProperties" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "List of KPIs to show in Cost Analysis UI." + }, + "metric": { + "oneOf": [ + { + "type": "string", + "enum": [ + "ActualCost", + "AmortizedCost", + "AHUB" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Metric to use when displaying costs." + }, + "pivots": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/PivotProperties" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Configuration of 3 sub-views in the Cost Analysis UI." + }, + "query": { + "oneOf": [ + { + "$ref": "#/definitions/ReportConfigDefinition" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The definition of a report config." + }, + "scope": { + "type": "string", + "description": "Cost Management scope to save the view on. This includes 'subscriptions/{subscriptionId}' for subscription scope, 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for BillingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, '/providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for ExternalBillingAccount scope, and '/providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for ExternalSubscription scope." + } + }, + "description": "The properties of the view." + } + } +} diff --git a/schemas/2020-03-01-preview/Microsoft.CostManagement.json b/schemas/2020-03-01-preview/Microsoft.CostManagement.json new file mode 100644 index 0000000000..a6f15e3437 --- /dev/null +++ b/schemas/2020-03-01-preview/Microsoft.CostManagement.json @@ -0,0 +1,253 @@ +{ + "id": "https://schema.management.azure.com/schemas/2020-03-01-preview/Microsoft.CostManagement.json#", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Microsoft.CostManagement", + "description": "Microsoft CostManagement Resource Types", + "resourceDefinitions": {}, + "extension_resourceDefinitions": { + "costAllocationRules": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2020-03-01-preview" + ] + }, + "name": { + "type": "string", + "description": "Cost allocation rule name. The name cannot include spaces or any non alphanumeric characters other than '_' and '-'. The max length is 260 characters." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/CostAllocationRuleProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The properties of a cost allocation rule" + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.CostManagement/costAllocationRules" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.CostManagement/costAllocationRules" + } + }, + "definitions": { + "CostAllocationProportion": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Target resource for cost allocation" + }, + "percentage": { + "oneOf": [ + { + "type": "number" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Percentage of source cost to allocate to this resource. This value can be specified to two decimal places and the total percentage of all resources in this rule must sum to 100.00." + } + }, + "required": [ + "name", + "percentage" + ], + "description": "Target resources and allocation" + }, + "CostAllocationRuleDetails": { + "type": "object", + "properties": { + "sourceResources": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/SourceCostAllocationResource" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Source resources for cost allocation. At this time, this list can contain no more than one element." + }, + "targetResources": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/TargetCostAllocationResource" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Target resources for cost allocation. At this time, this list can contain no more than one element." + } + }, + "description": "Resource details of the cost allocation rule" + }, + "CostAllocationRuleProperties": { + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "Description of a cost allocation rule." + }, + "details": { + "oneOf": [ + { + "$ref": "#/definitions/CostAllocationRuleDetails" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Resource details of the cost allocation rule" + }, + "status": { + "oneOf": [ + { + "type": "string", + "enum": [ + "NotActive", + "Active", + "Processing" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Status of the rule." + } + }, + "required": [ + "details", + "status" + ], + "description": "The properties of a cost allocation rule" + }, + "SourceCostAllocationResource": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "If resource type is dimension, this must be either ResourceGroupName or SubscriptionId. If resource type is tag, this must be a valid Azure tag" + }, + "resourceType": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Dimension", + "Tag" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Type of resources contained in this cost allocation rule." + }, + "values": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Source Resources for cost allocation. This list cannot contain more than 25 values." + } + }, + "required": [ + "name", + "resourceType", + "values" + ], + "description": "Source resources for cost allocation" + }, + "TargetCostAllocationResource": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "If resource type is dimension, this must be either ResourceGroupName or SubscriptionId. If resource type is tag, this must be a valid Azure tag" + }, + "policyType": { + "oneOf": [ + { + "type": "string", + "enum": [ + "FixedProportion" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Method of cost allocation for the rule" + }, + "resourceType": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Dimension", + "Tag" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Type of resources contained in this cost allocation rule." + }, + "values": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/CostAllocationProportion" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Target resources for cost allocation. This list cannot contain more than 25 values." + } + }, + "required": [ + "name", + "policyType", + "resourceType", + "values" + ], + "description": "Target resources for cost allocation." + } + } +} diff --git a/schemas/2020-06-01/Microsoft.CostManagement.json b/schemas/2020-06-01/Microsoft.CostManagement.json new file mode 100644 index 0000000000..8870270798 --- /dev/null +++ b/schemas/2020-06-01/Microsoft.CostManagement.json @@ -0,0 +1,1011 @@ +{ + "id": "https://schema.management.azure.com/schemas/2020-06-01/Microsoft.CostManagement.json#", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Microsoft.CostManagement", + "description": "Microsoft CostManagement Resource Types", + "resourceDefinitions": {}, + "tenant_resourceDefinitions": { + "views": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2020-06-01" + ] + }, + "eTag": { + "type": "string", + "description": "eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not." + }, + "name": { + "type": "string", + "description": "View name" + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/ViewProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The properties of the view." + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.CostManagement/views" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.CostManagement/views" + } + }, + "unknown_resourceDefinitions": { + "exports": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2020-06-01" + ] + }, + "eTag": { + "type": "string", + "description": "eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not." + }, + "name": { + "type": "string", + "description": "Export Name." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/ExportProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The properties of the export." + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.CostManagement/exports" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.CostManagement/exports" + }, + "views": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2020-06-01" + ] + }, + "eTag": { + "type": "string", + "description": "eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not." + }, + "name": { + "type": "string", + "description": "View name" + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/ViewProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The properties of the view." + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.CostManagement/views" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.CostManagement/views" + } + }, + "definitions": { + "ExportDataset": { + "type": "object", + "properties": { + "configuration": { + "oneOf": [ + { + "$ref": "#/definitions/ExportDatasetConfiguration" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The export dataset configuration. Allows columns to be selected for the export. If not provided then the export will include all available columns." + }, + "granularity": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Daily" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The granularity of rows in the export. Currently only 'Daily' is supported." + } + }, + "description": "The definition for data in the export." + }, + "ExportDatasetConfiguration": { + "type": "object", + "properties": { + "columns": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Array of column names to be included in the export. If not provided then the export will include all available columns. The available columns can vary by customer channel (see examples)." + } + }, + "description": "The export dataset configuration. Allows columns to be selected for the export. If not provided then the export will include all available columns." + }, + "ExportDefinition": { + "type": "object", + "properties": { + "dataSet": { + "oneOf": [ + { + "$ref": "#/definitions/ExportDataset" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The definition for data in the export." + }, + "timeframe": { + "oneOf": [ + { + "type": "string", + "enum": [ + "MonthToDate", + "BillingMonthToDate", + "TheLastMonth", + "TheLastBillingMonth", + "WeekToDate", + "Custom" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The time frame for pulling data for the export. If custom, then a specific time period must be provided." + }, + "timePeriod": { + "oneOf": [ + { + "$ref": "#/definitions/ExportTimePeriod" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The date range for data in the export. This should only be specified with timeFrame set to 'Custom'. The maximum date range is 3 months." + }, + "type": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Usage", + "ActualCost", + "AmortizedCost" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The type of the export. Note that 'Usage' is equivalent to 'ActualCost' and is applicable to exports that do not yet provide data for charges or amortization for service reservations." + } + }, + "required": [ + "timeframe", + "type" + ], + "description": "The definition of an export." + }, + "ExportDeliveryDestination": { + "type": "object", + "properties": { + "container": { + "type": "string", + "description": "The name of the container where exports will be uploaded." + }, + "resourceId": { + "type": "string", + "description": "The resource id of the storage account where exports will be delivered." + }, + "rootFolderPath": { + "type": "string", + "description": "The name of the directory where exports will be uploaded." + } + }, + "required": [ + "container", + "resourceId" + ], + "description": "The destination information for the delivery of the export. To allow access to a storage account, you must register the account's subscription with the Microsoft.CostManagementExports resource provider. This is required once per subscription. When creating an export in the Azure portal, it is done automatically, however API users need to register the subscription. For more information see https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-supported-services ." + }, + "ExportDeliveryInfo": { + "type": "object", + "properties": { + "destination": { + "oneOf": [ + { + "$ref": "#/definitions/ExportDeliveryDestination" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The destination information for the delivery of the export. To allow access to a storage account, you must register the account's subscription with the Microsoft.CostManagementExports resource provider. This is required once per subscription. When creating an export in the Azure portal, it is done automatically, however API users need to register the subscription. For more information see https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-supported-services ." + } + }, + "required": [ + "destination" + ], + "description": "The delivery information associated with a export." + }, + "ExportExecutionListResult": { + "type": "object", + "properties": {}, + "description": "Result of listing the execution history of an export." + }, + "ExportProperties": { + "type": "object", + "properties": { + "definition": { + "oneOf": [ + { + "$ref": "#/definitions/ExportDefinition" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The definition of an export." + }, + "deliveryInfo": { + "oneOf": [ + { + "$ref": "#/definitions/ExportDeliveryInfo" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The delivery information associated with a export." + }, + "format": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Csv" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The format of the export being delivered. Currently only 'Csv' is supported." + }, + "runHistory": { + "oneOf": [ + { + "$ref": "#/definitions/ExportExecutionListResult" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Result of listing the execution history of an export." + }, + "schedule": { + "oneOf": [ + { + "$ref": "#/definitions/ExportSchedule" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The schedule associated with the export." + } + }, + "required": [ + "definition", + "deliveryInfo" + ], + "description": "The properties of the export." + }, + "ExportRecurrencePeriod": { + "type": "object", + "properties": { + "from": { + "type": "string", + "format": "date-time", + "description": "The start date of recurrence." + }, + "to": { + "type": "string", + "format": "date-time", + "description": "The end date of recurrence." + } + }, + "required": [ + "from" + ], + "description": "The start and end date for recurrence schedule." + }, + "ExportSchedule": { + "type": "object", + "properties": { + "recurrence": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Daily", + "Weekly", + "Monthly", + "Annually" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The schedule recurrence." + }, + "recurrencePeriod": { + "oneOf": [ + { + "$ref": "#/definitions/ExportRecurrencePeriod" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The start and end date for recurrence schedule." + }, + "status": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Active", + "Inactive" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The status of the export's schedule. If 'Inactive', the export's schedule is paused." + } + }, + "description": "The schedule associated with the export." + }, + "ExportTimePeriod": { + "type": "object", + "properties": { + "from": { + "type": "string", + "format": "date-time", + "description": "The start date for export data." + }, + "to": { + "type": "string", + "format": "date-time", + "description": "The end date for export data." + } + }, + "required": [ + "from", + "to" + ], + "description": "The date range for data in the export. This should only be specified with timeFrame set to 'Custom'. The maximum date range is 3 months." + }, + "KpiProperties": { + "type": "object", + "properties": { + "enabled": { + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "show the KPI in the UI?" + }, + "id": { + "type": "string", + "description": "ID of resource related to metric (budget)." + }, + "type": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Forecast", + "Budget" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "KPI type (Forecast, Budget)." + } + }, + "description": "Each KPI must contain a 'type' and 'enabled' key." + }, + "PivotProperties": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Data field to show in view." + }, + "type": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Dimension", + "TagKey" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Data type to show in view." + } + }, + "description": "Each pivot must contain a 'type' and 'name'." + }, + "ReportConfigAggregation": { + "type": "object", + "properties": { + "function": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Sum" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The name of the aggregation function to use." + }, + "name": { + "type": "string", + "description": "The name of the column to aggregate." + } + }, + "required": [ + "function", + "name" + ], + "description": "The aggregation expression to be used in the report." + }, + "ReportConfigComparisonExpression": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the column to use in comparison." + }, + "operator": { + "oneOf": [ + { + "type": "string", + "enum": [ + "In", + "Contains" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The operator to use for comparison." + }, + "values": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Array of values to use for comparison" + } + }, + "required": [ + "name", + "operator", + "values" + ], + "description": "The comparison expression to be used in the report." + }, + "ReportConfigDataset": { + "type": "object", + "properties": { + "aggregation": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/ReportConfigAggregation" + }, + "properties": {} + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Dictionary of aggregation expression to use in the report. The key of each item in the dictionary is the alias for the aggregated column. Report can have up to 2 aggregation clauses." + }, + "configuration": { + "oneOf": [ + { + "$ref": "#/definitions/ReportConfigDatasetConfiguration" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The configuration of dataset in the report." + }, + "filter": { + "oneOf": [ + { + "$ref": "#/definitions/ReportConfigFilter" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The filter expression to be used in the report." + }, + "granularity": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Daily", + "Monthly" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The granularity of rows in the report." + }, + "grouping": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/ReportConfigGrouping" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Array of group by expression to use in the report. Report can have up to 2 group by clauses." + }, + "sorting": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/ReportConfigSorting" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Array of order by expression to use in the report." + } + }, + "description": "The definition of data present in the report." + }, + "ReportConfigDatasetConfiguration": { + "type": "object", + "properties": { + "columns": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "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." + } + }, + "description": "The configuration of dataset in the report." + }, + "ReportConfigDefinition": { + "type": "object", + "properties": { + "dataset": { + "oneOf": [ + { + "$ref": "#/definitions/ReportConfigDataset" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The definition of data present in the report." + }, + "timeframe": { + "oneOf": [ + { + "type": "string", + "enum": [ + "WeekToDate", + "MonthToDate", + "YearToDate", + "Custom" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The time frame for pulling data for the report. If custom, then a specific time period must be provided." + }, + "timePeriod": { + "oneOf": [ + { + "$ref": "#/definitions/ReportConfigTimePeriod" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The start and end date for pulling data for the report." + }, + "type": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Usage" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The type of the report. Usage represents actual usage, forecast represents forecasted data and UsageAndForecast represents both usage and forecasted data. Actual usage and forecasted data can be differentiated based on dates." + } + }, + "required": [ + "timeframe", + "type" + ], + "description": "The definition of a report config." + }, + "ReportConfigFilter": { + "type": "object", + "properties": { + "and": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/ReportConfigFilter" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The logical \"AND\" expression. Must have at least 2 items." + }, + "dimension": { + "oneOf": [ + { + "$ref": "#/definitions/ReportConfigComparisonExpression" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The comparison expression to be used in the report." + }, + "not": { + "oneOf": [ + { + "$ref": "#/definitions/ReportConfigFilter" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The filter expression to be used in the report." + }, + "or": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/ReportConfigFilter" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The logical \"OR\" expression. Must have at least 2 items." + }, + "tag": { + "oneOf": [ + { + "$ref": "#/definitions/ReportConfigComparisonExpression" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The comparison expression to be used in the report." + } + }, + "description": "The filter expression to be used in the report." + }, + "ReportConfigGrouping": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the column to group. This version supports subscription lowest possible grain." + }, + "type": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Tag", + "Dimension" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Has type of the column to group." + } + }, + "required": [ + "name", + "type" + ], + "description": "The group by expression to be used in the report." + }, + "ReportConfigSorting": { + "type": "object", + "properties": { + "direction": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Ascending", + "Descending" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Direction of sort." + }, + "name": { + "type": "string", + "description": "The name of the column to sort." + } + }, + "required": [ + "name" + ], + "description": "The order by expression to be used in the report." + }, + "ReportConfigTimePeriod": { + "type": "object", + "properties": { + "from": { + "type": "string", + "format": "date-time", + "description": "The start date to pull data from." + }, + "to": { + "type": "string", + "format": "date-time", + "description": "The end date to pull data to." + } + }, + "required": [ + "from", + "to" + ], + "description": "The start and end date for pulling data for the report." + }, + "ViewProperties": { + "type": "object", + "properties": { + "accumulated": { + "oneOf": [ + { + "type": "string", + "enum": [ + "true", + "false" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Show costs accumulated over time." + }, + "chart": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Area", + "Line", + "StackedColumn", + "GroupedColumn", + "Table" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Chart type of the main view in Cost Analysis. Required." + }, + "displayName": { + "type": "string", + "description": "User input name of the view. Required." + }, + "kpis": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/KpiProperties" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "List of KPIs to show in Cost Analysis UI." + }, + "metric": { + "oneOf": [ + { + "type": "string", + "enum": [ + "ActualCost", + "AmortizedCost", + "AHUB" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Metric to use when displaying costs." + }, + "pivots": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/PivotProperties" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Configuration of 3 sub-views in the Cost Analysis UI." + }, + "query": { + "oneOf": [ + { + "$ref": "#/definitions/ReportConfigDefinition" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The definition of a report config." + }, + "scope": { + "type": "string", + "description": "Cost Management scope to save the view on. This includes 'subscriptions/{subscriptionId}' for subscription scope, 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for BillingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, '/providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for ExternalBillingAccount scope, and '/providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for ExternalSubscription scope." + } + }, + "description": "The properties of the view." + } + } +}