次の方法で共有


LoadTestRunClient.DeleteTestRun(String, RequestContext) メソッド

定義

テスト実行をその名前で削除します。

public virtual Azure.Response DeleteTestRun (string testRunId, Azure.RequestContext context = default);
abstract member DeleteTestRun : string * Azure.RequestContext -> Azure.Response
override this.DeleteTestRun : string * Azure.RequestContext -> Azure.Response
Public Overridable Function DeleteTestRun (testRunId As String, Optional context As RequestContext = Nothing) As Response

パラメーター

testRunId
String

ロード テストの実行の一意の名前。小文字の英字、数字、アンダースコア、またはハイフン文字のみを含める必要があります。

context
RequestContext

要求コンテキスト。これは、クライアント パイプラインの既定の動作を呼び出しごとにオーバーライドできます。

戻り値

サービスから返された応答。

例外

testRunId が null です。

testRunId は空の文字列であり、空でないと予想されていました。

サービスから成功以外の状態コードが返されました。

このサンプルでは、必要なパラメーターを使用して DeleteTestRun を呼び出す方法を示します。

var credential = new DefaultAzureCredential();
var endpoint = new Uri("<https://my-service.azure.com>");
var client = new LoadTestRunClient(endpoint, credential);

Response response = client.DeleteTestRun("<testRunId>");
Console.WriteLine(response.Status);

適用対象