tencentcloud-sdk-nodejs-intl-en
Version:
1,510 lines (1,274 loc) • 454 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");
/**
* Task details.
* @class
*/
class TaskDetail extends AbstractModel {
constructor(){
super();
/**
* Current task step name.
* @type {string || null}
*/
this.CurrentStep = null;
/**
* Describes the step description of the current task you own.
* @type {string || null}
*/
this.AllSteps = null;
/**
* Input of the task.
* @type {string || null}
*/
this.Input = null;
/**
* Output parameter of the task.
* @type {string || null}
*/
this.Output = null;
/**
* Specifies the switch time after instance configurations are modified. default value: 0.
This task does not require switching.
Switch immediately.
2: switch at specified time.
3: switch during maintenance time window.
* @type {number || null}
*/
this.SwitchTag = null;
/**
* Specifies the switch time.
* @type {string || null}
*/
this.SwitchTime = null;
/**
* Note of the task.
* @type {string || null}
*/
this.Message = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.CurrentStep = 'CurrentStep' in params ? params.CurrentStep : null;
this.AllSteps = 'AllSteps' in params ? params.AllSteps : null;
this.Input = 'Input' in params ? params.Input : null;
this.Output = 'Output' in params ? params.Output : null;
this.SwitchTag = 'SwitchTag' in params ? params.SwitchTag : null;
this.SwitchTime = 'SwitchTime' in params ? params.SwitchTime : null;
this.Message = 'Message' in params ? params.Message : null;
}
}
/**
* SetAutoRenewFlag request structure.
* @class
*/
class SetAutoRenewFlagRequest extends AbstractModel {
constructor(){
super();
/**
* Instance ID set. obtain through the api [DescribeDBInstances](https://www.tencentcloud.com/document/api/409/16773?from_cn_redirect=1). only supports prepaid (annual/monthly subscription) instances. supports operating multiple instances simultaneously.
* @type {Array.<string> || null}
*/
this.DBInstanceIdSet = null;
/**
* Renewal flag. 0: normal renewal, 1: auto-renewal, 2: no renewal upon expiration
* @type {number || null}
*/
this.AutoRenewFlag = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.DBInstanceIdSet = 'DBInstanceIdSet' in params ? params.DBInstanceIdSet : null;
this.AutoRenewFlag = 'AutoRenewFlag' in params ? params.AutoRenewFlag : null;
}
}
/**
* DeleteBackupPlan response structure.
* @class
*/
class DeleteBackupPlanResponse 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;
}
}
/**
* DescribeAccountPrivileges response structure.
* @class
*/
class DescribeAccountPrivilegesResponse extends AbstractModel {
constructor(){
super();
/**
* Specifies that the user has CREATE, CONNECT, and TEMPORARY permissions on the database user_database.
* @type {Array.<DatabasePrivilege> || null}
*/
this.PrivilegeSet = 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;
}
if (params.PrivilegeSet) {
this.PrivilegeSet = new Array();
for (let z in params.PrivilegeSet) {
let obj = new DatabasePrivilege();
obj.deserialize(params.PrivilegeSet[z]);
this.PrivilegeSet.push(obj);
}
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* DescribeDatabases request structure.
* @class
*/
class DescribeDatabasesRequest extends AbstractModel {
constructor(){
super();
/**
* Instance ID. obtain through the API [DescribeDBInstances](https://www.tencentcloud.com/document/product/409/16773?from_cn_redirect=1).
* @type {string || null}
*/
this.DBInstanceId = null;
/**
* Query using one or more filter criteria. Filter criteria currently supported include: database-name: filter by database name (in string format). Fuzzy matching is used to search for databases that meet the criteria.
* @type {Array.<Filter> || null}
*/
this.Filters = null;
/**
* Data offset, which starts from 0.
* @type {number || null}
*/
this.Offset = null;
/**
* Number of items displayed at a time. the maximum value is recommended to be 100.
Default value: 20.
* @type {number || null}
*/
this.Limit = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.DBInstanceId = 'DBInstanceId' in params ? params.DBInstanceId : null;
if (params.Filters) {
this.Filters = new Array();
for (let z in params.Filters) {
let obj = new Filter();
obj.deserialize(params.Filters[z]);
this.Filters.push(obj);
}
}
this.Offset = 'Offset' in params ? params.Offset : null;
this.Limit = 'Limit' in params ? params.Limit : null;
}
}
/**
* DescribeDBXlogs request structure.
* @class
*/
class DescribeDBXlogsRequest extends AbstractModel {
constructor(){
super();
/**
* Instance ID. for example, postgres-4wdeb0zv.
* @type {string || null}
*/
this.DBInstanceId = null;
/**
* Query start time, such as 2018-06-10 17:06:38. start time should not be less than 7 days ago.
* @type {string || null}
*/
this.StartTime = null;
/**
* Query end time, in the format of 2018-06-10 17:06:38.
* @type {string || null}
*/
this.EndTime = null;
/**
* Pagination return indicates which page of entries to return. counting begins from page 0.
* @type {number || null}
*/
this.Offset = null;
/**
* Pagination return indicates how many items per page. value range: 1-100.
* @type {number || null}
*/
this.Limit = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.DBInstanceId = 'DBInstanceId' in params ? params.DBInstanceId : null;
this.StartTime = 'StartTime' in params ? params.StartTime : null;
this.EndTime = 'EndTime' in params ? params.EndTime : null;
this.Offset = 'Offset' in params ? params.Offset : null;
this.Limit = 'Limit' in params ? params.Limit : null;
}
}
/**
* DescribeAuditLogs request structure.
* @class
*/
class DescribeAuditLogsRequest extends AbstractModel {
constructor(){
super();
/**
* <p>Instance ID</p>
* @type {string || null}
*/
this.InstanceId = null;
/**
* <p>Start time</p><p>Parameter format: 2026-03-25 00:00:00</p>
* @type {string || null}
*/
this.StartTime = null;
/**
* <p>End time</p><p>Parameter format: 2026-03-25 01:00:00</p>
* @type {string || null}
*/
this.EndTime = null;
/**
* <p>Query limit</p><p>Value range: [1, 100]</p>
* @type {number || null}
*/
this.Limit = null;
/**
* <p>Product name</p><p>Parameter format: postgres</p>
* @type {string || null}
*/
this.Product = null;
/**
* <p>Offset</p><p>Value range: [0, 10000]</p>
* @type {number || null}
*/
this.Offset = null;
/**
* <p>Sorting method</p><p>Input parameter limitation: Timestamp,AffectRows,ExecTime</p>
* @type {string || null}
*/
this.Order = null;
/**
* <p>Sorting field</p><p>Input limit: ASC, DESC</p>
* @type {string || null}
*/
this.OrderBy = null;
/**
* <p>Filter criteria</p>
* @type {AuditLogFilter || null}
*/
this.Filter = 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.Limit = 'Limit' in params ? params.Limit : null;
this.Product = 'Product' in params ? params.Product : 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;
if (params.Filter) {
let obj = new AuditLogFilter();
obj.deserialize(params.Filter)
this.Filter = obj;
}
}
}
/**
* DescribeMaintainTimeWindow request structure.
* @class
*/
class DescribeMaintainTimeWindowRequest extends AbstractModel {
constructor(){
super();
/**
* Instance ID. obtain through the api [DescribeDBInstances](https://www.tencentcloud.com/document/product/409/16773?lang=en).
* @type {string || null}
*/
this.DBInstanceId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.DBInstanceId = 'DBInstanceId' in params ? params.DBInstanceId : null;
}
}
/**
* DescribeAccounts request structure.
* @class
*/
class DescribeAccountsRequest extends AbstractModel {
constructor(){
super();
/**
* Instance ID, such as postgres-6fego161. can be obtained through the DescribeDBInstances api (https://www.tencentcloud.com/document/product/409/16773?lang=en).
* @type {string || null}
*/
this.DBInstanceId = null;
/**
* Pagination return. maximum return per page. default 20. value range 1-100.
* @type {number || null}
*/
this.Limit = null;
/**
* Data offset, which starts from 0.
* @type {number || null}
*/
this.Offset = null;
/**
* Return data is sorted by creation time or username. valid values: createTime, name, updateTime. createTime - sort by creation time; name - sort by username; updateTime - sort by update time.
Default value: createTime.
* @type {string || null}
*/
this.OrderBy = null;
/**
* Specifies whether the returned results are in ascending or descending order. valid values: desc or asc. desc - descending order; asc - ascending order.
Default value: desc.
* @type {string || null}
*/
this.OrderByType = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.DBInstanceId = 'DBInstanceId' in params ? params.DBInstanceId : null;
this.Limit = 'Limit' in params ? params.Limit : null;
this.Offset = 'Offset' in params ? params.Offset : null;
this.OrderBy = 'OrderBy' in params ? params.OrderBy : null;
this.OrderByType = 'OrderByType' in params ? params.OrderByType : null;
}
}
/**
* DeleteReadOnlyGroup response structure.
* @class
*/
class DeleteReadOnlyGroupResponse extends AbstractModel {
constructor(){
super();
/**
* Process ID
* @type {number || null}
*/
this.FlowId = 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.FlowId = 'FlowId' in params ? params.FlowId : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* OpenDBExtranetAccess request structure.
* @class
*/
class OpenDBExtranetAccessRequest extends AbstractModel {
constructor(){
super();
/**
* Specifies the instance ID, such as postgres-hez4fh0v. obtain through the api [DescribeDBInstances](https://www.tencentcloud.com/document/product/409/16773?lang=en).
* @type {string || null}
*/
this.DBInstanceId = null;
/**
* Specifies whether to enable public network Ipv6. valid values: 1 (yes), 0 (no).
Default value: 0
* @type {number || null}
*/
this.IsIpv6 = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.DBInstanceId = 'DBInstanceId' in params ? params.DBInstanceId : null;
this.IsIpv6 = 'IsIpv6' in params ? params.IsIpv6 : null;
}
}
/**
* CreateInstances request structure.
* @class
*/
class CreateInstancesRequest extends AbstractModel {
constructor(){
super();
/**
* <p>Purchasable specification code. Obtain this parameter by calling the `SpecCode` field in the return value of <a href="https://www.tencentcloud.com/document/api/409/89019?from_cn_redirect=1">DescribeClasses</a>.</p>
* @type {string || null}
*/
this.SpecCode = null;
/**
* <p>Instance disk capacity size, unit: GB. The step length for parameter settings is 10.</p>
* @type {number || null}
*/
this.Storage = null;
/**
* <p>Number of instances to purchase, value ranges from 1 to 10. Single transaction supports a maximum quantity of 10. If exceeding this quantity, multiple calls can be performed to purchase.</p>
* @type {number || null}
*/
this.InstanceCount = null;
/**
* <p>Purchase duration, unit: month.</p><li>Prepaid: Supports `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, `12`, `24`, and `36`.</li><li>Postpaid: Supports only `1`.</li>
* @type {number || null}
*/
this.Period = null;
/**
* <p>Instance character set, which currently supports only:</p><li>UTF8</li><li>LATIN1</li>
* @type {string || null}
*/
this.Charset = null;
/**
* <p>Username of the instance root account. Specific specifications are as follows:</p><li>The username must consist of 1-16 characters, which can only be letters, digits, or underscores.</li><li>Cannot be postgres.</li><li>Cannot begin with digits or pg_.</li><li>All rules are case-insensitive.</li>
* @type {string || null}
*/
this.AdminName = null;
/**
* <p>Password for the instance root account username, with a length of 8-32 characters. It is recommended to use a password of more than 12 characters and it cannot start with "/".<br>Must contain the following four character types:</p><li>Lowercase letter: [a-z]</li><li>Uppercase letter: [a-z]</li><li>Number: 0-9</li><li>Special character: ()`~!@#$%^&*-+=_|{}[]:;'<>,.?/</li>
* @type {string || null}
*/
this.AdminPassword = null;
/**
* <p>The primary availability zone of the instance, for example: ap-guangzhou-3. If needed to support multiple AZs, add primary and secondary AZ information in the DBNodeSet.N field.<br>AZ information can be obtained by calling the <a href="https://www.tencentcloud.com/document/api/409/16769?from_cn_redirect=1">DescribeZones</a> api and checking the Zone field in the returned value.</p>
* @type {string || null}
*/
this.Zone = null;
/**
* <p>PostgreSQL major version number (this parameter is currently required). Version information can be obtained from <a href="https://www.tencentcloud.com/document/api/409/89018?from_cn_redirect=1">DescribeDBVersions</a>. Currently supports major versions 10, 11, 12, 13, 14, and 15. For details, see <a href="https://www.tencentcloud.com/document/product/409/67018?from_cn_redirect=1">kernel version overview</a>.<br>When this parameter is entered, an instance running the latest kernel version of the latest minor version will be created based on this major version number.</p>
* @type {string || null}
*/
this.DBMajorVersion = null;
/**
* <p>PostgreSQL community major version + minor version number.<br>It's generally not recommended to pass in this parameter. If needed, only the latest minor version number under the current major version can be passed.</p>
* @type {string || null}
*/
this.DBVersion = null;
/**
* <p>PostgreSQL kernel version number.<br>It's generally not recommended to pass in this parameter. If needed, only the latest kernel version number under the current major version can be passed.</p>
* @type {string || null}
*/
this.DBKernelVersion = null;
/**
* <p>Instance billing type. Currently supports:</p><li>PREPAID: Prepayment, i.e., yearly/monthly subscription</li><li>POSTPAID_BY_HOUR: Postpaid, i.e., pay-as-you-go</li>Default value: PREPAID
* @type {string || null}
*/
this.InstanceChargeType = null;
/**
* <p>VPC ID, such as vpc-xxxxxxxx (this parameter is currently required). A valid VPC ID can be obtained by logging in to the console to query or by calling the API DescribeVpcEx and acquiring the unVpcId field in the API return.</p>
* @type {string || null}
*/
this.VpcId = null;
/**
* <p>VPC subnet ID, such as subnet-xxxxxxxx (this parameter is currently required). Effective VPC subnet IDs can be queried by logging in to the console or by calling the API <a href="https://www.tencentcloud.com/document/api/215/15784?from_cn_redirect=1">DescribeSubnets</a> and acquiring the unSubnetId field in the API return.</p>
* @type {string || null}
*/
this.SubnetId = null;
/**
* <p>Instance node deployment information. When multi-availability zone deployment is supported, it requires specifying the AZ information for each node.<br>AZ information can be obtained from the Zone field in the returned value by calling the <a href="https://www.tencentcloud.com/document/api/409/16769?from_cn_redirect=1">DescribeZones</a> API.</p>
* @type {Array.<DBNode> || null}
*/
this.DBNodeSet = null;
/**
* <p>Auto-renewal flag:</p><li>0: Manual renewal</li><li>1: Auto renewal</li>Default value: 0
* @type {number || null}
*/
this.AutoRenewFlag = null;
/**
* <p>Whether to automatically use a voucher:</p><li>0: No</li><li>1: Yes</li>Default value: 0
* @type {number || null}
*/
this.AutoVoucher = null;
/**
* <p>Voucher ID list. Currently only support specifying one voucher.</p>
* @type {Array.<string> || null}
*/
this.VoucherIds = null;
/**
* <p>Project ID. The default value is 0, which means it belongs to the default project.</p>
* @type {number || null}
*/
this.ProjectId = null;
/**
* <p>Activity ID.</p>
* @type {number || null}
*/
this.ActivityId = null;
/**
* <p>Instance name only supports Chinese/English/number/"_"/"-" with length less than 60. If no instance name is specified, "unnamed" is displayed by default.</p>
* @type {string || null}
*/
this.Name = null;
/**
* <p>Tag information that should be bound to the instance is empty by default. You can get it by calling <a href="https://www.tencentcloud.com/document/api/651/35316?from_cn_redirect=1">DescribeTags</a> and checking the Tags field in the return value.</p>
* @type {Array.<Tag> || null}
*/
this.TagList = null;
/**
* <p>Security group to which an instance belongs. Obtain this parameter by calling the sgId field in the returned value of <a href="https://www.tencentcloud.com/document/api/215/15808?from_cn_redirect=1">DescribeSecurityGroups</a>. If not specified, the default security group is bound.</p>
* @type {Array.<string> || null}
*/
this.SecurityGroupIds = null;
/**
* <p>Whether data transparent encryption is required:</p><li>0: No</li><li>1: Yes</li>Default value: 0. See [Overview of Data Transparent Encryption](https://www.tencentcloud.com/document/product/409/71748?from_cn_redirect=1).
* @type {number || null}
*/
this.NeedSupportTDE = null;
/**
* <p>The KeyId of the custom key. If you select custom key encryption, you need to input the KeyId of the custom key. KeyId is the unique identifier of CMK.<br>For related reference on KeyId creation and retrieval, see <a href="https://www.tencentcloud.com/document/product/409/71749?from_cn_redirect=1">Enable Transparent Data Encryption</a></p>
* @type {string || null}
*/
this.KMSKeyId = null;
/**
* <p>For regions using the KMS service, KMSRegion is empty by default and the local region KMS is used. If the local region is not supported, select another KMS supported region.<br>For details about KMSRegion, see <a href="https://www.tencentcloud.com/document/product/409/71749?from_cn_redirect=1">enable transparent data encryption</a></p>
* @type {string || null}
*/
this.KMSRegion = null;
/**
* <p>Designate the service cluster for KMS. If KMSClusterId is empty, use the KMS of the Default Cluster. To select the specified KMS cluster, require the input of KMSClusterId. For details about KMSClusterId, see enable transparent data encryption.</p>
* @type {string || null}
*/
this.KMSClusterId = null;
/**
* <p>Database engine, support:</p><li>`postgresql`: TencentDB for PostgreSQL</li><li>`mssql_compatible`: MSSQL compatible - TencentDB for PostgreSQL</li>Default value: postgresql
* @type {string || null}
*/
this.DBEngine = null;
/**
* <p>Configuration information for the database engine. The configuration format is as follows:<br>{"$key1":"$value1", "$key2":"$value2"}<br>Supported engines:<br>mssql_compatible engine:</p><li>migrationMode: Database schema, optional parameter. Valid values: single-db (single-database mode), multi-db (multi-database mode). Default is single-db.</li><li>defaultLocale: Sorting area rule, optional parameter, cannot be modified after initialization. Default is en_US. Valid values include: "af_ZA", "sq_AL", "ar_DZ", "ar_BH", "ar_EG", "ar_IQ", "ar_JO", "ar_KW", "ar_LB", "ar_LY", "ar_MA", "ar_OM", "ar_QA", "ar_SA", "ar_SY", "ar_TN", "ar_AE", "ar_YE", "hy_AM", "az_Cyrl_AZ", "az_Latn_AZ", "eu_ES", "be_BY", "bg_BG", "ca_ES", "zh_HK", "zh_MO", "zh_CN", "zh_SG", "zh_TW", "hr_HR", "cs_CZ", "da_DK", "nl_BE", "nl_NL", "en_AU", "en_BZ", "en_CA", "en_IE", "en_JM", "en_NZ", "en_PH", "en_ZA", "en_TT", "en_GB", "en_US", "en_ZW", "et_EE", "fo_FO", "fa_IR", "fi_FI", "fr_BE", "fr_CA", "fr_FR", "fr_LU", "fr_MC", "fr_CH", "mk_MK", "ka_GE", "de_AT", "de_DE", "de_LI", "de_LU", "de_CH", "el_GR", "gu_IN", "he_IL", "hi_IN", "hu_HU", "is_IS", "id_ID", "it_IT", "it_CH", "ja_JP", "kn_IN", "kok_IN", "ko_KR", "ky_KG", "lv_LV", "lt_LT", "ms_BN", "ms_MY", "mr_IN", "mn_MN", "nb_NO", "nn_NO", "pl_PL", "pt_BR", "pt_PT", "pa_IN", "ro_RO", "ru_RU", "sa_IN", "sr_Cyrl_RS", "sr_Latn_RS", "sk_SK", "sl_SI", "es_AR", "es_BO", "es_CL", "es_CO", "es_CR", "es_DO", "es_EC", "es_SV", "es_GT", "es_HN", "es_MX", "es_NI", "es_PA", "es_PY","es_PE", "es_PR", "es_ES", "es_TRADITIONAL", "es_UY", "es_VE", "sw_KE", "sv_FI", "sv_SE", "tt_RU", "te_IN", "th_TH", "tr_TR", "uk_UA", "ur_IN", "ur_PK", "uz_Cyrl_UZ", "uz_Latn_UZ", "vi_VN".</li><li>serverCollationName: Collation name, optional parameter, cannot be modified after initialization. Default is sql_latin1_general_cp1_ci_as. Valid values include: "bbf_unicode_general_ci_as", "bbf_unicode_cp1_ci_as", "bbf_unicode_CP1250_ci_as", "bbf_unicode_CP1251_ci_as", "bbf_unicode_cp1253_ci_as", "bbf_unicode_cp1254_ci_as", "bbf_unicode_cp1255_ci_as", "bbf_unicode_cp1256_ci_as", "bbf_unicode_cp1257_ci_as", "bbf_unicode_cp1258_ci_as", "bbf_unicode_cp874_ci_as", "sql_latin1_general_cp1250_ci_as", "sql_latin1_general_cp1251_ci_as", "sql_latin1_general_cp1_ci_as", "sql_latin1_general_cp1253_ci_as", "sql_latin1_general_cp1254_ci_as", "sql_latin1_general_cp1255_ci_as","sql_latin1_general_cp1256_ci_as", "sql_latin1_general_cp1257_ci_as", "sql_latin1_general_cp1258_ci_as", "chinese_prc_ci_as", "cyrillic_general_ci_as", "finnish_swedish_ci_as", "french_ci_as", "japanese_ci_as", "korean_wansung_ci_as", "latin1_general_ci_as", "modern_spanish_ci_as", "polish_ci_as", "thai_ci_as", "traditional_spanish_ci_as", "turkish_ci_as", "ukrainian_ci_as", "vietnamese_ci_as".</li>
* @type {string || null}
*/
this.DBEngineConfig = null;
/**
* <p>Primary-standby sync mode, supports: </p><li>Semi-sync: semi-synchronous</li><li>Async: asynchronous</li>Default value for the primary instance: Semi-syncDefault value for the read-only instance: Async
* @type {string || null}
*/
this.SyncMode = null;
/**
* <p>Whether required to support Ipv6:</p><li>0: No</li><li>1: Yes</li>Default value: 0
* @type {number || null}
*/
this.NeedSupportIpv6 = null;
/**
* <p>Whether to enable deletion protection for the instance: true-enable deletion protection; false-disable deletion protection.</p>
* @type {boolean || null}
*/
this.DeletionProtection = null;
/**
* <p>Instance storage type. Available values: PHYSICAL_LOCAL_SSD: LOCAL SSD hard disk of PHYSICAL machine; CLOUD_PREMIUM: high-performance CLOUD block storage; CLOUD_SSD: SSD CLOUD disk; CLOUD_HSSD: enhanced SSD CLOUD disk.</p>
* @type {string || null}
*/
this.StorageType = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.SpecCode = 'SpecCode' in params ? params.SpecCode : null;
this.Storage = 'Storage' in params ? params.Storage : null;
this.InstanceCount = 'InstanceCount' in params ? params.InstanceCount : null;
this.Period = 'Period' in params ? params.Period : null;
this.Charset = 'Charset' in params ? params.Charset : null;
this.AdminName = 'AdminName' in params ? params.AdminName : null;
this.AdminPassword = 'AdminPassword' in params ? params.AdminPassword : null;
this.Zone = 'Zone' in params ? params.Zone : null;
this.DBMajorVersion = 'DBMajorVersion' in params ? params.DBMajorVersion : null;
this.DBVersion = 'DBVersion' in params ? params.DBVersion : null;
this.DBKernelVersion = 'DBKernelVersion' in params ? params.DBKernelVersion : null;
this.InstanceChargeType = 'InstanceChargeType' in params ? params.InstanceChargeType : null;
this.VpcId = 'VpcId' in params ? params.VpcId : null;
this.SubnetId = 'SubnetId' in params ? params.SubnetId : null;
if (params.DBNodeSet) {
this.DBNodeSet = new Array();
for (let z in params.DBNodeSet) {
let obj = new DBNode();
obj.deserialize(params.DBNodeSet[z]);
this.DBNodeSet.push(obj);
}
}
this.AutoRenewFlag = 'AutoRenewFlag' in params ? params.AutoRenewFlag : null;
this.AutoVoucher = 'AutoVoucher' in params ? params.AutoVoucher : null;
this.VoucherIds = 'VoucherIds' in params ? params.VoucherIds : null;
this.ProjectId = 'ProjectId' in params ? params.ProjectId : null;
this.ActivityId = 'ActivityId' in params ? params.ActivityId : null;
this.Name = 'Name' in params ? params.Name : null;
if (params.TagList) {
this.TagList = new Array();
for (let z in params.TagList) {
let obj = new Tag();
obj.deserialize(params.TagList[z]);
this.TagList.push(obj);
}
}
this.SecurityGroupIds = 'SecurityGroupIds' in params ? params.SecurityGroupIds : null;
this.NeedSupportTDE = 'NeedSupportTDE' in params ? params.NeedSupportTDE : null;
this.KMSKeyId = 'KMSKeyId' in params ? params.KMSKeyId : null;
this.KMSRegion = 'KMSRegion' in params ? params.KMSRegion : null;
this.KMSClusterId = 'KMSClusterId' in params ? params.KMSClusterId : null;
this.DBEngine = 'DBEngine' in params ? params.DBEngine : null;
this.DBEngineConfig = 'DBEngineConfig' in params ? params.DBEngineConfig : null;
this.SyncMode = 'SyncMode' in params ? params.SyncMode : null;
this.NeedSupportIpv6 = 'NeedSupportIpv6' in params ? params.NeedSupportIpv6 : null;
this.DeletionProtection = 'DeletionProtection' in params ? params.DeletionProtection : null;
this.StorageType = 'StorageType' in params ? params.StorageType : null;
}
}
/**
* Specification description
* @class
*/
class SpecItemInfo extends AbstractModel {
constructor(){
super();
/**
* <p>Specification ID.</p>
* @type {string || null}
*/
this.SpecCode = null;
/**
* <p>PostgreSQL version number.</p>
* @type {string || null}
*/
this.Version = null;
/**
* <p>Full version name of the kernel number.</p>
* @type {string || null}
*/
this.VersionName = null;
/**
* <p>CPU cores.</p>
* @type {number || null}
*/
this.Cpu = null;
/**
* <p>Memory size, in MB.</p>
* @type {number || null}
*/
this.Memory = null;
/**
* <p>Maximum storage capacity supported by this specification, in GB.</p>
* @type {number || null}
*/
this.MaxStorage = null;
/**
* <p>Minimum storage capacity supported by this specification, in GB.</p>
* @type {number || null}
*/
this.MinStorage = null;
/**
* <p>Estimated QPS of the specification.</p>
* @type {number || null}
*/
this.Qps = null;
/**
* <p>[Deprecated field].</p>
* @type {number || null}
*/
this.Pid = null;
/**
* <p>Machine type.</p>
* @type {string || null}
*/
this.Type = null;
/**
* <p>PostgreSQL major version number.</p>
* @type {string || null}
*/
this.MajorVersion = null;
/**
* <p>PostgreSQL kernel version number.</p>
* @type {string || null}
*/
this.KernelVersion = null;
/**
* <p>Indicates whether the TDE data encryption feature is supported. 0 - not supported. 1 - supported.</p>
* @type {number || null}
*/
this.IsSupportTDE = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.SpecCode = 'SpecCode' in params ? params.SpecCode : null;
this.Version = 'Version' in params ? params.Version : null;
this.VersionName = 'VersionName' in params ? params.VersionName : null;
this.Cpu = 'Cpu' in params ? params.Cpu : null;
this.Memory = 'Memory' in params ? params.Memory : null;
this.MaxStorage = 'MaxStorage' in params ? params.MaxStorage : null;
this.MinStorage = 'MinStorage' in params ? params.MinStorage : null;
this.Qps = 'Qps' in params ? params.Qps : null;
this.Pid = 'Pid' in params ? params.Pid : null;
this.Type = 'Type' in params ? params.Type : null;
this.MajorVersion = 'MajorVersion' in params ? params.MajorVersion : null;
this.KernelVersion = 'KernelVersion' in params ? params.KernelVersion : null;
this.IsSupportTDE = 'IsSupportTDE' in params ? params.IsSupportTDE : null;
}
}
/**
* ModifyDBInstanceSSLConfig request structure.
* @class
*/
class ModifyDBInstanceSSLConfigRequest extends AbstractModel {
constructor(){
super();
/**
* Instance ID. obtain through the api [DescribeDBInstances](https://www.tencentcloud.com/document/product/409/16773?lang=en).
* @type {string || null}
*/
this.DBInstanceId = null;
/**
* Turn on or off SSL. true - turn on; false - turn off.
* @type {boolean || null}
*/
this.SSLEnabled = null;
/**
* The unique connection address protected by an SSL certificate. for a primary instance, it can be set to private and public IP addresses. for a read-only instance, it can be set to the instance IP or read-only group IP. this parameter is required when enabling SSL or modifying the SSL-protected connection address. it will be ignored when disabling SSL.
* @type {string || null}
*/
this.ConnectAddress = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.DBInstanceId = 'DBInstanceId' in params ? params.DBInstanceId : null;
this.SSLEnabled = 'SSLEnabled' in params ? params.SSLEnabled : null;
this.ConnectAddress = 'ConnectAddress' in params ? params.ConnectAddress : null;
}
}
/**
* Basic information of a parameter template
* @class
*/
class ParameterTemplate extends AbstractModel {
constructor(){
super();
/**
* Parameter template ID
* @type {string || null}
*/
this.TemplateId = null;
/**
* Parameter template name
* @type {string || null}
*/
this.TemplateName = null;
/**
* Database version applicable to a parameter template
* @type {string || null}
*/
this.DBMajorVersion = null;
/**
* Database engine applicable to a parameter template
* @type {string || null}
*/
this.DBEngine = null;
/**
* Parameter template description
* @type {string || null}
*/
this.TemplateDescription = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.TemplateId = 'TemplateId' in params ? params.TemplateId : null;
this.TemplateName = 'TemplateName' in params ? params.TemplateName : null;
this.DBMajorVersion = 'DBMajorVersion' in params ? params.DBMajorVersion : null;
this.DBEngine = 'DBEngine' in params ? params.DBEngine : null;
this.TemplateDescription = 'TemplateDescription' in params ? params.TemplateDescription : null;
}
}
/**
* CreateDBInstanceNetworkAccess response structure.
* @class
*/
class CreateDBInstanceNetworkAccessResponse extends AbstractModel {
constructor(){
super();
/**
* Process ID. FlowId is equivalent to TaskId.
* @type {number || null}
*/
this.FlowId = null;
/**
* Task ID.
* @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.FlowId = 'FlowId' in params ? params.FlowId : null;
this.TaskId = 'TaskId' in params ? params.TaskId : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* DescribeAvailableRecoveryTime response structure.
* @class
*/
class DescribeAvailableRecoveryTimeResponse extends AbstractModel {
constructor(){
super();
/**
* The earliest restoration time (UTC+8).
* @type {string || null}
*/
this.RecoveryBeginTime = null;
/**
* The latest restoration time (UTC+8).
* @type {string || null}
*/
this.RecoveryEndTime = 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.RecoveryBeginTime = 'RecoveryBeginTime' in params ? params.RecoveryBeginTime : null;
this.RecoveryEndTime = 'RecoveryEndTime' in params ? params.RecoveryEndTime : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* CreateBaseBackup request structure.
* @class
*/
class CreateBaseBackupRequest extends AbstractModel {
constructor(){
super();
/**
* Instance ID. obtain through the api [DescribeDBInstances](https://www.tencentcloud.com/document/product/409/16773?lang=en).
* @type {string || null}
*/
this.DBInstanceId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.DBInstanceId = 'DBInstanceId' in params ? params.DBInstanceId : null;
}
}
/**
* ModifyDBInstanceReadOnlyGroup response structure.
* @class
*/
class ModifyDBInstanceReadOnlyGroupResponse extends AbstractModel {
constructor(){
super();
/**
* Process ID. FlowId is equivalent to TaskId.
* @type {number || null}
*/
this.FlowId = null;
/**
* Task ID.
* @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.FlowId = 'FlowId' in params ? params.FlowId : null;
this.TaskId = 'TaskId' in params ? params.TaskId : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* Database instance specification
* @class
*/
class ClassInfo extends AbstractModel {
constructor(){
super();
/**
* <p>Specification ID.</p>
* @type {string || null}
*/
this.SpecCode = null;
/**
* <p>CPU cores.</p>
* @type {number || null}
*/
this.CPU = null;
/**
* <p>Memory size, in MB.</p>
* @type {number || null}
*/
this.Memory = null;
/**
* <p>Maximum storage capacity supported by this specification, in GB.</p>
* @type {number || null}
*/
this.MaxStorage = null;
/**
* <p>Minimum storage capacity supported by this specification, in GB.</p>
* @type {number || null}
*/
this.MinStorage = null;
/**
* <p>Estimated QPS of the specification.</p>
* @type {number || null}
*/
this.QPS = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.SpecCode = 'SpecCode' in params ? params.SpecCode : null;
this.CPU = 'CPU' in params ? params.CPU : null;
this.Memory = 'Memory' in params ? params.Memory : null;
this.MaxStorage = 'MaxStorage' in params ? params.MaxStorage : null;
this.MinStorage = 'MinStorage' in params ? params.MinStorage : null;
this.QPS = 'QPS' in params ? params.QPS : null;
}
}
/**
* DescribeDBInstanceParameters response structure.
* @class
*/
class DescribeDBInstanceParametersResponse extends AbstractModel {
constructor(){
super();
/**
* Total number of the parameters in the returned list
* @type {number || null}
*/
this.TotalCount = null;
/**
* Details of the returned parameter list
* @type {Array.<ParamInfo> || null}
*/
this.Detail = 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.Detail) {
this.Detail = new Array();
for (let z in params.Detail) {
let obj = new ParamInfo();
obj.deserialize(params.Detail[z]);
this.Detail.push(obj);
}
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* DescribeDBInstanceSecurityGroups response structure.
* @class
*/
class DescribeDBInstanceSecurityGroupsResponse extends AbstractModel {
constructor(){
super();
/**
* Information of security groups in array
* @type {Array.<SecurityGroup> || null}
*/
this.SecurityGroupSet = 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;
}
if (params.SecurityGroupSet) {
this.SecurityGroupSet = new Array();
for (let z in params.SecurityGroupSet) {
let obj = new SecurityGroup();
obj.deserialize(params.SecurityGroupSet[z]);
this.SecurityGroupSet.push(obj);
}
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* Backup plan
* @class
*/
class BackupPlan extends AbstractModel {
constructor(){
super();
/**
* Backup cycle
* @type {string || null}
*/
this.BackupPeriod = null;
/**
* Specifies the data backup retention duration in days.
* @type {number || null}
*/
this.BaseBackupRetentionPeriod = null;
/**
* The earliest time to start a backup
* @type {string || null}
*/
this.MinBackupStartTime = null;
/**
* The latest time to start a backup
* @type {string || null}
*/
this.MaxBackupStartTime = null;
/**
* Backup plan ID.
* @type {string || null}
*/
this.PlanId = null;
/**
* Specifies the custom name of the backup plan.
* @type {string || null}
*/
this.PlanName = null;
/**
* Specifies the log backup retention period in days.
* @type {number || null}
*/
this.LogBackupRetentionPeriod = null;
/**
* Creation time.
* @type {string || null}
*/
this.CreatedTime = null;
/**
* Last modification time.
* @type {string || null}
*/
this.UpdatedTime = null;
/**
* Backup plan type. valid values: default (created by system), custom.
* @type {string || null}
*/
this.PlanType = null;
/**
* Backup cycle type. valid values: week, month.
* @type {string || null}
*/
this.BackupPeriodType = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.BackupPeriod = 'BackupPeriod' in params ? params.BackupPeriod : null;
this.BaseBackupRetentionPeriod = 'BaseBackupRetentionPeriod' in params ? params.BaseBackupRetentionPeriod : null;
this.MinBackupStartTime = 'MinBackupStartTime' in params ? params.MinBackupStartTime : null;
this.MaxBackupStartTime = 'MaxBackupStartTime' in params ? params.MaxBackupStartTime : null;
this.PlanId = 'PlanId' in params ? params.PlanId : null;
this.PlanName = 'PlanName' in params ? params.PlanName : null;
this.LogBackupRetentionPeriod = 'LogBackupRetentionPeriod' in params ? params.LogBackupRetentionPeriod : null;
this.CreatedTime = 'CreatedTime' in params ? params.CreatedTime : null;
this.UpdatedTime = 'UpdatedTime' in params ? params.UpdatedTime : null;
this.PlanType = 'PlanType' in params ? params.PlanType : null;
this.BackupPeriodType = 'BackupPeriodType' in params ? params.BackupPeriodType : null;
}
}
/**
* RestoreDBInstanceObjects response structure.
* @class
*/
class RestoreDBInstanceObjectsResponse extends AbstractModel {
constructor(){
super();
/**
* Task ID.
* @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.TaskId = 'TaskId' in params ? params.TaskId : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* ModifyDBInstanceDeletionProtection request structure.
* @class
*/
class ModifyDBInstanceDeletionProtectionRequest extends AbstractModel {
constructor(){
super();
/**
* Instance ID. can be obtained through the DescribeDBInstances api (https://www.tencentcloud.com/document/api/409/16773?from_cn_redirect=1).
* @type {string || null}
*/
this.DBInstanceId = null;
/**
* Specifies whether to enable instance deletion protection. valid values: true (enable), false (disable).
* @type {boolean || null}
*/
this.DeletionProtection = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.DBInstanceId = 'DBInstanceId' in params ? params.DBInstanceId : null;
this.DeletionProtection = 'DeletionProtec