tencentcloud-sdk-nodejs-intl-en
Version:
1,629 lines (1,373 loc) • 432 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");
/**
* UpgradeProxyVersion request structure.
* @class
*/
class UpgradeProxyVersionRequest extends AbstractModel {
constructor(){
super();
/**
* Instance ID. Log in to the [Redis console](https://console.tencentcloud.com/redis/instance) and copy it in the instance list.
* @type {string || null}
*/
this.InstanceId = null;
/**
* Current Proxy version.
* @type {string || null}
*/
this.CurrentProxyVersion = null;
/**
* Upgradable Redis version.
* @type {string || null}
*/
this.UpgradeProxyVersion = null;
/**
* Specifies whether to upgrade immediately.
- 1: Upgrade immediately.
- 0: Upgrade during the maintenance window.
* @type {number || null}
*/
this.InstanceTypeUpgradeNow = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
this.CurrentProxyVersion = 'CurrentProxyVersion' in params ? params.CurrentProxyVersion : null;
this.UpgradeProxyVersion = 'UpgradeProxyVersion' in params ? params.UpgradeProxyVersion : null;
this.InstanceTypeUpgradeNow = 'InstanceTypeUpgradeNow' in params ? params.InstanceTypeUpgradeNow : null;
}
}
/**
* UpgradeSmallVersion request structure.
* @class
*/
class UpgradeSmallVersionRequest extends AbstractModel {
constructor(){
super();
/**
* Instance ID. Log in to the [Redis console](https://console.tencentcloud.com/redis/instance) and copy it in the instance list.
* @type {string || null}
*/
this.InstanceId = null;
/**
* Current Redis minor version. For minor version information, see [Upgrading Instance Version](https://www.tencentcloud.com/document/product/239/37710).
* @type {string || null}
*/
this.CurrentRedisVersion = null;
/**
* Upgraded Redis minor version. For minor version information, see [Upgrading Instance Version](https://www.tencentcloud.com/document/product/239/37710).
* @type {string || null}
*/
this.UpgradeRedisVersion = null;
/**
* Whether to upgrade immediately.
- 1: Upgrade immediately.
- 0: Upgrade during the maintenance window.
* @type {number || null}
*/
this.InstanceTypeUpgradeNow = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
this.CurrentRedisVersion = 'CurrentRedisVersion' in params ? params.CurrentRedisVersion : null;
this.UpgradeRedisVersion = 'UpgradeRedisVersion' in params ? params.UpgradeRedisVersion : null;
this.InstanceTypeUpgradeNow = 'InstanceTypeUpgradeNow' in params ? params.InstanceTypeUpgradeNow : null;
}
}
/**
* ModifyInstanceParams response structure.
* @class
*/
class ModifyInstanceParamsResponse extends AbstractModel {
constructor(){
super();
/**
* Whether the parameter configuration is successfully modified.<br> <li>true: successful;</li> <li>false: failed.</li>
* @type {boolean || null}
*/
this.Changed = null;
/**
* ID of the task
* @type {number || null}
*/
this.TaskId = null;
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Changed = 'Changed' in params ? params.Changed : null;
this.TaskId = 'TaskId' in params ? params.TaskId : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* EnableReplicaReadonly request structure.
* @class
*/
class EnableReplicaReadonlyRequest extends AbstractModel {
constructor(){
super();
/**
* Instance ID. Log in to the [Redis console](https://console.tencentcloud.com/redis/instance) and copy it in the instance list.
* @type {string || null}
*/
this.InstanceId = null;
/**
* Read-only routing policy.
- master: read-only routing to the primary node.
- replication: read-only routing to the secondary node.
- Default policy: writing to the primary node and reading from the secondary node.
* @type {Array.<string> || null}
*/
this.ReadonlyPolicy = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
this.ReadonlyPolicy = 'ReadonlyPolicy' in params ? params.ReadonlyPolicy : null;
}
}
/**
* ModifyInstanceAvailabilityZones request structure.
* @class
*/
class ModifyInstanceAvailabilityZonesRequest extends AbstractModel {
constructor(){
super();
/**
* Specify the instance ID.
For example: crs-xjhsdj****, please log in to the [Redis Console] (https://console.cloud.tencent.com/redis#/) and copy the instance ID from the instance list.
* @type {string || null}
*/
this.InstanceId = null;
/**
* Switch time.
- 1: Switch during the maintenance window.
- 2: Switch immediately.
* @type {number || null}
*/
this.SwitchOption = null;
/**
* Instance node information includes the node ID, node type, and node availability zone ID, and so on. For specific information, please see [RedisNodeInfo ](https://intl.cloud.tencent.com/document/product/239/20022?from_cn_redirect=1).
For instances in a single availability zone, there is no need to configure the NodeId. For instances in multiple availability zones, the NodeId is required to configure.
* @type {Array.<RedisNodeInfo> || null}
*/
this.NodeSet = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
this.SwitchOption = 'SwitchOption' in params ? params.SwitchOption : null;
if (params.NodeSet) {
this.NodeSet = new Array();
for (let z in params.NodeSet) {
let obj = new RedisNodeInfo();
obj.deserialize(params.NodeSet[z]);
this.NodeSet.push(obj);
}
}
}
}
/**
* Array of instance backups
* @class
*/
class RedisBackupSet extends AbstractModel {
constructor(){
super();
/**
* Backup start time
* @type {string || null}
*/
this.StartTime = null;
/**
* Backup task ID
* @type {string || null}
*/
this.BackupId = null;
/**
* Backup type. Valid values: `1` (Automatic backup in the early morning initiated by the system.) `0`: Manual backup initiated by the user.
* @type {string || null}
*/
this.BackupType = null;
/**
* Backup status. Valid values: - `1`: The backup is locked by another process. - `2`: The backup is normal and not locked by any process. - `-1`: The backup is expired. - `3`: The backup is being exported. - `4`: Exported the backup successfully.
* @type {number || null}
*/
this.Status = null;
/**
* Backup remarks
* @type {string || null}
*/
this.Remark = null;
/**
* Whether the backup is locked. Valid values: - `0` (no) - `1` (yes)
* @type {number || null}
*/
this.Locked = null;
/**
* Internal field, which can be ignored.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {number || null}
*/
this.BackupSize = null;
/**
* Internal field, which can be ignored.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {number || null}
*/
this.FullBackup = null;
/**
* Internal field, which can be ignored.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {number || null}
*/
this.InstanceType = null;
/**
* Instance ID
* @type {string || null}
*/
this.InstanceId = null;
/**
* Instance name
* @type {string || null}
*/
this.InstanceName = null;
/**
* The region where the local backup resides.
* @type {string || null}
*/
this.Region = null;
/**
* Backup end time
* @type {string || null}
*/
this.EndTime = null;
/**
* Backup file type
* @type {string || null}
*/
this.FileType = null;
/**
* Backup file expiration time
* @type {string || null}
*/
this.ExpireTime = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.StartTime = 'StartTime' in params ? params.StartTime : null;
this.BackupId = 'BackupId' in params ? params.BackupId : null;
this.BackupType = 'BackupType' in params ? params.BackupType : null;
this.Status = 'Status' in params ? params.Status : null;
this.Remark = 'Remark' in params ? params.Remark : null;
this.Locked = 'Locked' in params ? params.Locked : null;
this.BackupSize = 'BackupSize' in params ? params.BackupSize : null;
this.FullBackup = 'FullBackup' in params ? params.FullBackup : null;
this.InstanceType = 'InstanceType' in params ? params.InstanceType : null;
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.EndTime = 'EndTime' in params ? params.EndTime : null;
this.FileType = 'FileType' in params ? params.FileType : null;
this.ExpireTime = 'ExpireTime' in params ? params.ExpireTime : null;
}
}
/**
* DescribeInstanceMonitorTopNCmd response structure.
* @class
*/
class DescribeInstanceMonitorTopNCmdResponse extends AbstractModel {
constructor(){
super();
/**
* Access command information
* @type {Array.<SourceCommand> || 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) {
this.Data = new Array();
for (let z in params.Data) {
let obj = new SourceCommand();
obj.deserialize(params.Data[z]);
this.Data.push(obj);
}
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* ModifyInstanceAvailabilityZones response structure.
* @class
*/
class ModifyInstanceAvailabilityZonesResponse extends AbstractModel {
constructor(){
super();
/**
* Task ID.
* @type {number || null}
*/
this.TaskId = null;
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.TaskId = 'TaskId' in params ? params.TaskId : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* ModifyAutoBackupConfig response structure.
* @class
*/
class ModifyAutoBackupConfigResponse extends AbstractModel {
constructor(){
super();
/**
* Automatic backup type. Valid value: `1` (scheduled backup).
* @type {number || null}
*/
this.AutoBackupType = null;
/**
* Automatic backup cycle. Valid values: `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday`, `Sunday`.
* @type {Array.<string> || null}
*/
this.WeekDays = null;
/**
* Time period for automatic scheduled backup in the format of “00:00-01:00, 01:00-02:00...... 23:00-00:00”.
* @type {string || null}
*/
this.TimePeriod = null;
/**
* Retention time of full backup files in days
* @type {number || null}
*/
this.BackupStorageDays = 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.AutoBackupType = 'AutoBackupType' in params ? params.AutoBackupType : null;
this.WeekDays = 'WeekDays' in params ? params.WeekDays : null;
this.TimePeriod = 'TimePeriod' in params ? params.TimePeriod : null;
this.BackupStorageDays = 'BackupStorageDays' in params ? params.BackupStorageDays : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* RestoreInstance request structure.
* @class
*/
class RestoreInstanceRequest extends AbstractModel {
constructor(){
super();
/**
* ID of the instance to be operated on, which can be obtained through the `InstanceId` field in the return value of the `DescribeInstances` API.
* @type {string || null}
*/
this.InstanceId = null;
/**
* Backup ID, which can be obtained through the `backupId` field in the return value of the `GetRedisBackupList` API.
* @type {string || null}
*/
this.BackupId = null;
/**
* Instance password, which needs to be validated during instance restoration (this parameter is not required for password-free instances)
* @type {string || null}
*/
this.Password = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
this.BackupId = 'BackupId' in params ? params.BackupId : null;
this.Password = 'Password' in params ? params.Password : null;
}
}
/**
* AllocateWanAddress request structure.
* @class
*/
class AllocateWanAddressRequest extends AbstractModel {
constructor(){
super();
/**
* Instance ID. Log in to the [Redis console](https://console.tencentcloud.com/redis/instance) and copy it in the instance list.
* @type {string || null}
*/
this.InstanceId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
}
}
/**
* ApplyParamsTemplate request structure.
* @class
*/
class ApplyParamsTemplateRequest extends AbstractModel {
constructor(){
super();
/**
* Instance ID list. Log in to the [Redis console](https://console.tencentcloud.com/redis/instance) and copy the instance ID in the instance list.
* @type {Array.<string> || null}
*/
this.InstanceIds = null;
/**
* ID of the applied parameter template, which can be obtained through the response parameter **TemplateId** of the API [DescribeParamTemplateInfo](https://intl.cloud.tencent.com/document/product/239/58748?from_cn_redirect=1).
* @type {string || null}
*/
this.TemplateId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceIds = 'InstanceIds' in params ? params.InstanceIds : null;
this.TemplateId = 'TemplateId' in params ? params.TemplateId : null;
}
}
/**
* DescribeReplicationGroupInstance request structure.
* @class
*/
class DescribeReplicationGroupInstanceRequest extends AbstractModel {
constructor(){
super();
/**
* Specifies the instance ID. Example: crs-xjhsdj****. Log in to the [TencentDB for Redis console](https://console.cloud.tencent.com/redis) and copy the instance ID in the instance list.
* @type {string || null}
*/
this.InstanceId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
}
}
/**
* UpgradeInstanceVersion response structure.
* @class
*/
class UpgradeInstanceVersionResponse extends AbstractModel {
constructor(){
super();
/**
* Order ID
* @type {string || null}
*/
this.DealId = 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.DealId = 'DealId' in params ? params.DealId : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* CreateInstances request structure.
* @class
*/
class CreateInstancesRequest extends AbstractModel {
constructor(){
super();
/**
* Instance type.
<ul><li>2: Redis 2.8 Memory Edition (standard architecture);</li> <li>3: CKV 3.2 Memory Edition (standard architecture);</li> <li>4: CKV 3.2 Memory Edition (cluster architecture);</li> <li>6: Redis 4.0 Memory Edition (standard architecture);</li> <li>7: Redis 4.0 Memory Edition (cluster architecture);</li> <li>8: Redis 5.0 Memory Edition (standard architecture);</li> <li>9: Redis 5.0 Memory Edition (cluster architecture);</li> <li>15: Redis 6.2 Memory Edition (standard architecture);</li> <li>16: Redis 6.2 Memory Edition (cluster architecture);</li> <li>17: Redis 7.0 Memory Edition (standard architecture);</li> <li>18: Redis 7.0 Memory Edition (cluster architecture). </li>Note: The CKV version is currently used by existing users and is temporarily retained.</ul>
* @type {number || null}
*/
this.TypeId = null;
/**
* Memory capacity in MB, which must be an integer multiple of 1024. For specific specifications, query the sales specifications in all regions through the [DescribeProductInfo](https://intl.cloud.tencent.com/document/api/239/30600?from_cn_redirect=1) API.
- When **TypeId** is a standard architecture, **MemSize** is the total memory capacity of the instance;
- When **TypeId** is a cluster architecture, **MemSize** is the single-shard memory capacity.
* @type {number || null}
*/
this.MemSize = null;
/**
* The number of instances for each purchase. For details, query the sales specifications in all regions through the [DescribeProductInfo](https://intl.cloud.tencent.com/document/api/239/30600?from_cn_redirect=1) API.
* @type {number || null}
*/
this.GoodsNum = null;
/**
* The purchase duration of an instance
- If `BillingMode` is `1`, that is, when the billing mode is monthly subscription, you need to set this parameter to specify the duration of the purchased instance. Unit: month. Value range: [1,2,3,4,5,6,7,8,9,10,11,12,24,36].
- If `BillingMode` is `0`, that is, when the billing mode is pay-as-you-go, you need to set this parameter to `1`.
* @type {number || null}
*/
this.Period = null;
/**
* Billing mode. 0: pay-as-you-go
* @type {number || null}
*/
this.BillingMode = null;
/**
* ID of the AZ where the instance resides. For more information, see [Regions and AZs](https://intl.cloud.tencent.com/document/product/239/4106?from_cn_redirect=1).
* @type {number || null}
*/
this.ZoneId = null;
/**
* Password for accessing instances.
- When the input parameter **NoAuth** is set to **true**, password-free access is set for instances and Password does not need to be configured. Otherwise, Password is required.
- When the instance type parameter **TypeId** is set to Redis 2.8 Memory Edition (standard architecture) or Redis 4.0, 5.0, or 6.0 Memory Edition (standard architecture or cluster architecture), the password cannot start with a forward slash (/) and should contain 8 to 64 characters, including at least two of the following types: lowercase letters, uppercase letters, digits, and special characters (such as ()`~!@#$%^&*-+=_|{}[]:;<>,.?/).
- When the instance type parameter **TypeId** is set to CKV 3.2 Memory Edition (standard architecture or cluster architecture), the password should contain 8 to 30 characters, including only letters and digits.
* @type {string || null}
*/
this.Password = null;
/**
* VPC ID. If this parameter is not passed in, the classic network will be selected by default. You can query the specific VPC ID in the [VPC console](https://console.cloud.tencent.com/vpc).
* @type {string || null}
*/
this.VpcId = null;
/**
* VPC subnet ID. This parameter is not required for the classic network. You can get the specific subnet ID by querying the subnet list in the [VPC console](https://console.cloud.tencent.com/vpc).
* @type {string || null}
*/
this.SubnetId = null;
/**
* Project ID. Log in to the [Redis console](https://console.cloud.tencent.com/redis#/), go to the account information menu in the top-right corner, and select **Project Management** to query the project ID.
* @type {number || null}
*/
this.ProjectId = null;
/**
* Auto-renewal flag
- `0`: Manual renewal (default).
- `1`: Auto-renewal.
- `2`: Not auto-renewal (set by user).
* @type {number || null}
*/
this.AutoRenew = null;
/**
* Array of security group IDs.
- A security group is a virtual firewall that controls network access to cloud database instances. It is recommended to bind the corresponding security group when you create an instance.
- Obtain the security group ID of the instance through the API [DescribeInstanceSecurityGroup](https://intl.cloud.tencent.com/document/product/239/34447?from_cn_redirect=1).
* @type {Array.<string> || null}
*/
this.SecurityGroupIdList = null;
/**
* User-defined network port. Default value: `6379`. Range: [1024,65535].
* @type {number || null}
*/
this.VPort = null;
/**
* Quantity of instance shards
- This parameter is not required for instances of Standard Edition.
- For instances of Cluster Edition, the range of shard quantity is [1, 3, 5, 8, 12, 16, 24, 32, 40, 48, 64, 80, 96, 128].
* @type {number || null}
*/
this.RedisShardNum = null;
/**
* Quantity of instance replicas
- For Redis Memory Edition 4.0, 5.0, 6.2 (regardless of architecture), the range of replica quantity is [1,5].
- For Redis 2.8 Standard Edition and CKV Standard Edition, the replica quantity is `1`.
* @type {number || null}
*/
this.RedisReplicasNum = null;
/**
* Whether to support read-only replicas.
- Redis 2.8 Standard Edition and CKV Standard Edition don’t support read-only replicas.
- If read-only replicas are enabled, read/write separation will be automatically enabled for an instance, with write requests routed to the master node and read requests to the replica node.
- To enable read-only replicas, we recommend that you create two or more replicas.
* @type {boolean || null}
*/
this.ReplicasReadonly = null;
/**
* Instance name, which can contain up to 60 letters, digits, hyphens, and underscores.
* @type {string || null}
*/
this.InstanceName = null;
/**
* Whether to support password-free access for an instance
- `true`: The instance access is password-free.
- `false`: The instance access is password-enabled. Default value: `false`. Only instances in a VPC support the password-free access.
* @type {boolean || null}
*/
this.NoAuth = null;
/**
* The node information of the instance, including node ID, type, and AZ. For more information, see [RedisNodeInfo](https://intl.cloud.tencent.com/document/product/239/20022?from_cn_redirect=1).
Node information of an instance. Currently, information about the node type (master or replica) and node AZ can be passed in. This parameter is not required for instances deployed in a single AZ.
* @type {Array.<RedisNodeInfo> || null}
*/
this.NodeSet = null;
/**
* The tag for an instance
* @type {Array.<ResourceTag> || null}
*/
this.ResourceTags = null;
/**
* Name of the AZ where the instance resides. For more information, see [Regions and AZs](https://intl.cloud.tencent.com/document/product/239/4106?from_cn_redirect=1).
* @type {string || null}
*/
this.ZoneName = null;
/**
* The parameter template ID associated with the instance
- If this parameter is not configured, the system will automatically adapt the corresponding default template based on the selected compatible version and architecture.
- Query the list of parameter templates of an instance to get the template ID through the [DescribeParamTemplates](https://intl.cloud.tencent.com/document/product/239/58750?from_cn_redirect=1) API.
* @type {string || null}
*/
this.TemplateId = null;
/**
* An internal parameter used to indicate whether to check when creating an instance.
- `false`: Default value. Send a normal request and create an instance if all the requirements are met.
- `true`: Send a check request and create no instance.
* @type {boolean || null}
*/
this.DryRun = null;
/**
* The product edition of the instance
- `local`: Local Disk Edition.
- `cloud`: Cloud Disk Edition.
- `cdc`: Dedicated Cluster Edition. Default value: `local`.
* @type {string || null}
*/
this.ProductVersion = null;
/**
* Exclusive cluster ID. When `ProductVersion` is set to `cdc`, this parameter is required.
* @type {string || null}
*/
this.RedisClusterId = null;
/**
* Alarm policy ID array.- Please log in to [Tencent Cloud Observability Platform - Alarm Management - Policy Management](https://console.cloud.tencent.com/monitor/alarm/policy) to access the alarm policy ID.- If this parameter is not configured, the default alarm policy will be bound. For the specific information about the default alarm policy, please log in to [Tencent Cloud Observability Platform - Alarm Management - Policy Management](https://console.cloud.tencent.com/monitor/alarm/policy) to view.
* @type {Array.<string> || null}
*/
this.AlarmPolicyList = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.TypeId = 'TypeId' in params ? params.TypeId : null;
this.MemSize = 'MemSize' in params ? params.MemSize : null;
this.GoodsNum = 'GoodsNum' in params ? params.GoodsNum : null;
this.Period = 'Period' in params ? params.Period : null;
this.BillingMode = 'BillingMode' in params ? params.BillingMode : null;
this.ZoneId = 'ZoneId' in params ? params.ZoneId : null;
this.Password = 'Password' in params ? params.Password : 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.AutoRenew = 'AutoRenew' in params ? params.AutoRenew : null;
this.SecurityGroupIdList = 'SecurityGroupIdList' in params ? params.SecurityGroupIdList : null;
this.VPort = 'VPort' in params ? params.VPort : null;
this.RedisShardNum = 'RedisShardNum' in params ? params.RedisShardNum : null;
this.RedisReplicasNum = 'RedisReplicasNum' in params ? params.RedisReplicasNum : null;
this.ReplicasReadonly = 'ReplicasReadonly' in params ? params.ReplicasReadonly : null;
this.InstanceName = 'InstanceName' in params ? params.InstanceName : null;
this.NoAuth = 'NoAuth' in params ? params.NoAuth : null;
if (params.NodeSet) {
this.NodeSet = new Array();
for (let z in params.NodeSet) {
let obj = new RedisNodeInfo();
obj.deserialize(params.NodeSet[z]);
this.NodeSet.push(obj);
}
}
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);
}
}
this.ZoneName = 'ZoneName' in params ? params.ZoneName : null;
this.TemplateId = 'TemplateId' in params ? params.TemplateId : null;
this.DryRun = 'DryRun' in params ? params.DryRun : null;
this.ProductVersion = 'ProductVersion' in params ? params.ProductVersion : null;
this.RedisClusterId = 'RedisClusterId' in params ? params.RedisClusterId : null;
this.AlarmPolicyList = 'AlarmPolicyList' in params ? params.AlarmPolicyList : null;
}
}
/**
* CreateReplicationGroup request structure.
* @class
*/
class CreateReplicationGroupRequest extends AbstractModel {
constructor(){
super();
/**
* ID of the primary instance in the replication group. Log in to the [Redis console](https://console.tencentcloud.com/redis/instance) and copy it in the instance list.
* @type {string || null}
*/
this.InstanceId = null;
/**
* Replication group name. The name should contain 2 to 64 characters, including only letters, digits, underscores (_), and hyphens (-).
* @type {string || null}
*/
this.GroupName = null;
/**
* Remark information.
* @type {string || null}
*/
this.Remark = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
this.GroupName = 'GroupName' in params ? params.GroupName : null;
this.Remark = 'Remark' in params ? params.Remark : null;
}
}
/**
* DescribeInstanceSpecBandwidth response structure.
* @class
*/
class DescribeInstanceSpecBandwidthResponse 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;
}
}
/**
* DescribeInstanceZoneInfo request structure.
* @class
*/
class DescribeInstanceZoneInfoRequest extends AbstractModel {
constructor(){
super();
/**
* ID of a specified instance, such as "crs-xjhsdj****" Log in to the [Redis console](https://console.cloud.tencent.com/redis) and copy the instance ID in the instance list.
* @type {string || null}
*/
this.InstanceId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
}
}
/**
* ModifyConnectionConfig response structure.
* @class
*/
class ModifyConnectionConfigResponse extends AbstractModel {
constructor(){
super();
/**
* Task ID.
* @type {number || null}
*/
this.TaskId = null;
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.TaskId = 'TaskId' in params ? params.TaskId : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* ModifyNetworkConfig response structure.
* @class
*/
class ModifyNetworkConfigResponse extends AbstractModel {
constructor(){
super();
/**
* Execution status. Ignore this parameter.
* @type {boolean || null}
*/
this.Status = null;
/**
* New subnet ID of the instance
* @type {string || null}
*/
this.SubnetId = null;
/**
* New VPC ID of the instance
* @type {string || null}
*/
this.VpcId = null;
/**
* New private IPv4 address of the instance
* @type {string || null}
*/
this.Vip = null;
/**
* Task ID. Obtain **taskId** and query the task execution status through the API [DescribeTaskInfo](https://intl.cloud.tencent.com/document/product/239/30601?from_cn_redirect=1).
* @type {number || null}
*/
this.TaskId = null;
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Status = 'Status' in params ? params.Status : null;
this.SubnetId = 'SubnetId' in params ? params.SubnetId : null;
this.VpcId = 'VpcId' in params ? params.VpcId : null;
this.Vip = 'Vip' in params ? params.Vip : null;
this.TaskId = 'TaskId' in params ? params.TaskId : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* Command duration
* @class
*/
class CommandTake extends AbstractModel {
constructor(){
super();
/**
* Command name.
* @type {string || null}
*/
this.Cmd = null;
/**
* Time consumed. Unit: ms.
* @type {number || null}
*/
this.Took = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Cmd = 'Cmd' in params ? params.Cmd : null;
this.Took = 'Took' in params ? params.Took : null;
}
}
/**
* DescribeInstanceMonitorBigKey response structure.
* @class
*/
class DescribeInstanceMonitorBigKeyResponse extends AbstractModel {
constructor(){
super();
/**
* Big key details
* @type {Array.<BigKeyInfo> || 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) {
this.Data = new Array();
for (let z in params.Data) {
let obj = new BigKeyInfo();
obj.deserialize(params.Data[z]);
this.Data.push(obj);
}
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* Security group inbound rule
* @class
*/
class Inbound extends AbstractModel {
constructor(){
super();
/**
* Policy. Valid values: ACCEPT, DROP.
* @type {string || null}
*/
this.Action = null;
/**
* All the addresses that the address group ID represents.
* @type {string || null}
*/
this.AddressModule = null;
/**
* Source IP or IP address range, such as 192.168.0.0/16.
* @type {string || null}
*/
this.CidrIp = null;
/**
* Description.
* @type {string || null}
*/
this.Desc = null;
/**
* Network protocol, such as UDP and TCP.
* @type {string || null}
*/
this.IpProtocol = null;
/**
* Port.
* @type {string || null}
*/
this.PortRange = null;
/**
* All the protocols and ports that the service group ID represents.
* @type {string || null}
*/
this.ServiceModule = null;
/**
* All the addresses that the security group ID represents.
* @type {string || null}
*/
this.Id = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Action = 'Action' in params ? params.Action : null;
this.AddressModule = 'AddressModule' in params ? params.AddressModule : null;
this.CidrIp = 'CidrIp' in params ? params.CidrIp : null;
this.Desc = 'Desc' in params ? params.Desc : null;
this.IpProtocol = 'IpProtocol' in params ? params.IpProtocol : null;
this.PortRange = 'PortRange' in params ? params.PortRange : null;
this.ServiceModule = 'ServiceModule' in params ? params.ServiceModule : null;
this.Id = 'Id' in params ? params.Id : null;
}
}
/**
* AssociateSecurityGroups request structure.
* @class
*/
class AssociateSecurityGroupsRequest extends AbstractModel {
constructor(){
super();
/**
* Database engine name, which is `redis` for this API.
* @type {string || null}
*/
this.Product = null;
/**
* ID of the security group to be bound. Obtain it on the [security group](https://console.tencentcloud.com/vpc/security-group) page of the console.
* @type {string || null}
*/
this.SecurityGroupId = null;
/**
* ID of the bound instance. Log in to the [Redis console](https://console.tencentcloud.com/redis/instance) and copy it in the instance list. You can specify multiple instance IDs.
* @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;
}
}
/**
* DescribeTaskList response structure.
* @class
*/
class DescribeTaskListResponse extends AbstractModel {
constructor(){
super();
/**
* Total number of tasks
* @type {number || null}
*/
this.TotalCount = null;
/**
* Task details
* @type {Array.<TaskInfoDetail> || null}
*/
this.Tasks = 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.Tasks) {
this.Tasks = new Array();
for (let z in params.Tasks) {
let obj = new TaskInfoDetail();
obj.deserialize(params.Tasks[z]);
this.Tasks.push(obj);
}
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* ModifyInstancePassword response structure.
* @class
*/
class ModifyInstancePasswordResponse extends AbstractModel {
constructor(){
super();
/**
* Task ID.
* @type {number || null}
*/
this.TaskId = null;
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.TaskId = 'TaskId' in params ? params.TaskId : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* KillMasterGroup response structure.
* @class
*/
class KillMasterGroupResponse extends AbstractModel {
constructor(){
super();
/**
* Async task ID
* @type {number || null}
*/
this.TaskId = null;
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.TaskId = 'TaskId' in params ? params.TaskId : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* RenewInstance response structure.
* @class
*/
class RenewInstanceResponse extends AbstractModel {
constructor(){
super();
/**
* Transaction ID
* @type {string || null}
*/
this.DealId = 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.DealId = 'DealId' in params ? params.DealId : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* DescribeSlowLog response structure.
* @class
*/
class DescribeSlowLogResponse extends AbstractModel {
constructor(){
super();
/**
* Total number of slow queries
* @type {number || null}
*/
this.TotalCount = null;
/**
* Slow query log details. This parameter has been deprecated and will be replaced by InstanceSlowLogDetail because it is not properly named.
* @type {Array.<InstanceSlowlogDetail> || null}
*/
this.InstanceSlowlogDetail = null;
/**
* Details of slow queries.
* @type {Array.<InstanceSlowlogDetail> || null}
*/
this.InstanceSlowLogDetail = 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.InstanceSlowlogDetail) {
this.InstanceSlowlogDetail = new Array();
for (let z in params.InstanceSlowlogDetail) {
let obj = new InstanceSlowlogDetail();
obj.deserialize(params.InstanceSlowlogDetail[z]);
this.InstanceSlowlogDetail.push(obj);
}
}
if (params.InstanceSlowLogDetail) {
this.InstanceSlowLogDetail = new Array();
for (let z in params.InstanceSlowLogDetail) {
let obj = new InstanceSlowlogDetail();
obj.deserialize(params.InstanceSlowLogDetail[z]);
this.InstanceSlowLogDetail.push(obj);
}
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* DescribeCommonDBInstances request structure.
* @class
*/
class DescribeCommonDBInstancesRequest extends AbstractModel {
constructor(){
super();
/**
* List of VPC IDs
* @type {Array.<number> || null}
*/
this.VpcIds = null;
/**
* List of subnet IDs
* @type {Array.<number> || null}
*/
this.SubnetIds = null;
/**
* List of billing modes. 0: monthly subscription; 1: pay-as-you-go
* @type {number || null}
*/
this.PayMode = null;
/**
* Instance ID filter information list, with a maximum array length of 100.
* @type {Array.<string> || null}
*/
this.InstanceIds = null;
/**
* List of instance names
* @type {Array.<string> || null}
*/
this.InstanceNames = null;
/**
* List of instance status
* @type {Array.<string> || null}
*/
this.Status = null;
/**
* Sorting field
* @type {string || null}
*/
this.OrderBy = null;
/**
* Sorting order
* @type {string || null}
*/
this.OrderByType = null;
/**
* List of instance VIPs
* @type {Array.<string> || null}
*/
this.Vips = null;
/**
* List of VPC IDs
* @type {Array.<string> || null}
*/
this.UniqVpcIds = null;
/**
* List of unique subnet IDs
* @type {Array.<string> || null}
*/
this.UniqSubnetIds = null;
/**
* Quantity limit. Recommended default value: 100.
* @type {number || null}
*/
this.Limit = null;