az load notification-rule
Note
This reference is part of the load extension for the Azure CLI (version 2.66.0 or higher). 该扩展将在首次运行 az load notification-rule 命令时自动安装。 Learn more about extensions.
此命令组处于预览状态,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus
用于管理通知规则的命令组。
命令
| 名称 | 说明 | 类型 | Status |
|---|---|---|---|
| az load notification-rule create |
为负载测试资源创建新的通知规则。 |
Extension | Preview |
| az load notification-rule delete |
删除负载测试资源的指定通知规则。 |
Extension | Preview |
| az load notification-rule list |
列出负载测试资源的所有通知规则。 |
Extension | Preview |
| az load notification-rule show |
获取负载测试资源的指定通知规则。 |
Extension | Preview |
| az load notification-rule update |
更新负载测试资源的现有通知规则。 |
Extension | Preview |
az load notification-rule create
命令组“加载通知规则”处于预览状态,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus
为负载测试资源创建新的通知规则。
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]
示例
为所有事件创建通知规则。
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
为所有测试和 TestRunEnded 事件创建通知规则。
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
必需参数
通知规则的作组的资源 ID 分隔列表。
负载测试资源的名称或 ARM 资源 ID。
通知规则的标识符。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
如果通知规则应包含所有事件,请提供此标志。 这将替代使用 --event 提供的任何事件。
| 属性 | 值 |
|---|---|
| 默认值: | False |
如果通知规则应包括所有测试,请提供此标志。 这将替代使用 --test-id 提供的任何测试。
| 属性 | 值 |
|---|---|
| 默认值: | False |
通知规则的显示名称。
要对通知规则启用的事件。 预期格式为 --event-id='event id' type='event type' status='a statuses list of statuses in comma-separated format' result='a list of results in comma-separated format'。 状态和结果字段仅对事件类型“TestRunEnded”有效。
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
通知规则的测试 ID 的空格分隔列表。
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
Output format.
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关详细信息和示例,请参阅 http://jmespath.org/ 。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az load notification-rule delete
命令组“加载通知规则”处于预览状态,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus
删除负载测试资源的指定通知规则。
az load notification-rule delete --load-test-resource --name
--notification-rule-id
[--resource-group]
[--yes]
示例
删除通知规则。
az load notification-rule delete --load-test-resource sample-alt-resource --resource-group sample-rg --notification-rule-id notification-sample-id --yes
必需参数
负载测试资源的名称或 ARM 资源 ID。
通知规则的标识符。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
不要提示确认。
| 属性 | 值 |
|---|---|
| 默认值: | False |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
Output format.
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关详细信息和示例,请参阅 http://jmespath.org/ 。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az load notification-rule list
命令组“加载通知规则”处于预览状态,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus
列出负载测试资源的所有通知规则。
az load notification-rule list --load-test-resource --name
[--resource-group]
[--test-ids]
示例
列出所有通知规则。
az load notification-rule list --load-test-resource sample-alt-resource --resource-group sample-rg
列出指定测试 ID 的所有通知规则。
az load notification-rule list --load-test-resource sample-alt-resource --resource-group sample-rg --test-ids sample-test-id
必需参数
负载测试资源的名称或 ARM 资源 ID。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
通知规则的测试 ID 的空格分隔列表。
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
Output format.
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关详细信息和示例,请参阅 http://jmespath.org/ 。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az load notification-rule show
命令组“加载通知规则”处于预览状态,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus
获取负载测试资源的指定通知规则。
az load notification-rule show --load-test-resource --name
--notification-rule-id
[--resource-group]
示例
获取通知规则。
az load notification-rule show --load-test-resource sample-alt-resource --resource-group sample-rg --notification-rule-id notification-sample-id
必需参数
负载测试资源的名称或 ARM 资源 ID。
通知规则的标识符。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
Output format.
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关详细信息和示例,请参阅 http://jmespath.org/ 。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az load notification-rule update
命令组“加载通知规则”处于预览状态,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus
更新负载测试资源的现有通知规则。
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]
示例
更新为所有测试启用的通知规则。
az load notification-rule update --load-test-resource sample-alt-resource --resource-group sample-rg --notification-rule-id notification-sample-id --all-tests
将 TestRunStarted 事件添加到现有通知规则。
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
从现有通知规则中删除事件并更新作组列表。
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
必需参数
负载测试资源的名称或 ARM 资源 ID。
通知规则的标识符。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
通知规则的作组的资源 ID 分隔列表。
要对通知规则启用的事件。 预期格式为 --event-id='event id' type='event type' status='a statuses list of statuses in comma-separated format' result='a list of results in comma-separated format'。 状态和结果字段仅对事件类型“TestRunEnded”有效。
如果通知规则应包括所有测试,请提供此标志。 这将替代使用 --test-id 提供的任何测试。
| 属性 | 值 |
|---|---|
| 默认值: | False |
通知规则的显示名称。
提供要从通知规则中删除的事件的事件 ID。 格式应为 --remove-event event-id='event id'。
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
通知规则的测试 ID 的空格分隔列表。
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
Output format.
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关详细信息和示例,请参阅 http://jmespath.org/ 。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |