87 lines
3.3 KiB
C#
87 lines
3.3 KiB
C#
|
|
/*
|
|||
|
|
* 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.Dcdb.V20180411.Models
|
|||
|
|
{
|
|||
|
|
using Newtonsoft.Json;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using TencentCloud.Common;
|
|||
|
|
|
|||
|
|
public class CreateAccountRequest : AbstractModel
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 实例 ID,形如:dcdbt-ow728lmc,可以通过 DescribeDCDBInstances 查询实例详情获得。
|
|||
|
|
/// </summary>
|
|||
|
|
[JsonProperty("InstanceId")]
|
|||
|
|
public string InstanceId{ get; set; }
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// AccountName
|
|||
|
|
/// </summary>
|
|||
|
|
[JsonProperty("UserName")]
|
|||
|
|
public string UserName{ get; set; }
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 可以登录的主机,与mysql 账号的 host 格式一致,可以支持通配符,例如 %,10.%,10.20.%。
|
|||
|
|
/// </summary>
|
|||
|
|
[JsonProperty("Host")]
|
|||
|
|
public string Host{ get; set; }
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 账号密码,由字母、数字或常见符号组成,不能包含分号、单引号和双引号,长度为6~32位。
|
|||
|
|
/// </summary>
|
|||
|
|
[JsonProperty("Password")]
|
|||
|
|
public string Password{ get; set; }
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 是否创建为只读账号,0:否, 1:该账号的sql请求优先选择备机执行,备机不可用时选择主机执行,2:优先选择备机执行,备机不可用时操作失败,3:只从备机读取。
|
|||
|
|
/// </summary>
|
|||
|
|
[JsonProperty("ReadOnly")]
|
|||
|
|
public long? ReadOnly{ get; set; }
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 账号备注,可以包含中文、英文字符、常见符号和数字,长度为0~256字符
|
|||
|
|
/// </summary>
|
|||
|
|
[JsonProperty("Description")]
|
|||
|
|
public string Description{ get; set; }
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 如果备机延迟超过本参数设置值,系统将认为备机发生故障
|
|||
|
|
/// 建议该参数值大于10。当ReadOnly选择1、2时该参数生效。
|
|||
|
|
/// </summary>
|
|||
|
|
[JsonProperty("DelayThresh")]
|
|||
|
|
public long? DelayThresh{ get; set; }
|
|||
|
|
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// For internal usage only. DO NOT USE IT.
|
|||
|
|
/// </summary>
|
|||
|
|
internal override void ToMap(Dictionary<string, string> map, string prefix)
|
|||
|
|
{
|
|||
|
|
this.SetParamSimple(map, prefix + "InstanceId", this.InstanceId);
|
|||
|
|
this.SetParamSimple(map, prefix + "UserName", this.UserName);
|
|||
|
|
this.SetParamSimple(map, prefix + "Host", this.Host);
|
|||
|
|
this.SetParamSimple(map, prefix + "Password", this.Password);
|
|||
|
|
this.SetParamSimple(map, prefix + "ReadOnly", this.ReadOnly);
|
|||
|
|
this.SetParamSimple(map, prefix + "Description", this.Description);
|
|||
|
|
this.SetParamSimple(map, prefix + "DelayThresh", this.DelayThresh);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|