你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
JobOperationsExtensions.Enable 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
启用指定的作业,允许运行新的任务。
public static Microsoft.Azure.Batch.Protocol.Models.JobEnableHeaders Enable (this Microsoft.Azure.Batch.Protocol.IJobOperations operations, string jobId, Microsoft.Azure.Batch.Protocol.Models.JobEnableOptions jobEnableOptions = default);
static member Enable : Microsoft.Azure.Batch.Protocol.IJobOperations * string * Microsoft.Azure.Batch.Protocol.Models.JobEnableOptions -> Microsoft.Azure.Batch.Protocol.Models.JobEnableHeaders
<Extension()>
Public Function Enable (operations As IJobOperations, jobId As String, Optional jobEnableOptions As JobEnableOptions = Nothing) As JobEnableHeaders
参数
- operations
- IJobOperations
此扩展方法的操作组。
- jobId
- String
要启用的作业的 ID。
- jobEnableOptions
- JobEnableOptions
操作的其他参数
返回
注解
调用此 API 时,Batch 服务会将禁用的作业设置为启用状态。 完成此操作后,作业将进入活动状态,并恢复在作业下计划新任务。 Batch 服务不允许任务保持活动状态超过 180 天。 因此,如果启用包含 180 天前添加的活动任务的作业,这些任务将不会运行。