97 lines
4.1 KiB
C#
97 lines
4.1 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 GrantAccountPrivilegesRequest : AbstractModel
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 实例 ID,形如:dcdbt-ow728lmc。
|
|||
|
|
/// </summary>
|
|||
|
|
[JsonProperty("InstanceId")]
|
|||
|
|
public string InstanceId{ get; set; }
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 登录用户名。
|
|||
|
|
/// </summary>
|
|||
|
|
[JsonProperty("UserName")]
|
|||
|
|
public string UserName{ get; set; }
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 用户允许的访问 host,用户名+host唯一确定一个账号。
|
|||
|
|
/// </summary>
|
|||
|
|
[JsonProperty("Host")]
|
|||
|
|
public string Host{ get; set; }
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 数据库名。如果为 \*,表示查询全局权限(即 \*.\*),此时忽略 Type 和 Object 参数
|
|||
|
|
/// </summary>
|
|||
|
|
[JsonProperty("DbName")]
|
|||
|
|
public string DbName{ get; set; }
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 全局权限: SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,REFERENCES,INDEX,ALTER,CREATE TEMPORARY TABLES,LOCK TABLES,EXECUTE,CREATE VIEW,SHOW VIEW,CREATE ROUTINE,ALTER ROUTINE,EVENT,TRIGGER,SHOW DATABASES
|
|||
|
|
/// 库权限: SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,REFERENCES,INDEX,ALTER,CREATE TEMPORARY TABLES,LOCK TABLES,EXECUTE,CREATE VIEW,SHOW VIEW,CREATE ROUTINE,ALTER ROUTINE,EVENT,TRIGGER
|
|||
|
|
/// 表/视图权限: SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,REFERENCES,INDEX,ALTER,CREATE VIEW,SHOW VIEW,TRIGGER
|
|||
|
|
/// 存储过程/函数权限: ALTER ROUTINE,EXECUTE
|
|||
|
|
/// 字段权限: INSERT,REFERENCES,SELECT,UPDATE
|
|||
|
|
/// </summary>
|
|||
|
|
[JsonProperty("Privileges")]
|
|||
|
|
public string[] Privileges{ get; set; }
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 类型,可以填入 table 、 view 、 proc 、 func 和 \*。当 DbName 为具体数据库名,Type为 \* 时,表示设置该数据库权限(即db.\*),此时忽略 Object 参数
|
|||
|
|
/// </summary>
|
|||
|
|
[JsonProperty("Type")]
|
|||
|
|
public string Type{ get; set; }
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 具体的 Type 的名称,例如 Type 为 table 时就是具体的表名。DbName 和 Type 都为具体名称,则 Object 表示具体对象名,不能为 \* 或者为空
|
|||
|
|
/// </summary>
|
|||
|
|
[JsonProperty("Object")]
|
|||
|
|
public string Object{ get; set; }
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 当 Type=table 时,ColName 为 \* 表示对表授权,如果为具体字段名,表示对字段授权
|
|||
|
|
/// </summary>
|
|||
|
|
[JsonProperty("ColName")]
|
|||
|
|
public string ColName{ 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 + "DbName", this.DbName);
|
|||
|
|
this.SetParamArraySimple(map, prefix + "Privileges.", this.Privileges);
|
|||
|
|
this.SetParamSimple(map, prefix + "Type", this.Type);
|
|||
|
|
this.SetParamSimple(map, prefix + "Object", this.Object);
|
|||
|
|
this.SetParamSimple(map, prefix + "ColName", this.ColName);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|