-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new test notification APIs for Tenant Action Groups (#23714)
* Initial changes/baseline * New changes for 2023-05-01-preview * Make the new api default * Fix build * Add regex name validation * name validation * Regex * Change type. * Fix typo * Change to v2 --------- Co-authored-by: Thomas Pham <[email protected]>
- Loading branch information
1 parent
18b397a
commit 9f1fc4e
Showing
9 changed files
with
1,530 additions
and
1 deletion.
There are no files selected for viewing
201 changes: 201 additions & 0 deletions
201
...crosoft.Insights/preview/2023-05-01-preview/examples/createOrUpdateTenantActionGroup.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,201 @@ | ||
{ | ||
"parameters": { | ||
"managementGroupId": "72f988bf-86f1-41af-91ab-2d7cd011db47", | ||
"tenantActionGroupName": "testTenantActionGroup", | ||
"api-version": "2023-05-01-preview", | ||
"x-ms-client-tenant-id": "72f988bf-86f1-41af-91ab-2d7cd011db47", | ||
"actionGroup": { | ||
"location": "Global", | ||
"tags": {}, | ||
"properties": { | ||
"groupShortName": "sample", | ||
"enabled": true, | ||
"emailReceivers": [ | ||
{ | ||
"name": "John Doe's email", | ||
"emailAddress": "[email protected]", | ||
"useCommonAlertSchema": false | ||
}, | ||
{ | ||
"name": "Jane Smith's email", | ||
"emailAddress": "[email protected]", | ||
"useCommonAlertSchema": true | ||
} | ||
], | ||
"smsReceivers": [ | ||
{ | ||
"name": "John Doe's mobile", | ||
"countryCode": "1", | ||
"phoneNumber": "2062022299" | ||
}, | ||
{ | ||
"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" | ||
} | ||
], | ||
"azureAppPushReceivers": [ | ||
{ | ||
"name": "Sample azureAppPush", | ||
"emailAddress": "[email protected]" | ||
} | ||
], | ||
"voiceReceivers": [ | ||
{ | ||
"name": "Sample voice", | ||
"countryCode": "1", | ||
"phoneNumber": "2062022299" | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"headers": {}, | ||
"body": { | ||
"id": "/providers/Microsoft.Management/managementGroups/72f988bf-86f1-41af-91ab-2d7cd011db47/providers/Microsoft.Insights/tenantActionGroups/testTenantActionGroup", | ||
"type": "Microsoft.Insights/TenantActionGroups", | ||
"name": "testTenantActionGroup", | ||
"location": "Global", | ||
"tags": {}, | ||
"properties": { | ||
"groupShortName": "sample", | ||
"enabled": true, | ||
"emailReceivers": [ | ||
{ | ||
"name": "John Doe's email", | ||
"emailAddress": "[email protected]", | ||
"status": "Enabled", | ||
"useCommonAlertSchema": false | ||
}, | ||
{ | ||
"name": "Jane Smith's email", | ||
"emailAddress": "[email protected]", | ||
"status": "Enabled", | ||
"useCommonAlertSchema": true | ||
} | ||
], | ||
"smsReceivers": [ | ||
{ | ||
"name": "John Doe's mobile", | ||
"countryCode": "1", | ||
"phoneNumber": "2062022299", | ||
"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" | ||
} | ||
], | ||
"voiceReceivers": [ | ||
{ | ||
"name": "Sample voice", | ||
"countryCode": "1", | ||
"phoneNumber": "2062022299" | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"201": { | ||
"headers": {}, | ||
"body": { | ||
"id": "/providers/Microsoft.Management/managementGroups/72f988bf-86f1-41af-91ab-2d7cd011db47/providers/Microsoft.Insights/tenantActionGroups/testTenantActionGroup", | ||
"type": "Microsoft.Insights/TenantActionGroups", | ||
"name": "testTenantActionGroup", | ||
"location": "Global", | ||
"tags": {}, | ||
"properties": { | ||
"groupShortName": "sample", | ||
"enabled": true, | ||
"emailReceivers": [ | ||
{ | ||
"name": "John Doe's email", | ||
"emailAddress": "[email protected]", | ||
"status": "Enabled", | ||
"useCommonAlertSchema": false | ||
}, | ||
{ | ||
"name": "Jane Smith's email", | ||
"emailAddress": "[email protected]", | ||
"status": "Enabled", | ||
"useCommonAlertSchema": true | ||
} | ||
], | ||
"smsReceivers": [ | ||
{ | ||
"name": "John Doe's mobile", | ||
"countryCode": "1", | ||
"phoneNumber": "2062022299", | ||
"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" | ||
} | ||
], | ||
"voiceReceivers": [ | ||
{ | ||
"name": "Sample voice", | ||
"countryCode": "1", | ||
"phoneNumber": "2062022299" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
...nager/Microsoft.Insights/preview/2023-05-01-preview/examples/deleteTenantActionGroup.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,12 @@ | ||
{ | ||
"parameters": { | ||
"managementGroupId": "72f988bf-86f1-41af-91ab-2d7cd011db47", | ||
"tenantActionGroupName": "testTenantActionGroup", | ||
"api-version": "2023-05-01-preview", | ||
"x-ms-client-tenant-id": "72f988bf-86f1-41af-91ab-2d7cd011db47" | ||
}, | ||
"responses": { | ||
"200": {}, | ||
"204": {} | ||
} | ||
} |
75 changes: 75 additions & 0 deletions
75
...-manager/Microsoft.Insights/preview/2023-05-01-preview/examples/getTenantActionGroup.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,75 @@ | ||
{ | ||
"parameters": { | ||
"managementGroupId": "72f988bf-86f1-41af-91ab-2d7cd011db47", | ||
"tenantActionGroupName": "testTenantActionGroup", | ||
"api-version": "2023-05-01-preview", | ||
"x-ms-client-tenant-id": "72f988bf-86f1-41af-91ab-2d7cd011db47" | ||
}, | ||
"responses": { | ||
"200": { | ||
"headers": {}, | ||
"body": { | ||
"id": "/providers/Microsoft.Management/managementGroups/72f988bf-86f1-41af-91ab-2d7cd011db47/providers/Microsoft.Insights/tenantActionGroups/testTenantActionGroup", | ||
"type": "Microsoft.Insights/TenantActionGroups", | ||
"name": "testTenantActionGroup", | ||
"location": "Global", | ||
"tags": {}, | ||
"properties": { | ||
"groupShortName": "sample", | ||
"enabled": true, | ||
"emailReceivers": [ | ||
{ | ||
"name": "John Doe's email", | ||
"emailAddress": "[email protected]", | ||
"status": "Enabled", | ||
"useCommonAlertSchema": false | ||
}, | ||
{ | ||
"name": "Jane Smith's email", | ||
"emailAddress": "[email protected]", | ||
"status": "Enabled", | ||
"useCommonAlertSchema": true | ||
} | ||
], | ||
"smsReceivers": [ | ||
{ | ||
"name": "John Doe's mobile", | ||
"countryCode": "1", | ||
"phoneNumber": "2062022299", | ||
"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" | ||
} | ||
], | ||
"voiceReceivers": [ | ||
{ | ||
"name": "Sample voice", | ||
"countryCode": "1", | ||
"phoneNumber": "2062022299" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} |
73 changes: 73 additions & 0 deletions
73
...iew/2023-05-01-preview/examples/getTestNotificationsAtTenantActionGroupResourceLevel.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,73 @@ | ||
{ | ||
"parameters": { | ||
"managementGroupId": "11111111-1111-1111-1111-111111111111", | ||
"tenantActionGroupName": "testTenantActionGroup", | ||
"x-ms-client-tenant-id": "72f988bf-86f1-41af-91ab-2d7cd011db47", | ||
"notificationId": "11000222191287", | ||
"api-version": "2023-05-01-preview" | ||
}, | ||
"responses": { | ||
"200": { | ||
"headers": {}, | ||
"body": { | ||
"context": { | ||
"notificationSource": "Microsoft.Insights/TestNotification", | ||
"contextType": "Microsoft.Insights/ServiceHealth" | ||
}, | ||
"state": "Completed", | ||
"completedTime": "0001-01-01T00:00:00+00:00", | ||
"createdTime": "2021-09-21T04:52:29.5091168+00:00", | ||
"actionDetails": [ | ||
{ | ||
"mechanismType": "AzureAppPush", | ||
"name": "AzureAppPush-name", | ||
"status": "Completed", | ||
"subState": "Default", | ||
"sendTime": "2021-09-21T04:52:42.8620629+00:00", | ||
"message": null | ||
}, | ||
{ | ||
"mechanismType": "Email", | ||
"name": "Email-name", | ||
"status": "Completed", | ||
"subState": "Default", | ||
"sendTime": "2021-09-21T04:52:40.7480368+00:00", | ||
"message": null | ||
}, | ||
{ | ||
"mechanismType": "Webhook", | ||
"name": "Webhook-name", | ||
"status": "Completed", | ||
"subState": "Default", | ||
"sendTime": "2021-09-21T04:52:42.0723479+00:00", | ||
"message": null | ||
}, | ||
{ | ||
"mechanismType": "SecureWebhook", | ||
"name": "SecureWebhook-name", | ||
"status": "Completed", | ||
"subState": "Default", | ||
"sendTime": "2021-09-21T04:52:42.0723479+00:00", | ||
"message": null | ||
}, | ||
{ | ||
"mechanismType": "Sms", | ||
"name": "Sms-name", | ||
"status": "Completed", | ||
"subState": "Default", | ||
"sendTime": "2021-09-21T04:52:41.353015+00:00", | ||
"message": null | ||
}, | ||
{ | ||
"mechanismType": "Voice", | ||
"name": "Voice-name", | ||
"status": "Completed", | ||
"subState": "Default", | ||
"sendTime": "2021-09-21T04:52:41.6330734+00:00", | ||
"message": null | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.