你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

IJobOperations.DeleteWithHttpMessagesAsync 方法

定义

删除作业。

public System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationHeaderResponse<Microsoft.Azure.Batch.Protocol.Models.JobDeleteHeaders>> DeleteWithHttpMessagesAsync (string jobId, Microsoft.Azure.Batch.Protocol.Models.JobDeleteOptions jobDeleteOptions = default, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = default, System.Threading.CancellationToken cancellationToken = default);
abstract member DeleteWithHttpMessagesAsync : string * Microsoft.Azure.Batch.Protocol.Models.JobDeleteOptions * 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.JobDeleteHeaders>>
Public Function DeleteWithHttpMessagesAsync (jobId As String, Optional jobDeleteOptions As JobDeleteOptions = Nothing, Optional customHeaders As Dictionary(Of String, List(Of String)) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of AzureOperationHeaderResponse(Of JobDeleteHeaders))

参数

jobId
String

要删除的作业的 ID。

jobDeleteOptions
JobDeleteOptions

操作的其他参数

customHeaders
Dictionary<String,List<String>>

将添加到请求的标头。

cancellationToken
CancellationToken

取消标记。

返回

例外

当操作返回无效状态代码时引发

当所需参数为 null 时引发

注解

删除作业还会删除属于该作业的所有任务以及所有作业统计信息。 这还会替代任务数据的保留期;也就是说,如果作业包含仍保留在计算节点上的任务,Batch 服务将删除这些任务的工作目录及其所有内容。 收到删除作业请求时,Batch 服务会将作业设置为删除状态。 对处于删除状态的作业的所有更新操作都将失败,状态代码为 409 (冲突) ,并显示指示正在删除该作业的其他信息。

适用于