From 23e2ba9e72a8397e91d0c0d5929ce22b4d4b57ed Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 30 Jun 2021 00:36:43 +0000 Subject: [PATCH] CodeGen from PR 14588 in Azure/azure-rest-api-specs Merge 3c67592066e75e1e972d7ce54d9aa67782d947c5 into c51580c6f102bace66c5bed4b979437c21b81882 --- .../subscriptionDeploymentTemplate.json | 3 + .../managementGroupDeploymentTemplate.json | 3 + .../Microsoft.Insights.json | 38 +- .../Microsoft.Insights.json | 438 ++++++++++++++++++ 4 files changed, 446 insertions(+), 36 deletions(-) create mode 100644 schemas/2021-05-01-preview/Microsoft.Insights.json diff --git a/schemas/2018-05-01/subscriptionDeploymentTemplate.json b/schemas/2018-05-01/subscriptionDeploymentTemplate.json index f44a37bd91..5a2cc5409a 100644 --- a/schemas/2018-05-01/subscriptionDeploymentTemplate.json +++ b/schemas/2018-05-01/subscriptionDeploymentTemplate.json @@ -318,6 +318,9 @@ { "$ref": "https://schema.management.azure.com/schemas/2017-05-01-preview/Microsoft.Insights.json#/subscription_resourceDefinitions/diagnosticSettings" }, + { + "$ref": "https://schema.management.azure.com/schemas/2021-05-01-preview/Microsoft.Insights.json#/subscription_resourceDefinitions/diagnosticSettings" + }, { "$ref": "https://schema.management.azure.com/schemas/2019-06-01-preview/Microsoft.ManagedNetwork.json#/unknown_resourceDefinitions/scopeAssignments" }, diff --git a/schemas/2019-08-01/managementGroupDeploymentTemplate.json b/schemas/2019-08-01/managementGroupDeploymentTemplate.json index 74cfd06e2e..856ecd7e7d 100644 --- a/schemas/2019-08-01/managementGroupDeploymentTemplate.json +++ b/schemas/2019-08-01/managementGroupDeploymentTemplate.json @@ -171,6 +171,9 @@ { "$ref": "https://schema.management.azure.com/schemas/2020-01-01-preview/Microsoft.Insights.json#/managementGroup_resourceDefinitions/diagnosticSettings" }, + { + "$ref": "https://schema.management.azure.com/schemas/2021-05-01-preview/Microsoft.Insights.json#/managementGroup_resourceDefinitions/diagnosticSettings" + }, { "$ref": "https://schema.management.azure.com/schemas/2018-07-01-preview/Microsoft.PolicyInsights.json#/unknown_resourceDefinitions/remediations" }, diff --git a/schemas/2021-02-01-preview/Microsoft.Insights.json b/schemas/2021-02-01-preview/Microsoft.Insights.json index 756a2688a3..cd1534c569 100644 --- a/schemas/2021-02-01-preview/Microsoft.Insights.json +++ b/schemas/2021-02-01-preview/Microsoft.Insights.json @@ -80,31 +80,6 @@ } }, "definitions": { - "Action": { - "type": "object", - "properties": { - "actionGroupId": { - "type": "string", - "description": "Action Group resource Id to invoke when the alert fires." - }, - "webHookProperties": { - "oneOf": [ - { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "properties": {} - }, - { - "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" - } - ], - "description": "The properties of a webhook object." - } - }, - "description": "Actions to invoke when the alert fires." - }, "Condition": { "type": "object", "properties": { @@ -297,17 +272,8 @@ "type": "object", "properties": { "actions": { - "oneOf": [ - { - "type": "array", - "items": { - "$ref": "#/definitions/Action" - } - }, - { - "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" - } - ], + "type": "object", + "properties": {}, "description": "Actions to invoke when the alert fires." }, "autoMitigate": { diff --git a/schemas/2021-05-01-preview/Microsoft.Insights.json b/schemas/2021-05-01-preview/Microsoft.Insights.json new file mode 100644 index 0000000000..178026b019 --- /dev/null +++ b/schemas/2021-05-01-preview/Microsoft.Insights.json @@ -0,0 +1,438 @@ +{ + "id": "https://schema.management.azure.com/schemas/2021-05-01-preview/Microsoft.Insights.json#", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Microsoft.Insights", + "description": "Microsoft Insights Resource Types", + "resourceDefinitions": {}, + "subscription_resourceDefinitions": { + "diagnosticSettings": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2021-05-01-preview" + ] + }, + "name": { + "type": "string", + "description": "The name of the diagnostic setting." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/SubscriptionDiagnosticSettings" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The subscription diagnostic settings." + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Insights/diagnosticSettings" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.Insights/diagnosticSettings" + } + }, + "managementGroup_resourceDefinitions": { + "diagnosticSettings": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2021-05-01-preview" + ] + }, + "name": { + "type": "string", + "description": "The name of the diagnostic setting." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/ManagementGroupDiagnosticSettings" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The management group diagnostic settings." + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Insights/diagnosticSettings" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.Insights/diagnosticSettings" + } + }, + "unknown_resourceDefinitions": { + "diagnosticSettings": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2021-05-01-preview" + ] + }, + "name": { + "type": "string", + "description": "The name of the diagnostic setting." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/DiagnosticSettings" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The diagnostic settings." + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Insights/diagnosticSettings" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.Insights/diagnosticSettings" + } + }, + "definitions": { + "DiagnosticSettings": { + "type": "object", + "properties": { + "eventHubAuthorizationRuleId": { + "type": "string", + "description": "The resource Id for the event hub authorization rule." + }, + "eventHubName": { + "type": "string", + "description": "The name of the event hub. If none is specified, the default event hub will be selected." + }, + "logAnalyticsDestinationType": { + "type": "string", + "description": "A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type constructed as follows: _. Possible values are: Dedicated and null (null is default.)" + }, + "logs": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/LogSettings" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The list of logs settings." + }, + "metrics": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/MetricSettings" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The list of metric settings." + }, + "serviceBusRuleId": { + "type": "string", + "description": "The service bus rule Id of the diagnostic setting. This is here to maintain backwards compatibility." + }, + "storageAccountId": { + "type": "string", + "description": "The resource ID of the storage account to which you would like to send Diagnostic Logs." + }, + "workspaceId": { + "type": "string", + "description": "The full ARM resource ID of the Log Analytics workspace to which you would like to send Diagnostic Logs. Example: /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2" + } + }, + "description": "The diagnostic settings." + }, + "LogSettings": { + "type": "object", + "properties": { + "category": { + "type": "string", + "description": "Name of a Diagnostic Log category for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation." + }, + "categoryGroup": { + "type": "string", + "description": "Name of a Diagnostic Log category group for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation." + }, + "enabled": { + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "a value indicating whether this log is enabled." + }, + "retentionPolicy": { + "oneOf": [ + { + "$ref": "#/definitions/RetentionPolicy" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Specifies the retention policy for the log." + } + }, + "required": [ + "enabled" + ], + "description": "Part of MultiTenantDiagnosticSettings. Specifies the settings for a particular log." + }, + "ManagementGroupDiagnosticSettings": { + "type": "object", + "properties": { + "eventHubAuthorizationRuleId": { + "type": "string", + "description": "The resource Id for the event hub authorization rule." + }, + "eventHubName": { + "type": "string", + "description": "The name of the event hub. If none is specified, the default event hub will be selected." + }, + "logs": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/ManagementGroupLogSettings" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The list of logs settings." + }, + "serviceBusRuleId": { + "type": "string", + "description": "The service bus rule Id of the diagnostic setting. This is here to maintain backwards compatibility." + }, + "storageAccountId": { + "type": "string", + "description": "The resource ID of the storage account to which you would like to send Diagnostic Logs." + }, + "workspaceId": { + "type": "string", + "description": "The full ARM resource ID of the Log Analytics workspace to which you would like to send Diagnostic Logs. Example: /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2" + } + }, + "description": "The management group diagnostic settings." + }, + "ManagementGroupLogSettings": { + "type": "object", + "properties": { + "category": { + "type": "string", + "description": "Name of a Management Group Diagnostic Log category for a resource type this setting is applied to." + }, + "categoryGroup": { + "type": "string", + "description": "Name of a Management Group Diagnostic Log category group for a resource type this setting is applied to." + }, + "enabled": { + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "a value indicating whether this log is enabled." + } + }, + "required": [ + "enabled" + ], + "description": "Part of Management Group diagnostic setting. Specifies the settings for a particular log." + }, + "MetricSettings": { + "type": "object", + "properties": { + "category": { + "type": "string", + "description": "Name of a Diagnostic Metric category for a resource type this setting is applied to. To obtain the list of Diagnostic metric categories for a resource, first perform a GET diagnostic settings operation." + }, + "enabled": { + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "a value indicating whether this category is enabled." + }, + "retentionPolicy": { + "oneOf": [ + { + "$ref": "#/definitions/RetentionPolicy" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Specifies the retention policy for the log." + }, + "timeGrain": { + "type": "string", + "format": "duration", + "description": "the timegrain of the metric in ISO8601 format." + } + }, + "required": [ + "enabled" + ], + "description": "Part of MultiTenantDiagnosticSettings. Specifies the settings for a particular metric." + }, + "RetentionPolicy": { + "type": "object", + "properties": { + "days": { + "oneOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "the number of days for the retention in days. A value of 0 will retain the events indefinitely." + }, + "enabled": { + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "a value indicating whether the retention policy is enabled." + } + }, + "required": [ + "days", + "enabled" + ], + "description": "Specifies the retention policy for the log." + }, + "SubscriptionDiagnosticSettings": { + "type": "object", + "properties": { + "eventHubAuthorizationRuleId": { + "type": "string", + "description": "The resource Id for the event hub authorization rule." + }, + "eventHubName": { + "type": "string", + "description": "The name of the event hub. If none is specified, the default event hub will be selected." + }, + "logs": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/SubscriptionLogSettings" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The list of logs settings." + }, + "serviceBusRuleId": { + "type": "string", + "description": "The service bus rule Id of the diagnostic setting. This is here to maintain backwards compatibility." + }, + "storageAccountId": { + "type": "string", + "description": "The resource ID of the storage account to which you would like to send Diagnostic Logs." + }, + "workspaceId": { + "type": "string", + "description": "The full ARM resource ID of the Log Analytics workspace to which you would like to send Diagnostic Logs. Example: /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2" + } + }, + "description": "The subscription diagnostic settings." + }, + "SubscriptionLogSettings": { + "type": "object", + "properties": { + "category": { + "type": "string", + "description": "Name of a Subscription Diagnostic Log category for a resource type this setting is applied to." + }, + "categoryGroup": { + "type": "string", + "description": "Name of a Subscription Diagnostic Log category group for a resource type this setting is applied to." + }, + "enabled": { + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "a value indicating whether this log is enabled." + } + }, + "required": [ + "enabled" + ], + "description": "Part of Subscription diagnostic setting. Specifies the settings for a particular log." + } + } +} \ No newline at end of file