tencentcloud-sdk-nodejs-intl-en
Version:
1,717 lines (1,452 loc) • 571 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");
/**
* Details of an instance task
* @class
*/
class TaskDetail extends AbstractModel {
constructor(){
super();
/**
* Error code.
* @type {number || null}
*/
this.Code = null;
/**
* Error message.
* @type {string || null}
*/
this.Message = null;
/**
* ID of an instance task.
* @type {number || null}
*/
this.JobId = null;
/**
* Instance task progress.
* @type {number || null}
*/
this.Progress = null;
/**
* Instance task status. Valid values:
"UNDEFINED" - undefined;
"INITIAL" - initializing;
"RUNNING" - running;
"SUCCEED" - succeeded;
"FAILED" - failed;
"KILLED" - terminated;
"REMOVED" - deleted;
"PAUSED" - paused.
"WAITING" - waiting (which can be canceled)
* @type {string || null}
*/
this.TaskStatus = null;
/**
* Instance task type. Valid values:
"ROLLBACK" - rolling back a database;
"SQL OPERATION" - performing an SQL operation;
"IMPORT DATA" - importing data;
"MODIFY PARAM" - setting a parameter;
"INITIAL" - initializing a TencentDB instance;
"REBOOT" - restarting a TencentDB instance;
"OPEN GTID" - enabling GTID of a TencentDB instance;
"UPGRADE RO" - upgrading a read-only instance;
"BATCH ROLLBACK" - rolling back databases in batches;
"UPGRADE MASTER" - upgrading a primary instance;
"DROP TABLES" - dropping a TencentDB table;
"SWITCH DR TO MASTER" - promoting a disaster recovery instance.
* @type {string || null}
*/
this.TaskType = null;
/**
* Instance task start time.
* @type {string || null}
*/
this.StartTime = null;
/**
* Instance task end time.
* @type {string || null}
*/
this.EndTime = null;
/**
* ID of an instance associated with a task.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {Array.<string> || null}
*/
this.InstanceIds = null;
/**
* Async task request ID.
* @type {string || null}
*/
this.AsyncRequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Code = 'Code' in params ? params.Code : null;
this.Message = 'Message' in params ? params.Message : null;
this.JobId = 'JobId' in params ? params.JobId : null;
this.Progress = 'Progress' in params ? params.Progress : null;
this.TaskStatus = 'TaskStatus' in params ? params.TaskStatus : null;
this.TaskType = 'TaskType' in params ? params.TaskType : null;
this.StartTime = 'StartTime' in params ? params.StartTime : null;
this.EndTime = 'EndTime' in params ? params.EndTime : null;
this.InstanceIds = 'InstanceIds' in params ? params.InstanceIds : null;
this.AsyncRequestId = 'AsyncRequestId' in params ? params.AsyncRequestId : null;
}
}
/**
* Purchasable specifications in an AZ
* @class
*/
class CdbZoneSellConf extends AbstractModel {
constructor(){
super();
/**
* AZ status, which is used to indicate whether instances are purchasable. Valid values: `1` (purchasable), `3` (not purchasable), `4` (AZ not displayed)
* @type {number || null}
*/
this.Status = null;
/**
* AZ name
* @type {string || null}
*/
this.ZoneName = null;
/**
* Whether it is a custom instance type
* @type {boolean || null}
*/
this.IsCustom = null;
/**
* Whether disaster recovery is supported
* @type {boolean || null}
*/
this.IsSupportDr = null;
/**
* Whether VPC is supported
* @type {boolean || null}
*/
this.IsSupportVpc = null;
/**
* Maximum purchasable quantity of hourly billed instances
* @type {number || null}
*/
this.HourInstanceSaleMaxNum = null;
/**
* Whether it is a default AZ
* @type {boolean || null}
*/
this.IsDefaultZone = null;
/**
* Whether it is a BM zone
* @type {boolean || null}
*/
this.IsBm = null;
/**
* Supported billing method. Valid values: `0` (monthly subscribed), `1` (hourly billed), `2` (pay-as-you-go)
* @type {Array.<string> || null}
*/
this.PayType = null;
/**
* Data replication type. Valid values: `0` (async), `1` (semi-sync), `2` (strong sync)
* @type {Array.<string> || null}
*/
this.ProtectMode = null;
/**
* AZ name
* @type {string || null}
*/
this.Zone = null;
/**
* Multi-AZ information
* @type {ZoneConf || null}
*/
this.ZoneConf = null;
/**
* Information of supported disaster recovery AZs
* @type {Array.<string> || null}
*/
this.DrZone = null;
/**
* Whether cross-AZ read-only access is supported
* @type {boolean || null}
*/
this.IsSupportRemoteRo = null;
/**
* Information of supported cross-AZ read-only zone
* @type {Array.<string> || null}
*/
this.RemoteRoZone = null;
/**
* AZ status, which is used to indicate whether dedicated instances are purchasable. Valid values: `1 (purchasable), `3` (not purchasable), `4` (AZ not displayed)
* @type {number || null}
*/
this.ExClusterStatus = null;
/**
* Information of cross-AZ read-only zones supported by a dedicated instance
* @type {Array.<string> || null}
*/
this.ExClusterRemoteRoZone = null;
/**
* AZ information of a multi-AZ deployed dedicated instance.
* @type {ZoneConf || null}
*/
this.ExClusterZoneConf = null;
/**
* Array of purchasable instance types. The value of `configIds` and `configs` have a one-to-one correspondence.
* @type {Array.<CdbSellType> || null}
*/
this.SellType = null;
/**
* AZ ID
* @type {number || null}
*/
this.ZoneId = null;
/**
* Whether IPv6 is supported
* @type {boolean || null}
*/
this.IsSupportIpv6 = null;
/**
* Supported engine types for purchasable database
* @type {Array.<string> || null}
*/
this.EngineType = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Status = 'Status' in params ? params.Status : null;
this.ZoneName = 'ZoneName' in params ? params.ZoneName : null;
this.IsCustom = 'IsCustom' in params ? params.IsCustom : null;
this.IsSupportDr = 'IsSupportDr' in params ? params.IsSupportDr : null;
this.IsSupportVpc = 'IsSupportVpc' in params ? params.IsSupportVpc : null;
this.HourInstanceSaleMaxNum = 'HourInstanceSaleMaxNum' in params ? params.HourInstanceSaleMaxNum : null;
this.IsDefaultZone = 'IsDefaultZone' in params ? params.IsDefaultZone : null;
this.IsBm = 'IsBm' in params ? params.IsBm : null;
this.PayType = 'PayType' in params ? params.PayType : null;
this.ProtectMode = 'ProtectMode' in params ? params.ProtectMode : null;
this.Zone = 'Zone' in params ? params.Zone : null;
if (params.ZoneConf) {
let obj = new ZoneConf();
obj.deserialize(params.ZoneConf)
this.ZoneConf = obj;
}
this.DrZone = 'DrZone' in params ? params.DrZone : null;
this.IsSupportRemoteRo = 'IsSupportRemoteRo' in params ? params.IsSupportRemoteRo : null;
this.RemoteRoZone = 'RemoteRoZone' in params ? params.RemoteRoZone : null;
this.ExClusterStatus = 'ExClusterStatus' in params ? params.ExClusterStatus : null;
this.ExClusterRemoteRoZone = 'ExClusterRemoteRoZone' in params ? params.ExClusterRemoteRoZone : null;
if (params.ExClusterZoneConf) {
let obj = new ZoneConf();
obj.deserialize(params.ExClusterZoneConf)
this.ExClusterZoneConf = obj;
}
if (params.SellType) {
this.SellType = new Array();
for (let z in params.SellType) {
let obj = new CdbSellType();
obj.deserialize(params.SellType[z]);
this.SellType.push(obj);
}
}
this.ZoneId = 'ZoneId' in params ? params.ZoneId : null;
this.IsSupportIpv6 = 'IsSupportIpv6' in params ? params.IsSupportIpv6 : null;
this.EngineType = 'EngineType' in params ? params.EngineType : null;
}
}
/**
* CreateDBImportJob request structure.
* @class
*/
class CreateDBImportJobRequest extends AbstractModel {
constructor(){
super();
/**
* Instance ID in the format of cdb-c1nl9rpv. It is the same as the instance ID displayed on the TencentDB Console page.
* @type {string || null}
*/
this.InstanceId = null;
/**
* TencentDB username
* @type {string || null}
*/
this.User = null;
/**
* Filename. The file must be a .sql file uploaded to Tencent Cloud.
* @type {string || null}
*/
this.FileName = null;
/**
* Password of a TencentDB instance user account
* @type {string || null}
*/
this.Password = null;
/**
* Name of the target database. If this parameter is not passed in, no database is specified.
* @type {string || null}
*/
this.DbName = null;
/**
* URL of a .sql file stored in COS. Either `FileName` or `CosUrl` must be specified.
* @type {string || null}
*/
this.CosUrl = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
this.User = 'User' in params ? params.User : null;
this.FileName = 'FileName' in params ? params.FileName : null;
this.Password = 'Password' in params ? params.Password : null;
this.DbName = 'DbName' in params ? params.DbName : null;
this.CosUrl = 'CosUrl' in params ? params.CosUrl : null;
}
}
/**
* DescribeDatabases request structure.
* @class
*/
class DescribeDatabasesRequest extends AbstractModel {
constructor(){
super();
/**
* Instance ID in the format of cdb-c1nl9rpv. It is the same as the instance ID displayed on the TencentDB Console page.
* @type {string || null}
*/
this.InstanceId = null;
/**
* Offset. Minimum value: 0.
* @type {number || null}
*/
this.Offset = null;
/**
* Number of results to be returned for a single request. Value range: 1-100. Maximum value: 20.
* @type {number || null}
*/
this.Limit = null;
/**
* Regular expression for matching database names.
* @type {string || null}
*/
this.DatabaseRegexp = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
this.Offset = 'Offset' in params ? params.Offset : null;
this.Limit = 'Limit' in params ? params.Limit : null;
this.DatabaseRegexp = 'DatabaseRegexp' in params ? params.DatabaseRegexp : null;
}
}
/**
* CreateCdbProxy request structure.
* @class
*/
class CreateCdbProxyRequest extends AbstractModel {
constructor(){
super();
/**
* Instance ID
* @type {string || null}
*/
this.InstanceId = null;
/**
* VPC ID
* @type {string || null}
*/
this.UniqVpcId = null;
/**
* VPC subnet ID
* @type {string || null}
*/
this.UniqSubnetId = null;
/**
* The specification configuration of a node
* @type {Array.<ProxyNodeCustom> || null}
*/
this.ProxyNodeCustom = null;
/**
* Security group
* @type {Array.<string> || null}
*/
this.SecurityGroup = null;
/**
* Description
* @type {string || null}
*/
this.Desc = null;
/**
* Connection pool threshold
* @type {number || null}
*/
this.ConnectionPoolLimit = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
this.UniqVpcId = 'UniqVpcId' in params ? params.UniqVpcId : null;
this.UniqSubnetId = 'UniqSubnetId' in params ? params.UniqSubnetId : null;
if (params.ProxyNodeCustom) {
this.ProxyNodeCustom = new Array();
for (let z in params.ProxyNodeCustom) {
let obj = new ProxyNodeCustom();
obj.deserialize(params.ProxyNodeCustom[z]);
this.ProxyNodeCustom.push(obj);
}
}
this.SecurityGroup = 'SecurityGroup' in params ? params.SecurityGroup : null;
this.Desc = 'Desc' in params ? params.Desc : null;
this.ConnectionPoolLimit = 'ConnectionPoolLimit' in params ? params.ConnectionPoolLimit : null;
}
}
/**
* CreateCdbProxy response structure.
* @class
*/
class CreateCdbProxyResponse extends AbstractModel {
constructor(){
super();
/**
* Async task ID Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.AsyncRequestId = 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.AsyncRequestId = 'AsyncRequestId' in params ? params.AsyncRequestId : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* Time range available for instance rollback
* @class
*/
class InstanceRollbackRangeTime extends AbstractModel {
constructor(){
super();
/**
* Queries database error code
* @type {number || null}
*/
this.Code = null;
/**
* Queries database error message
* @type {string || null}
*/
this.Message = null;
/**
* List of instance IDs. An instance ID is in the format of cdb-c1nl9rpv, which is the same as the instance ID displayed on the TencentDB Console page.
* @type {string || null}
*/
this.InstanceId = null;
/**
* Time range available for rollback
* @type {Array.<RollbackTimeRange> || null}
*/
this.Times = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Code = 'Code' in params ? params.Code : null;
this.Message = 'Message' in params ? params.Message : null;
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
if (params.Times) {
this.Times = new Array();
for (let z in params.Times) {
let obj = new RollbackTimeRange();
obj.deserialize(params.Times[z]);
this.Times.push(obj);
}
}
}
}
/**
* DescribeTables response structure.
* @class
*/
class DescribeTablesResponse extends AbstractModel {
constructor(){
super();
/**
* Number of eligible tables.
* @type {number || null}
*/
this.TotalCount = null;
/**
* Information of a table.
* @type {Array.<string> || null}
*/
this.Items = 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;
this.Items = 'Items' in params ? params.Items : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* ModifyBackupDownloadRestriction response structure.
* @class
*/
class ModifyBackupDownloadRestrictionResponse 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;
}
}
/**
* ModifyTimeWindow response structure.
* @class
*/
class ModifyTimeWindowResponse 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;
}
}
/**
* Parameter modification records
* @class
*/
class ParamRecord extends AbstractModel {
constructor(){
super();
/**
* Instance ID
* @type {string || null}
*/
this.InstanceId = null;
/**
* Parameter name
* @type {string || null}
*/
this.ParamName = null;
/**
* Parameter value before modification
* @type {string || null}
*/
this.OldValue = null;
/**
* Parameter value after modification
* @type {string || null}
*/
this.NewValue = null;
/**
* Whether the parameter is modified successfully
* @type {boolean || null}
*/
this.IsSucess = null;
/**
* Modification time
* @type {string || null}
*/
this.ModifyTime = null;
/**
* Indicates whether the parameter is modified successfully.
* @type {boolean || null}
*/
this.IsSuccess = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
this.ParamName = 'ParamName' in params ? params.ParamName : null;
this.OldValue = 'OldValue' in params ? params.OldValue : null;
this.NewValue = 'NewValue' in params ? params.NewValue : null;
this.IsSucess = 'IsSucess' in params ? params.IsSucess : null;
this.ModifyTime = 'ModifyTime' in params ? params.ModifyTime : null;
this.IsSuccess = 'IsSuccess' in params ? params.IsSuccess : null;
}
}
/**
* ModifyTimeWindow request structure.
* @class
*/
class ModifyTimeWindowRequest extends AbstractModel {
constructor(){
super();
/**
* Instance ID in the format of cdb-c1nl9rpv or cdbro-c1nl9rpv. It is the same as the instance ID displayed on the TencentDB Console page.
* @type {string || null}
*/
this.InstanceId = null;
/**
* Time period available for maintenance after modification in the format of 10:00-12:00. Each period lasts from half an hour to three hours, with the start time and end time aligned by half-hour. Up to two time periods can be set. Start and end time range: [00:00, 24:00].
* @type {Array.<string> || null}
*/
this.TimeRanges = null;
/**
* Specifies for which day to modify the time period. Value range: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday. If it is not specified or is left blank, the time period will be modified for every day by default.
* @type {Array.<string> || null}
*/
this.Weekdays = null;
/**
* Data delay threshold. It takes effect only for source instance and disaster recovery instance. Default value: 10.
* @type {number || null}
*/
this.MaxDelayTime = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
this.TimeRanges = 'TimeRanges' in params ? params.TimeRanges : null;
this.Weekdays = 'Weekdays' in params ? params.Weekdays : null;
this.MaxDelayTime = 'MaxDelayTime' in params ? params.MaxDelayTime : null;
}
}
/**
* DescribeRollbackRangeTime request structure.
* @class
*/
class DescribeRollbackRangeTimeRequest extends AbstractModel {
constructor(){
super();
/**
* Instance ID list. An instance ID is in the format of cdb-c1nl9rpv, which is the same as the instance ID displayed on the TencentDB Console page.
* @type {Array.<string> || null}
*/
this.InstanceIds = null;
/**
* Whether the clone instance and the source instance are in the same AZ. Valid values: `true` (yes), `false` (no).
* @type {string || null}
*/
this.IsRemoteZone = null;
/**
* The region of the clone instance, such as `ap-guangzhou`.
* @type {string || null}
*/
this.BackupRegion = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceIds = 'InstanceIds' in params ? params.InstanceIds : null;
this.IsRemoteZone = 'IsRemoteZone' in params ? params.IsRemoteZone : null;
this.BackupRegion = 'BackupRegion' in params ? params.BackupRegion : null;
}
}
/**
* DescribeBackupOverview request structure.
* @class
*/
class DescribeBackupOverviewRequest extends AbstractModel {
constructor(){
super();
/**
* TencentDB product type to be queried. Currently, only `mysql` is supported.
* @type {string || null}
*/
this.Product = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Product = 'Product' in params ? params.Product : null;
}
}
/**
* ModifyDBInstanceProject response structure.
* @class
*/
class ModifyDBInstanceProjectResponse 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;
}
}
/**
* DescribeDataBackupOverview response structure.
* @class
*/
class DescribeDataBackupOverviewResponse extends AbstractModel {
constructor(){
super();
/**
* Total capacity of data backups in bytes in the current region (including automatic backups and manual backups).
* @type {number || null}
*/
this.DataBackupVolume = null;
/**
* Total number of data backups in the current region.
* @type {number || null}
*/
this.DataBackupCount = null;
/**
* Total capacity of automatic backups in the current region.
* @type {number || null}
*/
this.AutoBackupVolume = null;
/**
* Total number of automatic backups in the current region.
* @type {number || null}
*/
this.AutoBackupCount = null;
/**
* Total capacity of manual backups in the current region.
* @type {number || null}
*/
this.ManualBackupVolume = null;
/**
* Total number of manual backups in the current region.
* @type {number || null}
*/
this.ManualBackupCount = null;
/**
* Total capacity of remote backups
* @type {number || null}
*/
this.RemoteBackupVolume = null;
/**
* Total number of remote backups
* @type {number || null}
*/
this.RemoteBackupCount = null;
/**
* Total capacity of archive backups in the current region
* @type {number || null}
*/
this.DataBackupArchiveVolume = null;
/**
* Total number of archive backups in the current region
* @type {number || null}
*/
this.DataBackupArchiveCount = null;
/**
* Total backup capacity of standard storage in current region
* @type {number || null}
*/
this.DataBackupStandbyVolume = null;
/**
* Total number of standard storage backups in current region
* @type {number || null}
*/
this.DataBackupStandbyCount = 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.DataBackupVolume = 'DataBackupVolume' in params ? params.DataBackupVolume : null;
this.DataBackupCount = 'DataBackupCount' in params ? params.DataBackupCount : null;
this.AutoBackupVolume = 'AutoBackupVolume' in params ? params.AutoBackupVolume : null;
this.AutoBackupCount = 'AutoBackupCount' in params ? params.AutoBackupCount : null;
this.ManualBackupVolume = 'ManualBackupVolume' in params ? params.ManualBackupVolume : null;
this.ManualBackupCount = 'ManualBackupCount' in params ? params.ManualBackupCount : null;
this.RemoteBackupVolume = 'RemoteBackupVolume' in params ? params.RemoteBackupVolume : null;
this.RemoteBackupCount = 'RemoteBackupCount' in params ? params.RemoteBackupCount : null;
this.DataBackupArchiveVolume = 'DataBackupArchiveVolume' in params ? params.DataBackupArchiveVolume : null;
this.DataBackupArchiveCount = 'DataBackupArchiveCount' in params ? params.DataBackupArchiveCount : null;
this.DataBackupStandbyVolume = 'DataBackupStandbyVolume' in params ? params.DataBackupStandbyVolume : null;
this.DataBackupStandbyCount = 'DataBackupStandbyCount' in params ? params.DataBackupStandbyCount : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* Statistical items of instance backup
* @class
*/
class BackupSummaryItem extends AbstractModel {
constructor(){
super();
/**
* Instance ID.
* @type {string || null}
*/
this.InstanceId = null;
/**
* Number of automatic data backups of an instance.
* @type {number || null}
*/
this.AutoBackupCount = null;
/**
* Capacity of automatic data backups of an instance.
* @type {number || null}
*/
this.AutoBackupVolume = null;
/**
* Number of manual data backups of an instance.
* @type {number || null}
*/
this.ManualBackupCount = null;
/**
* Capacity of manual data backups of an instance.
* @type {number || null}
*/
this.ManualBackupVolume = null;
/**
* Total number of data backups of an instance (including automatic backups and manual backups).
* @type {number || null}
*/
this.DataBackupCount = null;
/**
* Total capacity of data backups of an instance.
* @type {number || null}
*/
this.DataBackupVolume = null;
/**
* Number of log backups of an instance.
* @type {number || null}
*/
this.BinlogBackupCount = null;
/**
* Capacity of log backups of an instance.
* @type {number || null}
*/
this.BinlogBackupVolume = null;
/**
* Total capacity of backups of an instance (including data backups and log backups).
* @type {number || null}
*/
this.BackupVolume = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
this.AutoBackupCount = 'AutoBackupCount' in params ? params.AutoBackupCount : null;
this.AutoBackupVolume = 'AutoBackupVolume' in params ? params.AutoBackupVolume : null;
this.ManualBackupCount = 'ManualBackupCount' in params ? params.ManualBackupCount : null;
this.ManualBackupVolume = 'ManualBackupVolume' in params ? params.ManualBackupVolume : null;
this.DataBackupCount = 'DataBackupCount' in params ? params.DataBackupCount : null;
this.DataBackupVolume = 'DataBackupVolume' in params ? params.DataBackupVolume : null;
this.BinlogBackupCount = 'BinlogBackupCount' in params ? params.BinlogBackupCount : null;
this.BinlogBackupVolume = 'BinlogBackupVolume' in params ? params.BinlogBackupVolume : null;
this.BackupVolume = 'BackupVolume' in params ? params.BackupVolume : null;
}
}
/**
* CreateDatabase request structure.
* @class
*/
class CreateDatabaseRequest extends AbstractModel {
constructor(){
super();
/**
* Instance ID in the format of `cdb-c1nl9rpv`, which is the same as the one displayed in the TencentDB console.
* @type {string || null}
*/
this.InstanceId = null;
/**
*
* @type {string || null}
*/
this.DBName = null;
/**
* Character set. Valid values: `utf8`, `gbk`, `latin1`, `utf8mb4`.
* @type {string || null}
*/
this.CharacterSetName = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
this.DBName = 'DBName' in params ? params.DBName : null;
this.CharacterSetName = 'CharacterSetName' in params ? params.CharacterSetName : null;
}
}
/**
* ModifyInstanceParam request structure.
* @class
*/
class ModifyInstanceParamRequest extends AbstractModel {
constructor(){
super();
/**
* List of short instance IDs.
* @type {Array.<string> || null}
*/
this.InstanceIds = null;
/**
* List of parameters to be modified. Every element is a combination of `Name` (parameter name) and `CurrentValue` (new value).
* @type {Array.<Parameter> || null}
*/
this.ParamList = null;
/**
* Template ID. At least one of `ParamList` and `TemplateId` must be passed in.
* @type {number || null}
*/
this.TemplateId = null;
/**
* When to perform the parameter adjustment task. Default value: 0. Valid values: 0 - execute immediately, 1 - execute during window. When its value is 1, only one instance ID can be passed in (i.e., only one `InstanceIds` can be passed in).
* @type {number || null}
*/
this.WaitSwitch = null;
/**
* Whether to sync the parameters to read-only instance of the source instance. Valid values: `true` (not sync), `false` (sync). Default value: `false`.
* @type {boolean || null}
*/
this.NotSyncRo = null;
/**
* Whether to sync the parameters to disaster recovery instance of the source instance. Valid values: `true` (not sync), `false` (sync). Default value: `false`.
* @type {boolean || null}
*/
this.NotSyncDr = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceIds = 'InstanceIds' in params ? params.InstanceIds : null;
if (params.ParamList) {
this.ParamList = new Array();
for (let z in params.ParamList) {
let obj = new Parameter();
obj.deserialize(params.ParamList[z]);
this.ParamList.push(obj);
}
}
this.TemplateId = 'TemplateId' in params ? params.TemplateId : null;
this.WaitSwitch = 'WaitSwitch' in params ? params.WaitSwitch : null;
this.NotSyncRo = 'NotSyncRo' in params ? params.NotSyncRo : null;
this.NotSyncDr = 'NotSyncDr' in params ? params.NotSyncDr : null;
}
}
/**
* CreateParamTemplate request structure.
* @class
*/
class CreateParamTemplateRequest extends AbstractModel {
constructor(){
super();
/**
* Parameter template name.
* @type {string || null}
*/
this.Name = null;
/**
* Parameter template description.
* @type {string || null}
*/
this.Description = null;
/**
* MySQL version number.
* @type {string || null}
*/
this.EngineVersion = null;
/**
* Source parameter template ID.
* @type {number || null}
*/
this.TemplateId = null;
/**
* List of parameters.
* @type {Array.<Parameter> || null}
*/
this.ParamList = null;
/**
* Type of the default parameter template. Valid values: `HIGH_STABILITY` (high-stability template), `HIGH_PERFORMANCE` (high-performance template).
* @type {string || null}
*/
this.TemplateType = null;
/**
* Instance engine type. Valid values: `InnoDB` (default), `RocksDB`.
* @type {string || null}
*/
this.EngineType = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Name = 'Name' in params ? params.Name : null;
this.Description = 'Description' in params ? params.Description : null;
this.EngineVersion = 'EngineVersion' in params ? params.EngineVersion : null;
this.TemplateId = 'TemplateId' in params ? params.TemplateId : null;
if (params.ParamList) {
this.ParamList = new Array();
for (let z in params.ParamList) {
let obj = new Parameter();
obj.deserialize(params.ParamList[z]);
this.ParamList.push(obj);
}
}
this.TemplateType = 'TemplateType' in params ? params.TemplateType : null;
this.EngineType = 'EngineType' in params ? params.EngineType : null;
}
}
/**
* DescribeSupportedPrivileges request structure.
* @class
*/
class DescribeSupportedPrivilegesRequest extends AbstractModel {
constructor(){
super();
/**
* Instance ID in the format of cdb-c1nl9rpv. It is the same as the instance ID displayed on the TencentDB Console page.
* @type {string || null}
*/
this.InstanceId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
}
}
/**
* DescribeParamTemplateInfo request structure.
* @class
*/
class DescribeParamTemplateInfoRequest extends AbstractModel {
constructor(){
super();
/**
* Parameter template ID.
* @type {number || null}
*/
this.TemplateId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.TemplateId = 'TemplateId' in params ? params.TemplateId : null;
}
}
/**
* ModifyCdbProxyAddressVipAndVPort response structure.
* @class
*/
class ModifyCdbProxyAddressVipAndVPortResponse 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;
}
}
/**
* DescribeDBInstances request structure.
* @class
*/
class DescribeDBInstancesRequest extends AbstractModel {
constructor(){
super();
/**
* Project ID.
* @type {number || null}
*/
this.ProjectId = null;
/**
* Instance type. Value range: 1 (primary), 2 (disaster recovery), 3 (read-only).
* @type {Array.<number> || null}
*/
this.InstanceTypes = null;
/**
* Private IP address of the instance.
* @type {Array.<string> || null}
*/
this.Vips = null;
/**
* Instance status. Valid values: <br>`0` (creating) <br>`1` (running) <br>`4` (isolating) <br>`5` (isolated; the instance can be restored and started in the recycle bin)
* @type {Array.<number> || null}
*/
this.Status = null;
/**
* Offset. Default value: 0.
* @type {number || null}
*/
this.Offset = null;
/**
* Number of results to be returned for a single request. Default value: 20. Maximum value: 2,000.
* @type {number || null}
*/
this.Limit = null;
/**
* Security group ID. When it is used as a filter, the `WithSecurityGroup` parameter should be set to 1.
* @type {string || null}
*/
this.SecurityGroupId = null;
/**
* Billing method. Value range: 0 (monthly subscribed), 1 (hourly).
* @type {Array.<number> || null}
*/
this.PayTypes = null;
/**
* Instance name.
* @type {Array.<string> || null}
*/
this.InstanceNames = null;
/**
* Instance task status. Valid values: <br>0 - no task <br>1 - upgrading <br>2 - importing data <br>3 - enabling secondary instance access <br>4 - enabling public network access <br>5 - batch operation in progress <br>6 - rolling back <br>7 - disabling public network access <br>8 - modifying password <br>9 - renaming instance <br>10 - restarting <br>12 - migrating self-built database <br>13 - dropping tables <br>14 - Disaster recovery instance creating sync task <br>15 - waiting for switch <br>16 - switching <br>17 - upgrade and switch completed <br>19 - parameter settings to be executed
* @type {Array.<number> || null}
*/
this.TaskStatus = null;
/**
* Version of the instance database engine. Value range: 5.1, 5.5, 5.6, 5.7.
* @type {Array.<string> || null}
*/
this.EngineVersions = null;
/**
* VPC ID.
* @type {Array.<number> || null}
*/
this.VpcIds = null;
/**
* AZ ID.
* @type {Array.<number> || null}
*/
this.ZoneIds = null;
/**
* Subnet ID.
* @type {Array.<number> || null}
*/
this.SubnetIds = null;
/**
* Whether to lock disk write. Valid values: `0`(unlock), `1`(lock). Default value: 0.
* @type {Array.<number> || null}
*/
this.CdbErrors = null;
/**
* Sort by field of the returned result set. Currently, supported values include "InstanceId", "InstanceName", "CreateTime", and "DeadlineTime".
* @type {string || null}
*/
this.OrderBy = null;
/**
* Sorting method of the returned result set. Currently, "ASC" or "DESC" is supported.
* @type {string || null}
*/
this.OrderDirection = null;
/**
* Whether security group ID is used as a filter
* @type {number || null}
*/
this.WithSecurityGroup = null;
/**
* Whether dedicated cluster details are included. Value range: 0 (not included), 1 (included)
* @type {number || null}
*/
this.WithExCluster = null;
/**
* Exclusive cluster ID.
* @type {string || null}
*/
this.ExClusterId = null;
/**
* Instance ID.
* @type {Array.<string> || null}
*/
this.InstanceIds = null;
/**
* Initialization flag. Value range: 0 (not initialized), 1 (initialized).
* @type {number || null}
*/
this.InitFlag = null;
/**
* Whether instances corresponding to the disaster recovery relationship are included. Valid values: 0 (not included), 1 (included). Default value: 1. If a primary instance is pulled, the data of the disaster recovery relationship will be in the `DrInfo` field. If a disaster recovery instance is pulled, the data of the disaster recovery relationship will be in the `MasterInfo` field. The disaster recovery relationship contains only partial basic data. To get the detailed data, you need to call an API to pull it.
* @type {number || null}
*/
this.WithDr = null;
/**
* Whether read-only instances are included. Valid values: 0 (not included), 1 (included). Default value: 1.
* @type {number || null}
*/
this.WithRo = null;
/**
* Whether primary instances are included. Valid values: 0 (not included), 1 (included). Default value: 1.
* @type {number || null}
*/
this.WithMaster = null;
/**
* Placement group ID list.
* @type {Array.<string> || null}
*/
this.DeployGroupIds = null;
/**
* Whether to use the tag key as a filter condition
* @type {Array.<string> || null}
*/
this.TagKeysForSearch = null;
/**
* Financial cage IDs.
* @type {Array.<string> || null}
*/
this.CageIds = null;
/**
* Tag value
* @type {Array.<string> || null}
*/
this.TagValues = null;
/**
* VPC character vpcId
* @type {Array.<string> || null}
*/
this.UniqueVpcIds = null;
/**
* VPC character subnetId
* @type {Array.<string> || null}
*/
this.UniqSubnetIds = null;
/**
* Tag key value
* @type {Array.<Tag> || null}
*/
this.Tags = null;
/**
* Database proxy IP
* @type {Array.<string> || null}
*/
this.ProxyVips = null;
/**
* Database proxy ID
* @type {Array.<string> || null}
*/
this.ProxyIds = null;
/**
* Database engine type
* @type {Array.<string> || null}
*/
this.EngineTypes = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.ProjectId = 'ProjectId' in params ? params.ProjectId : null;
this.InstanceTypes = 'InstanceTypes' in params ? params.InstanceTypes : null;
this.Vips = 'Vips' in params ? params.Vips : null;
this.Status = 'Status' in params ? params.Status : null;
this.Offset = 'Offset' in params ? params.Offset : null;
this.Limit = 'Limit' in params ? params.Limit : null;
this.SecurityGroupId = 'SecurityGroupId' in params ? params.SecurityGroupId : null;
this.PayTypes = 'PayTypes' in params ? params.PayTypes : null;
this.InstanceNames = 'InstanceNames' in params ? params.InstanceNames : null;
this.TaskStatus = 'TaskStatus' in params ? params.TaskStatus : null;
this.EngineVersions = 'EngineVersions' in params ? params.EngineVersions : null;
this.VpcIds = 'VpcIds' in params ? params.VpcIds : null;
this.ZoneIds = 'ZoneIds' in params ? params.ZoneIds : null;
this.SubnetIds = 'SubnetIds' in params ? params.SubnetIds : null;
this.CdbErrors = 'CdbErrors' in params ? params.CdbErrors : null;
this.OrderBy = 'OrderBy' in params ? params.OrderBy : null;
this.OrderDirection = 'OrderDirection' in params ? params.OrderDirection : null;
this.WithSecurityGroup = 'WithSecurityGroup' in params ? params.WithSecurityGroup : null;
this.WithExCluster = 'WithExCluster' in params ? params.WithExCluster : null;
this.ExClusterId = 'ExClusterId' in params ? params.ExClusterId : null;
this.InstanceIds = 'InstanceIds' in params ? params.InstanceIds : null;
this.InitFlag = 'InitFlag' in params ? params.InitFlag : null;
this.WithDr = 'WithDr' in params ? params.WithDr : null;
this.WithRo = 'WithRo' in params ? params.WithRo : null;
this.WithMaster = 'WithMaster' in params ? params.WithMaster : null;
this.DeployGroupIds = 'DeployGroupIds' in params ? params.DeployGroupIds : null;
this.TagKeysForSearch = 'TagKeysForSearch' in params ? params.TagKeysForSearch : null;
this.CageIds = 'CageIds' in params ? params.CageIds : null;
this.TagValues = 'TagValues' in params ? params.TagValues : null;
this.UniqueVpcIds = 'UniqueVpcIds' in params ? params.UniqueVpcIds : null;
this.UniqSubnetIds = 'UniqSubnetIds' in params ? params.UniqSubnetIds : 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.ProxyVips = 'ProxyVips' in params ? params.ProxyVips : null;
this.ProxyIds = 'ProxyIds' in params ? params.ProxyIds : null;
this.EngineTypes = 'EngineTypes' in params ? params.EngineTypes : null;
}
}
/**
* ModifyCdbProxyAddressDesc request structure.
* @class
*/
class ModifyCdbProxyAddressDescRequest extends AbstractModel {
constructor(){
super();
/**
* Proxy group ID
* @type {string || null}
*/
this.ProxyGroupId = null;
/**
* Address ID of the proxy group
* @type {string || null}
*/
this.ProxyAddressId = null;
/**
* Description
* @type {string || null}
*/
this.Desc = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.ProxyGroupId = 'ProxyGroupId' in params ? params.ProxyGroupId : null;
this.ProxyAddressId = 'ProxyAddressId' in params ? params.ProxyAddressId : null;
this.Desc = 'Desc' in params ? params.Desc : null;
}
}
/**
* The purchasable c