tencentcloud-sdk-nodejs-intl-en
Version:
1,577 lines (1,336 loc) • 369 kB
JavaScript
/*
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
const AbstractModel = require("../../common/abstract_model");
/**
* CreateDBInstances request structure.
* @class
*/
class CreateDBInstancesRequest extends AbstractModel {
constructor(){
super();
/**
* Purchasable specification ID, which can be obtained through the `SpecCode` field in the returned value of the `DescribeClasses` API.
* @type {string || null}
*/
this.SpecCode = null;
/**
* Instance capacity size in GB.
* @type {number || null}
*/
this.Storage = null;
/**
* Number of instances purchased at a time. Value range: 1-100.
* @type {number || null}
*/
this.InstanceCount = null;
/**
* Length of purchase in months. Currently, only 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, and 36 are supported.
* @type {number || null}
*/
this.Period = null;
/**
* AZ ID, which can be obtained through the `Zone` field in the returned value of the `DescribeZones` API.
* @type {string || null}
*/
this.Zone = null;
/**
* Project ID.
* @type {number || null}
*/
this.ProjectId = null;
/**
* PostgreSQL community major version + minor version number.
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.
* @type {string || null}
*/
this.DBVersion = null;
/**
* Instance billing type.
* @type {string || null}
*/
this.InstanceChargeType = null;
/**
* Whether to automatically use vouchers. 1: yes, 0: no. Default value: no.
* @type {number || null}
*/
this.AutoVoucher = null;
/**
* Voucher ID list (only one voucher can be specified currently).
* @type {Array.<string> || null}
*/
this.VoucherIds = null;
/**
* VPC ID.
* @type {string || null}
*/
this.VpcId = null;
/**
* VPC subnet ID.
* @type {string || null}
*/
this.SubnetId = null;
/**
* Renewal flag. 0: normal renewal (default), 1: auto-renewal.
* @type {number || null}
*/
this.AutoRenewFlag = null;
/**
* Activity ID
* @type {number || null}
*/
this.ActivityId = null;
/**
* Instance name (which will be supported in the future)
* @type {string || null}
*/
this.Name = null;
/**
* Whether to support IPv6 address access. Valid values: 1 (yes), 0 (no)
* @type {number || null}
*/
this.NeedSupportIpv6 = null;
/**
* The information of tags to be associated with instances. This parameter is left empty by default.
* @type {Array.<Tag> || null}
*/
this.TagList = null;
/**
* Security group ID
* @type {Array.<string> || null}
*/
this.SecurityGroupIds = null;
/**
* The major version number of PostgreSQL (this parameter is currently required), and the version information can be obtained from [DescribeDBVersions](https://intl.cloud.tencent.com/document/api/409/89018?from_cn_redirect=1). Currently major versions `10`, `11`, `12`, `13`, `14`, and `15` are supported. For details, see [Kernel Version Overview](https://intl.cloud.tencent.com/document/product/409/67018).
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.
* @type {string || null}
*/
this.DBMajorVersion = null;
/**
* PostgreSQL kernel version number.
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.
* @type {string || null}
*/
this.DBKernelVersion = 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.Zone = 'Zone' in params ? params.Zone : null;
this.ProjectId = 'ProjectId' in params ? params.ProjectId : null;
this.DBVersion = 'DBVersion' in params ? params.DBVersion : null;
this.InstanceChargeType = 'InstanceChargeType' in params ? params.InstanceChargeType : null;
this.AutoVoucher = 'AutoVoucher' in params ? params.AutoVoucher : null;
this.VoucherIds = 'VoucherIds' in params ? params.VoucherIds : null;
this.VpcId = 'VpcId' in params ? params.VpcId : null;
this.SubnetId = 'SubnetId' in params ? params.SubnetId : null;
this.AutoRenewFlag = 'AutoRenewFlag' in params ? params.AutoRenewFlag : null;
this.ActivityId = 'ActivityId' in params ? params.ActivityId : null;
this.Name = 'Name' in params ? params.Name : null;
this.NeedSupportIpv6 = 'NeedSupportIpv6' in params ? params.NeedSupportIpv6 : 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.DBMajorVersion = 'DBMajorVersion' in params ? params.DBMajorVersion : null;
this.DBKernelVersion = 'DBKernelVersion' in params ? params.DBKernelVersion : null;
}
}
/**
* SetAutoRenewFlag request structure.
* @class
*/
class SetAutoRenewFlagRequest extends AbstractModel {
constructor(){
super();
/**
* List of instance IDs. Note that currently you cannot manipulate multiple instances at the same time. Only one instance ID can be passed in here.
* @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;
}
}
/**
* DescribeDatabases request structure.
* @class
*/
class DescribeDatabasesRequest extends AbstractModel {
constructor(){
super();
/**
* Instance ID
* @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
* @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 in the format of postgres-4wdeb0zv.
* @type {string || null}
*/
this.DBInstanceId = null;
/**
* Query start time in the format of 2018-06-10 17:06:38, which cannot be more 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;
/**
* Page number for data return in paged query. Pagination starts from 0
* @type {number || null}
*/
this.Offset = null;
/**
* Number of entries returned per page in paged query. 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;
}
}
/**
* CreateReadOnlyGroupNetworkAccess request structure.
* @class
*/
class CreateReadOnlyGroupNetworkAccessRequest extends AbstractModel {
constructor(){
super();
/**
* RO group ID in the format of pgro-4t9c6g7k.
* @type {string || null}
*/
this.ReadOnlyGroupId = null;
/**
* Unified VPC ID.
* @type {string || null}
*/
this.VpcId = null;
/**
* Subnet ID.
* @type {string || null}
*/
this.SubnetId = null;
/**
* Whether to manually assign the VIP. Valid values: `true` (manually assign), `false` (automatically assign).
* @type {boolean || null}
*/
this.IsAssignVip = null;
/**
* Target VIP.
* @type {string || null}
*/
this.Vip = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.ReadOnlyGroupId = 'ReadOnlyGroupId' in params ? params.ReadOnlyGroupId : null;
this.VpcId = 'VpcId' in params ? params.VpcId : null;
this.SubnetId = 'SubnetId' in params ? params.SubnetId : null;
this.IsAssignVip = 'IsAssignVip' in params ? params.IsAssignVip : null;
this.Vip = 'Vip' in params ? params.Vip : null;
}
}
/**
* DescribeAccounts request structure.
* @class
*/
class DescribeAccountsRequest extends AbstractModel {
constructor(){
super();
/**
* Instance ID in the format of postgres-6fego161
* @type {string || null}
*/
this.DBInstanceId = null;
/**
* Number of entries returned per page. Default value: 10. Value range: 1–100.
* @type {number || null}
*/
this.Limit = null;
/**
* Data offset, which starts from 0.
* @type {number || null}
*/
this.Offset = null;
/**
* Whether to sort by creation time or username. Valid values: `createTime` (sort by creation time), `name` (sort by username)
* @type {string || null}
*/
this.OrderBy = null;
/**
* Whether returns are sorted in ascending or descending order. Valid values: `desc` (descending), `asc` (ascending)
* @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();
/**
* Task ID
Note: this field may return `null`, indicating that no valid values can be obtained.
* @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();
/**
* Instance ID in the format of postgres-hez4fh0v
* @type {string || null}
*/
this.DBInstanceId = null;
/**
* Whether to enable public network access over IPv6 address. Valid values: 1 (yes), 0 (no)
* @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();
/**
* Primary AZ of the instance in the format of `ap-guangzhou-3`. To support multiple AZs, add information of the primary and standby AZs in the `DBNodeSet.N` field.
The information of AZ can be obtained from the `Zone` field in the return value of the [DescribeZones](https://intl.cloud.tencent.com/document/api/409/16769?from_cn_redirect=1) API.
* @type {string || null}
*/
this.Zone = null;
/**
* Purchasable code, which can be obtained from the `SpecCode` field in the return value of the [DescribeClasses](https://intl.cloud.tencent.com/document/api/409/89019?from_cn_redirect=1) API.
* @type {string || null}
*/
this.SpecCode = null;
/**
* Instance storage capacity in GB
* @type {number || null}
*/
this.Storage = null;
/**
* The number of instances to be purchased at a time. Value range: 1-10. To purchase more than 10 instances each time, you can make multiple calls.
* @type {number || null}
*/
this.InstanceCount = null;
/**
* Purchase duration, in months.
<li>Prepaid: Supports `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, `12`, `24`, and `36`.</li>
<li>Pay-as-you-go: Only supports `1`.</li>
* @type {number || null}
*/
this.Period = null;
/**
* Instance character set, which currently supports only:
<li>UTF8</li>
<li>LATIN1</li>
* @type {string || null}
*/
this.Charset = null;
/**
* Username of the instance root account, with the following specifications:
<li>The username must consist of 1-16 characters, which can be letters, digits, or underscores.</li>
<li>It cannot be postgres.</li>
<li>It cannot start with digits or 'pg_'.</li>
<li>All rules are case-insensitive.</li>
* @type {string || null}
*/
this.AdminName = null;
/**
* 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 "/".
It must include the following four types of characters:
<li>Lowercase letters: [a ~ z]</li>
<li>Uppercase letters: [A ~ Z]</li>
<li>Digits: 0-9</li>
<li>Special symbols: ()`~!@#$%^&*-+=_|{}[]:;'<>,.?/</li>
* @type {string || null}
*/
this.AdminPassword = null;
/**
* The major version number of PostgreSQL (this parameter is currently required), and the version information can be obtained from [DescribeDBVersions](https://intl.cloud.tencent.com/document/api/409/89018?from_cn_redirect=1). Currently major versions `10`, `11`, `12`, `13`, `14`, and `15` are supported. For details, see [Kernel Version Overview](https://intl.cloud.tencent.com/document/product/409/67018).
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.
* @type {string || null}
*/
this.DBMajorVersion = null;
/**
* PostgreSQL community major version + minor version number.
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.
* @type {string || null}
*/
this.DBVersion = null;
/**
* PostgreSQL kernel version number.
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.
* @type {string || null}
*/
this.DBKernelVersion = null;
/**
* Instance billing type, which currently supports:
<li>PREPAID: Prepaid, i.e., monthly subscription</li>
<li>POSTPAID_BY_HOUR: Pay-as-you-go, i.e., pay by consumption</li>
Default value: PREPAID
* @type {string || null}
*/
this.InstanceChargeType = null;
/**
* VPC ID, in the format of vpc-xxxxxxxx (this parameter is currently required). A valid VpcId can be obtained by logging into the console; it can also be obtained from the unVpcId field in the return value of calling of the [DescribeVpcEx](https://intl.cloud.tencent.com/document/api/215/1372?from_cn_redirect=1) API.
* @type {string || null}
*/
this.VpcId = null;
/**
* VPC subnet ID, in the format of subnet-xxxxxxxx (this parameter is currently required). A valid VPC subnet ID can be obtained by logging into the console; it can also be obtained from the unSubnetId field in the return value of calling of the [DescribeSubnets](https://intl.cloud.tencent.com/document/api/215/15784?from_cn_redirect=1) API.
* @type {string || null}
*/
this.SubnetId = null;
/**
* Deployment information of the instance node, which will display the information of each AZ when the instance node is deployed across multiple AZs.
The information of AZ can be obtained from the `Zone` field in the return value of the [DescribeZones](https://intl.cloud.tencent.com/document/api/409/16769?from_cn_redirect=1) API.
* @type {Array.<DBNode> || null}
*/
this.DBNodeSet = null;
/**
* Renewal Flag:
<li>`0`: manual renewal</li>
<li>`1`: auto-renewal</li>
Default value: 0
* @type {number || null}
*/
this.AutoRenewFlag = null;
/**
* Whether to automatically use coupons:
<li>`0`: no</li>
<li>`1`: yes</li>
Default value: 0
* @type {number || null}
*/
this.AutoVoucher = null;
/**
* Voucher ID list. Currently, you can specify only one voucher.
* @type {Array.<string> || null}
*/
this.VoucherIds = null;
/**
* Project ID
* @type {number || null}
*/
this.ProjectId = null;
/**
* Campaign ID
* @type {number || null}
*/
this.ActivityId = null;
/**
* Instance name, which can contain up to 60 letters, digits, hyphens, and symbols (_-). If this parameter is not specified, "Unnamed" will be displayed by default.
* @type {string || null}
*/
this.Name = null;
/**
* The information of tags to be bound with the instance, which is left empty by default. This parameter can be obtained from the `Tags` field in the return value of the [DescribeTags](https://intl.cloud.tencent.com/document/api/651/35316?from_cn_redirect=1) API.
* @type {Array.<Tag> || null}
*/
this.TagList = null;
/**
* Security group of the instance, which can be obtained from the `sgld` field in the return value of the [DescribeSecurityGroups](https://intl.cloud.tencent.com/document/api/215/15808?from_cn_redirect=1) API. If this parameter is not specified, the default security group will be bound.
* @type {Array.<string> || null}
*/
this.SecurityGroupIds = null;
/**
* Whether data transparent encryption is required:
<li>`0`: no</li>
<li>`1`: yes</li>
Default value: 0See [Overview of Data Transparent Encryption](https://intl.cloud.tencent.com/document/product/409/71748?from_cn_redirect=1).
* @type {number || null}
*/
this.NeedSupportTDE = null;
/**
* KeyId of custom key, which is required if you select custom key encryption. It is also the unique CMK identifier.
For more information on creating `KeyId`, see [Enabling TDE](https://www.tencentcloud.com/document/product/409/47762).
* @type {string || null}
*/
this.KMSKeyId = null;
/**
* The region where the KMS service is enabled. When `KMSRegion` is left empty, the current region will be selected by default. If the current region does not support KMS, you must select another region that does.
For more information on `KMSRegion`, see [Enabling TDE](https://intl.cloud.tencent.com/document/product/409/71749?from_cn_redirect=1).
* @type {string || null}
*/
this.KMSRegion = null;
/**
* Database engine, which supports:
<li>`postgresql`: TencentDB for PostgreSQL</li>
<li>`mssql_compatible`: MSSQL compatible - TencentDB for PostgreSQL</li>
Default value: `postgresql`
* @type {string || null}
*/
this.DBEngine = null;
/**
* Configuration information for the database engine, and the configuration format is as follows:
{"$key1":"$value1", "$key2":"$value2"}
Supported engines include:
mssql_compatible engine:
<li>migrationMode: Database mode, an optional parameter, and its valid values are: single-db (single database schema) and multi-db (multiple database schema). The default value is single-db.</li>
<li>defaultLocale: Sorting area rule, an optional parameter, which cannot be modified after initialization, its default value is en_US, and its 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", and "vi_VN".</li>
<li>serverCollationName: Sorting rule name, an optional parameter, which cannot be modified after initialization, its default value is sql_latin1_general_cp1_ci_as, and its 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", and "vietnamese_ci_as".</li>
* @type {string || null}
*/
this.DBEngineConfig = null;
/**
* Primary-standby sync mode, which supports:
<li>Semi-sync: Semi-sync</li>
<li>Async: Asynchronous</li>
Default value for the primary instance: Semi-sync
Default value for the read-only instance: Async
* @type {string || null}
*/
this.SyncMode = null;
/**
* Whether support to IPv6 is required:
<li>`0`: no</li>
<li>`1`: yes</li>
Default value: 0
* @type {number || null}
*/
this.NeedSupportIpv6 = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Zone = 'Zone' in params ? params.Zone : null;
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.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.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;
}
}
/**
* Specification description
* @class
*/
class SpecItemInfo extends AbstractModel {
constructor(){
super();
/**
* Specification ID
* @type {string || null}
*/
this.SpecCode = null;
/**
* PostgerSQL version number
* @type {string || null}
*/
this.Version = null;
/**
* Full version name corresponding to kernel number
* @type {string || null}
*/
this.VersionName = null;
/**
* Number of CPU cores
* @type {number || null}
*/
this.Cpu = null;
/**
* Memory size in MB
* @type {number || null}
*/
this.Memory = null;
/**
* Maximum storage capacity in GB supported by this specification
* @type {number || null}
*/
this.MaxStorage = null;
/**
* Minimum storage capacity in GB supported by this specification
* @type {number || null}
*/
this.MinStorage = null;
/**
* Estimated QPS for this specification
* @type {number || null}
*/
this.Qps = null;
/**
* (Disused)
* @type {number || null}
*/
this.Pid = null;
/**
* Machine type
* @type {string || null}
*/
this.Type = null;
/**
* PostgreSQL major version number
Note: this field may return `null`, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.MajorVersion = null;
/**
* PostgreSQL kernel version number
Note: this field may return `null`, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.KernelVersion = null;
/**
* Whether TDE data encryption is supported. Valid values: 0 (no), 1 (yes)
Note: This field may return `null`, indicating that no valid value was found.
* @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;
}
}
/**
* 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();
/**
* Task ID.
Note: This field may return `null`, indicating that no valid values can be obtained.
* @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;
}
}
/**
* 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
* @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();
/**
* Task 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;
}
}
/**
* Database instance specification
* @class
*/
class ClassInfo extends AbstractModel {
constructor(){
super();
/**
* Specification ID
* @type {string || null}
*/
this.SpecCode = null;
/**
* Number of CPU cores
* @type {number || null}
*/
this.CPU = null;
/**
* Memory size in MB
* @type {number || null}
*/
this.Memory = null;
/**
* Maximum storage capacity in GB supported by this specification
* @type {number || null}
*/
this.MaxStorage = null;
/**
* Minimum storage capacity in GB supported by this specification
* @type {number || null}
*/
this.MinStorage = null;
/**
* Estimated QPS for this specification
* @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;
}
}
/**
* DescribeCloneDBInstanceSpec request structure.
* @class
*/
class DescribeCloneDBInstanceSpecRequest extends AbstractModel {
constructor(){
super();
/**
* Instance ID.
* @type {string || null}
*/
this.DBInstanceId = null;
/**
* Basic backup set ID. Either this parameter or `RecoveryTargetTime` must be passed in. If both are passed in, only this parameter takes effect.
* @type {string || null}
*/
this.BackupSetId = null;
/**
* Restoration time (UTC+8). Either this parameter or `BackupSetId` must be passed in.
* @type {string || null}
*/
this.RecoveryTargetTime = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.DBInstanceId = 'DBInstanceId' in params ? params.DBInstanceId : null;
this.BackupSetId = 'BackupSetId' in params ? params.BackupSetId : null;
this.RecoveryTargetTime = 'RecoveryTargetTime' in params ? params.RecoveryTargetTime : 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;
/**
* Data backup retention duration
* @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;
}
/**
* @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;
}
}
/**
* RestoreDBInstanceObjects response structure.
* @class
*/
class RestoreDBInstanceObjectsResponse 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;
}
}
/**
* SwitchDBInstancePrimary request structure.
* @class
*/
class SwitchDBInstancePrimaryRequest extends AbstractModel {
constructor(){
super();
/**
* Instance ID
* @type {string || null}
*/
this.DBInstanceId = null;
/**
* Whether to perform forced switch. As long as the standby node can be accessed, the switch will be performed regardless of the primary-standby sync delay. You can switch immediately only when `SwitchTag` is `0.
<li>Default: `false`.
* @type {boolean || null}
*/
this.Force = null;
/**
* Switch time for the specified instance after configuration modification.
<li>`0`: Switch now.
<li>`1`: Switch at the specified time.
<li>`2`: Switch in the maintenance time.
<li>Default value: `0`.
* @type {number || null}
*/
this.SwitchTag = null;
/**
* The earliest time to start a switch in the format of "HH:MM:SS", such as "01:00:00". This parameter is invalid when `SwitchTag` is `0` or `2`.
* @type {string || null}
*/
this.SwitchStartTime = null;
/**
* The latest time to start a switch in the format of "HH:MM:SS", such as "01:30:00". This parameter is invalid when `SwitchTag` is `0` or `2`. The difference between `SwitchStartTime` and `SwitchEndTime` cannot be less than 30 minutes.
* @type {string || null}
*/
this.SwitchEndTime = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.DBInstanceId = 'DBInstanceId' in params ? params.DBInstanceId : null;
this.Force = 'Force' in params ? params.Force : null;
this.SwitchTag = 'SwitchTag' in params ? params.SwitchTag : null;
this.SwitchStartTime = 'SwitchStartTime' in params ? params.SwitchStartTime : null;
this.SwitchEndTime = 'SwitchEndTime' in params ? params.SwitchEndTime : null;
}
}
/**
* OpenServerlessDBExtranetAccess request structure.
* @class
*/
class OpenServerlessDBExtranetAccessRequest extends AbstractModel {
constructor(){
super();
/**
* Unique ID of an instance
* @type {string || null}
*/
this.DBInstanceId = null;
/**
* Instance name
* @type {string || null}
*/
this.DBInstanceName = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.DBInstanceId = 'DBInstanceId' in params ? params.DBInstanceId : null;
this.DBInstanceName = 'DBInstanceName' in params ? params.DBInstanceName : null;
}
}
/**
* RenewInstance response structure.
* @class
*/
class RenewInstanceResponse extends AbstractModel {
constructor(){
super();
/**
* Order name
* @type {string || null}
*/
this.DealName = 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.DealName = 'DealName' in params ? params.DealName : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* DeleteServerlessDBInstance response structure.
* @class
*/
class DeleteServerlessDBInstanceResponse 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;
}
}
/**
* DeleteLogBackup response structure.
* @class
*/
class DeleteLogBackupResponse 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;
}
}
/**
* ModifyReadOnlyGroupConfig request structure.
* @class
*/
class ModifyReadOnlyGroupConfigRequest extends AbstractModel {
constructor(){
super();
/**
* RO group ID
* @type {string || null}
*/
this.ReadOnlyGroupId = null;
/**
* RO group name
* @type {string || null}
*/
this.ReadOnlyGroupName = null;
/**
* Whether to remove a read-only replica from an RO group if the delay between the read-only replica and the primary instance exceeds the threshold. Valid values: `0` (no), `1` (yes).
* @type {number || null}
*/
this.ReplayLagEliminate = null;
/**
* Whether to remove a read-only replica from an RO group if the sync log size difference between the read-only replica and the primary instance exceeds the threshold. Valid values: `0` (no), `1` (yes).
* @type {number || null}
*/
this.ReplayLatencyEliminate = null;
/**
* Delayed log