Condividi tramite


LoadTestAdministrationClient.DeleteTestFileAsync Method

Definition

Overloads

Name Description
DeleteTestFileAsync(String, String, RequestContext)

[Protocol Method] Delete file by the file name for a test

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

Delete file by the file name for a test.

DeleteTestFileAsync(String, String, RequestContext)

Source:
LoadTestAdministrationClient.cs
Source:
LoadTestAdministrationClient.cs

[Protocol Method] Delete file by the file name for a test

  • 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> DeleteTestFileAsync(string testId, string fileName, Azure.RequestContext context = default);
public virtual System.Threading.Tasks.Task<Azure.Response> DeleteTestFileAsync(string testId, string fileName, Azure.RequestContext context);
abstract member DeleteTestFileAsync : string * string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.DeleteTestFileAsync : string * string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function DeleteTestFileAsync (testId As String, fileName As String, Optional context As RequestContext = Nothing) As Task(Of Response)
Public Overridable Function DeleteTestFileAsync (testId As String, fileName 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.

fileName
String

Name of the file.

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 or fileName is null.

testId or fileName 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 DeleteTestFileAsync.

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

Response response = await client.DeleteTestFileAsync("<testId>", "<fileName>");

Console.WriteLine(response.Status);

This sample shows how to call DeleteTestFileAsync with all parameters.

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

Response response = await client.DeleteTestFileAsync("<testId>", "<fileName>");

Console.WriteLine(response.Status);

Applies to

DeleteTestFileAsync(String, String, CancellationToken)

Source:
LoadTestAdministrationClient.cs

Delete file by the file name for a test.

public virtual System.Threading.Tasks.Task<Azure.Response> DeleteTestFileAsync(string testId, string fileName, System.Threading.CancellationToken cancellationToken = default);
abstract member DeleteTestFileAsync : string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
override this.DeleteTestFileAsync : string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function DeleteTestFileAsync (testId As String, fileName 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.

fileName
String

Name of the file.

cancellationToken
CancellationToken

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

Returns

Exceptions

testId or fileName is null.

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

Service returned a non-success status code.

Applies to