/* * Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ namespace TencentCloud.Batch.V20170312.Models { using Newtonsoft.Json; using System.Collections.Generic; using TencentCloud.Common; public class Task : AbstractModel { /// /// 应用程序信息 /// [JsonProperty("Application")] public Application Application{ get; set; } /// /// 任务名称,在一个作业内部唯一 /// [JsonProperty("TaskName")] public string TaskName{ get; set; } /// /// 任务实例运行个数 /// [JsonProperty("TaskInstanceNum")] public ulong? TaskInstanceNum{ get; set; } /// /// 运行环境信息,ComputeEnv 和 EnvId 必须指定一个(且只有一个)参数。 /// [JsonProperty("ComputeEnv")] public AnonymousComputeEnv ComputeEnv{ get; set; } /// /// 计算环境ID,ComputeEnv 和 EnvId 必须指定一个(且只有一个)参数。 /// [JsonProperty("EnvId")] public string EnvId{ get; set; } /// /// 重定向信息 /// [JsonProperty("RedirectInfo")] public RedirectInfo RedirectInfo{ get; set; } /// /// 重定向本地信息 /// [JsonProperty("RedirectLocalInfo")] public RedirectLocalInfo RedirectLocalInfo{ get; set; } /// /// 输入映射 /// [JsonProperty("InputMappings")] public InputMapping[] InputMappings{ get; set; } /// /// 输出映射 /// [JsonProperty("OutputMappings")] public OutputMapping[] OutputMappings{ get; set; } /// /// 输出映射配置 /// [JsonProperty("OutputMappingConfigs")] public OutputMappingConfig[] OutputMappingConfigs{ get; set; } /// /// 自定义环境变量 /// [JsonProperty("EnvVars")] public EnvVar[] EnvVars{ get; set; } /// /// 授权信息 /// [JsonProperty("Authentications")] public Authentication[] Authentications{ get; set; } /// /// TaskInstance失败后处理方式,取值包括TERMINATE(默认)、INTERRUPT、FAST_INTERRUPT。 /// [JsonProperty("FailedAction")] public string FailedAction{ get; set; } /// /// 任务失败后的最大重试次数,默认为0 /// [JsonProperty("MaxRetryCount")] public ulong? MaxRetryCount{ get; set; } /// /// 任务启动后的超时时间,单位秒,默认为86400秒 /// [JsonProperty("Timeout")] public ulong? Timeout{ get; set; } /// /// 任务最大并发数限制,默认没有限制。 /// [JsonProperty("MaxConcurrentNum")] public ulong? MaxConcurrentNum{ get; set; } /// /// 任务完成后,重启计算节点。适用于指定计算环境执行任务。 /// [JsonProperty("RestartComputeNode")] public bool? RestartComputeNode{ get; set; } /// /// 启动任务过程中,创建计算资源如CVM失败后的最大重试次数,默认为0。 /// [JsonProperty("ResourceMaxRetryCount")] public ulong? ResourceMaxRetryCount{ get; set; } /// /// For internal usage only. DO NOT USE IT. /// internal override void ToMap(Dictionary map, string prefix) { this.SetParamObj(map, prefix + "Application.", this.Application); this.SetParamSimple(map, prefix + "TaskName", this.TaskName); this.SetParamSimple(map, prefix + "TaskInstanceNum", this.TaskInstanceNum); this.SetParamObj(map, prefix + "ComputeEnv.", this.ComputeEnv); this.SetParamSimple(map, prefix + "EnvId", this.EnvId); this.SetParamObj(map, prefix + "RedirectInfo.", this.RedirectInfo); this.SetParamObj(map, prefix + "RedirectLocalInfo.", this.RedirectLocalInfo); this.SetParamArrayObj(map, prefix + "InputMappings.", this.InputMappings); this.SetParamArrayObj(map, prefix + "OutputMappings.", this.OutputMappings); this.SetParamArrayObj(map, prefix + "OutputMappingConfigs.", this.OutputMappingConfigs); this.SetParamArrayObj(map, prefix + "EnvVars.", this.EnvVars); this.SetParamArrayObj(map, prefix + "Authentications.", this.Authentications); this.SetParamSimple(map, prefix + "FailedAction", this.FailedAction); this.SetParamSimple(map, prefix + "MaxRetryCount", this.MaxRetryCount); this.SetParamSimple(map, prefix + "Timeout", this.Timeout); this.SetParamSimple(map, prefix + "MaxConcurrentNum", this.MaxConcurrentNum); this.SetParamSimple(map, prefix + "RestartComputeNode", this.RestartComputeNode); this.SetParamSimple(map, prefix + "ResourceMaxRetryCount", this.ResourceMaxRetryCount); } } }