tencentcloud-sdk-nodejs-intl-en
Version:
1,920 lines (1,615 loc) • 185 kB
JavaScript
/*
* 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.
*/
const AbstractModel = require("../../common/abstract_model");
/**
* Custom key-value pair
* @class
*/
class EventVar extends AbstractModel {
constructor(){
super();
/**
* Custom key
* @type {string || null}
*/
this.Name = null;
/**
* Custom value
* @type {string || null}
*/
this.Value = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Name = 'Name' in params ? params.Name : null;
this.Value = 'Value' in params ? params.Value : null;
}
}
/**
* Compute environment
* @class
*/
class AnonymousComputeEnv extends AbstractModel {
constructor(){
super();
/**
* Compute environment management type
* @type {string || null}
*/
this.EnvType = null;
/**
* Compute environment's parameters
* @type {EnvData || null}
*/
this.EnvData = null;
/**
* Data disk mounting option
* @type {Array.<MountDataDisk> || null}
*/
this.MountDataDisks = null;
/**
* Agent running mode; applicable for Windows
* @type {AgentRunningMode || null}
*/
this.AgentRunningMode = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.EnvType = 'EnvType' in params ? params.EnvType : null;
if (params.EnvData) {
let obj = new EnvData();
obj.deserialize(params.EnvData)
this.EnvData = obj;
}
if (params.MountDataDisks) {
this.MountDataDisks = new Array();
for (let z in params.MountDataDisks) {
let obj = new MountDataDisk();
obj.deserialize(params.MountDataDisks[z]);
this.MountDataDisks.push(obj);
}
}
if (params.AgentRunningMode) {
let obj = new AgentRunningMode();
obj.deserialize(params.AgentRunningMode)
this.AgentRunningMode = obj;
}
}
}
/**
* DeleteComputeEnv response structure.
* @class
*/
class DeleteComputeEnvResponse extends AbstractModel {
constructor(){
super();
/**
* The unique request ID, which is returned for each request. RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* Compute environment attributes
* @class
*/
class ComputeEnvData extends AbstractModel {
constructor(){
super();
/**
* List of CVM instance types
* @type {Array.<string> || null}
*/
this.InstanceTypes = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceTypes = 'InstanceTypes' in params ? params.InstanceTypes : null;
}
}
/**
* Authentication information
* @class
*/
class Authentication extends AbstractModel {
constructor(){
super();
/**
* Authentication scenario such as COS
* @type {string || null}
*/
this.Scene = null;
/**
* SecretId
* @type {string || null}
*/
this.SecretId = null;
/**
* SecretKey
* @type {string || null}
*/
this.SecretKey = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Scene = 'Scene' in params ? params.Scene : null;
this.SecretId = 'SecretId' in params ? params.SecretId : null;
this.SecretKey = 'SecretKey' in params ? params.SecretKey : null;
}
}
/**
* RetryJobs response structure.
* @class
*/
class RetryJobsResponse extends AbstractModel {
constructor(){
super();
/**
* The unique request ID, which is returned for each request. RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* TerminateComputeNode request structure.
* @class
*/
class TerminateComputeNodeRequest extends AbstractModel {
constructor(){
super();
/**
* Compute environment ID
* @type {string || null}
*/
this.EnvId = null;
/**
* Compute node ID
* @type {string || null}
*/
this.ComputeNodeId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.EnvId = 'EnvId' in params ? params.EnvId : null;
this.ComputeNodeId = 'ComputeNodeId' in params ? params.ComputeNodeId : null;
}
}
/**
* DescribeTaskLogs request structure.
* @class
*/
class DescribeTaskLogsRequest extends AbstractModel {
constructor(){
super();
/**
* Job ID
* @type {string || null}
*/
this.JobId = null;
/**
* Task name
* @type {string || null}
*/
this.TaskName = null;
/**
* Set of task instances
* @type {Array.<number> || null}
*/
this.TaskInstanceIndexes = null;
/**
* The start point of query
* @type {number || null}
*/
this.Offset = null;
/**
* Maximum number of task instances returned
* @type {number || null}
*/
this.Limit = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.JobId = 'JobId' in params ? params.JobId : null;
this.TaskName = 'TaskName' in params ? params.TaskName : null;
this.TaskInstanceIndexes = 'TaskInstanceIndexes' in params ? params.TaskInstanceIndexes : null;
this.Offset = 'Offset' in params ? params.Offset : null;
this.Limit = 'Limit' in params ? params.Limit : null;
}
}
/**
* Agent running mode
* @class
*/
class AgentRunningMode extends AbstractModel {
constructor(){
super();
/**
* Scenario type. Windows is supported
* @type {string || null}
*/
this.Scene = null;
/**
* The user that runs the Agent
* @type {string || null}
*/
this.User = null;
/**
* The session that runs the Agent
* @type {string || null}
*/
this.Session = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Scene = 'Scene' in params ? params.Scene : null;
this.User = 'User' in params ? params.User : null;
this.Session = 'Session' in params ? params.Session : null;
}
}
/**
* Compute environment information
* @class
*/
class EnvData extends AbstractModel {
constructor(){
super();
/**
* CVM instance type. It cannot be specified together with `InstanceTypes` or `InstanceTypeOptions`.
* @type {string || null}
*/
this.InstanceType = null;
/**
* CVM image ID
* @type {string || null}
*/
this.ImageId = null;
/**
* System disk configuration of the instance
* @type {SystemDisk || null}
*/
this.SystemDisk = null;
/**
* Data disk configuration of the instance
* @type {Array.<DataDisk> || null}
*/
this.DataDisks = null;
/**
* Information of the VPC configuration. It cannot be specified together with `Zones` and `VirtualPrivateClouds`.
* @type {VirtualPrivateCloud || null}
*/
this.VirtualPrivateCloud = null;
/**
* Public network bandwidth configuration
* @type {InternetAccessible || null}
*/
this.InternetAccessible = null;
/**
* CVM instance display name
* @type {string || null}
*/
this.InstanceName = null;
/**
* Instance login settings
* @type {LoginSettings || null}
*/
this.LoginSettings = null;
/**
* Security groups associated with the instance
* @type {Array.<string> || null}
*/
this.SecurityGroupIds = null;
/**
* Whether to activate CWPP agent and Cloud Monitor. CWPP agent and Cloud Monitor are activated by default.
* @type {EnhancedService || null}
*/
this.EnhancedService = null;
/**
* CVM instance billing method <br><li>`POSTPAID_BY_HOUR` (default): Hourly-billed pay-as-you-go <br><li>`SPOTPAID`: Spot instance <br>
* @type {string || null}
*/
this.InstanceChargeType = null;
/**
* Market-related options for instances, such as parameters related to spot instances.
* @type {InstanceMarketOptionsRequest || null}
*/
this.InstanceMarketOptions = null;
/**
* Types of CVM instances to create (up to 10). The system creates compute nodes of types specified in this list from top to down till the creation is successful. It cannot be specified together with `InstanceType` or `InstanceTypeOptions`.
* @type {Array.<string> || null}
*/
this.InstanceTypes = null;
/**
* CVM instance model configuration. It cannot be specified together with `InstanceType` or `InstanceTypes`.
* @type {InstanceTypeOptions || null}
*/
this.InstanceTypeOptions = null;
/**
* List of availability zones. You can create CVM cross AZs in the same region. It cannot be specified together with `VirtualPrivateCloud` or `VirtualPrivateClouds`.
* @type {Array.<string> || null}
*/
this.Zones = null;
/**
* List of VPCs (creation of CVM instances across VPCs is supported). It cannot be specified together with `VirtualPrivateCloud` or `Zones`.
* @type {Array.<VirtualPrivateCloud> || null}
*/
this.VirtualPrivateClouds = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceType = 'InstanceType' in params ? params.InstanceType : null;
this.ImageId = 'ImageId' in params ? params.ImageId : null;
if (params.SystemDisk) {
let obj = new SystemDisk();
obj.deserialize(params.SystemDisk)
this.SystemDisk = obj;
}
if (params.DataDisks) {
this.DataDisks = new Array();
for (let z in params.DataDisks) {
let obj = new DataDisk();
obj.deserialize(params.DataDisks[z]);
this.DataDisks.push(obj);
}
}
if (params.VirtualPrivateCloud) {
let obj = new VirtualPrivateCloud();
obj.deserialize(params.VirtualPrivateCloud)
this.VirtualPrivateCloud = obj;
}
if (params.InternetAccessible) {
let obj = new InternetAccessible();
obj.deserialize(params.InternetAccessible)
this.InternetAccessible = obj;
}
this.InstanceName = 'InstanceName' in params ? params.InstanceName : null;
if (params.LoginSettings) {
let obj = new LoginSettings();
obj.deserialize(params.LoginSettings)
this.LoginSettings = obj;
}
this.SecurityGroupIds = 'SecurityGroupIds' in params ? params.SecurityGroupIds : null;
if (params.EnhancedService) {
let obj = new EnhancedService();
obj.deserialize(params.EnhancedService)
this.EnhancedService = obj;
}
this.InstanceChargeType = 'InstanceChargeType' in params ? params.InstanceChargeType : null;
if (params.InstanceMarketOptions) {
let obj = new InstanceMarketOptionsRequest();
obj.deserialize(params.InstanceMarketOptions)
this.InstanceMarketOptions = obj;
}
this.InstanceTypes = 'InstanceTypes' in params ? params.InstanceTypes : null;
if (params.InstanceTypeOptions) {
let obj = new InstanceTypeOptions();
obj.deserialize(params.InstanceTypeOptions)
this.InstanceTypeOptions = obj;
}
this.Zones = 'Zones' in params ? params.Zones : null;
if (params.VirtualPrivateClouds) {
this.VirtualPrivateClouds = new Array();
for (let z in params.VirtualPrivateClouds) {
let obj = new VirtualPrivateCloud();
obj.deserialize(params.VirtualPrivateClouds[z]);
this.VirtualPrivateClouds.push(obj);
}
}
}
}
/**
* DescribeTaskTemplates request structure.
* @class
*/
class DescribeTaskTemplatesRequest extends AbstractModel {
constructor(){
super();
/**
* List of task template IDs. It cannot be specified together with `Filters`.
* @type {Array.<string> || null}
*/
this.TaskTemplateIds = null;
/**
* Filter
<li> `task-template-name` - String - Optional - Task template name.</li>
<li> `tag-key` - String - Optional - Tag key.</li>
<li> `tag-value` - String - Optional - Tag value.</li>
<li> `tag:tag-key` - String - Optional - Tag key-value pair. The tag-key should be replaced by a specified tag key.</li>
It cannot be specified together with `TaskTemplateIds`.
* @type {Array.<Filter> || null}
*/
this.Filters = null;
/**
* Offset
* @type {number || null}
*/
this.Offset = null;
/**
* Maximum number of returned items
* @type {number || null}
*/
this.Limit = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.TaskTemplateIds = 'TaskTemplateIds' in params ? params.TaskTemplateIds : null;
if (params.Filters) {
this.Filters = new Array();
for (let z in params.Filters) {
let obj = new Filter();
obj.deserialize(params.Filters[z]);
this.Filters.push(obj);
}
}
this.Offset = 'Offset' in params ? params.Offset : null;
this.Limit = 'Limit' in params ? params.Limit : null;
}
}
/**
* Notification information
* @class
*/
class Notification extends AbstractModel {
constructor(){
super();
/**
* CMQ topic name which should be valid and associated with a subscription
* @type {string || null}
*/
this.TopicName = null;
/**
* Event configuration
* @type {Array.<EventConfig> || null}
*/
this.EventConfigs = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.TopicName = 'TopicName' in params ? params.TopicName : null;
if (params.EventConfigs) {
this.EventConfigs = new Array();
for (let z in params.EventConfigs) {
let obj = new EventConfig();
obj.deserialize(params.EventConfigs[z]);
this.EventConfigs.push(obj);
}
}
}
}
/**
* Describes information on the block device where the operating system is stored, i.e., the system disk.
* @class
*/
class SystemDisk extends AbstractModel {
constructor(){
super();
/**
* System disk type. For more information about the limits of system disk types, please see [Storage Overview](https://intl.cloud.tencent.com/document/product/213/4952?from_cn_redirect=1). Valid values:<br><li>LOCAL_BASIC: local disk<br><li>LOCAL_SSD: local SSD disk<br><li>CLOUD_BASIC: HDD cloud disk<br><li>CLOUD_SSD: SSD cloud disk<br><li>CLOUD_PREMIUM: Premium cloud storage<br><li>CLOUD_BSSD: Balanced SSD<br><br>The disk currently in stock will be used by default.
* @type {string || null}
*/
this.DiskType = null;
/**
* System disk ID. System disks whose type is `LOCAL_BASIC` or `LOCAL_SSD` do not have an ID and do not support this parameter.
It is only used as a response parameter for APIs such as `DescribeInstances`, and cannot be used as a request parameter for APIs such as `RunInstances`.
* @type {string || null}
*/
this.DiskId = null;
/**
* System disk size; unit: GB; default value: 50 GB.
* @type {number || null}
*/
this.DiskSize = null;
/**
* ID of the dedicated cluster to which the instance belongs.
* @type {string || null}
*/
this.CdcId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.DiskType = 'DiskType' in params ? params.DiskType : null;
this.DiskId = 'DiskId' in params ? params.DiskId : null;
this.DiskSize = 'DiskSize' in params ? params.DiskSize : null;
this.CdcId = 'CdcId' in params ? params.CdcId : null;
}
}
/**
* Task
* @class
*/
class Task extends AbstractModel {
constructor(){
super();
/**
* Application information
* @type {Application || null}
*/
this.Application = null;
/**
* Task name, which should be unique within a job
* @type {string || null}
*/
this.TaskName = null;
/**
* Number of running task instances
* @type {number || null}
*/
this.TaskInstanceNum = null;
/**
* Compute environment information. One (and only one) parameter must be specified for ComputeEnv and EnvId.
* @type {AnonymousComputeEnv || null}
*/
this.ComputeEnv = null;
/**
* Compute environment ID. One (and only one) parameter must be specified for ComputeEnv and EnvId.
* @type {string || null}
*/
this.EnvId = null;
/**
* Redirection information
* @type {RedirectInfo || null}
*/
this.RedirectInfo = null;
/**
* Local redirection information
* @type {RedirectLocalInfo || null}
*/
this.RedirectLocalInfo = null;
/**
* Input mapping
* @type {Array.<InputMapping> || null}
*/
this.InputMappings = null;
/**
* Output mapping
* @type {Array.<OutputMapping> || null}
*/
this.OutputMappings = null;
/**
* Output mapping configuration
* @type {Array.<OutputMappingConfig> || null}
*/
this.OutputMappingConfigs = null;
/**
* Custom environment variable
* @type {Array.<EnvVar> || null}
*/
this.EnvVars = null;
/**
* Authorization information
* @type {Array.<Authentication> || null}
*/
this.Authentications = null;
/**
* The processing method after the TaskInstance fails; Value range: `TERMINATE` (default), `INTERRUPT`, `FAST_INTERRUPT`.
* @type {string || null}
*/
this.FailedAction = null;
/**
* The maximum number of retries after the task fails. Range: 0 - 5. Default value: 0
* @type {number || null}
*/
this.MaxRetryCount = null;
/**
* Timeout period of the task in seconds. Defaults value: 86400
* @type {number || null}
*/
this.Timeout = null;
/**
* The maximum number of concurrent tasks. Range: 0 - 200000. There is no limit by default.
* @type {number || null}
*/
this.MaxConcurrentNum = null;
/**
* Restarts the compute node after the task is completed. This is suitable for specifying the compute environment for task execution.
* @type {boolean || null}
*/
this.RestartComputeNode = null;
/**
* Maximum number of retry attempts after failing to create computing resources such as the CVM in the task launch process. Default: `0`; Maximum: `100`.
* @type {number || null}
*/
this.ResourceMaxRetryCount = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
if (params.Application) {
let obj = new Application();
obj.deserialize(params.Application)
this.Application = obj;
}
this.TaskName = 'TaskName' in params ? params.TaskName : null;
this.TaskInstanceNum = 'TaskInstanceNum' in params ? params.TaskInstanceNum : null;
if (params.ComputeEnv) {
let obj = new AnonymousComputeEnv();
obj.deserialize(params.ComputeEnv)
this.ComputeEnv = obj;
}
this.EnvId = 'EnvId' in params ? params.EnvId : null;
if (params.RedirectInfo) {
let obj = new RedirectInfo();
obj.deserialize(params.RedirectInfo)
this.RedirectInfo = obj;
}
if (params.RedirectLocalInfo) {
let obj = new RedirectLocalInfo();
obj.deserialize(params.RedirectLocalInfo)
this.RedirectLocalInfo = obj;
}
if (params.InputMappings) {
this.InputMappings = new Array();
for (let z in params.InputMappings) {
let obj = new InputMapping();
obj.deserialize(params.InputMappings[z]);
this.InputMappings.push(obj);
}
}
if (params.OutputMappings) {
this.OutputMappings = new Array();
for (let z in params.OutputMappings) {
let obj = new OutputMapping();
obj.deserialize(params.OutputMappings[z]);
this.OutputMappings.push(obj);
}
}
if (params.OutputMappingConfigs) {
this.OutputMappingConfigs = new Array();
for (let z in params.OutputMappingConfigs) {
let obj = new OutputMappingConfig();
obj.deserialize(params.OutputMappingConfigs[z]);
this.OutputMappingConfigs.push(obj);
}
}
if (params.EnvVars) {
this.EnvVars = new Array();
for (let z in params.EnvVars) {
let obj = new EnvVar();
obj.deserialize(params.EnvVars[z]);
this.EnvVars.push(obj);
}
}
if (params.Authentications) {
this.Authentications = new Array();
for (let z in params.Authentications) {
let obj = new Authentication();
obj.deserialize(params.Authentications[z]);
this.Authentications.push(obj);
}
}
this.FailedAction = 'FailedAction' in params ? params.FailedAction : null;
this.MaxRetryCount = 'MaxRetryCount' in params ? params.MaxRetryCount : null;
this.Timeout = 'Timeout' in params ? params.Timeout : null;
this.MaxConcurrentNum = 'MaxConcurrentNum' in params ? params.MaxConcurrentNum : null;
this.RestartComputeNode = 'RestartComputeNode' in params ? params.RestartComputeNode : null;
this.ResourceMaxRetryCount = 'ResourceMaxRetryCount' in params ? params.ResourceMaxRetryCount : null;
}
}
/**
* Information of InstanceTypeConfig available to BatchCompute
* @class
*/
class InstanceTypeConfig extends AbstractModel {
constructor(){
super();
/**
* Memory size in GB.
* @type {number || null}
*/
this.Mem = null;
/**
* Number of CPU cores.
* @type {number || null}
*/
this.Cpu = null;
/**
* Instance model.
* @type {string || null}
*/
this.InstanceType = null;
/**
* Availability zone.
* @type {string || null}
*/
this.Zone = null;
/**
* Instance model family.
* @type {string || null}
*/
this.InstanceFamily = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Mem = 'Mem' in params ? params.Mem : null;
this.Cpu = 'Cpu' in params ? params.Cpu : null;
this.InstanceType = 'InstanceType' in params ? params.InstanceType : null;
this.Zone = 'Zone' in params ? params.Zone : null;
this.InstanceFamily = 'InstanceFamily' in params ? params.InstanceFamily : null;
}
}
/**
* Additional data
* @class
*/
class Externals extends AbstractModel {
constructor(){
super();
/**
* Release address
Note: This field may return null, indicating that no valid value is found.
* @type {boolean || null}
*/
this.ReleaseAddress = null;
/**
* Not supported network. Value: <br><li>BASIC: classic network<br><li>VPC1.0: VPC1.0
Note: This field may return null, indicating that no valid value was found.
* @type {Array.<string> || null}
*/
this.UnsupportNetworks = null;
/**
* Attributes of local HDD storage
Note: This field may return null, indicating that no valid value is found.
* @type {StorageBlock || null}
*/
this.StorageBlockAttr = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.ReleaseAddress = 'ReleaseAddress' in params ? params.ReleaseAddress : null;
this.UnsupportNetworks = 'UnsupportNetworks' in params ? params.UnsupportNetworks : null;
if (params.StorageBlockAttr) {
let obj = new StorageBlock();
obj.deserialize(params.StorageBlockAttr)
this.StorageBlockAttr = obj;
}
}
}
/**
* TerminateComputeNodes response structure.
* @class
*/
class TerminateComputeNodesResponse extends AbstractModel {
constructor(){
super();
/**
* The unique request ID, which is returned for each request. RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* DescribeComputeEnvActivities response structure.
* @class
*/
class DescribeComputeEnvActivitiesResponse extends AbstractModel {
constructor(){
super();
/**
* List of activities in the compute environment
* @type {Array.<Activity> || null}
*/
this.ActivitySet = null;
/**
* Number of activities
* @type {number || null}
*/
this.TotalCount = null;
/**
* The unique request ID, which is returned for each request. RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
if (params.ActivitySet) {
this.ActivitySet = new Array();
for (let z in params.ActivitySet) {
let obj = new Activity();
obj.deserialize(params.ActivitySet[z]);
this.ActivitySet.push(obj);
}
}
this.TotalCount = 'TotalCount' in params ? params.TotalCount : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* Task instance statistical metrics
* @class
*/
class TaskInstanceMetrics extends AbstractModel {
constructor(){
super();
/**
* Number of submitted tasks
* @type {number || null}
*/
this.SubmittedCount = null;
/**
* Number of pending tasks
* @type {number || null}
*/
this.PendingCount = null;
/**
* Number of Runnable tasks
* @type {number || null}
*/
this.RunnableCount = null;
/**
* Number of starting tasks
* @type {number || null}
*/
this.StartingCount = null;
/**
* Number of running tasks
* @type {number || null}
*/
this.RunningCount = null;
/**
* Number of successful tasks
* @type {number || null}
*/
this.SucceedCount = null;
/**
* Number of failed and interrupted tasks
* @type {number || null}
*/
this.FailedInterruptedCount = null;
/**
* Number of failed tasks
* @type {number || null}
*/
this.FailedCount = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.SubmittedCount = 'SubmittedCount' in params ? params.SubmittedCount : null;
this.PendingCount = 'PendingCount' in params ? params.PendingCount : null;
this.RunnableCount = 'RunnableCount' in params ? params.RunnableCount : null;
this.StartingCount = 'StartingCount' in params ? params.StartingCount : null;
this.RunningCount = 'RunningCount' in params ? params.RunningCount : null;
this.SucceedCount = 'SucceedCount' in params ? params.SucceedCount : null;
this.FailedInterruptedCount = 'FailedInterruptedCount' in params ? params.FailedInterruptedCount : null;
this.FailedCount = 'FailedCount' in params ? params.FailedCount : null;
}
}
/**
* Task instance log details.
* @class
*/
class TaskInstanceLog extends AbstractModel {
constructor(){
super();
/**
* Task instance
* @type {number || null}
*/
this.TaskInstanceIndex = null;
/**
* Standard output log (Base64-encoded, up to 2048 bytes after decompression)
Note: This field may return `null`, indicating that no valid value was found.
* @type {string || null}
*/
this.StdoutLog = null;
/**
* Standard error log (Base64-encoded, up to 2048 bytes after decompression)
Note: This field may return `null`, indicating that no valid value was found.
* @type {string || null}
*/
this.StderrLog = null;
/**
* Standard output redirection path
Note: This field may return `null`, indicating that no valid value was found.
* @type {string || null}
*/
this.StdoutRedirectPath = null;
/**
* Standard error redirection path
Note: This field may return `null`, indicating that no valid value was found.
* @type {string || null}
*/
this.StderrRedirectPath = null;
/**
* Standard output redirection file name
Note: This field may return `null`, indicating that no valid value was found.
* @type {string || null}
*/
this.StdoutRedirectFileName = null;
/**
* Standard error redirection file name
Note: This field may return `null`, indicating that no valid value was found.
* @type {string || null}
*/
this.StderrRedirectFileName = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.TaskInstanceIndex = 'TaskInstanceIndex' in params ? params.TaskInstanceIndex : null;
this.StdoutLog = 'StdoutLog' in params ? params.StdoutLog : null;
this.StderrLog = 'StderrLog' in params ? params.StderrLog : null;
this.StdoutRedirectPath = 'StdoutRedirectPath' in params ? params.StdoutRedirectPath : null;
this.StderrRedirectPath = 'StderrRedirectPath' in params ? params.StderrRedirectPath : null;
this.StdoutRedirectFileName = 'StdoutRedirectFileName' in params ? params.StdoutRedirectFileName : null;
this.StderrRedirectFileName = 'StderrRedirectFileName' in params ? params.StderrRedirectFileName : null;
}
}
/**
* Data disk mounting option
* @class
*/
class MountDataDisk extends AbstractModel {
constructor(){
super();
/**
* Mounting point. A valid path (for Linux) for a drive (for Windows, such as "H:\\")
* @type {string || null}
*/
this.LocalPath = null;
/**
* File system type. Linux: `EXT3` (default) and `EXT4`. Windows: `NTFS`
* @type {string || null}
*/
this.FileSystemType = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.LocalPath = 'LocalPath' in params ? params.LocalPath : null;
this.FileSystemType = 'FileSystemType' in params ? params.FileSystemType : null;
}
}
/**
* Task view information
* @class
*/
class TaskView extends AbstractModel {
constructor(){
super();
/**
* Task name
* @type {string || null}
*/
this.TaskName = null;
/**
* Task status
* @type {string || null}
*/
this.TaskState = null;
/**
* Start time
* @type {string || null}
*/
this.CreateTime = null;
/**
* End time
Note: This field may return `null`, indicating that no valid value was found.
* @type {string || null}
*/
this.EndTime = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.TaskName = 'TaskName' in params ? params.TaskName : null;
this.TaskState = 'TaskState' in params ? params.TaskState : null;
this.CreateTime = 'CreateTime' in params ? params.CreateTime : null;
this.EndTime = 'EndTime' in params ? params.EndTime : null;
}
}
/**
* Information on tags
* @class
*/
class Tag extends AbstractModel {
constructor(){
super();
/**
* Tag key
Note: This field may return `null`, indicating that no valid value was found.
* @type {string || null}
*/
this.Key = null;
/**
* Tag value
Note: This field may return `null`, indicating that no valid value was found.
* @type {string || null}
*/
this.Value = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Key = 'Key' in params ? params.Key : null;
this.Value = 'Value' in params ? params.Value : null;
}
}
/**
* DescribeComputeEnv response structure.
* @class
*/
class DescribeComputeEnvResponse extends AbstractModel {
constructor(){
super();
/**
* Compute environment ID
* @type {string || null}
*/
this.EnvId = null;
/**
* Compute environment name
* @type {string || null}
*/
this.EnvName = null;
/**
* Location information
* @type {Placement || null}
*/
this.Placement = null;
/**
* Compute environment creation time
* @type {string || null}
*/
this.CreateTime = null;
/**
* List of compute nodes
* @type {Array.<ComputeNode> || null}
*/
this.ComputeNodeSet = null;
/**
* Compute node statistical metrics
* @type {ComputeNodeMetrics || null}
*/
this.ComputeNodeMetrics = null;
/**
* Number of desired compute nodes
* @type {number || null}
*/
this.DesiredComputeNodeCount = null;
/**
* Compute environment type
* @type {string || null}
*/
this.EnvType = null;
/**
* Compute environment resource type. Values: `CVM`, `CPM` (Bare Metal)
* @type {string || null}
*/
this.ResourceType = null;
/**
* Next action
* @type {string || null}
*/
this.NextAction = null;
/**
* Number of compute nodes added to the compute environment
* @type {number || null}
*/
this.AttachedComputeNodeCount = null;
/**
* Tag list bound to the compute environment.
Note: This field may return `null`, indicating that no valid value was found.
* @type {Array.<Tag> || null}
*/
this.Tags = null;
/**
* The unique request ID, which is returned for each request. RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.EnvId = 'EnvId' in params ? params.EnvId : null;
this.EnvName = 'EnvName' in params ? params.EnvName : null;
if (params.Placement) {
let obj = new Placement();
obj.deserialize(params.Placement)
this.Placement = obj;
}
this.CreateTime = 'CreateTime' in params ? params.CreateTime : null;
if (params.ComputeNodeSet) {
this.ComputeNodeSet = new Array();
for (let z in params.ComputeNodeSet) {
let obj = new ComputeNode();
obj.deserialize(params.ComputeNodeSet[z]);
this.ComputeNodeSet.push(obj);
}
}
if (params.ComputeNodeMetrics) {
let obj = new ComputeNodeMetrics();
obj.deserialize(params.ComputeNodeMetrics)
this.ComputeNodeMetrics = obj;
}
this.DesiredComputeNodeCount = 'DesiredComputeNodeCount' in params ? params.DesiredComputeNodeCount : null;
this.EnvType = 'EnvType' in params ? params.EnvType : null;
this.ResourceType = 'ResourceType' in params ? params.ResourceType : null;
this.NextAction = 'NextAction' in params ? params.NextAction : null;
this.AttachedComputeNodeCount = 'AttachedComputeNodeCount' in params ? params.AttachedComputeNodeCount : null;
if (params.Tags) {
this.Tags = new Array();
for (let z in params.Tags) {
let obj = new Tag();
obj.deserialize(params.Tags[z]);
this.Tags.push(obj);
}
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* TerminateJob request structure.
* @class
*/
class TerminateJobRequest extends AbstractModel {
constructor(){
super();
/**
* Job ID
* @type {string || null}
*/
this.JobId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.JobId = 'JobId' in params ? params.JobId : null;
}
}
/**
* DetachInstances response structure.
* @class
*/
class DetachInstancesResponse extends AbstractModel {
constructor(){
super();
/**
* The unique request ID, which is returned for each request. RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* Application information
* @class
*/
class Application extends AbstractModel {
constructor(){
super();
/**
* Task execution command
* @type {string || null}
*/
this.Command = null;
/**
* Delivery form of the application. Values: `PACKAGE` (package stored in a remote location), `LOCAL` (local computer).
* @type {string || null}
*/
this.DeliveryForm = null;
/**
* Remote storage path of the application package
* @type {string || null}
*/
this.PackagePath = null;
/**
* Relevant configuration of the Docker used by the application. In case that the Docker configuration is used, "LOCAL" DeliveryForm means that the application software inside the Docker image is used directly and run in Docker mode; "PACKAGE" DeliveryForm means that the remote application package is run in Docker mode after being injected into the Docker image. To avoid compatibility issues with different versions of Docker, the Docker installation package and relevant dependencies are taken care of by BatchCompute. For custom images where Docker has already been installed, uninstall Docker first and then use the Docker feature.
* @type {Docker || null}
*/
this.Docker = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Command = 'Command' in params ? params.Command : null;
this.DeliveryForm = 'DeliveryForm' in params ? params.DeliveryForm : null;
this.PackagePath = 'PackagePath' in params ? params.PackagePath : null;
if (params.Docker) {
let obj = new Docker();
obj.deserialize(params.Docker)
this.Docker = obj;
}
}
}
/**
* Output mapping configuration
* @class
*/
class OutputMappingConfig extends AbstractModel {
constructor(){
super();
/**
* Storage type. Only `COS` is supported.
* @type {string || null}
*/
this.Scene = null;
/**
* Number of concurrent workers
* @type {number || null}
*/
this.WorkerNum = null;
/**
* Size of a worker part, in MB.
* @type {number || null}
*/
this.WorkerPartSize = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Scene = 'Scene' in params ? params.Scene : null;
this.WorkerNum = 'WorkerNum' in params ? params.WorkerNum : null;
this.WorkerPartSize = 'WorkerPartSize' in params ? params.WorkerPartSize : null;
}
}
/**
* AttachInstances response structure.
* @class
*/
class AttachInstancesResponse extends AbstractModel {
constructor(){
super();
/**
* The unique request ID, which is returned for each request. RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* Compute node statistical metrics
* @class
*/
class ComputeNodeMetrics extends AbstractModel {
constructor(){
super();
/**
* Number of compute nodes that have been submitted
* @type {number || null}
*/
this.SubmittedCount = null;
/**
* Number of compute nodes that are being created
* @type {number || null}
*/
this.CreatingCount = null;
/**
* Number of compute nodes that failed to be created
* @type {number || null}
*/
this.CreationFailedCount = null;
/**
* Number of compute nodes that have been created
* @type {number || null}
*/
this.CreatedCount = null;
/**
* Number of running compute nodes
* @type {number || null}
*/
this.RunningCount = null;
/**
* Number of compute nodes that are being terminated
* @type {number || null}
*/
this.DeletingCount = null;
/**
* Number of exceptional compute nodes
* @type {number || null}
*/
this.AbnormalCount = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.SubmittedCount = 'SubmittedCount' in params ? params.SubmittedCount : null;
this.CreatingCount = 'CreatingCount' in params ? params.CreatingCount : null;
this.CreationFailedCount = 'CreationFailedCount' in params ? params.CreationFailedCount : null;
this.CreatedCount = 'CreatedCount' in params ? params.CreatedCount : null;
this.RunningCount = 'RunningCount' in params ? params.RunningCount : null;
this.DeletingCount = 'DeletingCount' in params ? params.DeletingCount : null;
this.AbnormalCount = 'AbnormalCount' in params ? params.AbnormalCount : null;
}
}
/**
* Task statistical metrics
* @class
*/
class TaskMetrics extends AbstractModel {
constructor(){
super();
/**
* Number of submitted tasks
* @type {number || null}
*/
this.SubmittedCount = null;
/**
* Number of pending tasks
* @type {number || null}
*/
this.PendingCount = null;
/**
* Number of Runnable tasks
* @type {number || null}
*/
this.RunnableCount = null;
/**
* Number of starting tasks
* @type {number || null}
*/
this.StartingCount = null;
/**
* Number of running tasks
* @type {number || null}
*/
this.RunningCount = null;
/**
* Number of successful tasks
* @type {number || null}
*/
this.SucceedCount = null;
/**
* Number of failed and interrupted tasks
* @type {number || null}
*/
this.FailedInterruptedCount = null;
/**
* Failed count
* @type {number || null}
*/
this.FailedCount = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.SubmittedCount = 'SubmittedCount' in params ? params.SubmittedCount : null;
this.PendingCount = 'PendingCount' in params ? params.PendingCount : null;
this.RunnableCount = 'RunnableCount' in params ? params.RunnableCount : null;
this.StartingCount = 'StartingCount' in params ? params.StartingCount : null;
this.RunningCount = 'RunningCount' in params ? params.RunningCount : null;
this.SucceedCount = 'SucceedCount' in params ? params.SucceedCount : null;
this.FailedInterruptedCount = 'FailedInterruptedCount' in params ? params.FailedInterruptedCount : null;
this.FailedCount = 'FailedCount' in params ? params.FailedCount : null;
}
}
/**
* TerminateComputeNodes request structure.
* @class
*/
class TerminateComputeNodesRequest extends AbstractModel {
constructor(){
super();
/**
* Compute environment ID
* @type {string || null}
*/
this.EnvId = null;
/**
* List of compute node IDs
* @type {Array.<string> || null}
*/
this.ComputeNodeIds = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.EnvId = 'EnvId' in params ? params.EnvId : null;
this.ComputeNodeIds = 'ComputeNodeIds' in params ? params.ComputeNodeIds : null;
}
}
/**
* Describes local disk specifications.
* @class
*/
class LocalDiskType extends AbstractModel {
constructor(){
super();
/**
* Type of a local disk.
* @type {string || null}
*/
this.Type = null;
/**
* Attributes of a local disk.
* @type {string || null}
*/
this.PartitionType = null;
/**
* Minimum size of a local disk.
* @type {number || null}
*/
this.MinSize = null;
/**
* Maximum size of a local disk.
* @type {number || null}
*/
this.MaxSize = null;
/**
* Whether a local disk is required during purchase. Valid values:<br><li>REQUIRED: required<br><li>OPTIONAL: optional
* @type {string || n