az load

注意

此參考是 Azure CLI 的載入 延伸模組的一部分 (2.41.0 版或更高版本)。 擴充功能會在您第一次執行 az load 命令時自動安裝。 深入了解擴充功能。

管理 Azure 負載測試資源。

命令

名稱 Description 類型 狀態
az load create

建立 Azure 負載測試資源。

擴充 GA
az load delete

刪除 Azure 負載測試資源。

擴充 GA
az load list

列出 Azure 負載測試資源。

擴充 GA
az load show

顯示一或多個 Azure 負載測試資源的詳細資料。

擴充 GA
az load test

管理負載測試的命令群組。

擴充 預覽版
az load test-run

管理負載測試回合的命令群組。

擴充 預覽版
az load test-run app-component

管理負載測試執行應用程式元件的命令群組。

擴充 預覽版
az load test-run app-component add

將應用程式元件新增至測試回合。

擴充 預覽版
az load test-run app-component list

列出測試回合的所有應用程式元件。

擴充 預覽版
az load test-run app-component remove

從測試回合中移除應用程式元件。

擴充 預覽版
az load test-run create

建立新的負載測試回合。

擴充 預覽版
az load test-run delete

刪除現有的負載測試回合。

擴充 預覽版
az load test-run download-files

下載現有負載測試回合的檔案。

擴充 預覽版
az load test-run list

列出所有測試回合。

擴充 預覽版
az load test-run metrics

擷取負載測試回合計量的命令群組。

擴充 預覽版
az load test-run metrics get-definitions

取得負載測試回合的所有計量定義。

擴充 預覽版
az load test-run metrics get-dimensions

取得負載測試回合的所有計量維度值。

擴充 預覽版
az load test-run metrics get-namespaces

取得負載測試回合的所有計量命名空間。

擴充 預覽版
az load test-run metrics list

列出負載測試回合的計量。

擴充 預覽版
az load test-run server-metric

管理負載測試回合伺服器計量的命令群組。

擴充 預覽版
az load test-run server-metric add

將伺服器計量新增至測試回合。

擴充 預覽版
az load test-run server-metric list

列出測試回合的所有伺服器計量。

擴充 預覽版
az load test-run server-metric remove

從測試回合中移除伺服器計量。

擴充 預覽版
az load test-run show

顯示測試回合的詳細資料。

擴充 預覽版
az load test-run stop

停止執行負載測試回合。

擴充 預覽版
az load test-run update

更新現有的負載測試回合。

擴充 預覽版
az load test app-component

管理應用程式元件的命令群組。

擴充 預覽版
az load test app-component add

將應用程式元件新增至測試。

擴充 預覽版
az load test app-component list

列出測試的所有應用程式元件。

擴充 預覽版
az load test app-component remove

從測試中移除指定的應用程式元件。

擴充 預覽版
az load test create

建立新的負載測試。

擴充 預覽版
az load test delete

刪除現有的負載測試。

擴充 預覽版
az load test download-files

下載現有負載測試的檔案。

擴充 預覽版
az load test file

測試檔案作業的命令群組。

擴充 預覽版
az load test file delete

從測試中刪除檔案。

擴充 預覽版
az load test file download

從測試下載檔案。

擴充 預覽版
az load test file list

列出測試中的所有檔案。

擴充 預覽版
az load test file upload

將檔案上傳至測試。

擴充 預覽版
az load test list

列出指定負載測試資源中的所有測試。

擴充 預覽版
az load test server-metric

管理伺服器計量的命令群組。

擴充 預覽版
az load test server-metric add

將伺服器計量新增至測試。

擴充 預覽版
az load test server-metric list

列出測試的所有伺服器計量。

擴充 預覽版
az load test server-metric remove

從測試中移除指定的伺服器計量。

擴充 預覽版
az load test show

顯示測試的詳細資料。

擴充 預覽版
az load test update

更新現有的負載測試。

擴充 預覽版
az load update

更新 Azure 負載測試資源。

擴充 GA
az load wait

將 CLI 置於等候狀態,直到符合條件為止。

擴充 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

必要參數

--name -n

