diff --git a/schemas/2019-08-01/managementGroupDeploymentTemplate.json b/schemas/2019-08-01/managementGroupDeploymentTemplate.json index 0bcf2c5962..ad3b2ec293 100644 --- a/schemas/2019-08-01/managementGroupDeploymentTemplate.json +++ b/schemas/2019-08-01/managementGroupDeploymentTemplate.json @@ -770,6 +770,9 @@ { "$ref": "https://schema.management.azure.com/schemas/2021-05-01-preview/Microsoft.Insights.json#/managementGroup_resourceDefinitions/diagnosticSettings" }, + { + "$ref": "https://schema.management.azure.com/schemas/2023-03-01-preview/Microsoft.Insights.json#/managementGroup_resourceDefinitions/tenantActionGroups" + }, { "$ref": "https://schema.management.azure.com/schemas/2022-01-01/Microsoft.Network.NRP.json#/managementGroup_resourceDefinitions/networkManagerConnections" }, diff --git a/schemas/2023-01-01-preview/Microsoft.Insights.json b/schemas/2023-01-01-preview/Microsoft.Insights.json new file mode 100644 index 0000000000..c4e64ce3e1 --- /dev/null +++ b/schemas/2023-01-01-preview/Microsoft.Insights.json @@ -0,0 +1,299 @@ +{ + "id": "https://schema.management.azure.com/schemas/2023-01-01-preview/Microsoft.Insights.json#", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Microsoft.Insights", + "description": "Microsoft Insights Resource Types", + "resourceDefinitions": { + "activityLogAlerts": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2023-01-01-preview" + ] + }, + "location": { + "type": "string", + "default": "global", + "description": "The location of the resource. Since Azure Activity Log Alerts is a global service, the location of the rules should always be 'global'." + }, + "name": { + "oneOf": [ + { + "type": "string", + "pattern": "^[-\\w\\._\\(\\)]+$" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The name of the Activity Log Alert rule." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/AlertRuleProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "An Azure Activity Log Alert rule." + }, + "tags": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "properties": {} + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The tags of the resource." + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Insights/activityLogAlerts" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.Insights/activityLogAlerts" + } + }, + "definitions": { + "ActionGroup": { + "type": "object", + "properties": { + "actionGroupId": { + "type": "string", + "description": "The resource ID of the Action Group. This cannot be null or empty." + }, + "actionProperties": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "properties": {} + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Predefined list of properties and configuration items for the action group." + }, + "webhookProperties": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "properties": {} + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "the dictionary of custom properties to include with the post operation. These data are appended to the webhook payload." + } + }, + "required": [ + "actionGroupId" + ], + "description": "A pointer to an Azure Action Group." + }, + "ActionList": { + "type": "object", + "properties": { + "actionGroups": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/ActionGroup" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The list of the Action Groups." + } + }, + "description": "A list of Activity Log Alert rule actions." + }, + "AlertRuleAllOfCondition": { + "type": "object", + "properties": { + "allOf": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/AlertRuleAnyOfOrLeafCondition" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The list of Activity Log Alert rule conditions." + } + }, + "required": [ + "allOf" + ], + "description": "An Activity Log Alert rule condition that is met when all its member conditions are met." + }, + "AlertRuleAnyOfOrLeafCondition": { + "type": "object", + "properties": { + "anyOf": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/AlertRuleLeafCondition" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "An Activity Log Alert rule condition that is met when at least one of its member leaf conditions are met." + }, + "containsAny": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The value of the event's field will be compared to the values in this array (case-insensitive) to determine if the condition is met." + }, + "equals": { + "type": "string", + "description": "The value of the event's field will be compared to this value (case-insensitive) to determine if the condition is met." + }, + "field": { + "type": "string", + "description": "The name of the Activity Log event's field that this condition will examine.\nThe possible values for this field are (case-insensitive): 'resourceId', 'category', 'caller', 'level', 'operationName', 'resourceGroup', 'resourceProvider', 'status', 'subStatus', 'resourceType', or anything beginning with 'properties'." + } + }, + "description": "An Activity Log Alert rule condition that is met when all its member conditions are met.\nEach condition can be of one of the following types:\n__Important__: Each type has its unique subset of properties. Properties from different types CANNOT exist in one condition.\n * __Leaf Condition -__ must contain 'field' and either 'equals' or 'containsAny'.\n _Please note, 'anyOf' should __not__ be set in a Leaf Condition._\n * __AnyOf Condition -__ must contain __only__ 'anyOf' (which is an array of Leaf Conditions).\n _Please note, 'field', 'equals' and 'containsAny' should __not__ be set in an AnyOf Condition._\n" + }, + "AlertRuleLeafCondition": { + "type": "object", + "properties": { + "containsAny": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The value of the event's field will be compared to the values in this array (case-insensitive) to determine if the condition is met." + }, + "equals": { + "type": "string", + "description": "The value of the event's field will be compared to this value (case-insensitive) to determine if the condition is met." + }, + "field": { + "type": "string", + "description": "The name of the Activity Log event's field that this condition will examine.\nThe possible values for this field are (case-insensitive): 'resourceId', 'category', 'caller', 'level', 'operationName', 'resourceGroup', 'resourceProvider', 'status', 'subStatus', 'resourceType', or anything beginning with 'properties'." + } + }, + "description": "An Activity Log Alert rule condition that is met by comparing the field and value of an Activity Log event.\nThis condition must contain 'field' and either 'equals' or 'containsAny'." + }, + "AlertRuleProperties": { + "type": "object", + "properties": { + "actions": { + "oneOf": [ + { + "$ref": "#/definitions/ActionList" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "A list of Activity Log Alert rule actions." + }, + "condition": { + "oneOf": [ + { + "$ref": "#/definitions/AlertRuleAllOfCondition" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "An Activity Log Alert rule condition that is met when all its member conditions are met." + }, + "description": { + "type": "string", + "description": "A description of this Activity Log Alert rule." + }, + "enabled": { + "oneOf": [ + { + "type": "boolean", + "default": true + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Indicates whether this Activity Log Alert rule is enabled. If an Activity Log Alert rule is not enabled, then none of its actions will be activated." + }, + "scopes": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "A list of resource IDs that will be used as prefixes. The alert will only apply to Activity Log events with resource IDs that fall under one of these prefixes. This list must include at least one item." + }, + "tenantScope": { + "type": "string", + "description": "The tenant GUID. Must be provided for tenant-level and management group events rules." + } + }, + "required": [ + "actions", + "condition" + ], + "description": "An Azure Activity Log Alert rule." + } + } +} \ No newline at end of file diff --git a/schemas/2023-03-01-preview/Microsoft.Insights.json b/schemas/2023-03-01-preview/Microsoft.Insights.json new file mode 100644 index 0000000000..15914a9cef --- /dev/null +++ b/schemas/2023-03-01-preview/Microsoft.Insights.json @@ -0,0 +1,315 @@ +{ + "id": "https://schema.management.azure.com/schemas/2023-03-01-preview/Microsoft.Insights.json#", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Microsoft.Insights", + "description": "Microsoft Insights Resource Types", + "resourceDefinitions": {}, + "managementGroup_resourceDefinitions": { + "tenantActionGroups": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2023-03-01-preview" + ] + }, + "location": { + "type": "string", + "description": "Resource location" + }, + "name": { + "type": "string", + "description": "The name of the action group." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/TenantActionGroup" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "A tenant action group." + }, + "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.Insights/tenantActionGroups" + ] + } + }, + "required": [ + "apiVersion", + "location", + "name", + "properties", + "type" + ], + "description": "Microsoft.Insights/tenantActionGroups" + } + }, + "definitions": { + "AzureAppPushReceiver": { + "type": "object", + "properties": { + "emailAddress": { + "type": "string", + "description": "The email address registered for the Azure mobile app." + }, + "name": { + "type": "string", + "description": "The name of the Azure mobile app push receiver. Names must be unique across all receivers within a tenant action group." + } + }, + "required": [ + "emailAddress", + "name" + ], + "description": "The Azure mobile App push notification receiver." + }, + "EmailReceiver": { + "type": "object", + "properties": { + "emailAddress": { + "type": "string", + "description": "The email address of this receiver." + }, + "name": { + "type": "string", + "description": "The name of the email receiver. Names must be unique across all receivers within a tenant action group." + }, + "useCommonAlertSchema": { + "oneOf": [ + { + "type": "boolean", + "default": false + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Indicates whether to use common alert schema." + } + }, + "required": [ + "emailAddress", + "name" + ], + "description": "An email receiver." + }, + "SmsReceiver": { + "type": "object", + "properties": { + "countryCode": { + "type": "string", + "description": "The country code of the SMS receiver." + }, + "name": { + "type": "string", + "description": "The name of the SMS receiver. Names must be unique across all receivers within a tenant action group." + }, + "phoneNumber": { + "type": "string", + "description": "The phone number of the SMS receiver." + } + }, + "required": [ + "countryCode", + "name", + "phoneNumber" + ], + "description": "An SMS receiver." + }, + "TenantActionGroup": { + "type": "object", + "properties": { + "azureAppPushReceivers": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/AzureAppPushReceiver" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The list of AzureAppPush receivers that are part of this tenant action group." + }, + "emailReceivers": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/EmailReceiver" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The list of email receivers that are part of this tenant action group." + }, + "enabled": { + "oneOf": [ + { + "type": "boolean", + "default": true + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Indicates whether this tenant action group is enabled. If a tenant action group is not enabled, then none of its receivers will receive communications." + }, + "groupShortName": { + "type": "string", + "maxLength": 12, + "description": "The short name of the action group. This will be used in SMS messages." + }, + "smsReceivers": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/SmsReceiver" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The list of SMS receivers that are part of this tenant action group." + }, + "voiceReceivers": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/VoiceReceiver" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The list of voice receivers that are part of this tenant action group." + }, + "webhookReceivers": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/WebhookReceiver" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The list of webhook receivers that are part of this tenant action group." + } + }, + "required": [ + "enabled", + "groupShortName" + ], + "description": "A tenant action group." + }, + "VoiceReceiver": { + "type": "object", + "properties": { + "countryCode": { + "type": "string", + "description": "The country code of the voice receiver." + }, + "name": { + "type": "string", + "description": "The name of the voice receiver. Names must be unique across all receivers within a tenant action group." + }, + "phoneNumber": { + "type": "string", + "description": "The phone number of the voice receiver." + } + }, + "required": [ + "countryCode", + "name", + "phoneNumber" + ], + "description": "A voice receiver." + }, + "WebhookReceiver": { + "type": "object", + "properties": { + "identifierUri": { + "type": "string", + "description": "Indicates the identifier uri for aad auth." + }, + "name": { + "type": "string", + "description": "The name of the webhook receiver. Names must be unique across all receivers within a tenant action group." + }, + "objectId": { + "type": "string", + "description": "Indicates the webhook app object Id for aad auth." + }, + "serviceUri": { + "type": "string", + "description": "The URI where webhooks should be sent." + }, + "tenantId": { + "type": "string", + "description": "Indicates the tenant id for aad auth." + }, + "useAadAuth": { + "oneOf": [ + { + "type": "boolean", + "default": false + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Indicates whether or not use AAD authentication." + }, + "useCommonAlertSchema": { + "oneOf": [ + { + "type": "boolean", + "default": false + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Indicates whether to use common alert schema." + } + }, + "required": [ + "name", + "serviceUri" + ], + "description": "A webhook receiver." + } + } +} \ No newline at end of file diff --git a/schemas/common/autogeneratedResources.json b/schemas/common/autogeneratedResources.json index 4e1b9023e9..e43afbed7a 100644 --- a/schemas/common/autogeneratedResources.json +++ b/schemas/common/autogeneratedResources.json @@ -13456,6 +13456,9 @@ { "$ref": "https://schema.management.azure.com/schemas/2023-01-01/Microsoft.Insights.json#/resourceDefinitions/actionGroups" }, + { + "$ref": "https://schema.management.azure.com/schemas/2023-01-01-preview/Microsoft.Insights.json#/resourceDefinitions/activityLogAlerts" + }, { "$ref": "https://schema.management.azure.com/schemas/2018-09-01/Microsoft.IotCentral.json#/resourceDefinitions/iotApps" },