Skip to content

Commit

Permalink
Created new API version for Monitor Action Groups (#16107)
Browse files Browse the repository at this point in the history
* Updated error response for Action Groups API

* spacing

* added missing fields to Action Group Resource spec

* Added missing fields for action group resource in older version

* Updated "resource" name

* Removed changes to errorResponse

* Removed errorObject

* format

* Updated required and default fields in Action groups spec

* Update default value to boolean

Co-authored-by: kai ru <69238381+kairu-ms@users.noreply.github.com>

* changes default value type to boolean

* undo webhook receiver changes

* Created new API version for action groups

* Added event hub Receiver to Action groups spec

* Updated readme.md for Monitor

* Initial checkin for Post and Get test notification apis

* Change to completed

* Fix some errors

* Fix a couple more issues

* add x-ms-long-running-operation-options

* Context fix

* Context

* Context

* Context

* revert unwanted changes since we don't own these

* update API version in actionGroups json

* update API version in action groups examples

* Fix for Swagger PrettierCheck failures

* Fix the description of the RG name para

* Remove the dupe resourcegroupname para

* Another attempt to fix the description

* PR comments

* fix json format

* Fix json

* Lets revert the resource descrilption

* Fix autorest exception and suppress Lint failures for error response schema

* Fix for prettier check

* Add providers

* Used common types for definitions and parameters

* fix lint errors for incompatible parameters

* Revert Resource definition update to resolve Lint errors

* Revert package tag to fix build break

* Update API reference in latest package

* PR comment

* fix build break because didn't remove the createdBy from the sample

* PR comments

* Fix typo

* Validation errors

* Fix errors

* Fix errors

* Fix style

* Change api name

* Fix errors

* Change the uri

* Change the api name

Co-authored-by: Ritwik Rajendra <rirajend@microsoft.com>
Co-authored-by: kai ru <69238381+kairu-ms@users.noreply.github.com>
Co-authored-by: Thomas Pham <thompham@microsoft.com>
  • Loading branch information
4 people authored Oct 15, 2021
1 parent cbce56c commit abf7b7e
Show file tree
Hide file tree
Showing 10 changed files with 2,127 additions and 2 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,374 @@
{
"parameters": {
"subscriptionId": "187f412d-1758-44d9-b052-169e2564721d",
"resourceGroupName": "Default-NotificationRules",
"actionGroupName": "SampleActionGroup",
"api-version": "2021-09-01",
"actionGroup": {
"location": "Global",
"tags": {},
"properties": {
"groupShortName": "sample",
"enabled": true,
"emailReceivers": [
{
"name": "John Doe's email",
"emailAddress": "johndoe@email.com",
"useCommonAlertSchema": false
},
{
"name": "Jane Smith's email",
"emailAddress": "janesmith@email.com",
"useCommonAlertSchema": true
}
],
"smsReceivers": [
{
"name": "John Doe's mobile",
"countryCode": "1",
"phoneNumber": "1234567890"
},
{
"name": "Jane Smith's mobile",
"countryCode": "1",
"phoneNumber": "0987654321"
}
],
"webhookReceivers": [
{
"name": "Sample webhook 1",
"serviceUri": "http://www.example.com/webhook1",
"useCommonAlertSchema": true
},
{
"name": "Sample webhook 2",
"serviceUri": "http://www.example.com/webhook2",
"useCommonAlertSchema": true,
"useAadAuth": true,
"objectId": "d3bb868c-fe44-452c-aa26-769a6538c808",
"identifierUri": "http://someidentifier/d7811ba3-7996-4a93-99b6-6b2f3f355f8a",
"tenantId": "68a4459a-ccb8-493c-b9da-dd30457d1b84"
}
],
"itsmReceivers": [
{
"name": "Sample itsm",
"workspaceId": "5def922a-3ed4-49c1-b9fd-05ec533819a3|55dfd1f8-7e59-4f89-bf56-4c82f5ace23c",
"connectionId": "a3b9076c-ce8e-434e-85b4-aff10cb3c8f1",
"ticketConfiguration": "{\"PayloadRevision\":0,\"WorkItemType\":\"Incident\",\"UseTemplate\":false,\"WorkItemData\":\"{}\",\"CreateOneWIPerCI\":false}",
"region": "westcentralus"
}
],
"azureAppPushReceivers": [
{
"name": "Sample azureAppPush",
"emailAddress": "johndoe@email.com"
}
],
"automationRunbookReceivers": [
{
"automationAccountId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/runbookTest/providers/Microsoft.Automation/automationAccounts/runbooktest",
"runbookName": "Sample runbook",
"webhookResourceId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/runbookTest/providers/Microsoft.Automation/automationAccounts/runbooktest/webhooks/Alert1510184037084",
"isGlobalRunbook": false,
"name": "testRunbook",
"serviceUri": "<serviceUri>",
"useCommonAlertSchema": true
}
],
"voiceReceivers": [
{
"name": "Sample voice",
"countryCode": "1",
"phoneNumber": "1234567890"
}
],
"logicAppReceivers": [
{
"name": "Sample logicApp",
"resourceId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/LogicApp/providers/Microsoft.Logic/workflows/testLogicApp",
"callbackUrl": "https://prod-27.northcentralus.logic.azure.com/workflows/68e572e818e5457ba898763b7db90877/triggers/manual/paths/invoke/azns/test?api-version=2016-10-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=Abpsb72UYJxPPvmDo937uzofupO5r_vIeWEx7KVHo7w",
"useCommonAlertSchema": false
}
],
"azureFunctionReceivers": [
{
"name": "Sample azureFunction",
"functionAppResourceId": "/subscriptions/5def922a-3ed4-49c1-b9fd-05ec533819a3/resourceGroups/aznsTest/providers/Microsoft.Web/sites/testFunctionApp",
"functionName": "HttpTriggerCSharp1",
"httpTriggerUrl": "http://test.me",
"useCommonAlertSchema": true
}
],
"armRoleReceivers": [
{
"name": "Sample armRole",
"roleId": "8e3af657-a8ff-443c-a75c-2fe8c4bcb635",
"useCommonAlertSchema": true
}
],
"eventHubReceivers": [
{
"name": "Sample eventHub",
"eventHubNameSpace": "testEventHubNameSpace",
"eventHubName": "testEventHub",
"subscriptionId": "187f412d-1758-44d9-b052-169e2564721d",
"tenantId": "68a4459a-ccb8-493c-b9da-dd30457d1b84"
}
]
}
}
},
"responses": {
"200": {
"headers": {},
"body": {
"id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-NotificationRules/providers/microsoft.insights/actionGroups/SampleActionGroup",
"type": "Microsoft.Insights/ActionGroups",
"name": "SampleActionGroup",
"location": "Global",
"tags": {},
"properties": {
"groupShortName": "sample",
"enabled": true,
"emailReceivers": [
{
"name": "John Doe's email",
"emailAddress": "johndoe@email.com",
"status": "Enabled",
"useCommonAlertSchema": false
},
{
"name": "Jane Smith's email",
"emailAddress": "janesmith@email.com",
"status": "Enabled",
"useCommonAlertSchema": true
}
],
"smsReceivers": [
{
"name": "John Doe's mobile",
"countryCode": "1",
"phoneNumber": "1234567890",
"status": "Enabled"
},
{
"name": "Jane Smith's mobile",
"countryCode": "1",
"phoneNumber": "0987654321",
"status": "Enabled"
}
],
"webhookReceivers": [
{
"name": "Sample webhook 1",
"serviceUri": "http://www.example.com/webhook1",
"useCommonAlertSchema": true
},
{
"name": "Sample webhook 2",
"serviceUri": "http://www.example.com/webhook2",
"useCommonAlertSchema": true,
"useAadAuth": true,
"objectId": "d3bb868c-fe44-452c-aa26-769a6538c808",
"identifierUri": "http://someidentifier/d7811ba3-7996-4a93-99b6-6b2f3f355f8a",
"tenantId": "68a4459a-ccb8-493c-b9da-dd30457d1b84"
}
],
"itsmReceivers": [
{
"name": "Sample itsm",
"workspaceId": "5def922a-3ed4-49c1-b9fd-05ec533819a3|55dfd1f8-7e59-4f89-bf56-4c82f5ace23c",
"connectionId": "a3b9076c-ce8e-434e-85b4-aff10cb3c8f1",
"ticketConfiguration": "{\"PayloadRevision\":0,\"WorkItemType\":\"Incident\",\"UseTemplate\":false,\"WorkItemData\":\"{}\",\"CreateOneWIPerCI\":false}",
"region": "westcentralus"
}
],
"azureAppPushReceivers": [
{
"name": "Sample azureAppPush",
"emailAddress": "johndoe@email.com"
}
],
"automationRunbookReceivers": [
{
"automationAccountId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/runbookTest/providers/Microsoft.Automation/automationAccounts/runbooktest",
"runbookName": "Sample runbook",
"webhookResourceId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/runbookTest/providers/Microsoft.Automation/automationAccounts/runbooktest/webhooks/Alert1510184037084",
"isGlobalRunbook": false,
"name": "testRunbook",
"serviceUri": "<serviceUri>",
"useCommonAlertSchema": true
}
],
"voiceReceivers": [
{
"name": "Sample voice",
"countryCode": "1",
"phoneNumber": "1234567890"
}
],
"logicAppReceivers": [
{
"name": "Sample logicApp",
"resourceId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/LogicApp/providers/Microsoft.Logic/workflows/testLogicApp",
"callbackUrl": "https://prod-27.northcentralus.logic.azure.com/workflows/68e572e818e5457ba898763b7db90877/triggers/manual/paths/invoke/azns/test?api-version=2016-10-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=Abpsb72UYJxPPvmDo937uzofupO5r_vIeWEx7KVHo7w",
"useCommonAlertSchema": false
}
],
"azureFunctionReceivers": [
{
"name": "Sample azureFunction",
"functionAppResourceId": "/subscriptions/5def922a-3ed4-49c1-b9fd-05ec533819a3/resourceGroups/aznsTest/providers/Microsoft.Web/sites/testFunctionApp",
"functionName": "HttpTriggerCSharp1",
"httpTriggerUrl": "<httpTriggerUrl>",
"useCommonAlertSchema": true
}
],
"armRoleReceivers": [
{
"name": "Sample armRole",
"roleId": "8e3af657-a8ff-443c-a75c-2fe8c4bcb635",
"useCommonAlertSchema": true
}
],
"eventHubReceivers": [
{
"name": "Sample eventHub",
"eventHubNameSpace": "testEventHubNameSpace",
"eventHubName": "testEventHub",
"subscriptionId": "187f412d-1758-44d9-b052-169e2564721d",
"tenantId": "68a4459a-ccb8-493c-b9da-dd30457d1b84",
"useCommonAlertSchema": false
}
]
}
}
},
"201": {
"headers": {},
"body": {
"id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-NotificationRules/providers/microsoft.insights/actionGroups/SampleActionGroup",
"type": "Microsoft.Insights/ActionGroups",
"name": "SampleActionGroup",
"location": "Global",
"tags": {},
"properties": {
"groupShortName": "sample",
"enabled": true,
"emailReceivers": [
{
"name": "John Doe's email",
"emailAddress": "johndoe@email.com",
"status": "Enabled",
"useCommonAlertSchema": false
},
{
"name": "Jane Smith's email",
"emailAddress": "janesmith@email.com",
"status": "Enabled",
"useCommonAlertSchema": true
}
],
"smsReceivers": [
{
"name": "John Doe's mobile",
"countryCode": "1",
"phoneNumber": "1234567890",
"status": "Enabled"
},
{
"name": "Jane Smith's mobile",
"countryCode": "1",
"phoneNumber": "0987654321",
"status": "Enabled"
}
],
"webhookReceivers": [
{
"name": "Sample webhook 1",
"serviceUri": "http://www.example.com/webhook1",
"useCommonAlertSchema": true
},
{
"name": "Sample webhook 2",
"serviceUri": "http://www.example.com/webhook2",
"useCommonAlertSchema": true,
"useAadAuth": true,
"objectId": "d3bb868c-fe44-452c-aa26-769a6538c808",
"identifierUri": "http://someidentifier/d7811ba3-7996-4a93-99b6-6b2f3f355f8a",
"tenantId": "68a4459a-ccb8-493c-b9da-dd30457d1b84"
}
],
"itsmReceivers": [
{
"name": "Sample itsm",
"workspaceId": "5def922a-3ed4-49c1-b9fd-05ec533819a3|55dfd1f8-7e59-4f89-bf56-4c82f5ace23c",
"connectionId": "a3b9076c-ce8e-434e-85b4-aff10cb3c8f1",
"ticketConfiguration": "{\"PayloadRevision\":0,\"WorkItemType\":\"Incident\",\"UseTemplate\":false,\"WorkItemData\":\"{}\",\"CreateOneWIPerCI\":false}",
"region": "westcentralus"
}
],
"azureAppPushReceivers": [
{
"name": "Sample azureAppPush",
"emailAddress": "johndoe@email.com"
}
],
"automationRunbookReceivers": [
{
"automationAccountId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/runbookTest/providers/Microsoft.Automation/automationAccounts/runbooktest",
"runbookName": "Sample runbook",
"webhookResourceId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/runbookTest/providers/Microsoft.Automation/automationAccounts/runbooktest/webhooks/Alert1510184037084",
"isGlobalRunbook": false,
"name": "testRunbook",
"serviceUri": "<serviceUri>",
"useCommonAlertSchema": true
}
],
"voiceReceivers": [
{
"name": "Sample voice",
"countryCode": "1",
"phoneNumber": "1234567890"
}
],
"logicAppReceivers": [
{
"name": "Sample logicApp",
"resourceId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/LogicApp/providers/Microsoft.Logic/workflows/testLogicApp",
"callbackUrl": "https://prod-27.northcentralus.logic.azure.com/workflows/68e572e818e5457ba898763b7db90877/triggers/manual/paths/invoke/azns/test?api-version=2016-10-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=Abpsb72UYJxPPvmDo937uzofupO5r_vIeWEx7KVHo7w",
"useCommonAlertSchema": false
}
],
"azureFunctionReceivers": [
{
"name": "Sample azureFunction",
"functionAppResourceId": "/subscriptions/5def922a-3ed4-49c1-b9fd-05ec533819a3/resourceGroups/aznsTest/providers/Microsoft.Web/sites/testFunctionApp",
"functionName": "HttpTriggerCSharp1",
"httpTriggerUrl": "<httpTriggerUrl>",
"useCommonAlertSchema": true
}
],
"armRoleReceivers": [
{
"name": "Sample armRole",
"roleId": "8e3af657-a8ff-443c-a75c-2fe8c4bcb635",
"useCommonAlertSchema": true
}
],
"eventHubReceivers": [
{
"name": "Sample eventHub",
"eventHubNameSpace": "testEventHubNameSpace",
"eventHubName": "testEventHub",
"subscriptionId": "187f412d-1758-44d9-b052-169e2564721d",
"tenantId": "68a4459a-ccb8-493c-b9da-dd30457d1b84",
"useCommonAlertSchema": false
}
]
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"parameters": {
"subscriptionId": "187f412d-1758-44d9-b052-169e2564721d",
"resourceGroupName": "Default-NotificationRules",
"actionGroupName": "SampleActionGroup",
"api-version": "2021-09-01"
},
"responses": {
"200": {},
"204": {}
}
}
Loading

0 comments on commit abf7b7e

Please sign in to comment.