tencentcloud-sdk-nodejs-intl-en
Version:
1,462 lines (1,230 loc) • 322 kB
JavaScript
/*
* 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");
/**
* DescribeSpecInfo request structure.
* @class
*/
class DescribeSpecInfoRequest extends AbstractModel {
constructor(){
super();
/**
* AZ to be queried. For currently supported AZs, see [Regions and AZs](https://www.tencentcloud.com/document/product/240/3637?from_cn_redirect=1).
* @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();
/**
* <ul><li>Specifies the number of primary and secondary nodes for each replica set during replica set instance creation. Call the <a href="https://www.tencentcloud.com/document/product/240/38567?from_cn_redirect=1">DescribeSpecInfo</a> API to obtain the maximum and minimum number of nodes supported for each replica set.</li><li>Specifies the number of primary and secondary nodes for each shard during sharded cluster instance creation. Call the <a href="https://www.tencentcloud.com/document/product/240/38567?from_cn_redirect=1">DescribeSpecInfo</a> API to obtain the maximum and minimum number of nodes supported for each shard.</li></ul>
* @type {number || null}
*/
this.NodeNum = null;
/**
* <p>Instance memory size. Unit: GB. Call the <a href="https://www.tencentcloud.com/document/product/240/38567?from_cn_redirect=1">DescribeSpecInfo</a> API to obtain specific saleable memory specifications.</p>
* @type {number || null}
*/
this.Memory = null;
/**
* <p>Instance disk size. Unit: GB. Call the <a href="https://www.tencentcloud.com/document/product/240/38567?from_cn_redirect=1">DescribeSpecInfo</a> API to obtain the maximum and minimum disk sizes corresponding to each CPU specification.</p>
* @type {number || null}
*/
this.Volume = null;
/**
* <p>Refers to version information. For supported versions, use the interface <a href="https://www.tencentcloud.com/document/product/240/38567?from_cn_redirect=1">DescribeSpecInfo</a> to query.</p><ul><li>MONGO_40_WT: MongoDB 4.0 WiredTiger engine version.</li><li>MONGO_42_WT: MongoDB 4.2 WiredTiger engine version.</li><li>MONGO_44_WT: MongoDB 4.4 WiredTiger engine version.</li><li>MONGO_50_WT: MongoDB 5.0 WiredTiger engine version.</li><li>MONGO_60_WT: MongoDB 6.0 WiredTiger engine version.</li><li>MONGO_70_WT: MongoDB 7.0 WiredTiger engine version.</li><li>MONGO_80_WT: MongoDB 8.0 WiredTiger engine version.</li></ul>
* @type {string || null}
*/
this.MongoVersion = null;
/**
* <p>Number of instances. The minimum value is 1, and the maximum value is 30.</p>
* @type {number || null}
*/
this.GoodsNum = null;
/**
* <p>AZ information. The input format must be ap-guangzhou-2.</p><ul><li>For details, use the interface <a href="https://www.tencentcloud.com/document/product/240/38567?from_cn_redirect=1">DescribeSpecInfo</a> to obtain them.</li><li>This parameter is the primary AZ. If multi-AZ deployment is used, Zone must be one of AvailabilityZoneList.</li></ul>
* @type {string || null}
*/
this.Zone = null;
/**
* <p>Specifies the purchase duration during instance purchase. Valid values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, and 36. Unit: months.</p>
* @type {number || null}
*/
this.Period = null;
/**
* <p>Recommended product specification types:</p><ul><li>GE.LD.T1: Local disk (Common I).</li><li>GE.CD.T1: Cloud disk (Common I).</li></ul><p>Product allowlist specification types:</p><ul><li>HIO10G: Local disk (High IO 10G).</li><li>HCD: Cloud disk (Cloud disk edition).</li></ul><p>Note: Allowlist specification types are under allowlist control. If needed, <a href="https://console.cloud.tencent.com/workorder/category">submit a ticket</a> to apply.</p>
* @type {string || null}
*/
this.MachineCode = null;
/**
* <p>Instance architecture type.</p><ul><li>REPLSET (replica set)</li><li>SHARD (sharded cluster)</li></ul>
* @type {string || null}
*/
this.ClusterType = null;
/**
* <ul><li>Specifies the number of replica sets during replica set instance creation. This parameter can only be 1.</li><li>Specifies the number of shards during sharded cluster instance creation. Call the <a href="https://www.tencentcloud.com/document/product/240/38567?from_cn_redirect=1">DescribeSpecInfo</a> API to query the range of shard quantity. The parameters MinReplicateSetNum and MaxReplicateSetNum in the returned data structure SpecItems correspond to the minimum value and maximum value, respectively.</li></ul>
* @type {number || null}
*/
this.ReplicateSetNum = null;
/**
* <p>Project ID.</p><ul><li>If this parameter is not set, the default project is used.</li><li>You can obtain the project ID on the <a href="https://console.cloud.tencent.com/project">MongoDB console project management</a> page.</li></ul>
* @type {number || null}
*/
this.ProjectId = null;
/**
* <p>VPC ID.</p><ul><li>Only private networks can be configured, and a private network in the same region as the instance must be selected. Log in to the <a href="https://console.cloud.tencent.com/vpc">VPC console</a> to obtain a used private network ID.</li><li>After successful instance creation, VPC replacement is allowed. For detailed operations, see <a href="https://www.tencentcloud.com/document/product/239/30910?from_cn_redirect=1">Changing the Network</a>.</li></ul>
* @type {string || null}
*/
this.VpcId = null;
/**
* <p>Subnet ID of the VPC.</p><ul><li>You must specify a subnet within the selected private network. Log in to the <a href="https://console.cloud.tencent.com/vpc">VPC console</a> to obtain the subnet ID.</li><li>After the instance is successfully created, replacement of the private network and subnet is allowed. For detailed operations, please refer to <a href="https://www.tencentcloud.com/document/product/239/30910?from_cn_redirect=1">Network Change</a>.</li></ul>
* @type {string || null}
*/
this.SubnetId = null;
/**
* <p>Instance password. The requirements are as follows:</p><ul><li>Character count is [8,32].</li><li>Enter characters within [A,Z], [a,z], [0,9].</li><li>Special characters include: exclamation mark "!", at "@", pound sign "#", percent sign "%", caret "^", asterisk "*", brackets "()", underscore "_".</li><li>Cannot set a single letter or number.</li></ul>
* @type {string || null}
*/
this.Password = null;
/**
* <p>Instance tag information.</p>
* @type {Array.<TagInfo> || null}
*/
this.Tags = null;
/**
* <p>Auto-renewal flag.</p><ul><li>0: no auto-renewal.</li><li>1: auto-renewal.</li></ul>
* @type {number || null}
*/
this.AutoRenewFlag = null;
/**
* <p>Indicates whether to automatically select voucher.</p><ul><li>1: Yes.</li><li>0: No. Default is 0.</li></ul>
* @type {number || null}
*/
this.AutoVoucher = null;
/**
* <p>Instance type.</p><ul><li>1: Formal instance.</li><li>3: Read-only instance.</li><li>4: Disaster recovery instance.</li><li>5: Clone instance. Note: RestoreTime is a required item when you clone an instance.</li></ul>
* @type {number || null}
*/
this.Clone = null;
/**
* <p>Parent instance ID.</p><ul><li>When the <strong>Clone</strong> parameter is 3 or 4, that is, the instance is read-only or a disaster recovery instance, this parameter must be configured.</li><li>Log in to the <a href="https://console.cloud.tencent.com/mongodb">MongoDB console</a> and copy the parent instance ID in the instance list.</li></ul>
* @type {string || null}
*/
this.Father = null;
/**
* <p>Security group ID. Log in to the <a href="https://console.cloud.tencent.com/vpc/security-group">security group console</a> to obtain the ID of the security group within the same region as the database instance.</p>
* @type {Array.<string> || null}
*/
this.SecurityGroup = null;
/**
* <p>Rollback time of the cloned instance. It is required when the Clone value is 5 or 6. - This parameter is required for cloned instances. Format: 2021-08-13 16:30:00. - Rollback time range: Only data within the last 7 days can be rolled back.</p>
* @type {string || null}
*/
this.RestoreTime = null;
/**
* <p>Instance name. Only Chinese, English, digits, underscores (_), and hyphens (-) are supported, with a maximum length of 128 characters. When purchasing database instances in batches, you can efficiently set instance names by using custom pattern strings and automatically ascending numeric suffixes.</p><ul><li>Basic mode: prefix + automatic ascending number (starting from 1 by default). Only a custom instance name prefix is required for <strong>lnstanceName</strong>. For example, it can be set to cmgo. If the purchase quantity is set to 5, after purchase, the instances will be sequentially named cmgo1, cmgo2, cmgo3, cmgo4, and cmgo5, respectively.</li><li>Custom starting number mode: prefix + {R:x} (x is the custom starting number). <strong>InstanceName</strong> requires "prefix{R:x}". For example, cmgo{R:3}. If the purchase quantity is set to 5, the instance names will be cmgo3, cmgo4, cmgo5, cmgo6, and cmgo7.</li><li>Composite pattern string: prefix1{R:x} + prefix2{R:y} + ⋯ + fixed suffix, where x and y are the starting numbers for each prefix. <strong>InstanceName</strong> requires a composite pattern string. For example, cmgo{R:10}_node{R:12}_db. If the batch purchase quantity is set to 5, the instance names will be cmgo10_node12_db, cmgo11_node13_db, cmgo12_node14_db, cmgo13_node15_db, and cmgo14_node16_db.</li></ul>
* @type {string || null}
*/
this.InstanceName = null;
/**
* <p>For cloud database instances in multi-AZ deployment, specify the availability zone list.</p><ul><li>For instances in multi-AZ deployment mode, the <strong>Zone</strong> parameter specifies the primary AZ, and <strong>AvailabilityZoneList</strong> specifies all AZs, including the primary AZ. Format: [ap-guangzhou-2,ap-guangzhou-3,ap-guangzhou-4].</li><li>Use the <a href="https://www.tencentcloud.com/document/product/240/38567?from_cn_redirect=1">DescribeSpecInfo</a> API to access cloud databases and obtain availability zone information planned for different regions, so that you can assign valid AZs.</li><li>Nodes in multi-AZ deployment can only be deployed in 3 different availability zones. Deploying most nodes of a cluster in the same availability zone is not supported. For example, a 3-node cluster does not support deploying 2 nodes in the same zone.</li></ul>
* @type {Array.<string> || null}
*/
this.AvailabilityZoneList = null;
/**
* <p>Number of Mongos node CPU cores. Valid values: 1, 2, 4, 8, and 16. This parameter is required during sharded cluster instance purchase.</p>
* @type {number || null}
*/
this.MongosCpu = null;
/**
* <p>Mongos node memory size.</p><ul><li>This parameter is required during sharded cluster instance purchase.</li><li>Unit: GB. Valid values: 2 (for 1 core), 4 (for 2 cores), 8 (for 4 cores), 16 (for 8 cores), and 32 (for 16 cores).</li></ul>
* @type {number || null}
*/
this.MongosMemory = null;
/**
* <p>Number of Mongos nodes. This parameter is required during sharded cluster instance purchase.</p><ul><li>For single-AZ deployment instances, the quantity range is [3,32].</li><li>For instances deployed across multiple availability zones, the quantity range is [6,32].</li></ul>
* @type {number || null}
*/
this.MongosNodeNum = null;
/**
* <p>Number of read-only nodes. Value ranges from 0 to 5.</p>
* @type {number || null}
*/
this.ReadonlyNodeNum = null;
/**
* <p>Array of AZs of read-only nodes. This parameter is required for instances in multi-AZ deployment mode when <strong>ReadonlyNodeNum</strong> is not set to <strong>0</strong>.</p>
* @type {Array.<string> || null}
*/
this.ReadonlyNodeAvailabilityZoneList = null;
/**
* <p>Availability zone of the Hidden node. To deploy instances across availability zones, you must configure this parameter.</p>
* @type {string || null}
*/
this.HiddenZone = null;
/**
* <p>Parameter template ID.</p><ul><li>A parameter template is a collection of preset specific parameters applicable to quick configuration of new MongoDB instances. Proper use of parameter templates can effectively improve database deployment efficiency and operating performance.</li><li>The parameter template ID can be obtained through the <a href="https://www.tencentcloud.com/document/product/240/109155?from_cn_redirect=1">DescribeDBInstanceParamTpl</a> API. Please select the parameter template ID corresponding to your instance version and architecture.</li></ul>
* @type {string || null}
*/
this.ParamTemplateId = null;
/**
* <p>Instance CPU core size. Unit: C. Call the <a href="https://www.tencentcloud.com/document/product/240/38567?from_cn_redirect=1">DescribeSpecInfo</a> API to obtain specific saleable CPU specifications.<br>Note: CPU size must be set for common I Instance Type.</p>
* @type {number || null}
*/
this.CpuCore = 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;
this.ParamTemplateId = 'ParamTemplateId' in params ? params.ParamTemplateId : null;
this.CpuCore = 'CpuCore' in params ? params.CpuCore : null;
}
}
/**
* CreateDBInstanceParamTpl response structure.
* @class
*/
class CreateDBInstanceParamTplResponse extends AbstractModel {
constructor(){
super();
/**
* Template ID.
* @type {string || null}
*/
this.TplId = 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.TplId = 'TplId' in params ? params.TplId : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* DescribeAccountUsers request structure.
* @class
*/
class DescribeAccountUsersRequest extends AbstractModel {
constructor(){
super();
/**
* Specifies the ID of the instance for obtaining accounts. For example, cmgo-p8vn****. Log in to the [TencentDB for MongoDB console](https://console.cloud.tencent.com/MongoDB) and copy the instance ID from the instance list.
* @type {string || null}
*/
this.InstanceId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
}
}
/**
* DescribeDBInstanceParamTpl request structure.
* @class
*/
class DescribeDBInstanceParamTplRequest extends AbstractModel {
constructor(){
super();
/**
* Parameter template ID. Use the [DescribeDBInstanceParamTpl](https://www.tencentcloud.com/document/product/240/109155?from_cn_redirect=1) interface to obtain template ID.
* @type {Array.<string> || null}
*/
this.TplIds = null;
/**
* Specifies the template name for query.
* @type {Array.<string> || null}
*/
this.TplNames = null;
/**
* Specifies the database version number of the parameter template to query. For supported versions, use the [DescribeSpecInfo](https://www.tencentcloud.com/document/product/240/38567?from_cn_redirect=1) API.
- MONGO_36_WT: Version of the MongoDB 3.6 WiredTiger storage engine.
- MONGO_40_WT: Version of the MongoDB 4.0 WiredTiger storage engine.
- MONGO_42_WT: Version of the MongoDB 4.2 WiredTiger storage engine.
- MONGO_44_WT: Version of the MongoDB 4.4 WiredTiger storage engine.
- MONGO_50_WT: Version of the MongoDB 5.0 WiredTiger storage engine.
- MONGO_60_WT: version of the MongoDB 6.0 WiredTiger storage engine.
- MONGO_70_WT: version of the MongoDB 7.0 WiredTiger storage engine.
- MONGO_80_WT: version of the MongoDB 8.0 WiredTiger storage engine.
* @type {Array.<string> || null}
*/
this.MongoVersion = null;
/**
* Specifies the template type for query.
-DEFAULT: System default template.
-CUSTOMIZE: custom template.
* @type {string || null}
*/
this.TplType = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.TplIds = 'TplIds' in params ? params.TplIds : null;
this.TplNames = 'TplNames' in params ? params.TplNames : null;
this.MongoVersion = 'MongoVersion' in params ? params.MongoVersion : null;
this.TplType = 'TplType' in params ? params.TplType : null;
}
}
/**
* CreateBackupDBInstance response structure.
* @class
*/
class CreateBackupDBInstanceResponse extends AbstractModel {
constructor(){
super();
/**
* Request 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;
}
}
/**
* DescribeAuditLogs request structure.
* @class
*/
class DescribeAuditLogsRequest extends AbstractModel {
constructor(){
super();
/**
* Instance ID, in the format of cmgo-xftsghuy. It is the same as the instance ID displayed on the TencentDB console page.
* @type {string || null}
*/
this.InstanceId = null;
/**
* Start time, format: "2017-07-12 10:29:20".
* @type {string || null}
*/
this.StartTime = null;
/**
* End time, format: "2017-07-12 10:29:20".
* @type {string || null}
*/
this.EndTime = null;
/**
* Filter conditions. You can filter logs based on these conditions.
* @type {AuditLogFilter || null}
*/
this.Filter = null;
/**
* Pagination parameter indicates the number of returned data entries. Default value is 100. Maximum value is 100.
* @type {number || null}
*/
this.Limit = null;
/**
* Pagination offset.
* @type {number || null}
*/
this.Offset = null;
/**
* Sorting method of the audit log.
<ul><li>ASC: ascending.</li><li>DESC: descending order.</li></ul>
* @type {string || null}
*/
this.Order = null;
/**
* Sorting field of the audit log, including:
<ul><li>timestamp: Timestamp.</li>
<li>affectRows: Number of affected rows.</li>
<li>execTime: Execution time.</li></ul>
* @type {string || null}
*/
this.OrderBy = 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;
if (params.Filter) {
let obj = new AuditLogFilter();
obj.deserialize(params.Filter)
this.Filter = obj;
}
this.Limit = 'Limit' in params ? params.Limit : null;
this.Offset = 'Offset' in params ? params.Offset : null;
this.Order = 'Order' in params ? params.Order : null;
this.OrderBy = 'OrderBy' in params ? params.OrderBy : null;
}
}
/**
* Instance price
* @class
*/
class DBInstancePrice extends AbstractModel {
constructor(){
super();
/**
* Unit price of the instance, in USD.
* @type {number || null}
*/
this.UnitPrice = null;
/**
* Original price of the instance, in USD.
* @type {number || null}
*/
this.OriginalPrice = null;
/**
* Discount price of the instance, in USD.
* @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;
}
}
/**
* DescribePasswordRotation response structure.
* @class
*/
class DescribePasswordRotationResponse 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;
}
}
/**
* KillOps request structure.
* @class
*/
class KillOpsRequest extends AbstractModel {
constructor(){
super();
/**
* Instance ID. Log in to the [TencentDB for MongoDB console](https://console.cloud.tencent.com/mongodb), and copy the instance ID from the instance list.
* @type {string || null}
*/
this.InstanceId = null;
/**
* Operation to be terminated.
* @type {Array.<Operation> || null}
*/
this.Operations = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
if (params.Operations) {
this.Operations = new Array();
for (let z in params.Operations) {
let obj = new Operation();
obj.deserialize(params.Operations[z]);
this.Operations.push(obj);
}
}
}
}
/**
* EnablePasswordRotation request structure.
* @class
*/
class EnablePasswordRotationRequest extends AbstractModel {
constructor(){
super();
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
}
}
/**
* DeleteLogDownloadTask response structure.
* @class
*/
class DeleteLogDownloadTaskResponse extends AbstractModel {
constructor(){
super();
/**
* Task status. 0: successful.
* @type {number || null}
*/
this.Status = 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.Status = 'Status' in params ? params.Status : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* InquirePriceRenewDBInstances request structure.
* @class
*/
class InquirePriceRenewDBInstancesRequest extends AbstractModel {
constructor(){
super();
/**
* Instance ID. Log in to the [TencentDB for MongoDB console](https://console.cloud.tencent.com/MongoDB) and copy the instance ID from the instance list. Up to 5 instances can be queried 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;
}
}
}
/**
* DescribeAuditLogFiles response structure.
* @class
*/
class DescribeAuditLogFilesResponse extends AbstractModel {
constructor(){
super();
/**
* Number of eligible audit log files.
* @type {number || null}
*/
this.TotalCount = null;
/**
* Audit log file details.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {Array.<AuditLogFile> || 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 AuditLogFile();
obj.deserialize(params.Items[z]);
this.Items.push(obj);
}
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* FlushInstanceRouterConfig request structure.
* @class
*/
class FlushInstanceRouterConfigRequest extends AbstractModel {
constructor(){
super();
/**
* Instance ID
* @type {string || null}
*/
this.InstanceId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
}
}
/**
* DescribeSlowLogs request structure.
* @class
*/
class DescribeSlowLogsRequest extends AbstractModel {
constructor(){
super();
/**
* Instance ID. Log in to the [TencentDB for MongoDB console](https://console.cloud.tencent.com/mongodb), and copy the instance ID from the instance list.
* @type {string || null}
*/
this.InstanceId = null;
/**
* Slow log start time.
- Format: yyyy-mm-dd hh:mm:ss. For example, 2019-06-01 10:00:00.
- The query start and end time interval cannot exceed 24 hours. Only slow logs within the last 7 days can be queried.
* @type {string || null}
*/
this.StartTime = null;
/**
* Slow log end time.
- Format: yyyy-mm-dd hh:mm:ss. For example, 2019-06-02 12:00:00.- The query start and end time interval cannot exceed 24 hours. Only slow logs within 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;
/**
* Return format of slow log. The original slow log format is returned by default, and the format can be set to JSON on versions 4.4 and later.
* @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;
}
}
/**
* FlushInstanceRouterConfig response structure.
* @class
*/
class FlushInstanceRouterConfigResponse 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;
}
}
/**
* DescribeCurrentOp response structure.
* @class
*/
class DescribeCurrentOpResponse extends AbstractModel {
constructor(){
super();
/**
* Total number of operations meeting the query conditions.
* @type {number || null}
*/
this.TotalCount = null;
/**
* List of the current operations.
* @type {Array.<CurrentOp> || null}
*/
this.CurrentOps = 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.CurrentOps) {
this.CurrentOps = new Array();
for (let z in params.CurrentOps) {
let obj = new CurrentOp();
obj.deserialize(params.CurrentOps[z]);
this.CurrentOps.push(obj);
}
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* SetDBInstanceDeletionProtection request structure.
* @class
*/
class SetDBInstanceDeletionProtectionRequest extends AbstractModel {
constructor(){
super();
/**
* Instance ID list, in the format of cmgo-p8vnipr5. It is the same as the format of the instance ID displayed on the TencentDB for MongoDB console page.
* @type {Array.<string> || null}
*/
this.InstanceIds = null;
/**
* Instance termination protection switch. Valid values: 0 - disabled; 1 - enabled.
* @type {number || null}
*/
this.EnableDeletionProtection = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceIds = 'InstanceIds' in params ? params.InstanceIds : null;
this.EnableDeletionProtection = 'EnableDeletionProtection' in params ? params.EnableDeletionProtection : null;
}
}
/**
* The collection of modifiable string parameters of an instance which are used to represent time ranges.
* @class
*/
class InstanceMultiParam extends AbstractModel {
constructor(){
super();
/**
* Current parameter value.
* @type {string || null}
*/
this.CurrentValue = null;
/**
* Default parameter value.
* @type {string || null}
*/
this.DefaultValue = null;
/**
* Reference value range.
* @type {Array.<string> || null}
*/
this.EnumValue = null;
/**
* Whether a restart is required for the parameters to take effect after modification.
- 1: Restart is required for the parameters to take effect.
- 0: Restart is not required. Once set, the parameters take effect immediately.
* @type {string || null}
*/
this.NeedRestart = null;
/**
* Parameter name.
* @type {string || null}
*/
this.ParamName = null;
/**
* Whether the parameter values are used during running.
- 1. parameter values used during running.
- 0: parameter values not used during running.
* @type {number || null}
*/
this.Status = null;
/**
* Parameter description.
* @type {Array.<string> || null}
*/
this.Tips = null;
/**
* Describes the type of the current values. Default value: multi.
* @type {string || null}
*/
this.ValueType = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.CurrentValue = 'CurrentValue' in params ? params.CurrentValue : null;
this.DefaultValue = 'DefaultValue' in params ? params.DefaultValue : null;
this.EnumValue = 'EnumValue' in params ? params.EnumValue : null;
this.NeedRestart = 'NeedRestart' in params ? params.NeedRestart : null;
this.ParamName = 'ParamName' in params ? params.ParamName : null;
this.Status = 'Status' in params ? params.Status : null;
this.Tips = 'Tips' in params ? params.Tips : null;
this.ValueType = 'ValueType' in params ? params.ValueType : null;
}
}
/**
* DescribeSRVConnectionDomain response structure.
* @class
*/
class DescribeSRVConnectionDomainResponse extends AbstractModel {
constructor(){
super();
/**
* srv domain information of the current instance.
* @type {string || null}
*/
this.Domain = 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.Domain = 'Domain' in params ? params.Domain : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* ModifyInstanceParams response structure.
* @class
*/
class ModifyInstanceParamsResponse extends AbstractModel {
constructor(){
super();
/**
* Whether the modification on the parameter configuration takes effect.
- true: the modified parameter value has taken effect.
- false: execution failed.
* @type {boolean || null}
*/
this.Changed = null;
/**
* This parameter is temporarily meaningless (to be compatible with the earlier versions, reserve this parameter at the frontend).
* @type {number || null}
*/
this.TaskId = 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.Changed = 'Changed' in params ? params.Changed : null;
this.TaskId = 'TaskId' in params ? params.TaskId : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* SetInstanceMaintenance response structure.
* @class
*/
class SetInstanceMaintenanceResponse 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;
}
}
/**
* DescribeInstanceSSL request structure.
* @class
*/
class DescribeInstanceSSLRequest extends AbstractModel {
constructor(){
super();
/**
* Instance ID, in the format of cmgo-p8vnipr5. It is the same as the format of the instance ID displayed on the TencentDB for MongoDB console page.
* @type {string || null}
*/
this.InstanceId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
}
}
/**
* EnableTransparentDataEncryption request structure.
* @class
*/
class EnableTransparentDataEncryptionRequest extends AbstractModel {
constructor(){
super();
/**
* Instance ID. For example, cmgo-p8vn****. Log in to the[TencentDB for MongoDB console](https://console.cloud.tencent.com/mongodb) to copy the instance ID from the instance list. Currently, the supported general versions include 4.4 and 5.0, and Cloud Disk Edition is not supported.
* @type {string || null}
*/
this.InstanceId = null;
/**
* Region where the [Key Management Service (KMS)](https://www.tencentcloud.com/document/product/573/18809?from_cn_redirect=1) instance is located. For example, ap-shanghai.
* @type {string || null}
*/
this.KmsRegion = null;
/**
* Key ID. If the parameter is left unspecified, there is no specific key ID, Tencent Cloud will generate the key automatically.
* @type {string || null}
*/
this.KeyId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
this.KmsRegion = 'KmsRegion' in params ? params.KmsRegion : null;
this.KeyId = 'KeyId' in params ? params.KeyId : null;
}
}
/**
* DescribeBackupRules response structure.
* @class
*/
class DescribeBackupRulesResponse extends AbstractModel {
constructor(){
super();
/**
* Retention period for backup data, in days.
* @type {number || null}
*/
this.BackupSaveTime = null;
/**
* Backup frequency. Backup interval in hours. Value: 12, 24.
* @type {number || null}
*/
this.BackupFrequency = null;
/**
* Automatic backup start time.
* @type {number || null}
*/
this.BackupTime = null;
/**
* Backup mode.
- 0: logical backup.
- 1: physical backup.
-3: Snapshot backup.
**Description**:
1. The General Edition instance supports logical and physical backup. The Cloud Disk Edition instance supports physical and snapshot backup, but does not support logical backup currently.
2. Physical backup is not supported when storage encryption is enabled for the instance.
* @type {number || null}
*/
this.BackupMethod = null;
/**
* Day of week for backup, 0-6, separated by commas
* @type {string || null}
*/
this.ActiveWeekdays = null;
/**
* Long-term backup period. weekly - by week, monthly - by month, empty means not enabled.
* @type {string || null}
*/
this.LongTermInterval = null;
/**
* Date of long-term backup, week 0-6, month 1-31
* @type {string || null}
*/
this.LongTermActiveDays = null;
/**
* Long-term backup retention period
* @type {number || null}
*/
this.LongTermExpiredDays = null;
/**
* Incremental backup retention period
* @type {number || null}
*/
this.OplogExpiredDays = null;
/**
* Backup version. 0 - Old backup method, 1 - Advanced backup.
* @type {number || null}
*/
this.BackupVersion = null;
/**
* Backup size
* @type {BackupTotalSize || null}
*/
this.BackupTotalSize = null;
/**
* alarm limit
* @type {number || null}
*/
this.AlertThreshold = 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.BackupSaveTime = 'BackupSaveTime' in params ? params.BackupSaveTime : null;
this.BackupFrequency = 'BackupFrequency' in params ? params.BackupFrequency : null;
this.BackupTime = 'BackupTime' in params ? params.BackupTime : null;
this.BackupMethod = 'BackupMethod' in params ? params.BackupMethod : null;
this.ActiveWeekdays = 'ActiveWeekdays' in params ? params.ActiveWeekdays : null;
this.LongTermInterval = 'LongTermInterval' in params ? params.LongTermInterval : null;
this.LongTermActiveDays = 'LongTermActiveDays' in params ? params.LongTermActiveDays : null;
this.LongTermExpiredDays = 'LongTermExpiredDays' in params ? params.LongTermExpiredDays : null;
this.OplogExpiredDays = 'OplogExpiredDays' in params ? params.OplogExpiredDays : null;
this.BackupVersion = 'BackupVersion' in params ? params.BackupVersion : null;
if (params.BackupTotalSize) {
let obj = new BackupTotalSize();
obj.deserialize(params.BackupTotalSize)
this.BackupTotalSize = obj;
}
this.AlertThreshold = 'AlertThreshold' in params ? params.AlertThreshold : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* ModifyBackupExpireTime response structure.
* @class
*/
class ModifyBackupExpireTimeResponse extends AbstractModel {
constructor(){
super();
/**
* <p>Failed backup ID.</p>
* @type {Array.<number> || null}
*/
this.FailedBackups = 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.FailedBackups = 'FailedBackups' in params ? params.FailedBackups : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* Slow log statistics of MongoDB database
* @class
*/
class SlowLogPattern extends AbstractModel {
constructor(){
super();
/**
* Slow log output format: database name.table name.command.
* @type {string || null}
*/
this.Pattern = null;
/**
* queryHash value carried during slow log recording. It can be used to identify a query type.
* @type {string || null}
*/
this.QueryHash = null;
/**
* Maximum execution time, in milliseconds.
* @type {number || null}
*/
this.MaxTime = null;
/**
* Average execution time, in milliseconds.
* @type {number || null}
*/
this.AverageTime = null;
/**
* Number of slow logs.
* @type {number || null}