tencentcloud-sdk-nodejs-intl-en
Version:
1,911 lines (1,603 loc) • 246 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");
/**
* DescribeInstancesTrafficPackages request structure.
* @class
*/
class DescribeInstancesTrafficPackagesRequest extends AbstractModel {
constructor(){
super();
/**
* Instance ID list. Each request can contain up to 100 instances at a time. You can get an instance ID from the `InstanceId` returned by the [DescribeInstances](https://intl.cloud.tencent.com/document/api/1207/47573?from_cn_redirect=1) API.
* @type {Array.<string> || null}
*/
this.InstanceIds = null;
/**
* Offset. Default value: 0.
* @type {number || null}
*/
this.Offset = null;
/**
* Number of returned results. Default value: 20. Maximum value: 100.
* @type {number || null}
*/
this.Limit = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceIds = 'InstanceIds' in params ? params.InstanceIds : null;
this.Offset = 'Offset' in params ? params.Offset : null;
this.Limit = 'Limit' in params ? params.Limit : null;
}
}
/**
* AssociateInstancesKeyPairs response structure.
* @class
*/
class AssociateInstancesKeyPairsResponse 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;
}
}
/**
* RenewInstances request structure.
* @class
*/
class RenewInstancesRequest extends AbstractModel {
constructor(){
super();
/**
* IDs of one or more instances to be operated. The value can be obtained from the `InstanceId` parameter returned by the [DescribeInstances](https://intl.cloud.tencent.com/document/api/1207/47573?from_cn_redirect=1) API. Up to 100 instances can be requested at a time.
* @type {Array.<string> || null}
*/
this.InstanceIds = null;
/**
* Prepaid mode, i.e., monthly subscription. This parameter can specify the purchase period and other attributes such as auto-renewal. It is required for prepaid instances.
* @type {InstanceChargePrepaid || null}
*/
this.InstanceChargePrepaid = null;
/**
* Whether to renew elastic data disks. Values:
`TRUE`: Renew the elastic data disks attached to the instance as well when the related instance is renewed.
`FALSE`: Do not renew the elastic data disks attached to the instance as well when the related instance is renewed.
Default: `TRUE`
* @type {boolean || null}
*/
this.RenewDataDisk = null;
/**
* Whether to automatically use vouchers. Values:
`TRUE`: Use vouchers for payment automatically.
`FALSE`: Do not use vouchers for payment automatically.
Default: `FALSE`.
* @type {boolean || null}
*/
this.AutoVoucher = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceIds = 'InstanceIds' in params ? params.InstanceIds : null;
if (params.InstanceChargePrepaid) {
let obj = new InstanceChargePrepaid();
obj.deserialize(params.InstanceChargePrepaid)
this.InstanceChargePrepaid = obj;
}
this.RenewDataDisk = 'RenewDataDisk' in params ? params.RenewDataDisk : null;
this.AutoVoucher = 'AutoVoucher' in params ? params.AutoVoucher : null;
}
}
/**
* DescribeDisksDeniedActions request structure.
* @class
*/
class DescribeDisksDeniedActionsRequest extends AbstractModel {
constructor(){
super();
/**
* List of cloud disk IDs.
* @type {Array.<string> || null}
*/
this.DiskIds = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.DiskIds = 'DiskIds' in params ? params.DiskIds : null;
}
}
/**
* InquirePriceCreateBlueprint request structure.
* @class
*/
class InquirePriceCreateBlueprintRequest extends AbstractModel {
constructor(){
super();
/**
* Number of custom images. Default value: 1.
* @type {number || null}
*/
this.BlueprintCount = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.BlueprintCount = 'BlueprintCount' in params ? params.BlueprintCount : null;
}
}
/**
* DescribeInstancesTrafficPackages response structure.
* @class
*/
class DescribeInstancesTrafficPackagesResponse extends AbstractModel {
constructor(){
super();
/**
* Number of eligible instance traffic package details.
* @type {number || null}
*/
this.TotalCount = null;
/**
* List of instance traffic package details.
* @type {Array.<InstanceTrafficPackage> || null}
*/
this.InstanceTrafficPackageSet = 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.TotalCount = 'TotalCount' in params ? params.TotalCount : null;
if (params.InstanceTrafficPackageSet) {
this.InstanceTrafficPackageSet = new Array();
for (let z in params.InstanceTrafficPackageSet) {
let obj = new InstanceTrafficPackage();
obj.deserialize(params.InstanceTrafficPackageSet[z]);
this.InstanceTrafficPackageSet.push(obj);
}
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* DescribeInstancesDeniedActions request structure.
* @class
*/
class DescribeInstancesDeniedActionsRequest extends AbstractModel {
constructor(){
super();
/**
* Instance ID list. Each request can contain up to 100 instances at a time. You can get an instance ID from the `InstanceId` returned by the [DescribeInstances](https://intl.cloud.tencent.com/document/api/1207/47573?from_cn_redirect=1) API.
* @type {Array.<string> || null}
*/
this.InstanceIds = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceIds = 'InstanceIds' in params ? params.InstanceIds : null;
}
}
/**
* DeleteKeyPairs response structure.
* @class
*/
class DeleteKeyPairsResponse 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;
}
}
/**
* AttachCcn request structure.
* @class
*/
class AttachCcnRequest extends AbstractModel {
constructor(){
super();
/**
* CCN instance ID.
* @type {string || null}
*/
this.CcnId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.CcnId = 'CcnId' in params ? params.CcnId : null;
}
}
/**
* CreateInstances request structure.
* @class
*/
class CreateInstancesRequest extends AbstractModel {
constructor(){
super();
/**
* Bundle ID. You can get it via the [DescribeBundles](https://intl.cloud.tencent.com/document/api/1207/47575?from_cn_redirect=1) API.
* @type {string || null}
*/
this.BundleId = null;
/**
* Image ID. You can get it via the [DescribeBlueprints](https://intl.cloud.tencent.com/document/api/1207/47689?from_cn_redirect=1) API.
* @type {string || null}
*/
this.BlueprintId = null;
/**
* Monthly subscription information for the instance, including the purchase period, setting of auto-renewal, etc.
* @type {InstanceChargePrepaid || null}
*/
this.InstanceChargePrepaid = null;
/**
* Instance display name.
* @type {string || null}
*/
this.InstanceName = null;
/**
* Number of the instances to purchase. For monthly subscribed instances, the value can be 1 to 30. The default value is `1`. Note that this number can not exceed the remaining quota under the current account.
* @type {number || null}
*/
this.InstanceCount = null;
/**
* List of availability zones. A random AZ is selected by default.
* @type {Array.<string> || null}
*/
this.Zones = null;
/**
* Whether the request is a dry run only.
`true`: dry run only. The request will not create instance(s). A dry run can check whether all the required parameters are specified, whether the request format is right, whether the request exceeds service limits, and whether the specified CVMs are available.
If the dry run fails, the corresponding error code will be returned.
If the dry run succeeds, the RequestId will be returned.
`false` (default value): send a normal request and create instance(s) if all the requirements are met.
* @type {boolean || null}
*/
this.DryRun = null;
/**
* A unique string supplied by the client to ensure that the request is idempotent. Its maximum length is 64 ASCII characters. If this parameter is not specified, the idem-potency of the request cannot be guaranteed.
* @type {string || null}
*/
this.ClientToken = null;
/**
* Login password of the instance. It’s only available for Windows instances. If it’s not specified, it means that the user choose to set the login password after the instance creation.
* @type {LoginConfiguration || null}
*/
this.LoginConfiguration = null;
/**
* Configuration of the containers to create
* @type {Array.<DockerContainerConfiguration> || null}
*/
this.Containers = null;
/**
* Whether to use the vouchers automatically. It defaults to No.
* @type {boolean || null}
*/
this.AutoVoucher = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.BundleId = 'BundleId' in params ? params.BundleId : null;
this.BlueprintId = 'BlueprintId' in params ? params.BlueprintId : null;
if (params.InstanceChargePrepaid) {
let obj = new InstanceChargePrepaid();
obj.deserialize(params.InstanceChargePrepaid)
this.InstanceChargePrepaid = obj;
}
this.InstanceName = 'InstanceName' in params ? params.InstanceName : null;
this.InstanceCount = 'InstanceCount' in params ? params.InstanceCount : null;
this.Zones = 'Zones' in params ? params.Zones : null;
this.DryRun = 'DryRun' in params ? params.DryRun : null;
this.ClientToken = 'ClientToken' in params ? params.ClientToken : null;
if (params.LoginConfiguration) {
let obj = new LoginConfiguration();
obj.deserialize(params.LoginConfiguration)
this.LoginConfiguration = obj;
}
if (params.Containers) {
this.Containers = new Array();
for (let z in params.Containers) {
let obj = new DockerContainerConfiguration();
obj.deserialize(params.Containers[z]);
this.Containers.push(obj);
}
}
this.AutoVoucher = 'AutoVoucher' in params ? params.AutoVoucher : null;
}
}
/**
* DescribeZones request structure.
* @class
*/
class DescribeZonesRequest extends AbstractModel {
constructor(){
super();
/**
* Sorting field. Valid values:
<li>`ZONE`: Sort by the availability zone.
<li>`INSTANCE_DISPLAY_LABEL`: Sort by visibility labels (`HIDDEN`, `NORMAL` and `SELECTED`). Default: ['HIDDEN', 'NORMAL', 'SELECTED'].
The default value is `ZONE`.
* @type {string || null}
*/
this.OrderField = null;
/**
* Specifies how availability zones are listed. Valid values:
<li>ASC: Ascending sort.
<li>DESC: Descending sort.
The default value is `ASC`.
* @type {string || null}
*/
this.Order = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.OrderField = 'OrderField' in params ? params.OrderField : null;
this.Order = 'Order' in params ? params.Order : null;
}
}
/**
* Region information.
* @class
*/
class RegionInfo extends AbstractModel {
constructor(){
super();
/**
* Region name, such as `ap-guangzhou`.
* @type {string || null}
*/
this.Region = null;
/**
* Region description, such as South China (Guangzhou).
* @type {string || null}
*/
this.RegionName = null;
/**
* Region availability status. Its value can only be `AVAILABLE`.
* @type {string || null}
*/
this.RegionState = null;
/**
* Whether the region is in the Chinese mainland
* @type {boolean || null}
*/
this.IsChinaMainland = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Region = 'Region' in params ? params.Region : null;
this.RegionName = 'RegionName' in params ? params.RegionName : null;
this.RegionState = 'RegionState' in params ? params.RegionState : null;
this.IsChinaMainland = 'IsChinaMainland' in params ? params.IsChinaMainland : null;
}
}
/**
* DescribeBlueprintInstances response structure.
* @class
*/
class DescribeBlueprintInstancesResponse extends AbstractModel {
constructor(){
super();
/**
* Number of eligible image instances.
* @type {number || null}
*/
this.TotalCount = null;
/**
* Image instance list information.
* @type {Array.<BlueprintInstance> || null}
*/
this.BlueprintInstanceSet = 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.TotalCount = 'TotalCount' in params ? params.TotalCount : null;
if (params.BlueprintInstanceSet) {
this.BlueprintInstanceSet = new Array();
for (let z in params.BlueprintInstanceSet) {
let obj = new BlueprintInstance();
obj.deserialize(params.BlueprintInstanceSet[z]);
this.BlueprintInstanceSet.push(obj);
}
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* List of instance operation limits.
* @class
*/
class InstanceDeniedActions extends AbstractModel {
constructor(){
super();
/**
* Instance ID.
Note: this field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.InstanceId = null;
/**
* List of operation limits.
* @type {Array.<DeniedAction> || null}
*/
this.DeniedActions = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
if (params.DeniedActions) {
this.DeniedActions = new Array();
for (let z in params.DeniedActions) {
let obj = new DeniedAction();
obj.deserialize(params.DeniedActions[z]);
this.DeniedActions.push(obj);
}
}
}
}
/**
* InquirePriceCreateDisks request structure.
* @class
*/
class InquirePriceCreateDisksRequest extends AbstractModel {
constructor(){
super();
/**
* Cloud disk size in GB.
* @type {number || null}
*/
this.DiskSize = null;
/**
* Cloud disk media type. Valid values: "CLOUD_PREMIUM" (premium cloud storage), "CLOUD_SSD" (SSD cloud disk).
* @type {string || null}
*/
this.DiskType = null;
/**
* Parameter settings for purchasing the monthly subscribed cloud disk.
* @type {DiskChargePrepaid || null}
*/
this.DiskChargePrepaid = null;
/**
* Number of cloud disks. Default value: 1.
* @type {number || null}
*/
this.DiskCount = null;
/**
* Specify the quota of disk backups. No quota if it’s left empty. Only one quota is allowed.
* @type {number || null}
*/
this.DiskBackupQuota = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.DiskSize = 'DiskSize' in params ? params.DiskSize : null;
this.DiskType = 'DiskType' in params ? params.DiskType : null;
if (params.DiskChargePrepaid) {
let obj = new DiskChargePrepaid();
obj.deserialize(params.DiskChargePrepaid)
this.DiskChargePrepaid = obj;
}
this.DiskCount = 'DiskCount' in params ? params.DiskCount : null;
this.DiskBackupQuota = 'DiskBackupQuota' in params ? params.DiskBackupQuota : null;
}
}
/**
* Changeable packages for the instance.
* @class
*/
class ModifyBundle extends AbstractModel {
constructor(){
super();
/**
* Price difference that you need to pay for the new instance package after change.
* @type {Price || null}
*/
this.ModifyPrice = null;
/**
* Package change status. Valid values:
<li>SOLD_OUT: packages are sold out</li>
<li>AVAILABLE: packages can be changed</li>
<li>UNAVAILABLE: packages cannot be changed currently</li>
* @type {string || null}
*/
this.ModifyBundleState = null;
/**
* Package information.
* @type {Bundle || null}
*/
this.Bundle = null;
/**
* The reason of package changing failure. It’s empty if the package change status is `AVAILABLE`.
Note: This field may return `null`, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.NotSupportModifyMessage = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
if (params.ModifyPrice) {
let obj = new Price();
obj.deserialize(params.ModifyPrice)
this.ModifyPrice = obj;
}
this.ModifyBundleState = 'ModifyBundleState' in params ? params.ModifyBundleState : null;
if (params.Bundle) {
let obj = new Bundle();
obj.deserialize(params.Bundle)
this.Bundle = obj;
}
this.NotSupportModifyMessage = 'NotSupportModifyMessage' in params ? params.NotSupportModifyMessage : null;
}
}
/**
* DetachCcn response structure.
* @class
*/
class DetachCcnResponse 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;
}
}
/**
* BlueprintPrice Custom image price parameter.
* @class
*/
class BlueprintPrice extends AbstractModel {
constructor(){
super();
/**
* Original image unit price in USD.
* @type {number || null}
*/
this.OriginalBlueprintPrice = null;
/**
* Original image total price in USD.
* @type {number || null}
*/
this.OriginalPrice = null;
/**
* Discount.
* @type {number || null}
*/
this.Discount = null;
/**
* Discounted image total price in USD.
* @type {number || null}
*/
this.DiscountPrice = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.OriginalBlueprintPrice = 'OriginalBlueprintPrice' in params ? params.OriginalBlueprintPrice : null;
this.OriginalPrice = 'OriginalPrice' in params ? params.OriginalPrice : null;
this.Discount = 'Discount' in params ? params.Discount : null;
this.DiscountPrice = 'DiscountPrice' in params ? params.DiscountPrice : null;
}
}
/**
* DescribeScenes response structure.
* @class
*/
class DescribeScenesResponse extends AbstractModel {
constructor(){
super();
/**
* List of scenes
* @type {Array.<Scene> || null}
*/
this.SceneSet = null;
/**
* Total number of scenes
* @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.SceneSet) {
this.SceneSet = new Array();
for (let z in params.SceneSet) {
let obj = new Scene();
obj.deserialize(params.SceneSet[z]);
this.SceneSet.push(obj);
}
}
this.TotalCount = 'TotalCount' in params ? params.TotalCount : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* InquirePriceRenewInstances response structure.
* @class
*/
class InquirePriceRenewInstancesResponse extends AbstractModel {
constructor(){
super();
/**
* Price information. It defaults to the price information of the first instance in the list.
* @type {Price || null}
*/
this.Price = null;
/**
* List of data disk price information.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {Array.<DataDiskPrice> || null}
*/
this.DataDiskPriceSet = null;
/**
* Price list of the instances to be renewed.
Note: This field may return `null`, indicating that no valid value was found.
* @type {Array.<InstancePriceDetail> || null}
*/
this.InstancePriceDetailSet = null;
/**
* Total price
* @type {TotalPrice || null}
*/
this.TotalPrice = 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.Price) {
let obj = new Price();
obj.deserialize(params.Price)
this.Price = obj;
}
if (params.DataDiskPriceSet) {
this.DataDiskPriceSet = new Array();
for (let z in params.DataDiskPriceSet) {
let obj = new DataDiskPrice();
obj.deserialize(params.DataDiskPriceSet[z]);
this.DataDiskPriceSet.push(obj);
}
}
if (params.InstancePriceDetailSet) {
this.InstancePriceDetailSet = new Array();
for (let z in params.InstancePriceDetailSet) {
let obj = new InstancePriceDetail();
obj.deserialize(params.InstancePriceDetailSet[z]);
this.InstancePriceDetailSet.push(obj);
}
}
if (params.TotalPrice) {
let obj = new TotalPrice();
obj.deserialize(params.TotalPrice)
this.TotalPrice = obj;
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* DeleteFirewallRules response structure.
* @class
*/
class DeleteFirewallRulesResponse 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;
}
}
/**
* ModifyInstancesAttribute request structure.
* @class
*/
class ModifyInstancesAttributeRequest extends AbstractModel {
constructor(){
super();
/**
* Instance ID list. Each request can contain up to 100 instances at a time. You can get an instance ID from the `InstanceId` returned by the [DescribeInstances](https://intl.cloud.tencent.com/document/api/1207/47573?from_cn_redirect=1) API.
* @type {Array.<string> || null}
*/
this.InstanceIds = null;
/**
* Instance name, which is customizable and can contain up to 60 characters.
* @type {string || null}
*/
this.InstanceName = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceIds = 'InstanceIds' in params ? params.InstanceIds : null;
this.InstanceName = 'InstanceName' in params ? params.InstanceName : null;
}
}
/**
* DescribeInstances response structure.
* @class
*/
class DescribeInstancesResponse extends AbstractModel {
constructor(){
super();
/**
* Number of eligible instances.
* @type {number || null}
*/
this.TotalCount = null;
/**
* List of instance details
* @type {Array.<Instance> || null}
*/
this.InstanceSet = 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.TotalCount = 'TotalCount' in params ? params.TotalCount : null;
if (params.InstanceSet) {
this.InstanceSet = new Array();
for (let z in params.InstanceSet) {
let obj = new Instance();
obj.deserialize(params.InstanceSet[z]);
this.InstanceSet.push(obj);
}
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* DeleteKeyPairs request structure.
* @class
*/
class DeleteKeyPairsRequest extends AbstractModel {
constructor(){
super();
/**
* Key pair ID list. Each request can contain up to 10 key pairs.
* @type {Array.<string> || null}
*/
this.KeyIds = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.KeyIds = 'KeyIds' in params ? params.KeyIds : null;
}
}
/**
* Information on the block device where the operating system is installed, namely the system disk.
* @class
*/
class SystemDisk extends AbstractModel {
constructor(){
super();
/**
* System disk type.
Valid values:
<li> LOCAL_BASIC: local disk</li><li> LOCAL_SSD: local SSD disk</li><li> CLOUD_BASIC: HDD cloud disk</li><li> CLOUD_SSD: SSD cloud disk</li><li> CLOUD_PREMIUM: Premium Cloud Storage</li>
* @type {string || null}
*/
this.DiskType = null;
/**
* System disk size in GB.
* @type {number || null}
*/
this.DiskSize = null;
/**
* System disk ID.
Note: this field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.DiskId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.DiskType = 'DiskType' in params ? params.DiskType : null;
this.DiskSize = 'DiskSize' in params ? params.DiskSize : null;
this.DiskId = 'DiskId' in params ? params.DiskId : null;
}
}
/**
* Image reset information
* @class
*/
class ResetInstanceBlueprint extends AbstractModel {
constructor(){
super();
/**
* Image details
* @type {Blueprint || null}
*/
this.BlueprintInfo = null;
/**
* Whether the image can be reset as the target image
* @type {boolean || null}
*/
this.IsResettable = null;
/**
* Non-Resettable flag. If the image is resettable, it will be ""
* @type {string || null}
*/
this.NonResettableMessage = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
if (params.BlueprintInfo) {
let obj = new Blueprint();
obj.deserialize(params.BlueprintInfo)
this.BlueprintInfo = obj;
}
this.IsResettable = 'IsResettable' in params ? params.IsResettable : null;
this.NonResettableMessage = 'NonResettableMessage' in params ? params.NonResettableMessage : null;
}
}
/**
* DescribeBundles response structure.
* @class
*/
class DescribeBundlesResponse extends AbstractModel {
constructor(){
super();
/**
* List of package details.
* @type {Array.<Bundle> || null}
*/
this.BundleSet = null;
/**
* Total number of eligible packages, which is used for pagination.
* @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.BundleSet) {
this.BundleSet = new Array();
for (let z in params.BundleSet) {
let obj = new Bundle();
obj.deserialize(params.BundleSet[z]);
this.BundleSet.push(obj);
}
}
this.TotalCount = 'TotalCount' in params ? params.TotalCount : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* ModifyInstancesBundle request structure.
* @class
*/
class ModifyInstancesBundleRequest extends AbstractModel {
constructor(){
super();
/**
* IDs of target instances. You can get the IDs from the `InstanceId` parameter returned by the `DescribeInstances` API. Up to 15 instances can be specified at the same time.
* @type {Array.<string> || null}
*/
this.InstanceIds = null;
/**
* ID of bundles to change. You can get the IDs from the `BundleId` returned by the [DescribeBundles](https://intl.cloud.tencent.com/document/api/1207/47575?from_cn_redirect=1).
* @type {string || null}
*/
this.BundleId = null;
/**
* Whether to use existing vouchers under the current account automatically. Valid values:
`true`: Deduct from existing vouchers automatically
`false`: Do not deduct from existing vouchers automatically
Default value: `false`.
* @type {boolean || null}
*/
this.AutoVoucher = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceIds = 'InstanceIds' in params ? params.InstanceIds : null;
this.BundleId = 'BundleId' in params ? params.BundleId : null;
this.AutoVoucher = 'AutoVoucher' in params ? params.AutoVoucher : null;
}
}
/**
* Instance price details
* @class
*/
class InstancePriceDetail extends AbstractModel {
constructor(){
super();
/**
* Instance ID.
Note: This field may return `null`, indicating that no valid value was found.
* @type {string || null}
*/
this.InstanceId = null;
/**
* Price query information.
Note: This field may return `null`, indicating that no valid value was found.
* @type {InstancePrice || null}
*/
this.InstancePrice = null;
/**
* Tiered-pricing details. The information of each tier includes the billable period, discount percentage, total price, discounted price, and discount details (`UserDiscount`, `CommonDiscount` and `FinalDiscount`).
Note: This field may return `null`, indicating that no valid values can be obtained.
* @type {Array.<DiscountDetail> || null}
*/
this.DiscountDetail = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
if (params.InstancePrice) {
let obj = new InstancePrice();
obj.deserialize(params.InstancePrice)
this.InstancePrice = obj;
}
if (params.DiscountDetail) {
this.DiscountDetail = new Array();
for (let z in params.DiscountDetail) {
let obj = new DiscountDetail();
obj.deserialize(params.DiscountDetail[z]);
this.DiscountDetail.push(obj);
}
}
}
}
/**
* InquirePriceRenewInstances request structure.
* @class
*/
class InquirePriceRenewInstancesRequest extends AbstractModel {
constructor(){
super();
/**
* IDs of the instances to be renewed. Each request can contain up to 50 instances at a time. You can get an instance ID from the `InstanceId` returned by the [DescribeInstances](https://intl.cloud.tencent.com/document/api/1207/47573?from_cn_redirect=1) API.
* @type {Array.<string> || null}
*/
this.InstanceIds = null;
/**
* Parameter setting for prepaid mode. This parameter can specify the renewal period, whether to enable auto-renewal, and other attributes of the monthly subscribed instances.
* @type {InstanceChargePrepaid || null}
*/
this.InstanceChargePrepaid = null;
/**
* Whether to renew the data disk. Default: `false`.
* @type {boolean || null}
*/
this.RenewDataDisk = null;
/**
* Whether to align the data disk expiration with the instance expiration time. Default: `false`.
* @type {boolean || null}
*/
this.AlignInstanceExpiredTime = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceIds = 'InstanceIds' in params ? params.InstanceIds : null;
if (params.InstanceChargePrepaid) {
let obj = new InstanceChargePrepaid();
obj.deserialize(params.InstanceChargePrepaid)
this.InstanceChargePrepaid = obj;
}
this.RenewDataDisk = 'RenewDataDisk' in params ? params.RenewDataDisk : null;
this.AlignInstanceExpiredTime = 'AlignInstanceExpiredTime' in params ? params.AlignInstanceExpiredTime : null;
}
}
/**
* Package discount details (only returned for price query APIs called in the console).
* @class
*/
class DiscountDetail extends AbstractModel {
constructor(){
super();
/**
* Billing duration.
* @type {number || null}
*/
this.TimeSpan = null;
/**
* Billing unit.
* @type {string || null}
*/
this.TimeUnit = null;
/**
* Total price.
* @type {number || null}
*/
this.TotalCost = null;
/**
* Discounted total price.
* @type {number || null}
*/
this.RealTotalCost = null;
/**
* Discount.
* @type {number || null}
*/
this.Discount = null;
/**
* Discount details.
* @type {PolicyDetail || null}
*/
this.PolicyDetail = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.TimeSpan = 'TimeSpan' in params ? params.TimeSpan : null;
this.TimeUnit = 'TimeUnit' in params ? params.TimeUnit : null;
this.TotalCost = 'TotalCost' in params ? params.TotalCost : null;
this.RealTotalCost = 'RealTotalCost' in params ? params.RealTotalCost : null;
this.Discount = 'Discount' in params ? params.Discount : null;
if (params.PolicyDetail) {
let obj = new PolicyDetail();
obj.deserialize(params.PolicyDetail)
this.PolicyDetail = obj;
}
}
}
/**
* DescribeDiskConfigs request structure.
* @class
*/
class DescribeDiskConfigsRequest extends AbstractModel {
constructor(){
super();
/**
* Filter list.
<li>zone</li>Filter by availability zone.
Type: String
Required: no
* @type {Array.<Filter> || null}
*/
this.Filters = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
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);
}
}
}
}
/**
* DescribeRegions response structure.
* @class
*/
class DescribeRegionsResponse extends AbstractModel {
constructor(){
super();
/**
* Number of regions.
* @type {number || null}
*/
this.TotalCount = null;
/**
* Region information list.
* @type {Array.<RegionInfo> || null}
*/
this.RegionSet = 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.TotalCount = 'TotalCount' in params ? params.TotalCount : null;
if (params.RegionSet) {
this.RegionSet = new Array();
for (let z in params.RegionSet) {
let obj = new RegionInfo();
obj.deserialize(params.RegionSet[z]);
this.RegionSet.push(obj);
}
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* AssociateInstancesKeyPairs request structure.
* @class
*/
class AssociateInstancesKeyPairsRequest extends AbstractModel {
constructor(){
super();
/**
* Key pair ID list. Each request can contain up to 100 key pairs.
* @type {Array.<string> || null}
*/
this.KeyIds = null;
/**
* Instance ID list. Each request can contain up to 100 instances at a time. You can get an instance ID from the `InstanceId` returned by the [DescribeInstances](https://intl.cloud.tencent.com/document/api/1207/47573?from_cn_redirect=1) API.
* @type {Array.<string> || null}
*/
this.InstanceIds = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.KeyIds = 'KeyIds' in params ? params.KeyIds : null;
this.InstanceIds = 'InstanceIds' in params ? params.InstanceIds : null;
}
}
/**
* AttachCcn response structure.
* @class
*/
class AttachCcnResponse 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;
}
}
/**
* RebootInstances request structure.
* @class
*/
class RebootInstancesRequest extends AbstractModel {
constructor(){
super();
/**
* Instance ID list. Each request can contain up to 100 instances at a time. You can get an instance ID from the `InstanceId` returned by the [DescribeInstances](https://intl.cloud.tencent.com/document/api/1207/47573?from_cn_redirect=1) API.
* @type {Array.<string> || null}
*/
this.InstanceIds = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceIds = 'InstanceIds' in params ? params.InstanceIds : null;
}
}
/**
* ResetAttachCcn request structure.
* @class
*/
class ResetAttachCcnRequest extends AbstractModel {
constructor(){
super();
/**
* CCN instance ID.
* @type {string || null}
*/
this.CcnId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.CcnId = 'CcnId' in params ? params.CcnId : null;
}
}
/**
* CreateDisks request structure.
* @class
*/
class CreateDisksRequest extends AbstractModel {
constructor(){
super();
/**
* Availability zone. You can call [DescribeZones](https://intl.cloud.tencent.com/document/product/1207/57513?from_cn_redirect=1) and get the information in the `Zone` parameter re
* @type {string || null}
*/
this.Zone = null;
/**
* Cloud disk size in GB.
* @type {number || null}
*/
this.DiskSize = null;
/**
* Cloud disk media type. Valid values: "CLOUD_PREMIUM" (premium cloud disk), "CLOUD_SSD" (SSD cloud disk).
* @type {string || null}
*/
this.DiskType = null;
/**
* Parameters of monthly subscribed cloud disks
* @type {DiskChargePrepaid || null}
*/
this.DiskChargePrepaid = null;
/**
* Image name, which can contain up to 60 characters.
* @type {string || null}
*/
this.DiskName = null;
/**
* Number of cloud disks. Range: [1, 30]. Default value: 1.
* @type {number || null}
*/
this.DiskCount = null;
/**
* Specify the quota of disk backups. No quota if it’s left empty. Only one quota is allowed.
* @type {number || null}
*/
this.DiskBackupQuota = null;
/**
* Whether to use the vouchers automatically. It defaults to No.
* @type {boolean || null}
*/
this.AutoVoucher = null;
/**
* Automatically mount and initialize the data disk.
* @type {AutoMountConfiguration || null}
*/
this.AutoMountConfiguration = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Zone = 'Zone' in params ? params.Zone : null;
this.DiskSize = 'DiskSize' in params ? params.DiskSize : null;
this.DiskType = 'DiskType' in params ? params.DiskType : null;
if (params.DiskChargePrepaid) {
let obj = new DiskChargePrepaid();
obj.deserialize(params.DiskChargePrepaid)
this.DiskChargePrepaid = obj;
}
this.DiskName = 'DiskName' in params ? params.DiskName : null;
this.DiskCount = 'DiskCount' in params ? params.DiskCount : null;
this.DiskBackupQuota = 'DiskBackupQuota' in params ? params.DiskBackupQuota : null;
this.AutoVoucher = 'AutoVoucher' in params ? params.AutoVoucher : null;
if (params.AutoMountConfiguration) {
let obj = new AutoMountConfiguration();
obj.deserialize(params.AutoMountConfiguration)
this.AutoMountConfiguration = obj;
}
}
}
/**
* AttachDisks request structure.
* @class
*/
class AttachDisksRequest extends AbstractModel {
constructor(){
super();
/**
* List of cloud disk IDs.
* @type {Array.<string> || null}
*/
this.DiskIds = null;
/**
* Instance ID.
* @type {string || null}
*/
this.InstanceId = null;
/**
* Specify whether to renew an instance automatically when it expires. Values:
`NOTIFY_AND_AUTO_RENEW`: Trigger expiration notification and renew automatically; `NOTIFY_AND_MANUAL_RENEW`: Trigger expiration notification but do not renew; `DISABLE_NOTIFY_AND_MANUAL_RENEW`: Do not trigger the notification and do not renew.
Default: `NOTIFY_AND_MANUAL_RENEW`. If `NOTIFY_AND_AUTO_RENEW` is specified, the instance is automatically renewed on a monthly basis when the account balance is sufficient.
* @type {string || null}
*/
this.RenewFlag = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.DiskIds = 'DiskIds' in params ? params.DiskIds : null;
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
this.RenewFlag = 'RenewFlag' in params ? params.RenewFlag : null;
}
}
/**
* ImportKeyPair response structure.
* @class
*/
class ImportKeyPairResponse extends AbstractModel {
constructor(){
super();
/**
* Key pair ID.
* @type {string || null}
*/
this.KeyId = 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.KeyId = 'KeyId' in params ? params.KeyId : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* DescribeSnapshots request structure.
* @class
*/
class DescribeSnapshotsRequest extends AbstractModel {
constructor(){
super();
/**
* List of IDs of snapshots to be queried.
You cannot specify `SnapshotIds` and `Filters` at the same time.
* @type {Array.<string> || null}
*/
this.SnapshotIds = null;
/**
* Filter list.
<li>snapshot-id</li>Filter by **snapshot ID**.
Type: String
Required: no
<li>disk-id</li>Filter by **disk ID**.
Type: String
Required: no
<li>snapshot-name</li>Filter by **snapshot name**.
Type: String
Required: no
<li>instance-id</li>Filter by **instance ID**.
Type: String
Required: no
Each request can contain up to 10 `Filters` and 5 `Filter.Values`. You cannot specify both `SnapshotIds` and `Filters` at the same time.
* @type {Array.<Filter> || null}
*/
this.Filters = null;
/**
* Offset. Default value: 0.
* @type {number || null}
*/
this.Offset = null;
/**
* Number of returned results. Default value: 20. Maximum value: 100.
* @typ