UNPKG

tencentcloud-sdk-nodejs-intl-en

Version:
1,729 lines (1,462 loc) • 743 kB
/* * Copyright (c) 2018 Tencent. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ const AbstractModel = require("../../common/abstract_model"); /** * Details of an instance task * @class */ class TaskDetail extends AbstractModel { constructor(){ super(); /** * Error code. `0` indicates success. Other values correspond to different error scenarios. * @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 the associated instance. * @type {Array.<string> || null} */ this.InstanceIds = null; /** * Async task request ID. * @type {string || null} */ this.AsyncRequestId = null; /** * Additional information of the task. * @type {Array.<TaskAttachInfo> || null} */ this.TaskAttachInfo = 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; if (params.TaskAttachInfo) { this.TaskAttachInfo = new Array(); for (let z in params.TaskAttachInfo) { let obj = new TaskAttachInfo(); obj.deserialize(params.TaskAttachInfo[z]); this.TaskAttachInfo.push(obj); } } } } /** * DescribeTableColumns response structure. * @class */ class DescribeTableColumnsResponse extends AbstractModel { constructor(){ super(); /** * Total number of eligible instances. * @type {number || null} */ this.TotalCount = null; /** * Returned database column information. * @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; } } /** * 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` (yearly/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; /** * Sales status of the cloud disk edition instance in the current availability zone. Possible returned values: 1-launched; 3-not available for sale; 4-not displayed. * @type {number || null} */ this.CloudNativeClusterStatus = null; /** * Cloud disk edition or single-node basic edition supported disk type. * @type {Array.<DiskTypeConfigItem> || null} */ this.DiskTypeConf = 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; this.CloudNativeClusterStatus = 'CloudNativeClusterStatus' in params ? params.CloudNativeClusterStatus : null; if (params.DiskTypeConf) { this.DiskTypeConf = new Array(); for (let z in params.DiskTypeConf) { let obj = new DiskTypeConfigItem(); obj.deserialize(params.DiskTypeConf[z]); this.DiskTypeConf.push(obj); } } } } /** * 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 entries per request. Default value: 20. Minimum value: 1. Maximum value: 5000. * @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, which can be obtained through the [DescribeDBInstances](https://www.tencentcloud.com/document/product/236/15872?from_cn_redirect=1) API. * @type {string || null} */ this.InstanceId = null; /** * VPC ID. Obtain through the [DescribeDBInstances](https://www.tencentcloud.com/document/product/236/15872?from_cn_redirect=1) API. * @type {string || null} */ this.UniqVpcId = null; /** * Private subnet ID. Obtain through the [DescribeDBInstances](https://www.tencentcloud.com/document/product/236/15872?from_cn_redirect=1) API. * @type {string || null} */ this.UniqSubnetId = null; /** * Node specification configuration. Parameter description in the example. NodeCount: Number of nodes. Region: Node region. Zone: Node availability zone. Cpu: Number of cores per proxy node (unit: core). Mem: Memory size of each proxy node (unit: MB). Remarks: 1. Database proxy supported node specifications are: 2C4000MB, 4C8000MB, 8C16000MB. 2. The above parameters (such as number of nodes, availability zone) are required. When calling the API, if incomplete, creation may fail. * @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 Note: If you need to use the database proxy connection pool capability, the kernel minor version of the MySQL 8.0 primary instance must be equal to or greater than MySQL 8.0 20230630. * @type {number || null} */ this.ConnectionPoolLimit = null; /** * Specify the Linux kernel version of the purchased proxy. Leave it blank to ship the latest version by default. * @type {string || null} */ this.ProxyVersion = 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; this.ProxyVersion = 'ProxyVersion' in params ? params.ProxyVersion : null; } } /** * CreateCdbProxy response structure. * @class */ class CreateCdbProxyResponse extends AbstractModel { constructor(){ super(); /** * Asynchronous Task ID * @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(); /** * Query database error codes. 0 - Normal, 1600001 - Internal error, 1600003 - Input parameter exception, 1600009 - Instance does not exist, 1624001 - DB access exception. * @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; } } /** * Instance audit details. * @class */ class InstanceDbAuditStatus extends AbstractModel { constructor(){ super(); /** * Instance ID. * @type {string || null} */ this.InstanceId = null; /** * Audit status. ON - Audit is enabled, OFF - Audit is disabled. * @type {string || null} */ this.AuditStatus = null; /** * Task status. Valid values: 0 - No task; 1 - Enabling audit; 2 - Disabling audit. * @type {number || null} */ this.AuditTask = null; /** * Log retention period. Valid values:7 - One week;30 - One month;90 - Three months;180 - Six months;365 - One year;1095 - Three years;1825 - Five years. * @type {number || null} */ this.LogExpireDay = null; /** * High-frequency storage period. Valid values:3 - 3 days;7 - One week;30 - One month;90 - Three months;180 - Six months;365 - One year;1095 - Three years;1825 - Five years. * @type {number || null} */ this.HighLogExpireDay = null; /** * Low-frequency storage period (in days). This equals the log retention period minus the high-frequency storage period. * @type {number || null} */ this.LowLogExpireDay = null; /** * Log storage volume (in GB). * @type {number || null} */ this.BillingAmount = null; /** * High-frequency storage volume (in GB). * @type {number || null} */ this.HighRealStorage = null; /** * Low-frequency storage volume (in GB). * @type {number || null} */ this.LowRealStorage = null; /** * Whether full audit is enabled. true - Full audit. * @type {boolean || null} */ this.AuditAll = null; /** * Time when the audit service was activated. * @type {string || null} */ this.CreateAt = null; /** * Related information about the instance. * @type {AuditInstanceInfo || null} */ this.InstanceInfo = null; /** * Total storage volume (in GB). * @type {number || null} */ this.RealStorage = null; /** * Whether an audit policy is configured. * @type {boolean || null} */ this.OldRule = null; /** * Rule template applied to the instance. * @type {Array.<string> || null} */ this.RuleTemplateIds = null; /** * Trial status. * @type {string || null} */ this.TrialStatus = null; /** * Trial start time. * @type {number || null} */ this.TrialStartTime = null; /** * Trial duration. * @type {number || null} */ this.TrialDuration = null; /** * Trial end time. * @type {number || null} */ this.TrialCloseTime = null; /** * Log query time limit during the trial period. * @type {number || null} */ this.TrialDescribeLogHours = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.InstanceId = 'InstanceId' in params ? params.InstanceId : null; this.AuditStatus = 'AuditStatus' in params ? params.AuditStatus : null; this.AuditTask = 'AuditTask' in params ? params.AuditTask : null; this.LogExpireDay = 'LogExpireDay' in params ? params.LogExpireDay : null; this.HighLogExpireDay = 'HighLogExpireDay' in params ? params.HighLogExpireDay : null; this.LowLogExpireDay = 'LowLogExpireDay' in params ? params.LowLogExpireDay : null; this.BillingAmount = 'BillingAmount' in params ? params.BillingAmount : null; this.HighRealStorage = 'HighRealStorage' in params ? params.HighRealStorage : null; this.LowRealStorage = 'LowRealStorage' in params ? params.LowRealStorage : null; this.AuditAll = 'AuditAll' in params ? params.AuditAll : null; this.CreateAt = 'CreateAt' in params ? params.CreateAt : null; if (params.InstanceInfo) { let obj = new AuditInstanceInfo(); obj.deserialize(params.InstanceInfo) this.InstanceInfo = obj; } this.RealStorage = 'RealStorage' in params ? params.RealStorage : null; this.OldRule = 'OldRule' in params ? params.OldRule : null; this.RuleTemplateIds = 'RuleTemplateIds' in params ? params.RuleTemplateIds : null; this.TrialStatus = 'TrialStatus' in params ? params.TrialStatus : null; this.TrialStartTime = 'TrialStartTime' in params ? params.TrialStartTime : null; this.TrialDuration = 'TrialDuration' in params ? params.TrialDuration : null; this.TrialCloseTime = 'TrialCloseTime' in params ? params.TrialCloseTime : null; this.TrialDescribeLogHours = 'TrialDescribeLogHours' in params ? params.TrialDescribeLogHours : 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, which can be obtained through the [DescribeDBInstances](https://www.tencentcloud.com/document/product/236/15872?from_cn_redirect=1) API. * @type {string || null} */ this.InstanceId = null; /** * The modified maintenance time slot. Among them, each time period is in the format of 10:00-12:00. The start and end time is aligned by half hour. The shortest is half hour and the longest is three hours. Up to two time periods can be set. The start and end time ranges from [00:00, 24:00]. Description: The following is an example of setting two time periods in json. [ "01:00-01:30", "02:00-02:30" ] * @type {Array.<string> || null} */ this.TimeRanges = null; /** * Specify which day to modify the maintenance time slot. Possible values are: monday, tuesday, wednesday, thursday, friday, saturday, sunday. If not specified or empty, modify all seven days of the week by default. Description: The json example for modifying more than one day is as follows. [ "monday", "tuesday" ] * @type {Array.<string> || null} */ this.Weekdays = null; /** * Data latency threshold (seconds), only applicable to primary instance and disaster recovery instance. No modification by default to keep the original threshold. Value ranges from 1 to 10 integers. * @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(); /** * The cloud database product type for which a backup overview needs to be queried. The value can be mysql (two-node/three-node high-availability instances), mysql-basic (single-node cloud disk edition instance), or mysql-cluster (cloud disk edition instance). * @type {string || null} */ this.Product = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.Product = 'Product' in params ? params.Product : null; } } /** * DescribeAuditInstanceList response structure. * @class */ class DescribeAuditInstanceListResponse extends AbstractModel { constructor(){ super(); /** * Total number of eligible instances. * @type {number || null} */ this.TotalCount = null; /** * List of audit instance details.Note: This field may return null, indicating that no valid values can be obtained. * @type {Array.<InstanceDbAuditStatus> || 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; if (params.Items) { this.Items = new Array(); for (let z in params.Items) { let obj = new InstanceDbAuditStatus(); obj.deserialize(params.Items[z]); this.Items.push(obj); } } this.RequestId = 'RequestId' in params ? params.RequestId : 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; } } /** * ModifyDBInstanceModes response structure. * @class */ class ModifyDBInstanceModesResponse extends AbstractModel { constructor(){ super(); /** * <p>Request ID of the asynchronous task. Use this ID to query the outcome of the async task.</p> * @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; } } /** * DeleteAuditPolicy request structure. * @class */ class DeleteAuditPolicyRequest extends AbstractModel { constructor(){ super(); /** * Audit policy ID. * @type {string || null} */ this.PolicyId = null; /** * Instance ID. * @type {string || null} */ this.InstanceId = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.PolicyId = 'PolicyId' in params ? params.PolicyId : null; this.InstanceId = 'InstanceId' in params ? params.InstanceId : 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; /** * Database name, length not exceeding 64. * @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(); /** * Instance ID list, which can be obtained through the [DescribeDBInstances](https://www.tencentcloud.com/document/product/236/15872?from_cn_redirect=1) API. * @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 provided. It can be obtained through the API [DescribeParamTemplates](https://www.tencentcloud.com/document/api/236/32659?from_cn_redirect=1). * @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; } } /** * ModifyProtectMode response structure. * @class */ class ModifyProtectModeResponse 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; } } /** * CreateParamTemplate request structure. * @class */ class CreateParamTemplateRequest extends AbstractModel { constructor(){ super(); /** * Parameter template name. Up to 60 characters are allowed. * @type {string || null} */ this.Name = null; /** * Parameter template description. * @type {string || null} */ this.Description = null; /** * MySQL version number. Available values: 5.6, 5.7, and 8.0. * @type {string || null} */ this.EngineVersion = null; /** * Source parameter template ID, which can be obtained through the [DescribeParamTemplates](https://www.tencentcloud.com/document/api/236/32659?from_cn_redirect=1) API. * @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, defaults to "InnoDB". Supported values include "InnoDB" and "RocksDB". Description: RocksDB is only supported in database versions MySQL 5.7 and MySQL 8.0. * @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; } } /** * Information of the remote backup * @class */ class RemoteBackupInfo extends AbstractModel { constructor(){ super(); /** * ID of the remote backup subtask * @type {number || null} */ this.SubBackupId = null; /** * The region where the remote backup resides * @type {string || null} */ this.Region = null; /** * Backup task status. Valid values: `SUCCESS` (backup succeeded), `FAILED` (backup failed), `RUNNING` (backup is in progress). * @type {string || null} */ this.Status = null; /** * The start time of remote backup * @type {string || null} */ this.StartTime = null; /** * The end time of remote backup * @type {string || null} */ this.FinishTime = null; /** * The download address * @type {string || null} */ this.Url = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.SubBackupId = 'SubBackupId' in params ? params.SubBackupId : null; this.Region = 'Region' in params ? params.Region : null; this.Status = 'Status' in params ? params.Status : null; this.StartTime = 'StartTime' in params ? params.StartTime : null; this.FinishTime = 'FinishTime' in params ? params.FinishTime : null; this.Url = 'Url' in params ? params.Url : null; } } /** * Scale by the selected period in the scaling policy * @class */ class PeriodStrategy extends AbstractModel { constructor(){ super(); /** * Scale-out period * @type {TImeCycle || null} */ this.TimeCycle = null; /** * Time interval * @type {TimeInterval || null} */ this.TimeInterval = null; } /** * @private */ deserialize(params) { if (!params) { return; } if (params.TimeCycle) { let obj = new TImeCycle(); obj.deserialize(params.TimeCycle) this.TimeCycle = obj; } if (params.TimeInterval) { let obj = new TimeInterval(); obj.deserialize(params.TimeInterval) this.TimeInterval = obj; }