/* * 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. */ namespace TencentCloud.Cdb.V20170320.Models { using Newtonsoft.Json; using System.Collections.Generic; using TencentCloud.Common; public class CreateDBInstanceRequest : AbstractModel { /// /// 实例内存大小,单位:MB,请使用 [获取云数据库可售卖规格](https://cloud.tencent.com/document/api/236/17229) 接口获取可创建的内存规格。 /// [JsonProperty("Memory")] public long? Memory{ get; set; } /// /// 实例硬盘大小,单位:GB,请使用 [获取云数据库可售卖规格](https://cloud.tencent.com/document/api/236/17229) 接口获取可创建的硬盘范围。 /// [JsonProperty("Volume")] public long? Volume{ get; set; } /// /// 实例时长,单位:月,可选值包括 [1,2,3,4,5,6,7,8,9,10,11,12,24,36]。 /// [JsonProperty("Period")] public long? Period{ get; set; } /// /// 实例数量,默认值为1, 最小值1,最大值为100。 /// [JsonProperty("GoodsNum")] public long? GoodsNum{ get; set; } /// /// 可用区信息,该参数缺省时,系统会自动选择一个可用区,请使用 [获取云数据库可售卖规格](https://cloud.tencent.com/document/api/236/17229) 接口获取可创建的可用区。 /// [JsonProperty("Zone")] public string Zone{ get; set; } /// /// 私有网络 ID,如果不传则默认选择基础网络,请使用 [查询私有网络列表](/document/api/215/15778) 。 /// [JsonProperty("UniqVpcId")] public string UniqVpcId{ get; set; } /// /// 私有网络下的子网 ID,如果设置了 UniqVpcId,则 UniqSubnetId 必填,请使用 [查询子网列表](/document/api/215/15784)。 /// [JsonProperty("UniqSubnetId")] public string UniqSubnetId{ get; set; } /// /// 项目 ID,不填为默认项目。请使用 [查询项目列表](https://cloud.tencent.com/document/product/378/4400) 接口获取项目 ID。购买只读实例和灾备实例时,项目 ID 默认和主实例保持一致。 /// [JsonProperty("ProjectId")] public long? ProjectId{ get; set; } /// /// 自定义端口,端口支持范围:[ 1024-65535 ]。 /// [JsonProperty("Port")] public long? Port{ get; set; } /// /// 实例类型,默认为 master,支持值包括:master - 表示主实例,dr - 表示灾备实例,ro - 表示只读实例。 /// [JsonProperty("InstanceRole")] public string InstanceRole{ get; set; } /// /// 实例 ID,购买只读实例时必填,该字段表示只读实例的主实例ID,请使用 [查询实例列表](https://cloud.tencent.com/document/api/236/15872) 接口查询云数据库实例 ID。 /// [JsonProperty("MasterInstanceId")] public string MasterInstanceId{ get; set; } /// /// MySQL 版本,值包括:5.5、5.6 和 5.7,请使用 [获取云数据库可售卖规格](https://cloud.tencent.com/document/api/236/17229) 接口获取可创建的实例版本。 /// [JsonProperty("EngineVersion")] public string EngineVersion{ get; set; } /// /// 设置 root 帐号密码,密码规则:8 - 64 个字符,至少包含字母、数字、字符(支持的字符:_+-&=!@#$%^*())中的两种,购买主实例时可指定该参数,购买只读实例或者灾备实例时指定该参数无意义。 /// [JsonProperty("Password")] public string Password{ get; set; } /// /// 数据复制方式,默认为 0,支持值包括:0 - 表示异步复制,1 - 表示半同步复制,2 - 表示强同步复制。 /// [JsonProperty("ProtectMode")] public long? ProtectMode{ get; set; } /// /// 多可用区域,默认为 0,支持值包括:0 - 表示单可用区,1 - 表示多可用区。 /// [JsonProperty("DeployMode")] public long? DeployMode{ get; set; } /// /// 备库 1 的可用区信息,默认为 Zone 的值。 /// [JsonProperty("SlaveZone")] public string SlaveZone{ get; set; } /// /// 参数列表,参数格式如 ParamList.0.Name=auto_increment&ParamList.0.Value=1。可通过 [查询默认的可设置参数列表](https://cloud.tencent.com/document/api/236/32662) 查询支持设置的参数。 /// [JsonProperty("ParamList")] public ParamInfo[] ParamList{ get; set; } /// /// 备库 2 的可用区信息,默认为空,购买强同步主实例时可指定该参数,购买其他类型实例时指定该参数无意义。 /// [JsonProperty("BackupZone")] public string BackupZone{ get; set; } /// /// 自动续费标记,可选值为:0 - 不自动续费;1 - 自动续费。 /// [JsonProperty("AutoRenewFlag")] public long? AutoRenewFlag{ get; set; } /// /// 主实例地域信息,购买灾备实例时,该字段必填。 /// [JsonProperty("MasterRegion")] public string MasterRegion{ get; set; } /// /// 安全组参数,可使用 [查询项目安全组信息](https://cloud.tencent.com/document/api/236/15850) 接口查询某个项目的安全组详情。 /// [JsonProperty("SecurityGroup")] public string[] SecurityGroup{ get; set; } /// /// 只读实例参数。购买只读实例时,该参数必传。 /// [JsonProperty("RoGroup")] public RoGroup RoGroup{ get; set; } /// /// 实例名称。 /// [JsonProperty("InstanceName")] public string InstanceName{ get; set; } /// /// 实例标签信息。 /// [JsonProperty("ResourceTags")] public TagInfo[] ResourceTags{ get; set; } /// /// 置放群组 ID。 /// [JsonProperty("DeployGroupId")] public string DeployGroupId{ get; set; } /// /// 用于保证请求幂等性的字符串。该字符串由客户生成,需保证不同请求之间在当天内唯一,最大值不超过64个ASCII字符。若不指定该参数,则无法保证请求的幂等性。 /// [JsonProperty("ClientToken")] public string ClientToken{ get; set; } /// /// 实例类型。支持值包括: "HA" - 高可用版实例, "BASIC" - 基础版实例。 不指定则默认为高可用版。 /// [JsonProperty("DeviceType")] public string DeviceType{ get; set; } /// /// For internal usage only. DO NOT USE IT. /// internal override void ToMap(Dictionary map, string prefix) { this.SetParamSimple(map, prefix + "Memory", this.Memory); this.SetParamSimple(map, prefix + "Volume", this.Volume); this.SetParamSimple(map, prefix + "Period", this.Period); this.SetParamSimple(map, prefix + "GoodsNum", this.GoodsNum); this.SetParamSimple(map, prefix + "Zone", this.Zone); this.SetParamSimple(map, prefix + "UniqVpcId", this.UniqVpcId); this.SetParamSimple(map, prefix + "UniqSubnetId", this.UniqSubnetId); this.SetParamSimple(map, prefix + "ProjectId", this.ProjectId); this.SetParamSimple(map, prefix + "Port", this.Port); this.SetParamSimple(map, prefix + "InstanceRole", this.InstanceRole); this.SetParamSimple(map, prefix + "MasterInstanceId", this.MasterInstanceId); this.SetParamSimple(map, prefix + "EngineVersion", this.EngineVersion); this.SetParamSimple(map, prefix + "Password", this.Password); this.SetParamSimple(map, prefix + "ProtectMode", this.ProtectMode); this.SetParamSimple(map, prefix + "DeployMode", this.DeployMode); this.SetParamSimple(map, prefix + "SlaveZone", this.SlaveZone); this.SetParamArrayObj(map, prefix + "ParamList.", this.ParamList); this.SetParamSimple(map, prefix + "BackupZone", this.BackupZone); this.SetParamSimple(map, prefix + "AutoRenewFlag", this.AutoRenewFlag); this.SetParamSimple(map, prefix + "MasterRegion", this.MasterRegion); this.SetParamArraySimple(map, prefix + "SecurityGroup.", this.SecurityGroup); this.SetParamObj(map, prefix + "RoGroup.", this.RoGroup); this.SetParamSimple(map, prefix + "InstanceName", this.InstanceName); this.SetParamArrayObj(map, prefix + "ResourceTags.", this.ResourceTags); this.SetParamSimple(map, prefix + "DeployGroupId", this.DeployGroupId); this.SetParamSimple(map, prefix + "ClientToken", this.ClientToken); this.SetParamSimple(map, prefix + "DeviceType", this.DeviceType); } } }