az load
Note
此参考是 Azure CLI(版本 2.66.0 或更高版本)的 负载 扩展的一部分。 该扩展将在首次运行 az load 命令时自动安装。 了解更多关于扩展的信息。
管理 Azure 负载测试资源。
命令
| 名称 | 说明 | 类型 | Status |
|---|---|---|---|
| az load create |
创建 Azure 负载测试资源。 |
Extension | GA |
| az load delete |
删除 Azure 负载测试资源。 |
Extension | GA |
| az load list |
列出 Azure 负载测试资源。 |
Extension | GA |
| az load notification-rule |
用于管理通知规则的命令组。 |
Extension | Preview |
| 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 show |
显示一个或多个 Azure 负载测试资源的详细信息。 |
Extension | GA |
| az load test |
用于管理负载测试的命令组。 |
Extension | Preview |
| az load test-run |
用于管理负载测试运行的命令组。 |
Extension | Preview |
| az load test-run app-component |
用于管理负载测试运行应用组件的命令组。 |
Extension | Preview |
| az load test-run app-component add |
将应用组件添加到测试运行。 |
Extension | Preview |
| az load test-run app-component list |
列出测试运行的所有应用组件。 |
Extension | Preview |
| az load test-run app-component remove |
从测试运行中删除应用组件。 |
Extension | Preview |
| az load test-run create |
创建新的负载测试运行。 |
Extension | Preview |
| az load test-run delete |
删除现有的负载测试运行。 |
Extension | Preview |
| az load test-run download-files |
下载现有负载测试运行的文件。 |
Extension | Preview |
| az load test-run get-artifacts-url |
返回 SAS URL,从存储帐户获取项目。 |
Extension | Preview |
| az load test-run list |
列出所有测试运行。 |
Extension | Preview |
| az load test-run metrics |
用于检索负载测试运行指标的命令组。 |
Extension | Preview |
| az load test-run metrics get-definitions |
获取负载测试运行的所有指标定义。 |
Extension | Preview |
| az load test-run metrics get-dimensions |
获取负载测试运行的所有指标维度值。 |
Extension | Preview |
| az load test-run metrics get-namespaces |
获取负载测试运行的所有指标命名空间。 |
Extension | Preview |
| az load test-run metrics list |
列出负载测试运行的指标。 |
Extension | Preview |
| az load test-run server-metric |
用于管理负载测试运行服务器指标的命令组。 |
Extension | Preview |
| az load test-run server-metric add |
将服务器指标添加到测试运行。 |
Extension | Preview |
| az load test-run server-metric list |
列出测试运行的所有服务器指标。 |
Extension | Preview |
| az load test-run server-metric remove |
从测试运行中删除服务器指标。 |
Extension | Preview |
| az load test-run show |
显示测试运行的详细信息。 |
Extension | Preview |
| az load test-run stop |
停止运行负载测试运行。 |
Extension | Preview |
| az load test-run update |
更新现有的负载测试运行。 |
Extension | Preview |
| az load test app-component |
用于管理应用组件的命令组。 |
Extension | Preview |
| az load test app-component add |
将应用组件添加到测试。 |
Extension | Preview |
| az load test app-component list |
列出测试的所有应用组件。 |
Extension | Preview |
| az load test app-component remove |
从测试中删除给定的应用组件。 |
Extension | Preview |
| az load test compare-to-baseline |
将最近测试运行中的采样器统计信息与基线测试运行中的采样器统计信息进行比较。 |
Extension | Preview |
| az load test convert-to-jmx |
将 URL 类型测试转换为 JMX 测试。 |
Extension | Preview |
| az load test create |
创建新的负载测试。 |
Extension | Preview |
| az load test delete |
删除现有负载测试。 |
Extension | Preview |
| az load test download-files |
下载现有负载测试的文件。 |
Extension | Preview |
| az load test file |
测试文件的操作的命令组。 |
Extension | Preview |
| az load test file delete |
从测试中删除文件。 |
Extension | Preview |
| az load test file download |
从测试下载文件。 |
Extension | Preview |
| az load test file list |
列出测试中的所有文件。 |
Extension | Preview |
| az load test file upload |
将文件上传到测试。 |
Extension | Preview |
| az load test list |
列出给定负载测试资源中的所有测试。 |
Extension | Preview |
| az load test server-metric |
用于管理服务器指标的命令组。 |
Extension | Preview |
| az load test server-metric add |
向测试添加服务器指标。 |
Extension | Preview |
| az load test server-metric list |
列出测试的所有服务器指标。 |
Extension | Preview |
| az load test server-metric remove |
从测试中删除给定的服务器指标。 |
Extension | Preview |
| az load test set-baseline |
将测试运行设置为与测试中的其他运行进行比较的基线。 |
Extension | Preview |
| az load test show |
显示测试的详细信息。 |
Extension | Preview |
| az load test update |
更新现有负载测试。 |
Extension | Preview |
| az load trigger |
用于管理触发器的命令组。 |
Extension | Preview |
| az load trigger schedule |
用于管理计划触发器的命令组。 |
Extension | Preview |
| az load trigger schedule create |
创建新的负载触发器计划。 |
Extension | Preview |
| az load trigger schedule delete |
删除负载触发器计划。 |
Extension | Preview |
| az load trigger schedule enable |
启用计划触发器。 |
Extension | Preview |
| az load trigger schedule list |
列出所有计划触发器。 |
Extension | Preview |
| az load trigger schedule pause |
暂停计划触发器。 |
Extension | Preview |
| az load trigger schedule show |
显示负载触发器计划的详细信息。 |
Extension | Preview |
| az load trigger schedule update |
更新负载触发器计划。 |
Extension | Preview |
| az load update |
更新 Azure 负载测试资源。 |
Extension | GA |
| az load wait |
将 CLI 置于等待状态,直到满足条件。 |
Extension | GA |
az load create
创建 Azure 负载测试资源。
负载测试资源名称必须对资源组是唯一的。
az load create --name
--resource-group
[--encryption-identity]
[--encryption-key]
[--identity-type {None, SystemAssigned, SystemAssigned,UserAssigned, UserAssigned}]
[--location]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--tags]
[--user-assigned]
示例
创建新的 Azure 负载测试资源
az load create --name sample-resource --resource-group sample-rg --location westus2
az load create -n sample-resource -g sample-rg -l westus2
使用标记创建新的 Azure 负载测试资源
az load create -n sample-resource -g sample-rg -l westus2 --tags type=testing target=infra
使用托管标识创建新的 Azure 负载测试资源
az load create -n sample-resource -g sample-rg -l westus2 --identity-type SystemAssigned,UserAssigned --user-assigned "{'/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sample-mi':{}}"
使用 CMK 加密创建新的 Azure 负载测试资源
az load create -n sample-resource -g sample-rg -l westus2 --identity-type SystemAssigned,UserAssigned --user-assigned "{'/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sample-mi':{}}" --encryption-key https://sample-kv.vault.azure.net/keys/samplekey/2d1ccd5c50234ea2a0858fe148b69cde --encryption-identity /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sample-mi
必需参数
新的 Azure 负载测试资源的名称。
| 属性 | 值 |
|---|---|
| Parameter group: | Required Parameters Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
| 属性 | 值 |
|---|---|
| Parameter group: | Required Parameters Arguments |
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
客户管理的密钥设置的托管标识,用于定义应用于向 Key Vault 进行身份验证的标识。
| 属性 | 值 |
|---|---|
| Parameter group: | Optional Parameters Arguments |
加密密钥 URL(版本控制)。 例如,https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78。
| 属性 | 值 |
|---|---|
| Parameter group: | Optional Parameters Arguments |
托管服务标识的类型。
| 属性 | 值 |
|---|---|
| Parameter group: | Optional Parameters Arguments |
| 默认值: | None |
| 接受的值: | None, SystemAssigned, SystemAssigned,UserAssigned, UserAssigned |
Location. 值来源:az account list-locations。 可以使用 az configure --defaults location=<location> 配置默认位置。 如果未指定,将使用资源组的位置。
| 属性 | 值 |
|---|---|
| Parameter group: | Required Parameters Arguments |
不等待长时间运行的操作完成。
| 属性 | 值 |
|---|---|
| 接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
空格分隔标记:key[=value] [key[=value] ...]。使用“”清除现有标记。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。
| 属性 | 值 |
|---|---|
| Parameter group: | Optional Parameters Arguments |
与资源关联的用户分配标识的列表。 用户分配的标识将是 ARM 资源 ID。例如,用户分配的标识列表类似于“{'/subscriptions/ abcdef01-2345-6789-0abc-def012345678 /resourcegroups/sample-rg/providers/microsoft.managedidentity/userassignedidentities/identity1','/subscriptions/ abcdef01-2345-6789-0abc-def012345678 /resourcegroups/test-rg/providers/microsoft.managedidentity/userassignedidentities/identity2'}” 支持速记语法, json-file 和 yaml-file。 请尝试“??” 以显示更多内容。
| 属性 | 值 |
|---|---|
| Parameter group: | Optional Parameters Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az load delete
删除 Azure 负载测试资源。
az load delete [--ids]
[--name]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--resource-group]
[--subscription]
[--yes]
示例
删除 Azure 负载测试资源
az load delete --name sample-resource --resource-group sample-rg
删除多个 Azure 负载测试资源
az load delete --ids /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-rg/providers/Microsoft.LoadTestService/loadtests/sample-resource1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-rg2/providers/Microsoft.LoadTestService/loadtests/sample-resource2
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
Azure 负载测试资源的名称。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
不等待长时间运行的操作完成。
| 属性 | 值 |
|---|---|
| 接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
不要提示确认。
| 属性 | 值 |
|---|---|
| 默认值: | False |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az load list
列出 Azure 负载测试资源。
az load list [--resource-group]
示例
列出 Azure 负载测试资源
az load list --resource-group sample-rg
az load list
可选参数
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>配置默认组。
| 属性 | 值 |
|---|---|
| Parameter group: | Optional Parameters Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az load show
显示一个或多个 Azure 负载测试资源的详细信息。
az load show [--ids]
[--name]
[--resource-group]
[--subscription]
示例
显示 Azure 负载测试资源
az load show --name sample-resource --resource-group sample-rg
显示 Azure 负载测试资源
az load show --ids /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-rg/providers/Microsoft.LoadTestService/loadtests/sample-resource1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-rg2/providers/Microsoft.LoadTestService/loadtests/sample-resource2
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
Azure 负载测试资源的名称。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az load update
更新 Azure 负载测试资源。
az load update [--encryption-identity]
[--encryption-key]
[--identity-type {None, SystemAssigned, SystemAssigned,UserAssigned, UserAssigned}]
[--ids]
[--name]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--resource-group]
[--subscription]
[--tags]
[--user-assigned]
示例
更新 Azure 负载测试资源
az load update --name sample-resource --resource-group sample-rg --identity-type SystemAssigned
az load update --name sample-resource --resource-group sample-rg --tags type=server
az load update --name sample-resource --resource-group sample-rg --encryption-key https://sample-kv.vault.azure.net/keys/samplekey2/2d1ccd5c50234ea2a0858fe148b69cde
az load update --name sample-resource --resource-group sample-rg --identity-type SystemAssigned,UserAssigned --user-assigned "{'/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sample-mi':{}}" --encryption-key https://sample-kv.vault.azure.net/keys/samplekey2/2d1ccd5c50234ea2a0858fe148b69cde --encryption-identity SystemAssigned
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
客户管理的密钥设置的托管标识,用于定义应用于向 Key Vault 进行身份验证的标识。
| 属性 | 值 |
|---|---|
| Parameter group: | Optional Parameters Arguments |
加密密钥 URL(版本控制)。 例如,https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78。
| 属性 | 值 |
|---|---|
| Parameter group: | Optional Parameters Arguments |
托管服务标识的类型。
| 属性 | 值 |
|---|---|
| Parameter group: | Optional Parameters Arguments |
| 接受的值: | None, SystemAssigned, SystemAssigned,UserAssigned, UserAssigned |
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
Azure 负载测试资源的名称。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
不等待长时间运行的操作完成。
| 属性 | 值 |
|---|---|
| 接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
空格分隔标记:key[=value] [key[=value] ...]。使用“”清除现有标记。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。
| 属性 | 值 |
|---|---|
| Parameter group: | Optional Parameters Arguments |
与资源关联的用户分配标识的列表。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。
| 属性 | 值 |
|---|---|
| Parameter group: | Optional Parameters Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az load wait
将 CLI 置于等待状态,直到满足条件。
az load wait [--created]
[--custom]
[--deleted]
[--exists]
[--ids]
[--interval]
[--name]
[--resource-group]
[--subscription]
[--timeout]
[--updated]
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
等待在“Succeeded”中使用“provisioningState”创建。
| 属性 | 值 |
|---|---|
| Parameter group: | Wait Condition Arguments |
| 默认值: | False |
等待条件满足自定义 JMESPath 查询。 例如 provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running']。
| 属性 | 值 |
|---|---|
| Parameter group: | Wait Condition Arguments |
等到删除为止。
| 属性 | 值 |
|---|---|
| Parameter group: | Wait Condition Arguments |
| 默认值: | False |
等待资源存在。
| 属性 | 值 |
|---|---|
| Parameter group: | Wait Condition Arguments |
| 默认值: | False |
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
轮询间隔(以秒为单位)。
| 属性 | 值 |
|---|---|
| Parameter group: | Wait Condition Arguments |
| 默认值: | 30 |
Azure 负载测试资源的名称。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
最大等待(以秒为单位)。
| 属性 | 值 |
|---|---|
| Parameter group: | Wait Condition Arguments |
| 默认值: | 3600 |
等到 provisioningState 更新为“Succeeded”。
| 属性 | 值 |
|---|---|
| Parameter group: | Wait Condition Arguments |
| 默认值: | False |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |