-
Notifications
You must be signed in to change notification settings - Fork 518
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CodeGen from PR 22849 in Azure/azure-rest-api-specs
[Hub Generated] Review request for Microsoft.AlertsManagement to add version preview/2023-04-01-preview (#22849) * Adds base for updating Microsoft.AlertsManagement from version preview/2023-01-01-preview to version 2023-04-01-preview * Updates readme * Updates API version in new specs and examples * Add TenantActivityLogAlerts Resource type * Prettier * Align with ALA * Fix issues * Prettier * Fix param * fix PR comments --------- Co-authored-by: meydand <t-meday@microsoft.com> Co-authored-by: Meydan Dayan <meday@microsoft.com>
- Loading branch information
1 parent
09c776f
commit 2362e99
Showing
2 changed files
with
303 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
300 changes: 300 additions & 0 deletions
300
schemas/2023-04-01-preview/Microsoft.AlertsManagement.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,300 @@ | ||
{ | ||
"id": "https://schema.management.azure.com/schemas/2023-04-01-preview/Microsoft.AlertsManagement.json#", | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"title": "Microsoft.AlertsManagement", | ||
"description": "Microsoft AlertsManagement Resource Types", | ||
"resourceDefinitions": {}, | ||
"managementGroup_resourceDefinitions": { | ||
"tenantActivityLogAlerts": { | ||
"type": "object", | ||
"properties": { | ||
"apiVersion": { | ||
"type": "string", | ||
"enum": [ | ||
"2023-04-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 Tenant 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.AlertsManagement/tenantActivityLogAlerts" | ||
] | ||
} | ||
}, | ||
"required": [ | ||
"apiVersion", | ||
"name", | ||
"properties", | ||
"type" | ||
], | ||
"description": "Microsoft.AlertsManagement/tenantActivityLogAlerts" | ||
} | ||
}, | ||
"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." | ||
} | ||
} | ||
} |