UNPKG

tencentcloud-sdk-nodejs-intl-en

Version:
1,979 lines (1,660 loc) 116 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"); /** * Time series of database space data * @class */ class SchemaSpaceTimeSeries extends AbstractModel { constructor(){ super(); /** * Database name * @type {string || null} */ this.TableSchema = null; /** * Monitoring metric data in a unit of time interval. * @type {MonitorMetricSeriesData || null} */ this.SeriesData = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.TableSchema = 'TableSchema' in params ? params.TableSchema : null; if (params.SeriesData) { let obj = new MonitorMetricSeriesData(); obj.deserialize(params.SeriesData) this.SeriesData = obj; } } } /** * DescribeSlowLogUserHostStats request structure. * @class */ class DescribeSlowLogUserHostStatsRequest extends AbstractModel { constructor(){ super(); /** * Instance ID. * @type {string || null} */ this.InstanceId = null; /** * Start time of the time range in the format of yyyy-MM-dd HH:mm:ss, such as 2019-09-10 12:13:14. * @type {string || null} */ this.StartTime = null; /** * End time of the time range in the format of yyyy-MM-dd HH:mm:ss, such as 2019-09-10 12:13:14. * @type {string || null} */ this.EndTime = null; /** * Service type. Valid values: `mysql` (TencentDB for MySQL), `cynosdb` (TDSQL-C for MySQL). Default value: `mysql`. * @type {string || null} */ this.Product = 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.Product = 'Product' in params ? params.Product : null; } } /** * DescribeSlowLogTimeSeriesStats request structure. * @class */ class DescribeSlowLogTimeSeriesStatsRequest extends AbstractModel { constructor(){ super(); /** * Instance ID. * @type {string || null} */ this.InstanceId = null; /** * Start time, such as "2019-09-10 12:13:14". * @type {string || null} */ this.StartTime = null; /** * End time, such as "2019-09-10 12:13:14". The interval between the end time and the start time can be up to 7 days. * @type {string || null} */ this.EndTime = null; /** * Service type. Valid values: `mysql` (TencentDB for MySQL), `cynosdb` (TencentDB for CynosDB (compatible with MySQL)). Default value: `mysql`. * @type {string || null} */ this.Product = 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.Product = 'Product' in params ? params.Product : null; } } /** * DescribeTopSpaceSchemas response structure. * @class */ class DescribeTopSpaceSchemasResponse extends AbstractModel { constructor(){ super(); /** * List of the returned space statistics of top databases. * @type {Array.<SchemaSpaceData> || null} */ this.TopSpaceSchemas = null; /** * Timestamp (in seconds) of database space data collect points * @type {number || null} */ this.Timestamp = 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.TopSpaceSchemas) { this.TopSpaceSchemas = new Array(); for (let z in params.TopSpaceSchemas) { let obj = new SchemaSpaceData(); obj.deserialize(params.TopSpaceSchemas[z]); this.TopSpaceSchemas.push(obj); } } this.Timestamp = 'Timestamp' in params ? params.Timestamp : null; this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * Slow log statistics in specified time range * @class */ class TimeSlice extends AbstractModel { constructor(){ super(); /** * Total number * @type {number || null} */ this.Count = null; /** * Statistics start time * @type {number || null} */ this.Timestamp = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.Count = 'Count' in params ? params.Count : null; this.Timestamp = 'Timestamp' in params ? params.Timestamp : null; } } /** * Obtain the details of the health score and deduction. * @class */ class HealthScoreInfo extends AbstractModel { constructor(){ super(); /** * Exception details * @type {Array.<IssueTypeInfo> || null} */ this.IssueTypes = null; /** * Total number of the exceptions * @type {number || null} */ this.EventsTotalCount = null; /** * Health score * @type {number || null} */ this.HealthScore = null; /** * Health level, such as "HEALTH", "SUB_HEALTH", "RISK", "HIGH_RISK". * @type {string || null} */ this.HealthLevel = null; } /** * @private */ deserialize(params) { if (!params) { return; } if (params.IssueTypes) { this.IssueTypes = new Array(); for (let z in params.IssueTypes) { let obj = new IssueTypeInfo(); obj.deserialize(params.IssueTypes[z]); this.IssueTypes.push(obj); } } this.EventsTotalCount = 'EventsTotalCount' in params ? params.EventsTotalCount : null; this.HealthScore = 'HealthScore' in params ? params.HealthScore : null; this.HealthLevel = 'HealthLevel' in params ? params.HealthLevel : null; } } /** * DescribeTopSpaceTableTimeSeries response structure. * @class */ class DescribeTopSpaceTableTimeSeriesResponse extends AbstractModel { constructor(){ super(); /** * Time series list of the returned space statistics of top tables. * @type {Array.<TableSpaceTimeSeries> || null} */ this.TopSpaceTableTimeSeries = 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.TopSpaceTableTimeSeries) { this.TopSpaceTableTimeSeries = new Array(); for (let z in params.TopSpaceTableTimeSeries) { let obj = new TableSpaceTimeSeries(); obj.deserialize(params.TopSpaceTableTimeSeries[z]); this.TopSpaceTableTimeSeries.push(obj); } } this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * CreateSchedulerMailProfile request structure. * @class */ class CreateSchedulerMailProfileRequest extends AbstractModel { constructor(){ super(); /** * Value range: 1-7, representing Monday to Sunday respectively. * @type {Array.<number> || null} */ this.WeekConfiguration = null; /** * Email configurations * @type {ProfileInfo || null} */ this.ProfileInfo = null; /** * Configuration name, which needs to be unique. For scheduled task reports, the name should be in the format of "scheduler_" + {instanceId}, such as "schduler_cdb-test". * @type {string || null} */ this.ProfileName = null; /** * Configure the instance ID that you need to generate the health report. * @type {string || null} */ this.BindInstanceId = null; /** * Service type. Valid values: `mysql` (TencentDB for MySQL), `cynosdb` (TDSQL-C for MySQL). Default value: `mysql`. * @type {string || null} */ this.Product = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.WeekConfiguration = 'WeekConfiguration' in params ? params.WeekConfiguration : null; if (params.ProfileInfo) { let obj = new ProfileInfo(); obj.deserialize(params.ProfileInfo) this.ProfileInfo = obj; } this.ProfileName = 'ProfileName' in params ? params.ProfileName : null; this.BindInstanceId = 'BindInstanceId' in params ? params.BindInstanceId : null; this.Product = 'Product' in params ? params.Product : null; } } /** * Contact description. * @class */ class ContactItem extends AbstractModel { constructor(){ super(); /** * Contact ID. * @type {number || null} */ this.Id = null; /** * Contact name. * @type {string || null} */ this.Name = null; /** * The email address of the contact. * @type {string || null} */ this.Mail = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.Id = 'Id' in params ? params.Id : null; this.Name = 'Name' in params ? params.Name : null; this.Mail = 'Mail' in params ? params.Mail : null; } } /** * DescribeHealthScore response structure. * @class */ class DescribeHealthScoreResponse extends AbstractModel { constructor(){ super(); /** * Health score and deduction for exceptions * @type {HealthScoreInfo || null} */ this.Data = 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.Data) { let obj = new HealthScoreInfo(); obj.deserialize(params.Data) this.Data = obj; } this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * DescribeDBDiagHistory response structure. * @class */ class DescribeDBDiagHistoryResponse extends AbstractModel { constructor(){ super(); /** * Event description. * @type {Array.<DiagHistoryEventItem> || null} */ this.Events = 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.Events) { this.Events = new Array(); for (let z in params.Events) { let obj = new DiagHistoryEventItem(); obj.deserialize(params.Events[z]); this.Events.push(obj); } } this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * DescribeDiagDBInstances request structure. * @class */ class DescribeDiagDBInstancesRequest extends AbstractModel { constructor(){ super(); /** * Whether it is an instance supported by DBbrain. It is fixed to “true”. * @type {boolean || null} */ this.IsSupported = null; /** * Service type. Valid values: `mysql` (TencentDB for MySQL), `cynosdb` (TDSQL-C for MySQL). Default value: `mysql`. * @type {string || null} */ this.Product = null; /** * Pagination parameter indicating the offset. * @type {number || null} */ this.Offset = null; /** * Pagination parameter indicating the number of entries for each page. * @type {number || null} */ this.Limit = null; /** * Query by instance name. * @type {Array.<string> || null} */ this.InstanceNames = null; /** * Query by instance ID. * @type {Array.<string> || null} */ this.InstanceIds = null; /** * Query by region. * @type {Array.<string> || null} */ this.Regions = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.IsSupported = 'IsSupported' in params ? params.IsSupported : null; this.Product = 'Product' in params ? params.Product : null; this.Offset = 'Offset' in params ? params.Offset : null; this.Limit = 'Limit' in params ? params.Limit : null; this.InstanceNames = 'InstanceNames' in params ? params.InstanceNames : null; this.InstanceIds = 'InstanceIds' in params ? params.InstanceIds : null; this.Regions = 'Regions' in params ? params.Regions : null; } } /** * DescribeDBSpaceStatus request structure. * @class */ class DescribeDBSpaceStatusRequest extends AbstractModel { constructor(){ super(); /** * Instance ID. * @type {string || null} */ this.InstanceId = null; /** * Query period in days. The end date is the current date and the query period is 7 days by default. * @type {number || null} */ this.RangeDays = null; /** * Service type. Valid values: `mysql` (TencentDB for MySQL), `cynosdb` (TencentDB for CynosDB (compatible with MySQL)). Default value: `mysql`. * @type {string || null} */ this.Product = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.InstanceId = 'InstanceId' in params ? params.InstanceId : null; this.RangeDays = 'RangeDays' in params ? params.RangeDays : null; this.Product = 'Product' in params ? params.Product : null; } } /** * DescribeAllUserContact response structure. * @class */ class DescribeAllUserContactResponse extends AbstractModel { constructor(){ super(); /** * Total number of contacts. * @type {number || null} */ this.TotalCount = null; /** * Contact information. Note: this field may return `null`, indicating that no valid value is obtained. * @type {Array.<ContactItem> || null} */ this.Contacts = 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.Contacts) { this.Contacts = new Array(); for (let z in params.Contacts) { let obj = new ContactItem(); obj.deserialize(params.Contacts[z]); this.Contacts.push(obj); } } this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * DescribeTopSpaceSchemas request structure. * @class */ class DescribeTopSpaceSchemasRequest extends AbstractModel { constructor(){ super(); /** * Instance ID. * @type {string || null} */ this.InstanceId = null; /** * Number of returned top databases. Maximum value: 100. Default value: 20. * @type {number || null} */ this.Limit = null; /** * Field used to sort top tables. Valid values: `DataLength`, `IndexLength`, `TotalLength`, `DataFree`, `FragRatio`, `TableRows`, and `PhysicalFileSize` (supported only by TencentDB for MySQL instances). For TencentDB for MySQL instances, the default value is `PhysicalFileSize`; for other database instances, the default value is `TotalLength`. * @type {string || null} */ this.SortBy = null; /** * Service type. Valid values: `mysql` (TencentDB for MySQL), `cynosdb` (TencentDB for CynosDB (compatible with MySQL)). Default value: `mysql`. * @type {string || null} */ this.Product = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.InstanceId = 'InstanceId' in params ? params.InstanceId : null; this.Limit = 'Limit' in params ? params.Limit : null; this.SortBy = 'SortBy' in params ? params.SortBy : null; this.Product = 'Product' in params ? params.Product : null; } } /** * ModifyDiagDBInstanceConf request structure. * @class */ class ModifyDiagDBInstanceConfRequest extends AbstractModel { constructor(){ super(); /** * Whether to enable inspection * @type {InstanceConfs || null} */ this.InstanceConfs = null; /** * Target regions of the request. If the value is `All`, it is applied to all regions. * @type {string || null} */ this.Regions = null; /** * Service type. Valid values: `mysql` (TencentDB for MySQL), `cynosdb` (TencentDB for CynosDB (compatible with MySQL)). * @type {string || null} */ this.Product = null; /** * ID of the instance to modify. * @type {Array.<string> || null} */ this.InstanceIds = null; } /** * @private */ deserialize(params) { if (!params) { return; } if (params.InstanceConfs) { let obj = new InstanceConfs(); obj.deserialize(params.InstanceConfs) this.InstanceConfs = obj; } this.Regions = 'Regions' in params ? params.Regions : null; this.Product = 'Product' in params ? params.Product : null; this.InstanceIds = 'InstanceIds' in params ? params.InstanceIds : null; } } /** * Monitoring data * @class */ class MonitorMetric extends AbstractModel { constructor(){ super(); /** * Metric name. * @type {string || null} */ this.Metric = null; /** * Metric unit. * @type {string || null} */ this.Unit = null; /** * Metric value. Note: this field may return null, indicating that no valid values can be obtained. * @type {Array.<number> || null} */ this.Values = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.Metric = 'Metric' in params ? params.Metric : null; this.Unit = 'Unit' in params ? params.Unit : null; this.Values = 'Values' in params ? params.Values : null; } } /** * CreateDBDiagReportTask request structure. * @class */ class CreateDBDiagReportTaskRequest extends AbstractModel { constructor(){ super(); /** * Instance ID. * @type {string || null} */ this.InstanceId = null; /** * Start time, such as `2020-11-08T14:00:00+08:00`. * @type {string || null} */ this.StartTime = null; /** * End time, such as `2020-11-09T14:00:00+08:00`. * @type {string || null} */ this.EndTime = null; /** * Whether to send an email. Valid values: 0 - Yes, 1 - No. * @type {number || null} */ this.SendMailFlag = null; /** * An array of contact IDs to receive the email. * @type {Array.<number> || null} */ this.ContactPerson = null; /** * An array of contact group IDs to receive the email. * @type {Array.<number> || null} */ this.ContactGroup = null; /** * Service type. Valid values: `mysql` (TencentDB for MySQL), `cynosdb` (TencentDB for CynosDB (compatible with MySQL)). Default value: `mysql`. * @type {string || null} */ this.Product = 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.SendMailFlag = 'SendMailFlag' in params ? params.SendMailFlag : null; this.ContactPerson = 'ContactPerson' in params ? params.ContactPerson : null; this.ContactGroup = 'ContactGroup' in params ? params.ContactGroup : null; this.Product = 'Product' in params ? params.Product : null; } } /** * Monitoring data in float type * @class */ class MonitorFloatMetric extends AbstractModel { constructor(){ super(); /** * Metric name. * @type {string || null} */ this.Metric = null; /** * Metric unit. * @type {string || null} */ this.Unit = null; /** * Metric value. Note: this field may return null, indicating that no valid values can be obtained. * @type {Array.<number> || null} */ this.Values = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.Metric = 'Metric' in params ? params.Metric : null; this.Unit = 'Unit' in params ? params.Unit : null; this.Values = 'Values' in params ? params.Values : null; } } /** * Diagnosis deduction item. * @class */ class ScoreItem extends AbstractModel { constructor(){ super(); /** * Exception diagnosis item name. * @type {string || null} */ this.DiagItem = null; /** * Diagnosis item types. Valid values: availability, maintainability, performance, and reliability. * @type {string || null} */ this.IssueType = null; /** * Health level. Valid values: information, reminder, alarm, serious, fatal. * @type {string || null} */ this.TopSeverity = null; /** * Number of occurrences of this exception diagnosis item. * @type {number || null} */ this.Count = null; /** * Scores deducted. * @type {number || null} */ this.ScoreLost = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.DiagItem = 'DiagItem' in params ? params.DiagItem : null; this.IssueType = 'IssueType' in params ? params.IssueType : null; this.TopSeverity = 'TopSeverity' in params ? params.TopSeverity : null; this.Count = 'Count' in params ? params.Count : null; this.ScoreLost = 'ScoreLost' in params ? params.ScoreLost : null; } } /** * AddUserContact request structure. * @class */ class AddUserContactRequest extends AbstractModel { constructor(){ super(); /** * Contact name, which needs to be unique and can contain 2-60 characters, supporting uppercase and lowercase letters, numbers, and underline “_”. It cannot start with “_”. * @type {string || null} */ this.Name = null; /** * Email address, which can contain uppercase and lowercase letters, numbers, and underline “_”, and cannot start with “_”. * @type {string || null} */ this.ContactInfo = null; /** * Service type, which is fixed to “mysql”. * @type {string || null} */ this.Product = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.Name = 'Name' in params ? params.Name : null; this.ContactInfo = 'ContactInfo' in params ? params.ContactInfo : null; this.Product = 'Product' in params ? params.Product : null; } } /** * DescribeAllUserGroup response structure. * @class */ class DescribeAllUserGroupResponse extends AbstractModel { constructor(){ super(); /** * Total number of contact groups. * @type {number || null} */ this.TotalCount = null; /** * Contact group information. Note: this field may return `null`, indicating that no valid value is obtained. * @type {Array.<GroupItem> || null} */ this.Groups = 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.Groups) { this.Groups = new Array(); for (let z in params.Groups) { let obj = new GroupItem(); obj.deserialize(params.Groups[z]); this.Groups.push(obj); } } this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * Basic information of instance. * @class */ class InstanceBasicInfo extends AbstractModel { constructor(){ super(); /** * Instance ID. * @type {string || null} */ this.InstanceId = null; /** * Instance name. * @type {string || null} */ this.InstanceName = null; /** * Private IP of the instance. * @type {string || null} */ this.Vip = null; /** * Private network port of the instance. * @type {number || null} */ this.Vport = null; /** * Instance product. * @type {string || null} */ this.Product = null; /** * Instance engine version. * @type {string || null} */ this.EngineVersion = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.InstanceId = 'InstanceId' in params ? params.InstanceId : null; this.InstanceName = 'InstanceName' in params ? params.InstanceName : null; this.Vip = 'Vip' in params ? params.Vip : null; this.Vport = 'Vport' in params ? params.Vport : null; this.Product = 'Product' in params ? params.Product : null; this.EngineVersion = 'EngineVersion' in params ? params.EngineVersion : null; } } /** * `SchemaItem` array * @class */ class SchemaItem extends AbstractModel { constructor(){ super(); /** * Database name * @type {string || null} */ this.Schema = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.Schema = 'Schema' in params ? params.Schema : null; } } /** * CreateMailProfile response structure. * @class */ class CreateMailProfileResponse 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; } } /** * DescribeTopSpaceTables request structure. * @class */ class DescribeTopSpaceTablesRequest extends AbstractModel { constructor(){ super(); /** * Instance ID. * @type {string || null} */ this.InstanceId = null; /** * Number of returned top tables. Maximum value: 100. Default value: 20. * @type {number || null} */ this.Limit = null; /** * Field used to sort top tables. Valid values: `DataLength`, `IndexLength`, `TotalLength`, `DataFree`, `FragRatio`, `TableRows`, and `PhysicalFileSize` (only supported by TencentDB for MySQL instances). For TencentDB for MySQL instances, the default value is PhysicalFileSize; for other database instances, the default value is `TotalLength`. * @type {string || null} */ this.SortBy = null; /** * Service type. Valid values: `mysql` (TencentDB for MySQL), `cynosdb` (TencentDB for CynosDB (compatible with MySQL)). Default value: `mysql`. * @type {string || null} */ this.Product = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.InstanceId = 'InstanceId' in params ? params.InstanceId : null; this.Limit = 'Limit' in params ? params.Limit : null; this.SortBy = 'SortBy' in params ? params.SortBy : null; this.Product = 'Product' in params ? params.Product : null; } } /** * Information configured by user. * @class */ class ProfileInfo extends AbstractModel { constructor(){ super(); /** * Language of the email, such as `en`. * @type {string || null} */ this.Language = null; /** * The content of email template. * @type {MailConfiguration || null} */ this.MailConfiguration = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.Language = 'Language' in params ? params.Language : null; if (params.MailConfiguration) { let obj = new MailConfiguration(); obj.deserialize(params.MailConfiguration) this.MailConfiguration = obj; } } } /** * DescribeAllUserContact request structure. * @class */ class DescribeAllUserContactRequest extends AbstractModel { constructor(){ super(); /** * Service type, which is fixed to “mysql”. * @type {string || null} */ this.Product = null; /** * An array of contact name. Fuzzy search is supported. * @type {Array.<string> || null} */ this.Names = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.Product = 'Product' in params ? params.Product : null; this.Names = 'Names' in params ? params.Names : null; } } /** * DescribeDBDiagEvent request structure. * @class */ class DescribeDBDiagEventRequest extends AbstractModel { constructor(){ super(); /** * Instance ID. * @type {string || null} */ this.InstanceId = null; /** * Event ID, which can be obtained through the `DescribeDBDiagHistory` API. * @type {number || null} */ this.EventId = null; /** * Service type. Valid values: `mysql` (TencentDB for MySQL), `cynosdb` (TencentDB for CynosDB (compatible with MySQL)). Default value: `mysql`. * @type {string || null} */ this.Product = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.InstanceId = 'InstanceId' in params ? params.InstanceId : null; this.EventId = 'EventId' in params ? params.EventId : null; this.Product = 'Product' in params ? params.Product : null; } } /** * DescribeUserSqlAdvice response structure. * @class */ class DescribeUserSqlAdviceResponse extends AbstractModel { constructor(){ super(); /** * SQL statement optimization suggestions, which can be parsed into JSON arrays. * @type {string || null} */ this.Advices = null; /** * Notes of SQL statement optimization suggestions, which can be parsed into String arrays. * @type {string || null} */ this.Comments = null; /** * SQL statement. * @type {string || null} */ this.SqlText = null; /** * Database name. * @type {string || null} */ this.Schema = null; /** * DDL information of related tables, which can be parsed into JSON arrays. * @type {string || null} */ this.Tables = null; /** * SQL execution plan, which can be parsed into JSON. * @type {string || null} */ this.SqlPlan = null; /** * Cost saving details after SQL statement optimization, which can be parsed into JSON. * @type {string || null} */ this.Cost = 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.Advices = 'Advices' in params ? params.Advices : null; this.Comments = 'Comments' in params ? params.Comments : null; this.SqlText = 'SqlText' in params ? params.SqlText : null; this.Schema = 'Schema' in params ? params.Schema : null; this.Tables = 'Tables' in params ? params.Tables : null; this.SqlPlan = 'SqlPlan' in params ? params.SqlPlan : null; this.Cost = 'Cost' in params ? params.Cost : null; this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * DescribeDBSpaceStatus response structure. * @class */ class DescribeDBSpaceStatusResponse extends AbstractModel { constructor(){ super(); /** * Disk usage growth in MB. * @type {number || null} */ this.Growth = null; /** * Available disk space in MB. * @type {number || null} */ this.Remain = null; /** * Total disk space in MB. * @type {number || null} */ this.Total = null; /** * Estimated number of available days. * @type {number || null} */ this.AvailableDays = 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.Growth = 'Growth' in params ? params.Growth : null; this.Remain = 'Remain' in params ? params.Remain : null; this.Total = 'Total' in params ? params.Total : null; this.AvailableDays = 'AvailableDays' in params ? params.AvailableDays : null; this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * Instance diagnosis event * @class */ class DiagHistoryEventItem extends AbstractModel { constructor(){ super(); /** * Diagnosis type. * @type {string || null} */ this.DiagType = null; /** * End time. * @type {string || null} */ this.EndTime = null; /** * Start time. * @type {string || null} */ this.StartTime = null; /** * Event ID. * @type {number || null} */ this.EventId = null; /** * Severity, which can be divided into 5 levels: 1: fatal, 2: severe, 3: warning, 4: notice, 5: healthy. * @type {number || null} */ this.Severity = null; /** * Summary. * @type {string || null} */ this.Outline = null; /** * Diagnosis item. * @type {string || null} */ this.DiagItem = null; /** * Instance ID. Note: this field may return null, indicating that no valid values can be obtained. * @type {string || null} */ this.InstanceId = null; /** * Reserved field Note: this field may return null, indicating that no valid values can be obtained. * @type {string || null} */ this.Metric = null; /** * Region Note: this field may return null, indicating that no valid values can be obtained. * @type {string || null} */ this.Region = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.DiagType = 'DiagType' in params ? params.DiagType : null; this.EndTime = 'EndTime' in params ? params.EndTime : null; this.StartTime = 'StartTime' in params ? params.StartTime : null; this.EventId = 'EventId' in params ? params.EventId : null; this.Severity = 'Severity' in params ? params.Severity : null; this.Outline = 'Outline' in params ? params.Outline : null; this.DiagItem = 'DiagItem' in params ? params.DiagItem : null; this.InstanceId = 'InstanceId' in params ? params.InstanceId : null; this.Metric = 'Metric' in params ? params.Metric : null; this.Region = 'Region' in params ? params.Region : null; } } /** * DescribeDBDiagEvent response structure. * @class */ class DescribeDBDiagEventResponse extends AbstractModel { constructor(){ super(); /** * Diagnosis item. * @type {string || null} */ this.DiagItem = null; /** * Diagnosis type. * @type {string || null} */ this.DiagType = null; /** * Event ID. * @type {number || null} */ this.EventId = null; /** * Event details. * @type {string || null} */ this.Explanation = null; /** * Summary. * @type {string || null} */ this.Outline = null; /** * Problem found. * @type {string || null} */ this.Problem = null; /** * Severity, which can be divided into 5 levels: 1: fatal, 2: severe, 3: warning, 4: notice, 5: healthy. * @type {number || null} */ this.Severity = null; /** * Start time * @type {string || null} */ this.StartTime = null; /** * Suggestion. * @type {string || null} */ this.Suggestions = null; /** * Reserved field. Note: this field may return null, indicating that no valid values can be obtained. * @type {string || null} */ this.Metric = null; /** * End time. * @type {string || null} */ this.EndTime = 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.DiagItem = 'DiagItem' in params ? params.DiagItem : null; this.DiagType = 'DiagType' in params ? params.DiagType : null; this.EventId = 'EventId' in params ? params.EventId : null; this.Explanation = 'Explanation' in params ? params.Explanation : null; this.Outline = 'Outline' in params ? params.Outline : null; this.Problem = 'Problem' in params ? params.Problem : null; this.Severity = 'Severity' in params ? params.Severity : null; this.StartTime = 'StartTime' in params ? params.StartTime : null; this.Suggestions = 'Suggestions' in params ? params.Suggestions : null; this.Metric = 'Metric' in params ? params.Metric : null; this.EndTime = 'EndTime' in params ? params.EndTime : null; this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * DescribeDBDiagHistory request structure. * @class */ class DescribeDBDiagHistoryRequest extends AbstractModel { constructor(){ super(); /** * Instance ID. * @type {string || null} */ this.InstanceId = null; /** * Start time, such as "2019-09-10 12:13:14". * @type {string || null} */ this.StartTime = null; /** * End time, such as "2019-09-11 12:13:14". The interval between the end time and the start time can be up to 2 days. * @type {string || null} */ this.EndTime = null; /** * Service type. Valid values: `mysql` (TencentDB for MySQL), `cynosdb` (TencentDB for CynosDB (compatible with MySQL)). Default value: `mysql`. * @type {string || null} */ this.Product = 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.Product = 'Product' in params ? params.Product : null; } } /** * Describe the group information. * @class */ class GroupItem extends AbstractModel { constructor(){ super(); /** * Group ID. * @type {number || null} */ this.Id = null; /** * Group name. * @type {string || null} */ this.Name = null; /** * Number of group members. * @type {number || null} */ this.MemberCount = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.Id = 'Id' in params ? params.Id : null; this.Name = 'Name' in params ? params.Name : null; this.MemberCount = 'MemberCount' in params ? params.MemberCount : null; } } /** * Query the list of instances and return information about the instances. * @class */ class InstanceInfo extends AbstractModel { constructor(){ super(); /** * Instance ID * @type {string || null} */ this.InstanceId = null; /** * Instance name * @type {string || null} */ this.InstanceName = null; /** * The region where the instance belongs * @type {string || null} */ this.Region = null; /** * Health score * @type {number || null} */ this.HealthScore = null; /** * Service * @type {string || null} */ this.Product = null; /** * Number of exceptions * @type {number || null} */ this.EventCount = null; /** * Instance type. Valid values: 1: MASTER, 2: DR, 3: RO, 4: SDR * @type {number || null} */ this.InstanceType = null; /** * Number of cores * @type {number || null} */ this.Cpu = null; /** * Memory in MB * @type {number || null} */ this.Memory = null; /** * Disk storage in GB * @type {number || null} */ this.Volume = null; /** * Database version * @type {string || null} */ this.EngineVersion = null; /** * Private network address * @type {string || null} */ this.Vip = null; /** * Private network port * @type {number || null} */ this.Vport = null; /** * Access source * @type {string || null} */ this.Source = null; /** * Group ID * @type {string || null} */ this.GroupId = null; /** * Group name * @type {string || null} */ this.GroupName = null; /** * Instance status. Valid values: 0: Delivering, 1: Running, 4: Terminating, 5: Isolated * @type {number || null} */ this.Status = null; /** * Subnet unified ID * @type {string || null} */ this.UniqSubnetId = null; /** * cdb (TencentDB instance) type * @type {string || null} */ this.DeployMode = null; /** * cdb (TencentDB instance) initialization flag. Valid values: 0: not initialized, 1: initialized * @type {number || null} */ this.InitFlag = null; /** * Task status * @type {number || null} */ this.TaskStatus = null; /** * Unified VPC ID * @type {string || null} */ this.UniqVpcId = null; /** * Instance inspection/overview status * @type {InstanceConfs || null} */ this.InstanceConf = null; /** * Resource expiration time * @type {string || null} */ this.DeadlineTime = null; /** * Whether it is an instance supported by DBbrain. * @type {boolean || null} */ this.IsSupported = null; /** * The status of instance security audit log. ON: enabled, OFF: disabled. * @type {string || null} */ this.SecAuditStatus = null; /** * The status of instance audit log. ALL_AUDIT: full audit is enabled, RULE_AUDIT: rule audit is enabled, UNBOUND: audit is disabled. * @type {string || null} */ this.AuditPolicyStatus = null; /** * The running status of instance audit log. normal: