From 39a82535dd3d661fb6380b86b0e4c25e8a8a80ad Mon Sep 17 00:00:00 2001 From: Gilad Suberr Date: Sun, 31 Oct 2021 14:02:06 +0200 Subject: [PATCH 01/31] Added new Prometheus Rule Groups type --- .../2021-07-22-preview/AlertsManagement.json | 117 ++++ .../PrometheusRuleGroups.json | 598 ++++++++++++++++++ 2 files changed, 715 insertions(+) create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/AlertsManagement.json create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/AlertsManagement.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/AlertsManagement.json new file mode 100644 index 000000000000..371ed745c038 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/AlertsManagement.json @@ -0,0 +1,117 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-07-22-preview", + "title": "Azure Alerts Management Service Resource Provider", + "description": "Azure Alerts Management Service provides a single pane of glass of alerts across Azure Monitor." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/providers/Microsoft.AlertsManagement/operations": { + "get": { + "operationId": "Operations_List", + "description": "List all operations available through Azure Alerts Management Resource Provider.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "OK. Successfully retrieved operations list.", + "schema": { + "$ref": "#/definitions/operationsList" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "operation": { + "description": "Operation provided by provider", + "properties": { + "name": { + "type": "string", + "description": "Name of the operation" + }, + "display": { + "type": "object", + "description": "Properties of the operation", + "properties": { + "provider": { + "type": "string", + "description": "Provider name" + }, + "resource": { + "type": "string", + "description": "Resource name" + }, + "operation": { + "type": "string", + "description": "Operation name" + }, + "description": { + "type": "string", + "description": "Description of the operation" + } + } + } + } + }, + "operationsList": { + "description": "Lists the operations available in the AlertsManagement RP.", + "properties": { + "nextLink": { + "description": "URL to fetch the next set of operations.", + "type": "string" + }, + "value": { + "description": "Array of operations", + "type": "array", + "items": { + "$ref": "#/definitions/operation" + } + } + }, + "required": [ + "value" + ] + } + }, + "parameters": { + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "Client Api Version." + } + } +} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json new file mode 100644 index 000000000000..4f1ae2041e84 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json @@ -0,0 +1,598 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-07-22-preview", + "title": "Azure Alerts Management Service Resource Provider", + "description": "Azure Alerts Management Service provides a single pane of glass of alerts across Azure Monitor." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/providers/Microsoft.AlertsManagement/operations": { + "get": { + "operationId": "Operations_List", + "description": "List all operations available through Azure Alerts Management Resource Provider.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "OK. Successfully retrieved operations list.", + "schema": { + "$ref": "#/definitions/operationsList" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/prometheusRuleGroups": { + "get": { + "tags": [ + "PrometheusRuleGroups" + ], + "description": "Retrieve Prometheus rule group definitions in a subscription.", + "operationId": "PrometheusRuleGroups_ListBySubscription", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successful request for a list of Prometheus rule groups", + "schema": { + "$ref": "#/definitions/PrometheusRuleGroupResourceCollection" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/PrometheusRuleGroupsErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + }, + "x-ms-examples": { + "ListResourcePrometheusRuleGroups": { + "$ref": "./examples/listPrometheusRuleGroups.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/prometheusRuleGroups": + { + "get": { + "tags": [ + "PrometheusRuleGroups" + ], + "description": "Retrieve Prometheus rule group definitions in a resource group.", + "operationId": "PrometheusRuleGroups_ListByResourceGroup", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successful request for a list of Prometheus rule groups", + "schema": { + "$ref": "#/definitions/PrometheusRuleGroupResourceCollection" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/PrometheusRuleGroupsErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + }, + "x-ms-examples": { + "ListResourcePrometheusRuleGroups": { + "$ref": "./examples/listPrometheusRuleGroups.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/prometheusRuleGroups/{ruleGroupName}": + { + "get": { + "tags": [ + "PrometheusRuleGroups" + ], + "description": "Retrieve a Prometheus rule group definition.", + "operationId": "PrometheusRuleGroups_Get", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/RuleGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successful request for a list of Prometheus rule groups", + "schema": { + "$ref": "#/definitions/PrometheusRuleGroupResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/PrometheusRuleGroupsErrorResponse" + } + } + }, + "x-ms-examples": { + "GetPrometheusRuleGroup": { + "$ref": "./examples/getPrometheusRuleGroup.json" + } + } + }, + "put": { + "tags": [ + "PrometheusRuleGroups" + ], + "description": "Create or update a Prometheus rule group definition.", + "operationId": "PrometheusRuleGroups_CreateOrUpdate", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/RuleGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/PrometheusRuleGroupResource" + }, + "description": "The parameters of the rule group to create or update." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/PrometheusRuleGroupResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/PrometheusRuleGroupsErrorResponse" + } + } + }, + "x-ms-examples": { + "CreatePrometheusRuleGroup": { + "$ref": "./examples/createOrUpdatePrometheusRuleGroup.json" + } + } + }, + "patch": { + "tags": [ + "PrometheusRuleGroups" + ], + "description": "Update an Prometheus rule group definition.", + "operationId": "PrometheusRuleGroups_Update", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/RuleGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/PrometheusRuleGroupResourcePatch" + }, + "description": "The parameters of the rule group to update." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/PrometheusRuleGroupResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/PrometheusRuleGroupsErrorResponse" + } + } + }, + "x-ms-examples": { + "PatchPrometheusRuleGroup": { + "$ref": "./examples/patchPrometheusRuleGroup.json" + } + } + }, + "delete": { + "tags": [ + "PrometheusRuleGroups" + ], + "description": "Delete a Prometheus rule group definition.", + "operationId": "PrometheusRuleGroups_Delete", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/RuleGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successful request to delete a Prometheus rule group" + }, + "204": { + "description": "No content: the request was successful, but the response is empty" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/PrometheusRuleGroupsErrorResponse" + } + } + }, + "x-ms-examples": { + "DeletePrometheusRuleGroup": { + "$ref": "./examples/deletePrometheusRuleGroup.json" + } + } + } + } + }, + "definitions": { + "Resource": { + "properties": { + "id": { + "type": "string", + "readOnly": true, + "description": "Azure resource Id" + }, + "name": { + "type": "string", + "readOnly": true, + "description": "Azure resource name" + }, + "type": { + "type": "string", + "readOnly": true, + "description": "Azure resource type" + }, + "location": { + "type": "string", + "description": "Resource location", + "x-ms-mutability": [ + "create", + "read" + ] + }, + "tags": { + "additionalProperties": { + "type": "string" + }, + "description": "Resource tags" + } + }, + "required": [ + "location" + ], + "x-ms-azure-resource": true, + "description": "An azure resource object" + }, + "PrometheusRuleGroupAction": { + "description": "An alert action.", + "properties": { + "actionGroupId": { + "type": "string", + "description": "the id of the action group to use." + }, + "actionProperties": { + "type": "object", + "additionalProperties": { + "type": "string", + "description": "The dictionary of custom properties for the action." + }, + "description": "The properties of an action group object." + } + } + }, + "PrometheusRuleGroupProperties": { + "required": [ + "description", + "scopes", + "rules" + ], + "properties": { + "description": { + "type": "string", + "description": "the description of the Prometheus rule group that will be included in the alert email." + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "the list of resource id's that this rule group is scoped to." + }, + "interval": { + "type": "string", + "description": "the interval in which to run the Prometheus rule group." + }, + "rules": { + "type": "array", + "items": { + "$ref": "#/definitions/PrometheusRule" + }, + "description": "defines the rules in the Prometheus rule group." + }, + "lastUpdatedTime": { + "readOnly": true, + "type": "string", + "format": "date-time", + "description": "Last time the rule was updated in ISO8601 format." + } + }, + "description": "An alert rule." + }, + "PrometheusRuleGroupResource": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "required": [ + "properties" + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/PrometheusRuleGroupProperties", + "description": "The Prometheus rule group properties of the resource." + } + }, + "description": "The Prometheus rule group resource." + }, + "PrometheusRule": { + "type": "object", + "properties": { + "record": { + "type": "string", + "description": "the name of the recording rule." + }, + "alert": { + "type": "string", + "description": "the name of the alert rule." + }, + "expression": { + "type": "string", + "description": "the expression to run for the rule." + }, + "severity": { + "type": "string", + "description": "the expression to run for the rule." + }, + "for": { + "type": "string", + "description": "the amount of time alert must be active before firing." + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "labels for rule group" + }, + "annotations": { + "additionalProperties": { + "type": "string" + }, + "description": "annotations for rule group" + }, + "actions": { + "type": "array", + "items": { + "$ref": "#/definitions/PrometheusRuleGroupAction" + }, + "description": "the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved." + }, + "resolveConfiguration": { + "$ref": "#/definitions/PrometheusRuleResolveConfiguration", + "description": "defines the configuration for resolving fired alerts." + } + }, + "PrometheusRuleResolveConfiguration": { + "type": "object", + "properties": { + "autoResolved": { + "type": "boolean", + "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." + } + }, + "description": "Specifies the Prometheus alert rule configuration." + }, + "PrometheusRuleGroupsErrorResponse": { + "description": "Describes the format of Error response.", + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/PrometheusRuleGroupsErrorResponseBody" + } + } + }, + "PrometheusRuleGroupsErrorResponseBody": { + "description": "Describes the format of Error response.", + "type": "object", + "properties": { + "code": { + "description": "Error code", + "type": "string" + }, + "message": { + "description": "Error message indicating why the operation failed.", + "type": "string" + } + } + }, + "operation": { + "description": "Operation provided by provider", + "properties": { + "name": { + "type": "string", + "description": "Name of the operation" + }, + "display": { + "type": "object", + "description": "Properties of the operation", + "properties": { + "provider": { + "type": "string", + "description": "Provider name" + }, + "resource": { + "type": "string", + "description": "Resource name" + }, + "operation": { + "type": "string", + "description": "Operation name" + }, + "description": { + "type": "string", + "description": "Description of the operation" + } + } + } + } + }, + "operationsList": { + "description": "Lists the operations available in the AlertsManagement RP.", + "properties": { + "nextLink": { + "description": "URL to fetch the next set of operations.", + "type": "string" + }, + "value": { + "description": "Array of operations", + "type": "array", + "items": { + "$ref": "#/definitions/operation" + } + } + }, + "required": [ + "value" + ] + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "The Azure subscription Id." + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "Client Api Version." + }, + "ResourceGroupNameParameter": { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group.", + "x-ms-parameter-location": "method" + }, + "RuleGroupNameParameter": { + "name": "ruleName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the rule group.", + "x-ms-parameter-location": "method" + } + } + } From 76387f9afa32897a00b1ba76a82ee0a387dcbe1f Mon Sep 17 00:00:00 2001 From: Gilad Suberr Date: Sun, 31 Oct 2021 14:16:15 +0200 Subject: [PATCH 02/31] Added list example --- .../2021-07-22-preview/AlertsManagement.json | 117 ------------------ .../examples/listPrometheusRuleGroups.json | 57 +++++++++ 2 files changed, 57 insertions(+), 117 deletions(-) delete mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/AlertsManagement.json create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/listPrometheusRuleGroups.json diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/AlertsManagement.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/AlertsManagement.json deleted file mode 100644 index 371ed745c038..000000000000 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/AlertsManagement.json +++ /dev/null @@ -1,117 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "version": "2021-07-22-preview", - "title": "Azure Alerts Management Service Resource Provider", - "description": "Azure Alerts Management Service provides a single pane of glass of alerts across Azure Monitor." - }, - "host": "management.azure.com", - "schemes": [ - "https" - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "securityDefinitions": { - "azure_auth": { - "type": "oauth2", - "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", - "flow": "implicit", - "description": "Azure Active Directory OAuth2 Flow", - "scopes": { - "user_impersonation": "impersonate your user account" - } - } - }, - "paths": { - "/providers/Microsoft.AlertsManagement/operations": { - "get": { - "operationId": "Operations_List", - "description": "List all operations available through Azure Alerts Management Resource Provider.", - "parameters": [ - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "OK. Successfully retrieved operations list.", - "schema": { - "$ref": "#/definitions/operationsList" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - } - }, - "definitions": { - "operation": { - "description": "Operation provided by provider", - "properties": { - "name": { - "type": "string", - "description": "Name of the operation" - }, - "display": { - "type": "object", - "description": "Properties of the operation", - "properties": { - "provider": { - "type": "string", - "description": "Provider name" - }, - "resource": { - "type": "string", - "description": "Resource name" - }, - "operation": { - "type": "string", - "description": "Operation name" - }, - "description": { - "type": "string", - "description": "Description of the operation" - } - } - } - } - }, - "operationsList": { - "description": "Lists the operations available in the AlertsManagement RP.", - "properties": { - "nextLink": { - "description": "URL to fetch the next set of operations.", - "type": "string" - }, - "value": { - "description": "Array of operations", - "type": "array", - "items": { - "$ref": "#/definitions/operation" - } - } - }, - "required": [ - "value" - ] - } - }, - "parameters": { - "ApiVersionParameter": { - "name": "api-version", - "in": "query", - "required": true, - "type": "string", - "description": "Client Api Version." - } - } -} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/listPrometheusRuleGroups.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/listPrometheusRuleGroups.json new file mode 100644 index 000000000000..eade7295486c --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/listPrometheusRuleGroups.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7", + "resourceGroupName": "giladstest", + "api-version": "2021-07-22-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value": [ + { + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/giladstest/providers/providers/Microsoft.AlertsManagement/prometheusRuleGroups/myPrometheusRuleGroup", + "type": "Microsoft.AlertsManagement/prometheusRuleGroups", + "location": "global", + "properties": { + "description": "This is the description of the first rule group", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/giladstest/providers/Microsoft.Observability/monitoringAcount/myMonitoringAccount" + ], + "rules": [ + { + "record": "job_type:billing_jobs_duration_seconds:99p5m", + "expression": + "histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service=\"billing-processing\"}[5m])) by (job_type))" + }, + { + "alert": "Billing_Processing_Very_Slow", + "expression": "job_type:billing_jobs_duration_seconds:99p5m > 30", + "severity": 2, + "for": "5m", + "labels": { + "team": "prod" + }, + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "10m" + }, + "actions": [ + { + "actionGroupId": + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/notificationgroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ] + } + ] + } + } + ] + } + } + } +} From 3637b32b009e9732caab6b708ca5d71f9bb1904f Mon Sep 17 00:00:00 2001 From: Gilad Suberr Date: Sun, 31 Oct 2021 14:17:58 +0200 Subject: [PATCH 03/31] Added missing brackets --- .../preview/2021-07-22-preview/PrometheusRuleGroups.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json index 4f1ae2041e84..38eb30dc72a9 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json @@ -469,7 +469,8 @@ "items": { "$ref": "#/definitions/PrometheusRuleGroupAction" }, - "description": "the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved." + "description": + "the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved." }, "resolveConfiguration": { "$ref": "#/definitions/PrometheusRuleResolveConfiguration", @@ -485,7 +486,8 @@ }, "timeToResolve": { "type": "string", - "description": "the duration a rule must evaluate as healthy before the fired alert is automatically resolved." + "description": + "the duration a rule must evaluate as healthy before the fired alert is automatically resolved." } }, "description": "Specifies the Prometheus alert rule configuration." @@ -596,3 +598,5 @@ } } } + } +} From 252cc5fc5609c0db6f7ae8c69bcf374720b88bee Mon Sep 17 00:00:00 2001 From: Gilad Suberr Date: Sun, 31 Oct 2021 14:20:29 +0200 Subject: [PATCH 04/31] Added to readme --- specification/alertsmanagement/resource-manager/readme.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/specification/alertsmanagement/resource-manager/readme.md b/specification/alertsmanagement/resource-manager/readme.md index faa8457d3a46..e741d1e2781b 100644 --- a/specification/alertsmanagement/resource-manager/readme.md +++ b/specification/alertsmanagement/resource-manager/readme.md @@ -147,6 +147,14 @@ input-file: - Microsoft.AlertsManagement/preview/2020-08-04-preview/ResourceHealthAlertRules.json ``` +### Tag: package-2021-07-22-preview + + +These settings apply only when `--tag=package-2021-07-22` is specified on the command line. + +``` yaml $(tag) == 'package-2021-07-22-preview' +input-file: +- Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json --- # Code Generation From eac8af6d09e4c07c8cb56a68ece4f15f6b7dae99 Mon Sep 17 00:00:00 2001 From: Gilad Suberr Date: Sun, 31 Oct 2021 15:07:49 +0200 Subject: [PATCH 05/31] Fixed readme --- specification/alertsmanagement/resource-manager/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/alertsmanagement/resource-manager/readme.md b/specification/alertsmanagement/resource-manager/readme.md index e741d1e2781b..1352f43f6b54 100644 --- a/specification/alertsmanagement/resource-manager/readme.md +++ b/specification/alertsmanagement/resource-manager/readme.md @@ -155,7 +155,7 @@ These settings apply only when `--tag=package-2021-07-22` is specified on the co ``` yaml $(tag) == 'package-2021-07-22-preview' input-file: - Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json ---- +``` # Code Generation From 4b3463e8329b25f07cb1f701b86f798ef992a41b Mon Sep 17 00:00:00 2001 From: Gilad Suberr Date: Sun, 31 Oct 2021 15:19:25 +0200 Subject: [PATCH 06/31] Added delete example --- .../examples/deletePrometheusRuleGroup.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/deletePrometheusRuleGroup.json diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/deletePrometheusRuleGroup.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/deletePrometheusRuleGroup.json new file mode 100644 index 000000000000..94bc8f817905 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/deletePrometheusRuleGroup.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7", + "resourceGroupName": "giladsteset", + "ruleName": "myPrometheusRuleGroup", + "api-version": "2021-07-22-preview" + }, + "responses": { + "200": {}, + "204": {} + } +} From 49d39d3a121f7b921565f783e0acaaaa45b7dbfb Mon Sep 17 00:00:00 2001 From: Gilad Suberr Date: Sun, 31 Oct 2021 15:22:22 +0200 Subject: [PATCH 07/31] Added get example --- .../examples/getPrometheusRuleGroup.json | 54 +++++++++++++++++++ .../examples/listPrometheusRuleGroups.json | 2 +- 2 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/getPrometheusRuleGroup.json diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/getPrometheusRuleGroup.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/getPrometheusRuleGroup.json new file mode 100644 index 000000000000..fc6fb419713c --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/getPrometheusRuleGroup.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7", + "resourceGroupName": "giladstest", + "ruleName": "myPrometheusRuleGroup", + "api-version": "2021-07-22-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/giladstest/providers/providers/Microsoft.AlertsManagement/prometheusRuleGroups/myPrometheusRuleGroup", + "type": "Microsoft.AlertsManagement/prometheusRuleGroups", + "location": "global", + "properties": { + "description": "This is the description of the first rule group", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/giladstest/providers/Microsoft.Observability/monitoringAcount/myMonitoringAccount" + ], + "rules": [ + { + "record": "job_type:billing_jobs_duration_seconds:99p5m", + "expression": + "histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service=\"billing-processing\"}[5m])) by (job_type))" + }, + { + "alert": "Billing_Processing_Very_Slow", + "expression": "job_type:billing_jobs_duration_seconds:99p5m > 30", + "severity": 2, + "for": "5m", + "labels": { + "team": "prod" + }, + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "10m" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/giladstest/providers/microsoft.insights/notificationgroups/group2", + "actionProperties": { + "key11": "value11", + "key12": "value12" + } + } + ] + } + ] + } + } + } + } +} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/listPrometheusRuleGroups.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/listPrometheusRuleGroups.json index eade7295486c..fec51e73abbd 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/listPrometheusRuleGroups.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/listPrometheusRuleGroups.json @@ -40,7 +40,7 @@ { "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/notificationgroups/group2", - "webHookProperties": { + "actionProperties": { "key11": "value11", "key12": "value12" } From 864df62da6c4ad0169f1b66c25737fd1ed16340a Mon Sep 17 00:00:00 2001 From: Gilad Suberr Date: Sun, 31 Oct 2021 15:25:46 +0200 Subject: [PATCH 08/31] Added create example --- .../createOrUpdatePrometheusRuleGroup.json | 89 +++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/createOrUpdatePrometheusRuleGroup.json diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/createOrUpdatePrometheusRuleGroup.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/createOrUpdatePrometheusRuleGroup.json new file mode 100644 index 000000000000..6756e4a98d14 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/createOrUpdatePrometheusRuleGroup.json @@ -0,0 +1,89 @@ +{ + "parameters": { + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7", + "resourceGroupName": "giladstest", + "ruleName": "myPrometheusRuleGroup", + "api-version": "2021-07-22-preview", + "parameters": { + "location": "East US", + "properties": { + "description": "This is the description of the first rule group", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/giladstest/providers/Microsoft.Observability/monitoringAcount/myMonitoringAccount" + ], + "rules": [ + { + "record": "job_type:billing_jobs_duration_seconds:99p5m", + "expression": "histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service=\"billing-processing\"}[5m])) by (job_type))" + }, + { + "alert": "Billing_Processing_Very_Slow", + "expression": "job_type:billing_jobs_duration_seconds:99p5m > 30", + "severity": 2, + "for": "5m", + "labels": { + "team": "prod" + }, + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "10m" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/giladstest/providers/microsoft.insights/notificationgroups/group2", + "actionProperties": { + "key11": "value11", + "key12": "value12" + } + } + ] + } + ] + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/Microsoft.AlertsManagement/prometheusRuleGroups/myPrometheusRuleGroup", + "type": "Microsoft.AlertsManagement/prometheusRuleGroups", + "location": "global", + "properties": { + "description": "This is the description of the first rule group", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/giladstest/providers/Microsoft.Observability/monitoringAcount/myMonitoringAccount" + ], + "rules": [ + { + "record": "job_type:billing_jobs_duration_seconds:99p5m", + "expression": "histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service=\"billing-processing\"}[5m])) by (job_type))" + }, + { + "alert": "Billing_Processing_Very_Slow", + "expression": "job_type:billing_jobs_duration_seconds:99p5m > 30", + "severity": 2, + "for": "5m", + "labels": { + "team": "prod" + }, + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "10m" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/giladstest/providers/microsoft.insights/notificationgroups/group2", + "actionProperties": { + "key11": "value11", + "key12": "value12" + } + } + ] + } + ] + } + } + } + } +} From 9b6829af87c9b98ae321909a1a0aff0769906e02 Mon Sep 17 00:00:00 2001 From: Gilad Suberr Date: Sun, 31 Oct 2021 15:27:25 +0200 Subject: [PATCH 09/31] Added patch example --- .../examples/patchPrometheusRuleGroup.json | 89 +++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/patchPrometheusRuleGroup.json diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/patchPrometheusRuleGroup.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/patchPrometheusRuleGroup.json new file mode 100644 index 000000000000..6756e4a98d14 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/patchPrometheusRuleGroup.json @@ -0,0 +1,89 @@ +{ + "parameters": { + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7", + "resourceGroupName": "giladstest", + "ruleName": "myPrometheusRuleGroup", + "api-version": "2021-07-22-preview", + "parameters": { + "location": "East US", + "properties": { + "description": "This is the description of the first rule group", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/giladstest/providers/Microsoft.Observability/monitoringAcount/myMonitoringAccount" + ], + "rules": [ + { + "record": "job_type:billing_jobs_duration_seconds:99p5m", + "expression": "histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service=\"billing-processing\"}[5m])) by (job_type))" + }, + { + "alert": "Billing_Processing_Very_Slow", + "expression": "job_type:billing_jobs_duration_seconds:99p5m > 30", + "severity": 2, + "for": "5m", + "labels": { + "team": "prod" + }, + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "10m" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/giladstest/providers/microsoft.insights/notificationgroups/group2", + "actionProperties": { + "key11": "value11", + "key12": "value12" + } + } + ] + } + ] + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/Microsoft.AlertsManagement/prometheusRuleGroups/myPrometheusRuleGroup", + "type": "Microsoft.AlertsManagement/prometheusRuleGroups", + "location": "global", + "properties": { + "description": "This is the description of the first rule group", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/giladstest/providers/Microsoft.Observability/monitoringAcount/myMonitoringAccount" + ], + "rules": [ + { + "record": "job_type:billing_jobs_duration_seconds:99p5m", + "expression": "histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service=\"billing-processing\"}[5m])) by (job_type))" + }, + { + "alert": "Billing_Processing_Very_Slow", + "expression": "job_type:billing_jobs_duration_seconds:99p5m > 30", + "severity": 2, + "for": "5m", + "labels": { + "team": "prod" + }, + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "10m" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/giladstest/providers/microsoft.insights/notificationgroups/group2", + "actionProperties": { + "key11": "value11", + "key12": "value12" + } + } + ] + } + ] + } + } + } + } +} From 135d1a532584346ffeb0a13c0435250566e3731f Mon Sep 17 00:00:00 2001 From: Gilad Suberr Date: Sun, 31 Oct 2021 15:48:42 +0200 Subject: [PATCH 10/31] Test --- .../preview/2021-07-22-preview/examples/test.json | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/test.json diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/test.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/test.json new file mode 100644 index 000000000000..e69de29bb2d1 From cfb168456d66392dc35af24e6523acadb7e7bb29 Mon Sep 17 00:00:00 2001 From: Gilad Suberr Date: Mon, 1 Nov 2021 15:55:39 +0200 Subject: [PATCH 11/31] Fixes --- .../preview/2021-07-22-preview/PrometheusRuleGroups.json | 3 +++ .../preview/2021-07-22-preview/examples/test.json | 0 2 files changed, 3 insertions(+) delete mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/test.json diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json index 38eb30dc72a9..b7cfe5b253fc 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json @@ -343,6 +343,7 @@ ] }, "tags": { + "type": "object", "additionalProperties": { "type": "string" }, @@ -453,12 +454,14 @@ "description": "the amount of time alert must be active before firing." }, "labels": { + "type": "object", "additionalProperties": { "type": "string" }, "description": "labels for rule group" }, "annotations": { + "type": "object", "additionalProperties": { "type": "string" }, diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/test.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/test.json deleted file mode 100644 index e69de29bb2d1..000000000000 From 78e60a3d588571bc5ab98a3c92b4a74aa5ce4efe Mon Sep 17 00:00:00 2001 From: Gilad Suberr Date: Mon, 1 Nov 2021 17:33:59 +0200 Subject: [PATCH 12/31] Added missing brace --- .../PrometheusRuleGroups.json | 223 +++++++++--------- 1 file changed, 112 insertions(+), 111 deletions(-) diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json index b7cfe5b253fc..673be0751c16 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json @@ -479,127 +479,128 @@ "$ref": "#/definitions/PrometheusRuleResolveConfiguration", "description": "defines the configuration for resolving fired alerts." } - }, - "PrometheusRuleResolveConfiguration": { - "type": "object", - "properties": { - "autoResolved": { - "type": "boolean", - "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." - } + } + }, + "PrometheusRuleResolveConfiguration": { + "type": "object", + "properties": { + "autoResolved": { + "type": "boolean", + "description": "the flag that indicates whether or not to auto resolve a fired alert." }, - "description": "Specifies the Prometheus alert rule configuration." - }, - "PrometheusRuleGroupsErrorResponse": { - "description": "Describes the format of Error response.", - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/PrometheusRuleGroupsErrorResponseBody" - } - } - }, - "PrometheusRuleGroupsErrorResponseBody": { - "description": "Describes the format of Error response.", - "type": "object", - "properties": { - "code": { - "description": "Error code", - "type": "string" - }, - "message": { - "description": "Error message indicating why the operation failed.", - "type": "string" - } + "timeToResolve": { + "type": "string", + "description": + "the duration a rule must evaluate as healthy before the fired alert is automatically resolved." } }, - "operation": { - "description": "Operation provided by provider", - "properties": { - "name": { - "type": "string", - "description": "Name of the operation" - }, - "display": { - "type": "object", - "description": "Properties of the operation", - "properties": { - "provider": { - "type": "string", - "description": "Provider name" - }, - "resource": { - "type": "string", - "description": "Resource name" - }, - "operation": { - "type": "string", - "description": "Operation name" - }, - "description": { - "type": "string", - "description": "Description of the operation" - } - } - } + "description": "Specifies the Prometheus alert rule configuration." + }, + "PrometheusRuleGroupsErrorResponse": { + "description": "Describes the format of Error response.", + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/PrometheusRuleGroupsErrorResponseBody" } - }, - "operationsList": { - "description": "Lists the operations available in the AlertsManagement RP.", - "properties": { - "nextLink": { - "description": "URL to fetch the next set of operations.", - "type": "string" - }, - "value": { - "description": "Array of operations", - "type": "array", - "items": { - "$ref": "#/definitions/operation" - } - } - }, - "required": [ - "value" - ] - }, - "parameters": { - "SubscriptionIdParameter": { - "name": "subscriptionId", - "in": "path", - "required": true, - "type": "string", - "description": "The Azure subscription Id." + } + }, + "PrometheusRuleGroupsErrorResponseBody": { + "description": "Describes the format of Error response.", + "type": "object", + "properties": { + "code": { + "description": "Error code", + "type": "string" }, - "ApiVersionParameter": { - "name": "api-version", - "in": "query", - "required": true, + "message": { + "description": "Error message indicating why the operation failed.", + "type": "string" + } + } + }, + "operation": { + "description": "Operation provided by provider", + "properties": { + "name": { "type": "string", - "description": "Client Api Version." + "description": "Name of the operation" }, - "ResourceGroupNameParameter": { - "name": "resourceGroupName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the resource group.", - "x-ms-parameter-location": "method" + "display": { + "type": "object", + "description": "Properties of the operation", + "properties": { + "provider": { + "type": "string", + "description": "Provider name" + }, + "resource": { + "type": "string", + "description": "Resource name" + }, + "operation": { + "type": "string", + "description": "Operation name" + }, + "description": { + "type": "string", + "description": "Description of the operation" + } + } + } + } + }, + "operationsList": { + "description": "Lists the operations available in the AlertsManagement RP.", + "properties": { + "nextLink": { + "description": "URL to fetch the next set of operations.", + "type": "string" }, - "RuleGroupNameParameter": { - "name": "ruleName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the rule group.", - "x-ms-parameter-location": "method" + "value": { + "description": "Array of operations", + "type": "array", + "items": { + "$ref": "#/definitions/operation" + } } + }, + "required": [ + "value" + ] + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "The Azure subscription Id." + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "Client Api Version." + }, + "ResourceGroupNameParameter": { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group.", + "x-ms-parameter-location": "method" + }, + "RuleGroupNameParameter": { + "name": "ruleName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the rule group.", + "x-ms-parameter-location": "method" } } } } + From cadc2c9f230236adedd229f43eb59e77780f9702 Mon Sep 17 00:00:00 2001 From: Gilad Suberr Date: Mon, 1 Nov 2021 21:50:48 +0200 Subject: [PATCH 13/31] Added rule group name --- .../preview/2021-07-22-preview/PrometheusRuleGroups.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json index 673be0751c16..72a7efff58d7 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json @@ -593,7 +593,7 @@ "x-ms-parameter-location": "method" }, "RuleGroupNameParameter": { - "name": "ruleName", + "name": "ruleGroupName", "in": "path", "required": true, "type": "string", From f623335d1dae0af45f3eacfd89864d9d9619f2a0 Mon Sep 17 00:00:00 2001 From: Gilad Suberr Date: Mon, 1 Nov 2021 22:27:38 +0200 Subject: [PATCH 14/31] Fixed --- .../PrometheusRuleGroups.json | 159 +++++------------- 1 file changed, 46 insertions(+), 113 deletions(-) diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json index 72a7efff58d7..1c83fb909b7e 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json @@ -27,31 +27,6 @@ } }, "paths": { - "/providers/Microsoft.AlertsManagement/operations": { - "get": { - "operationId": "Operations_List", - "description": "List all operations available through Azure Alerts Management Resource Provider.", - "parameters": [ - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "OK. Successfully retrieved operations list.", - "schema": { - "$ref": "#/definitions/operationsList" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, "/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/prometheusRuleGroups": { "get": { "tags": [ @@ -91,8 +66,7 @@ } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/prometheusRuleGroups": - { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/prometheusRuleGroups": { "get": { "tags": [ "PrometheusRuleGroups" @@ -134,8 +108,7 @@ } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/prometheusRuleGroups/{ruleGroupName}": - { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/prometheusRuleGroups/{ruleGroupName}": { "get": { "tags": [ "PrometheusRuleGroups" @@ -249,7 +222,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/PrometheusRuleGroupResourcePatch" + "$ref": "#/definitions/PrometheusRuleGroupResource" }, "description": "The parameters of the rule group to update." } @@ -430,6 +403,18 @@ }, "description": "The Prometheus rule group resource." }, + "PrometheusRuleGroupResourceCollection": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/PrometheusRuleGroupResource" + }, + "description": "the values for the alert rule resources." + } + }, + "description": "Represents a collection of alert rule resources." + }, "PrometheusRule": { "type": "object", "properties": { @@ -472,8 +457,7 @@ "items": { "$ref": "#/definitions/PrometheusRuleGroupAction" }, - "description": - "the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved." + "description": "the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved." }, "resolveConfiguration": { "$ref": "#/definitions/PrometheusRuleResolveConfiguration", @@ -490,8 +474,7 @@ }, "timeToResolve": { "type": "string", - "description": - "the duration a rule must evaluate as healthy before the fired alert is automatically resolved." + "description": "the duration a rule must evaluate as healthy before the fired alert is automatically resolved." } }, "description": "Specifies the Prometheus alert rule configuration." @@ -518,88 +501,38 @@ "type": "string" } } + } + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "The Azure subscription Id." }, - "operation": { - "description": "Operation provided by provider", - "properties": { - "name": { - "type": "string", - "description": "Name of the operation" - }, - "display": { - "type": "object", - "description": "Properties of the operation", - "properties": { - "provider": { - "type": "string", - "description": "Provider name" - }, - "resource": { - "type": "string", - "description": "Resource name" - }, - "operation": { - "type": "string", - "description": "Operation name" - }, - "description": { - "type": "string", - "description": "Description of the operation" - } - } - } - } + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "Client Api Version." }, - "operationsList": { - "description": "Lists the operations available in the AlertsManagement RP.", - "properties": { - "nextLink": { - "description": "URL to fetch the next set of operations.", - "type": "string" - }, - "value": { - "description": "Array of operations", - "type": "array", - "items": { - "$ref": "#/definitions/operation" - } - } - }, - "required": [ - "value" - ] + "ResourceGroupNameParameter": { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group.", + "x-ms-parameter-location": "method" }, - "parameters": { - "SubscriptionIdParameter": { - "name": "subscriptionId", - "in": "path", - "required": true, - "type": "string", - "description": "The Azure subscription Id." - }, - "ApiVersionParameter": { - "name": "api-version", - "in": "query", - "required": true, - "type": "string", - "description": "Client Api Version." - }, - "ResourceGroupNameParameter": { - "name": "resourceGroupName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the resource group.", - "x-ms-parameter-location": "method" - }, - "RuleGroupNameParameter": { - "name": "ruleGroupName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the rule group.", - "x-ms-parameter-location": "method" - } + "RuleGroupNameParameter": { + "name": "ruleGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the rule group.", + "x-ms-parameter-location": "method" } } } From fee5128dc4e437c2e5c1c97bfbad344cca5d0402 Mon Sep 17 00:00:00 2001 From: Gilad Suberr Date: Tue, 2 Nov 2021 08:25:18 +0200 Subject: [PATCH 15/31] Pretier --- .../preview/2021-07-22-preview/.prettierrc | 4 + .../2021-07-22-preview/AlertsManagement.json | 117 ++++++++++++++++++ .../PrometheusRuleGroups.json | 77 +++++------- 3 files changed, 155 insertions(+), 43 deletions(-) create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/.prettierrc create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/AlertsManagement.json diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/.prettierrc b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/.prettierrc new file mode 100644 index 000000000000..222861c34154 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/.prettierrc @@ -0,0 +1,4 @@ +{ + "tabWidth": 2, + "useTabs": false +} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/AlertsManagement.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/AlertsManagement.json new file mode 100644 index 000000000000..371ed745c038 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/AlertsManagement.json @@ -0,0 +1,117 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-07-22-preview", + "title": "Azure Alerts Management Service Resource Provider", + "description": "Azure Alerts Management Service provides a single pane of glass of alerts across Azure Monitor." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/providers/Microsoft.AlertsManagement/operations": { + "get": { + "operationId": "Operations_List", + "description": "List all operations available through Azure Alerts Management Resource Provider.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "OK. Successfully retrieved operations list.", + "schema": { + "$ref": "#/definitions/operationsList" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "operation": { + "description": "Operation provided by provider", + "properties": { + "name": { + "type": "string", + "description": "Name of the operation" + }, + "display": { + "type": "object", + "description": "Properties of the operation", + "properties": { + "provider": { + "type": "string", + "description": "Provider name" + }, + "resource": { + "type": "string", + "description": "Resource name" + }, + "operation": { + "type": "string", + "description": "Operation name" + }, + "description": { + "type": "string", + "description": "Description of the operation" + } + } + } + } + }, + "operationsList": { + "description": "Lists the operations available in the AlertsManagement RP.", + "properties": { + "nextLink": { + "description": "URL to fetch the next set of operations.", + "type": "string" + }, + "value": { + "description": "Array of operations", + "type": "array", + "items": { + "$ref": "#/definitions/operation" + } + } + }, + "required": [ + "value" + ] + } + }, + "parameters": { + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "Client Api Version." + } + } +} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json index 1c83fb909b7e..b29b3e2b13e0 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json @@ -6,15 +6,9 @@ "description": "Azure Alerts Management Service provides a single pane of glass of alerts across Azure Monitor." }, "host": "management.azure.com", - "schemes": [ - "https" - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], + "schemes": [ "https" ], + "consumes": [ "application/json" ], + "produces": [ "application/json" ], "securityDefinitions": { "azure_auth": { "type": "oauth2", @@ -29,9 +23,7 @@ "paths": { "/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/prometheusRuleGroups": { "get": { - "tags": [ - "PrometheusRuleGroups" - ], + "tags": [ "PrometheusRuleGroups" ], "description": "Retrieve Prometheus rule group definitions in a subscription.", "operationId": "PrometheusRuleGroups_ListBySubscription", "parameters": [ @@ -68,9 +60,7 @@ }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/prometheusRuleGroups": { "get": { - "tags": [ - "PrometheusRuleGroups" - ], + "tags": [ "PrometheusRuleGroups" ], "description": "Retrieve Prometheus rule group definitions in a resource group.", "operationId": "PrometheusRuleGroups_ListByResourceGroup", "parameters": [ @@ -110,9 +100,7 @@ }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/prometheusRuleGroups/{ruleGroupName}": { "get": { - "tags": [ - "PrometheusRuleGroups" - ], + "tags": [ "PrometheusRuleGroups" ], "description": "Retrieve a Prometheus rule group definition.", "operationId": "PrometheusRuleGroups_Get", "parameters": [ @@ -150,9 +138,7 @@ } }, "put": { - "tags": [ - "PrometheusRuleGroups" - ], + "tags": [ "PrometheusRuleGroups" ], "description": "Create or update a Prometheus rule group definition.", "operationId": "PrometheusRuleGroups_CreateOrUpdate", "parameters": [ @@ -199,9 +185,7 @@ } }, "patch": { - "tags": [ - "PrometheusRuleGroups" - ], + "tags": [ "PrometheusRuleGroups" ], "description": "Update an Prometheus rule group definition.", "operationId": "PrometheusRuleGroups_Update", "parameters": [ @@ -248,9 +232,7 @@ } }, "delete": { - "tags": [ - "PrometheusRuleGroups" - ], + "tags": [ "PrometheusRuleGroups" ], "description": "Delete a Prometheus rule group definition.", "operationId": "PrometheusRuleGroups_Delete", "parameters": [ @@ -291,6 +273,7 @@ }, "definitions": { "Resource": { + "type": "object", "properties": { "id": { "type": "string", @@ -310,10 +293,7 @@ "location": { "type": "string", "description": "Resource location", - "x-ms-mutability": [ - "create", - "read" - ] + "x-ms-mutability": [ "create", "read" ] }, "tags": { "type": "object", @@ -323,13 +303,12 @@ "description": "Resource tags" } }, - "required": [ - "location" - ], + "required": [ "location" ], "x-ms-azure-resource": true, "description": "An azure resource object" }, "PrometheusRuleGroupAction": { + "type": "object", "description": "An alert action.", "properties": { "actionGroupId": { @@ -347,11 +326,8 @@ } }, "PrometheusRuleGroupProperties": { - "required": [ - "description", - "scopes", - "rules" - ], + "type": "object", + "required": [ "description", "scopes", "rules" ], "properties": { "description": { "type": "string", @@ -391,9 +367,7 @@ "$ref": "#/definitions/Resource" } ], - "required": [ - "properties" - ], + "required": [ "properties" ], "properties": { "properties": { "x-ms-client-flatten": true, @@ -403,7 +377,25 @@ }, "description": "The Prometheus rule group resource." }, + "PrometheusRuleGroupResourcePatch": { + "type": "object", + "properties": { + "tags": { + "additionalProperties": { + "type": "string" + }, + "description": "Resource tags" + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/PrometheusRuleGroupProperties", + "description": "The alert rule properties of the resource." + } + }, + "description": "The health alert resource for patch operations." + }, "PrometheusRuleGroupResourceCollection": { + "type": "object", "properties": { "value": { "type": "array", @@ -536,4 +528,3 @@ } } } - From 54e9b508ab4603b5c933694432d06e5c1da1798f Mon Sep 17 00:00:00 2001 From: Gilad Suberr Date: Tue, 2 Nov 2021 09:05:31 +0200 Subject: [PATCH 16/31] Tool fix --- .../preview/2021-07-22-preview/.prettierrc | 4 --- .../2021-07-22-preview/AlertsManagement.json | 20 ++++--------- .../PrometheusRuleGroups.json | 28 +++++++++---------- .../createOrUpdatePrometheusRuleGroup.json | 2 +- .../examples/deletePrometheusRuleGroup.json | 2 +- .../examples/getPrometheusRuleGroup.json | 8 ++---- .../examples/listPrometheusRuleGroups.json | 6 ++-- .../examples/patchPrometheusRuleGroup.json | 2 +- 8 files changed, 27 insertions(+), 45 deletions(-) delete mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/.prettierrc diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/.prettierrc b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/.prettierrc deleted file mode 100644 index 222861c34154..000000000000 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/.prettierrc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "tabWidth": 2, - "useTabs": false -} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/AlertsManagement.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/AlertsManagement.json index 371ed745c038..dd02a019d2c0 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/AlertsManagement.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/AlertsManagement.json @@ -6,15 +6,9 @@ "description": "Azure Alerts Management Service provides a single pane of glass of alerts across Azure Monitor." }, "host": "management.azure.com", - "schemes": [ - "https" - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], + "schemes": ["https"], + "consumes": ["application/json"], + "produces": ["application/json"], "securityDefinitions": { "azure_auth": { "type": "oauth2", @@ -36,9 +30,7 @@ "$ref": "#/parameters/ApiVersionParameter" } ], - "produces": [ - "application/json" - ], + "produces": ["application/json"], "responses": { "200": { "description": "OK. Successfully retrieved operations list.", @@ -100,9 +92,7 @@ } } }, - "required": [ - "value" - ] + "required": ["value"] } }, "parameters": { diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json index b29b3e2b13e0..352755526693 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json @@ -6,9 +6,9 @@ "description": "Azure Alerts Management Service provides a single pane of glass of alerts across Azure Monitor." }, "host": "management.azure.com", - "schemes": [ "https" ], - "consumes": [ "application/json" ], - "produces": [ "application/json" ], + "schemes": ["https"], + "consumes": ["application/json"], + "produces": ["application/json"], "securityDefinitions": { "azure_auth": { "type": "oauth2", @@ -23,7 +23,7 @@ "paths": { "/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/prometheusRuleGroups": { "get": { - "tags": [ "PrometheusRuleGroups" ], + "tags": ["PrometheusRuleGroups"], "description": "Retrieve Prometheus rule group definitions in a subscription.", "operationId": "PrometheusRuleGroups_ListBySubscription", "parameters": [ @@ -60,7 +60,7 @@ }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/prometheusRuleGroups": { "get": { - "tags": [ "PrometheusRuleGroups" ], + "tags": ["PrometheusRuleGroups"], "description": "Retrieve Prometheus rule group definitions in a resource group.", "operationId": "PrometheusRuleGroups_ListByResourceGroup", "parameters": [ @@ -100,7 +100,7 @@ }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/prometheusRuleGroups/{ruleGroupName}": { "get": { - "tags": [ "PrometheusRuleGroups" ], + "tags": ["PrometheusRuleGroups"], "description": "Retrieve a Prometheus rule group definition.", "operationId": "PrometheusRuleGroups_Get", "parameters": [ @@ -138,7 +138,7 @@ } }, "put": { - "tags": [ "PrometheusRuleGroups" ], + "tags": ["PrometheusRuleGroups"], "description": "Create or update a Prometheus rule group definition.", "operationId": "PrometheusRuleGroups_CreateOrUpdate", "parameters": [ @@ -185,7 +185,7 @@ } }, "patch": { - "tags": [ "PrometheusRuleGroups" ], + "tags": ["PrometheusRuleGroups"], "description": "Update an Prometheus rule group definition.", "operationId": "PrometheusRuleGroups_Update", "parameters": [ @@ -232,7 +232,7 @@ } }, "delete": { - "tags": [ "PrometheusRuleGroups" ], + "tags": ["PrometheusRuleGroups"], "description": "Delete a Prometheus rule group definition.", "operationId": "PrometheusRuleGroups_Delete", "parameters": [ @@ -293,7 +293,7 @@ "location": { "type": "string", "description": "Resource location", - "x-ms-mutability": [ "create", "read" ] + "x-ms-mutability": ["create", "read"] }, "tags": { "type": "object", @@ -303,7 +303,7 @@ "description": "Resource tags" } }, - "required": [ "location" ], + "required": ["location"], "x-ms-azure-resource": true, "description": "An azure resource object" }, @@ -327,7 +327,7 @@ }, "PrometheusRuleGroupProperties": { "type": "object", - "required": [ "description", "scopes", "rules" ], + "required": ["description", "scopes", "rules"], "properties": { "description": { "type": "string", @@ -367,7 +367,7 @@ "$ref": "#/definitions/Resource" } ], - "required": [ "properties" ], + "required": ["properties"], "properties": { "properties": { "x-ms-client-flatten": true, @@ -423,7 +423,7 @@ "description": "the expression to run for the rule." }, "severity": { - "type": "string", + "type": "integer", "description": "the expression to run for the rule." }, "for": { diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/createOrUpdatePrometheusRuleGroup.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/createOrUpdatePrometheusRuleGroup.json index 6756e4a98d14..58ccd35e665a 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/createOrUpdatePrometheusRuleGroup.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/createOrUpdatePrometheusRuleGroup.json @@ -2,7 +2,7 @@ "parameters": { "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7", "resourceGroupName": "giladstest", - "ruleName": "myPrometheusRuleGroup", + "ruleGroupName": "myPrometheusRuleGroup", "api-version": "2021-07-22-preview", "parameters": { "location": "East US", diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/deletePrometheusRuleGroup.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/deletePrometheusRuleGroup.json index 94bc8f817905..5c08be786219 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/deletePrometheusRuleGroup.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/deletePrometheusRuleGroup.json @@ -2,7 +2,7 @@ "parameters": { "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7", "resourceGroupName": "giladsteset", - "ruleName": "myPrometheusRuleGroup", + "ruleGroupName": "myPrometheusRuleGroup", "api-version": "2021-07-22-preview" }, "responses": { diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/getPrometheusRuleGroup.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/getPrometheusRuleGroup.json index fc6fb419713c..ade5320337bd 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/getPrometheusRuleGroup.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/getPrometheusRuleGroup.json @@ -2,15 +2,14 @@ "parameters": { "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7", "resourceGroupName": "giladstest", - "ruleName": "myPrometheusRuleGroup", + "ruleGroupName": "myPrometheusRuleGroup", "api-version": "2021-07-22-preview" }, "responses": { "200": { "headers": {}, "body": { - "id": - "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/giladstest/providers/providers/Microsoft.AlertsManagement/prometheusRuleGroups/myPrometheusRuleGroup", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/giladstest/providers/providers/Microsoft.AlertsManagement/prometheusRuleGroups/myPrometheusRuleGroup", "type": "Microsoft.AlertsManagement/prometheusRuleGroups", "location": "global", "properties": { @@ -21,8 +20,7 @@ "rules": [ { "record": "job_type:billing_jobs_duration_seconds:99p5m", - "expression": - "histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service=\"billing-processing\"}[5m])) by (job_type))" + "expression": "histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service=\"billing-processing\"}[5m])) by (job_type))" }, { "alert": "Billing_Processing_Very_Slow", diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/listPrometheusRuleGroups.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/listPrometheusRuleGroups.json index fec51e73abbd..cd71d77b289e 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/listPrometheusRuleGroups.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/listPrometheusRuleGroups.json @@ -21,8 +21,7 @@ "rules": [ { "record": "job_type:billing_jobs_duration_seconds:99p5m", - "expression": - "histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service=\"billing-processing\"}[5m])) by (job_type))" + "expression": "histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service=\"billing-processing\"}[5m])) by (job_type))" }, { "alert": "Billing_Processing_Very_Slow", @@ -38,8 +37,7 @@ }, "actions": [ { - "actionGroupId": - "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/notificationgroups/group2", + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/notificationgroups/group2", "actionProperties": { "key11": "value11", "key12": "value12" diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/patchPrometheusRuleGroup.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/patchPrometheusRuleGroup.json index 6756e4a98d14..58ccd35e665a 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/patchPrometheusRuleGroup.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/patchPrometheusRuleGroup.json @@ -2,7 +2,7 @@ "parameters": { "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7", "resourceGroupName": "giladstest", - "ruleName": "myPrometheusRuleGroup", + "ruleGroupName": "myPrometheusRuleGroup", "api-version": "2021-07-22-preview", "parameters": { "location": "East US", From 691f81bad8cd2145fcc4ec83c84b1c450e6f1a44 Mon Sep 17 00:00:00 2001 From: Gilad Suberr Date: Tue, 2 Nov 2021 09:16:25 +0200 Subject: [PATCH 17/31] Update readme --- specification/alertsmanagement/resource-manager/readme.md | 1 + 1 file changed, 1 insertion(+) diff --git a/specification/alertsmanagement/resource-manager/readme.md b/specification/alertsmanagement/resource-manager/readme.md index 1352f43f6b54..dcf78ed50b94 100644 --- a/specification/alertsmanagement/resource-manager/readme.md +++ b/specification/alertsmanagement/resource-manager/readme.md @@ -154,6 +154,7 @@ These settings apply only when `--tag=package-2021-07-22` is specified on the co ``` yaml $(tag) == 'package-2021-07-22-preview' input-file: +- Microsoft.AlertsManagement/preview/2021-07-22-preview/AlertsManagement.json - Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json ``` From 7783e227f1975e92db1657306e4d621af6512e91 Mon Sep 17 00:00:00 2001 From: Gilad Suberr Date: Tue, 2 Nov 2021 09:27:38 +0200 Subject: [PATCH 18/31] Another prettier fix --- .../PrometheusRuleGroups.json | 55 ++++++++++++++----- 1 file changed, 42 insertions(+), 13 deletions(-) diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json index 352755526693..7db25ad17997 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json @@ -6,9 +6,15 @@ "description": "Azure Alerts Management Service provides a single pane of glass of alerts across Azure Monitor." }, "host": "management.azure.com", - "schemes": ["https"], - "consumes": ["application/json"], - "produces": ["application/json"], + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "securityDefinitions": { "azure_auth": { "type": "oauth2", @@ -23,7 +29,9 @@ "paths": { "/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/prometheusRuleGroups": { "get": { - "tags": ["PrometheusRuleGroups"], + "tags": [ + "PrometheusRuleGroups" + ], "description": "Retrieve Prometheus rule group definitions in a subscription.", "operationId": "PrometheusRuleGroups_ListBySubscription", "parameters": [ @@ -60,7 +68,9 @@ }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/prometheusRuleGroups": { "get": { - "tags": ["PrometheusRuleGroups"], + "tags": [ + "PrometheusRuleGroups" + ], "description": "Retrieve Prometheus rule group definitions in a resource group.", "operationId": "PrometheusRuleGroups_ListByResourceGroup", "parameters": [ @@ -100,7 +110,9 @@ }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/prometheusRuleGroups/{ruleGroupName}": { "get": { - "tags": ["PrometheusRuleGroups"], + "tags": [ + "PrometheusRuleGroups" + ], "description": "Retrieve a Prometheus rule group definition.", "operationId": "PrometheusRuleGroups_Get", "parameters": [ @@ -138,7 +150,9 @@ } }, "put": { - "tags": ["PrometheusRuleGroups"], + "tags": [ + "PrometheusRuleGroups" + ], "description": "Create or update a Prometheus rule group definition.", "operationId": "PrometheusRuleGroups_CreateOrUpdate", "parameters": [ @@ -185,7 +199,9 @@ } }, "patch": { - "tags": ["PrometheusRuleGroups"], + "tags": [ + "PrometheusRuleGroups" + ], "description": "Update an Prometheus rule group definition.", "operationId": "PrometheusRuleGroups_Update", "parameters": [ @@ -232,7 +248,9 @@ } }, "delete": { - "tags": ["PrometheusRuleGroups"], + "tags": [ + "PrometheusRuleGroups" + ], "description": "Delete a Prometheus rule group definition.", "operationId": "PrometheusRuleGroups_Delete", "parameters": [ @@ -293,7 +311,10 @@ "location": { "type": "string", "description": "Resource location", - "x-ms-mutability": ["create", "read"] + "x-ms-mutability": [ + "create", + "read" + ] }, "tags": { "type": "object", @@ -303,7 +324,9 @@ "description": "Resource tags" } }, - "required": ["location"], + "required": [ + "location" + ], "x-ms-azure-resource": true, "description": "An azure resource object" }, @@ -327,7 +350,11 @@ }, "PrometheusRuleGroupProperties": { "type": "object", - "required": ["description", "scopes", "rules"], + "required": [ + "description", + "scopes", + "rules" + ], "properties": { "description": { "type": "string", @@ -367,7 +394,9 @@ "$ref": "#/definitions/Resource" } ], - "required": ["properties"], + "required": [ + "properties" + ], "properties": { "properties": { "x-ms-client-flatten": true, From cdcb972418f151d513353c47aa2a9fdd1f5dedfc Mon Sep 17 00:00:00 2001 From: Gilad Suberr Date: Tue, 2 Nov 2021 09:34:34 +0200 Subject: [PATCH 19/31] More --- .../preview/2021-07-22-preview/AlertsManagement.json | 4 +++- .../preview/2021-07-22-preview/PrometheusRuleGroups.json | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/AlertsManagement.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/AlertsManagement.json index dd02a019d2c0..e6604a249676 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/AlertsManagement.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/AlertsManagement.json @@ -47,6 +47,7 @@ }, "definitions": { "operation": { + "type": "object", "description": "Operation provided by provider", "properties": { "name": { @@ -78,6 +79,7 @@ } }, "operationsList": { + "type": "object", "description": "Lists the operations available in the AlertsManagement RP.", "properties": { "nextLink": { @@ -92,7 +94,7 @@ } } }, - "required": ["value"] + "required": [ "value" ] } }, "parameters": { diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json index 7db25ad17997..79cd9b76fe56 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json @@ -222,7 +222,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/PrometheusRuleGroupResource" + "$ref": "#/definitions/PrometheusRuleGroupResourcePatch" }, "description": "The parameters of the rule group to update." } @@ -410,6 +410,7 @@ "type": "object", "properties": { "tags": { + "type": "object", "additionalProperties": { "type": "string" }, @@ -453,6 +454,7 @@ }, "severity": { "type": "integer", + "format": "int32", "description": "the expression to run for the rule." }, "for": { From de597160239baf9fc1ecaea090812b7dd86ef43f Mon Sep 17 00:00:00 2001 From: Gilad Suberr Date: Tue, 2 Nov 2021 10:00:48 +0200 Subject: [PATCH 20/31] Added system data --- .../2021-07-22-preview/AlertsManagement.json | 109 ------------------ .../PrometheusRuleGroups.json | 6 +- 2 files changed, 5 insertions(+), 110 deletions(-) delete mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/AlertsManagement.json diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/AlertsManagement.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/AlertsManagement.json deleted file mode 100644 index e6604a249676..000000000000 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/AlertsManagement.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "version": "2021-07-22-preview", - "title": "Azure Alerts Management Service Resource Provider", - "description": "Azure Alerts Management Service provides a single pane of glass of alerts across Azure Monitor." - }, - "host": "management.azure.com", - "schemes": ["https"], - "consumes": ["application/json"], - "produces": ["application/json"], - "securityDefinitions": { - "azure_auth": { - "type": "oauth2", - "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", - "flow": "implicit", - "description": "Azure Active Directory OAuth2 Flow", - "scopes": { - "user_impersonation": "impersonate your user account" - } - } - }, - "paths": { - "/providers/Microsoft.AlertsManagement/operations": { - "get": { - "operationId": "Operations_List", - "description": "List all operations available through Azure Alerts Management Resource Provider.", - "parameters": [ - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "produces": ["application/json"], - "responses": { - "200": { - "description": "OK. Successfully retrieved operations list.", - "schema": { - "$ref": "#/definitions/operationsList" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - } - }, - "definitions": { - "operation": { - "type": "object", - "description": "Operation provided by provider", - "properties": { - "name": { - "type": "string", - "description": "Name of the operation" - }, - "display": { - "type": "object", - "description": "Properties of the operation", - "properties": { - "provider": { - "type": "string", - "description": "Provider name" - }, - "resource": { - "type": "string", - "description": "Resource name" - }, - "operation": { - "type": "string", - "description": "Operation name" - }, - "description": { - "type": "string", - "description": "Description of the operation" - } - } - } - } - }, - "operationsList": { - "type": "object", - "description": "Lists the operations available in the AlertsManagement RP.", - "properties": { - "nextLink": { - "description": "URL to fetch the next set of operations.", - "type": "string" - }, - "value": { - "description": "Array of operations", - "type": "array", - "items": { - "$ref": "#/definitions/operation" - } - } - }, - "required": [ "value" ] - } - }, - "parameters": { - "ApiVersionParameter": { - "name": "api-version", - "in": "query", - "required": true, - "type": "string", - "description": "Client Api Version." - } - } -} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json index 79cd9b76fe56..be7d9d75c70b 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json @@ -402,6 +402,10 @@ "x-ms-client-flatten": true, "$ref": "#/definitions/PrometheusRuleGroupProperties", "description": "The Prometheus rule group properties of the resource." + }, + "systemData": { + "description": "Prometheus rule group system data", + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" } }, "description": "The Prometheus rule group resource." @@ -422,7 +426,7 @@ "description": "The alert rule properties of the resource." } }, - "description": "The health alert resource for patch operations." + "description": "The Prometheus rule group resource for patch operations." }, "PrometheusRuleGroupResourceCollection": { "type": "object", From db85a1778b8b6fff47c43d4bbe1f0a328b579720 Mon Sep 17 00:00:00 2001 From: Gilad Suberr Date: Tue, 2 Nov 2021 10:07:15 +0200 Subject: [PATCH 21/31] Removed referenced file --- specification/alertsmanagement/resource-manager/readme.md | 1 - 1 file changed, 1 deletion(-) diff --git a/specification/alertsmanagement/resource-manager/readme.md b/specification/alertsmanagement/resource-manager/readme.md index dcf78ed50b94..1352f43f6b54 100644 --- a/specification/alertsmanagement/resource-manager/readme.md +++ b/specification/alertsmanagement/resource-manager/readme.md @@ -154,7 +154,6 @@ These settings apply only when `--tag=package-2021-07-22` is specified on the co ``` yaml $(tag) == 'package-2021-07-22-preview' input-file: -- Microsoft.AlertsManagement/preview/2021-07-22-preview/AlertsManagement.json - Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json ``` From 874269e0473a942350029f56f9611d0f459ce969 Mon Sep 17 00:00:00 2001 From: Gilad Suberr Date: Tue, 2 Nov 2021 10:26:11 +0200 Subject: [PATCH 22/31] Removed system data --- .../preview/2021-07-22-preview/PrometheusRuleGroups.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json index be7d9d75c70b..095c27fdd5b6 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json @@ -402,10 +402,6 @@ "x-ms-client-flatten": true, "$ref": "#/definitions/PrometheusRuleGroupProperties", "description": "The Prometheus rule group properties of the resource." - }, - "systemData": { - "description": "Prometheus rule group system data", - "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" } }, "description": "The Prometheus rule group resource." From c632e2cbf1a4429aa3288da140da48d61a8c0804 Mon Sep 17 00:00:00 2001 From: Gilad Suberr Date: Tue, 2 Nov 2021 10:46:33 +0200 Subject: [PATCH 23/31] Added location to patch --- .../preview/2021-07-22-preview/PrometheusRuleGroups.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json index 095c27fdd5b6..b2ca90c2810d 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json @@ -416,6 +416,14 @@ }, "description": "Resource tags" }, + "location": { + "type": "string", + "description": "Resource location", + "x-ms-mutability": [ + "create", + "read" + ] + }, "properties": { "x-ms-client-flatten": true, "$ref": "#/definitions/PrometheusRuleGroupProperties", From 08063e33722a33563379095637ec370654772c90 Mon Sep 17 00:00:00 2001 From: Gilad Suberr Date: Tue, 2 Nov 2021 11:34:50 +0200 Subject: [PATCH 24/31] Added back systemdata --- .../2021-07-22-preview/PrometheusRuleGroups.json | 4 ++++ .../examples/createOrUpdatePrometheusRuleGroup.json | 8 ++++++++ .../examples/getPrometheusRuleGroup.json | 8 ++++++++ .../examples/listPrometheusRuleGroups.json | 8 ++++++++ .../examples/patchPrometheusRuleGroup.json | 10 +++++++++- 5 files changed, 37 insertions(+), 1 deletion(-) diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json index b2ca90c2810d..58207a341682 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json @@ -404,6 +404,10 @@ "description": "The Prometheus rule group properties of the resource." } }, + "systemData": { + "description": "Action rule system data", + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" + }, "description": "The Prometheus rule group resource." }, "PrometheusRuleGroupResourcePatch": { diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/createOrUpdatePrometheusRuleGroup.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/createOrUpdatePrometheusRuleGroup.json index 58ccd35e665a..be894b029049 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/createOrUpdatePrometheusRuleGroup.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/createOrUpdatePrometheusRuleGroup.json @@ -82,6 +82,14 @@ ] } ] + }, + "systemData": { + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "createdAt": "2018-06-12T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2018-06-12T22:05:09Z" } } } diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/getPrometheusRuleGroup.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/getPrometheusRuleGroup.json index ade5320337bd..f9d0ce5de0de 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/getPrometheusRuleGroup.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/getPrometheusRuleGroup.json @@ -45,6 +45,14 @@ ] } ] + }, + "systemData": { + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "createdAt": "2018-06-12T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2018-06-12T22:05:09Z" } } } diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/listPrometheusRuleGroups.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/listPrometheusRuleGroups.json index cd71d77b289e..2a7a1e9650d9 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/listPrometheusRuleGroups.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/listPrometheusRuleGroups.json @@ -46,6 +46,14 @@ ] } ] + }, + "systemData": { + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "createdAt": "2018-06-12T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2018-06-12T22:05:09Z" } } ] diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/patchPrometheusRuleGroup.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/patchPrometheusRuleGroup.json index 58ccd35e665a..1e42a9b00791 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/patchPrometheusRuleGroup.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/patchPrometheusRuleGroup.json @@ -48,7 +48,7 @@ "body": { "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/Microsoft.AlertsManagement/prometheusRuleGroups/myPrometheusRuleGroup", "type": "Microsoft.AlertsManagement/prometheusRuleGroups", - "location": "global", + "location": "East US", "properties": { "description": "This is the description of the first rule group", "scopes": [ @@ -82,6 +82,14 @@ ] } ] + }, + "systemData": { + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "createdAt": "2018-06-12T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2018-06-12T22:05:09Z" } } } From 2d7b075b41e929f362c9fb893305b9ae41746d4d Mon Sep 17 00:00:00 2001 From: Gilad Suberr Date: Tue, 2 Nov 2021 11:50:43 +0200 Subject: [PATCH 25/31] Fixed systemdata --- .../preview/2021-07-22-preview/PrometheusRuleGroups.json | 8 ++++---- .../examples/listPrometheusRuleGroups.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json index 58207a341682..99f7a699d1db 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json @@ -402,12 +402,12 @@ "x-ms-client-flatten": true, "$ref": "#/definitions/PrometheusRuleGroupProperties", "description": "The Prometheus rule group properties of the resource." + }, + "systemData": { + "description": "Action rule system data", + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" } }, - "systemData": { - "description": "Action rule system data", - "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" - }, "description": "The Prometheus rule group resource." }, "PrometheusRuleGroupResourcePatch": { diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/listPrometheusRuleGroups.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/listPrometheusRuleGroups.json index 2a7a1e9650d9..e67d474e1c44 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/listPrometheusRuleGroups.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/listPrometheusRuleGroups.json @@ -12,7 +12,7 @@ { "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/giladstest/providers/providers/Microsoft.AlertsManagement/prometheusRuleGroups/myPrometheusRuleGroup", "type": "Microsoft.AlertsManagement/prometheusRuleGroups", - "location": "global", + "location": "East US", "properties": { "description": "This is the description of the first rule group", "scopes": [ From aa6071cbb225d0b17d0838e6f928b76e23c1ac7e Mon Sep 17 00:00:00 2001 From: Gilad Suberr Date: Tue, 2 Nov 2021 14:32:34 +0200 Subject: [PATCH 26/31] Changes --- .../2021-07-22-preview/PrometheusRuleGroups.json | 1 - .../examples/createOrUpdatePrometheusRuleGroup.json | 12 ++++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json index 99f7a699d1db..1b82fc4f705c 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json @@ -351,7 +351,6 @@ "PrometheusRuleGroupProperties": { "type": "object", "required": [ - "description", "scopes", "rules" ], diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/createOrUpdatePrometheusRuleGroup.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/createOrUpdatePrometheusRuleGroup.json index be894b029049..b2b02f50d13b 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/createOrUpdatePrometheusRuleGroup.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/createOrUpdatePrometheusRuleGroup.json @@ -46,14 +46,15 @@ "200": { "headers": {}, "body": { - "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/Microsoft.AlertsManagement/prometheusRuleGroups/myPrometheusRuleGroup", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/giladstest/providers/providers/Microsoft.AlertsManagement/prometheusRuleGroups/myPrometheusRuleGroup", "type": "Microsoft.AlertsManagement/prometheusRuleGroups", - "location": "global", + "location": "East US", "properties": { "description": "This is the description of the first rule group", "scopes": [ "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/giladstest/providers/Microsoft.Observability/monitoringAcount/myMonitoringAccount" ], + "interval" : "PT5M", "rules": [ { "record": "job_type:billing_jobs_duration_seconds:99p5m", @@ -63,13 +64,16 @@ "alert": "Billing_Processing_Very_Slow", "expression": "job_type:billing_jobs_duration_seconds:99p5m > 30", "severity": 2, - "for": "5m", + "for": "PT5M", "labels": { "team": "prod" }, + "annotations": { + "annotationName1": "annotationValue1" + }, "resolveConfiguration": { "autoResolved": true, - "timeToResolve": "10m" + "timeToResolve": "PT10M" }, "actions": [ { From 8b19c47f1029c9e3d66094c2b497cf634f4ca855 Mon Sep 17 00:00:00 2001 From: Gilad Suberr Date: Tue, 2 Nov 2021 15:00:45 +0200 Subject: [PATCH 27/31] Fixed issue --- .../examples/createOrUpdatePrometheusRuleGroup.json | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/createOrUpdatePrometheusRuleGroup.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/createOrUpdatePrometheusRuleGroup.json index b2b02f50d13b..75e1b9490d9f 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/createOrUpdatePrometheusRuleGroup.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/createOrUpdatePrometheusRuleGroup.json @@ -20,13 +20,16 @@ "alert": "Billing_Processing_Very_Slow", "expression": "job_type:billing_jobs_duration_seconds:99p5m > 30", "severity": 2, - "for": "5m", + "for": "PT5M", "labels": { "team": "prod" }, + "annotations": { + "annotationName1": "annotationValue1" + }, "resolveConfiguration": { "autoResolved": true, - "timeToResolve": "10m" + "timeToResolve": "PT10M" }, "actions": [ { @@ -54,7 +57,7 @@ "scopes": [ "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/giladstest/providers/Microsoft.Observability/monitoringAcount/myMonitoringAccount" ], - "interval" : "PT5M", + "interval": "PT5M", "rules": [ { "record": "job_type:billing_jobs_duration_seconds:99p5m", From 6b044ed630b695491de9325cba422737c430f5d5 Mon Sep 17 00:00:00 2001 From: Gilad Suberr Date: Tue, 2 Nov 2021 15:11:01 +0200 Subject: [PATCH 28/31] Added operations --- .../PrometheusRuleGroups.json | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json index 1b82fc4f705c..982b1ea248e8 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json @@ -287,6 +287,35 @@ } } } + }, + "/providers/Microsoft.AlertsManagement/operations": { + "get": { + "description": "Returns list of operations for Microsoft.DeviceUpdate resource provider.", + "operationId": "Operations_List", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Operation details.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/OperationListResult" + } + }, + "default": { + "description": "Error response describing the reason for operation failure.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "deprecated": false, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } } }, "definitions": { From 88f01448b949876195e6934a4a95559e53da792b Mon Sep 17 00:00:00 2001 From: giladsu <43436811+giladsu@users.noreply.github.com> Date: Wed, 3 Nov 2021 11:41:45 +0200 Subject: [PATCH 29/31] CR fixes --- .../2021-07-22-preview/PrometheusRuleGroups.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json index 982b1ea248e8..e22d48f39763 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json @@ -52,7 +52,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/PrometheusRuleGroupsErrorResponse" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } }, @@ -94,7 +94,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/PrometheusRuleGroupsErrorResponse" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } }, @@ -139,7 +139,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/PrometheusRuleGroupsErrorResponse" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } }, @@ -188,7 +188,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/PrometheusRuleGroupsErrorResponse" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } }, @@ -237,7 +237,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/PrometheusRuleGroupsErrorResponse" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } }, @@ -277,7 +277,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/PrometheusRuleGroupsErrorResponse" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } }, @@ -419,7 +419,7 @@ "type": "object", "allOf": [ { - "$ref": "#/definitions/Resource" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/TrackedResource" } ], "required": [ @@ -495,7 +495,7 @@ "severity": { "type": "integer", "format": "int32", - "description": "the expression to run for the rule." + "description": "the severity of the alerts fired by the rule." }, "for": { "type": "string", From 931041c3ea2fbce33800467d7ae23a4e8523ddd2 Mon Sep 17 00:00:00 2001 From: giladsu <43436811+giladsu@users.noreply.github.com> Date: Mon, 8 Nov 2021 12:11:43 +0200 Subject: [PATCH 30/31] Using common parameters --- .../PrometheusRuleGroups.json | 58 ++++++------------- 1 file changed, 18 insertions(+), 40 deletions(-) diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json index e22d48f39763..d4d96eacc33f 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json @@ -36,10 +36,10 @@ "operationId": "PrometheusRuleGroups_ListBySubscription", "parameters": [ { - "$ref": "#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "#/parameters/ApiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" } ], "responses": { @@ -75,13 +75,13 @@ "operationId": "PrometheusRuleGroups_ListByResourceGroup", "parameters": [ { - "$ref": "#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" }, { - "$ref": "#/parameters/ApiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" } ], "responses": { @@ -117,16 +117,16 @@ "operationId": "PrometheusRuleGroups_Get", "parameters": [ { - "$ref": "#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RuleGroupNameParameter" }, { - "$ref": "#/parameters/ApiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" } ], "responses": { @@ -157,16 +157,16 @@ "operationId": "PrometheusRuleGroups_CreateOrUpdate", "parameters": [ { - "$ref": "#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RuleGroupNameParameter" }, { - "$ref": "#/parameters/ApiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "name": "parameters", @@ -206,16 +206,16 @@ "operationId": "PrometheusRuleGroups_Update", "parameters": [ { - "$ref": "#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RuleGroupNameParameter" }, { - "$ref": "#/parameters/ApiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "name": "parameters", @@ -255,16 +255,16 @@ "operationId": "PrometheusRuleGroups_Delete", "parameters": [ { - "$ref": "#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RuleGroupNameParameter" }, { - "$ref": "#/parameters/ApiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" } ], "responses": { @@ -294,7 +294,7 @@ "operationId": "Operations_List", "parameters": [ { - "$ref": "#/parameters/ApiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" } ], "responses": { @@ -567,28 +567,6 @@ } }, "parameters": { - "SubscriptionIdParameter": { - "name": "subscriptionId", - "in": "path", - "required": true, - "type": "string", - "description": "The Azure subscription Id." - }, - "ApiVersionParameter": { - "name": "api-version", - "in": "query", - "required": true, - "type": "string", - "description": "Client Api Version." - }, - "ResourceGroupNameParameter": { - "name": "resourceGroupName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the resource group.", - "x-ms-parameter-location": "method" - }, "RuleGroupNameParameter": { "name": "ruleGroupName", "in": "path", From bcb9c888914e9a3809ae87dd6868a8472bb6b20f Mon Sep 17 00:00:00 2001 From: giladsu <43436811+giladsu@users.noreply.github.com> Date: Wed, 10 Nov 2021 08:46:53 +0200 Subject: [PATCH 31/31] Last CR fixes --- .../PrometheusRuleGroups.json | 33 ++----------------- 1 file changed, 2 insertions(+), 31 deletions(-) diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json index d4d96eacc33f..335b022cf0a2 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json @@ -397,7 +397,7 @@ }, "interval": { "type": "string", - "description": "the interval in which to run the Prometheus rule group." + "description": "the interval in which to run the Prometheus rule group represented in ISO 8601 duration format." }, "rules": { "type": "array", @@ -405,12 +405,6 @@ "$ref": "#/definitions/PrometheusRule" }, "description": "defines the rules in the Prometheus rule group." - }, - "lastUpdatedTime": { - "readOnly": true, - "type": "string", - "format": "date-time", - "description": "Last time the rule was updated in ISO8601 format." } }, "description": "An alert rule." @@ -537,33 +531,10 @@ }, "timeToResolve": { "type": "string", - "description": "the duration a rule must evaluate as healthy before the fired alert is automatically resolved." + "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." - }, - "PrometheusRuleGroupsErrorResponse": { - "description": "Describes the format of Error response.", - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/PrometheusRuleGroupsErrorResponseBody" - } - } - }, - "PrometheusRuleGroupsErrorResponseBody": { - "description": "Describes the format of Error response.", - "type": "object", - "properties": { - "code": { - "description": "Error code", - "type": "string" - }, - "message": { - "description": "Error message indicating why the operation failed.", - "type": "string" - } - } } }, "parameters": {