tencentcloud-sdk-nodejs-intl-en
Version:
2,012 lines • 55.1 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");
/**
* ModifyInstance response structure.
* @class
*/
class ModifyInstanceResponse 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;
}
}
/**
* DescribeInstanceInfo request structure.
* @class
*/
class DescribeInstanceInfoRequest extends AbstractModel {
constructor(){
super();
/**
* instance ID.
* @type {string || null}
*/
this.InstanceId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
}
}
/**
* Access information.
* @class
*/
class AccessInfo extends AbstractModel {
constructor(){
super();
/**
* Address.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.Address = null;
/**
* Protocol.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.Protocol = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Address = 'Address' in params ? params.Address : null;
this.Protocol = 'Protocol' in params ? params.Protocol : null;
}
}
/**
* Instance State Information
* @class
*/
class InstanceStateInfo extends AbstractModel {
constructor(){
super();
/**
* Instance status. Example: serving.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.InstanceState = null;
/**
* Creation time of instance operation.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.FlowCreateTime = null;
/**
* Instance operation name.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.FlowName = null;
/**
* Instance operation progress.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {number || null}
*/
this.FlowProgress = null;
/**
* Instance status description. Example: running.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.InstanceStateDesc = null;
/**
* Instance process error messages. Example: "Creation failed, insufficient resources."
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.FlowMsg = null;
/**
* The name of the current step. Example: "Purchasing resources."
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.ProcessName = null;
/**
* Indicates whether there is a backup task in the instance. 1 indicates yes and 0 indicates no.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {number || null}
*/
this.BackupStatus = null;
/**
* Request Id
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.RequestId = null;
/**
* Backup Open Status
Note: This field may return null, indicating that no valid values can be obtained.
* @type {number || null}
*/
this.BackupOpenStatus = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceState = 'InstanceState' in params ? params.InstanceState : null;
this.FlowCreateTime = 'FlowCreateTime' in params ? params.FlowCreateTime : null;
this.FlowName = 'FlowName' in params ? params.FlowName : null;
this.FlowProgress = 'FlowProgress' in params ? params.FlowProgress : null;
this.InstanceStateDesc = 'InstanceStateDesc' in params ? params.InstanceStateDesc : null;
this.FlowMsg = 'FlowMsg' in params ? params.FlowMsg : null;
this.ProcessName = 'ProcessName' in params ? params.ProcessName : null;
this.BackupStatus = 'BackupStatus' in params ? params.BackupStatus : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
this.BackupOpenStatus = 'BackupOpenStatus' in params ? params.BackupOpenStatus : null;
}
}
/**
* DescribeInstanceState request structure.
* @class
*/
class DescribeInstanceStateRequest extends AbstractModel {
constructor(){
super();
/**
* Instance id
* @type {string || null}
*/
this.InstanceId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
}
}
/**
* Billing time parameter.
* @class
*/
class ChargeProperties extends AbstractModel {
constructor(){
super();
/**
* 1: requires auto-renewal.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {number || null}
*/
this.RenewFlag = null;
/**
* Order time range.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {number || null}
*/
this.TimeSpan = null;
/**
* Time unit. Valid values: h and m.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.TimeUnit = null;
/**
* Billing type: 0 indicates pay-as-you-go and 1 indicates monthly subscription.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {number || null}
*/
this.PayMode = null;
/**
* PREPAID and POSTPAID_BY_HOUR
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.ChargeType = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.RenewFlag = 'RenewFlag' in params ? params.RenewFlag : null;
this.TimeSpan = 'TimeSpan' in params ? params.TimeSpan : null;
this.TimeUnit = 'TimeUnit' in params ? params.TimeUnit : null;
this.PayMode = 'PayMode' in params ? params.PayMode : null;
this.ChargeType = 'ChargeType' in params ? params.ChargeType : null;
}
}
/**
* DestroyInstanceByApi request structure.
* @class
*/
class DestroyInstanceByApiRequest extends AbstractModel {
constructor(){
super();
/**
* Instance id. Example: "cdwpg-xxxx".
* @type {string || null}
*/
this.InstanceId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
}
}
/**
* Resource specifications.
* @class
*/
class ResourceSpecNew extends AbstractModel {
constructor(){
super();
/**
* Resource name.
* @type {string || null}
*/
this.SpecName = null;
/**
* Resource count.
* @type {number || null}
*/
this.Count = null;
/**
* Disk information.
* @type {CBSSpec || null}
*/
this.DiskSpec = null;
/**
* Resource type, DATA.
* @type {string || null}
*/
this.Type = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.SpecName = 'SpecName' in params ? params.SpecName : null;
this.Count = 'Count' in params ? params.Count : null;
if (params.DiskSpec) {
let obj = new CBSSpec();
obj.deserialize(params.DiskSpec)
this.DiskSpec = obj;
}
this.Type = 'Type' in params ? params.Type : null;
}
}
/**
* Instance node information.
* @class
*/
class InstanceNodeGroup extends AbstractModel {
constructor(){
super();
/**
* Spec Name
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.SpecName = null;
/**
* Data Disk
Note: This field may return null, indicating that no valid values can be obtained.
* @type {DiskSpecPlus || null}
*/
this.DataDisk = null;
/**
* Cvm Count
Note: This field may return null, indicating that no valid values can be obtained.
* @type {number || null}
*/
this.CvmCount = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.SpecName = 'SpecName' in params ? params.SpecName : null;
if (params.DataDisk) {
let obj = new DiskSpecPlus();
obj.deserialize(params.DataDisk)
this.DataDisk = obj;
}
this.CvmCount = 'CvmCount' in params ? params.CvmCount : null;
}
}
/**
* Disk specifications.
* @class
*/
class CBSSpec extends AbstractModel {
constructor(){
super();
/**
* Disk type.
* @type {string || null}
*/
this.DiskType = null;
/**
* Size.
* @type {number || null}
*/
this.DiskSize = null;
/**
* Number.
* @type {number || null}
*/
this.DiskCount = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.DiskType = 'DiskType' in params ? params.DiskType : null;
this.DiskSize = 'DiskSize' in params ? params.DiskSize : null;
this.DiskCount = 'DiskCount' in params ? params.DiskCount : null;
}
}
/**
* ModifyInstance request structure.
* @class
*/
class ModifyInstanceRequest extends AbstractModel {
constructor(){
super();
/**
* Instance ID.
* @type {string || null}
*/
this.InstanceId = null;
/**
* Name of the newly modified instance.
* @type {string || null}
*/
this.InstanceName = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
this.InstanceName = 'InstanceName' in params ? params.InstanceName : null;
}
}
/**
* DescribeSimpleInstances response structure.
* @class
*/
class DescribeSimpleInstancesResponse extends AbstractModel {
constructor(){
super();
/**
* Total Count
Note: This field may return null, indicating that no valid values can be obtained.
* @type {number || null}
*/
this.TotalCount = null;
/**
* Instances List
Note: This field may return null, indicating that no valid values can be obtained.
* @type {Array.<InstanceSimpleInfoNew> || null}
*/
this.InstancesList = null;
/**
* Error Message
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.ErrorMsg = 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.InstancesList) {
this.InstancesList = new Array();
for (let z in params.InstancesList) {
let obj = new InstanceSimpleInfoNew();
obj.deserialize(params.InstancesList[z]);
this.InstancesList.push(obj);
}
}
this.ErrorMsg = 'ErrorMsg' in params ? params.ErrorMsg : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* Resource information.
* @class
*/
class ResourceInfo extends AbstractModel {
constructor(){
super();
/**
* Resource name.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.SpecName = null;
/**
* Resource count.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {number || null}
*/
this.Count = null;
/**
* Disk information.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {CBSSpecInfo || null}
*/
this.DiskSpec = null;
/**
* Resource type.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.Type = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.SpecName = 'SpecName' in params ? params.SpecName : null;
this.Count = 'Count' in params ? params.Count : null;
if (params.DiskSpec) {
let obj = new CBSSpecInfo();
obj.deserialize(params.DiskSpec)
this.DiskSpec = obj;
}
this.Type = 'Type' in params ? params.Type : null;
}
}
/**
* instance information.
* @class
*/
class InstanceInfo extends AbstractModel {
constructor(){
super();
/**
* Instance ID
Note: This field may return null, indicating that no valid values can be obtained.
* @type {number || null}
*/
this.ID = null;
/**
* cn/dn or others.Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.InstanceType = null;
/**
* Instance Name
.Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.InstanceName = null;
/**
* Instance Status ,such as 2
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.Status = null;
/**
* Instance Status Description ,such as Running.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.StatusDesc = null;
/**
* Instance State Infomation
Note: This field may return null, indicating that no valid values can be obtained.
* @type {InstanceStateInfo || null}
*/
this.InstanceStateInfo = null;
/**
* Instance ID
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.InstanceID = null;
/**
* CreateTime ,such as 2022-09-05 20:00:01
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.CreateTime = null;
/**
* Region ,such as ap-chongqing.Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.Region = null;
/**
* Zone : This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.Zone = null;
/**
* Region.Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.RegionDesc = null;
/**
* Zone.Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.ZoneDesc = null;
/**
* Tag.Note: This field may return null, indicating that no valid values can be obtained.
* @type {Array.<Tag> || null}
*/
this.Tags = null;
/**
* Version.Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.Version = null;
/**
* Character set.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.Charset = null;
/**
* CN node list.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {Array.<InstanceNodeGroup> || null}
*/
this.CNNodes = null;
/**
* DN node list.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {Array.<InstanceNodeGroup> || null}
*/
this.DNNodes = null;
/**
* Region Id
Note: This field may return null, indicating that no valid values can be obtained.
* @type {number || null}
*/
this.RegionId = null;
/**
* Zone Id
Note: This field may return null, indicating that no valid values can be obtained.
* @type {number || null}
*/
this.ZoneId = null;
/**
* Vpc Id
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.VpcId = null;
/**
* Subnet Id
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.SubnetId = null;
/**
* Expire Time
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.ExpireTime = null;
/**
* Pay Mode
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.PayMode = null;
/**
* Renew Flag
Note: This field may return null, indicating that no valid values can be obtained.
* @type {boolean || null}
*/
this.RenewFlag = null;
/**
* Instance Id
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.InstanceId = null;
/**
* Access information.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {Array.<AccessInfo> || null}
*/
this.AccessDetails = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.ID = 'ID' in params ? params.ID : null;
this.InstanceType = 'InstanceType' in params ? params.InstanceType : null;
this.InstanceName = 'InstanceName' in params ? params.InstanceName : null;
this.Status = 'Status' in params ? params.Status : null;
this.StatusDesc = 'StatusDesc' in params ? params.StatusDesc : null;
if (params.InstanceStateInfo) {
let obj = new InstanceStateInfo();
obj.deserialize(params.InstanceStateInfo)
this.InstanceStateInfo = obj;
}
this.InstanceID = 'InstanceID' in params ? params.InstanceID : null;
this.CreateTime = 'CreateTime' in params ? params.CreateTime : null;
this.Region = 'Region' in params ? params.Region : null;
this.Zone = 'Zone' in params ? params.Zone : null;
this.RegionDesc = 'RegionDesc' in params ? params.RegionDesc : null;
this.ZoneDesc = 'ZoneDesc' in params ? params.ZoneDesc : 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.Version = 'Version' in params ? params.Version : null;
this.Charset = 'Charset' in params ? params.Charset : null;
if (params.CNNodes) {
this.CNNodes = new Array();
for (let z in params.CNNodes) {
let obj = new InstanceNodeGroup();
obj.deserialize(params.CNNodes[z]);
this.CNNodes.push(obj);
}
}
if (params.DNNodes) {
this.DNNodes = new Array();
for (let z in params.DNNodes) {
let obj = new InstanceNodeGroup();
obj.deserialize(params.DNNodes[z]);
this.DNNodes.push(obj);
}
}
this.RegionId = 'RegionId' in params ? params.RegionId : null;
this.ZoneId = 'ZoneId' in params ? params.ZoneId : null;
this.VpcId = 'VpcId' in params ? params.VpcId : null;
this.SubnetId = 'SubnetId' in params ? params.SubnetId : null;
this.ExpireTime = 'ExpireTime' in params ? params.ExpireTime : null;
this.PayMode = 'PayMode' in params ? params.PayMode : null;
this.RenewFlag = 'RenewFlag' in params ? params.RenewFlag : null;
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
if (params.AccessDetails) {
this.AccessDetails = new Array();
for (let z in params.AccessDetails) {
let obj = new AccessInfo();
obj.deserialize(params.AccessDetails[z]);
this.AccessDetails.push(obj);
}
}
}
}
/**
* DescribeInstances response structure.
* @class
*/
class DescribeInstancesResponse extends AbstractModel {
constructor(){
super();
/**
* Total number of instances.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {number || null}
*/
this.TotalCount = null;
/**
* Instance array.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {Array.<InstanceInfo> || null}
*/
this.InstancesList = null;
/**
* -Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.ErrorMsg = 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.InstancesList) {
this.InstancesList = new Array();
for (let z in params.InstancesList) {
let obj = new InstanceInfo();
obj.deserialize(params.InstancesList[z]);
this.InstancesList.push(obj);
}
}
this.ErrorMsg = 'ErrorMsg' in params ? params.ErrorMsg : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* Disk specifications.
* @class
*/
class DiskSpecPlus extends AbstractModel {
constructor(){
super();
/**
* Disk Count
Note: This field may return null, indicating that no valid values can be obtained.
* @type {number || null}
*/
this.DiskCount = null;
/**
* Max Disk Size
Note: This field may return null, indicating that no valid values can be obtained.
* @type {number || null}
*/
this.MaxDiskSize = null;
/**
* Min Disk Size
Note: This field may return null, indicating that no valid values can be obtained.
* @type {number || null}
*/
this.MinDiskSize = null;
/**
* Disk Type
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.DiskType = null;
/**
* Disk Description
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.DiskDesc = null;
/**
* Cvm Class
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.CvmClass = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.DiskCount = 'DiskCount' in params ? params.DiskCount : null;
this.MaxDiskSize = 'MaxDiskSize' in params ? params.MaxDiskSize : null;
this.MinDiskSize = 'MinDiskSize' in params ? params.MinDiskSize : null;
this.DiskType = 'DiskType' in params ? params.DiskType : null;
this.DiskDesc = 'DiskDesc' in params ? params.DiskDesc : null;
this.CvmClass = 'CvmClass' in params ? params.CvmClass : null;
}
}
/**
* DescribeInstances request structure.
* @class
*/
class DescribeInstancesRequest extends AbstractModel {
constructor(){
super();
/**
* The name of the Instance ID for the search.
* @type {string || null}
*/
this.SearchInstanceId = null;
/**
* The instance name for the search.
* @type {string || null}
*/
this.SearchInstanceName = null;
/**
* Pagination parameter. The first page is 0, and the second page is 10.
* @type {number || null}
*/
this.Offset = null;
/**
* Pagination parameter. Pagination step length. It is 10 by default.
* @type {number || null}
*/
this.Limit = null;
/**
* Searched tag list.
* @type {Array.<SearchTags> || null}
*/
this.SearchTags = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.SearchInstanceId = 'SearchInstanceId' in params ? params.SearchInstanceId : null;
this.SearchInstanceName = 'SearchInstanceName' in params ? params.SearchInstanceName : null;
this.Offset = 'Offset' in params ? params.Offset : null;
this.Limit = 'Limit' in params ? params.Limit : null;
if (params.SearchTags) {
this.SearchTags = new Array();
for (let z in params.SearchTags) {
let obj = new SearchTags();
obj.deserialize(params.SearchTags[z]);
this.SearchTags.push(obj);
}
}
}
}
/**
* CreateInstanceByApi response structure.
* @class
*/
class CreateInstanceByApiResponse extends AbstractModel {
constructor(){
super();
/**
* Process ID.Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.FlowId = null;
/**
* Instance ID.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.InstanceId = null;
/**
* Error message.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.ErrorMsg = 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.FlowId = 'FlowId' in params ? params.FlowId : null;
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
this.ErrorMsg = 'ErrorMsg' in params ? params.ErrorMsg : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* Cluster information.
* @class
*/
class SimpleInstanceInfo extends AbstractModel {
constructor(){
super();
/**
* ID
Note: This field may return null, indicating that no valid values can be obtained.
* @type {number || null}
*/
this.ID = null;
/**
* Instance Id
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.InstanceId = null;
/**
* Instance Name
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.InstanceName = null;
/**
* Version
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.Version = null;
/**
* Region
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.Region = null;
/**
* Zone
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.Zone = null;
/**
* User VPC ID
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.UserVPCID = null;
/**
* User Subnet ID
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.UserSubnetID = null;
/**
* CreateTime
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.CreateTime = null;
/**
* ExpireTime
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.ExpireTime = null;
/**
* Access Infomation
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.AccessInfo = null;
/**
* Renew Flag
Note: This field may return null, indicating that no valid values can be obtained.
* @type {number || null}
*/
this.RenewFlag = null;
/**
* Charge Properties
Note: This field may return null, indicating that no valid values can be obtained.
* @type {ChargeProperties || null}
*/
this.ChargeProperties = null;
/**
* Resources
Note: This field may return null, indicating that no valid values can be obtained.
* @type {Array.<ResourceInfo> || null}
*/
this.Resources = null;
/**
* Tags
Note: This field may return null, indicating that no valid values can be obtained.
* @type {Array.<Tag> || null}
*/
this.Tags = null;
/**
* Status
Note: This field may return null, indicating that no valid values can be obtained.
* @type {number || null}
*/
this.Status = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.ID = 'ID' in params ? params.ID : null;
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
this.InstanceName = 'InstanceName' in params ? params.InstanceName : null;
this.Version = 'Version' in params ? params.Version : null;
this.Region = 'Region' in params ? params.Region : null;
this.Zone = 'Zone' in params ? params.Zone : null;
this.UserVPCID = 'UserVPCID' in params ? params.UserVPCID : null;
this.UserSubnetID = 'UserSubnetID' in params ? params.UserSubnetID : null;
this.CreateTime = 'CreateTime' in params ? params.CreateTime : null;
this.ExpireTime = 'ExpireTime' in params ? params.ExpireTime : null;
this.AccessInfo = 'AccessInfo' in params ? params.AccessInfo : null;
this.RenewFlag = 'RenewFlag' in params ? params.RenewFlag : null;
if (params.ChargeProperties) {
let obj = new ChargeProperties();
obj.deserialize(params.ChargeProperties)
this.ChargeProperties = obj;
}
if (params.Resources) {
this.Resources = new Array();
for (let z in params.Resources) {
let obj = new ResourceInfo();
obj.deserialize(params.Resources[z]);
this.Resources.push(obj);
}
}
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.Status = 'Status' in params ? params.Status : null;
}
}
/**
* DescribeInstance response structure.
* @class
*/
class DescribeInstanceResponse extends AbstractModel {
constructor(){
super();
/**
* Instance description information.
* @type {InstanceInfo || null}
*/
this.InstanceInfo = 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;
}
if (params.InstanceInfo) {
let obj = new InstanceInfo();
obj.deserialize(params.InstanceInfo)
this.InstanceInfo = obj;
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* DestroyInstanceByApi response structure.
* @class
*/
class DestroyInstanceByApiResponse extends AbstractModel {
constructor(){
super();
/**
* Destroy process ID.
* @type {string || null}
*/
this.FlowId = null;
/**
* Error message.
* @type {string || null}
*/
this.ErrorMsg = 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.FlowId = 'FlowId' in params ? params.FlowId : null;
this.ErrorMsg = 'ErrorMsg' in params ? params.ErrorMsg : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* Disk information.
* @class
*/
class CBSSpecInfo extends AbstractModel {
constructor(){
super();
/**
* Disk type.Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.DiskType = null;
/**
* Size.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {number || null}
*/
this.DiskSize = null;
/**
* Number.Note: This field may return null, indicating that no valid values can be obtained.
* @type {number || null}
*/
this.DiskCount = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.DiskType = 'DiskType' in params ? params.DiskType : null;
this.DiskSize = 'DiskSize' in params ? params.DiskSize : null;
this.DiskCount = 'DiskCount' in params ? params.DiskCount : null;
}
}
/**
* CreateInstanceByApi request structure.
* @class
*/
class CreateInstanceByApiRequest extends AbstractModel {
constructor(){
super();
/**
* Instance name.
* @type {string || null}
*/
this.InstanceName = null;
/**
* Availability zone.
* @type {string || null}
*/
this.Zone = null;
/**
* Virtual Private Cloud (VPC).
* @type {string || null}
*/
this.UserVPCId = null;
/**
* Subnet.
* @type {string || null}
*/
this.UserSubnetId = null;
/**
* Billing method.
* @type {ChargeProperties || null}
*/
this.ChargeProperties = null;
/**
* Instance password.
* @type {string || null}
*/
this.AdminPassword = null;
/**
* Resource information.
* @type {Array.<ResourceSpecNew> || null}
*/
this.Resources = null;
/**
* Tag list.
* @type {Tag || null}
*/
this.Tags = null;
/**
* Version.
* @type {string || null}
*/
this.ProductVersion = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceName = 'InstanceName' in params ? params.InstanceName : null;
this.Zone = 'Zone' in params ? params.Zone : null;
this.UserVPCId = 'UserVPCId' in params ? params.UserVPCId : null;
this.UserSubnetId = 'UserSubnetId' in params ? params.UserSubnetId : null;
if (params.ChargeProperties) {
let obj = new ChargeProperties();
obj.deserialize(params.ChargeProperties)
this.ChargeProperties = obj;
}
this.AdminPassword = 'AdminPassword' in params ? params.AdminPassword : null;
if (params.Resources) {
this.Resources = new Array();
for (let z in params.Resources) {
let obj = new ResourceSpecNew();
obj.deserialize(params.Resources[z]);
this.Resources.push(obj);
}
}
if (params.Tags) {
let obj = new Tag();
obj.deserialize(params.Tags)
this.Tags = obj;
}
this.ProductVersion = 'ProductVersion' in params ? params.ProductVersion : null;
}
}
/**
* List of tags searched on the list page.
* @class
*/
class SearchTags extends AbstractModel {
constructor(){
super();
/**
* Tag key.
* @type {string || null}
*/
this.TagKey = null;
/**
* Tag value.
* @type {string || null}
*/
this.TagValue = null;
/**
* 1 means only the Tag key is entered without a value, and 0 means both the key and the value are entered.
* @type {number || null}
*/
this.AllValue = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.TagKey = 'TagKey' in params ? params.TagKey : null;
this.TagValue = 'TagValue' in params ? params.TagValue : null;
this.AllValue = 'AllValue' in params ? params.AllValue : null;
}
}
/**
* DescribeInstance request structure.
* @class
*/
class DescribeInstanceRequest extends AbstractModel {
constructor(){
super();
/**
* instance ID.
* @type {string || null}
*/
this.InstanceId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
}
}
/**
* Tag description.
* @class
*/
class Tag extends AbstractModel {
constructor(){
super();
/**
* Tag key.
* @type {string || null}
*/
this.TagKey = null;
/**
* Tag value.
* @type {string || null}
*/
this.TagValue = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.TagKey = 'TagKey' in params ? params.TagKey : null;
this.TagValue = 'TagValue' in params ? params.TagValue : null;
}
}
/**
* DescribeInstanceState response structure.
* @class
*/
class DescribeInstanceStateResponse extends AbstractModel {
constructor(){
super();
/**
* Instance status. Example: serving.
* @type {string || null}
*/
this.InstanceState = null;
/**
* Creation time of instance operation.Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.FlowCreateTime = null;
/**
* Instance operation name.Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.FlowName = null;
/**
* Instance operation progress.Note: This field may return null, indicating that no valid values can be obtained.
* @type {number || null}
*/
this.FlowProgress = null;
/**
* Cluster status description. Example: running.Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.InstanceStateDesc = null;
/**
* Instance process error messages. Example: "Creation failed, insufficient resources."
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.FlowMsg = null;
/**
* The name of the current step. Example: "Purchasing resources."Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.ProcessName = null;
/**
* Enabling status of the instance backup task.Note: This field may return null, indicating that no valid values can be obtained.
* @type {number || null}
*/
this.BackupStatus = 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.InstanceState = 'InstanceState' in params ? params.InstanceState : null;
this.FlowCreateTime = 'FlowCreateTime' in params ? params.FlowCreateTime : null;
this.FlowName = 'FlowName' in params ? params.FlowName : null;
this.FlowProgress = 'FlowProgress' in params ? params.FlowProgress : null;
this.InstanceStateDesc = 'InstanceStateDesc' in params ? params.InstanceStateDesc : null;
this.FlowMsg = 'FlowMsg' in params ? params.FlowMsg : null;
this.ProcessName = 'ProcessName' in params ? params.ProcessName : null;
this.BackupStatus = 'BackupStatus' in params ? params.BackupStatus : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* Simplified instance information.
* @class
*/
class InstanceSimpleInfoNew extends AbstractModel {
constructor(){
super();
/**
* ID
Note: This field may return null, indicating that no valid values can be obtained.
* @type {number || null}
*/
this.ID = null;
/**
* Instance Id
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.InstanceId = null;
/**
* Instance Name
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.InstanceName = null;
/**
* Version
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.Version = null;
/**
* Region
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.Region = null;
/**
* Region Id
Note: This field may return null, indicating that no valid values can be obtained.
* @type {number || null}
*/
this.RegionId = null;
/**
* Region Desc
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.RegionDesc = null;
/**
* Zone
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.Zone = null;
/**
* Zone Id
Note: This field may return null, indicating that no valid values can be obtained.
* @type {number || null}
*/
this.ZoneId = null;
/**
* Zone Desc
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.ZoneDesc = null;
/**
* Vpc Id
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.VpcId = null;
/**
* Subnet Id
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.SubnetId = null;
/**
* CreateTime
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.CreateTime = null;
/**
* ExpireTime
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.ExpireTime = null;
/**
* Access Infomation
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.AccessInfo = null;
/**
* Pay Mode
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.PayMode = null;
/**
* Renew Flag
Note: This field may return null, indicating that no valid values can be obtained.
* @type {boolean || null}
*/
this.RenewFlag = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.ID = 'ID' in params ? params.ID : null;
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
this.InstanceName = 'InstanceName' in params ? params.InstanceName : null;
this.Version = 'Version' in params ? params.Version : null;
this.Region = 'Region' in params ? params.Region : null;
this.RegionId = 'RegionId' in params ? params.RegionId : null;
this.RegionDesc = 'RegionDesc' in params ? params.RegionDesc : null;
this.Zone = 'Zone' in params ? params.Zone : null;
this.ZoneId = 'ZoneId' in params ? params.ZoneId : null;
this.ZoneDesc = 'ZoneDesc' in params ? params.ZoneDesc : null;
this.VpcId = 'VpcId' in params ? params.VpcId : null;
this.SubnetId = 'SubnetId' in params ? params.SubnetId : null;
this.CreateTime = 'CreateTime' in params ? params.CreateTime : null;
this.ExpireTime = 'ExpireTime' in params ? params.ExpireTime : null;
this.AccessInfo = 'AccessInfo' in params ? params.AccessInfo : null;
this.PayMode = 'PayMode' in params ? params.PayMode : null;
this.RenewFlag = 'RenewFlag' in params ? params.RenewFlag : null;
}
}
/**
* DescribeSimpleInstances request structure.
* @class
*/
class DescribeSimpleInstancesRequest extends AbstractModel {
constructor(){
super();
/**
* Search Instance Id
* @type {string || null}
*/
this.SearchInstanceId = null;
/**
* Search Instance Name
* @type {string || null}
*/
this.SearchInstanceName = null;
/**
*
Offset
* @type {number || null}
*/
this.Offset = null;
/**
* Limit
* @type {number || null}
*/
this.Limit = null;
/**
* Search Tags
* @type {Array.<string> || null}
*/
this.SearchTags = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.SearchInstanceId = 'SearchInstanceId' in params ? params.SearchInstanceId : null;
this.SearchInstanceName = 'SearchInstanceName' in params ? params.SearchInstanceName : null;
this.Offset = 'Offset' in params ? params.Offset : null;
this.Limit = 'Limit' in params ? params.Limit : null;
this.SearchTags = 'SearchTags' in params ? params.SearchTags : null;
}
}
/**
* DescribeInstanceInfo response structure.
* @class
*/
class DescribeInstanceInfoResponse extends AbstractModel {
constructor(){
super();
/**
* Instance simple information
* @type {SimpleInstanceInfo || null}
*/
this.SimpleInstanceInfo = null;
/**
* Error Message
* @type {string || null}
*/
this.ErrorMsg = 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;
}
if (params.SimpleInstanceInfo) {
let obj = new SimpleInstanceInfo();
obj.deserialize(params.SimpleInstanceInfo)
this.SimpleInstanceInfo = obj;
}
this.ErrorMsg = 'ErrorMsg' in params ? params.ErrorMsg : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
module.exports = {
ModifyInstanceResponse: ModifyInstanceResponse,
DescribeInstanceInfoRequest: DescribeInstanceInfoRequest,
AccessInfo: AccessInfo,
InstanceStateInfo: InstanceStateInfo,
DescribeInstanceStateRequest: DescribeInstanceStateRequest,
ChargeProperties: ChargeProperties,
DestroyInstanceByApiRequest: DestroyInstanceByApiRequest,
ResourceSpecNew: ResourceSpecNew,
InstanceNodeGroup: InstanceNodeGroup,
CBSSpec: CBSSpec,
ModifyInstanceRequest: ModifyInstanceRequest,
DescribeSimpleInstancesResponse: DescribeSimpleInstancesResponse,
ResourceInfo: ResourceInfo,
InstanceInfo: InstanceInfo,
DescribeInstancesResponse: DescribeInstancesResponse,
DiskSpecPlus: DiskSpecPlus,
DescribeInstancesRequest: DescribeInstancesRequest,
CreateInstanceByApiResponse: CreateInstanceByApiResponse,
SimpleInstanceInfo: SimpleInstanceInfo,
DescribeInstanceResponse: DescribeInstanceResponse,
DestroyInstanceByApiResponse: DestroyInstanceByApiResponse,
CBSSpecInfo: CBSSpecInfo,
CreateInstanceByApiRequest: CreateInstanceByApiRequest,
SearchTags: SearchTags,
DescribeInstanceRequest: DescribeInstanceRequest,
Tag: Tag,
DescribeInstanceStateResponse: DescribeInstanceStateResponse,
InstanceSimpleInfoNew: InstanceSimpleInfoNew,
DescribeSimpleInstancesRequest: DescribeSimpleInstancesRequest,
DescribeInstanceInfoResponse: DescribeInstanceInfoResponse,
}