Condividi tramite


LoadTestAdministrationClient.DeleteTestAsync Method

Definition

Overloads

Name Description
DeleteTestAsync(String, RequestContext)

[Protocol Method] Delete a test by its test Id.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
DeleteTestAsync(String, CancellationToken)

Delete a test by its test Id.

DeleteTestAsync(String, RequestContext)

Source:
LoadTestAdministrationClient.cs
Source:
LoadTestAdministrationClient.cs

[Protocol Method] Delete a test by its test Id.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
public virtual System.Threading.Tasks.Task<Azure.Response> DeleteTestAsync(string testId, Azure.RequestContext context = default);
public virtual System.Threading.Tasks.Task<Azure.Response> DeleteTestAsync(string testId, Azure.RequestContext context);
abstract member DeleteTestAsync : string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.DeleteTestAsync : string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function DeleteTestAsync (testId As String, Optional context As RequestContext = Nothing) As Task(Of Response)
Public Overridable Function DeleteTestAsync (testId As String, context As RequestContext) As Task(Of Response)

Parameters

testId
String

Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, underscore or hyphen characters.

context
RequestContext

The request options, which can override default behaviors of the client pipeline on a per-call basis.

Returns

The response returned from the service.

Exceptions

testId is null.

testId is an empty string, and was expected to be non-empty.

Service returned a non-success status code.

Examples

This sample shows how to call DeleteTestAsync.

Uri endpoint = new Uri("<endpoint>");
TokenCredential credential = new DefaultAzureCredential();
LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential);

Response response = await client.DeleteTestAsync("<testId>");

Console.WriteLine(response.Status);

This sample shows how to call DeleteTestAsync with all parameters.

Uri endpoint = new Uri("<endpoint>");
TokenCredential credential = new DefaultAzureCredential();
LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential);

Response response = await client.DeleteTestAsync("<testId>");

Console.WriteLine(response.Status);

Applies to

DeleteTestAsync(String, CancellationToken)

Source:
LoadTestAdministrationClient.cs

Delete a test by its test Id.

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

Parameters

testId
String

Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, underscore or hyphen characters.

cancellationToken
CancellationToken

The cancellation token that can be used to cancel the operation.

Returns

Exceptions

testId is null.

testId is an empty string, and was expected to be non-empty.

Service returned a non-success status code.

Applies to