-
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.
Adding API for notification rules in loadtesting (#31078)
* Adding API for notification rules in loadtesting * Update description * Moving to new API version 2024-11-01-preview * Updates * Remove wrong files * Update example to dict * Update as per review * Update key in example * Add new trigger scope * Add test run started/ended to trigger scope * Change event name to trigger completed * Update name * Remove triggers scope * Update spec * Move notifications to 2024-12-01-preview * Update api version in examples * Update doc
- Loading branch information
1 parent
3890d97
commit 45374f4
Showing
11 changed files
with
1,351 additions
and
0 deletions.
There are no files selected for viewing
126 changes: 126 additions & 0 deletions
126
...stservice/LoadTestService/examples/2024-12-01-preview/CreateOrUpdateNotificationRule.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,126 @@ | ||
{ | ||
"operationId": "NotificationRuleAdministration_CreateOrUpdateNotificationRule", | ||
"title": "Create or update a notification rule for tests.", | ||
"parameters": { | ||
"api-version": "2024-12-01-preview", | ||
"notificationRuleId": "12345678-1234-1234-1234-123456789012", | ||
"body": { | ||
"displayName": "Sample_Notification_Rule", | ||
"actionGroupIds": [ | ||
"/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/sampleRG/providers/microsoft.insights/actionGroups/sampleActionGroup" | ||
], | ||
"scope": "Tests", | ||
"testIds": [ | ||
"12345678-1234-1234-1234-123456789012" | ||
], | ||
"eventFilters": { | ||
"eventfilter1": { | ||
"kind": "TestRunEnded", | ||
"condition": { | ||
"testRunStatuses": [ | ||
"FAILED", | ||
"DONE" | ||
], | ||
"testRunResults": [ | ||
"PASSED", | ||
"FAILED" | ||
] | ||
} | ||
}, | ||
"eventfilter2": { | ||
"kind": "TestRunStarted" | ||
}, | ||
"eventfilter3": { | ||
"kind": "TriggerCompleted" | ||
}, | ||
"eventfilter4": { | ||
"kind": "TriggerDisabled" | ||
} | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"notificationRuleId": "12345678-1234-1234-1234-123456789012", | ||
"displayName": "Sample_Notification_Rule", | ||
"actionGroupIds": [ | ||
"/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/sampleRG/providers/microsoft.insights/actionGroups/sampleActionGroup" | ||
], | ||
"scope": "Tests", | ||
"testIds": [ | ||
"12345678-1234-1234-1234-123456789012" | ||
], | ||
"eventFilters": { | ||
"eventfilter1": { | ||
"kind": "TestRunEnded", | ||
"condition": { | ||
"testRunStatuses": [ | ||
"FAILED", | ||
"DONE" | ||
], | ||
"testRunResults": [ | ||
"PASSED", | ||
"FAILED" | ||
] | ||
} | ||
}, | ||
"eventfilter2": { | ||
"kind": "TestRunStarted" | ||
}, | ||
"eventfilter3": { | ||
"kind": "TriggerCompleted" | ||
}, | ||
"eventfilter4": { | ||
"kind": "TriggerDisabled" | ||
} | ||
}, | ||
"createdDateTime": "2024-05-01T16:43:46.072Z", | ||
"createdBy": "[email protected]", | ||
"lastModifiedDateTime": "2024-05-01T16:43:46.072Z", | ||
"lastModifiedBy": "[email protected]" | ||
} | ||
}, | ||
"201": { | ||
"body": { | ||
"notificationRuleId": "12345678-1234-1234-1234-123456789012", | ||
"displayName": "Sample_Notification_Rule", | ||
"actionGroupIds": [ | ||
"/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/sampleRG/providers/microsoft.insights/actionGroups/sampleActionGroup" | ||
], | ||
"scope": "Tests", | ||
"testIds": [ | ||
"12345678-1234-1234-1234-123456789012" | ||
], | ||
"eventFilters": { | ||
"eventfilter1": { | ||
"kind": "TestRunEnded", | ||
"condition": { | ||
"testRunStatuses": [ | ||
"FAILED", | ||
"DONE" | ||
], | ||
"testRunResults": [ | ||
"PASSED", | ||
"FAILED" | ||
] | ||
} | ||
}, | ||
"eventfilter2": { | ||
"kind": "TestRunStarted" | ||
}, | ||
"eventfilter3": { | ||
"kind": "TriggerCompleted" | ||
}, | ||
"eventfilter4": { | ||
"kind": "TriggerDisabled" | ||
} | ||
}, | ||
"createdDateTime": "2024-05-01T16:43:46.072Z", | ||
"createdBy": "[email protected]", | ||
"lastModifiedDateTime": "2024-05-01T16:43:46.072Z", | ||
"lastModifiedBy": "[email protected]" | ||
} | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
...n/loadtestservice/LoadTestService/examples/2024-12-01-preview/DeleteNotificationRule.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,11 @@ | ||
{ | ||
"operationId": "NotificationRuleAdministration_DeleteNotificationRule", | ||
"title": "Delete a notification rule", | ||
"parameters": { | ||
"api-version": "2024-12-01-preview", | ||
"notificationRuleId": "12345678-1234-1234-1234-123456789012" | ||
}, | ||
"responses": { | ||
"204": {} | ||
} | ||
} |
51 changes: 51 additions & 0 deletions
51
...tion/loadtestservice/LoadTestService/examples/2024-12-01-preview/GetNotificationRule.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,51 @@ | ||
{ | ||
"operationId": "NotificationRuleAdministration_GetNotificationRule", | ||
"title": "Get a notification rule.", | ||
"parameters": { | ||
"api-version": "2024-12-01-preview", | ||
"notificationRuleId": "12345678-1234-1234-1234-123456789012" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"notificationRuleId": "12345678-1234-1234-1234-123456789012", | ||
"displayName": "Sample_Notification_Rule", | ||
"actionGroupIds": [ | ||
"/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/sampleRG/providers/microsoft.insights/actionGroups/sampleActionGroup" | ||
], | ||
"scope": "Tests", | ||
"testIds": [ | ||
"12345678-1234-1234-1234-123456789012" | ||
], | ||
"eventFilters": { | ||
"eventfilter1": { | ||
"kind": "TestRunEnded", | ||
"condition": { | ||
"testRunStatuses": [ | ||
"FAILED", | ||
"DONE" | ||
], | ||
"testRunResults": [ | ||
"PASSED", | ||
"FAILED" | ||
] | ||
} | ||
}, | ||
"eventfilter2": { | ||
"kind": "TestRunStarted" | ||
}, | ||
"eventfilter3": { | ||
"kind": "TriggerCompleted" | ||
}, | ||
"eventfilter4": { | ||
"kind": "TriggerDisabled" | ||
} | ||
}, | ||
"createdDateTime": "2024-05-01T16:43:46.072Z", | ||
"createdBy": "[email protected]", | ||
"lastModifiedDateTime": "2024-05-01T16:43:46.072Z", | ||
"lastModifiedBy": "[email protected]" | ||
} | ||
} | ||
} | ||
} |
87 changes: 87 additions & 0 deletions
87
...on/loadtestservice/LoadTestService/examples/2024-12-01-preview/ListNotificationRules.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,87 @@ | ||
{ | ||
"operationId": "NotificationRuleAdministration_ListNotificationRule", | ||
"title": "Get all notification rules for the specified filters.", | ||
"parameters": { | ||
"maxPageSize": 30, | ||
"lastModifiedStartTime": "2024-05-01T16:00:46.072Z", | ||
"lastModifiedEndTime": "2024-05-01T16:50:46.072Z", | ||
"api-version": "2024-12-01-preview" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"value": [ | ||
{ | ||
"notificationRuleId": "12345678-1234-1234-1234-123456789012", | ||
"displayName": "Sample_Notification_Rule1", | ||
"actionGroupIds": [ | ||
"/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/sampleRG/providers/microsoft.insights/actionGroups/sampleActionGroup1", | ||
"/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/sampleRG/providers/microsoft.insights/actionGroups/sampleActionGroup2" | ||
], | ||
"scope": "Tests", | ||
"testIds": [ | ||
"12345678-1234-1234-1234-123456789012", | ||
"12345678-1234-1234-1234-123456789013" | ||
], | ||
"eventFilters": { | ||
"eventfilter1": { | ||
"kind": "TestRunEnded", | ||
"condition": { | ||
"testRunStatuses": [ | ||
"FAILED", | ||
"DONE" | ||
], | ||
"testRunResults": [ | ||
"PASSED", | ||
"FAILED" | ||
] | ||
} | ||
}, | ||
"eventfilter2": { | ||
"kind": "TestRunStarted" | ||
}, | ||
"eventfilter3": { | ||
"kind": "TriggerCompleted" | ||
}, | ||
"eventfilter4": { | ||
"kind": "TriggerDisabled" | ||
} | ||
}, | ||
"createdDateTime": "2024-05-01T16:43:46.072Z", | ||
"createdBy": "[email protected]", | ||
"lastModifiedDateTime": "2024-05-01T16:43:46.072Z", | ||
"lastModifiedBy": "[email protected]" | ||
}, | ||
{ | ||
"notificationRuleId": "12345678-1234-1234-1234-123456789013", | ||
"displayName": "Sample_Notification_Rule2", | ||
"actionGroupIds": [ | ||
"/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/sampleRG/providers/microsoft.insights/actionGroups/sampleActionGroup2" | ||
], | ||
"scope": "Tests", | ||
"testIds": [ | ||
"12345678-1234-1234-1234-123456789012" | ||
], | ||
"eventFilters": { | ||
"eventfilter1": { | ||
"kind": "TestRunEnded", | ||
"condition": { | ||
"testRunStatuses": [ | ||
"FAILED" | ||
], | ||
"testRunResults": [ | ||
"FAILED" | ||
] | ||
} | ||
} | ||
}, | ||
"createdDateTime": "2024-05-01T16:43:46.072Z", | ||
"createdBy": "[email protected]", | ||
"lastModifiedDateTime": "2024-05-01T16:43:46.072Z", | ||
"lastModifiedBy": "[email protected]" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.