From 716a8d2c4eaf0781c88f2f11aee9c4411707023b Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 11 May 2023 23:57:09 +0000 Subject: [PATCH] CodeGen from PR 23937 in Azure/azure-rest-api-specs Merge 8fde84cc09f4c2e51eaecdb1daf9ec6440708aaf into 719eeab635fd4c21d6e849bb3b64e60423fbee2f --- .../subscriptionDeploymentTemplate.json | 3 + schemas/2023-05-01/Microsoft.Consumption.json | 420 ++++++++++++++++++ schemas/common/autogeneratedResources.json | 3 + 3 files changed, 426 insertions(+) create mode 100644 schemas/2023-05-01/Microsoft.Consumption.json diff --git a/schemas/2018-05-01/subscriptionDeploymentTemplate.json b/schemas/2018-05-01/subscriptionDeploymentTemplate.json index 9b00e922a9..c5ccf71dcb 100644 --- a/schemas/2018-05-01/subscriptionDeploymentTemplate.json +++ b/schemas/2018-05-01/subscriptionDeploymentTemplate.json @@ -872,6 +872,9 @@ { "$ref": "https://schema.management.azure.com/schemas/2023-03-01/Microsoft.Consumption.json#/unknown_resourceDefinitions/budgets" }, + { + "$ref": "https://schema.management.azure.com/schemas/2023-05-01/Microsoft.Consumption.json#/unknown_resourceDefinitions/budgets" + }, { "$ref": "https://schema.management.azure.com/schemas/2018-05-31/Microsoft.CostManagement.json#/subscription_resourceDefinitions/reportconfigs" }, diff --git a/schemas/2023-05-01/Microsoft.Consumption.json b/schemas/2023-05-01/Microsoft.Consumption.json new file mode 100644 index 0000000000..9d1591da26 --- /dev/null +++ b/schemas/2023-05-01/Microsoft.Consumption.json @@ -0,0 +1,420 @@ +{ + "id": "https://schema.management.azure.com/schemas/2023-05-01/Microsoft.Consumption.json#", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Microsoft.Consumption", + "description": "Microsoft Consumption Resource Types", + "resourceDefinitions": {}, + "unknown_resourceDefinitions": { + "budgets": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2023-05-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": "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.Consumption/budgets" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.Consumption/budgets" + } + }, + "definitions": { + "BudgetComparisonExpression": { + "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 budgets." + }, + "BudgetFilter": { + "type": "object", + "properties": { + "and": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/BudgetFilterProperties" + } + }, + { + "$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/BudgetComparisonExpression" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The comparison expression to be used in the budgets." + }, + "tags": { + "oneOf": [ + { + "$ref": "#/definitions/BudgetComparisonExpression" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The comparison expression to be used in the budgets." + } + }, + "description": "May be used to filter budgets by resource group, resource, or meter." + }, + "BudgetFilterProperties": { + "type": "object", + "properties": { + "dimensions": { + "oneOf": [ + { + "$ref": "#/definitions/BudgetComparisonExpression" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The comparison expression to be used in the budgets." + }, + "tags": { + "oneOf": [ + { + "$ref": "#/definitions/BudgetComparisonExpression" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The comparison expression to be used in the budgets." + } + }, + "description": "The Dimensions or Tags to filter a budget by." + }, + "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" + ] + }, + { + "$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/BudgetFilter" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "May be used to filter budgets by resource group, resource, or meter." + }, + "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", + "BillingMonth", + "BillingQuarter", + "BillingAnnual" + ] + }, + { + "$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. BillingMonth, BillingQuarter, and BillingAnnual are only supported by WD customers." + }, + "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." + }, + "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. Must have at least one contact email or contact group specified at the Subscription or Resource Group scopes. All other scopes must have at least one contact email specified." + }, + "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. Must be provided as a fully qualified Azure resource id. Only supported at Subscription or Resource Group scopes." + }, + "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." + }, + "locale": { + "oneOf": [ + { + "type": "string", + "enum": [ + "en-us", + "ja-jp", + "zh-cn", + "de-de", + "es-es", + "fr-fr", + "it-it", + "ko-kr", + "pt-br", + "ru-ru", + "zh-tw", + "cs-cz", + "pl-pl", + "tr-tr", + "da-dk", + "en-gb", + "hu-hu", + "nb-no", + "nl-nl", + "pt-pt", + "sv-se" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Language in which the recipient will receive the notification." + }, + "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." + }, + "thresholdType": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Actual", + "Forecasted" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The type of threshold." + } + }, + "required": [ + "contactEmails", + "enabled", + "operator", + "threshold" + ], + "description": "The notification associated with a budget." + } + } +} \ No newline at end of file diff --git a/schemas/common/autogeneratedResources.json b/schemas/common/autogeneratedResources.json index 0fc8a6efd9..8d8c28d5fb 100644 --- a/schemas/common/autogeneratedResources.json +++ b/schemas/common/autogeneratedResources.json @@ -6751,6 +6751,9 @@ { "$ref": "https://schema.management.azure.com/schemas/2023-03-01/Microsoft.Consumption.json#/unknown_resourceDefinitions/budgets" }, + { + "$ref": "https://schema.management.azure.com/schemas/2023-05-01/Microsoft.Consumption.json#/unknown_resourceDefinitions/budgets" + }, { "$ref": "https://schema.management.azure.com/schemas/2017-08-01-preview/Microsoft.ContainerInstance.json#/resourceDefinitions/containerGroups" },