Share via


LoadTestAdministrationClient.DeleteTestFileAsync Method

Definition

Delete file by the file name for a test.

public virtual System.Threading.Tasks.Task<Azure.Response> DeleteTestFileAsync (string testId, string fileName, Azure.RequestContext context = default);
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)

Parameters

testId
String

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

fileName
String

File name with file extension like app.jmx.

context
RequestContext

The request context, 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 with required parameters.

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

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

Applies to