你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
CloudTask 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
CloudTask()
CloudTask(String, String, String, String, Nullable<DateTime>, Nullable<DateTime>, ExitConditions, Nullable<TaskState>, Nullable<DateTime>, Nullable<TaskState>, Nullable<DateTime>, String, TaskContainerSettings, IList<ResourceFile>, IList<OutputFile>, IList<EnvironmentSetting>, AffinityInformation, TaskConstraints, Nullable<Int32>, UserIdentity, TaskExecutionInformation, ComputeNodeInformation, MultiInstanceSettings, TaskStatistics, TaskDependencies, IList<ApplicationPackageReference>, AuthenticationTokenSettings)
- Source:
- CloudTask.cs
初始化 CloudTask 类的新实例。
public CloudTask (string id = default, string displayName = default, string url = default, string eTag = default, DateTime? lastModified = default, DateTime? creationTime = default, Microsoft.Azure.Batch.Protocol.Models.ExitConditions exitConditions = default, Microsoft.Azure.Batch.Protocol.Models.TaskState? state = default, DateTime? stateTransitionTime = default, Microsoft.Azure.Batch.Protocol.Models.TaskState? previousState = default, DateTime? previousStateTransitionTime = default, string commandLine = default, Microsoft.Azure.Batch.Protocol.Models.TaskContainerSettings containerSettings = default, System.Collections.Generic.IList<Microsoft.Azure.Batch.Protocol.Models.ResourceFile> resourceFiles = default, System.Collections.Generic.IList<Microsoft.Azure.Batch.Protocol.Models.OutputFile> outputFiles = default, System.Collections.Generic.IList<Microsoft.Azure.Batch.Protocol.Models.EnvironmentSetting> environmentSettings = default, Microsoft.Azure.Batch.Protocol.Models.AffinityInformation affinityInfo = default, Microsoft.Azure.Batch.Protocol.Models.TaskConstraints constraints = default, int? requiredSlots = default, Microsoft.Azure.Batch.Protocol.Models.UserIdentity userIdentity = default, Microsoft.Azure.Batch.Protocol.Models.TaskExecutionInformation executionInfo = default, Microsoft.Azure.Batch.Protocol.Models.ComputeNodeInformation nodeInfo = default, Microsoft.Azure.Batch.Protocol.Models.MultiInstanceSettings multiInstanceSettings = default, Microsoft.Azure.Batch.Protocol.Models.TaskStatistics stats = default, Microsoft.Azure.Batch.Protocol.Models.TaskDependencies dependsOn = default, System.Collections.Generic.IList<Microsoft.Azure.Batch.Protocol.Models.ApplicationPackageReference> applicationPackageReferences = default, Microsoft.Azure.Batch.Protocol.Models.AuthenticationTokenSettings authenticationTokenSettings = default);
new Microsoft.Azure.Batch.Protocol.Models.CloudTask : string * string * string * string * Nullable<DateTime> * Nullable<DateTime> * Microsoft.Azure.Batch.Protocol.Models.ExitConditions * Nullable<Microsoft.Azure.Batch.Protocol.Models.TaskState> * Nullable<DateTime> * Nullable<Microsoft.Azure.Batch.Protocol.Models.TaskState> * Nullable<DateTime> * string * Microsoft.Azure.Batch.Protocol.Models.TaskContainerSettings * System.Collections.Generic.IList<Microsoft.Azure.Batch.Protocol.Models.ResourceFile> * System.Collections.Generic.IList<Microsoft.Azure.Batch.Protocol.Models.OutputFile> * System.Collections.Generic.IList<Microsoft.Azure.Batch.Protocol.Models.EnvironmentSetting> * Microsoft.Azure.Batch.Protocol.Models.AffinityInformation * Microsoft.Azure.Batch.Protocol.Models.TaskConstraints * Nullable<int> * Microsoft.Azure.Batch.Protocol.Models.UserIdentity * Microsoft.Azure.Batch.Protocol.Models.TaskExecutionInformation * Microsoft.Azure.Batch.Protocol.Models.ComputeNodeInformation * Microsoft.Azure.Batch.Protocol.Models.MultiInstanceSettings * Microsoft.Azure.Batch.Protocol.Models.TaskStatistics * Microsoft.Azure.Batch.Protocol.Models.TaskDependencies * System.Collections.Generic.IList<Microsoft.Azure.Batch.Protocol.Models.ApplicationPackageReference> * Microsoft.Azure.Batch.Protocol.Models.AuthenticationTokenSettings -> Microsoft.Azure.Batch.Protocol.Models.CloudTask
Public Sub New (Optional id As String = Nothing, Optional displayName As String = Nothing, Optional url As String = Nothing, Optional eTag As String = Nothing, Optional lastModified As Nullable(Of DateTime) = Nothing, Optional creationTime As Nullable(Of DateTime) = Nothing, Optional exitConditions As ExitConditions = Nothing, Optional state As Nullable(Of TaskState) = Nothing, Optional stateTransitionTime As Nullable(Of DateTime) = Nothing, Optional previousState As Nullable(Of TaskState) = Nothing, Optional previousStateTransitionTime As Nullable(Of DateTime) = Nothing, Optional commandLine As String = Nothing, Optional containerSettings As TaskContainerSettings = Nothing, Optional resourceFiles As IList(Of ResourceFile) = Nothing, Optional outputFiles As IList(Of OutputFile) = Nothing, Optional environmentSettings As IList(Of EnvironmentSetting) = Nothing, Optional affinityInfo As AffinityInformation = Nothing, Optional constraints As TaskConstraints = Nothing, Optional requiredSlots As Nullable(Of Integer) = Nothing, Optional userIdentity As UserIdentity = Nothing, Optional executionInfo As TaskExecutionInformation = Nothing, Optional nodeInfo As ComputeNodeInformation = Nothing, Optional multiInstanceSettings As MultiInstanceSettings = Nothing, Optional stats As TaskStatistics = Nothing, Optional dependsOn As TaskDependencies = Nothing, Optional applicationPackageReferences As IList(Of ApplicationPackageReference) = Nothing, Optional authenticationTokenSettings As AuthenticationTokenSettings = Nothing)
参数
- id
- String
唯一标识作业中的 Task 的字符串。
- displayName
- String
任务的显示名称。
- url
- String
任务的 URL。
- eTag
- String
任务的 ETag。
- exitConditions
- ExitConditions
Batch 服务在任务完成时应如何响应。
- commandLine
- String
Task 的命令行。
- containerSettings
- TaskContainerSettings
运行 Task 的容器的设置。
- resourceFiles
- IList<ResourceFile>
运行命令行之前 Batch 服务将下载到计算节点的文件列表。
- outputFiles
- IList<OutputFile>
运行命令行后 Batch 服务将从计算节点上传的文件列表。
- environmentSettings
- IList<EnvironmentSetting>
任务环境变量设置的列表。
- affinityInfo
- AffinityInformation
Batch 服务可以使用该提示来选择要启动新任务的计算节点。
- constraints
- TaskConstraints
适用于此任务的执行约束。
- userIdentity
- UserIdentity
运行任务时所依据的用户标识。
- executionInfo
- TaskExecutionInformation
有关任务执行的信息。
- nodeInfo
- ComputeNodeInformation
有关运行 Task 的计算节点的信息。
- multiInstanceSettings
- MultiInstanceSettings
一个 对象,指示 Task 是多实例 Task,并包含有关如何运行多实例 Task 的信息。
- stats
- TaskStatistics
任务的资源使用情况统计信息。
- dependsOn
- TaskDependencies
此任务所依赖的任务。
- applicationPackageReferences
- IList<ApplicationPackageReference>
Batch 服务在运行命令行之前将部署到计算节点的包列表。
- authenticationTokenSettings
- AuthenticationTokenSettings
任务可用于执行 Batch 服务操作的身份验证令牌的设置。