UNPKG

tencentcloud-sdk-nodejs-intl-en

Version:
1,884 lines (1,579 loc) 212 kB
/* * Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ const AbstractModel = require("../../common/abstract_model"); /** * CreateDBInstance request structure. * @class */ class CreateDBInstanceRequest extends AbstractModel { constructor(){ super(); /** * AZs to deploy instance nodes. You can specify up to two AZs (one as primary AZ and another as replica AZ). When the shard specification is 1-primary-2-replica, the primary and one of the replicas are deployed in the primary AZ. * @type {Array.<string> || null} */ this.Zones = null; /** * Number of nodes, which can be obtained by querying the instance specification through the `DescribeDBInstanceSpecs` API. * @type {number || null} */ this.NodeCount = null; /** * Memory size in GB, which can be obtained by querying the instance specification through the `DescribeDBInstanceSpecs` API. * @type {number || null} */ this.Memory = null; /** * Storage capacity in GB. The maximum and minimum storage space can be obtained by querying instance specification through the `DescribeDBInstanceSpecs` API. * @type {number || null} */ this.Storage = null; /** * Validity period in months * @type {number || null} */ this.Period = null; /** * The number of instances to be purchased. Only one instance is queried for price by default. * @type {number || null} */ this.Count = null; /** * Whether to automatically use vouchers. This option is disabled by default. * @type {boolean || null} */ this.AutoVoucher = null; /** * Voucher ID list. Currently, you can specify only one voucher. * @type {Array.<string> || null} */ this.VoucherIds = null; /** * VPC ID. If this parameter is not passed in, the instance will be created on the classic network. * @type {string || null} */ this.VpcId = null; /** * VPC subnet ID, which is required when `VpcId` is specified. * @type {string || null} */ this.SubnetId = null; /** * Project ID, which can be obtained through the `DescribeProjects` API. If this parameter is not passed in, the instance will be associated with the default project. * @type {number || null} */ this.ProjectId = null; /** * Database engine version. Valid values: `5.7`, `8.0`, `10.0`, `10.1`. * @type {string || null} */ this.DbVersionId = null; /** * Name of the instance, which can be customized. * @type {string || null} */ this.InstanceName = null; /** * List of security group IDs * @type {Array.<string> || null} */ this.SecurityGroupIds = null; /** * Auto-renewal flag. Valid values: `1` (auto-renewal), `2` (no renewal upon expiration). * @type {number || null} */ this.AutoRenewFlag = null; /** * Whether IPv6 is supported. Valid values: `0` (unsupported), `1` (supported). * @type {number || null} */ this.Ipv6Flag = null; /** * Array of tag key-value pairs * @type {Array.<ResourceTag> || null} */ this.ResourceTags = null; /** * List of parameters. Valid values: `character_set_server` (character set; required); `lower_case_table_names` (table name case sensitivity; required; `0`: case-sensitive; `1`: case-insensitive); `innodb_page_size` (InnoDB data page size; default size: 16 KB); `sync_mode` (sync mode; `0`: async; `1`: strong sync; `2`: downgradable strong sync; default value: `2`). * @type {Array.<DBParamValue> || null} */ this.InitParams = null; /** * DCN source region * @type {string || null} */ this.DcnRegion = null; /** * DCN source instance ID * @type {string || null} */ this.DcnInstanceId = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.Zones = 'Zones' in params ? params.Zones : null; this.NodeCount = 'NodeCount' in params ? params.NodeCount : null; this.Memory = 'Memory' in params ? params.Memory : null; this.Storage = 'Storage' in params ? params.Storage : null; this.Period = 'Period' in params ? params.Period : null; this.Count = 'Count' in params ? params.Count : 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.ProjectId = 'ProjectId' in params ? params.ProjectId : null; this.DbVersionId = 'DbVersionId' in params ? params.DbVersionId : null; this.InstanceName = 'InstanceName' in params ? params.InstanceName : null; this.SecurityGroupIds = 'SecurityGroupIds' in params ? params.SecurityGroupIds : null; this.AutoRenewFlag = 'AutoRenewFlag' in params ? params.AutoRenewFlag : null; this.Ipv6Flag = 'Ipv6Flag' in params ? params.Ipv6Flag : null; if (params.ResourceTags) { this.ResourceTags = new Array(); for (let z in params.ResourceTags) { let obj = new ResourceTag(); obj.deserialize(params.ResourceTags[z]); this.ResourceTags.push(obj); } } if (params.InitParams) { this.InitParams = new Array(); for (let z in params.InitParams) { let obj = new DBParamValue(); obj.deserialize(params.InitParams[z]); this.InitParams.push(obj); } } this.DcnRegion = 'DcnRegion' in params ? params.DcnRegion : null; this.DcnInstanceId = 'DcnInstanceId' in params ? params.DcnInstanceId : null; } } /** * DescribeDBTmpInstances request structure. * @class */ class DescribeDBTmpInstancesRequest 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; } } /** * DescribeAccountPrivileges response structure. * @class */ class DescribeAccountPrivilegesResponse extends AbstractModel { constructor(){ super(); /** * Instance ID * @type {string || null} */ this.InstanceId = null; /** * Permission list. * @type {Array.<string> || null} */ this.Privileges = null; /** * Database account username * @type {string || null} */ this.UserName = null; /** * Database account host * @type {string || null} */ this.Host = 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.InstanceId = 'InstanceId' in params ? params.InstanceId : null; this.Privileges = 'Privileges' in params ? params.Privileges : null; this.UserName = 'UserName' in params ? params.UserName : null; this.Host = 'Host' in params ? params.Host : null; this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * DescribeDatabases request structure. * @class */ class DescribeDatabasesRequest extends AbstractModel { constructor(){ super(); /** * Instance ID in the format of `dcdbt-ow7t8lmc`. * @type {string || null} */ this.InstanceId = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.InstanceId = 'InstanceId' in params ? params.InstanceId : null; } } /** * Database parameter description * @class */ class ParamDesc extends AbstractModel { constructor(){ super(); /** * Parameter name * @type {string || null} */ this.Param = null; /** * Current parameter value * @type {string || null} */ this.Value = null; /** * Previously set value, which is the same as `value` after the parameter takes effect. Note: This field may return null, indicating that no valid values can be obtained. * @type {string || null} */ this.SetValue = null; /** * Default value * @type {string || null} */ this.Default = null; /** * Parameter constraint * @type {ParamConstraint || null} */ this.Constraint = null; /** * Whether a value has been set. false: no, true: yes * @type {boolean || null} */ this.HaveSetValue = null; /** * Whether restart is required. false: no; true: yes. * @type {boolean || null} */ this.NeedRestart = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.Param = 'Param' in params ? params.Param : null; this.Value = 'Value' in params ? params.Value : null; this.SetValue = 'SetValue' in params ? params.SetValue : null; this.Default = 'Default' in params ? params.Default : null; if (params.Constraint) { let obj = new ParamConstraint(); obj.deserialize(params.Constraint) this.Constraint = obj; } this.HaveSetValue = 'HaveSetValue' in params ? params.HaveSetValue : null; this.NeedRestart = 'NeedRestart' in params ? params.NeedRestart : null; } } /** * DescribeDBParameters request structure. * @class */ class DescribeDBParametersRequest extends AbstractModel { constructor(){ super(); /** * Instance ID in the format of `tdsql-ow728lmc`. * @type {string || null} */ this.InstanceId = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.InstanceId = 'InstanceId' in params ? params.InstanceId : null; } } /** * DescribeAccounts request structure. * @class */ class DescribeAccountsRequest extends AbstractModel { constructor(){ super(); /** * Instance ID in the form of `tdsql-ow728lmc`, which can be obtained by querying the instance details through `DescribeDBInstances`. * @type {string || null} */ this.InstanceId = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.InstanceId = 'InstanceId' in params ? params.InstanceId : null; } } /** * ModifyInstanceNetwork response structure. * @class */ class ModifyInstanceNetworkResponse extends AbstractModel { constructor(){ super(); /** * Async task ID, which can be used to query the task status through `DescribeFlow` API. * @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; } } /** * ModifyInstanceVport response structure. * @class */ class ModifyInstanceVportResponse 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; } } /** * DestroyHourDBInstance request structure. * @class */ class DestroyHourDBInstanceRequest extends AbstractModel { constructor(){ super(); /** * Instance ID in the format of tdsql-avw0207d. It is the same as the instance ID displayed in the TencentDB console. * @type {string || null} */ this.InstanceId = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.InstanceId = 'InstanceId' in params ? params.InstanceId : null; } } /** * ModifyInstanceVip response structure. * @class */ class ModifyInstanceVipResponse extends AbstractModel { constructor(){ super(); /** * Async task flow 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; } } /** * AssociateSecurityGroups request structure. * @class */ class AssociateSecurityGroupsRequest extends AbstractModel { constructor(){ super(); /** * Database engine name. Valid value: `mariadb`. * @type {string || null} */ this.Product = null; /** * ID of the security group to be associated in the format of sg-efil73jd. * @type {string || null} */ this.SecurityGroupId = null; /** * ID(s) of the instance(s) to be associated in the format of tdsql-lesecurk. You can specify multiple instances. * @type {Array.<string> || null} */ this.InstanceIds = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.Product = 'Product' in params ? params.Product : null; this.SecurityGroupId = 'SecurityGroupId' in params ? params.SecurityGroupId : null; this.InstanceIds = 'InstanceIds' in params ? params.InstanceIds : null; } } /** * DescribeDBSecurityGroups response structure. * @class */ class DescribeDBSecurityGroupsResponse extends AbstractModel { constructor(){ super(); /** * Security group details * @type {Array.<SecurityGroup> || null} */ this.Groups = null; /** * Instance VIP Note: this field may return `null`, indicating that no valid values can be obtained. * @type {string || null} */ this.VIP = null; /** * Instance port Note: this field may return `null`, indicating that no valid values can be obtained. * @type {string || null} */ this.VPort = 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.Groups) { this.Groups = new Array(); for (let z in params.Groups) { let obj = new SecurityGroup(); obj.deserialize(params.Groups[z]); this.Groups.push(obj); } } this.VIP = 'VIP' in params ? params.VIP : null; this.VPort = 'VPort' in params ? params.VPort : null; this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * CancelDcnJob response structure. * @class */ class CancelDcnJobResponse 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; } } /** * DescribeFileDownloadUrl request structure. * @class */ class DescribeFileDownloadUrlRequest extends AbstractModel { constructor(){ super(); /** * Instance ID * @type {string || null} */ this.InstanceId = null; /** * Unsigned file path * @type {string || null} */ this.FilePath = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.InstanceId = 'InstanceId' in params ? params.InstanceId : null; this.FilePath = 'FilePath' in params ? params.FilePath : null; } } /** * DestroyHourDBInstance response structure. * @class */ class DestroyHourDBInstanceResponse extends AbstractModel { constructor(){ super(); /** * Async task ID, which can be used in the [DescribeFlow](https://intl.cloud.tencent.com/document/product/237/16177?from_cn_redirect=1) API to query the async task result. * @type {number || null} */ this.FlowId = null; /** * Instance ID, which is the same as the request parameter `InstanceId`. * @type {string || null} */ this.InstanceId = 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.InstanceId = 'InstanceId' in params ? params.InstanceId : null; this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * TencentDB account information * @class */ class Account extends AbstractModel { constructor(){ super(); /** * Account name * @type {string || null} */ this.User = null; /** * Host address * @type {string || null} */ this.Host = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.User = 'User' in params ? params.User : null; this.Host = 'Host' in params ? params.Host : null; } } /** * DescribeProjectSecurityGroups request structure. * @class */ class DescribeProjectSecurityGroupsRequest extends AbstractModel { constructor(){ super(); /** * Database engine name. Valid value: `mariadb`. * @type {string || null} */ this.Product = null; /** * Project ID * @type {number || null} */ this.ProjectId = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.Product = 'Product' in params ? params.Product : null; this.ProjectId = 'ProjectId' in params ? params.ProjectId : null; } } /** * DescribeDBSlowLogs request structure. * @class */ class DescribeDBSlowLogsRequest extends AbstractModel { constructor(){ super(); /** * Instance ID in the format of `tdsql-ow728lmc`. * @type {string || null} */ this.InstanceId = null; /** * Data entry number starting from which to return results * @type {number || null} */ this.Offset = null; /** * Number of results to be returned * @type {number || null} */ this.Limit = null; /** * Query start time in the format of 2016-07-23 14:55:20 * @type {string || null} */ this.StartTime = null; /** * Query end time in the format of 2016-08-22 14:55:20 * @type {string || null} */ this.EndTime = null; /** * Specific name of the database to be queried * @type {string || null} */ this.Db = null; /** * Sorting metric. Valid values: query_time_sum, query_count * @type {string || null} */ this.OrderBy = null; /** * Sorting order. Valid values: desc, asc * @type {string || null} */ this.OrderByType = null; /** * Query slow queries from either the primary or the replica. Valid values: 0 (primary), 1 (replica) * @type {number || null} */ this.Slave = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.InstanceId = 'InstanceId' in params ? params.InstanceId : null; this.Offset = 'Offset' in params ? params.Offset : null; this.Limit = 'Limit' in params ? params.Limit : null; this.StartTime = 'StartTime' in params ? params.StartTime : null; this.EndTime = 'EndTime' in params ? params.EndTime : null; this.Db = 'Db' in params ? params.Db : null; this.OrderBy = 'OrderBy' in params ? params.OrderBy : null; this.OrderByType = 'OrderByType' in params ? params.OrderByType : null; this.Slave = 'Slave' in params ? params.Slave : null; } } /** * CreateAccount request structure. * @class */ class CreateAccountRequest extends AbstractModel { constructor(){ super(); /** * Instance ID, which is in the format of `tdsql-ow728lmc` and can be obtained through the `DescribeDBInstances` API. * @type {string || null} */ this.InstanceId = null; /** * Login username, which can contain 1-32 letters, digits, underscores, and hyphens. * @type {string || null} */ this.UserName = null; /** * Host that can be logged in to, which is in the same format as the host of the MySQL account and supports wildcards, such as %, 10.%, and 10.20.%. * @type {string || null} */ this.Host = null; /** * Account password. It must contain 8-32 characters in all of the following four types: lowercase letters, uppercase letters, digits, and symbols (()~!@#$%^&*-+=_|{}[]:<>,.?/), and cannot start with a slash (/). * @type {string || null} */ this.Password = null; /** * Whether to create a read-only account. 0: no; 1: for the account's SQL requests, the secondary will be used first, and if it is unavailable, the primary will be used; 2: the secondary will be used first, and if it is unavailable, the operation will fail. * @type {number || null} */ this.ReadOnly = null; /** * Account remarks, which can contain 0-256 letters, digits, and common symbols. * @type {string || null} */ this.Description = null; /** * Determines whether the secondary is unavailable based on the passed-in time * @type {number || null} */ this.DelayThresh = null; /** * Whether to specify a replica server for read-only account. Valid values: `0` (No replica server is specified, which means that the proxy will select another available replica server to keep connection with the client if the current replica server doesn’t meet the requirement). `1` (The replica server is specified, which means that the connection will be disconnected if the specified replica server doesn’t meet the requirement.) * @type {number || null} */ this.SlaveConst = null; /** * Maximum number of connections. If left empty or `0` is passed in, the connections will be unlimited. This parameter configuration is not supported for kernel version 10.1. * @type {number || null} */ this.MaxUserConnections = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.InstanceId = 'InstanceId' in params ? params.InstanceId : null; this.UserName = 'UserName' in params ? params.UserName : null; this.Host = 'Host' in params ? params.Host : null; this.Password = 'Password' in params ? params.Password : null; this.ReadOnly = 'ReadOnly' in params ? params.ReadOnly : null; this.Description = 'Description' in params ? params.Description : null; this.DelayThresh = 'DelayThresh' in params ? params.DelayThresh : null; this.SlaveConst = 'SlaveConst' in params ? params.SlaveConst : null; this.MaxUserConnections = 'MaxUserConnections' in params ? params.MaxUserConnections : null; } } /** * DescribeDBParameters response structure. * @class */ class DescribeDBParametersResponse extends AbstractModel { constructor(){ super(); /** * Instance ID in the format of `tdsql-ow728lmc`. * @type {string || null} */ this.InstanceId = null; /** * Requests the current parameter values of the database * @type {Array.<ParamDesc> || null} */ this.Params = 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.InstanceId = 'InstanceId' in params ? params.InstanceId : null; if (params.Params) { this.Params = new Array(); for (let z in params.Params) { let obj = new ParamDesc(); obj.deserialize(params.Params[z]); this.Params.push(obj); } } this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * IsolateDBInstance response structure. * @class */ class IsolateDBInstanceResponse extends AbstractModel { constructor(){ super(); /** * IDs of isolated instances * @type {Array.<string> || null} */ this.SuccessInstanceIds = null; /** * IDs of instances failed to be isolated * @type {Array.<string> || null} */ this.FailedInstanceIds = 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.SuccessInstanceIds = 'SuccessInstanceIds' in params ? params.SuccessInstanceIds : null; this.FailedInstanceIds = 'FailedInstanceIds' in params ? params.FailedInstanceIds : null; this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * DescribeDatabaseTable request structure. * @class */ class DescribeDatabaseTableRequest extends AbstractModel { constructor(){ super(); /** * Instance ID in the format of `dcdbt-ow7t8lmc`. * @type {string || null} */ this.InstanceId = null; /** * Database name, which can be obtained through the `DescribeDatabases` API. * @type {string || null} */ this.DbName = null; /** * Table name, which can be obtained through the `DescribeDatabaseObjects` API. * @type {string || null} */ this.Table = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.InstanceId = 'InstanceId' in params ? params.InstanceId : null; this.DbName = 'DbName' in params ? params.DbName : null; this.Table = 'Table' in params ? params.Table : null; } } /** * CloneAccount response structure. * @class */ class CloneAccountResponse extends AbstractModel { constructor(){ super(); /** * Async task flow 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; } } /** * IsolateDedicatedDBInstance request structure. * @class */ class IsolateDedicatedDBInstanceRequest extends AbstractModel { constructor(){ super(); /** * Instance ID in the format of `tdsql-ow728lmc` * @type {string || null} */ this.InstanceId = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.InstanceId = 'InstanceId' in params ? params.InstanceId : null; } } /** * ModifyAccountDescription response structure. * @class */ class ModifyAccountDescriptionResponse extends AbstractModel { constructor(){ super(); /** * The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. * @type {string || null} */ this.RequestId = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * Parameter constraint * @class */ class ParamConstraint extends AbstractModel { constructor(){ super(); /** * Constraint type, such as `enum` and `section`. * @type {string || null} */ this.Type = null; /** * List of valid values when constraint type is `enum` * @type {string || null} */ this.Enum = null; /** * Range when constraint type is `section` Note: This field may return null, indicating that no valid values can be obtained. * @type {ConstraintRange || null} */ this.Range = null; /** * List of valid values when constraint type is `string` * @type {string || null} */ this.String = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.Type = 'Type' in params ? params.Type : null; this.Enum = 'Enum' in params ? params.Enum : null; if (params.Range) { let obj = new ConstraintRange(); obj.deserialize(params.Range) this.Range = obj; } this.String = 'String' in params ? params.String : null; } } /** * ModifyDBInstancesProject response structure. * @class */ class ModifyDBInstancesProjectResponse 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; } } /** * ModifyDBEncryptAttributes response structure. * @class */ class ModifyDBEncryptAttributesResponse 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; } } /** * Database view information * @class */ class DatabaseView extends AbstractModel { constructor(){ super(); /** * View name * @type {string || null} */ this.View = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.View = 'View' in params ? params.View : null; } } /** * DescribeDBLogFiles request structure. * @class */ class DescribeDBLogFilesRequest extends AbstractModel { constructor(){ super(); /** * Instance ID in the format of `tdsql-ow728lmc`. * @type {string || null} */ this.InstanceId = null; /** * Requested log type. Valid values: 1 (binlog), 2 (cold backup), 3 (errlog), 4 (slowlog). * @type {number || null} */ this.Type = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.InstanceId = 'InstanceId' in params ? params.InstanceId : null; this.Type = 'Type' in params ? params.Type : null; } } /** * UpgradeDedicatedDBInstance response structure. * @class */ class UpgradeDedicatedDBInstanceResponse extends AbstractModel { constructor(){ super(); /** * Async 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; } } /** * Instance node information * @class */ class NodeInfo extends AbstractModel { constructor(){ super(); /** * Node ID * @type {string || null} */ this.NodeId = null; /** * Node role. Valid values: `master`, `slave` * @type {string || null} */ this.Role = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.NodeId = 'NodeId' in params ? params.NodeId : null; this.Role = 'Role' in params ? params.Role : null; } } /** * DescribeOrders response structure. * @class */ class DescribeOrdersResponse extends AbstractModel { constructor(){ super(); /** * Returned number of orders. * @type {number || null} */ this.TotalCount = null; /** * Order information list. * @type {Array.<Deal> || null} */ this.Deals = 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.Deals) { this.Deals = new Array(); for (let z in params.Deals) { let obj = new Deal(); obj.deserialize(params.Deals[z]); this.Deals.push(obj); } } this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * ModifySyncTaskAttribute response structure. * @class */ class ModifySyncTaskAttributeResponse 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; } } /** * DCN details * @class */ class DcnDetailItem extends AbstractModel { constructor(){ super(); /** * Instance ID * @type {string || null} */ this.InstanceId = null; /** * Instance name * @type {string || null} */ this.InstanceName = null; /** * Region where the instance resides * @type {string || null} */ this.Region = null; /** * Availability zone where the instance resides * @type {string || null} */ this.Zone = null; /** * Instance IP address * @type {string || null} */ this.Vip = null; /** * Instance IPv6 address * @type {string || null} */ this.Vipv6 = null; /** * Instance port * @type {number || null} */ this.Vport = null; /** * Instance status * @type {number || null} */ this.Status = null; /** * Instance status description * @type {string || null} */ this.StatusDesc = null; /** * DCN flag. Valid values: `1` (primary), `2` (disaster recovery) * @type {number || null} */ this.DcnFlag = null; /** * DCN status. Valid values: `0` (none), `1` (creating), `2` (syncing), `3` (disconnected) * @type {number || null} */ this.DcnStatus = null; /** * Number of CPU cores of the instance * @type {number || null} */ this.Cpu = null; /** * Instance memory capacity in GB * @type {number || null} */ this.Memory = null; /** * Instance storage capacity in GB * @type {number || null} */ this.Storage = null; /** * Billing mode * @type {number || null} */ this.PayMode = null; /** * Creation time of the instance in the format of 2006-01-02 15:04:05 * @type {string || null} */ this.CreateTime = null; /** * Expiration time of the instance in the format of 2006-01-02 15:04:05 * @type {string || null} */ this.PeriodEndTime = null; /** * Instance type. Valid values: `1` (dedicated primary instance), `2` (non-dedicated primary instance), `3` (non-dedicated disaster recovery instance), `4` (dedicated disaster recovery instance) * @type {number || null} */ this.InstanceType = null; /** * Configuration information of DCN replication. This field is null for a primary instance. Note: This field may return null, indicating that no valid values can be obtained. * @type {DCNReplicaConfig || null} */ this.ReplicaConfig = null; /** * DCN replication status. This field is null for the primary instance. Note: This field may return null, indicating that no valid values can be obtained. * @type {DCNReplicaStatus || null} */ this.ReplicaStatus = null; /** * Whether KMS is enabled. * @type {number || null} */ this.EncryptStatus = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.InstanceId = 'InstanceId' in params ? params.InstanceId : null; this.InstanceName = 'InstanceName' in params ? params.InstanceName : null; this.Region = 'Region' in params ? params.Region : null; this.Zone = 'Zone' in params ? params.Zone : null; this.Vip = 'Vip' in params ? params.Vip : null; this.Vipv6 = 'Vipv6' in params ? params.Vipv6 : null; this.Vport = 'Vport' in params ? params.Vport : null; this.Status = 'Status' in params ? params.Status : null; this.StatusDesc = 'StatusDesc' in params ? params.StatusDesc : null; this.DcnFlag = 'DcnFlag' in params ? params.DcnFlag : null; this.DcnStatus = 'DcnStatus' in params ? params.DcnStatus : null; this.Cpu = 'Cpu' in params ? params.Cpu : null; this.Memory = 'Memory' in params ? params.Memory : null; this.Storage = 'Storage' in params ? params.Storage : null; this.PayMode = 'PayMode' in params ? params.PayMode : null; this.CreateTime = 'CreateTime' in params ? params.CreateTime : null; this.PeriodEndTime = 'PeriodEndTime' in params ? params.PeriodEndTime : null; this.InstanceType = 'InstanceType' in params ? params.InstanceType : null; if (params.ReplicaConfig) { let obj = new DCNReplicaConfig(); obj.deserialize(params.ReplicaConfig) this.ReplicaConfig = obj; } if (params.ReplicaStatus) { let obj = new DCNReplicaStatus(); obj.deserialize(params.ReplicaStatus) this.ReplicaStatus = obj; } this.EncryptStatus = 'EncryptStatus' in params ? params.EncryptStatus : null; } } /** * ResetAccountPassword request structure. * @class */ class ResetAccountPasswordRequest extends AbstractModel { constructor(){ super(); /** * Instance ID, which is in the format of `tdsql-ow728lmc` and can be obtained through the `DescribeDBInstances` API. * @type {string || null} */ this.InstanceId = null; /** * Login username. * @type {string || null} */ this.UserName = null; /** * Access host allowed for user. An account is uniquely identified by username and host. * @type {string || null} */ this.Host = null; /** * New password, which can contain 6-32 letters, digits, and common symbols but not semicolons, single quotation marks, and double quotation marks. * @type {string || null} */ this.Password = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.InstanceId = 'InstanceId' in params ? params.InstanceId : null; this.UserName = 'UserName' in params ? params.UserName : null; this.Host = 'Host' in params ? params.Host : null; this.Password = 'Password' in params ? params.Password : null; } } /** * CopyAccountPrivileges response structure. * @class */ class CopyAccountPrivilegesResponse 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; } } /** * DCN status information * @class */ class DCNReplicaStatus extends AbstractModel { constructor(){ super(); /** * DCN running status. Valid values: `START` (running), `STOP` (pause). Note: This field may return null, indicating that no valid values can be obtained. * @type {string || null} */ this.Status = null; /** * The current delay, which takes the delay value of the replica instance. * @type {number || null} */ this.Delay = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.Status = 'Status' in params ? params.Status : null; this.Delay = 'Delay' in params ? params.Delay : null; } } /** * CreateHourDBInstance response structure. * @class */ class CreateHourDBInstanceResponse extends AbstractModel { constructor(){ super(); /** * Order ID, which is used for calling the `DescribeOrders` API. The parameter can be used to either query order details or call the user account APIs to make another payment when this payment fails. * @type {string || null} */ this.DealName = null; /** * IDs of the instances you have purchased in this order. If no instance IDs are returned, you can query them with the `DescribeOrders` API. You can also use the `DescribeDBInstances` API to check whether an instance has been created successfully. Note: this field may return `null`, indicating that no valid values can be obtained. * @type {Array.<string> || null} */ this.InstanceIds = null; /** * Async task ID, which can be used in the [DescribeFlow](https://www.tencentcloud.com/document/product/237/16177) API to query th