Share via


IFileOperations.DeleteFromTaskWithHttpMessagesAsync Method

Definition

Deletes the specified Task file from the Compute Node where the Task ran.

public System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationHeaderResponse<Microsoft.Azure.Batch.Protocol.Models.FileDeleteFromTaskHeaders>> DeleteFromTaskWithHttpMessagesAsync (string jobId, string taskId, string filePath, bool? recursive = default, Microsoft.Azure.Batch.Protocol.Models.FileDeleteFromTaskOptions fileDeleteFromTaskOptions = default, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = default, System.Threading.CancellationToken cancellationToken = default);
abstract member DeleteFromTaskWithHttpMessagesAsync : string * string * string * Nullable<bool> * Microsoft.Azure.Batch.Protocol.Models.FileDeleteFromTaskOptions * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationHeaderResponse<Microsoft.Azure.Batch.Protocol.Models.FileDeleteFromTaskHeaders>>
Public Function DeleteFromTaskWithHttpMessagesAsync (jobId As String, taskId As String, filePath As String, Optional recursive As Nullable(Of Boolean) = Nothing, Optional fileDeleteFromTaskOptions As FileDeleteFromTaskOptions = Nothing, Optional customHeaders As Dictionary(Of String, List(Of String)) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of AzureOperationHeaderResponse(Of FileDeleteFromTaskHeaders))

Parameters

jobId
String

The ID of the Job that contains the Task.

taskId
String

The ID of the Task whose file you want to delete.

filePath
String

The path to the Task file or directory that you want to delete.

recursive
Nullable<Boolean>

Whether to delete children of a directory. If the filePath parameter represents a directory instead of a file, you can set recursive to true to delete the directory and all of the files and subdirectories in it. If recursive is false then the directory must be empty or deletion will fail.

fileDeleteFromTaskOptions
FileDeleteFromTaskOptions

Additional parameters for the operation

customHeaders
Dictionary<String,List<String>>

The headers that will be added to request.

cancellationToken
CancellationToken

The cancellation token.

Returns

Exceptions

Thrown when the operation returned an invalid status code

Thrown when a required parameter is null

Applies to