github.com/morlay/goqcloud@v0.0.0-20181123023149-b00e0b0b9afc/clients/cdb/modify_account_privileges.go (about) 1 package cdb 2 3 import ( 4 github_com_morlay_goqcloud "github.com/morlay/goqcloud" 5 ) 6 7 // 修改云数据库实例账号的权限 8 // https://cloud.tencent.com/document/api/236/17496 9 10 type ModifyAccountPrivilegesRequest struct { 11 // 数据库的账号,包括用户名和域名。 12 Accounts []*Account `name:"Accounts"` 13 // 数据库表中列的权限。Privileges权限的可选值为:"SELECT","INSERT","UPDATE","REFERENCES"。 14 ColumnPrivileges []*ColumnPrivilege `name:"ColumnPrivileges,omitempty"` 15 // 数据库的权限。Privileges权限的可选值为:"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"。 16 DatabasePrivileges []*DatabasePrivilege `name:"DatabasePrivileges,omitempty"` 17 // 全局权限。其中,GlobalPrivileges 中权限的可选值为:"SELECT","INSERT","UPDATE","DELETE","CREATE", "DROP","REFERENCES","INDEX","ALTER","SHOW DATABASES","CREATE TEMPORARY TABLES","LOCK TABLES","EXECUTE","CREATE VIEW","SHOW VIEW","CREATE ROUTINE","ALTER ROUTINE","EVENT","TRIGGER"。 18 GlobalPrivileges []*string `name:"GlobalPrivileges,omitempty"` 19 // 实例ID,格式如:cdb-c1nl9rpv,与云数据库控制台页面中显示的实例ID相同。 20 InstanceId string `name:"InstanceId"` 21 // 区域 22 Region string `name:"Region"` 23 // 数据库中表的权限。Privileges权限的可选值为:权限的可选值为:"SELECT","INSERT","UPDATE","DELETE","CREATE", "DROP","REFERENCES","INDEX","ALTER","CREATE VIEW","SHOW VIEW", "TRIGGER"。 24 TablePrivileges []*TablePrivilege `name:"TablePrivileges,omitempty"` 25 } 26 27 func (req *ModifyAccountPrivilegesRequest) Invoke(client github_com_morlay_goqcloud.Client) (*ModifyAccountPrivilegesResponse, error) { 28 resp := &ModifyAccountPrivilegesResponse{} 29 err := client.Request("cdb", "ModifyAccountPrivileges", "2017-03-20").Do(req, resp) 30 return resp, err 31 } 32 33 type ModifyAccountPrivilegesResponse struct { 34 github_com_morlay_goqcloud.TencentCloudBaseResponse 35 // 异步任务的请求ID,可使用此ID查询异步任务的执行结果。 36 AsyncRequestId string `json:"AsyncRequestId"` 37 }