notification_rules
Creates, updates, deletes, gets or lists a notification_rules resource.
Overview
| Name | notification_rules |
| Type | Resource |
| Id | azure.developer_loadtesting.notification_rules |
Fields
The following fields are returned by SELECT queries:
- get_notification_rule
- list_notification_rules
| Name | Datatype | Description |
|---|---|---|
actionGroupIds | array | The action groups to notify. Required. |
createdBy | string | The user that created. |
createdDateTime | string (date-time) | The creation datetime(RFC 3339 literal format). |
displayName | string | The name of the notification rule. Required. |
lastModifiedBy | string | The user that last modified. |
lastModifiedDateTime | string (date-time) | The last Modified datetime(RFC 3339 literal format). |
notificationRuleId | string | The unique identifier of the notification rule. Required. |
scope | string | The scope of the notification rule. Required. "Tests" |
| Name | Datatype | Description |
|---|---|---|
actionGroupIds | array | The action groups to notify. Required. |
createdBy | string | The user that created. |
createdDateTime | string (date-time) | The creation datetime(RFC 3339 literal format). |
displayName | string | The name of the notification rule. Required. |
lastModifiedBy | string | The user that last modified. |
lastModifiedDateTime | string (date-time) | The last Modified datetime(RFC 3339 literal format). |
notificationRuleId | string | The unique identifier of the notification rule. Required. |
scope | string | The scope of the notification rule. Required. "Tests" |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_notification_rule | select | notification_rule_id, endpoint | Resource read operation template. | |
list_notification_rules | select | endpoint | testIds, scopes, lastModifiedStartTime, lastModifiedEndTime, maxpagesize | Resource list operation template. |
create_or_update_notification_rule | insert | notification_rule_id, endpoint, displayName, actionGroupIds, scope | Create or update operation template. | |
create_or_update_notification_rule | replace | notification_rule_id, endpoint, displayName, actionGroupIds, scope | Create or update operation template. | |
delete_notification_rule | delete | notification_rule_id, endpoint | Resource delete operation template. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
endpoint | string | The service endpoint host (no scheme), e.g. myaccount.table.cosmos.azure.com:443 - value of the client endpoint parameter. (default: ) |
notification_rule_id | string | The unique identifier of the notification rule. Required. |
lastModifiedEndTime | string (date-time) | End DateTime(RFC 3339 literal format) of the last updated time range to filter notification rules. Default value is None. |
lastModifiedStartTime | string (date-time) | Start DateTime(RFC 3339 literal format) of the last updated time range to filter notification rules. Default value is None. |
maxpagesize | integer | |
scopes | string | Search based on notification rules for the provided scopes. Default value is None. |
testIds | string | Search based on notification rules associated with the provided test ids. Default value is None. |
SELECT examples
- get_notification_rule
- list_notification_rules
Resource read operation template.
SELECT
actionGroupIds,
createdBy,
createdDateTime,
displayName,
lastModifiedBy,
lastModifiedDateTime,
notificationRuleId,
scope
FROM azure.developer_loadtesting.notification_rules
WHERE notification_rule_id = '{{ notification_rule_id }}' -- required
AND endpoint = '{{ endpoint }}' -- required
;
Resource list operation template.
SELECT
actionGroupIds,
createdBy,
createdDateTime,
displayName,
lastModifiedBy,
lastModifiedDateTime,
notificationRuleId,
scope
FROM azure.developer_loadtesting.notification_rules
WHERE endpoint = '{{ endpoint }}' -- required
AND testIds = '{{ testIds }}'
AND scopes = '{{ scopes }}'
AND lastModifiedStartTime = '{{ lastModifiedStartTime }}'
AND lastModifiedEndTime = '{{ lastModifiedEndTime }}'
AND maxpagesize = '{{ maxpagesize }}'
;
INSERT examples
- create_or_update_notification_rule
- Manifest
Create or update operation template.
INSERT INTO azure.developer_loadtesting.notification_rules (
displayName,
actionGroupIds,
scope,
notification_rule_id,
endpoint
)
SELECT
'{{ displayName }}' /* required */,
'{{ actionGroupIds }}' /* required */,
'{{ scope }}' /* required */,
'{{ notification_rule_id }}',
'{{ endpoint }}'
RETURNING
actionGroupIds,
createdBy,
createdDateTime,
displayName,
lastModifiedBy,
lastModifiedDateTime,
notificationRuleId,
scope
;
# Description fields are for documentation purposes
- name: notification_rules
props:
- name: notification_rule_id
value: "{{ notification_rule_id }}"
description: Required parameter for the notification_rules resource.
- name: endpoint
value: "{{ endpoint }}"
description: Required parameter for the notification_rules resource.
- name: displayName
value: "{{ displayName }}"
description: |
The name of the notification rule. Required.
- name: actionGroupIds
value:
- "{{ actionGroupIds }}"
description: |
The action groups to notify. Required.
- name: scope
value: "{{ scope }}"
description: |
The scope of the notification rule. Required. "Tests"
REPLACE examples
- create_or_update_notification_rule
Create or update operation template.
REPLACE azure.developer_loadtesting.notification_rules
SET
displayName = '{{ displayName }}',
actionGroupIds = '{{ actionGroupIds }}',
scope = '{{ scope }}'
WHERE
notification_rule_id = '{{ notification_rule_id }}' --required
AND endpoint = '{{ endpoint }}' --required
AND displayName = '{{ displayName }}' --required
AND actionGroupIds = '{{ actionGroupIds }}' --required
AND scope = '{{ scope }}' --required
RETURNING
actionGroupIds,
createdBy,
createdDateTime,
displayName,
lastModifiedBy,
lastModifiedDateTime,
notificationRuleId,
scope;
DELETE examples
- delete_notification_rule
Resource delete operation template.
DELETE FROM azure.developer_loadtesting.notification_rules
WHERE notification_rule_id = '{{ notification_rule_id }}' --required
AND endpoint = '{{ endpoint }}' --required
;