UNPKG

tencentcloud-sdk-nodejs-intl-en

Version:
1,674 lines (1,414 loc) 138 kB
/* * 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"); /** * ResetDBInstancePassword response structure. * @class */ class ResetDBInstancePasswordResponse extends AbstractModel { constructor(){ super(); /** * Async request ID, which is used to query the running status of the process. * @type {string || null} */ this.AsyncRequestId = 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.AsyncRequestId = 'AsyncRequestId' in params ? params.AsyncRequestId : null; this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * DescribeSpecInfo request structure. * @class */ class DescribeSpecInfoRequest extends AbstractModel { constructor(){ super(); /** * AZ to be queried * @type {string || null} */ this.Zone = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.Zone = 'Zone' in params ? params.Zone : null; } } /** * CreateDBInstance request structure. * @class */ class CreateDBInstanceRequest extends AbstractModel { constructor(){ super(); /** * The number of nodes in each replica set. The value range is subject to the response parameter of the `DescribeSpecInfo` API. * @type {number || null} */ this.NodeNum = null; /** * Instance memory size in GB. * @type {number || null} */ this.Memory = null; /** * Instance disk size in GB. * @type {number || null} */ this.Volume = null; /** * Version number. For the specific purchasable versions supported, please see the return result of the `DescribeSpecInfo` API. The correspondences between parameters and versions are as follows: MONGO_3_WT: MongoDB 3.2 WiredTiger Edition; MONGO_3_ROCKS: MongoDB 3.2 RocksDB Edition; MONGO_36_WT: MongoDB 3.6 WiredTiger Edition; MONGO_40_WT: MongoDB 4.0 WiredTiger Edition; MONGO_42_WT: MongoDB 4.2 WiredTiger Edition. * @type {string || null} */ this.MongoVersion = null; /** * Number of instances. Minimum value: 1. Maximum value: 10. * @type {number || null} */ this.GoodsNum = null; /** * AZ in the format of ap-guangzhou-2. If multi-AZ deployment is enabled, this parameter refers to the primary AZ and must be one of the values of `AvailabilityZoneList`. * @type {string || null} */ this.Zone = null; /** * Instance validity period in months. Valid values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36. * @type {number || null} */ this.Period = null; /** * Server type. Valid values: HIO (high IO), HIO10G (10-gigabit high IO), STDS5 (standard). * @type {string || null} */ this.MachineCode = null; /** * Instance type. Valid values: REPLSET (replica set), SHARD (sharded cluster), STANDALONE (single-node). * @type {string || null} */ this.ClusterType = null; /** * Number of replica sets. To create a replica set instance, set this parameter to 1; to create a shard instance, see the parameters returned by the `DescribeSpecInfo` API; to create a single-node instance, set this parameter to 0. * @type {number || null} */ this.ReplicateSetNum = null; /** * Project ID. If this parameter is not set, the default project will be used. * @type {number || null} */ this.ProjectId = null; /** * VPC ID. If this parameter is not set, the classic network will be used. Please use the `DescribeVpcs` API to query the VPC list. * @type {string || null} */ this.VpcId = null; /** * VPC subnet ID. If `UniqVpcId` is set, then `UniqSubnetId` will be required. Please use the `DescribeSubnets` API to query the subnet list. * @type {string || null} */ this.SubnetId = null; /** * Instance password. If it is left empty, the password is in the default format of "instance ID+@+root account UIN". For example, if the instance ID is "cmgo-higv73ed" and the root account UIN "100000001", the instance password will be "cmgo-higv73ed@100000001". The custom password must contain 8-32 characters in at least two of the following types: letters, digits, and symbols (!@#%^*()_). * @type {string || null} */ this.Password = null; /** * Instance tag information. * @type {Array.<TagInfo> || null} */ this.Tags = null; /** * Auto-renewal flag. Valid values: 0 (auto-renewal not enabled), 1 (auto-renewal enabled). Default value: 0. * @type {number || null} */ this.AutoRenewFlag = null; /** * Whether to automatically use a voucher. Valid values: 1 (yes), 0 (no). Default value: 0. * @type {number || null} */ this.AutoVoucher = null; /** * Instance type. Valid values: `1` (primary instance), `2` (temp instance), `3` (read-only instance), `4` (disaster recovery instance), `5` (cloned instance). * @type {number || null} */ this.Clone = null; /** * Primary instance ID. It is required for read-only, disaster recovery, and cloned instances. * @type {string || null} */ this.Father = null; /** * Security group. * @type {Array.<string> || null} */ this.SecurityGroup = null; /** * The point in time to which the cloned instance will be rolled back. This parameter is required for a cloned instance. The point in time in the format of 2021-08-13 16:30:00 must be within the last seven days. * @type {string || null} */ this.RestoreTime = null; /** * Instance name, which can contain up to 60 letters, digits, or symbols (_-). * @type {string || null} */ this.InstanceName = null; /** * AZ list when multi-AZ deployment is enabled. For the specific purchasable versions which support multi-AZ deployment, please see the return result of the `DescribeSpecInfo` API. Notes: 1. Nodes of a multi-AZ instance must be deployed across three AZs. 2. To ensure a successful cross-AZ switch, you should not deploy most of the nodes to the same AZ. (For example, a three-node sharded cluster instance does not support deploying two or more nodes in the same AZ.) 3. MongoDB 4.2 and later versions do not support multi-AZ deployment. 4. Read-Only and disaster recovery instances do not support multi-AZ deployment. 5. Instances in the classic network do not support multi-AZ deployment. * @type {Array.<string> || null} */ this.AvailabilityZoneList = null; /** * The number of mongos CPUs, which is required for a sharded cluster instance of MongoDB 4.2 WiredTiger. For the specific purchasable versions supported, please see the return result of the `DescribeSpecInfo` API. * @type {number || null} */ this.MongosCpu = null; /** * The size of mongos memory, which is required for a sharded cluster instance of MongoDB 4.2 WiredTiger. For the specific purchasable versions supported, please see the return result of the `DescribeSpecInfo` API. * @type {number || null} */ this.MongosMemory = null; /** * The number of mongos routers, which is required for a sharded cluster instance of MongoDB 4.2 WiredTiger. For the specific purchasable versions supported, please see the return result of the `DescribeSpecInfo` API. Note: please purchase 3-32 mongos routers for high availability. * @type {number || null} */ this.MongosNodeNum = null; /** * Number of read-only nodes. Value range: 2-7. * @type {number || null} */ this.ReadonlyNodeNum = null; /** * The AZ where the read-only node is deployed * @type {Array.<string> || null} */ this.ReadonlyNodeAvailabilityZoneList = null; /** * The AZ where the hidden node resides. It is required for cross-AZ instances. * @type {string || null} */ this.HiddenZone = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.NodeNum = 'NodeNum' in params ? params.NodeNum : null; this.Memory = 'Memory' in params ? params.Memory : null; this.Volume = 'Volume' in params ? params.Volume : null; this.MongoVersion = 'MongoVersion' in params ? params.MongoVersion : null; this.GoodsNum = 'GoodsNum' in params ? params.GoodsNum : null; this.Zone = 'Zone' in params ? params.Zone : null; this.Period = 'Period' in params ? params.Period : null; this.MachineCode = 'MachineCode' in params ? params.MachineCode : null; this.ClusterType = 'ClusterType' in params ? params.ClusterType : null; this.ReplicateSetNum = 'ReplicateSetNum' in params ? params.ReplicateSetNum : null; this.ProjectId = 'ProjectId' in params ? params.ProjectId : null; this.VpcId = 'VpcId' in params ? params.VpcId : null; this.SubnetId = 'SubnetId' in params ? params.SubnetId : null; this.Password = 'Password' in params ? params.Password : null; if (params.Tags) { this.Tags = new Array(); for (let z in params.Tags) { let obj = new TagInfo(); obj.deserialize(params.Tags[z]); this.Tags.push(obj); } } this.AutoRenewFlag = 'AutoRenewFlag' in params ? params.AutoRenewFlag : null; this.AutoVoucher = 'AutoVoucher' in params ? params.AutoVoucher : null; this.Clone = 'Clone' in params ? params.Clone : null; this.Father = 'Father' in params ? params.Father : null; this.SecurityGroup = 'SecurityGroup' in params ? params.SecurityGroup : null; this.RestoreTime = 'RestoreTime' in params ? params.RestoreTime : null; this.InstanceName = 'InstanceName' in params ? params.InstanceName : null; this.AvailabilityZoneList = 'AvailabilityZoneList' in params ? params.AvailabilityZoneList : null; this.MongosCpu = 'MongosCpu' in params ? params.MongosCpu : null; this.MongosMemory = 'MongosMemory' in params ? params.MongosMemory : null; this.MongosNodeNum = 'MongosNodeNum' in params ? params.MongosNodeNum : null; this.ReadonlyNodeNum = 'ReadonlyNodeNum' in params ? params.ReadonlyNodeNum : null; this.ReadonlyNodeAvailabilityZoneList = 'ReadonlyNodeAvailabilityZoneList' in params ? params.ReadonlyNodeAvailabilityZoneList : null; this.HiddenZone = 'HiddenZone' in params ? params.HiddenZone : null; } } /** * DescribeSecurityGroup response structure. * @class */ class DescribeSecurityGroupResponse extends AbstractModel { constructor(){ super(); /** * Security groups associated with the instance * @type {Array.<SecurityGroup> || null} */ this.Groups = 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.Groups) { this.Groups = new Array(); for (let z in params.Groups) { let obj = new SecurityGroup(); obj.deserialize(params.Groups[z]); this.Groups.push(obj); } } this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * IsolateDBInstance request structure. * @class */ class IsolateDBInstanceRequest extends AbstractModel { constructor(){ super(); /** * Instance ID in the format of cmgo-p8vnipr5. 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; } } /** * IsolateDBInstance response structure. * @class */ class IsolateDBInstanceResponse extends AbstractModel { constructor(){ super(); /** * Async task request ID, which can be used to query the execution result of an async task. * @type {string || null} */ this.AsyncRequestId = 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.AsyncRequestId = 'AsyncRequestId' in params ? params.AsyncRequestId : null; this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * The result of the created backup download task * @class */ class BackupDownloadTaskStatus extends AbstractModel { constructor(){ super(); /** * Shard name * @type {string || null} */ this.ReplicaSetId = null; /** * Task status. Valid values: `0` (waiting for execution), `1` (downloading), `2` (downloaded), `3` (download failed), `4` (waiting for retry) * @type {number || null} */ this.Status = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.ReplicaSetId = 'ReplicaSetId' in params ? params.ReplicaSetId : null; this.Status = 'Status' in params ? params.Status : null; } } /** * ModifyDBInstanceNetworkAddress response structure. * @class */ class ModifyDBInstanceNetworkAddressResponse 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; } } /** * CreateBackupDBInstance response structure. * @class */ class CreateBackupDBInstanceResponse extends AbstractModel { constructor(){ super(); /** * The status of the queried backup process. * @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; } } /** * Instance price * @class */ class DBInstancePrice extends AbstractModel { constructor(){ super(); /** * Unit price. Note: this field may return null, indicating that no valid values can be obtained. * @type {number || null} */ this.UnitPrice = null; /** * Original price. * @type {number || null} */ this.OriginalPrice = null; /** * Discounted price. * @type {number || null} */ this.DiscountPrice = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.UnitPrice = 'UnitPrice' in params ? params.UnitPrice : null; this.OriginalPrice = 'OriginalPrice' in params ? params.OriginalPrice : null; this.DiscountPrice = 'DiscountPrice' in params ? params.DiscountPrice : null; } } /** * DescribeSlowLogPatterns response structure. * @class */ class DescribeSlowLogPatternsResponse extends AbstractModel { constructor(){ super(); /** * Total number of slow logs * @type {number || null} */ this.Count = null; /** * Slow log statistics * @type {Array.<SlowLogPattern> || null} */ this.SlowLogPatterns = 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.Count = 'Count' in params ? params.Count : null; if (params.SlowLogPatterns) { this.SlowLogPatterns = new Array(); for (let z in params.SlowLogPatterns) { let obj = new SlowLogPattern(); obj.deserialize(params.SlowLogPatterns[z]); this.SlowLogPatterns.push(obj); } } this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * Shard information * @class */ class ReplicaSetInfo extends AbstractModel { constructor(){ super(); /** * Replica set ID * @type {string || null} */ this.ReplicaSetId = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.ReplicaSetId = 'ReplicaSetId' in params ? params.ReplicaSetId : null; } } /** * CreateDBInstanceHour request structure. * @class */ class CreateDBInstanceHourRequest extends AbstractModel { constructor(){ super(); /** * Instance memory size in GB * @type {number || null} */ this.Memory = null; /** * Instance disk size in GB * @type {number || null} */ this.Volume = null; /** * Number of replica sets - Number of the replica set instances to be created. Valid value: `1`. - Number of sharded cluster instances to be created. You can get the specific purchasable specifications through the [DescribeSpecInfo](https://intl.cloud.tencent.com/document/product/240/38567?from_cn_redirect=1) API. * @type {number || null} */ this.ReplicateSetNum = null; /** * The number of nodes in each replica set. You can get the specific purchasable specifications through the [DescribeSpecInfo](https://intl.cloud.tencent.com/document/product/240/38567?from_cn_redirect=1) API. * @type {number || null} */ this.NodeNum = null; /** * Version information. You can get the specific purchasable specifications through the [DescribeSpecInfo](https://intl.cloud.tencent.com/document/product/240/38567?from_cn_redirect=1) API. - MONGO_36_WT:MongoDB 3.6 WiredTiger storage engine - MONGO_40_WT:MongoDB 4.0 WiredTiger storage engine - MONGO_42_WT:MongoDB 4.2 WiredTiger storage engine - MONGO_44_WT:MongoDB 4.4 WiredTiger storage engine * @type {string || null} */ this.MongoVersion = null; /** * Machine type - HIO: High IO - HIO10G: 10-Gigabit high IO * @type {string || null} */ this.MachineCode = null; /** * Number of instances. Value range: 1-10. * @type {number || null} */ this.GoodsNum = null; /** * AZ information in the format of ap-guangzhou-2 - For more information, query through the [DescribeSpecInfo](https://intl.cloud.tencent.com/document/product/240/38567?from_cn_redirect=1) API. - If multi-AZ deployment is enabled, this parameter refers to the primary AZ and must be one of the values of `AvailabilityZoneList`. * @type {string || null} */ this.Zone = null; /** * Instance architecture type - REPLSET: Replica set - SHARD: Sharded cluster * @type {string || null} */ this.ClusterType = null; /** * VPC ID * @type {string || null} */ this.VpcId = null; /** * VPC subnet ID. If `VpcId` is set, then `SubnetId` will be required. * @type {string || null} */ this.SubnetId = null; /** * Instance password - If it is left empty, the password is in the default format of "instance ID+@+root account UIN". For example, if the instance ID is "cmgo-higv73ed" and the root account UIN "100000001", the instance password will be "cmgo-higv73ed@100000001". - The custom password must contain 8-32 characters in at least two of the following types: letters, digits, and symbols (!@#%^*()_). * @type {string || null} */ this.Password = null; /** * Project ID. If it is left empty, `Default project` will be used. * @type {number || null} */ this.ProjectId = null; /** * Instance tag information * @type {Array.<TagInfo> || null} */ this.Tags = null; /** * Instance type. Valid values: - `1`: Primary instance - `3`: Read-only instance - `4`: Disaster recovery instance * @type {number || null} */ this.Clone = null; /** * Parent instance ID. It is required if the `Clone` is `3` or `4`, that is, read-only instance or disaster recovery instance * @type {string || null} */ this.Father = null; /** * Security group * @type {Array.<string> || null} */ this.SecurityGroup = null; /** * Rollback time of the cloned instance - This parameter is required for a cloned instance in the format of 2021-08-13 16:30:00. - Time range for rollback: You can roll back data in the last 7 days. * @type {string || null} */ this.RestoreTime = null; /** * Instance name, which can contain up to 60 letters, digits, and symbols (_-). * @type {string || null} */ this.InstanceName = null; /** * List of multi-AZ deployed nodes. For more information, query through the [DescribeSpecInfo](https://intl.cloud.tencent.com/document/product/240/38567?from_cn_redirect=1) API. - Nodes of a multi-AZ instance must be deployed across three AZs. Most nodes of the cluster can’t be deployed in the same AZ. For example, a three-node sharded cluster instance does not support deploying two or more nodes in the same AZ. - MongoDB 4.2 and later versions do not support multi-AZ deployment. - Read-only and disaster recovery instances do not support multi-AZ deployment. -Instances in the classic network do not support multi-AZ deployment. * @type {Array.<string> || null} */ this.AvailabilityZoneList = null; /** * Number of Mongos CPU cores - This parameter is not required for a sharded cluster instance of MongoDB 3.6 WiredTiger or later. - If this parameter is not configured, the mongos specification will be configured based on the mongod specification, and the default specification is free of charge. * @type {number || null} */ this.MongosCpu = null; /** * Mongos memory size - This parameter is not required for a sharded cluster instance of MongoDB 3.6 WiredTiger or later. - If this parameter is not configured, the mongos specification will be configured based on the mongod specification, and the default specification is free of charge. * @type {number || null} */ this.MongosMemory = null; /** * Number of Monogs - This parameter is not required for a sharded cluster instance of MongoDB 3.6 WiredTiger or later. - If this parameter is not configured, the mongos specification will be configured based on the mongod specification, and the default specification is free of charge. * @type {number || null} */ this.MongosNodeNum = null; /** * Number of read-only nodes. Value range: 0-5. * @type {number || null} */ this.ReadonlyNodeNum = null; /** * AZ of read-only nodes, which is required when `ReadonlyNodeNum` is not `0` in cross-AZ instance deployment. * @type {Array.<string> || null} */ this.ReadonlyNodeAvailabilityZoneList = null; /** * AZ where the hidden node resides, which is required in cross-AZ instance deployment. * @type {string || null} */ this.HiddenZone = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.Memory = 'Memory' in params ? params.Memory : null; this.Volume = 'Volume' in params ? params.Volume : null; this.ReplicateSetNum = 'ReplicateSetNum' in params ? params.ReplicateSetNum : null; this.NodeNum = 'NodeNum' in params ? params.NodeNum : null; this.MongoVersion = 'MongoVersion' in params ? params.MongoVersion : null; this.MachineCode = 'MachineCode' in params ? params.MachineCode : null; this.GoodsNum = 'GoodsNum' in params ? params.GoodsNum : null; this.Zone = 'Zone' in params ? params.Zone : null; this.ClusterType = 'ClusterType' in params ? params.ClusterType : null; this.VpcId = 'VpcId' in params ? params.VpcId : null; this.SubnetId = 'SubnetId' in params ? params.SubnetId : null; this.Password = 'Password' in params ? params.Password : null; this.ProjectId = 'ProjectId' in params ? params.ProjectId : null; if (params.Tags) { this.Tags = new Array(); for (let z in params.Tags) { let obj = new TagInfo(); obj.deserialize(params.Tags[z]); this.Tags.push(obj); } } this.Clone = 'Clone' in params ? params.Clone : null; this.Father = 'Father' in params ? params.Father : null; this.SecurityGroup = 'SecurityGroup' in params ? params.SecurityGroup : null; this.RestoreTime = 'RestoreTime' in params ? params.RestoreTime : null; this.InstanceName = 'InstanceName' in params ? params.InstanceName : null; this.AvailabilityZoneList = 'AvailabilityZoneList' in params ? params.AvailabilityZoneList : null; this.MongosCpu = 'MongosCpu' in params ? params.MongosCpu : null; this.MongosMemory = 'MongosMemory' in params ? params.MongosMemory : null; this.MongosNodeNum = 'MongosNodeNum' in params ? params.MongosNodeNum : null; this.ReadonlyNodeNum = 'ReadonlyNodeNum' in params ? params.ReadonlyNodeNum : null; this.ReadonlyNodeAvailabilityZoneList = 'ReadonlyNodeAvailabilityZoneList' in params ? params.ReadonlyNodeAvailabilityZoneList : null; this.HiddenZone = 'HiddenZone' in params ? params.HiddenZone : null; } } /** * AssignProject request structure. * @class */ class AssignProjectRequest extends AbstractModel { constructor(){ super(); /** * List of instance IDs in the format of cmgo-p8vnipr5. It is the same as the instance ID displayed on the TencentDB Console page * @type {Array.<string> || null} */ this.InstanceIds = null; /** * Unique ID of an existing project (instead of a new project). * @type {number || null} */ this.ProjectId = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.InstanceIds = 'InstanceIds' in params ? params.InstanceIds : null; this.ProjectId = 'ProjectId' in params ? params.ProjectId : null; } } /** * Security group rule * @class */ class SecurityGroupBound extends AbstractModel { constructor(){ super(); /** * Execution rule. Valid values: `ACCEPT`, `DROP` * @type {string || null} */ this.Action = null; /** * IP range * @type {string || null} */ this.CidrIp = null; /** * Port range * @type {string || null} */ this.PortRange = null; /** * Transport layer protocol. Valid values: `tcp`, `udp`, `ALL` * @type {string || null} */ this.IpProtocol = null; /** * All the addresses that the security group ID represents * @type {string || null} */ this.Id = null; /** * All the addresses that the address group ID represents * @type {string || null} */ this.AddressModule = null; /** * All the protocols and ports that the service group ID represents * @type {string || null} */ this.ServiceModule = null; /** * Description * @type {string || null} */ this.Desc = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.Action = 'Action' in params ? params.Action : null; this.CidrIp = 'CidrIp' in params ? params.CidrIp : null; this.PortRange = 'PortRange' in params ? params.PortRange : null; this.IpProtocol = 'IpProtocol' in params ? params.IpProtocol : null; this.Id = 'Id' in params ? params.Id : null; this.AddressModule = 'AddressModule' in params ? params.AddressModule : null; this.ServiceModule = 'ServiceModule' in params ? params.ServiceModule : null; this.Desc = 'Desc' in params ? params.Desc : null; } } /** * CreateBackupDownloadTask response structure. * @class */ class CreateBackupDownloadTaskResponse extends AbstractModel { constructor(){ super(); /** * Download task status * @type {Array.<BackupDownloadTaskStatus> || null} */ this.Tasks = 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.Tasks) { this.Tasks = new Array(); for (let z in params.Tasks) { let obj = new BackupDownloadTaskStatus(); obj.deserialize(params.Tasks[z]); this.Tasks.push(obj); } } this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * Client connection information, including client IP and number of connections * @class */ class ClientConnection extends AbstractModel { constructor(){ super(); /** * Client IP of a connection * @type {string || null} */ this.IP = null; /** * Number of connections corresponding to a client IP * @type {number || null} */ this.Count = null; /** * Whether it is the Tencent Cloud IP for automated testing * @type {boolean || null} */ this.InternalService = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.IP = 'IP' in params ? params.IP : null; this.Count = 'Count' in params ? params.Count : null; this.InternalService = 'InternalService' in params ? params.InternalService : null; } } /** * InquirePriceModifyDBInstanceSpec request structure. * @class */ class InquirePriceModifyDBInstanceSpecRequest extends AbstractModel { constructor(){ super(); /** * Instance ID in the format of cmgo-p8vn****. It is the same as the instance ID displayed in the TencentDB console. * @type {string || null} */ this.InstanceId = null; /** * Instance memory size in GB after specification adjustment. * @type {number || null} */ this.Memory = null; /** * Instance disk size in GB after specification adjustment. * @type {number || null} */ this.Volume = null; /** * Number of instance nodes. The number of nodes is left unchanged by default and cannot be changed currently. * @type {number || null} */ this.NodeNum = null; /** * Number of instance shards. The number of shards is left unchanged by default and cannot be changed currently. * @type {number || null} */ this.ReplicateSetNum = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.InstanceId = 'InstanceId' in params ? params.InstanceId : null; this.Memory = 'Memory' in params ? params.Memory : null; this.Volume = 'Volume' in params ? params.Volume : null; this.NodeNum = 'NodeNum' in params ? params.NodeNum : null; this.ReplicateSetNum = 'ReplicateSetNum' in params ? params.ReplicateSetNum : null; } } /** * Backup information * @class */ class BackupInfo extends AbstractModel { constructor(){ super(); /** * Instance ID * @type {string || null} */ this.InstanceId = null; /** * Backup mode. 0: automatic backup; 1: manual backup * @type {number || null} */ this.BackupType = null; /** * Backup name * @type {string || null} */ this.BackupName = null; /** * Backup remarks Note: This field may return null, indicating that no valid values can be obtained. * @type {string || null} */ this.BackupDesc = null; /** * Backup file size in KB Note: This field may return null, indicating that no valid values can be obtained. * @type {number || null} */ this.BackupSize = null; /** * Backup start time Note: This field may return null, indicating that no valid values can be obtained. * @type {string || null} */ this.StartTime = null; /** * Backup end time Note: This field may return null, indicating that no valid values can be obtained. * @type {string || null} */ this.EndTime = null; /** * Backup status. 1: backing up; 2: backed up successful * @type {number || null} */ this.Status = null; /** * Backup method. 0: logical backup; 1: physical backup * @type {number || null} */ this.BackupMethod = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.InstanceId = 'InstanceId' in params ? params.InstanceId : null; this.BackupType = 'BackupType' in params ? params.BackupType : null; this.BackupName = 'BackupName' in params ? params.BackupName : null; this.BackupDesc = 'BackupDesc' in params ? params.BackupDesc : null; this.BackupSize = 'BackupSize' in params ? params.BackupSize : null; this.StartTime = 'StartTime' in params ? params.StartTime : null; this.EndTime = 'EndTime' in params ? params.EndTime : null; this.Status = 'Status' in params ? params.Status : null; this.BackupMethod = 'BackupMethod' in params ? params.BackupMethod : null; } } /** * ModifyDBInstanceSecurityGroup response structure. * @class */ class ModifyDBInstanceSecurityGroupResponse 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; } } /** * Security group information * @class */ class SecurityGroup extends AbstractModel { constructor(){ super(); /** * Project ID * @type {number || null} */ this.ProjectId = null; /** * Creation time * @type {string || null} */ this.CreateTime = null; /** * Inbound rule * @type {Array.<SecurityGroupBound> || null} */ this.Inbound = null; /** * Outbound rule * @type {Array.<SecurityGroupBound> || null} */ this.Outbound = null; /** * Security group ID * @type {string || null} */ this.SecurityGroupId = null; /** * Security group name * @type {string || null} */ this.SecurityGroupName = null; /** * Security group remarks * @type {string || null} */ this.SecurityGroupRemark = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.ProjectId = 'ProjectId' in params ? params.ProjectId : null; this.CreateTime = 'CreateTime' in params ? params.CreateTime : null; if (params.Inbound) { this.Inbound = new Array(); for (let z in params.Inbound) { let obj = new SecurityGroupBound(); obj.deserialize(params.Inbound[z]); this.Inbound.push(obj); } } if (params.Outbound) { this.Outbound = new Array(); for (let z in params.Outbound) { let obj = new SecurityGroupBound(); obj.deserialize(params.Outbound[z]); this.Outbound.push(obj); } } this.SecurityGroupId = 'SecurityGroupId' in params ? params.SecurityGroupId : null; this.SecurityGroupName = 'SecurityGroupName' in params ? params.SecurityGroupName : null; this.SecurityGroupRemark = 'SecurityGroupRemark' in params ? params.SecurityGroupRemark : null; } } /** * InquirePriceRenewDBInstances request structure. * @class */ class InquirePriceRenewDBInstancesRequest extends AbstractModel { constructor(){ super(); /** * Instance ID in the format of cmgo-p8vnipr5. It is the same as the instance ID displayed in the TencentDB Console. This API supports operations on up to 5 instances at a time. * @type {Array.<string> || null} */ this.InstanceIds = null; /** * The parameter setting for the prepaid mode (monthly subscription mode). This parameter can specify the renewal period, whether to set automatic renewal, and other attributes of the monthly subscription instance. * @type {InstanceChargePrepaid || null} */ this.InstanceChargePrepaid = 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; } } } /** * DescribeAsyncRequestInfo request structure. * @class */ class DescribeAsyncRequestInfoRequest extends AbstractModel { constructor(){ super(); /** * Async task ID, which is returned by APIs related to async tasks, such as `CreateBackupDBInstance`. * @type {string || null} */ this.AsyncRequestId = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.AsyncRequestId = 'AsyncRequestId' in params ? params.AsyncRequestId : null; } } /** * Instance specification information * @class */ class SpecificationInfo extends AbstractModel { constructor(){ super(); /** * Region information * @type {string || null} */ this.Region = null; /** * AZ information * @type {string || null} */ this.Zone = null; /** * Purchasable specification information * @type {Array.<SpecItem> || null} */ this.SpecItems = null; /** * Whether cross-AZ deployment is supported. Valid values: `1` (yes), `0` (no). * @type {number || null} */ this.SupportMultiAZ = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.Region = 'Region' in params ? params.Region : null; this.Zone = 'Zone' in params ? params.Zone : null; if (params.SpecItems) { this.SpecItems = new Array(); for (let z in params.SpecItems) { let obj = new SpecItem(); obj.deserialize(params.SpecItems[z]); this.SpecItems.push(obj); } } this.SupportMultiAZ = 'SupportMultiAZ' in params ? params.SupportMultiAZ : null; } } /** * CreateBackupDownloadTask request structure. * @class */ class CreateBackupDownloadTaskRequest extends AbstractModel { constructor(){ super(); /** * Instance ID in the format of "cmgo-p8vnipr5", which is the same as the instance ID displayed in the TencentDB console. * @type {string || null} */ this.InstanceId = null; /** * The name of the backup file to be downloaded, which can be obtained by the `DescribeDBBackups` API. * @type {string || null} */ this.BackupName = null; /** * Specify the node name of a replica set instance or the shard name list of a sharded cluster instance. Only backups of the specified node or shards will be downloaded. Suppose you have a replica set instance (ID: cmgo-p8vnipr5), you can use the sample code `BackupSets.0=cmgo-p8vnipr5_0` to download the full backup. For a replica set instance, the parameter value must be in the format of "instance ID_0". Suppose you have a sharded cluster instance (ID: cmgo-p8vnipr5), you can use the sample code `BackupSets.0=cmgo-p8vnipr5_0&BackupSets.1=cmgo-p8vnipr5_1` to download the backup data of shard 0 and shard 1. To download the full backup, please specify all shard names. * @type {Array.<ReplicaSetInfo> || null} */ this.BackupSets = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.InstanceId = 'InstanceId' in params ? params.InstanceId : null; this.BackupName = 'BackupName' in params ? params.BackupName : null; if (params.BackupSets) { this.BackupSets = new Array(); for (let z in params.BackupSets) { let obj = new ReplicaSetInfo(); obj.deserialize(params.BackupSets[z]); this.BackupSets.push(obj); } } } } /** * DescribeSlowLogPatterns request structure. * @class */ class DescribeSlowLogPatternsRequest extends AbstractModel { constructor(){ super(); /** * Instance ID in the format of `cmgo-p8vnipr5`, which is the same as the instance ID displayed on the TencentDB Console page * @type {string || null} */ this.InstanceId = null; /** * Start time of slow log in the format of `yyyy-mm-dd hh:mm:ss`, such as 2019-06-01 10:00:00. The query time range cannot exceed 24 hours. Only slow logs for the last 7 days can be queried. * @type {string || null} */ this.StartTime = null; /** * End time of slow log in the format of `yyyy-mm-dd hh:mm:ss`, such as 2019-06-02 12:00:00. The query time range cannot exceed 24 hours. Only slow logs for the last 7 days can be queried. * @type {string || null} */ this.EndTime = null; /** * Threshold of slow log execution time in milliseconds. Minimum value: 100. Slow logs whose execution time exceeds the threshold will be returned. * @type {number || null} */ this.SlowMS = null; /** * Offset. Minimum value: 0. Maximum value: 10000. Default value: 0. * @type {number || null} */ this.Offset = null; /** * Number of entries per page. Minimum value: 1. Maximum value: 100. Default value: 20. * @type {number || null} */ this.Limit = null; /** * Slow log format, which can be JSON. If this parameter is left empty, the slow log will be returned in its native format. * @type {string || null} */ this.Format = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.InstanceId = 'InstanceId' in params ? params.InstanceId : null; this.StartTime = 'StartTime' in params ? params.StartTime : null; this.EndTime = 'EndTime' in params ? params.EndTime : null; this.SlowMS = 'SlowMS' in params ? params.SlowMS : null; this.Offset = 'Offset' in params ? params.Offset : null; this.Limit = 'Limit' in params ? params.Limit : null; this.Format = 'Format' in params ? params.Format : null; } } /** * DescribeSlowLogs response structure. * @class */ class DescribeSlowLogsResponse extends AbstractModel { constructor(){ super(); /** * Total number of slow logs * @type {number || null} */ this.Count = null; /** * Slow log details * @type {Array.<string> || null} */ this.SlowLogs = 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.Count = 'Count' in params ? params.Count : null; this.SlowLogs = 'SlowLogs' in params ? params.SlowLogs : null; this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * FlushInstanceRouterConfig response structure. * @class */ class FlushInstanceRouterConfigResponse 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; } } /** * InquirePriceModifyDBInstanceSpec response structure. * @class */ class InquirePriceModifyDBInstanceSpecResponse extends AbstractModel { constructor(){ super(); /** * Price. * @type {DBInstancePrice || null} */ this.Price = null; /** * The unique request ID, which is returned for each request. RequestId is required for locating a problem. * @type {string || null} */ this.RequestId = null; } /** * @privat