新 Azure 負載測試資源的名稱。

--resource-group -g

資源組名。 您可以使用 az configure --defaults group= 來設定預設群組。

選擇性參數

--encryption-identity

客戶自控金鑰設定的受控識別,定義應該用來驗證哪些身分識別來金鑰保存庫。

--encryption-key
--identity-type

受控服務識別的類型。

接受的值: None, SystemAssigned, SystemAssigned,UserAssigned, UserAssigned
預設值: None
--location -l

位置。​​ 來自:az account list-locations 的值。 您可以使用 az configure --defaults location=來設定預設位置。 未指定時,將會使用資源群組的位置。

--no-wait

請勿等候長時間執行的作業完成。

接受的值: 0, 1, f, false, n, no, t, true, y, yes
--tags

以空格分隔的標記:key[=value] [key[=value] ...]。使用 「」 清除現有的標記。 支援速記語法、json-file 和 yaml-file。 請嘗試 「??」 以顯示更多。

--user-assigned

與資源相關聯的使用者指派身分識別清單。 使用者指派的身分識別將會是 ARM 資源識別碼。例如,使用者指派的身分識別清單看起來會像 「{'/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。 請嘗試 「??」 以顯示更多。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

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

選擇性參數

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源識別碼」引數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」引數。

--name -n

Azure 負載測試資源的名稱。

--no-wait

請勿等候長時間執行的作業完成。

接受的值: 0, 1, f, false, n, no, t, true, y, yes
--resource-group -g

資源組名。 您可以使用 az configure --defaults group= 來設定預設群組。

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--yes -y

不提示確認。

預設值: False
全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az load list

列出 Azure 負載測試資源。

az load list [--resource-group]

範例

列出 Azure 負載測試資源

az load list --resource-group sample-rg
az load list

選擇性參數

--resource-group -g

資源組名。 您可以使用 az configure --defaults group= 來設定預設群組。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

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

選擇性參數

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源識別碼」引數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」引數。

--name -n

Azure 負載測試資源的名稱。

--resource-group -g

資源組名。 您可以使用 az configure --defaults group= 來設定預設群組。

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

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

選擇性參數

--encryption-identity

客戶自控金鑰設定的受控識別,定義應該用來驗證哪些身分識別來金鑰保存庫。

--encryption-key
--identity-type

受控服務識別的類型。

接受的值: None, SystemAssigned, SystemAssigned,UserAssigned, UserAssigned
--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源識別碼」引數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」引數。

--name -n

Azure 負載測試資源的名稱。

--no-wait

請勿等候長時間執行的作業完成。

接受的值: 0, 1, f, false, n, no, t, true, y, yes
--resource-group -g

資源組名。 您可以使用 az configure --defaults group= 來設定預設群組。

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--tags

以空格分隔的標記:key[=value] [key[=value] ...]。使用 「」 清除現有的標記。 支援速記語法、json-file 和 yaml-file。 請嘗試 「??」 以顯示更多。

--user-assigned

與資源相關聯的使用者指派身分識別清單。 支援速記語法、json-file 和 yaml-file。 請嘗試 「??」 以顯示更多。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az load wait

將 CLI 置於等候狀態,直到符合條件為止。

az load wait [--created]
             [--custom]
             [--deleted]
             [--exists]
             [--ids]
             [--interval]
             [--name]
             [--resource-group]
             [--subscription]
             [--timeout]
             [--updated]

選擇性參數

--created

請等候在 'Succeeded' 使用 'provisioningState' 建立。

預設值: False
--custom

等到條件符合自訂 JMESPath 查詢為止。 例如 provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running']。

--deleted

等到刪除為止。

預設值: False
--exists

等候資源存在。

預設值: False
--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源識別碼」引數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」引數。

--interval

輪詢間隔以秒為單位。

預設值: 30
--name -n

Azure 負載測試資源的名稱。

--resource-group -g

資源組名。 您可以使用 az configure --defaults group= 來設定預設群組。

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--timeout

以秒為單位的等候上限。

預設值: 3600
--updated

等到 provisioningState 更新為 'Succeeded'。

預設值: False
全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。