Skip to content

Commit

Permalink
CodeGen from PR 17339 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 69570924e3df25a5a65ada01daa6e487856ea8be into 25949d0ef9e779baf66559411d34a0e5e7aa383d
  • Loading branch information
SDKAuto committed Jan 13, 2022
1 parent 109fd9f commit ece7c40
Show file tree
Hide file tree
Showing 4 changed files with 802 additions and 55 deletions.
248 changes: 248 additions & 0 deletions schemas/2021-07-22-preview/Microsoft.AlertsManagement.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,248 @@
{
"id": "https://schema.management.azure.com/schemas/2021-07-22-preview/Microsoft.AlertsManagement.json#",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Microsoft.AlertsManagement",
"description": "Microsoft AlertsManagement Resource Types",
"resourceDefinitions": {
"prometheusRuleGroups": {
"type": "object",
"properties": {
"apiVersion": {
"type": "string",
"enum": [
"2021-07-22-preview"
]
},
"location": {
"type": "string",
"description": "The geo-location where the resource lives"
},
"name": {
"type": "string",
"description": "The name of the rule group."
},
"properties": {
"oneOf": [
{
"$ref": "#/definitions/PrometheusRuleGroupProperties"
},
{
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
}
],
"description": "An alert rule."
},
"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.AlertsManagement/prometheusRuleGroups"
]
}
},
"required": [
"apiVersion",
"location",
"name",
"properties",
"type"
],
"description": "Microsoft.AlertsManagement/prometheusRuleGroups"
}
},
"definitions": {
"PrometheusRule": {
"type": "object",
"properties": {
"actions": {
"oneOf": [
{
"type": "array",
"items": {
"$ref": "#/definitions/PrometheusRuleGroupAction"
}
},
{
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
}
],
"description": "The array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved. Only relevant for alerts."
},
"alert": {
"type": "string",
"description": "the name of the alert rule."
},
"annotations": {
"oneOf": [
{
"type": "object",
"additionalProperties": {
"type": "string"
},
"properties": {}
},
{
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
}
],
"description": "annotations for rule group. Only relevant for alerts."
},
"expression": {
"type": "string",
"description": "the expression to run for the rule."
},
"for": {
"type": "string",
"description": "the amount of time alert must be active before firing. Only relevant for alerts."
},
"labels": {
"oneOf": [
{
"type": "object",
"additionalProperties": {
"type": "string"
},
"properties": {}
},
{
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
}
],
"description": "labels for rule group. Only relevant for alerts."
},
"record": {
"type": "string",
"description": "the name of the recording rule."
},
"resolveConfiguration": {
"oneOf": [
{
"$ref": "#/definitions/PrometheusRuleResolveConfiguration"
},
{
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
}
],
"description": "Specifies the Prometheus alert rule configuration."
},
"severity": {
"oneOf": [
{
"type": "integer"
},
{
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
}
],
"description": "the severity of the alerts fired by the rule. Only relevant for alerts."
}
}
},
"PrometheusRuleGroupAction": {
"type": "object",
"properties": {
"actionGroupId": {
"type": "string",
"description": "the id of the action group to use."
},
"actionProperties": {
"oneOf": [
{
"type": "object",
"additionalProperties": {
"type": "string"
},
"properties": {}
},
{
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
}
],
"description": "The properties of an action group object."
}
},
"description": "An alert action. Only relevant for alerts."
},
"PrometheusRuleGroupProperties": {
"type": "object",
"properties": {
"description": {
"type": "string",
"description": "the description of the Prometheus rule group that will be included in the alert email."
},
"interval": {
"type": "string",
"description": "the interval in which to run the Prometheus rule group represented in ISO 8601 duration format."
},
"rules": {
"oneOf": [
{
"type": "array",
"items": {
"$ref": "#/definitions/PrometheusRule"
}
},
{
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
}
],
"description": "defines the rules in the Prometheus rule group."
},
"scopes": {
"oneOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
}
],
"description": "the list of resource id's that this rule group is scoped to."
}
},
"required": [
"rules",
"scopes"
],
"description": "An alert rule."
},
"PrometheusRuleResolveConfiguration": {
"type": "object",
"properties": {
"autoResolved": {
"oneOf": [
{
"type": "boolean"
},
{
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
}
],
"description": "the flag that indicates whether or not to auto resolve a fired alert."
},
"timeToResolve": {
"type": "string",
"description": "the duration a rule must evaluate as healthy before the fired alert is automatically resolved represented in ISO 8601 duration format."
}
},
"description": "Specifies the Prometheus alert rule configuration."
}
}
}
Loading

0 comments on commit ece7c40

Please sign in to comment.