Files
g.hnyhua.cn/TencentCloud/Mariadb/V20170312/Models/GrantAccountPrivilegesRequest.cs
2026-02-07 15:48:27 +08:00

97 lines
4.2 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*
* 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.Mariadb.V20170312.Models
{
using Newtonsoft.Json;
using System.Collections.Generic;
using TencentCloud.Common;
public class GrantAccountPrivilegesRequest : AbstractModel
{
/// <summary>
/// 实例 ID形如tdsql-ow728lmc可以通过 DescribeDBInstances 查询实例详情获得。
/// </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 参数。当DbName不为\*时,需要传入参 Type。
/// </summary>
[JsonProperty("DbName")]
public string DbName{ get; set; }
/// <summary>
/// 全局权限: SELECTINSERTUPDATEDELETECREATEDROPREFERENCESINDEXALTERCREATE TEMPORARY TABLESLOCK TABLESEXECUTECREATE VIEWSHOW VIEWCREATE ROUTINEALTER ROUTINEEVENTTRIGGERSHOW DATABASES
/// 库权限: SELECTINSERTUPDATEDELETECREATEDROPREFERENCESINDEXALTERCREATE TEMPORARY TABLESLOCK TABLESEXECUTECREATE VIEWSHOW VIEWCREATE ROUTINEALTER ROUTINEEVENTTRIGGER
/// 表/视图权限: SELECTINSERTUPDATEDELETECREATEDROPREFERENCESINDEXALTERCREATE VIEWSHOW VIEWTRIGGER
/// 存储过程/函数权限: ALTER ROUTINEEXECUTE
/// 字段权限: INSERTREFERENCESSELECTUPDATE
/// </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);
}
}
}