From 6912824644275a3497f33f6127a1b4c98e8e8960 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 12 May 2023 21:58:24 +0000 Subject: [PATCH] CodeGen from PR 23955 in Azure/azure-rest-api-specs Merge a57e9210a34423623846fcf3fa4b92c41b2e256c into faeccdca4311ebfbe437d0cbbe3ccad33213d32f --- .../subscriptionDeploymentTemplate.json | 9 + .../managementGroupDeploymentTemplate.json | 6 + .../2019-08-01/tenantDeploymentTemplate.json | 6 + .../2023-03-01/Microsoft.CostManagement.json | 1461 +++++++++++++++++ schemas/common/autogeneratedResources.json | 9 + 5 files changed, 1491 insertions(+) create mode 100644 schemas/2023-03-01/Microsoft.CostManagement.json diff --git a/schemas/2018-05-01/subscriptionDeploymentTemplate.json b/schemas/2018-05-01/subscriptionDeploymentTemplate.json index 9b00e922a9..ecbf16b5fc 100644 --- a/schemas/2018-05-01/subscriptionDeploymentTemplate.json +++ b/schemas/2018-05-01/subscriptionDeploymentTemplate.json @@ -947,6 +947,15 @@ { "$ref": "https://schema.management.azure.com/schemas/2022-10-05-preview/Microsoft.CostManagement.json#/unknown_resourceDefinitions/views" }, + { + "$ref": "https://schema.management.azure.com/schemas/2023-03-01/Microsoft.CostManagement.json#/unknown_resourceDefinitions/exports" + }, + { + "$ref": "https://schema.management.azure.com/schemas/2023-03-01/Microsoft.CostManagement.json#/unknown_resourceDefinitions/scheduledActions" + }, + { + "$ref": "https://schema.management.azure.com/schemas/2023-03-01/Microsoft.CostManagement.json#/unknown_resourceDefinitions/views" + }, { "$ref": "https://schema.management.azure.com/schemas/2023-04-01-preview/Microsoft.CostManagement.json#/unknown_resourceDefinitions/budgets" }, diff --git a/schemas/2019-08-01/managementGroupDeploymentTemplate.json b/schemas/2019-08-01/managementGroupDeploymentTemplate.json index 9cdfc9b497..2544962f45 100644 --- a/schemas/2019-08-01/managementGroupDeploymentTemplate.json +++ b/schemas/2019-08-01/managementGroupDeploymentTemplate.json @@ -788,6 +788,12 @@ { "$ref": "https://schema.management.azure.com/schemas/2022-10-05-preview/Microsoft.CostManagement.json#/unknown_resourceDefinitions/views" }, + { + "$ref": "https://schema.management.azure.com/schemas/2023-03-01/Microsoft.CostManagement.json#/unknown_resourceDefinitions/exports" + }, + { + "$ref": "https://schema.management.azure.com/schemas/2023-03-01/Microsoft.CostManagement.json#/unknown_resourceDefinitions/views" + }, { "$ref": "https://schema.management.azure.com/schemas/2023-04-01-preview/Microsoft.CostManagement.json#/unknown_resourceDefinitions/budgets" }, diff --git a/schemas/2019-08-01/tenantDeploymentTemplate.json b/schemas/2019-08-01/tenantDeploymentTemplate.json index 19bccb4107..ab4685ddef 100644 --- a/schemas/2019-08-01/tenantDeploymentTemplate.json +++ b/schemas/2019-08-01/tenantDeploymentTemplate.json @@ -730,6 +730,12 @@ { "$ref": "https://schema.management.azure.com/schemas/2022-10-05-preview/Microsoft.CostManagement.json#/tenant_resourceDefinitions/views" }, + { + "$ref": "https://schema.management.azure.com/schemas/2023-03-01/Microsoft.CostManagement.json#/tenant_resourceDefinitions/scheduledActions" + }, + { + "$ref": "https://schema.management.azure.com/schemas/2023-03-01/Microsoft.CostManagement.json#/tenant_resourceDefinitions/views" + }, { "$ref": "https://schema.management.azure.com/schemas/2023-04-01-preview/Microsoft.CostManagement.json#/tenant_resourceDefinitions/scheduledActions" }, diff --git a/schemas/2023-03-01/Microsoft.CostManagement.json b/schemas/2023-03-01/Microsoft.CostManagement.json new file mode 100644 index 0000000000..95b1f7df4f --- /dev/null +++ b/schemas/2023-03-01/Microsoft.CostManagement.json @@ -0,0 +1,1461 @@ +{ + "id": "https://schema.management.azure.com/schemas/2023-03-01/Microsoft.CostManagement.json#", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Microsoft.CostManagement", + "description": "Microsoft CostManagement Resource Types", + "resourceDefinitions": {}, + "tenant_resourceDefinitions": { + "scheduledActions": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2023-03-01" + ] + }, + "kind": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Email", + "InsightAlert" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Kind of the scheduled action." + }, + "name": { + "type": "string", + "description": "Scheduled action name." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/ScheduledActionProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The properties of the scheduled action." + }, + "systemData": { + "oneOf": [ + { + "$ref": "#/definitions/SystemData" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Metadata pertaining to creation and last modification of the resource." + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.CostManagement/scheduledActions" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.CostManagement/scheduledActions" + }, + "views": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2023-03-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": [ + "2023-03-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" + }, + "scheduledActions": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2023-03-01" + ] + }, + "kind": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Email", + "InsightAlert" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Kind of the scheduled action." + }, + "name": { + "type": "string", + "description": "Scheduled action name." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/ScheduledActionProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The properties of the scheduled action." + }, + "systemData": { + "oneOf": [ + { + "$ref": "#/definitions/SystemData" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Metadata pertaining to creation and last modification of the resource." + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.CostManagement/scheduledActions" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.CostManagement/scheduledActions" + }, + "views": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2023-03-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. If the container does not exist it will be created." + }, + "resourceId": { + "type": "string", + "description": "The resource id of the storage account where exports will be delivered. This is not required if a sasToken and storageAccount are specified." + }, + "rootFolderPath": { + "type": "string", + "description": "The name of the directory where exports will be uploaded." + }, + "sasToken": { + "type": "string", + "description": "A SAS token for the storage account. For a restricted set of Azure customers this together with storageAccount can be specified instead of resourceId. Note: the value returned by the API for this property will always be obfuscated. Returning this same obfuscated value will not result in the SAS token being updated. To update this value a new SAS token must be specified." + }, + "storageAccount": { + "type": "string", + "description": "The storage account where exports will be uploaded. For a restricted set of Azure customers this together with sasToken can be specified instead of resourceId." + } + }, + "required": [ + "container" + ], + "description": "This represents the blob storage account location where exports of costs will be delivered. There are two ways to configure the destination. The approach recommended for most customers is to specify the resourceId of the storage account. This requires a one-time registration of the account's subscription with the Microsoft.CostManagementExports resource provider in order to give Cost Management services access to the storage. When creating an export in the Azure portal this registration is performed automatically but API users may need to register the subscription explicitly (for more information see https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-supported-services ). Another way to configure the destination is available ONLY to Partners with a Microsoft Partner Agreement plan who are global admins of their billing account. These Partners, instead of specifying the resourceId of a storage account, can specify the storage account name along with a SAS token for the account. This allows exports of costs to a storage account in any tenant. The SAS token should be created for the blob service with Service/Container/Object resource types and with Read/Write/Delete/List/Add/Create permissions (for more information see https://docs.microsoft.com/en-us/azure/cost-management-billing/costs/export-cost-data-storage-account-sas-key )." + }, + "ExportDeliveryInfo": { + "type": "object", + "properties": { + "destination": { + "oneOf": [ + { + "$ref": "#/definitions/ExportDeliveryDestination" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "This represents the blob storage account location where exports of costs will be delivered. There are two ways to configure the destination. The approach recommended for most customers is to specify the resourceId of the storage account. This requires a one-time registration of the account's subscription with the Microsoft.CostManagementExports resource provider in order to give Cost Management services access to the storage. When creating an export in the Azure portal this registration is performed automatically but API users may need to register the subscription explicitly (for more information see https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-supported-services ). Another way to configure the destination is available ONLY to Partners with a Microsoft Partner Agreement plan who are global admins of their billing account. These Partners, instead of specifying the resourceId of a storage account, can specify the storage account name along with a SAS token for the account. This allows exports of costs to a storage account in any tenant. The SAS token should be created for the blob service with Service/Container/Object resource types and with Read/Write/Delete/List/Add/Create permissions (for more information see https://docs.microsoft.com/en-us/azure/cost-management-billing/costs/export-cost-data-storage-account-sas-key )." + } + }, + "required": [ + "destination" + ], + "description": "The delivery information associated with a export." + }, + "ExportExecutionListResult": { + "type": "object", + "properties": {}, + "description": "Result of listing the run 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." + }, + "partitionData": { + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "If set to true, exported data will be partitioned by size and placed in a blob directory together with a manifest file. Note: this option is currently available only for Microsoft Customer Agreement commerce scopes." + }, + "runHistory": { + "oneOf": [ + { + "$ref": "#/definitions/ExportExecutionListResult" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Result of listing the run 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." + }, + "FileDestination": { + "type": "object", + "properties": { + "fileFormats": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string", + "enum": [ + "Csv" + ] + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Destination of the view data. Currently only CSV format is supported." + } + }, + "description": "Destination of the view data. This is optional. Currently only CSV format is supported." + }, + "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." + }, + "NotificationProperties": { + "type": "object", + "properties": { + "language": { + "type": "string", + "description": "Language in which the email is localized, for ex: 'Fr'. When the specified language is not supported, email will be in english. The supported languages are cs (Czech), da (Danish), de (German), en (English), es (Spanish), fr (French), hu (Hungarian), id (Indonesian), it (Lithuanian), ja (Japanese), ko (Korean), nb (Norwegian Bokmål), nl (Dutch), pl (Polish), pt (Portuguese), ru (Russian), sv (Swedish), tr (Turkish), zh (Chinese) " + }, + "message": { + "type": "string", + "description": "Optional message to be added in the email. Length is limited to 250 characters." + }, + "regionalFormat": { + "type": "string", + "description": "Language for formatting the date/time and currency values in the email. For ex: 'fr'. Defaulted to English, when the specified regional format is not supported. " + }, + "subject": { + "type": "string", + "description": "Subject of the email. Length is limited to 70 characters." + }, + "to": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Array of email addresses." + } + }, + "required": [ + "subject", + "to" + ], + "description": "The properties of the scheduled action notification." + }, + "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." + }, + "includeMonetaryCommitment": { + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "If true, report includes monetary commitment." + }, + "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": { + "type": "object" + } + }, + { + "$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": { + "type": "object" + } + }, + { + "$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/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": [ + "TagKey", + "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." + }, + "ScheduledActionProperties": { + "type": "object", + "properties": { + "displayName": { + "type": "string", + "description": "Scheduled action name." + }, + "fileDestination": { + "oneOf": [ + { + "$ref": "#/definitions/FileDestination" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Destination of the view data. This is optional. Currently only CSV format is supported." + }, + "notification": { + "oneOf": [ + { + "$ref": "#/definitions/NotificationProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The properties of the scheduled action notification." + }, + "notificationEmail": { + "type": "string", + "description": "Email address of the point of contact that should get the unsubscribe requests and notification emails." + }, + "schedule": { + "oneOf": [ + { + "$ref": "#/definitions/ScheduleProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The properties of the schedule." + }, + "scope": { + "type": "string", + "description": "Cost Management scope like '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.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for ExternalBillingAccount scope, and '/providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for ExternalSubscription scope." + }, + "status": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Disabled", + "Enabled", + "Expired" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Status of the scheduled action." + }, + "viewId": { + "type": "string", + "description": "Cost analysis viewId used for scheduled action. For example, '/providers/Microsoft.CostManagement/views/swaggerExample'" + } + }, + "required": [ + "displayName", + "notification", + "schedule", + "status", + "viewId" + ], + "description": "The properties of the scheduled action." + }, + "ScheduleProperties": { + "type": "object", + "properties": { + "dayOfMonth": { + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "UTC day on which cost analysis data will be emailed. Must be between 1 and 31. This property is applicable when frequency is Monthly and overrides weeksOfMonth or daysOfWeek." + }, + "daysOfWeek": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string", + "enum": [ + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", + "Sunday" + ] + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Day names in english on which cost analysis data will be emailed. This property is applicable when frequency is Weekly or Monthly." + }, + "endDate": { + "type": "string", + "format": "date-time", + "description": "The end date and time of the scheduled action (UTC)." + }, + "frequency": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Daily", + "Weekly", + "Monthly" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Frequency of the schedule." + }, + "hourOfDay": { + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "UTC time at which cost analysis data will be emailed." + }, + "startDate": { + "type": "string", + "format": "date-time", + "description": "The start date and time of the scheduled action (UTC)." + }, + "weeksOfMonth": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string", + "enum": [ + "First", + "Second", + "Third", + "Fourth", + "Last" + ] + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Weeks in which cost analysis data will be emailed. This property is applicable when frequency is Monthly and used in combination with daysOfWeek." + } + }, + "required": [ + "endDate", + "frequency", + "startDate" + ], + "description": "The properties of the schedule." + }, + "SystemData": { + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time", + "description": "The timestamp of resource creation (UTC)." + }, + "createdBy": { + "type": "string", + "description": "The identity that created the resource." + }, + "createdByType": { + "oneOf": [ + { + "type": "string", + "enum": [ + "User", + "Application", + "ManagedIdentity", + "Key" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The type of identity that created the resource." + }, + "lastModifiedAt": { + "type": "string", + "format": "date-time", + "description": "The timestamp of resource last modification (UTC)" + }, + "lastModifiedBy": { + "type": "string", + "description": "The identity that last modified the resource." + }, + "lastModifiedByType": { + "oneOf": [ + { + "type": "string", + "enum": [ + "User", + "Application", + "ManagedIdentity", + "Key" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The type of identity that last modified the resource." + } + }, + "description": "Metadata pertaining to creation and last modification of the resource." + }, + "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." + } + } +} \ No newline at end of file diff --git a/schemas/common/autogeneratedResources.json b/schemas/common/autogeneratedResources.json index 806a090305..3ec175bbcc 100644 --- a/schemas/common/autogeneratedResources.json +++ b/schemas/common/autogeneratedResources.json @@ -7852,6 +7852,15 @@ { "$ref": "https://schema.management.azure.com/schemas/2022-10-05-preview/Microsoft.CostManagement.json#/unknown_resourceDefinitions/views" }, + { + "$ref": "https://schema.management.azure.com/schemas/2023-03-01/Microsoft.CostManagement.json#/unknown_resourceDefinitions/exports" + }, + { + "$ref": "https://schema.management.azure.com/schemas/2023-03-01/Microsoft.CostManagement.json#/unknown_resourceDefinitions/scheduledActions" + }, + { + "$ref": "https://schema.management.azure.com/schemas/2023-03-01/Microsoft.CostManagement.json#/unknown_resourceDefinitions/views" + }, { "$ref": "https://schema.management.azure.com/schemas/2023-04-01-preview/Microsoft.CostManagement.json#/unknown_resourceDefinitions/budgets" },