UNPKG

tencentcloud-sdk-nodejs-intl-en

Version:
1,729 lines (1,432 loc) • 135 kB
/* * Copyright (c) 2018 Tencent. 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"); /** * Settings of a scheduled invoker * @class */ class ScheduleSettings extends AbstractModel { constructor(){ super(); /** * Execution policy. - ONCE: one-time execution. - RECURRENCE: execute periodically. * @type {string || null} */ this.Policy = null; /** * Trigger the crontab expression. This field is required if `Policy` is `RECURRENCE`. The crontab expression is parsed in UTC+8. * @type {string || null} */ this.Recurrence = null; /** * Next execution time of the executor. this field requires specifying when Policy is ONCE. The time format is YYYY-MM-DDThh:MM:ssZ. * @type {string || null} */ this.InvokeTime = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.Policy = 'Policy' in params ? params.Policy : null; this.Recurrence = 'Recurrence' in params ? params.Recurrence : null; this.InvokeTime = 'InvokeTime' in params ? params.InvokeTime : null; } } /** * CreateRegisterCode response structure. * @class */ class CreateRegisterCodeResponse extends AbstractModel { constructor(){ super(); /** * Registration code ID. * @type {string || null} */ this.RegisterCodeId = null; /** * Registration code value. * @type {string || null} */ this.RegisterCodeValue = null; /** * The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. * @type {string || null} */ this.RequestId = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.RegisterCodeId = 'RegisterCodeId' in params ? params.RegisterCodeId : null; this.RegisterCodeValue = 'RegisterCodeValue' in params ? params.RegisterCodeValue : null; this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * PreviewReplacedCommandContent response structure. * @class */ class PreviewReplacedCommandContentResponse extends AbstractModel { constructor(){ super(); /** * Base64-encoded command with custom parameters. * @type {string || null} */ this.ReplacedContent = null; /** * The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. * @type {string || null} */ this.RequestId = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.ReplacedContent = 'ReplacedContent' in params ? params.ReplacedContent : null; this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * CreateCommand response structure. * @class */ class CreateCommandResponse extends AbstractModel { constructor(){ super(); /** * Command ID. * @type {string || null} */ this.CommandId = null; /** * The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. * @type {string || null} */ this.RequestId = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.CommandId = 'CommandId' in params ? params.CommandId : null; this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * DisableInvoker request structure. * @class */ class DisableInvokerRequest extends AbstractModel { constructor(){ super(); /** * ID of the executor to terminate. Call the [DescribeInvokers](https://www.tencentcloud.com/document/api/1340/61759?from_cn_redirect=1) api to query execution. * @type {string || null} */ this.InvokerId = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.InvokerId = 'InvokerId' in params ? params.InvokerId : null; } } /** * Register instance info. * @class */ class RegisterInstanceInfo extends AbstractModel { constructor(){ super(); /** * Registration code ID. * @type {string || null} */ this.RegisterCodeId = null; /** * Managed instance ID. * @type {string || null} */ this.InstanceId = null; /** * Managed instance name. * @type {string || null} */ this.InstanceName = null; /** * Machine ID. * @type {string || null} */ this.MachineId = null; /** * System name. valid values: Linux | Windows. * @type {string || null} */ this.SystemName = null; /** * Host name. * @type {string || null} */ this.HostName = null; /** * Private network IP * @type {string || null} */ this.LocalIp = null; /** * Public key. * @type {string || null} */ this.PublicKey = null; /** * Hosting status. Return Online means the instance is managed, return Offline means the instance is unhosted. * @type {string || null} */ this.Status = null; /** * Creation time. the format is YYYY-MM-DDThh:MM:ssZ. * @type {string || null} */ this.CreatedTime = null; /** * Last update time. the format is YYYY-MM-DDThh:MM:ssZ. * @type {string || null} */ this.UpdatedTime = null; /** * Tag. * @type {Array.<Tag> || null} */ this.Tags = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.RegisterCodeId = 'RegisterCodeId' in params ? params.RegisterCodeId : null; this.InstanceId = 'InstanceId' in params ? params.InstanceId : null; this.InstanceName = 'InstanceName' in params ? params.InstanceName : null; this.MachineId = 'MachineId' in params ? params.MachineId : null; this.SystemName = 'SystemName' in params ? params.SystemName : null; this.HostName = 'HostName' in params ? params.HostName : null; this.LocalIp = 'LocalIp' in params ? params.LocalIp : null; this.PublicKey = 'PublicKey' in params ? params.PublicKey : null; this.Status = 'Status' in params ? params.Status : null; this.CreatedTime = 'CreatedTime' in params ? params.CreatedTime : null; this.UpdatedTime = 'UpdatedTime' in params ? params.UpdatedTime : 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); } } } } /** * TAT agent information * @class */ class AutomationAgentInfo extends AbstractModel { constructor(){ super(); /** * Instance ID. * @type {string || null} */ this.InstanceId = null; /** * Agent version. * @type {string || null} */ this.Version = null; /** * Last heartbeat time * @type {string || null} */ this.LastHeartbeatTime = null; /** * Agent status. valid values:. Online: Online, Offline: Offline. * @type {string || null} */ this.AgentStatus = null; /** * Agent execution environment. valid values: Linux: Linux instance. Windows: Windows instance. * @type {string || null} */ this.Environment = null; /** * Features supported by the TAT agent. * @type {Array.<string> || null} */ this.SupportFeatures = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.InstanceId = 'InstanceId' in params ? params.InstanceId : null; this.Version = 'Version' in params ? params.Version : null; this.LastHeartbeatTime = 'LastHeartbeatTime' in params ? params.LastHeartbeatTime : null; this.AgentStatus = 'AgentStatus' in params ? params.AgentStatus : null; this.Environment = 'Environment' in params ? params.Environment : null; this.SupportFeatures = 'SupportFeatures' in params ? params.SupportFeatures : null; } } /** * DisableRegisterCodes request structure. * @class */ class DisableRegisterCodesRequest extends AbstractModel { constructor(){ super(); /** * Registration code ID. Call the [DescribeRegisterCodes](https://www.tencentcloud.com/document/api/1340/96925?from_cn_redirect=1) api to query registration codes. * @type {Array.<string> || null} */ this.RegisterCodeIds = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.RegisterCodeIds = 'RegisterCodeIds' in params ? params.RegisterCodeIds : null; } } /** * DescribeRegisterInstances request structure. * @class */ class DescribeRegisterInstancesRequest extends AbstractModel { constructor(){ super(); /** * Managed instance id. The maximum per request is 100. Parameters must not be specified simultaneously `InstanceIds` and `Filters`. * @type {Array.<string> || null} */ this.InstanceIds = null; /** * Filter list. the maximum number of `Filters` is 10 per request, and the maximum number of `Filter.Values` is 5. parameters must not be specified simultaneously for `InstanceIds` and `Filters`. - instance-name Filter by [managed instance name]. Type: String. Required: No - instance-id Filter by [managed instance ID]. Type: String. Required: No - register-status Filter by [managed instance status]. valid values: Online | Offline. Type: String. Required: No - local-ip Filter by [managed instance nic IP]. Type: String. Required: No - register-code-id Filter by [managed instance registration code ID]. call the [DescribeRegisterCodes](https://www.tencentcloud.com/document/api/1340/96925?from_cn_redirect=1) api to query registration codes. Type: String. Required: No - sys-name Filter by [operating system type]. valid values: Linux | Windows. Type: String. Required: No - tag-key Filter by [tag key]. Type: String. Required: No - tag-value Filter by [tag value]. Type: String. Required: No - tag:tag-key Filter by [tag key-value pair]. replace tag-key with a specific Tag key. Type: String. Required: No For example, the Filter is {"Name": "tag:key1", "Values": ["v1", "v2"] }, which queries all resources belonging to tag key1:v1 or key1:v2. * @type {Array.<Filter> || null} */ this.Filters = null; /** * Offset. default value: 0. * @type {number || null} */ this.Offset = null; /** * Number of returned results, defaults to 20, maximum value is 100. * @type {number || null} */ this.Limit = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.InstanceIds = 'InstanceIds' in params ? params.InstanceIds : 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; } } /** * DeleteRegisterCodes request structure. * @class */ class DeleteRegisterCodesRequest extends AbstractModel { constructor(){ super(); /** * Registration code ID list. limits the input registration code ID quantity to more than 0 and less than 100. Call the [DescribeRegisterCodes](https://www.tencentcloud.com/document/api/1340/96925?from_cn_redirect=1) api to query registration codes. * @type {Array.<string> || null} */ this.RegisterCodeIds = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.RegisterCodeIds = 'RegisterCodeIds' in params ? params.RegisterCodeIds : null; } } /** * Execution activity details. * @class */ class Invocation extends AbstractModel { constructor(){ super(); /** * Execution activity ID. * @type {string || null} */ this.InvocationId = null; /** * Command ID. * @type {string || null} */ this.CommandId = null; /** * Name of the executed command. * @type {string || null} */ this.CommandName = null; /** * Execution task status. valid values:. - PENDING: waiting for distribution. - RUNNING: command is running. - CANCELLING: canceling. - SUCCESS: command success. - TIMEOUT: command timeout. - FAILED: command FAILED. - CANCELLED: all commands canceled. - PARTIAL_FAILED: the command partially failed. - PARTIAL_CANCELLED: the command is partially canceled. * @type {string || null} */ this.InvocationStatus = null; /** * Execution task information list. * @type {Array.<InvocationTaskBasicInfo> || null} */ this.InvocationTaskBasicInfoSet = null; /** * Execution activity description. * @type {string || null} */ this.Description = null; /** * Execute the activity start time. the format is YYYY-MM-DDThh:MM:ssZ. * @type {string || null} */ this.StartTime = null; /** * Execute activity end time. format: YYYY-MM-DDThh:MM:ssZ. Note: This field may return null, indicating that no valid values can be obtained. * @type {string || null} */ this.EndTime = null; /** * Execution activity createtime. format: YYYY-MM-DDThh:MM:ssZ. * @type {string || null} */ this.CreatedTime = null; /** * Update time of the execution activity. the format is YYYY-MM-DDThh:MM:ssZ. * @type {string || null} */ this.UpdatedTime = null; /** * Values of custom parameters. * @type {string || null} */ this.Parameters = null; /** * Default custom parameter value. * @type {string || null} */ this.DefaultParameters = null; /** * Type of the instance executing the command. Valid values: `CVM`, `LIGHTHOUSE`. * @type {string || null} */ this.InstanceKind = null; /** * The user who executes the command on the instance. * @type {string || null} */ this.Username = null; /** * Invocation source. - USER: originate from user invocation. - INVOKER: originate from scheduled execution. * @type {string || null} */ this.InvocationSource = null; /** * Base64-encoded command * @type {string || null} */ this.CommandContent = null; /** * Command type * @type {string || null} */ this.CommandType = null; /** * Command timeout period, in seconds. * @type {number || null} */ this.Timeout = null; /** * Working directory for executing the command. * @type {string || null} */ this.WorkingDirectory = null; /** * The COS bucket URL for uploading logs. * @type {string || null} */ this.OutputCOSBucketUrl = null; /** * The COS bucket directory where the logs are saved. * @type {string || null} */ this.OutputCOSKeyPrefix = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.InvocationId = 'InvocationId' in params ? params.InvocationId : null; this.CommandId = 'CommandId' in params ? params.CommandId : null; this.CommandName = 'CommandName' in params ? params.CommandName : null; this.InvocationStatus = 'InvocationStatus' in params ? params.InvocationStatus : null; if (params.InvocationTaskBasicInfoSet) { this.InvocationTaskBasicInfoSet = new Array(); for (let z in params.InvocationTaskBasicInfoSet) { let obj = new InvocationTaskBasicInfo(); obj.deserialize(params.InvocationTaskBasicInfoSet[z]); this.InvocationTaskBasicInfoSet.push(obj); } } this.Description = 'Description' in params ? params.Description : null; this.StartTime = 'StartTime' in params ? params.StartTime : null; this.EndTime = 'EndTime' in params ? params.EndTime : null; this.CreatedTime = 'CreatedTime' in params ? params.CreatedTime : null; this.UpdatedTime = 'UpdatedTime' in params ? params.UpdatedTime : null; this.Parameters = 'Parameters' in params ? params.Parameters : null; this.DefaultParameters = 'DefaultParameters' in params ? params.DefaultParameters : null; this.InstanceKind = 'InstanceKind' in params ? params.InstanceKind : null; this.Username = 'Username' in params ? params.Username : null; this.InvocationSource = 'InvocationSource' in params ? params.InvocationSource : null; this.CommandContent = 'CommandContent' in params ? params.CommandContent : null; this.CommandType = 'CommandType' in params ? params.CommandType : null; this.Timeout = 'Timeout' in params ? params.Timeout : null; this.WorkingDirectory = 'WorkingDirectory' in params ? params.WorkingDirectory : null; this.OutputCOSBucketUrl = 'OutputCOSBucketUrl' in params ? params.OutputCOSBucketUrl : null; this.OutputCOSKeyPrefix = 'OutputCOSKeyPrefix' in params ? params.OutputCOSKeyPrefix : null; } } /** * User quota information. * @class */ class GeneralResourceQuotaSet extends AbstractModel { constructor(){ super(); /** * Resource name Value is:. - COMMAND: COMMAND. - REGISTER_CODE: managed instance registration code. * @type {string || null} */ this.ResourceName = null; /** * Used credit limit. * @type {number || null} */ this.ResourceQuotaUsed = null; /** * Total quota. * @type {number || null} */ this.ResourceQuotaTotal = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.ResourceName = 'ResourceName' in params ? params.ResourceName : null; this.ResourceQuotaUsed = 'ResourceQuotaUsed' in params ? params.ResourceQuotaUsed : null; this.ResourceQuotaTotal = 'ResourceQuotaTotal' in params ? params.ResourceQuotaTotal : null; } } /** * RunCommand request structure. * @class */ class RunCommandRequest extends AbstractModel { constructor(){ super(); /** * Base64-encoded command. The maximum length is 64 KB. * @type {string || null} */ this.Content = null; /** * Instance ID list for the command to be executed, with a cap of 200. Instance ID can be obtained through the query instance interface of corresponding cloud services. currently supported instance types:. - CVM - Lighthouse -TAT register instance. * @type {Array.<string> || null} */ this.InstanceIds = null; /** * Command name. The name can be up to 60 bytes, and contain [a-z], [A-Z], [0-9] and [_-.]. * @type {string || null} */ this.CommandName = null; /** * Command description. The maximum length is 120 characters. * @type {string || null} */ this.Description = null; /** * Command type. currently supports SHELL, POWERSHELL, BAT. default: SHELL. * @type {string || null} */ this.CommandType = null; /** * Command execution path. The default value is /root for `SHELL` commands and C:\Program Files\qcloud\tat_agent\workdir for `POWERSHELL` commands. * @type {string || null} */ this.WorkingDirectory = null; /** * Command timeout period. Default value: 60 seconds. Value range: [1, 86400]. * @type {number || null} */ this.Timeout = null; /** * Whether to save the command. value range:. <li>true: save</li>. <li>false: not saved.</li>. The default value is false. * @type {boolean || null} */ this.SaveCommand = null; /** * Whether to enable the custom parameter feature. Once created, this value does not offer modification. Valid values:. <li>true: enable</li>. <li>false: disabled.</li>. The default value is false. * @type {boolean || null} */ this.EnableParameter = null; /** * Enable the custom parameter feature. default value of the custom parameter. field type is json encoded string. for example: {"varA": "222"}. The key is the custom parameter name, and the value is the default. both kv are string-type. This parameter can be set only when the EnableParameter of the command is true. Parameters must not be specified simultaneously `DefaultParameters` and `DefaultParameterConfs`. If Parameters is not provided, the default value here will be used to replace. Custom parameters can be up to 20. The custom parameter name must meet the following standard: the number of characters has a cap of 64, and the optional range is [a-zA-Z0-9-_]. * @type {string || null} */ this.DefaultParameters = null; /** * Custom parameter array. if Parameters is not provided, the default value here will be used to replace. up to 20 custom Parameters are allowed. If Parameters is not provided, the default value here will be used to replace. This parameter can be set only when the EnableParameter of the command is true. Parameters must not be specified simultaneously `DefaultParameters` and `DefaultParameterConfs`. * @type {Array.<DefaultParameterConf> || null} */ this.DefaultParameterConfs = null; /** * Custom parameter of Command. field type is json encoded string. for example: {"varA": "222"}. The key is the custom parameter name, and the value is the default. both kv are string-type. This parameter can be set only when the EnableParameter of the command is true. If the parameter value is not provided, DefaultParameters or DefaultParameterConfs will be used. Custom parameters can be up to 20. The custom parameter name must meet the following standard: the number of characters has a cap of 64, and the optional range is [a-zA-Z0-9-_]. * @type {string || null} */ this.Parameters = null; /** * The tags of the command. It is available when `SaveCommand` is `True`. A maximum of 10 tags are allowed. * @type {Array.<Tag> || null} */ this.Tags = null; /** * The username used to execute the command on the CVM or Lighthouse instance. The principle of least privilege is the best practice for permission management. We recommend you execute TAT commands as a general user. By default, the user `root` is used to execute commands on Linux and the user `System` is used on Windows. * @type {string || null} */ this.Username = null; /** * The COS bucket URL for uploading logs. The URL must start with `https`, such as `https://BucketName-123454321.cos.ap-beijing.myqcloud.com`. * @type {string || null} */ this.OutputCOSBucketUrl = null; /** * The COS bucket directory where the logs are saved. Check below for the rules of the directory name. 1. It must be a combination of number, letters, and visible characters. Up to 60 characters are allowed. 2. Use a slash (/) to create a subdirectory. 3. ".." can not be used as the folder name. It cannot start with a slash (/), and cannot contain consecutive slashes. * @type {string || null} */ this.OutputCOSKeyPrefix = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.Content = 'Content' in params ? params.Content : null; this.InstanceIds = 'InstanceIds' in params ? params.InstanceIds : null; this.CommandName = 'CommandName' in params ? params.CommandName : null; this.Description = 'Description' in params ? params.Description : null; this.CommandType = 'CommandType' in params ? params.CommandType : null; this.WorkingDirectory = 'WorkingDirectory' in params ? params.WorkingDirectory : null; this.Timeout = 'Timeout' in params ? params.Timeout : null; this.SaveCommand = 'SaveCommand' in params ? params.SaveCommand : null; this.EnableParameter = 'EnableParameter' in params ? params.EnableParameter : null; this.DefaultParameters = 'DefaultParameters' in params ? params.DefaultParameters : null; if (params.DefaultParameterConfs) { this.DefaultParameterConfs = new Array(); for (let z in params.DefaultParameterConfs) { let obj = new DefaultParameterConf(); obj.deserialize(params.DefaultParameterConfs[z]); this.DefaultParameterConfs.push(obj); } } this.Parameters = 'Parameters' in params ? params.Parameters : 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.Username = 'Username' in params ? params.Username : null; this.OutputCOSBucketUrl = 'OutputCOSBucketUrl' in params ? params.OutputCOSBucketUrl : null; this.OutputCOSKeyPrefix = 'OutputCOSKeyPrefix' in params ? params.OutputCOSKeyPrefix : null; } } /** * InvokeCommand request structure. * @class */ class InvokeCommandRequest extends AbstractModel { constructor(){ super(); /** * Pending trigger command ID. call the [DescribeCommands](https://www.tencentcloud.com/document/api/1340/52681?from_cn_redirect=1) api to query command details. * @type {string || null} */ this.CommandId = null; /** * Instance ID list for the command to be executed, with a cap of 200. Instance ID can be obtained through the query instance interface of corresponding cloud services. currently supported instance types:. - CVM - Lighthouse -TAT register instance. * @type {Array.<string> || null} */ this.InstanceIds = null; /** * Custom parameter of Command. field type is json encoded string. for example: {"varA": "222"}. The key is the custom parameter name, and the value is the default. both kv are string-type. This parameter can be set only when the EnableParameter of the command is true. you can obtain the EnableParameter settings through the [DescribeCommands (detailed command information)](https://www.tencentcloud.com/document/api/1340/52681?from_cn_redirect=1) api. If the parameter value is not provided, the DefaultParameters or DefaultParameterConfs of Command will be used to replace it. Custom parameters can be up to 20. The custom parameter name must meet the following standard: the number of characters has a cap of 64, and the optional range is [a-zA-Z0-9-_]. * @type {string || null} */ this.Parameters = null; /** * The username used to execute the command on the CVM or Lighthouse instance. The principle of the least privilege is the best practice for permission management. We recommend you execute TAT commands as a general user. If this is not specified, the Username of the command is used by default. * @type {string || null} */ this.Username = null; /** * Execution path of the command. The WorkingDirectory of the command is used by default. * @type {string || null} */ this.WorkingDirectory = null; /** * Command timeout period. Value range: [1, 86400]. The Timeout of the command is used by default. * @type {number || null} */ this.Timeout = null; /** * The COS bucket URL for uploading logs. The URL must start with `https`, such as `https://BucketName-123454321.cos.ap-beijing.myqcloud.com`. * @type {string || null} */ this.OutputCOSBucketUrl = null; /** * The COS bucket directory where the logs are saved. Check below for the rules of the directory name. 1. It must be a combination of number, letters, and visible characters. Up to 60 characters are allowed. 2. Use a slash (/) to create a subdirectory. 3. ".." can not be used as the folder name. It cannot start with a slash (/), and cannot contain consecutive slashes. * @type {string || null} */ this.OutputCOSKeyPrefix = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.CommandId = 'CommandId' in params ? params.CommandId : null; this.InstanceIds = 'InstanceIds' in params ? params.InstanceIds : null; this.Parameters = 'Parameters' in params ? params.Parameters : null; this.Username = 'Username' in params ? params.Username : null; this.WorkingDirectory = 'WorkingDirectory' in params ? params.WorkingDirectory : null; this.Timeout = 'Timeout' in params ? params.Timeout : null; this.OutputCOSBucketUrl = 'OutputCOSBucketUrl' in params ? params.OutputCOSBucketUrl : null; this.OutputCOSKeyPrefix = 'OutputCOSKeyPrefix' in params ? params.OutputCOSKeyPrefix : null; } } /** * DescribeInvocationTasks request structure. * @class */ class DescribeInvocationTasksRequest extends AbstractModel { constructor(){ super(); /** * List of execution task IDs. Up to 100 IDs are allowed for each request. `InvocationTaskIds` and `Filters` cannot be specified at the same time. * @type {Array.<string> || null} */ this.InvocationTaskIds = null; /** * Filter conditions.<br>. -invocation-task-id - String - required: no - (filter condition) filter by executing task id. - invocation-id - String - required: no - (filter condition) filter by the execution activity id. you can obtain it through the [DescribeInvocations](https://www.tencentcloud.com/document/api/1340/52679?from_cn_redirect=1) api. -instance-id - String - required: no - (filtering conditions) filter by instance id. you can get the instance id through the query instance interface of corresponding cloud services. currently supported instance types: CVM, Lighthouse, and managed instances of TAT. -command-id - String - required: no - (filter criteria) filter by command id. obtain through the api [DescribeCommands (query command details)](https://www.tencentcloud.com/document/api/1340/52681?from_cn_redirect=1). The maximum number of `Filters` per request is 10, and that of `Filter.Values` is 5. the `InvocationTaskIds` and `Filters` parameters cannot be specified at the same time. * @type {Array.<Filter> || null} */ this.Filters = null; /** * Number of returned results. It defaults to `20`. The maximum is 100. For more information on `Limit`, see the relevant section in the API [Overview](https://intl.cloud.tencent.com/document/api/213/15688?from_cn_redirect=1). * @type {number || null} */ this.Limit = null; /** * Offset. The default value is `0`. For more information on `Offset`, see the relevant section in API [Introduction](https://intl.cloud.tencent.com/document/api/213/15688?from_cn_redirect=1). * @type {number || null} */ this.Offset = null; /** * Whether to hide the command output result. valid values:. -true: hide output. - false: do not hide. The default value is true. * @type {boolean || null} */ this.HideOutput = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.InvocationTaskIds = 'InvocationTaskIds' in params ? params.InvocationTaskIds : 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.Limit = 'Limit' in params ? params.Limit : null; this.Offset = 'Offset' in params ? params.Offset : null; this.HideOutput = 'HideOutput' in params ? params.HideOutput : null; } } /** * DeleteRegisterInstance response structure. * @class */ class DeleteRegisterInstanceResponse extends AbstractModel { constructor(){ super(); /** * The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). 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; } } /** * DescribeRegions request structure. * @class */ class DescribeRegionsRequest extends AbstractModel { constructor(){ super(); } /** * @private */ deserialize(params) { if (!params) { return; } } } /** * Command execution details. * @class */ class CommandDocument extends AbstractModel { constructor(){ super(); /** * Base64-encoded command. * @type {string || null} */ this.Content = null; /** * Command type. value is one of SHELL, POWERSHELL, BAT. * @type {string || null} */ this.CommandType = null; /** * Timeout period. unit: seconds. * @type {number || null} */ this.Timeout = null; /** * Execution path. * @type {string || null} */ this.WorkingDirectory = null; /** * The user who executes the command. * @type {string || null} */ this.Username = null; /** * URL of the COS bucket to store the output * @type {string || null} */ this.OutputCOSBucketUrl = null; /** * Prefix of the output file name * @type {string || null} */ this.OutputCOSKeyPrefix = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.Content = 'Content' in params ? params.Content : null; this.CommandType = 'CommandType' in params ? params.CommandType : null; this.Timeout = 'Timeout' in params ? params.Timeout : null; this.WorkingDirectory = 'WorkingDirectory' in params ? params.WorkingDirectory : null; this.Username = 'Username' in params ? params.Username : null; this.OutputCOSBucketUrl = 'OutputCOSBucketUrl' in params ? params.OutputCOSBucketUrl : null; this.OutputCOSKeyPrefix = 'OutputCOSKeyPrefix' in params ? params.OutputCOSKeyPrefix : null; } } /** * DescribeInvokerRecords response structure. * @class */ class DescribeInvokerRecordsResponse extends AbstractModel { constructor(){ super(); /** * Number of matching records. * @type {number || null} */ this.TotalCount = null; /** * Execution history of an invoker. * @type {Array.<InvokerRecord> || null} */ this.InvokerRecordSet = null; /** * The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. * @type {string || null} */ this.RequestId = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.TotalCount = 'TotalCount' in params ? params.TotalCount : null; if (params.InvokerRecordSet) { this.InvokerRecordSet = new Array(); for (let z in params.InvokerRecordSet) { let obj = new InvokerRecord(); obj.deserialize(params.InvokerRecordSet[z]); this.InvokerRecordSet.push(obj); } } this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * Task result. * @class */ class TaskResult extends AbstractModel { constructor(){ super(); /** * ExitCode of the execution. * @type {number || null} */ this.ExitCode = null; /** * Base64-encoded command output. The maximum length is 24 KB. * @type {string || null} */ this.Output = null; /** * Command execution start time. the format is YYYY-MM-DDThh:MM:ssZ. Note: This field may return null, indicating that no valid values can be obtained. * @type {string || null} */ this.ExecStartTime = null; /** * Execution end time of the command. format: YYYY-MM-DDThh:MM:ssZ. Note: This field may return null, indicating that no valid values can be obtained. * @type {string || null} */ this.ExecEndTime = null; /** * Dropped bytes of the command output. * @type {number || null} */ this.Dropped = null; /** * COS URL of the logs. * @type {string || null} */ this.OutputUrl = null; /** * Error message for uploading logs to COS. * @type {string || null} */ this.OutputUploadCOSErrorInfo = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.ExitCode = 'ExitCode' in params ? params.ExitCode : null; this.Output = 'Output' in params ? params.Output : null; this.ExecStartTime = 'ExecStartTime' in params ? params.ExecStartTime : null; this.ExecEndTime = 'ExecEndTime' in params ? params.ExecEndTime : null; this.Dropped = 'Dropped' in params ? params.Dropped : null; this.OutputUrl = 'OutputUrl' in params ? params.OutputUrl : null; this.OutputUploadCOSErrorInfo = 'OutputUploadCOSErrorInfo' in params ? params.OutputUploadCOSErrorInfo : null; } } /** * ModifyInvoker request structure. * @class */ class ModifyInvokerRequest extends AbstractModel { constructor(){ super(); /** * Executor ID to be modified. Call the [DescribeInvokers](https://www.tencentcloud.com/document/api/1340/61759?from_cn_redirect=1) api to query execution. * @type {string || null} */ this.InvokerId = null; /** * Executor name to be modified. length not exceeding 120 characters. * @type {string || null} */ this.Name = null; /** * Executor type to be modified. Selectable values (currently only support one):. -`SCHEDULE`: period type executor. * @type {string || null} */ this.Type = null; /** * Command ID to be modified. Call the [DescribeCommands](https://www.tencentcloud.com/document/api/1340/52681?from_cn_redirect=1) api to query command details. * @type {string || null} */ this.CommandId = null; /** * Username to be modified. length not exceeding 256 characters. * @type {string || null} */ this.Username = null; /** * Custom parameters to be modified. field type is JSON encode string. This parameter can be set only when EnableParameter of the command specified by CommandId is true. obtain the EnableParameter settings through the [DescribeCommands (query command details)](https://www.tencentcloud.com/document/api/1340/52681?from_cn_redirect=1) api. * @type {string || null} */ this.Parameters = null; /** * List of instance ids to be modified. list length limit 100. You can get the instance ID through the query instance interface of corresponding cloud services. currently supports instance types: CVM, Lighthouse, and TAT managed instances. The instance needs to have the TAT client installed, and the client must be in Online status. you can query client status via the [DescribeAutomationAgentStatus](https://www.tencentcloud.com/document/api/1340/52682?from_cn_redirect=1) api. * @type {Array.<string> || null} */ this.InstanceIds = null; /** * Recurring invoker settings to be modified. Change the executor type to `SCHEDULE` and specify this parameter. * @type {ScheduleSettings || null} */ this.ScheduleSettings = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.InvokerId = 'InvokerId' in params ? params.InvokerId : null; this.Name = 'Name' in params ? params.Name : null; this.Type = 'Type' in params ? params.Type : null; this.CommandId = 'CommandId' in params ? params.CommandId : null; this.Username = 'Username' in params ? params.Username : null; this.Parameters = 'Parameters' in params ? params.Parameters : null; this.InstanceIds = 'InstanceIds' in params ? params.InstanceIds : null; if (params.ScheduleSettings) { let obj = new ScheduleSettings(); obj.deserialize(params.ScheduleSettings) this.ScheduleSettings = obj; } } } /** * Execution task description. * @class */ class InvocationTaskBasicInfo extends AbstractModel { constructor(){ super(); /** * Execution task ID. * @type {string || null} */ this.InvocationTaskId = null; /** * Execution task status. valid values:. - PENDING: waiting for distribution. - DELIVERING: distributing. - DELIVER_DELAYED: delivery delay. - DELIVER_FAILED: delivery fail. - START_FAILED: command start failed. - RUNNING: command RUNNING. - SUCCESS: command success. - FAILED: command execution failed, exit code not 0. - TIMEOUT: command timeout. - TASK_TIMEOUT: client no response. - CANCELLING: cancelling. - CANCELLED: canceled (command canceled before startup). - TERMINATED: suspended (canceled during command execution). * @type {string || null} */ this.TaskStatus = null; /** * Instance ID. * @type {string || null} */ this.InstanceId = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.InvocationTaskId = 'InvocationTaskId' in params ? params.InvocationTaskId : null; this.TaskStatus = 'TaskStatus' in params ? params.TaskStatus : null; this.InstanceId = 'InstanceId' in params ? params.InstanceId : null; } } /** * DeleteCommands request structure. * @class */ class DeleteCommandsRequest extends AbstractModel { constructor(){ super(); /** * Command ID to be deleted. call the [DescribeCommands](https://www.tencentcloud.com/document/api/1340/52681?from_cn_redirect=1) api to query command details. * @type {Array.<string> || null} */ this.CommandIds = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.CommandIds = 'CommandIds' in params ? params.CommandIds : null; } } /** * EnableInvoker response structure. * @class */ class EnableInvokerResponse extends AbstractModel { constructor(){ super(); /** * The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). 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; } } /** * DescribeQuotas request structure. * @class */ class DescribeQuotasRequest extends AbstractModel { constructor(){ super(); /** * Resource name Value is:. - COMMAND: COMMAND. -REGISTER_CODE: managed instance registration code. * @type {Array.<string> || null} */ this.ResourceNames = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.ResourceNames = 'ResourceNames' in params ? params.ResourceNames : null; } } /** * EnableInvoker request structure. * @class */ class EnableInvokerRequest extends AbstractModel { constructor(){ super(); /** * Executor ID to be enabled. Call the [DescribeInvokers](https://www.tencentcloud.com/document/api/1340/61759?from_cn_redirect=1) api to query execution. * @type {string || null} */ this.InvokerId = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.InvokerId = 'InvokerId' in params ? params.InvokerId : null; } } /** * Custom parameter. * @class */ class DefaultParameterConf extends AbstractModel { constructor(){ super(); /** * Parameter name. * @type {string || null} */ this.ParameterName = null; /** * Default parameter value. * @type {string || null} */ this.ParameterValue = null; /** * Parameter description. * @type {string || null} */ this.ParameterDescription = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.ParameterName = 'ParameterName' in params ? params.ParameterName : null; this.ParameterValue = 'ParameterValue' in params ? params.ParameterValue : null; this.ParameterDescription = 'ParameterDescription' in params ? params.ParameterDescription : null; } } /** * DescribeScenes response structure. * @class */ class DescribeScenesResponse extends AbstractModel { constructor(){ super(); /** * Total number of eligible scenarios. * @type {number || null} */ this.TotalCount = null; /** * List of scenario details. * @type {Array.<Scene> || null} */ this.SceneSet = null; /** * The unique request ID, generated by the server, will be returned for every re