Share via


az load notification-rule

Note

This reference is part of the load extension for the Azure CLI (version 2.66.0 or higher). The extension will automatically install the first time you run an az load notification-rule command. Learn more about extensions.

This command group is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Command group to manage notification rules.

Commands

Name Description Type Status
az load notification-rule create

Create a new notification rule for load test resource.

Extension Preview
az load notification-rule delete

Delete the specified notification rule for load test resource.

Extension Preview
az load notification-rule list

List all the notification rules for load test resource.

Extension Preview
az load notification-rule show

Get the specified notification rule for load test resource.

Extension Preview
az load notification-rule update

Update an existing notification rule for load test resource.

Extension Preview

az load notification-rule create

Preview

Command group 'load notification-rule' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Create a new notification rule for load test resource.

az load notification-rule create --action-groups
                                 --load-test-resource --name
                                 --notification-rule-id
                                 [--all-events]
                                 [--all-tests]
                                 [--display-name]
                                 [--event]
                                 [--resource-group]
                                 [--test-ids]

Examples

Create a notification rule for all events.

az load notification-rule create --load-test-resource sample-alt-resource --resource-group sample-rg --action-groups /subscriptions/000000-0000-0000-0000-000000000000/resourcegroups/sample-rg/providers/microsoft.insights/actiongroups/sample-ag --notification-rule-id notification-sample-id --all-events

Create a notification rule for all tests and TestRunEnded event.

az load notification-rule create --load-test-resource sample-alt-resource --resource-group sample-rg --action-groups /subscriptions/000000-0000-0000-0000-000000000000/resourcegroups/sample-rg/providers/microsoft.insights/actiongroups/sample-ag --notification-rule-id notification-sample-id --all-tests --event event-id=event1 type=TestRunEnded status=DONE,FAILED result=PASSED

Required Parameters

--action-groups

Space separated list of resource ids of action groups for the notification rule.

--load-test-resource --name -n

Name or ARM resource ID of the Load Testing resource.

--notification-rule-id -i

Identifier for the notification rule.

Optional Parameters

--all-events

Provide this flag if all events should be included for the notification rule. This will override any events provided using --event.

Default value: False
--all-tests

Provide this flag if all tests should be included for the notification rule. This will override any tests provided using --test-ids.

Default value: False
--display-name

Display name of notification rule.

--event

Event to be enabled on the notification rule. Expected format is --event event-id='event id' type='event type' status='a list of statuses in comma-separated format' result='a list of results in comma-separated format'. Status and result fields are valid only for event type 'TestRunEnded'.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--test-ids

Space separated list of test ids for the notification rule.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az load notification-rule delete

Preview

Command group 'load notification-rule' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Delete the specified notification rule for load test resource.

az load notification-rule delete --load-test-resource --name
                                 --notification-rule-id
                                 [--resource-group]
                                 [--yes]

Examples

Delete a notification rule.

az load notification-rule delete --load-test-resource sample-alt-resource --resource-group sample-rg --notification-rule-id notification-sample-id --yes

Required Parameters

--load-test-resource --name -n

Name or ARM resource ID of the Load Testing resource.

--notification-rule-id -i

Identifier for the notification rule.

Optional Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--yes -y

Do not prompt for confirmation.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az load notification-rule list

Preview

Command group 'load notification-rule' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

List all the notification rules for load test resource.

az load notification-rule list --load-test-resource --name
                               [--resource-group]
                               [--test-ids]

Examples

List all notification rules.

az load notification-rule list --load-test-resource sample-alt-resource --resource-group sample-rg

List all notification rules for the specified test IDs.

az load notification-rule list --load-test-resource sample-alt-resource --resource-group sample-rg --test-ids sample-test-id

Required Parameters

--load-test-resource --name -n

Name or ARM resource ID of the Load Testing resource.

Optional Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--test-ids

Space separated list of test ids for the notification rule.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az load notification-rule show

Preview

Command group 'load notification-rule' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Get the specified notification rule for load test resource.

az load notification-rule show --load-test-resource --name
                               --notification-rule-id
                               [--resource-group]

Examples

Get a notification rule.

az load notification-rule show --load-test-resource sample-alt-resource --resource-group sample-rg --notification-rule-id notification-sample-id

Required Parameters

--load-test-resource --name -n

Name or ARM resource ID of the Load Testing resource.

--notification-rule-id -i

Identifier for the notification rule.

Optional Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az load notification-rule update

Preview

Command group 'load notification-rule' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Update an existing notification rule for load test resource.

az load notification-rule update --load-test-resource --name
                                 --notification-rule-id
                                 [--action-groups]
                                 [--add-event]
                                 [--all-tests]
                                 [--display-name]
                                 [--remove-event]
                                 [--resource-group]
                                 [--test-ids]

Examples

Update a notification rule enabled for all tests.

az load notification-rule update --load-test-resource sample-alt-resource --resource-group sample-rg --notification-rule-id notification-sample-id --all-tests

Add a TestRunStarted event to an existing notification rule.

az load notification-rule update --load-test-resource sample-alt-resource --resource-group sample-rg --notification-rule-id notification-sample-id --add-event event-id=event1 type=TestRunStarted

Remove an event from an existing notification rule and update the action group list.

az load notification-rule update --load-test-resource sample-alt-resource --resource-group sample-rg --notification-rule-id notification-sample-id --remove-event event-id=event1 --action-groups /subscriptions/000000-0000-0000-0000-000000000000/resourcegroups/sample-rg/providers/microsoft.insights/actiongroups/sample-ag

Required Parameters

--load-test-resource --name -n

Name or ARM resource ID of the Load Testing resource.

--notification-rule-id -i

Identifier for the notification rule.

Optional Parameters

--action-groups

Space separated list of resource ids of action groups for the notification rule.

--add-event

Event to be enabled on the notification rule. Expected format is --event event-id='event id' type='event type' status='a list of statuses in comma-separated format' result='a list of results in comma-separated format'. Status and result fields are valid only for event type 'TestRunEnded'.

--all-tests

Provide this flag if all tests should be included for the notification rule. This will override any tests provided using --test-ids.

Default value: False
--display-name

Display name of notification rule.

--remove-event

Provide the event id of the event to be removed from the notification rule. Format should be --remove-event event-id='event id'.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--test-ids

Space separated list of test ids for the notification rule.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.