Load Test Administration - Clone Test
複製負載測試。
複製指定的測試,並套用至複製測試的選用覆寫。
POST https://{endpoint}/tests/{testId}:clone?api-version=2025-11-01-preview
URI 參數
| 名稱 | 位於 | 必要 | 類型 | Description |
|---|---|---|---|---|
|
endpoint
|
path | True |
string (uri) |
|
|
test
|
path | True |
string minLength: 2maxLength: 50 pattern: ^[a-z0-9_-]*$ |
負載測試的唯一測試標識碼,必須只包含小寫字母、數值、底線或連字元字元。 |
|
api-version
|
query | True |
string minLength: 1 |
用於此作業的 API 版本。 |
要求本文
| 名稱 | 必要 | 類型 | Description |
|---|---|---|---|
| newTestId | True |
string pattern: ^[a-z0-9_-]*$ |
將建立之新測試的唯一識別碼。 |
| description |
string maxLength: 100 |
新建立測試的描述覆寫。 |
|
| displayName |
string minLength: 2maxLength: 50 |
新建立測試的顯示名稱覆寫。 |
回應
| 名稱 | 類型 | Description |
|---|---|---|
| 202 Accepted |
要求已接受進行處理,但尚未完成處理。 標題 Operation-Location: string |
|
| Other Status Codes |
未預期的錯誤回應。 標題 x-ms-error-code: string |
安全性
Oauth2
具有 Microsoft Entra 識別符的 OAuth 2.0 Flow。
類型:
oauth2
Flow:
implicit
授權 URL:
https://login.microsoftonline.com/common/oauth2/v2.0/authorize
範圍
| 名稱 | Description |
|---|---|
| https://cnt-prod.loadtesting.azure.com/.default |
範例
Clone a given load test with optional overrides.
範例要求
POST https://{endpoint}/tests/12316678-1234-1234-1234-122451189012:clone?api-version=2025-11-01-preview
{
"newTestId": "87661321-4321-4321-4321-122451189012"
}
範例回覆
Operation-Location: https://endpoint.region.cnt-prod.loadtesting.azure.com/operations/87661321-4321-4321-4321-122451189012?api-version=2025-11-01-preview
{
"id": "12316678-1234-1234-1234-122451189012",
"status": "Running"
}
定義
| 名稱 | Description |
|---|---|
|
Azure. |
錯誤物件。 |
|
Azure. |
包含錯誤詳細數據的回應。 |
|
Azure. |
物件,包含有關錯誤的更特定資訊。 根據 Azure REST API 準則 - https://aka.ms/AzureRestApiGuidelines#handling-errors。 |
|
Clone |
要求將現有測試複製到新測試中。 |
Azure.Core.Foundations.Error
錯誤物件。
| 名稱 | 類型 | Description |
|---|---|---|
| code |
string |
其中一組伺服器定義的錯誤碼。 |
| details |
導致此錯誤之特定錯誤的詳細數據陣列。 |
|
| innererror |
物件,包含與目前對象有關錯誤更具體的資訊。 |
|
| message |
string |
錯誤的人類可讀取表示法。 |
| target |
string |
錯誤的目標。 |
Azure.Core.Foundations.ErrorResponse
包含錯誤詳細數據的回應。
| 名稱 | 類型 | Description |
|---|---|---|
| error |
錯誤物件。 |
Azure.Core.Foundations.InnerError
物件,包含有關錯誤的更特定資訊。 根據 Azure REST API 準則 - https://aka.ms/AzureRestApiGuidelines#handling-errors。
| 名稱 | 類型 | Description |
|---|---|---|
| code |
string |
其中一組伺服器定義的錯誤碼。 |
| innererror |
內部錯誤。 |
CloneTestRequest
要求將現有測試複製到新測試中。
| 名稱 | 類型 | Description |
|---|---|---|
| description |
string maxLength: 100 |
新建立測試的描述覆寫。 |
| displayName |
string minLength: 2maxLength: 50 |
新建立測試的顯示名稱覆寫。 |
| newTestId |
string pattern: ^[a-z0-9_-]*$ |
將建立之新測試的唯一識別碼。 |