次の方法で共有


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

定義

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

public virtual System.Threading.Tasks.Task<Azure.Response> DeleteTestRunAsync (string testRunId, Azure.RequestContext context = default);
abstract member DeleteTestRunAsync : string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.DeleteTestRunAsync : string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function DeleteTestRunAsync (testRunId As String, Optional context As RequestContext = Nothing) As Task(Of Response)

パラメーター

testRunId
String

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

context
RequestContext

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

戻り値

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

例外

testRunId が null です。

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

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

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

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

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

適用対象