forked from Azure/azure-rest-api-specs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Hub Generated] Public private branch 'dev-alertsmanagement-Microsoft…
….AlertsManagement-2021-02-01-preview' (Azure#15899) * Adds base for updating Microsoft.AlertsManagement from version preview/2019-05-05-preview to version 2021-02-01-preview * Updates readme * Updates API version in new specs and examples * update action rule schema to new api * fix linter issues * add alertsmanagement.json * fix api version * fix description in targetResource * match description * match severity description * use systemdata type * run prettier-fix * change alertsmanagement to latest version * add integer format * add x-ms-discriminator-value * remove summary * make action polymorphic * update readme * prettier fix * remove space * add examples * prettier fix * fix validation errors * fix validation errors * change file name * update monitor service names * fix PR comments * fix description * change actions to array * fix prettify issue * fix lintDiff errors * rename schedulingConfig to schedule * fix response codes for put and delete * fix prettier * remove query params * add enabled default value * rename api version and add severity to conditions * fix condition enum and remove Z from time in examples * update conditions, schedule pattern and descriptions
- Loading branch information
1 parent
a18974f
commit 55fa02d
Showing
14 changed files
with
2,134 additions
and
0 deletions.
There are no files selected for viewing
821 changes: 821 additions & 0 deletions
821
...t/resource-manager/Microsoft.AlertsManagement/preview/2021-08-08-preview/ActionRules.json
Large diffs are not rendered by default.
Oops, something went wrong.
117 changes: 117 additions & 0 deletions
117
...ource-manager/Microsoft.AlertsManagement/preview/2021-08-08-preview/AlertsManagement.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"version": "2021-08-08-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." | ||
} | ||
} | ||
} |
93 changes: 93 additions & 0 deletions
93
...ew/examples/ActionRules_Create_or_update_add_action_group_all_alerts_in_subscription.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2021-08-08-preview", | ||
"subscriptionId": "subId1", | ||
"resourceGroupName": "alertscorrelationrg", | ||
"actionRuleName": "AddActionGroupToSubscription", | ||
"actionRule": { | ||
"location": "Global", | ||
"tags": {}, | ||
"properties": { | ||
"scopes": [ | ||
"/subscriptions/subId1" | ||
], | ||
"actions": [ | ||
{ | ||
"actionType": "AddActionGroups", | ||
"actionGroupIds": [ | ||
"/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/ActionGroup1" | ||
] | ||
} | ||
], | ||
"description": "Add ActionGroup1 to all alerts in the subscription", | ||
"enabled": true | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"systemData": { | ||
"createdBy": "[email protected]", | ||
"createdByType": "User", | ||
"createdAt": "2021-02-12T22:05:09Z", | ||
"lastModifiedBy": "[email protected]", | ||
"lastModifiedByType": "User", | ||
"lastModifiedAt": "2021-02-13T16:15:34Z" | ||
}, | ||
"properties": { | ||
"scopes": [ | ||
"/subscriptions/subId1" | ||
], | ||
"actions": [ | ||
{ | ||
"actionType": "AddActionGroups", | ||
"actionGroupIds": [ | ||
"/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/ActionGroup1" | ||
] | ||
} | ||
], | ||
"description": "Add ActionGroup1 to all alerts in the subscription", | ||
"enabled": true | ||
}, | ||
"id": "/subscriptions/subId1/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/AddActionGroupToSubscription", | ||
"type": "Microsoft.AlertsManagement/actionRules", | ||
"name": "AddActionGroupToSubscription", | ||
"location": "Global", | ||
"tags": {} | ||
} | ||
}, | ||
"201": { | ||
"body": { | ||
"systemData": { | ||
"createdBy": "[email protected]", | ||
"createdByType": "User", | ||
"createdAt": "2021-02-12T22:05:09Z", | ||
"lastModifiedBy": "[email protected]", | ||
"lastModifiedByType": "User", | ||
"lastModifiedAt": "2021-02-13T16:15:34Z" | ||
}, | ||
"properties": { | ||
"scopes": [ | ||
"/subscriptions/subId1" | ||
], | ||
"actions": [ | ||
{ | ||
"actionType": "AddActionGroups", | ||
"actionGroupIds": [ | ||
"/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/ActionGroup1" | ||
] | ||
} | ||
], | ||
"description": "Add ActionGroup1 to all alerts in the subscription", | ||
"enabled": true | ||
}, | ||
"id": "/subscriptions/subId1/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/AddActionGroupToSubscription", | ||
"type": "Microsoft.AlertsManagement/actionRules", | ||
"name": "AddActionGroupToSubscription", | ||
"location": "Global", | ||
"tags": {} | ||
} | ||
} | ||
} | ||
} |
129 changes: 129 additions & 0 deletions
129
...ActionRules_Create_or_update_add_two_action_groups_all_Sev0_Sev1_two_resource_groups.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2021-08-08-preview", | ||
"subscriptionId": "subId1", | ||
"resourceGroupName": "alertscorrelationrg", | ||
"actionRuleName": "AddActionGroupsBySeverity", | ||
"actionRule": { | ||
"location": "Global", | ||
"tags": {}, | ||
"properties": { | ||
"scopes": [ | ||
"/subscriptions/subId1/resourceGroups/RGId1", | ||
"/subscriptions/subId1/resourceGroups/RGId2" | ||
], | ||
"conditions": [ | ||
{ | ||
"field": "Severity", | ||
"operator": "Equals", | ||
"values": [ | ||
"sev0", | ||
"sev1" | ||
] | ||
} | ||
], | ||
"actions": [ | ||
{ | ||
"actionType": "AddActionGroups", | ||
"actionGroupIds": [ | ||
"/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/AGId1", | ||
"/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/AGId2" | ||
] | ||
} | ||
], | ||
"description": "Add AGId1 and AGId2 to all Sev0 and Sev1 alerts in these resourceGroups", | ||
"enabled": true | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"systemData": { | ||
"createdBy": "[email protected]", | ||
"createdByType": "User", | ||
"createdAt": "2018-06-12T22:05:09Z", | ||
"lastModifiedBy": "[email protected]", | ||
"lastModifiedByType": "User", | ||
"lastModifiedAt": "2018-06-13T22:05:09Z" | ||
}, | ||
"properties": { | ||
"scopes": [ | ||
"/subscriptions/subId1/resourceGroups/RGId1", | ||
"/subscriptions/subId1/resourceGroups/RGId2" | ||
], | ||
"conditions": [ | ||
{ | ||
"field": "Severity", | ||
"operator": "Equals", | ||
"values": [ | ||
"sev0", | ||
"sev1" | ||
] | ||
} | ||
], | ||
"actions": [ | ||
{ | ||
"actionType": "AddActionGroups", | ||
"actionGroupIds": [ | ||
"/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/AGId1", | ||
"/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/AGId2" | ||
] | ||
} | ||
], | ||
"description": "Add AGId1 and AGId2 to all Sev0 and Sev1 alerts in these resourceGroups", | ||
"enabled": true | ||
}, | ||
"id": "/subscriptions/subId1/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/AddActionGroupsBySeverity", | ||
"type": "Microsoft.AlertsManagement/actionRules", | ||
"name": "AddActionGroupsBySeverity", | ||
"location": "Global", | ||
"tags": {} | ||
} | ||
}, | ||
"201": { | ||
"body": { | ||
"systemData": { | ||
"createdBy": "[email protected]", | ||
"createdByType": "User", | ||
"createdAt": "2018-06-12T22:05:09Z", | ||
"lastModifiedBy": "[email protected]", | ||
"lastModifiedByType": "User", | ||
"lastModifiedAt": "2018-06-13T22:05:09Z" | ||
}, | ||
"properties": { | ||
"scopes": [ | ||
"/subscriptions/subId1/resourceGroups/RGId1", | ||
"/subscriptions/subId1/resourceGroups/RGId2" | ||
], | ||
"conditions": [ | ||
{ | ||
"field": "Severity", | ||
"operator": "Equals", | ||
"values": [ | ||
"sev0", | ||
"sev1" | ||
] | ||
} | ||
], | ||
"actions": [ | ||
{ | ||
"actionType": "AddActionGroups", | ||
"actionGroupIds": [ | ||
"/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/AGId1", | ||
"/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/AGId2" | ||
] | ||
} | ||
], | ||
"description": "Add AGId1 and AGId2 to all Sev0 and Sev1 alerts in these resourceGroups", | ||
"enabled": true | ||
}, | ||
"id": "/subscriptions/subId1/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/AddActionGroupsBySeverity", | ||
"type": "Microsoft.AlertsManagement/actionRules", | ||
"name": "AddActionGroupsBySeverity", | ||
"location": "Global", | ||
"tags": {} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.