diff --git a/go.mod b/go.mod index 4eaf34aaed..3d5dea7507 100644 --- a/go.mod +++ b/go.mod @@ -30,9 +30,9 @@ require ( github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/clb v1.0.283 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cloudaudit v1.0.199 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cls v1.0.291 - github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.358 + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.359 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm v1.0.351 - github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cynosdb v1.0.199 + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cynosdb v1.0.359 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dayu v1.0.335 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dc v1.0.199 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dnspod v1.0.294 diff --git a/go.sum b/go.sum index aba134a1be..691acd153f 100644 --- a/go.sum +++ b/go.sum @@ -494,14 +494,16 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.351/go.mod github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.353 h1:rFkcKuLFxt2xolSWbyeznetTBw9Cyhe1ycILmEkE1Pk= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.353/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.357/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.358 h1:RYuj1gziHnMubqjsq6Be7+mv8QhSboD4FKYauEXWheI= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.358/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.359 h1:m7Ga+AAWcngpWVIU6TjtyJ2MZupZvyY4soTNKDYQVVs= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.359/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm v1.0.199 h1:ajgJogYSIQ5u1PIbiV5nsvr5K0fYpm1/T7Dy+mxEM6U= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm v1.0.199/go.mod h1:AqyM/ZZMD7q5mHBqNY9YImbSpEpoEe7E/vrTbUWX+po= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm v1.0.351 h1:zqJsH5pxGT57La7NAOOyMQxsuM11pupNBwV1dzXcT24= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm v1.0.351/go.mod h1:IZH6xMdFwRrdxy6nEOdxdor+1AwDoOu/GG4PfPajwzM= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cynosdb v1.0.199 h1:L0twFkJMOZzLkX08w8S14nX6oanD8YxMQDIaYXVim6A= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cynosdb v1.0.199/go.mod h1:AvfGfE5JXkyMV6uGd6B++SIDp+VV/SSphg1q2RiANFw= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cynosdb v1.0.359 h1:cNKqelPgUxrJkLY0Azd2QHr/UMYOPPnmqs88clt2akk= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cynosdb v1.0.359/go.mod h1:GlTYjlrf8EKEMu+Z2MXfaM2/nHGUBBF/huBBJqGyGwI= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dayu v1.0.199 h1:CzZEt6l0qDjZUW8D8rUNQ/sKw6z6oYYdWuby3hlsn8g= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dayu v1.0.199/go.mod h1:pz4s3nOhoB9cY0+uWzifuwr7lfh/Gvi1rv0ADxpPzD4= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dayu v1.0.335 h1:D8qrelkK5udv8RzJJIABMzItGIyaZoYnxEVeIsYqiNw= diff --git a/tencentcloud/data_source_tc_mysql_default_params.go b/tencentcloud/data_source_tc_mysql_default_params.go new file mode 100644 index 0000000000..a6593871ad --- /dev/null +++ b/tencentcloud/data_source_tc_mysql_default_params.go @@ -0,0 +1,163 @@ +/* +Provide a datasource to query default mysql parameters. + +Example Usage + +```hcl +resource "tencentcloud_mysql_default_params" "mysql_57" { + db_version = "5.7" +} +``` + + +*/ +package tencentcloud + +import ( + "context" + "fmt" + "math/rand" + + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper" +) + +func datasourceTencentCloudMysqlDefaultParams() *schema.Resource { + return &schema.Resource{ + Read: datasourceTencentCloudMysqlDefaultParamsRead, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Schema: map[string]*schema.Schema{ + "db_version": { + Type: schema.TypeString, + Optional: true, + Description: "MySQL database version.", + }, + //"template_type": { + // Type: schema.TypeString, + // Optional: true, + // Description: "", + //}, + "result_output_file": { + Type: schema.TypeString, + Optional: true, + Description: "Used for save results.", + }, + "param_list": { + Type: schema.TypeList, + Computed: true, + Description: "List of param detail.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "current_value": { + Type: schema.TypeString, + Computed: true, + Description: "Param current value.", + }, + "default": { + Type: schema.TypeString, + Computed: true, + Description: "Param default value.", + }, + "description": { + Type: schema.TypeString, + Computed: true, + Description: "Param description.", + }, + "enum_value": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Description: "Params available values if type of param is enum.", + }, + "max": { + Type: schema.TypeInt, + Computed: true, + Description: "Param maximum value if type of param is integer.", + }, + "min": { + Type: schema.TypeInt, + Computed: true, + Description: "Param minimum value if type of param is integer.", + }, + "name": { + Type: schema.TypeString, + Computed: true, + Description: "Param key name.", + }, + "need_reboot": { + Type: schema.TypeInt, + Computed: true, + Description: "Indicates weather the database instance reboot if param modified.", + }, + "param_type": { + Type: schema.TypeString, + Computed: true, + Description: "Type of param.", + }, + }, + }, + }, + }, + } +} + +func datasourceTencentCloudMysqlDefaultParamsRead(d *schema.ResourceData, meta interface{}) error { + defer logElapsed("datasource.tencentcloud_mysql_default_params.read")() + defer inconsistentCheck(d, meta)() + + logId := getLogId(contextNil) + ctx := context.WithValue(context.TODO(), logIdKey, logId) + + client := meta.(*TencentCloudClient).apiV3Conn + service := MysqlService{client: client} + + engineVersion := d.Get("db_version").(string) + + params, err := service.DescribeDefaultParameters(ctx, engineVersion) + + if err != nil { + d.SetId("") + return err + } + + d.SetId(fmt.Sprintf("mysql-params-%d", rand.Intn(1000))) + + paramList := make([]map[string]interface{}, 0, len(params)) + + for i := range params { + item := params[i] + param := map[string]interface{}{ + "current_value": item.CurrentValue, + "default": item.Default, + "description": item.Description, + "max": item.Max, + "min": item.Min, + "name": item.Name, + "need_reboot": item.NeedReboot, + "param_type": item.ParamType, + } + + if item.EnumValue != nil { + param["enum_value"] = helper.StringsInterfaces(item.EnumValue) + } + paramList = append(paramList, param) + } + + if len(paramList) > 0 { + err = d.Set("param_list", paramList) + if err != nil { + return err + } + } + + output, ok := d.GetOk("result_output_file") + if ok && output.(string) != "" { + if e := writeToFile(output.(string), params); e != nil { + return e + } + } + + return nil +} diff --git a/tencentcloud/data_source_tc_mysql_default_params_test.go b/tencentcloud/data_source_tc_mysql_default_params_test.go new file mode 100644 index 0000000000..74570b3ca7 --- /dev/null +++ b/tencentcloud/data_source_tc_mysql_default_params_test.go @@ -0,0 +1,38 @@ +package tencentcloud + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" +) + +func TestAccTencentCloudDataSourceMysqlDefaultParams(t *testing.T) { + t.Parallel() + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccDataSourceMysqlDefaultParamBasic, + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr("data.tencentcloud_mysql_default_params.mysql_57", "db_version", "5.7"), + resource.TestCheckResourceAttrSet("data.tencentcloud_mysql_default_params.mysql_57", "param_list.#"), + resource.TestCheckResourceAttrSet("data.tencentcloud_mysql_default_params.mysql_57", "param_list.0.current_value"), + resource.TestCheckResourceAttrSet("data.tencentcloud_mysql_default_params.mysql_57", "param_list.0.default"), + resource.TestCheckResourceAttrSet("data.tencentcloud_mysql_default_params.mysql_57", "param_list.0.description"), + resource.TestCheckResourceAttrSet("data.tencentcloud_mysql_default_params.mysql_57", "param_list.0.max"), + resource.TestCheckResourceAttrSet("data.tencentcloud_mysql_default_params.mysql_57", "param_list.0.min"), + resource.TestCheckResourceAttrSet("data.tencentcloud_mysql_default_params.mysql_57", "param_list.0.name"), + resource.TestCheckResourceAttrSet("data.tencentcloud_mysql_default_params.mysql_57", "param_list.0.need_reboot"), + resource.TestCheckResourceAttrSet("data.tencentcloud_mysql_default_params.mysql_57", "param_list.0.param_type"), + ), + }, + }, + }) +} + +const testAccDataSourceMysqlDefaultParamBasic = ` +data "tencentcloud_mysql_default_params" "mysql_57" { + db_version = "5.7" +} +` diff --git a/tencentcloud/extension_cynosdb.go b/tencentcloud/extension_cynosdb.go index 8bb1c01d5d..703a3e24d3 100644 --- a/tencentcloud/extension_cynosdb.go +++ b/tencentcloud/extension_cynosdb.go @@ -316,6 +316,30 @@ func TencentCynosdbClusterBaseInfo() map[string]*schema.Schema { }, }, }, + "param_items": { + Type: schema.TypeList, + Optional: true, + Description: "Specify parameter list of database. Use `data.tencentcloud_mysql_default_params` to query available parameter details.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + Description: "Name of param, e.g. `character_set_server`.", + }, + "old_value": { + Type: schema.TypeString, + Optional: true, + Description: "Param old value, indicates the value which already set, this value is required when modifying current_value.", + }, + "current_value": { + Type: schema.TypeString, + Required: true, + Description: "Param expected value to set.", + }, + }, + }, + }, } for k, v := range TencentCynosdbInstanceBaseInfo() { diff --git a/tencentcloud/provider.go b/tencentcloud/provider.go index ff43eb005d..a1ab5bdc9f 100644 --- a/tencentcloud/provider.go +++ b/tencentcloud/provider.go @@ -379,6 +379,7 @@ MySQL tencentcloud_mysql_backup_list tencentcloud_mysql_instance tencentcloud_mysql_parameter_list + tencentcloud_mysql_default_params tencentcloud_mysql_zone_config Resource @@ -758,6 +759,7 @@ func Provider() terraform.ResourceProvider { "tencentcloud_mysql_backup_list": dataSourceTencentMysqlBackupList(), "tencentcloud_mysql_zone_config": dataSourceTencentMysqlZoneConfig(), "tencentcloud_mysql_parameter_list": dataSourceTencentCloudMysqlParameterList(), + "tencentcloud_mysql_default_params": datasourceTencentCloudMysqlDefaultParams(), "tencentcloud_mysql_instance": dataSourceTencentCloudMysqlInstance(), "tencentcloud_cos_bucket_object": dataSourceTencentCloudCosBucketObject(), "tencentcloud_cos_buckets": dataSourceTencentCloudCosBuckets(), diff --git a/tencentcloud/resource_tc_cynosdb_cluster.go b/tencentcloud/resource_tc_cynosdb_cluster.go index e3ed3c8a63..8a701eb33f 100644 --- a/tencentcloud/resource_tc_cynosdb_cluster.go +++ b/tencentcloud/resource_tc_cynosdb_cluster.go @@ -28,6 +28,11 @@ resource "tencentcloud_cynosdb_cluster" "foo" { instance_cpu_core = 1 instance_memory_size = 2 + param_item { + name = "character_set_server" + current_value = "utf8mb4" + } + tags = { test = "test" } @@ -58,6 +63,8 @@ import ( "fmt" "log" + sdkErrors "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors" @@ -110,6 +117,24 @@ func resourceTencentCloudCynosdbClusterCreate(d *schema.ResourceData, meta inter request.StorageLimit = helper.IntInt64(v.(int)) } + // set params + if v, ok := d.GetOk("param_items"); ok { + paramItems := v.([]interface{}) + request.ClusterParams = make([]*cynosdb.ParamItem, 0, len(paramItems)) + + for i := range paramItems { + item := paramItems[i].(map[string]interface{}) + name := item["name"].(string) + value := item["current_value"].(string) + param := &cynosdb.ParamItem{ + ParamName: &name, + CurrentValue: &value, + } + + request.ClusterParams = append(request.ClusterParams, param) + } + } + // instance info request.Cpu = helper.IntInt64(d.Get("instance_cpu_core").(int)) request.Memory = helper.IntInt64(d.Get("instance_memory_size").(int)) @@ -480,6 +505,74 @@ func resourceTencentCloudCynosdbClusterUpdate(d *schema.ResourceData, meta inter d.SetPartial("instance_maintain_duration") } + // update param + if d.HasChange("param_items") { + o, n := d.GetChange("param_items") + oldParams := o.([]interface{}) + newParams := n.([]interface{}) + + if len(oldParams) > len(newParams) { + return fmt.Errorf("`param_items` dosen't support remove for now") + } + + request := cynosdb.NewModifyClusterParamRequest() + request.ClusterId = &clusterId + request.IsInMaintainPeriod = helper.String("no") + + for i := range newParams { + item := newParams[i].(map[string]interface{}) + name := item["name"].(string) + oldVal, ok := item["old_value"].(string) + currVal := item["current_value"].(string) + param := &cynosdb.ParamItem{ + ParamName: &name, + CurrentValue: &currVal, + } + if ok { + param.OldValue = &oldVal + } + request.ParamList = append(request.ParamList, param) + } + + var ( + asyncRequestId string + ) + err := resource.Retry(writeRetryTimeout, func() *resource.RetryError { + aReqId, modifyErr := cynosdbService.ModifyClusterParam(ctx, request) + if modifyErr != nil { + err := modifyErr.(*sdkErrors.TencentCloudSDKError) + if err.Code == "FailedOperation.OperationFailedError" { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + asyncRequestId = aReqId + return nil + }) + if err != nil { + return err + } + + mysqlService := MysqlService{client: client} + + err = resource.Retry(readRetryTimeout, func() *resource.RetryError { + taskStatus, message, err := mysqlService.DescribeAsyncRequestInfo(ctx, asyncRequestId) + if err != nil { + return resource.NonRetryableError(err) + } + if taskStatus == MYSQL_TASK_STATUS_SUCCESS { + return nil + } + if taskStatus == MYSQL_TASK_STATUS_INITIAL || taskStatus == MYSQL_TASK_STATUS_RUNNING { + return resource.RetryableError(fmt.Errorf("%s modify params task status is %s", clusterId, taskStatus)) + } + err = fmt.Errorf("%s create account task status is %s,we won't wait for it finish ,it show message:%s", clusterId, taskStatus, message) + return resource.NonRetryableError(err) + }) + + d.SetPartial("param_items") + } + // update tags if d.HasChange("tags") { oldTags, newTags := d.GetChange("tags") @@ -534,8 +627,12 @@ func resourceTencentCloudCynosdbClusterDelete(d *schema.ResourceData, meta inter } forceDelete := d.Get("force_delete").(bool) - var err error - if err = cynosdbService.IsolateCluster(ctx, clusterID); err != nil { + var ( + err error + ) + _, err = cynosdbService.IsolateCluster(ctx, clusterID) + + if err != nil { return err } diff --git a/tencentcloud/resource_tc_cynosdb_cluster_test.go b/tencentcloud/resource_tc_cynosdb_cluster_test.go index e5c92fbc9b..798d524175 100644 --- a/tencentcloud/resource_tc_cynosdb_cluster_test.go +++ b/tencentcloud/resource_tc_cynosdb_cluster_test.go @@ -54,6 +54,9 @@ func TestAccTencentCloudCynosdbClusterResource(t *testing.T) { resource.TestCheckResourceAttrSet("tencentcloud_cynosdb_cluster.foo", "rw_group_addr.0.ip"), resource.TestCheckResourceAttrSet("tencentcloud_cynosdb_cluster.foo", "rw_group_addr.0.port"), resource.TestCheckResourceAttrSet("tencentcloud_cynosdb_cluster.foo", "ro_group_id"), + resource.TestCheckResourceAttr("tencentcloud_cynosdb_cluster.foo", "param_items.#", "1"), + resource.TestCheckResourceAttr("tencentcloud_cynosdb_cluster.foo", "param_items.0.name", "character_set_server"), + resource.TestCheckResourceAttr("tencentcloud_cynosdb_cluster.foo", "param_items.0.current_value", "utf8"), ), }, { @@ -67,13 +70,17 @@ func TestAccTencentCloudCynosdbClusterResource(t *testing.T) { //resource.TestCheckResourceAttr("tencentcloud_cynosdb_cluster.foo", "tags.test", "test-update"), resource.TestCheckResourceAttr("tencentcloud_cynosdb_cluster.foo", "rw_group_sg.#", "1"), resource.TestCheckResourceAttr("tencentcloud_cynosdb_cluster.foo", "ro_group_sg.#", "1"), + resource.TestCheckResourceAttr("tencentcloud_cynosdb_cluster.foo", "param_items.#", "1"), + resource.TestCheckResourceAttr("tencentcloud_cynosdb_cluster.foo", "param_items.0.name", "character_set_server"), + resource.TestCheckResourceAttr("tencentcloud_cynosdb_cluster.foo", "param_items.0.old_value", "utf8"), + resource.TestCheckResourceAttr("tencentcloud_cynosdb_cluster.foo", "param_items.0.current_value", "utf8mb4"), ), }, { ResourceName: "tencentcloud_cynosdb_cluster.foo", ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"password", "force_delete", "storage_limit"}, + ImportStateVerifyIgnore: []string{"password", "force_delete", "storage_limit", "param_items"}, }, }, }) @@ -228,6 +235,10 @@ resource "tencentcloud_cynosdb_cluster" "foo" { instance_cpu_core = 1 instance_memory_size = 2 + param_items { + name = "character_set_server" + current_value = "utf8" + } # tags = { # test = "test" @@ -268,6 +279,12 @@ resource "tencentcloud_cynosdb_cluster" "foo" { instance_cpu_core = 2 instance_memory_size = 4 + param_items { + name = "character_set_server" + old_value = "utf8" + current_value = "utf8mb4" + } + # tags = { # test = "test-update" # } diff --git a/tencentcloud/service_tencentcloud_cynosdb.go b/tencentcloud/service_tencentcloud_cynosdb.go index 8abc2f2491..98c133a1a7 100644 --- a/tencentcloud/service_tencentcloud_cynosdb.go +++ b/tencentcloud/service_tencentcloud_cynosdb.go @@ -186,7 +186,7 @@ func (me *CynosdbService) ModifyMaintainPeriodConfig(ctx context.Context, instan return } -func (me *CynosdbService) IsolateCluster(ctx context.Context, clusterId string) (errRet error) { +func (me *CynosdbService) IsolateCluster(ctx context.Context, clusterId string) (flowId int64, errRet error) { logId := getLogId(ctx) request := cynosdb.NewIsolateClusterRequest() @@ -194,7 +194,7 @@ func (me *CynosdbService) IsolateCluster(ctx context.Context, clusterId string) errRet = resource.Retry(writeRetryTimeout, func() *resource.RetryError { ratelimit.Check(request.GetAction()) - _, errRet = me.client.UseCynosdbClient().IsolateCluster(request) + response, errRet := me.client.UseCynosdbClient().IsolateCluster(request) if errRet != nil { // isolate after creation immediately will encounter this error if ee, ok := errRet.(*sdkErrors.TencentCloudSDKError); ok { @@ -206,6 +206,9 @@ func (me *CynosdbService) IsolateCluster(ctx context.Context, clusterId string) log.Printf("[CRITAL]%s api[%s] fail, reason:%s", logId, request.GetAction(), errRet.Error()) return retryError(errRet) } + if response.Response.FlowId != nil { + flowId = *response.Response.FlowId + } return nil }) @@ -398,6 +401,31 @@ func (me *CynosdbService) ModifyInsGrpSecurityGroups(ctx context.Context, insGrp return } +func (me *CynosdbService) ModifyClusterParam(ctx context.Context, request *cynosdb.ModifyClusterParamRequest) (asyncReqId string, errRet error) { + logId := getLogId(ctx) + defer func() { + if errRet != nil { + log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n", + logId, request.GetAction(), request.ToJsonString(), errRet.Error()) + } + }() + + ratelimit.Check(request.GetAction()) + response, err := me.client.UseCynosdbClient().ModifyClusterParam(request) + + if err != nil { + errRet = err + return + } + + asyncReqId = *response.Response.AsyncRequestId + + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", + logId, request.GetAction(), request.ToJsonString(), response.ToJsonString()) + + return +} + func (me *CynosdbService) IsolateInstance(ctx context.Context, clusterId, instanceId string) (errRet error) { logId := getLogId(ctx) request := cynosdb.NewIsolateInstanceRequest() diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/request.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/request.go index 4c223e16a8..efd3f8094a 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/request.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/request.go @@ -240,7 +240,7 @@ func CompleteCommonParams(request Request, region string) { params["Action"] = request.GetAction() params["Timestamp"] = strconv.FormatInt(time.Now().Unix(), 10) params["Nonce"] = strconv.Itoa(rand.Int()) - params["RequestClient"] = "SDK_GO_1.0.358" + params["RequestClient"] = "SDK_GO_1.0.359" } func ConstructParams(req Request) (err error) { diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cynosdb/v20190107/client.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cynosdb/v20190107/client.go index b3dad35304..b3163c84b7 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cynosdb/v20190107/client.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cynosdb/v20190107/client.go @@ -15,6 +15,7 @@ package v20190107 import ( + "context" "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common" tchttp "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http" "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile" @@ -34,7 +35,7 @@ func NewClientWithSecretId(secretId, secretKey, region string) (client *Client, return } -func NewClient(credential *common.Credential, region string, clientProfile *profile.ClientProfile) (client *Client, err error) { +func NewClient(credential common.CredentialIface, region string, clientProfile *profile.ClientProfile) (client *Client, err error) { client = &Client{} client.Init(region). WithCredential(credential). @@ -43,11 +44,81 @@ func NewClient(credential *common.Credential, region string, clientProfile *prof } +func NewActivateInstanceRequest() (request *ActivateInstanceRequest) { + request = &ActivateInstanceRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cynosdb", APIVersion, "ActivateInstance") + + + return +} + +func NewActivateInstanceResponse() (response *ActivateInstanceResponse) { + response = &ActivateInstanceResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ActivateInstance +// 本接口(ActivateInstance)用于恢复已隔离的实例访问。 +// +// 可能返回的错误码: +// FAILEDOPERATION_DATABASEACCESSERROR = "FailedOperation.DatabaseAccessError" +// FAILEDOPERATION_FLOWCREATEERROR = "FailedOperation.FlowCreateError" +// FAILEDOPERATION_OPERATIONFAILEDERROR = "FailedOperation.OperationFailedError" +// INTERNALERROR_DBOPERATIONFAILED = "InternalError.DbOperationFailed" +// INVALIDPARAMETERVALUE_INSTANCENOTFOUND = "InvalidParameterValue.InstanceNotFound" +// INVALIDPARAMETERVALUE_PREPAYPAYMODEERROR = "InvalidParameterValue.PrePayPayModeError" +// OPERATIONDENIED_CLUSTEROPNOTALLOWEDERROR = "OperationDenied.ClusterOpNotAllowedError" +// RESOURCENOTFOUND_CLUSTERNOTFOUNDERROR = "ResourceNotFound.ClusterNotFoundError" +// RESOURCEUNAVAILABLE_INSTANCELOCKFAIL = "ResourceUnavailable.InstanceLockFail" +// RESOURCEUNAVAILABLE_INSTANCESTATUSABNORMAL = "ResourceUnavailable.InstanceStatusAbnormal" +// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" +func (c *Client) ActivateInstance(request *ActivateInstanceRequest) (response *ActivateInstanceResponse, err error) { + if request == nil { + request = NewActivateInstanceRequest() + } + + response = NewActivateInstanceResponse() + err = c.Send(request, response) + return +} + +// ActivateInstance +// 本接口(ActivateInstance)用于恢复已隔离的实例访问。 +// +// 可能返回的错误码: +// FAILEDOPERATION_DATABASEACCESSERROR = "FailedOperation.DatabaseAccessError" +// FAILEDOPERATION_FLOWCREATEERROR = "FailedOperation.FlowCreateError" +// FAILEDOPERATION_OPERATIONFAILEDERROR = "FailedOperation.OperationFailedError" +// INTERNALERROR_DBOPERATIONFAILED = "InternalError.DbOperationFailed" +// INVALIDPARAMETERVALUE_INSTANCENOTFOUND = "InvalidParameterValue.InstanceNotFound" +// INVALIDPARAMETERVALUE_PREPAYPAYMODEERROR = "InvalidParameterValue.PrePayPayModeError" +// OPERATIONDENIED_CLUSTEROPNOTALLOWEDERROR = "OperationDenied.ClusterOpNotAllowedError" +// RESOURCENOTFOUND_CLUSTERNOTFOUNDERROR = "ResourceNotFound.ClusterNotFoundError" +// RESOURCEUNAVAILABLE_INSTANCELOCKFAIL = "ResourceUnavailable.InstanceLockFail" +// RESOURCEUNAVAILABLE_INSTANCESTATUSABNORMAL = "ResourceUnavailable.InstanceStatusAbnormal" +// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" +func (c *Client) ActivateInstanceWithContext(ctx context.Context, request *ActivateInstanceRequest) (response *ActivateInstanceResponse, err error) { + if request == nil { + request = NewActivateInstanceRequest() + } + request.SetContext(ctx) + + response = NewActivateInstanceResponse() + err = c.Send(request, response) + return +} + func NewAddInstancesRequest() (request *AddInstancesRequest) { request = &AddInstancesRequest{ BaseRequest: &tchttp.BaseRequest{}, } request.Init().WithApiInfo("cynosdb", APIVersion, "AddInstances") + + return } @@ -62,6 +133,9 @@ func NewAddInstancesResponse() (response *AddInstancesResponse) { // 本接口(AddInstances)用于集群添加实例 // // 可能返回的错误码: +// FAILEDOPERATION_DATABASEACCESSERROR = "FailedOperation.DatabaseAccessError" +// FAILEDOPERATION_OPERATIONFAILEDERROR = "FailedOperation.OperationFailedError" +// FAILEDOPERATION_TRADECREATEORDERERROR = "FailedOperation.TradeCreateOrderError" // INTERNALERROR_DBOPERATIONFAILED = "InternalError.DbOperationFailed" // INTERNALERROR_GETSUBNETFAILED = "InternalError.GetSubnetFailed" // INTERNALERROR_GETVPCFAILED = "InternalError.GetVpcFailed" @@ -73,21 +147,120 @@ func NewAddInstancesResponse() (response *AddInstancesResponse) { // INVALIDPARAMETERVALUE_SUBNETNOTFOUND = "InvalidParameterValue.SubnetNotFound" // INVALIDPARAMETERVALUE_VPCNOTFOUND = "InvalidParameterValue.VpcNotFound" // LIMITEXCEEDED_USERINSTANCELIMIT = "LimitExceeded.UserInstanceLimit" +// OPERATIONDENIED_CLUSTEROPNOTALLOWEDERROR = "OperationDenied.ClusterOpNotAllowedError" +// OPERATIONDENIED_CLUSTERSTATUSDENIEDERROR = "OperationDenied.ClusterStatusDeniedError" +// OPERATIONDENIED_INSUFFICIENTBALANCEERROR = "OperationDenied.InsufficientBalanceError" +// OPERATIONDENIED_USERNOTAUTHENTICATEDERROR = "OperationDenied.UserNotAuthenticatedError" +// RESOURCENOTFOUND_CLUSTERNOTFOUNDERROR = "ResourceNotFound.ClusterNotFoundError" // UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" func (c *Client) AddInstances(request *AddInstancesRequest) (response *AddInstancesResponse, err error) { if request == nil { request = NewAddInstancesRequest() } + + response = NewAddInstancesResponse() + err = c.Send(request, response) + return +} + +// AddInstances +// 本接口(AddInstances)用于集群添加实例 +// +// 可能返回的错误码: +// FAILEDOPERATION_DATABASEACCESSERROR = "FailedOperation.DatabaseAccessError" +// FAILEDOPERATION_OPERATIONFAILEDERROR = "FailedOperation.OperationFailedError" +// FAILEDOPERATION_TRADECREATEORDERERROR = "FailedOperation.TradeCreateOrderError" +// INTERNALERROR_DBOPERATIONFAILED = "InternalError.DbOperationFailed" +// INTERNALERROR_GETSUBNETFAILED = "InternalError.GetSubnetFailed" +// INTERNALERROR_GETVPCFAILED = "InternalError.GetVpcFailed" +// INVALIDPARAMETERVALUE_DBTYPENOTFOUND = "InvalidParameterValue.DBTypeNotFound" +// INVALIDPARAMETERVALUE_ILLEGALPASSWORD = "InvalidParameterValue.IllegalPassword" +// INVALIDPARAMETERVALUE_INVALIDSPEC = "InvalidParameterValue.InvalidSpec" +// INVALIDPARAMETERVALUE_PARAMERROR = "InvalidParameterValue.ParamError" +// INVALIDPARAMETERVALUE_REGIONZONEUNAVAILABLE = "InvalidParameterValue.RegionZoneUnavailable" +// INVALIDPARAMETERVALUE_SUBNETNOTFOUND = "InvalidParameterValue.SubnetNotFound" +// INVALIDPARAMETERVALUE_VPCNOTFOUND = "InvalidParameterValue.VpcNotFound" +// LIMITEXCEEDED_USERINSTANCELIMIT = "LimitExceeded.UserInstanceLimit" +// OPERATIONDENIED_CLUSTEROPNOTALLOWEDERROR = "OperationDenied.ClusterOpNotAllowedError" +// OPERATIONDENIED_CLUSTERSTATUSDENIEDERROR = "OperationDenied.ClusterStatusDeniedError" +// OPERATIONDENIED_INSUFFICIENTBALANCEERROR = "OperationDenied.InsufficientBalanceError" +// OPERATIONDENIED_USERNOTAUTHENTICATEDERROR = "OperationDenied.UserNotAuthenticatedError" +// RESOURCENOTFOUND_CLUSTERNOTFOUNDERROR = "ResourceNotFound.ClusterNotFoundError" +// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" +func (c *Client) AddInstancesWithContext(ctx context.Context, request *AddInstancesRequest) (response *AddInstancesResponse, err error) { + if request == nil { + request = NewAddInstancesRequest() + } + request.SetContext(ctx) + response = NewAddInstancesResponse() err = c.Send(request, response) return } +func NewAssociateSecurityGroupsRequest() (request *AssociateSecurityGroupsRequest) { + request = &AssociateSecurityGroupsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cynosdb", APIVersion, "AssociateSecurityGroups") + + + return +} + +func NewAssociateSecurityGroupsResponse() (response *AssociateSecurityGroupsResponse) { + response = &AssociateSecurityGroupsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// AssociateSecurityGroups +// 安全组批量绑定云资源 +// +// 可能返回的错误码: +// FAILEDOPERATION_OPERATIONFAILEDERROR = "FailedOperation.OperationFailedError" +// INTERNALERROR_LISTINSTANCEFAILED = "InternalError.ListInstanceFailed" +// INTERNALERROR_QUERYDATABASEFAILED = "InternalError.QueryDatabaseFailed" +// INVALIDPARAMETERVALUE_INSTANCENOTFOUND = "InvalidParameterValue.InstanceNotFound" +// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" +func (c *Client) AssociateSecurityGroups(request *AssociateSecurityGroupsRequest) (response *AssociateSecurityGroupsResponse, err error) { + if request == nil { + request = NewAssociateSecurityGroupsRequest() + } + + response = NewAssociateSecurityGroupsResponse() + err = c.Send(request, response) + return +} + +// AssociateSecurityGroups +// 安全组批量绑定云资源 +// +// 可能返回的错误码: +// FAILEDOPERATION_OPERATIONFAILEDERROR = "FailedOperation.OperationFailedError" +// INTERNALERROR_LISTINSTANCEFAILED = "InternalError.ListInstanceFailed" +// INTERNALERROR_QUERYDATABASEFAILED = "InternalError.QueryDatabaseFailed" +// INVALIDPARAMETERVALUE_INSTANCENOTFOUND = "InvalidParameterValue.InstanceNotFound" +// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" +func (c *Client) AssociateSecurityGroupsWithContext(ctx context.Context, request *AssociateSecurityGroupsRequest) (response *AssociateSecurityGroupsResponse, err error) { + if request == nil { + request = NewAssociateSecurityGroupsRequest() + } + request.SetContext(ctx) + + response = NewAssociateSecurityGroupsResponse() + err = c.Send(request, response) + return +} + func NewCreateClustersRequest() (request *CreateClustersRequest) { request = &CreateClustersRequest{ BaseRequest: &tchttp.BaseRequest{}, } request.Init().WithApiInfo("cynosdb", APIVersion, "CreateClusters") + + return } @@ -104,33 +277,196 @@ func NewCreateClustersResponse() (response *CreateClustersResponse) { // 可能返回的错误码: // FAILEDOPERATION_CREATEORDER = "FailedOperation.CreateOrder" // FAILEDOPERATION_INSUFFICIENTBALANCE = "FailedOperation.InsufficientBalance" +// FAILEDOPERATION_TRADECREATEORDERERROR = "FailedOperation.TradeCreateOrderError" // INTERNALERROR_DBOPERATIONFAILED = "InternalError.DbOperationFailed" // INTERNALERROR_GETSUBNETFAILED = "InternalError.GetSubnetFailed" // INTERNALERROR_GETVPCFAILED = "InternalError.GetVpcFailed" +// INTERNALERROR_INTERNALHTTPSERVERERROR = "InternalError.InternalHttpServerError" +// INTERNALERROR_UNKNOWNERROR = "InternalError.UnknownError" // INVALIDPARAMETERVALUE_DBTYPENOTFOUND = "InvalidParameterValue.DBTypeNotFound" // INVALIDPARAMETERVALUE_ILLEGALPASSWORD = "InvalidParameterValue.IllegalPassword" // INVALIDPARAMETERVALUE_INVALIDDBVERSION = "InvalidParameterValue.InvalidDBVersion" +// INVALIDPARAMETERVALUE_INVALIDPARAMETERVALUEERROR = "InvalidParameterValue.InvalidParameterValueError" // INVALIDPARAMETERVALUE_INVALIDSPEC = "InvalidParameterValue.InvalidSpec" +// INVALIDPARAMETERVALUE_INVALIDZONEIDERROR = "InvalidParameterValue.InvalidZoneIdError" // INVALIDPARAMETERVALUE_REGIONZONEUNAVAILABLE = "InvalidParameterValue.RegionZoneUnavailable" // INVALIDPARAMETERVALUE_SUBNETNOTFOUND = "InvalidParameterValue.SubnetNotFound" // INVALIDPARAMETERVALUE_VPCNOTFOUND = "InvalidParameterValue.VpcNotFound" // LIMITEXCEEDED_USERINSTANCELIMIT = "LimitExceeded.UserInstanceLimit" +// OPERATIONDENIED_INSUFFICIENTBALANCEERROR = "OperationDenied.InsufficientBalanceError" +// OPERATIONDENIED_USERNOTAUTHENTICATEDERROR = "OperationDenied.UserNotAuthenticatedError" // UNAUTHORIZEDOPERATION_NOTREALNAMEACCOUNT = "UnauthorizedOperation.NotRealNameAccount" // UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" func (c *Client) CreateClusters(request *CreateClustersRequest) (response *CreateClustersResponse, err error) { if request == nil { request = NewCreateClustersRequest() } + + response = NewCreateClustersResponse() + err = c.Send(request, response) + return +} + +// CreateClusters +// 创建集群 +// +// 可能返回的错误码: +// FAILEDOPERATION_CREATEORDER = "FailedOperation.CreateOrder" +// FAILEDOPERATION_INSUFFICIENTBALANCE = "FailedOperation.InsufficientBalance" +// FAILEDOPERATION_TRADECREATEORDERERROR = "FailedOperation.TradeCreateOrderError" +// INTERNALERROR_DBOPERATIONFAILED = "InternalError.DbOperationFailed" +// INTERNALERROR_GETSUBNETFAILED = "InternalError.GetSubnetFailed" +// INTERNALERROR_GETVPCFAILED = "InternalError.GetVpcFailed" +// INTERNALERROR_INTERNALHTTPSERVERERROR = "InternalError.InternalHttpServerError" +// INTERNALERROR_UNKNOWNERROR = "InternalError.UnknownError" +// INVALIDPARAMETERVALUE_DBTYPENOTFOUND = "InvalidParameterValue.DBTypeNotFound" +// INVALIDPARAMETERVALUE_ILLEGALPASSWORD = "InvalidParameterValue.IllegalPassword" +// INVALIDPARAMETERVALUE_INVALIDDBVERSION = "InvalidParameterValue.InvalidDBVersion" +// INVALIDPARAMETERVALUE_INVALIDPARAMETERVALUEERROR = "InvalidParameterValue.InvalidParameterValueError" +// INVALIDPARAMETERVALUE_INVALIDSPEC = "InvalidParameterValue.InvalidSpec" +// INVALIDPARAMETERVALUE_INVALIDZONEIDERROR = "InvalidParameterValue.InvalidZoneIdError" +// INVALIDPARAMETERVALUE_REGIONZONEUNAVAILABLE = "InvalidParameterValue.RegionZoneUnavailable" +// INVALIDPARAMETERVALUE_SUBNETNOTFOUND = "InvalidParameterValue.SubnetNotFound" +// INVALIDPARAMETERVALUE_VPCNOTFOUND = "InvalidParameterValue.VpcNotFound" +// LIMITEXCEEDED_USERINSTANCELIMIT = "LimitExceeded.UserInstanceLimit" +// OPERATIONDENIED_INSUFFICIENTBALANCEERROR = "OperationDenied.InsufficientBalanceError" +// OPERATIONDENIED_USERNOTAUTHENTICATEDERROR = "OperationDenied.UserNotAuthenticatedError" +// UNAUTHORIZEDOPERATION_NOTREALNAMEACCOUNT = "UnauthorizedOperation.NotRealNameAccount" +// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" +func (c *Client) CreateClustersWithContext(ctx context.Context, request *CreateClustersRequest) (response *CreateClustersResponse, err error) { + if request == nil { + request = NewCreateClustersRequest() + } + request.SetContext(ctx) + response = NewCreateClustersResponse() err = c.Send(request, response) return } +func NewDescribeAccountAllGrantPrivilegesRequest() (request *DescribeAccountAllGrantPrivilegesRequest) { + request = &DescribeAccountAllGrantPrivilegesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cynosdb", APIVersion, "DescribeAccountAllGrantPrivileges") + + + return +} + +func NewDescribeAccountAllGrantPrivilegesResponse() (response *DescribeAccountAllGrantPrivilegesResponse) { + response = &DescribeAccountAllGrantPrivilegesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeAccountAllGrantPrivileges +// 账号所有权限 +// +// 可能返回的错误码: +// FAILEDOPERATION_DATABASEACCESSERROR = "FailedOperation.DatabaseAccessError" +// FAILEDOPERATION_OPERATIONFAILEDERROR = "FailedOperation.OperationFailedError" +// INTERNALERROR_DBOPERATIONFAILED = "InternalError.DbOperationFailed" +// INTERNALERROR_GETSECURITYGROUPDETAILFAILED = "InternalError.GetSecurityGroupDetailFailed" +// INTERNALERROR_GETSUBNETFAILED = "InternalError.GetSubnetFailed" +// INTERNALERROR_GETVPCFAILED = "InternalError.GetVpcFailed" +// INTERNALERROR_LISTINSTANCEFAILED = "InternalError.ListInstanceFailed" +// INTERNALERROR_OPERATEWANFAIL = "InternalError.OperateWanFail" +// INTERNALERROR_OPERATIONNOTSUPPORT = "InternalError.OperationNotSupport" +// INTERNALERROR_QUERYDATABASEFAILED = "InternalError.QueryDatabaseFailed" +// INTERNALERROR_SYSTEMERROR = "InternalError.SystemError" +// INVALIDPARAMETER_ISOLATENOTALLOWED = "InvalidParameter.IsolateNotAllowed" +// INVALIDPARAMETERVALUE_ACCOUNTEXIST = "InvalidParameterValue.AccountExist" +// INVALIDPARAMETERVALUE_ACCOUNTNOTEXISTERROR = "InvalidParameterValue.AccountNotExistError" +// INVALIDPARAMETERVALUE_DBTYPENOTFOUND = "InvalidParameterValue.DBTypeNotFound" +// INVALIDPARAMETERVALUE_FLOWNOTFOUND = "InvalidParameterValue.FlowNotFound" +// INVALIDPARAMETERVALUE_ILLEGALINSTANCENAME = "InvalidParameterValue.IllegalInstanceName" +// INVALIDPARAMETERVALUE_ILLEGALORDERBY = "InvalidParameterValue.IllegalOrderBy" +// INVALIDPARAMETERVALUE_ILLEGALPASSWORD = "InvalidParameterValue.IllegalPassword" +// INVALIDPARAMETERVALUE_INSTANCENOTFOUND = "InvalidParameterValue.InstanceNotFound" +// INVALIDPARAMETERVALUE_INTERNALACCOUNT = "InvalidParameterValue.InternalAccount" +// INVALIDPARAMETERVALUE_INVALIDDBVERSION = "InvalidParameterValue.InvalidDBVersion" +// INVALIDPARAMETERVALUE_INVALIDSPEC = "InvalidParameterValue.InvalidSpec" +// INVALIDPARAMETERVALUE_PARAMERROR = "InvalidParameterValue.ParamError" +// INVALIDPARAMETERVALUE_REGIONZONEUNAVAILABLE = "InvalidParameterValue.RegionZoneUnavailable" +// INVALIDPARAMETERVALUE_STORAGEPOOLNOTFOUND = "InvalidParameterValue.StoragePoolNotFound" +// INVALIDPARAMETERVALUE_SUBNETNOTFOUND = "InvalidParameterValue.SubnetNotFound" +// INVALIDPARAMETERVALUE_VPCNOTFOUND = "InvalidParameterValue.VpcNotFound" +// LIMITEXCEEDED_USERINSTANCELIMIT = "LimitExceeded.UserInstanceLimit" +// OPERATIONDENIED_INSTANCESTATUSDENIEDERROR = "OperationDenied.InstanceStatusDeniedError" +// OPERATIONDENIED_SERVERLESSINSTANCESTATUSDENIED = "OperationDenied.ServerlessInstanceStatusDenied" +// RESOURCENOTFOUND_CLUSTERNOTFOUNDERROR = "ResourceNotFound.ClusterNotFoundError" +// RESOURCEUNAVAILABLE_INSTANCELOCKFAIL = "ResourceUnavailable.InstanceLockFail" +// RESOURCEUNAVAILABLE_INSTANCESTATUSABNORMAL = "ResourceUnavailable.InstanceStatusAbnormal" +// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" +func (c *Client) DescribeAccountAllGrantPrivileges(request *DescribeAccountAllGrantPrivilegesRequest) (response *DescribeAccountAllGrantPrivilegesResponse, err error) { + if request == nil { + request = NewDescribeAccountAllGrantPrivilegesRequest() + } + + response = NewDescribeAccountAllGrantPrivilegesResponse() + err = c.Send(request, response) + return +} + +// DescribeAccountAllGrantPrivileges +// 账号所有权限 +// +// 可能返回的错误码: +// FAILEDOPERATION_DATABASEACCESSERROR = "FailedOperation.DatabaseAccessError" +// FAILEDOPERATION_OPERATIONFAILEDERROR = "FailedOperation.OperationFailedError" +// INTERNALERROR_DBOPERATIONFAILED = "InternalError.DbOperationFailed" +// INTERNALERROR_GETSECURITYGROUPDETAILFAILED = "InternalError.GetSecurityGroupDetailFailed" +// INTERNALERROR_GETSUBNETFAILED = "InternalError.GetSubnetFailed" +// INTERNALERROR_GETVPCFAILED = "InternalError.GetVpcFailed" +// INTERNALERROR_LISTINSTANCEFAILED = "InternalError.ListInstanceFailed" +// INTERNALERROR_OPERATEWANFAIL = "InternalError.OperateWanFail" +// INTERNALERROR_OPERATIONNOTSUPPORT = "InternalError.OperationNotSupport" +// INTERNALERROR_QUERYDATABASEFAILED = "InternalError.QueryDatabaseFailed" +// INTERNALERROR_SYSTEMERROR = "InternalError.SystemError" +// INVALIDPARAMETER_ISOLATENOTALLOWED = "InvalidParameter.IsolateNotAllowed" +// INVALIDPARAMETERVALUE_ACCOUNTEXIST = "InvalidParameterValue.AccountExist" +// INVALIDPARAMETERVALUE_ACCOUNTNOTEXISTERROR = "InvalidParameterValue.AccountNotExistError" +// INVALIDPARAMETERVALUE_DBTYPENOTFOUND = "InvalidParameterValue.DBTypeNotFound" +// INVALIDPARAMETERVALUE_FLOWNOTFOUND = "InvalidParameterValue.FlowNotFound" +// INVALIDPARAMETERVALUE_ILLEGALINSTANCENAME = "InvalidParameterValue.IllegalInstanceName" +// INVALIDPARAMETERVALUE_ILLEGALORDERBY = "InvalidParameterValue.IllegalOrderBy" +// INVALIDPARAMETERVALUE_ILLEGALPASSWORD = "InvalidParameterValue.IllegalPassword" +// INVALIDPARAMETERVALUE_INSTANCENOTFOUND = "InvalidParameterValue.InstanceNotFound" +// INVALIDPARAMETERVALUE_INTERNALACCOUNT = "InvalidParameterValue.InternalAccount" +// INVALIDPARAMETERVALUE_INVALIDDBVERSION = "InvalidParameterValue.InvalidDBVersion" +// INVALIDPARAMETERVALUE_INVALIDSPEC = "InvalidParameterValue.InvalidSpec" +// INVALIDPARAMETERVALUE_PARAMERROR = "InvalidParameterValue.ParamError" +// INVALIDPARAMETERVALUE_REGIONZONEUNAVAILABLE = "InvalidParameterValue.RegionZoneUnavailable" +// INVALIDPARAMETERVALUE_STORAGEPOOLNOTFOUND = "InvalidParameterValue.StoragePoolNotFound" +// INVALIDPARAMETERVALUE_SUBNETNOTFOUND = "InvalidParameterValue.SubnetNotFound" +// INVALIDPARAMETERVALUE_VPCNOTFOUND = "InvalidParameterValue.VpcNotFound" +// LIMITEXCEEDED_USERINSTANCELIMIT = "LimitExceeded.UserInstanceLimit" +// OPERATIONDENIED_INSTANCESTATUSDENIEDERROR = "OperationDenied.InstanceStatusDeniedError" +// OPERATIONDENIED_SERVERLESSINSTANCESTATUSDENIED = "OperationDenied.ServerlessInstanceStatusDenied" +// RESOURCENOTFOUND_CLUSTERNOTFOUNDERROR = "ResourceNotFound.ClusterNotFoundError" +// RESOURCEUNAVAILABLE_INSTANCELOCKFAIL = "ResourceUnavailable.InstanceLockFail" +// RESOURCEUNAVAILABLE_INSTANCESTATUSABNORMAL = "ResourceUnavailable.InstanceStatusAbnormal" +// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" +func (c *Client) DescribeAccountAllGrantPrivilegesWithContext(ctx context.Context, request *DescribeAccountAllGrantPrivilegesRequest) (response *DescribeAccountAllGrantPrivilegesResponse, err error) { + if request == nil { + request = NewDescribeAccountAllGrantPrivilegesRequest() + } + request.SetContext(ctx) + + response = NewDescribeAccountAllGrantPrivilegesResponse() + err = c.Send(request, response) + return +} + func NewDescribeAccountsRequest() (request *DescribeAccountsRequest) { request = &DescribeAccountsRequest{ BaseRequest: &tchttp.BaseRequest{}, } request.Init().WithApiInfo("cynosdb", APIVersion, "DescribeAccounts") + + return } @@ -145,14 +481,42 @@ func NewDescribeAccountsResponse() (response *DescribeAccountsResponse) { // 本接口(DescribeAccounts)用于查询数据库管理账号。 // // 可能返回的错误码: +// FAILEDOPERATION_DATABASEACCESSERROR = "FailedOperation.DatabaseAccessError" +// FAILEDOPERATION_OPERATIONFAILEDERROR = "FailedOperation.OperationFailedError" // INTERNALERROR_DBOPERATIONFAILED = "InternalError.DbOperationFailed" // INTERNALERROR_SYSTEMERROR = "InternalError.SystemError" // INVALIDPARAMETERVALUE_INSTANCENOTFOUND = "InvalidParameterValue.InstanceNotFound" +// OPERATIONDENIED_SERVERLESSINSTANCESTATUSDENIED = "OperationDenied.ServerlessInstanceStatusDenied" +// RESOURCENOTFOUND_CLUSTERNOTFOUNDERROR = "ResourceNotFound.ClusterNotFoundError" // UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" func (c *Client) DescribeAccounts(request *DescribeAccountsRequest) (response *DescribeAccountsResponse, err error) { if request == nil { request = NewDescribeAccountsRequest() } + + response = NewDescribeAccountsResponse() + err = c.Send(request, response) + return +} + +// DescribeAccounts +// 本接口(DescribeAccounts)用于查询数据库管理账号。 +// +// 可能返回的错误码: +// FAILEDOPERATION_DATABASEACCESSERROR = "FailedOperation.DatabaseAccessError" +// FAILEDOPERATION_OPERATIONFAILEDERROR = "FailedOperation.OperationFailedError" +// INTERNALERROR_DBOPERATIONFAILED = "InternalError.DbOperationFailed" +// INTERNALERROR_SYSTEMERROR = "InternalError.SystemError" +// INVALIDPARAMETERVALUE_INSTANCENOTFOUND = "InvalidParameterValue.InstanceNotFound" +// OPERATIONDENIED_SERVERLESSINSTANCESTATUSDENIED = "OperationDenied.ServerlessInstanceStatusDenied" +// RESOURCENOTFOUND_CLUSTERNOTFOUNDERROR = "ResourceNotFound.ClusterNotFoundError" +// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" +func (c *Client) DescribeAccountsWithContext(ctx context.Context, request *DescribeAccountsRequest) (response *DescribeAccountsResponse, err error) { + if request == nil { + request = NewDescribeAccountsRequest() + } + request.SetContext(ctx) + response = NewDescribeAccountsResponse() err = c.Send(request, response) return @@ -163,6 +527,8 @@ func NewDescribeBackupConfigRequest() (request *DescribeBackupConfigRequest) { BaseRequest: &tchttp.BaseRequest{}, } request.Init().WithApiInfo("cynosdb", APIVersion, "DescribeBackupConfig") + + return } @@ -177,14 +543,42 @@ func NewDescribeBackupConfigResponse() (response *DescribeBackupConfigResponse) // 获取指定集群的备份配置信息,包括全量备份时间段,备份文件保留时间 // // 可能返回的错误码: +// FAILEDOPERATION_DATABASEACCESSERROR = "FailedOperation.DatabaseAccessError" +// FAILEDOPERATION_GETBACKUPSTRATEGYERROR = "FailedOperation.GetBackupStrategyError" +// FAILEDOPERATION_OPERATIONFAILEDERROR = "FailedOperation.OperationFailedError" // INTERNALERROR_SYSTEMERROR = "InternalError.SystemError" // INVALIDPARAMETERVALUE_PARAMERROR = "InvalidParameterValue.ParamError" // INVALIDPARAMETERVALUE_STORAGEPOOLNOTFOUND = "InvalidParameterValue.StoragePoolNotFound" +// RESOURCENOTFOUND_CLUSTERNOTFOUNDERROR = "ResourceNotFound.ClusterNotFoundError" // UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" func (c *Client) DescribeBackupConfig(request *DescribeBackupConfigRequest) (response *DescribeBackupConfigResponse, err error) { if request == nil { request = NewDescribeBackupConfigRequest() } + + response = NewDescribeBackupConfigResponse() + err = c.Send(request, response) + return +} + +// DescribeBackupConfig +// 获取指定集群的备份配置信息,包括全量备份时间段,备份文件保留时间 +// +// 可能返回的错误码: +// FAILEDOPERATION_DATABASEACCESSERROR = "FailedOperation.DatabaseAccessError" +// FAILEDOPERATION_GETBACKUPSTRATEGYERROR = "FailedOperation.GetBackupStrategyError" +// FAILEDOPERATION_OPERATIONFAILEDERROR = "FailedOperation.OperationFailedError" +// INTERNALERROR_SYSTEMERROR = "InternalError.SystemError" +// INVALIDPARAMETERVALUE_PARAMERROR = "InvalidParameterValue.ParamError" +// INVALIDPARAMETERVALUE_STORAGEPOOLNOTFOUND = "InvalidParameterValue.StoragePoolNotFound" +// RESOURCENOTFOUND_CLUSTERNOTFOUNDERROR = "ResourceNotFound.ClusterNotFoundError" +// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" +func (c *Client) DescribeBackupConfigWithContext(ctx context.Context, request *DescribeBackupConfigRequest) (response *DescribeBackupConfigResponse, err error) { + if request == nil { + request = NewDescribeBackupConfigRequest() + } + request.SetContext(ctx) + response = NewDescribeBackupConfigResponse() err = c.Send(request, response) return @@ -195,6 +589,8 @@ func NewDescribeBackupListRequest() (request *DescribeBackupListRequest) { BaseRequest: &tchttp.BaseRequest{}, } request.Init().WithApiInfo("cynosdb", APIVersion, "DescribeBackupList") + + return } @@ -209,15 +605,42 @@ func NewDescribeBackupListResponse() (response *DescribeBackupListResponse) { // 查询备份文件列表 // // 可能返回的错误码: +// FAILEDOPERATION_OPERATIONFAILEDERROR = "FailedOperation.OperationFailedError" // INTERNALERROR_DBOPERATIONFAILED = "InternalError.DbOperationFailed" // INTERNALERROR_SYSTEMERROR = "InternalError.SystemError" +// INVALIDPARAMETERVALUE_INVALIDPARAMETERVALUEERROR = "InvalidParameterValue.InvalidParameterValueError" // INVALIDPARAMETERVALUE_PARAMERROR = "InvalidParameterValue.ParamError" // INVALIDPARAMETERVALUE_STORAGEPOOLNOTFOUND = "InvalidParameterValue.StoragePoolNotFound" +// RESOURCENOTFOUND_CLUSTERNOTFOUNDERROR = "ResourceNotFound.ClusterNotFoundError" // UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" func (c *Client) DescribeBackupList(request *DescribeBackupListRequest) (response *DescribeBackupListResponse, err error) { if request == nil { request = NewDescribeBackupListRequest() } + + response = NewDescribeBackupListResponse() + err = c.Send(request, response) + return +} + +// DescribeBackupList +// 查询备份文件列表 +// +// 可能返回的错误码: +// FAILEDOPERATION_OPERATIONFAILEDERROR = "FailedOperation.OperationFailedError" +// INTERNALERROR_DBOPERATIONFAILED = "InternalError.DbOperationFailed" +// INTERNALERROR_SYSTEMERROR = "InternalError.SystemError" +// INVALIDPARAMETERVALUE_INVALIDPARAMETERVALUEERROR = "InvalidParameterValue.InvalidParameterValueError" +// INVALIDPARAMETERVALUE_PARAMERROR = "InvalidParameterValue.ParamError" +// INVALIDPARAMETERVALUE_STORAGEPOOLNOTFOUND = "InvalidParameterValue.StoragePoolNotFound" +// RESOURCENOTFOUND_CLUSTERNOTFOUNDERROR = "ResourceNotFound.ClusterNotFoundError" +// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" +func (c *Client) DescribeBackupListWithContext(ctx context.Context, request *DescribeBackupListRequest) (response *DescribeBackupListResponse, err error) { + if request == nil { + request = NewDescribeBackupListRequest() + } + request.SetContext(ctx) + response = NewDescribeBackupListResponse() err = c.Send(request, response) return @@ -228,6 +651,8 @@ func NewDescribeClusterDetailRequest() (request *DescribeClusterDetailRequest) { BaseRequest: &tchttp.BaseRequest{}, } request.Init().WithApiInfo("cynosdb", APIVersion, "DescribeClusterDetail") + + return } @@ -242,32 +667,69 @@ func NewDescribeClusterDetailResponse() (response *DescribeClusterDetailResponse // 显示集群详情 // // 可能返回的错误码: +// FAILEDOPERATION_CAMSIGANDAUTHERROR = "FailedOperation.CamSigAndAuthError" +// FAILEDOPERATION_DATABASEACCESSERROR = "FailedOperation.DatabaseAccessError" +// FAILEDOPERATION_OPERATIONFAILEDERROR = "FailedOperation.OperationFailedError" // INTERNALERROR_DBOPERATIONFAILED = "InternalError.DbOperationFailed" // INTERNALERROR_GETVPCFAILED = "InternalError.GetVpcFailed" // INTERNALERROR_SYSTEMERROR = "InternalError.SystemError" +// INTERNALERROR_UNKNOWNERROR = "InternalError.UnknownError" // INVALIDPARAMETERVALUE_CLUSTERNOTFOUND = "InvalidParameterValue.ClusterNotFound" // INVALIDPARAMETERVALUE_INSTANCENOTFOUND = "InvalidParameterValue.InstanceNotFound" +// INVALIDPARAMETERVALUE_INVALIDPARAMETERVALUEERROR = "InvalidParameterValue.InvalidParameterValueError" // INVALIDPARAMETERVALUE_SUBNETNOTFOUND = "InvalidParameterValue.SubnetNotFound" +// RESOURCENOTFOUND_CLUSTERNOTFOUNDERROR = "ResourceNotFound.ClusterNotFoundError" // UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" func (c *Client) DescribeClusterDetail(request *DescribeClusterDetailRequest) (response *DescribeClusterDetailResponse, err error) { if request == nil { request = NewDescribeClusterDetailRequest() } + response = NewDescribeClusterDetailResponse() err = c.Send(request, response) return } -func NewDescribeClusterInstanceGrpsRequest() (request *DescribeClusterInstanceGrpsRequest) { - request = &DescribeClusterInstanceGrpsRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("cynosdb", APIVersion, "DescribeClusterInstanceGrps") - return -} - -func NewDescribeClusterInstanceGrpsResponse() (response *DescribeClusterInstanceGrpsResponse) { - response = &DescribeClusterInstanceGrpsResponse{ +// DescribeClusterDetail +// 显示集群详情 +// +// 可能返回的错误码: +// FAILEDOPERATION_CAMSIGANDAUTHERROR = "FailedOperation.CamSigAndAuthError" +// FAILEDOPERATION_DATABASEACCESSERROR = "FailedOperation.DatabaseAccessError" +// FAILEDOPERATION_OPERATIONFAILEDERROR = "FailedOperation.OperationFailedError" +// INTERNALERROR_DBOPERATIONFAILED = "InternalError.DbOperationFailed" +// INTERNALERROR_GETVPCFAILED = "InternalError.GetVpcFailed" +// INTERNALERROR_SYSTEMERROR = "InternalError.SystemError" +// INTERNALERROR_UNKNOWNERROR = "InternalError.UnknownError" +// INVALIDPARAMETERVALUE_CLUSTERNOTFOUND = "InvalidParameterValue.ClusterNotFound" +// INVALIDPARAMETERVALUE_INSTANCENOTFOUND = "InvalidParameterValue.InstanceNotFound" +// INVALIDPARAMETERVALUE_INVALIDPARAMETERVALUEERROR = "InvalidParameterValue.InvalidParameterValueError" +// INVALIDPARAMETERVALUE_SUBNETNOTFOUND = "InvalidParameterValue.SubnetNotFound" +// RESOURCENOTFOUND_CLUSTERNOTFOUNDERROR = "ResourceNotFound.ClusterNotFoundError" +// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" +func (c *Client) DescribeClusterDetailWithContext(ctx context.Context, request *DescribeClusterDetailRequest) (response *DescribeClusterDetailResponse, err error) { + if request == nil { + request = NewDescribeClusterDetailRequest() + } + request.SetContext(ctx) + + response = NewDescribeClusterDetailResponse() + err = c.Send(request, response) + return +} + +func NewDescribeClusterInstanceGrpsRequest() (request *DescribeClusterInstanceGrpsRequest) { + request = &DescribeClusterInstanceGrpsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cynosdb", APIVersion, "DescribeClusterInstanceGrps") + + + return +} + +func NewDescribeClusterInstanceGrpsResponse() (response *DescribeClusterInstanceGrpsResponse) { + response = &DescribeClusterInstanceGrpsResponse{ BaseResponse: &tchttp.BaseResponse{}, } return @@ -277,22 +739,104 @@ func NewDescribeClusterInstanceGrpsResponse() (response *DescribeClusterInstance // 本接口(DescribeClusterInstanceGrps)用于查询实例组 // // 可能返回的错误码: +// FAILEDOPERATION_DATABASEACCESSERROR = "FailedOperation.DatabaseAccessError" +// FAILEDOPERATION_OPERATIONFAILEDERROR = "FailedOperation.OperationFailedError" // INTERNALERROR_DBOPERATIONFAILED = "InternalError.DbOperationFailed" +// RESOURCENOTFOUND_CLUSTERNOTFOUNDERROR = "ResourceNotFound.ClusterNotFoundError" // UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" func (c *Client) DescribeClusterInstanceGrps(request *DescribeClusterInstanceGrpsRequest) (response *DescribeClusterInstanceGrpsResponse, err error) { if request == nil { request = NewDescribeClusterInstanceGrpsRequest() } + + response = NewDescribeClusterInstanceGrpsResponse() + err = c.Send(request, response) + return +} + +// DescribeClusterInstanceGrps +// 本接口(DescribeClusterInstanceGrps)用于查询实例组 +// +// 可能返回的错误码: +// FAILEDOPERATION_DATABASEACCESSERROR = "FailedOperation.DatabaseAccessError" +// FAILEDOPERATION_OPERATIONFAILEDERROR = "FailedOperation.OperationFailedError" +// INTERNALERROR_DBOPERATIONFAILED = "InternalError.DbOperationFailed" +// RESOURCENOTFOUND_CLUSTERNOTFOUNDERROR = "ResourceNotFound.ClusterNotFoundError" +// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" +func (c *Client) DescribeClusterInstanceGrpsWithContext(ctx context.Context, request *DescribeClusterInstanceGrpsRequest) (response *DescribeClusterInstanceGrpsResponse, err error) { + if request == nil { + request = NewDescribeClusterInstanceGrpsRequest() + } + request.SetContext(ctx) + response = NewDescribeClusterInstanceGrpsResponse() err = c.Send(request, response) return } +func NewDescribeClusterParamLogsRequest() (request *DescribeClusterParamLogsRequest) { + request = &DescribeClusterParamLogsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cynosdb", APIVersion, "DescribeClusterParamLogs") + + + return +} + +func NewDescribeClusterParamLogsResponse() (response *DescribeClusterParamLogsResponse) { + response = &DescribeClusterParamLogsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeClusterParamLogs +// 本接口(DescribeClusterParamLogs)查询参数修改日志 +// +// 可能返回的错误码: +// FAILEDOPERATION_DATABASEACCESSERROR = "FailedOperation.DatabaseAccessError" +// FAILEDOPERATION_FLOWNOTFOUNDERROR = "FailedOperation.FlowNotFoundError" +// INTERNALERROR_DBOPERATIONFAILED = "InternalError.DbOperationFailed" +// INVALIDPARAMETERVALUE_FLOWNOTFOUND = "InvalidParameterValue.FlowNotFound" +// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" +func (c *Client) DescribeClusterParamLogs(request *DescribeClusterParamLogsRequest) (response *DescribeClusterParamLogsResponse, err error) { + if request == nil { + request = NewDescribeClusterParamLogsRequest() + } + + response = NewDescribeClusterParamLogsResponse() + err = c.Send(request, response) + return +} + +// DescribeClusterParamLogs +// 本接口(DescribeClusterParamLogs)查询参数修改日志 +// +// 可能返回的错误码: +// FAILEDOPERATION_DATABASEACCESSERROR = "FailedOperation.DatabaseAccessError" +// FAILEDOPERATION_FLOWNOTFOUNDERROR = "FailedOperation.FlowNotFoundError" +// INTERNALERROR_DBOPERATIONFAILED = "InternalError.DbOperationFailed" +// INVALIDPARAMETERVALUE_FLOWNOTFOUND = "InvalidParameterValue.FlowNotFound" +// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" +func (c *Client) DescribeClusterParamLogsWithContext(ctx context.Context, request *DescribeClusterParamLogsRequest) (response *DescribeClusterParamLogsResponse, err error) { + if request == nil { + request = NewDescribeClusterParamLogsRequest() + } + request.SetContext(ctx) + + response = NewDescribeClusterParamLogsResponse() + err = c.Send(request, response) + return +} + func NewDescribeClustersRequest() (request *DescribeClustersRequest) { request = &DescribeClustersRequest{ BaseRequest: &tchttp.BaseRequest{}, } request.Init().WithApiInfo("cynosdb", APIVersion, "DescribeClusters") + + return } @@ -307,14 +851,42 @@ func NewDescribeClustersResponse() (response *DescribeClustersResponse) { // 查询集群列表 // // 可能返回的错误码: +// FAILEDOPERATION_CAMCHECKRESOURCEERROR = "FailedOperation.CamCheckResourceError" +// FAILEDOPERATION_DATABASEACCESSERROR = "FailedOperation.DatabaseAccessError" // INTERNALERROR_DBOPERATIONFAILED = "InternalError.DbOperationFailed" // INTERNALERROR_SYSTEMERROR = "InternalError.SystemError" // INVALIDPARAMETERVALUE_ILLEGALORDERBY = "InvalidParameterValue.IllegalOrderBy" +// INVALIDPARAMETERVALUE_INVALIDPARAMETERVALUEERROR = "InvalidParameterValue.InvalidParameterValueError" +// INVALIDPARAMETERVALUE_PARAMBOTHSETERROR = "InvalidParameterValue.ParamBothSetError" // UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" func (c *Client) DescribeClusters(request *DescribeClustersRequest) (response *DescribeClustersResponse, err error) { if request == nil { request = NewDescribeClustersRequest() } + + response = NewDescribeClustersResponse() + err = c.Send(request, response) + return +} + +// DescribeClusters +// 查询集群列表 +// +// 可能返回的错误码: +// FAILEDOPERATION_CAMCHECKRESOURCEERROR = "FailedOperation.CamCheckResourceError" +// FAILEDOPERATION_DATABASEACCESSERROR = "FailedOperation.DatabaseAccessError" +// INTERNALERROR_DBOPERATIONFAILED = "InternalError.DbOperationFailed" +// INTERNALERROR_SYSTEMERROR = "InternalError.SystemError" +// INVALIDPARAMETERVALUE_ILLEGALORDERBY = "InvalidParameterValue.IllegalOrderBy" +// INVALIDPARAMETERVALUE_INVALIDPARAMETERVALUEERROR = "InvalidParameterValue.InvalidParameterValueError" +// INVALIDPARAMETERVALUE_PARAMBOTHSETERROR = "InvalidParameterValue.ParamBothSetError" +// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" +func (c *Client) DescribeClustersWithContext(ctx context.Context, request *DescribeClustersRequest) (response *DescribeClustersResponse, err error) { + if request == nil { + request = NewDescribeClustersRequest() + } + request.SetContext(ctx) + response = NewDescribeClustersResponse() err = c.Send(request, response) return @@ -325,6 +897,8 @@ func NewDescribeDBSecurityGroupsRequest() (request *DescribeDBSecurityGroupsRequ BaseRequest: &tchttp.BaseRequest{}, } request.Init().WithApiInfo("cynosdb", APIVersion, "DescribeDBSecurityGroups") + + return } @@ -339,12 +913,32 @@ func NewDescribeDBSecurityGroupsResponse() (response *DescribeDBSecurityGroupsRe // 查询实例安全组信息 // // 可能返回的错误码: +// FAILEDOPERATION_OPERATIONFAILEDERROR = "FailedOperation.OperationFailedError" // INTERNALERROR_GETSECURITYGROUPDETAILFAILED = "InternalError.GetSecurityGroupDetailFailed" // UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" func (c *Client) DescribeDBSecurityGroups(request *DescribeDBSecurityGroupsRequest) (response *DescribeDBSecurityGroupsResponse, err error) { if request == nil { request = NewDescribeDBSecurityGroupsRequest() } + + response = NewDescribeDBSecurityGroupsResponse() + err = c.Send(request, response) + return +} + +// DescribeDBSecurityGroups +// 查询实例安全组信息 +// +// 可能返回的错误码: +// FAILEDOPERATION_OPERATIONFAILEDERROR = "FailedOperation.OperationFailedError" +// INTERNALERROR_GETSECURITYGROUPDETAILFAILED = "InternalError.GetSecurityGroupDetailFailed" +// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" +func (c *Client) DescribeDBSecurityGroupsWithContext(ctx context.Context, request *DescribeDBSecurityGroupsRequest) (response *DescribeDBSecurityGroupsResponse, err error) { + if request == nil { + request = NewDescribeDBSecurityGroupsRequest() + } + request.SetContext(ctx) + response = NewDescribeDBSecurityGroupsResponse() err = c.Send(request, response) return @@ -355,6 +949,8 @@ func NewDescribeInstanceDetailRequest() (request *DescribeInstanceDetailRequest) BaseRequest: &tchttp.BaseRequest{}, } request.Init().WithApiInfo("cynosdb", APIVersion, "DescribeInstanceDetail") + + return } @@ -369,15 +965,42 @@ func NewDescribeInstanceDetailResponse() (response *DescribeInstanceDetailRespon // 本接口(DescribeInstanceDetail)用于查询实例详情。 // // 可能返回的错误码: +// FAILEDOPERATION_CAMSIGANDAUTHERROR = "FailedOperation.CamSigAndAuthError" +// FAILEDOPERATION_DATABASEACCESSERROR = "FailedOperation.DatabaseAccessError" // INTERNALERROR_DBOPERATIONFAILED = "InternalError.DbOperationFailed" // INTERNALERROR_OPERATIONNOTSUPPORT = "InternalError.OperationNotSupport" // INTERNALERROR_SYSTEMERROR = "InternalError.SystemError" // INVALIDPARAMETERVALUE_INSTANCENOTFOUND = "InvalidParameterValue.InstanceNotFound" +// RESOURCENOTFOUND_INSTANCENOTFOUNDERROR = "ResourceNotFound.InstanceNotFoundError" // UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" func (c *Client) DescribeInstanceDetail(request *DescribeInstanceDetailRequest) (response *DescribeInstanceDetailResponse, err error) { if request == nil { request = NewDescribeInstanceDetailRequest() } + + response = NewDescribeInstanceDetailResponse() + err = c.Send(request, response) + return +} + +// DescribeInstanceDetail +// 本接口(DescribeInstanceDetail)用于查询实例详情。 +// +// 可能返回的错误码: +// FAILEDOPERATION_CAMSIGANDAUTHERROR = "FailedOperation.CamSigAndAuthError" +// FAILEDOPERATION_DATABASEACCESSERROR = "FailedOperation.DatabaseAccessError" +// INTERNALERROR_DBOPERATIONFAILED = "InternalError.DbOperationFailed" +// INTERNALERROR_OPERATIONNOTSUPPORT = "InternalError.OperationNotSupport" +// INTERNALERROR_SYSTEMERROR = "InternalError.SystemError" +// INVALIDPARAMETERVALUE_INSTANCENOTFOUND = "InvalidParameterValue.InstanceNotFound" +// RESOURCENOTFOUND_INSTANCENOTFOUNDERROR = "ResourceNotFound.InstanceNotFoundError" +// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" +func (c *Client) DescribeInstanceDetailWithContext(ctx context.Context, request *DescribeInstanceDetailRequest) (response *DescribeInstanceDetailResponse, err error) { + if request == nil { + request = NewDescribeInstanceDetailRequest() + } + request.SetContext(ctx) + response = NewDescribeInstanceDetailResponse() err = c.Send(request, response) return @@ -388,6 +1011,8 @@ func NewDescribeInstanceSpecsRequest() (request *DescribeInstanceSpecsRequest) { BaseRequest: &tchttp.BaseRequest{}, } request.Init().WithApiInfo("cynosdb", APIVersion, "DescribeInstanceSpecs") + + return } @@ -402,12 +1027,32 @@ func NewDescribeInstanceSpecsResponse() (response *DescribeInstanceSpecsResponse // 本接口(DescribeInstanceSpecs)用于查询实例规格 // // 可能返回的错误码: +// FAILEDOPERATION_DATABASEACCESSERROR = "FailedOperation.DatabaseAccessError" // INTERNALERROR_DBOPERATIONFAILED = "InternalError.DbOperationFailed" // UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" func (c *Client) DescribeInstanceSpecs(request *DescribeInstanceSpecsRequest) (response *DescribeInstanceSpecsResponse, err error) { if request == nil { request = NewDescribeInstanceSpecsRequest() } + + response = NewDescribeInstanceSpecsResponse() + err = c.Send(request, response) + return +} + +// DescribeInstanceSpecs +// 本接口(DescribeInstanceSpecs)用于查询实例规格 +// +// 可能返回的错误码: +// FAILEDOPERATION_DATABASEACCESSERROR = "FailedOperation.DatabaseAccessError" +// INTERNALERROR_DBOPERATIONFAILED = "InternalError.DbOperationFailed" +// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" +func (c *Client) DescribeInstanceSpecsWithContext(ctx context.Context, request *DescribeInstanceSpecsRequest) (response *DescribeInstanceSpecsResponse, err error) { + if request == nil { + request = NewDescribeInstanceSpecsRequest() + } + request.SetContext(ctx) + response = NewDescribeInstanceSpecsResponse() err = c.Send(request, response) return @@ -418,6 +1063,8 @@ func NewDescribeInstancesRequest() (request *DescribeInstancesRequest) { BaseRequest: &tchttp.BaseRequest{}, } request.Init().WithApiInfo("cynosdb", APIVersion, "DescribeInstances") + + return } @@ -432,15 +1079,50 @@ func NewDescribeInstancesResponse() (response *DescribeInstancesResponse) { // 本接口(DescribeInstances)用于查询实例列表。 // // 可能返回的错误码: +// FAILEDOPERATION_CAMCHECKRESOURCEERROR = "FailedOperation.CamCheckResourceError" +// FAILEDOPERATION_CAMSIGANDAUTHERROR = "FailedOperation.CamSigAndAuthError" +// FAILEDOPERATION_DATABASEACCESSERROR = "FailedOperation.DatabaseAccessError" // INTERNALERROR_DBOPERATIONFAILED = "InternalError.DbOperationFailed" // INTERNALERROR_SYSTEMERROR = "InternalError.SystemError" +// INTERNALERROR_UNKNOWNERROR = "InternalError.UnknownError" +// INVALIDPARAMETER = "InvalidParameter" // INVALIDPARAMETERVALUE_ILLEGALORDERBY = "InvalidParameterValue.IllegalOrderBy" +// INVALIDPARAMETERVALUE_INVALIDPARAMETERVALUEERROR = "InvalidParameterValue.InvalidParameterValueError" +// INVALIDPARAMETERVALUE_PARAMBOTHSETERROR = "InvalidParameterValue.ParamBothSetError" // INVALIDPARAMETERVALUE_PARAMERROR = "InvalidParameterValue.ParamError" // UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" func (c *Client) DescribeInstances(request *DescribeInstancesRequest) (response *DescribeInstancesResponse, err error) { if request == nil { request = NewDescribeInstancesRequest() } + + response = NewDescribeInstancesResponse() + err = c.Send(request, response) + return +} + +// DescribeInstances +// 本接口(DescribeInstances)用于查询实例列表。 +// +// 可能返回的错误码: +// FAILEDOPERATION_CAMCHECKRESOURCEERROR = "FailedOperation.CamCheckResourceError" +// FAILEDOPERATION_CAMSIGANDAUTHERROR = "FailedOperation.CamSigAndAuthError" +// FAILEDOPERATION_DATABASEACCESSERROR = "FailedOperation.DatabaseAccessError" +// INTERNALERROR_DBOPERATIONFAILED = "InternalError.DbOperationFailed" +// INTERNALERROR_SYSTEMERROR = "InternalError.SystemError" +// INTERNALERROR_UNKNOWNERROR = "InternalError.UnknownError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_ILLEGALORDERBY = "InvalidParameterValue.IllegalOrderBy" +// INVALIDPARAMETERVALUE_INVALIDPARAMETERVALUEERROR = "InvalidParameterValue.InvalidParameterValueError" +// INVALIDPARAMETERVALUE_PARAMBOTHSETERROR = "InvalidParameterValue.ParamBothSetError" +// INVALIDPARAMETERVALUE_PARAMERROR = "InvalidParameterValue.ParamError" +// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" +func (c *Client) DescribeInstancesWithContext(ctx context.Context, request *DescribeInstancesRequest) (response *DescribeInstancesResponse, err error) { + if request == nil { + request = NewDescribeInstancesRequest() + } + request.SetContext(ctx) + response = NewDescribeInstancesResponse() err = c.Send(request, response) return @@ -451,6 +1133,8 @@ func NewDescribeMaintainPeriodRequest() (request *DescribeMaintainPeriodRequest) BaseRequest: &tchttp.BaseRequest{}, } request.Init().WithApiInfo("cynosdb", APIVersion, "DescribeMaintainPeriod") + + return } @@ -465,6 +1149,7 @@ func NewDescribeMaintainPeriodResponse() (response *DescribeMaintainPeriodRespon // 查询实例维护时间窗 // // 可能返回的错误码: +// FAILEDOPERATION_DATABASEACCESSERROR = "FailedOperation.DatabaseAccessError" // INTERNALERROR_DBOPERATIONFAILED = "InternalError.DbOperationFailed" // INTERNALERROR_SYSTEMERROR = "InternalError.SystemError" // INVALIDPARAMETERVALUE_PARAMERROR = "InvalidParameterValue.ParamError" @@ -473,6 +1158,27 @@ func (c *Client) DescribeMaintainPeriod(request *DescribeMaintainPeriodRequest) if request == nil { request = NewDescribeMaintainPeriodRequest() } + + response = NewDescribeMaintainPeriodResponse() + err = c.Send(request, response) + return +} + +// DescribeMaintainPeriod +// 查询实例维护时间窗 +// +// 可能返回的错误码: +// FAILEDOPERATION_DATABASEACCESSERROR = "FailedOperation.DatabaseAccessError" +// INTERNALERROR_DBOPERATIONFAILED = "InternalError.DbOperationFailed" +// INTERNALERROR_SYSTEMERROR = "InternalError.SystemError" +// INVALIDPARAMETERVALUE_PARAMERROR = "InvalidParameterValue.ParamError" +// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" +func (c *Client) DescribeMaintainPeriodWithContext(ctx context.Context, request *DescribeMaintainPeriodRequest) (response *DescribeMaintainPeriodResponse, err error) { + if request == nil { + request = NewDescribeMaintainPeriodRequest() + } + request.SetContext(ctx) + response = NewDescribeMaintainPeriodResponse() err = c.Send(request, response) return @@ -483,6 +1189,8 @@ func NewDescribeProjectSecurityGroupsRequest() (request *DescribeProjectSecurity BaseRequest: &tchttp.BaseRequest{}, } request.Init().WithApiInfo("cynosdb", APIVersion, "DescribeProjectSecurityGroups") + + return } @@ -497,6 +1205,7 @@ func NewDescribeProjectSecurityGroupsResponse() (response *DescribeProjectSecuri // 查询项目安全组信息 // // 可能返回的错误码: +// FAILEDOPERATION_OPERATIONFAILEDERROR = "FailedOperation.OperationFailedError" // INTERNALERROR = "InternalError" // INTERNALERROR_GETSECURITYGROUPDETAILFAILED = "InternalError.GetSecurityGroupDetailFailed" // UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" @@ -504,6 +1213,26 @@ func (c *Client) DescribeProjectSecurityGroups(request *DescribeProjectSecurityG if request == nil { request = NewDescribeProjectSecurityGroupsRequest() } + + response = NewDescribeProjectSecurityGroupsResponse() + err = c.Send(request, response) + return +} + +// DescribeProjectSecurityGroups +// 查询项目安全组信息 +// +// 可能返回的错误码: +// FAILEDOPERATION_OPERATIONFAILEDERROR = "FailedOperation.OperationFailedError" +// INTERNALERROR = "InternalError" +// INTERNALERROR_GETSECURITYGROUPDETAILFAILED = "InternalError.GetSecurityGroupDetailFailed" +// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" +func (c *Client) DescribeProjectSecurityGroupsWithContext(ctx context.Context, request *DescribeProjectSecurityGroupsRequest) (response *DescribeProjectSecurityGroupsResponse, err error) { + if request == nil { + request = NewDescribeProjectSecurityGroupsRequest() + } + request.SetContext(ctx) + response = NewDescribeProjectSecurityGroupsResponse() err = c.Send(request, response) return @@ -514,6 +1243,8 @@ func NewDescribeResourcesByDealNameRequest() (request *DescribeResourcesByDealNa BaseRequest: &tchttp.BaseRequest{}, } request.Init().WithApiInfo("cynosdb", APIVersion, "DescribeResourcesByDealName") + + return } @@ -528,6 +1259,7 @@ func NewDescribeResourcesByDealNameResponse() (response *DescribeResourcesByDeal // 根据计费订单id查询资源列表 // // 可能返回的错误码: +// FAILEDOPERATION_DATABASEACCESSERROR = "FailedOperation.DatabaseAccessError" // INTERNALERROR_DBOPERATIONFAILED = "InternalError.DbOperationFailed" // INTERNALERROR_SYSTEMERROR = "InternalError.SystemError" // INVALIDPARAMETERVALUE_DEALNAMENOTFOUND = "InvalidParameterValue.DealNameNotFound" @@ -537,6 +1269,28 @@ func (c *Client) DescribeResourcesByDealName(request *DescribeResourcesByDealNam if request == nil { request = NewDescribeResourcesByDealNameRequest() } + + response = NewDescribeResourcesByDealNameResponse() + err = c.Send(request, response) + return +} + +// DescribeResourcesByDealName +// 根据计费订单id查询资源列表 +// +// 可能返回的错误码: +// FAILEDOPERATION_DATABASEACCESSERROR = "FailedOperation.DatabaseAccessError" +// INTERNALERROR_DBOPERATIONFAILED = "InternalError.DbOperationFailed" +// INTERNALERROR_SYSTEMERROR = "InternalError.SystemError" +// INVALIDPARAMETERVALUE_DEALNAMENOTFOUND = "InvalidParameterValue.DealNameNotFound" +// INVALIDPARAMETERVALUE_PARAMERROR = "InvalidParameterValue.ParamError" +// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" +func (c *Client) DescribeResourcesByDealNameWithContext(ctx context.Context, request *DescribeResourcesByDealNameRequest) (response *DescribeResourcesByDealNameResponse, err error) { + if request == nil { + request = NewDescribeResourcesByDealNameRequest() + } + request.SetContext(ctx) + response = NewDescribeResourcesByDealNameResponse() err = c.Send(request, response) return @@ -547,6 +1301,8 @@ func NewDescribeRollbackTimeRangeRequest() (request *DescribeRollbackTimeRangeRe BaseRequest: &tchttp.BaseRequest{}, } request.Init().WithApiInfo("cynosdb", APIVersion, "DescribeRollbackTimeRange") + + return } @@ -561,14 +1317,40 @@ func NewDescribeRollbackTimeRangeResponse() (response *DescribeRollbackTimeRange // 查询指定集群有效回滚时间范围 // // 可能返回的错误码: +// FAILEDOPERATION_DATABASEACCESSERROR = "FailedOperation.DatabaseAccessError" +// FAILEDOPERATION_OPERATIONFAILEDERROR = "FailedOperation.OperationFailedError" // INTERNALERROR_SYSTEMERROR = "InternalError.SystemError" // INVALIDPARAMETERVALUE_PARAMERROR = "InvalidParameterValue.ParamError" // INVALIDPARAMETERVALUE_STORAGEPOOLNOTFOUND = "InvalidParameterValue.StoragePoolNotFound" +// RESOURCENOTFOUND_CLUSTERNOTFOUNDERROR = "ResourceNotFound.ClusterNotFoundError" // UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" func (c *Client) DescribeRollbackTimeRange(request *DescribeRollbackTimeRangeRequest) (response *DescribeRollbackTimeRangeResponse, err error) { if request == nil { request = NewDescribeRollbackTimeRangeRequest() } + + response = NewDescribeRollbackTimeRangeResponse() + err = c.Send(request, response) + return +} + +// DescribeRollbackTimeRange +// 查询指定集群有效回滚时间范围 +// +// 可能返回的错误码: +// FAILEDOPERATION_DATABASEACCESSERROR = "FailedOperation.DatabaseAccessError" +// FAILEDOPERATION_OPERATIONFAILEDERROR = "FailedOperation.OperationFailedError" +// INTERNALERROR_SYSTEMERROR = "InternalError.SystemError" +// INVALIDPARAMETERVALUE_PARAMERROR = "InvalidParameterValue.ParamError" +// INVALIDPARAMETERVALUE_STORAGEPOOLNOTFOUND = "InvalidParameterValue.StoragePoolNotFound" +// RESOURCENOTFOUND_CLUSTERNOTFOUNDERROR = "ResourceNotFound.ClusterNotFoundError" +// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" +func (c *Client) DescribeRollbackTimeRangeWithContext(ctx context.Context, request *DescribeRollbackTimeRangeRequest) (response *DescribeRollbackTimeRangeResponse, err error) { + if request == nil { + request = NewDescribeRollbackTimeRangeRequest() + } + request.SetContext(ctx) + response = NewDescribeRollbackTimeRangeResponse() err = c.Send(request, response) return @@ -579,6 +1361,8 @@ func NewDescribeRollbackTimeValidityRequest() (request *DescribeRollbackTimeVali BaseRequest: &tchttp.BaseRequest{}, } request.Init().WithApiInfo("cynosdb", APIVersion, "DescribeRollbackTimeValidity") + + return } @@ -601,232 +1385,1121 @@ func (c *Client) DescribeRollbackTimeValidity(request *DescribeRollbackTimeValid if request == nil { request = NewDescribeRollbackTimeValidityRequest() } + response = NewDescribeRollbackTimeValidityResponse() err = c.Send(request, response) return } -func NewIsolateClusterRequest() (request *IsolateClusterRequest) { - request = &IsolateClusterRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("cynosdb", APIVersion, "IsolateCluster") - return -} - -func NewIsolateClusterResponse() (response *IsolateClusterResponse) { - response = &IsolateClusterResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// IsolateCluster -// 隔离集群 +// DescribeRollbackTimeValidity +// 指定时间和集群查询是否可回滚 // // 可能返回的错误码: -// INTERNALERROR_DBOPERATIONFAILED = "InternalError.DbOperationFailed" -// INVALIDPARAMETERVALUE_CLUSTERNOTFOUND = "InvalidParameterValue.ClusterNotFound" -// RESOURCEUNAVAILABLE_INSTANCELOCKFAIL = "ResourceUnavailable.InstanceLockFail" -// RESOURCEUNAVAILABLE_INSTANCESTATUSABNORMAL = "ResourceUnavailable.InstanceStatusAbnormal" +// INTERNALERROR_SYSTEMERROR = "InternalError.SystemError" +// INVALIDPARAMETERVALUE_PARAMERROR = "InvalidParameterValue.ParamError" +// INVALIDPARAMETERVALUE_STORAGEPOOLNOTFOUND = "InvalidParameterValue.StoragePoolNotFound" // UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" -func (c *Client) IsolateCluster(request *IsolateClusterRequest) (response *IsolateClusterResponse, err error) { +func (c *Client) DescribeRollbackTimeValidityWithContext(ctx context.Context, request *DescribeRollbackTimeValidityRequest) (response *DescribeRollbackTimeValidityResponse, err error) { if request == nil { - request = NewIsolateClusterRequest() + request = NewDescribeRollbackTimeValidityRequest() } - response = NewIsolateClusterResponse() + request.SetContext(ctx) + + response = NewDescribeRollbackTimeValidityResponse() err = c.Send(request, response) return } -func NewIsolateInstanceRequest() (request *IsolateInstanceRequest) { - request = &IsolateInstanceRequest{ +func NewDisassociateSecurityGroupsRequest() (request *DisassociateSecurityGroupsRequest) { + request = &DisassociateSecurityGroupsRequest{ BaseRequest: &tchttp.BaseRequest{}, } - request.Init().WithApiInfo("cynosdb", APIVersion, "IsolateInstance") + request.Init().WithApiInfo("cynosdb", APIVersion, "DisassociateSecurityGroups") + + return } -func NewIsolateInstanceResponse() (response *IsolateInstanceResponse) { - response = &IsolateInstanceResponse{ +func NewDisassociateSecurityGroupsResponse() (response *DisassociateSecurityGroupsResponse) { + response = &DisassociateSecurityGroupsResponse{ BaseResponse: &tchttp.BaseResponse{}, } return } -// IsolateInstance -// 本接口(IsolateInstance)用于隔离实例。 +// DisassociateSecurityGroups +// 安全组批量解绑云资源 // // 可能返回的错误码: -// INVALIDPARAMETER_ISOLATENOTALLOWED = "InvalidParameter.IsolateNotAllowed" +// FAILEDOPERATION_OPERATIONFAILEDERROR = "FailedOperation.OperationFailedError" +// INTERNALERROR_LISTINSTANCEFAILED = "InternalError.ListInstanceFailed" +// INTERNALERROR_QUERYDATABASEFAILED = "InternalError.QueryDatabaseFailed" // INVALIDPARAMETERVALUE_INSTANCENOTFOUND = "InvalidParameterValue.InstanceNotFound" +// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" +func (c *Client) DisassociateSecurityGroups(request *DisassociateSecurityGroupsRequest) (response *DisassociateSecurityGroupsResponse, err error) { + if request == nil { + request = NewDisassociateSecurityGroupsRequest() + } + + response = NewDisassociateSecurityGroupsResponse() + err = c.Send(request, response) + return +} + +// DisassociateSecurityGroups +// 安全组批量解绑云资源 +// +// 可能返回的错误码: +// FAILEDOPERATION_OPERATIONFAILEDERROR = "FailedOperation.OperationFailedError" +// INTERNALERROR_LISTINSTANCEFAILED = "InternalError.ListInstanceFailed" +// INTERNALERROR_QUERYDATABASEFAILED = "InternalError.QueryDatabaseFailed" +// INVALIDPARAMETERVALUE_INSTANCENOTFOUND = "InvalidParameterValue.InstanceNotFound" +// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" +func (c *Client) DisassociateSecurityGroupsWithContext(ctx context.Context, request *DisassociateSecurityGroupsRequest) (response *DisassociateSecurityGroupsResponse, err error) { + if request == nil { + request = NewDisassociateSecurityGroupsRequest() + } + request.SetContext(ctx) + + response = NewDisassociateSecurityGroupsResponse() + err = c.Send(request, response) + return +} + +func NewGrantAccountPrivilegesRequest() (request *GrantAccountPrivilegesRequest) { + request = &GrantAccountPrivilegesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cynosdb", APIVersion, "GrantAccountPrivileges") + + + return +} + +func NewGrantAccountPrivilegesResponse() (response *GrantAccountPrivilegesResponse) { + response = &GrantAccountPrivilegesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// GrantAccountPrivileges +// 批量授权账号权限 +// +// 可能返回的错误码: +// FAILEDOPERATION_DATABASEACCESSERROR = "FailedOperation.DatabaseAccessError" +// FAILEDOPERATION_OPERATIONFAILEDERROR = "FailedOperation.OperationFailedError" +// INTERNALERROR_DBOPERATIONFAILED = "InternalError.DbOperationFailed" +// INTERNALERROR_GETSECURITYGROUPDETAILFAILED = "InternalError.GetSecurityGroupDetailFailed" +// INTERNALERROR_GETSUBNETFAILED = "InternalError.GetSubnetFailed" +// INTERNALERROR_GETVPCFAILED = "InternalError.GetVpcFailed" +// INTERNALERROR_LISTINSTANCEFAILED = "InternalError.ListInstanceFailed" +// INTERNALERROR_OPERATEWANFAIL = "InternalError.OperateWanFail" +// INTERNALERROR_OPERATIONNOTSUPPORT = "InternalError.OperationNotSupport" +// INTERNALERROR_QUERYDATABASEFAILED = "InternalError.QueryDatabaseFailed" +// INTERNALERROR_SYSTEMERROR = "InternalError.SystemError" +// INVALIDPARAMETER_ISOLATENOTALLOWED = "InvalidParameter.IsolateNotAllowed" +// INVALIDPARAMETERVALUE_ACCOUNTEXIST = "InvalidParameterValue.AccountExist" +// INVALIDPARAMETERVALUE_ACCOUNTNOTEXISTERROR = "InvalidParameterValue.AccountNotExistError" +// INVALIDPARAMETERVALUE_DBTYPENOTFOUND = "InvalidParameterValue.DBTypeNotFound" +// INVALIDPARAMETERVALUE_FLOWNOTFOUND = "InvalidParameterValue.FlowNotFound" +// INVALIDPARAMETERVALUE_ILLEGALINSTANCENAME = "InvalidParameterValue.IllegalInstanceName" +// INVALIDPARAMETERVALUE_ILLEGALORDERBY = "InvalidParameterValue.IllegalOrderBy" +// INVALIDPARAMETERVALUE_ILLEGALPASSWORD = "InvalidParameterValue.IllegalPassword" +// INVALIDPARAMETERVALUE_INSTANCENOTFOUND = "InvalidParameterValue.InstanceNotFound" +// INVALIDPARAMETERVALUE_INTERNALACCOUNT = "InvalidParameterValue.InternalAccount" +// INVALIDPARAMETERVALUE_INVALIDDBVERSION = "InvalidParameterValue.InvalidDBVersion" +// INVALIDPARAMETERVALUE_INVALIDSPEC = "InvalidParameterValue.InvalidSpec" +// INVALIDPARAMETERVALUE_PARAMERROR = "InvalidParameterValue.ParamError" +// INVALIDPARAMETERVALUE_REGIONZONEUNAVAILABLE = "InvalidParameterValue.RegionZoneUnavailable" +// INVALIDPARAMETERVALUE_STORAGEPOOLNOTFOUND = "InvalidParameterValue.StoragePoolNotFound" +// INVALIDPARAMETERVALUE_SUBNETNOTFOUND = "InvalidParameterValue.SubnetNotFound" +// INVALIDPARAMETERVALUE_VPCNOTFOUND = "InvalidParameterValue.VpcNotFound" +// LIMITEXCEEDED_USERINSTANCELIMIT = "LimitExceeded.UserInstanceLimit" +// OPERATIONDENIED_INSTANCESTATUSDENIEDERROR = "OperationDenied.InstanceStatusDeniedError" +// OPERATIONDENIED_SERVERLESSINSTANCESTATUSDENIED = "OperationDenied.ServerlessInstanceStatusDenied" +// RESOURCENOTFOUND_CLUSTERNOTFOUNDERROR = "ResourceNotFound.ClusterNotFoundError" +// RESOURCEUNAVAILABLE_INSTANCELOCKFAIL = "ResourceUnavailable.InstanceLockFail" +// RESOURCEUNAVAILABLE_INSTANCESTATUSABNORMAL = "ResourceUnavailable.InstanceStatusAbnormal" +// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" +func (c *Client) GrantAccountPrivileges(request *GrantAccountPrivilegesRequest) (response *GrantAccountPrivilegesResponse, err error) { + if request == nil { + request = NewGrantAccountPrivilegesRequest() + } + + response = NewGrantAccountPrivilegesResponse() + err = c.Send(request, response) + return +} + +// GrantAccountPrivileges +// 批量授权账号权限 +// +// 可能返回的错误码: +// FAILEDOPERATION_DATABASEACCESSERROR = "FailedOperation.DatabaseAccessError" +// FAILEDOPERATION_OPERATIONFAILEDERROR = "FailedOperation.OperationFailedError" +// INTERNALERROR_DBOPERATIONFAILED = "InternalError.DbOperationFailed" +// INTERNALERROR_GETSECURITYGROUPDETAILFAILED = "InternalError.GetSecurityGroupDetailFailed" +// INTERNALERROR_GETSUBNETFAILED = "InternalError.GetSubnetFailed" +// INTERNALERROR_GETVPCFAILED = "InternalError.GetVpcFailed" +// INTERNALERROR_LISTINSTANCEFAILED = "InternalError.ListInstanceFailed" +// INTERNALERROR_OPERATEWANFAIL = "InternalError.OperateWanFail" +// INTERNALERROR_OPERATIONNOTSUPPORT = "InternalError.OperationNotSupport" +// INTERNALERROR_QUERYDATABASEFAILED = "InternalError.QueryDatabaseFailed" +// INTERNALERROR_SYSTEMERROR = "InternalError.SystemError" +// INVALIDPARAMETER_ISOLATENOTALLOWED = "InvalidParameter.IsolateNotAllowed" +// INVALIDPARAMETERVALUE_ACCOUNTEXIST = "InvalidParameterValue.AccountExist" +// INVALIDPARAMETERVALUE_ACCOUNTNOTEXISTERROR = "InvalidParameterValue.AccountNotExistError" +// INVALIDPARAMETERVALUE_DBTYPENOTFOUND = "InvalidParameterValue.DBTypeNotFound" +// INVALIDPARAMETERVALUE_FLOWNOTFOUND = "InvalidParameterValue.FlowNotFound" +// INVALIDPARAMETERVALUE_ILLEGALINSTANCENAME = "InvalidParameterValue.IllegalInstanceName" +// INVALIDPARAMETERVALUE_ILLEGALORDERBY = "InvalidParameterValue.IllegalOrderBy" +// INVALIDPARAMETERVALUE_ILLEGALPASSWORD = "InvalidParameterValue.IllegalPassword" +// INVALIDPARAMETERVALUE_INSTANCENOTFOUND = "InvalidParameterValue.InstanceNotFound" +// INVALIDPARAMETERVALUE_INTERNALACCOUNT = "InvalidParameterValue.InternalAccount" +// INVALIDPARAMETERVALUE_INVALIDDBVERSION = "InvalidParameterValue.InvalidDBVersion" +// INVALIDPARAMETERVALUE_INVALIDSPEC = "InvalidParameterValue.InvalidSpec" +// INVALIDPARAMETERVALUE_PARAMERROR = "InvalidParameterValue.ParamError" +// INVALIDPARAMETERVALUE_REGIONZONEUNAVAILABLE = "InvalidParameterValue.RegionZoneUnavailable" +// INVALIDPARAMETERVALUE_STORAGEPOOLNOTFOUND = "InvalidParameterValue.StoragePoolNotFound" +// INVALIDPARAMETERVALUE_SUBNETNOTFOUND = "InvalidParameterValue.SubnetNotFound" +// INVALIDPARAMETERVALUE_VPCNOTFOUND = "InvalidParameterValue.VpcNotFound" +// LIMITEXCEEDED_USERINSTANCELIMIT = "LimitExceeded.UserInstanceLimit" +// OPERATIONDENIED_INSTANCESTATUSDENIEDERROR = "OperationDenied.InstanceStatusDeniedError" +// OPERATIONDENIED_SERVERLESSINSTANCESTATUSDENIED = "OperationDenied.ServerlessInstanceStatusDenied" +// RESOURCENOTFOUND_CLUSTERNOTFOUNDERROR = "ResourceNotFound.ClusterNotFoundError" +// RESOURCEUNAVAILABLE_INSTANCELOCKFAIL = "ResourceUnavailable.InstanceLockFail" +// RESOURCEUNAVAILABLE_INSTANCESTATUSABNORMAL = "ResourceUnavailable.InstanceStatusAbnormal" +// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" +func (c *Client) GrantAccountPrivilegesWithContext(ctx context.Context, request *GrantAccountPrivilegesRequest) (response *GrantAccountPrivilegesResponse, err error) { + if request == nil { + request = NewGrantAccountPrivilegesRequest() + } + request.SetContext(ctx) + + response = NewGrantAccountPrivilegesResponse() + err = c.Send(request, response) + return +} + +func NewIsolateClusterRequest() (request *IsolateClusterRequest) { + request = &IsolateClusterRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cynosdb", APIVersion, "IsolateCluster") + + + return +} + +func NewIsolateClusterResponse() (response *IsolateClusterResponse) { + response = &IsolateClusterResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// IsolateCluster +// 隔离集群 +// +// 可能返回的错误码: +// FAILEDOPERATION_DATABASEACCESSERROR = "FailedOperation.DatabaseAccessError" +// FAILEDOPERATION_FLOWCREATEERROR = "FailedOperation.FlowCreateError" +// FAILEDOPERATION_TRADECREATEORDERERROR = "FailedOperation.TradeCreateOrderError" +// INTERNALERROR_DBOPERATIONFAILED = "InternalError.DbOperationFailed" +// INTERNALERROR_UNKNOWNERROR = "InternalError.UnknownError" +// INVALIDPARAMETERVALUE_CLUSTERNOTFOUND = "InvalidParameterValue.ClusterNotFound" +// INVALIDPARAMETERVALUE_INVALIDPARAMETERVALUEERROR = "InvalidParameterValue.InvalidParameterValueError" +// INVALIDPARAMETERVALUE_INVALIDREGIONIDERROR = "InvalidParameterValue.InvalidRegionIdError" +// OPERATIONDENIED_CLUSTEROPNOTALLOWEDERROR = "OperationDenied.ClusterOpNotAllowedError" +// RESOURCENOTFOUND_CLUSTERNOTFOUNDERROR = "ResourceNotFound.ClusterNotFoundError" +// RESOURCEUNAVAILABLE_INSTANCELOCKFAIL = "ResourceUnavailable.InstanceLockFail" +// RESOURCEUNAVAILABLE_INSTANCESTATUSABNORMAL = "ResourceUnavailable.InstanceStatusAbnormal" +// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" +func (c *Client) IsolateCluster(request *IsolateClusterRequest) (response *IsolateClusterResponse, err error) { + if request == nil { + request = NewIsolateClusterRequest() + } + + response = NewIsolateClusterResponse() + err = c.Send(request, response) + return +} + +// IsolateCluster +// 隔离集群 +// +// 可能返回的错误码: +// FAILEDOPERATION_DATABASEACCESSERROR = "FailedOperation.DatabaseAccessError" +// FAILEDOPERATION_FLOWCREATEERROR = "FailedOperation.FlowCreateError" +// FAILEDOPERATION_TRADECREATEORDERERROR = "FailedOperation.TradeCreateOrderError" +// INTERNALERROR_DBOPERATIONFAILED = "InternalError.DbOperationFailed" +// INTERNALERROR_UNKNOWNERROR = "InternalError.UnknownError" +// INVALIDPARAMETERVALUE_CLUSTERNOTFOUND = "InvalidParameterValue.ClusterNotFound" +// INVALIDPARAMETERVALUE_INVALIDPARAMETERVALUEERROR = "InvalidParameterValue.InvalidParameterValueError" +// INVALIDPARAMETERVALUE_INVALIDREGIONIDERROR = "InvalidParameterValue.InvalidRegionIdError" +// OPERATIONDENIED_CLUSTEROPNOTALLOWEDERROR = "OperationDenied.ClusterOpNotAllowedError" +// RESOURCENOTFOUND_CLUSTERNOTFOUNDERROR = "ResourceNotFound.ClusterNotFoundError" +// RESOURCEUNAVAILABLE_INSTANCELOCKFAIL = "ResourceUnavailable.InstanceLockFail" +// RESOURCEUNAVAILABLE_INSTANCESTATUSABNORMAL = "ResourceUnavailable.InstanceStatusAbnormal" +// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" +func (c *Client) IsolateClusterWithContext(ctx context.Context, request *IsolateClusterRequest) (response *IsolateClusterResponse, err error) { + if request == nil { + request = NewIsolateClusterRequest() + } + request.SetContext(ctx) + + response = NewIsolateClusterResponse() + err = c.Send(request, response) + return +} + +func NewIsolateInstanceRequest() (request *IsolateInstanceRequest) { + request = &IsolateInstanceRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cynosdb", APIVersion, "IsolateInstance") + + + return +} + +func NewIsolateInstanceResponse() (response *IsolateInstanceResponse) { + response = &IsolateInstanceResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// IsolateInstance +// 本接口(IsolateInstance)用于隔离实例。 +// +// 可能返回的错误码: +// FAILEDOPERATION_DATABASEACCESSERROR = "FailedOperation.DatabaseAccessError" +// FAILEDOPERATION_OPERATIONFAILEDERROR = "FailedOperation.OperationFailedError" +// FAILEDOPERATION_TRADECREATEORDERERROR = "FailedOperation.TradeCreateOrderError" +// INVALIDPARAMETER_ISOLATENOTALLOWED = "InvalidParameter.IsolateNotAllowed" +// INVALIDPARAMETERVALUE_INSTANCENOTFOUND = "InvalidParameterValue.InstanceNotFound" +// OPERATIONDENIED_CLUSTEROPNOTALLOWEDERROR = "OperationDenied.ClusterOpNotAllowedError" +// RESOURCENOTFOUND_INSTANCENOTFOUNDERROR = "ResourceNotFound.InstanceNotFoundError" +// RESOURCEUNAVAILABLE_INSTANCELOCKFAIL = "ResourceUnavailable.InstanceLockFail" +// RESOURCEUNAVAILABLE_INSTANCESTATUSABNORMAL = "ResourceUnavailable.InstanceStatusAbnormal" +// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" +func (c *Client) IsolateInstance(request *IsolateInstanceRequest) (response *IsolateInstanceResponse, err error) { + if request == nil { + request = NewIsolateInstanceRequest() + } + + response = NewIsolateInstanceResponse() + err = c.Send(request, response) + return +} + +// IsolateInstance +// 本接口(IsolateInstance)用于隔离实例。 +// +// 可能返回的错误码: +// FAILEDOPERATION_DATABASEACCESSERROR = "FailedOperation.DatabaseAccessError" +// FAILEDOPERATION_OPERATIONFAILEDERROR = "FailedOperation.OperationFailedError" +// FAILEDOPERATION_TRADECREATEORDERERROR = "FailedOperation.TradeCreateOrderError" +// INVALIDPARAMETER_ISOLATENOTALLOWED = "InvalidParameter.IsolateNotAllowed" +// INVALIDPARAMETERVALUE_INSTANCENOTFOUND = "InvalidParameterValue.InstanceNotFound" +// OPERATIONDENIED_CLUSTEROPNOTALLOWEDERROR = "OperationDenied.ClusterOpNotAllowedError" +// RESOURCENOTFOUND_INSTANCENOTFOUNDERROR = "ResourceNotFound.InstanceNotFoundError" +// RESOURCEUNAVAILABLE_INSTANCELOCKFAIL = "ResourceUnavailable.InstanceLockFail" +// RESOURCEUNAVAILABLE_INSTANCESTATUSABNORMAL = "ResourceUnavailable.InstanceStatusAbnormal" +// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" +func (c *Client) IsolateInstanceWithContext(ctx context.Context, request *IsolateInstanceRequest) (response *IsolateInstanceResponse, err error) { + if request == nil { + request = NewIsolateInstanceRequest() + } + request.SetContext(ctx) + + response = NewIsolateInstanceResponse() + err = c.Send(request, response) + return +} + +func NewModifyAccountParamsRequest() (request *ModifyAccountParamsRequest) { + request = &ModifyAccountParamsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cynosdb", APIVersion, "ModifyAccountParams") + + + return +} + +func NewModifyAccountParamsResponse() (response *ModifyAccountParamsResponse) { + response = &ModifyAccountParamsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyAccountParams +// 修改账号参数 +// +// 可能返回的错误码: +// FAILEDOPERATION_DATABASEACCESSERROR = "FailedOperation.DatabaseAccessError" +// FAILEDOPERATION_OPERATIONFAILEDERROR = "FailedOperation.OperationFailedError" +// INTERNALERROR_DBOPERATIONFAILED = "InternalError.DbOperationFailed" +// INTERNALERROR_GETSECURITYGROUPDETAILFAILED = "InternalError.GetSecurityGroupDetailFailed" +// INTERNALERROR_GETSUBNETFAILED = "InternalError.GetSubnetFailed" +// INTERNALERROR_GETVPCFAILED = "InternalError.GetVpcFailed" +// INTERNALERROR_LISTINSTANCEFAILED = "InternalError.ListInstanceFailed" +// INTERNALERROR_OPERATEWANFAIL = "InternalError.OperateWanFail" +// INTERNALERROR_OPERATIONNOTSUPPORT = "InternalError.OperationNotSupport" +// INTERNALERROR_QUERYDATABASEFAILED = "InternalError.QueryDatabaseFailed" +// INTERNALERROR_SYSTEMERROR = "InternalError.SystemError" +// INVALIDPARAMETER_ISOLATENOTALLOWED = "InvalidParameter.IsolateNotAllowed" +// INVALIDPARAMETERVALUE_ACCOUNTEXIST = "InvalidParameterValue.AccountExist" +// INVALIDPARAMETERVALUE_ACCOUNTNOTEXISTERROR = "InvalidParameterValue.AccountNotExistError" +// INVALIDPARAMETERVALUE_DBTYPENOTFOUND = "InvalidParameterValue.DBTypeNotFound" +// INVALIDPARAMETERVALUE_FLOWNOTFOUND = "InvalidParameterValue.FlowNotFound" +// INVALIDPARAMETERVALUE_ILLEGALINSTANCENAME = "InvalidParameterValue.IllegalInstanceName" +// INVALIDPARAMETERVALUE_ILLEGALORDERBY = "InvalidParameterValue.IllegalOrderBy" +// INVALIDPARAMETERVALUE_ILLEGALPASSWORD = "InvalidParameterValue.IllegalPassword" +// INVALIDPARAMETERVALUE_INSTANCENOTFOUND = "InvalidParameterValue.InstanceNotFound" +// INVALIDPARAMETERVALUE_INTERNALACCOUNT = "InvalidParameterValue.InternalAccount" +// INVALIDPARAMETERVALUE_INVALIDDBVERSION = "InvalidParameterValue.InvalidDBVersion" +// INVALIDPARAMETERVALUE_INVALIDSPEC = "InvalidParameterValue.InvalidSpec" +// INVALIDPARAMETERVALUE_PARAMERROR = "InvalidParameterValue.ParamError" +// INVALIDPARAMETERVALUE_REGIONZONEUNAVAILABLE = "InvalidParameterValue.RegionZoneUnavailable" +// INVALIDPARAMETERVALUE_STORAGEPOOLNOTFOUND = "InvalidParameterValue.StoragePoolNotFound" +// INVALIDPARAMETERVALUE_SUBNETNOTFOUND = "InvalidParameterValue.SubnetNotFound" +// INVALIDPARAMETERVALUE_VPCNOTFOUND = "InvalidParameterValue.VpcNotFound" +// LIMITEXCEEDED_USERINSTANCELIMIT = "LimitExceeded.UserInstanceLimit" +// OPERATIONDENIED_INSTANCESTATUSDENIEDERROR = "OperationDenied.InstanceStatusDeniedError" +// OPERATIONDENIED_SERVERLESSINSTANCESTATUSDENIED = "OperationDenied.ServerlessInstanceStatusDenied" +// RESOURCENOTFOUND_CLUSTERNOTFOUNDERROR = "ResourceNotFound.ClusterNotFoundError" +// RESOURCEUNAVAILABLE_INSTANCELOCKFAIL = "ResourceUnavailable.InstanceLockFail" +// RESOURCEUNAVAILABLE_INSTANCESTATUSABNORMAL = "ResourceUnavailable.InstanceStatusAbnormal" +// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" +func (c *Client) ModifyAccountParams(request *ModifyAccountParamsRequest) (response *ModifyAccountParamsResponse, err error) { + if request == nil { + request = NewModifyAccountParamsRequest() + } + + response = NewModifyAccountParamsResponse() + err = c.Send(request, response) + return +} + +// ModifyAccountParams +// 修改账号参数 +// +// 可能返回的错误码: +// FAILEDOPERATION_DATABASEACCESSERROR = "FailedOperation.DatabaseAccessError" +// FAILEDOPERATION_OPERATIONFAILEDERROR = "FailedOperation.OperationFailedError" +// INTERNALERROR_DBOPERATIONFAILED = "InternalError.DbOperationFailed" +// INTERNALERROR_GETSECURITYGROUPDETAILFAILED = "InternalError.GetSecurityGroupDetailFailed" +// INTERNALERROR_GETSUBNETFAILED = "InternalError.GetSubnetFailed" +// INTERNALERROR_GETVPCFAILED = "InternalError.GetVpcFailed" +// INTERNALERROR_LISTINSTANCEFAILED = "InternalError.ListInstanceFailed" +// INTERNALERROR_OPERATEWANFAIL = "InternalError.OperateWanFail" +// INTERNALERROR_OPERATIONNOTSUPPORT = "InternalError.OperationNotSupport" +// INTERNALERROR_QUERYDATABASEFAILED = "InternalError.QueryDatabaseFailed" +// INTERNALERROR_SYSTEMERROR = "InternalError.SystemError" +// INVALIDPARAMETER_ISOLATENOTALLOWED = "InvalidParameter.IsolateNotAllowed" +// INVALIDPARAMETERVALUE_ACCOUNTEXIST = "InvalidParameterValue.AccountExist" +// INVALIDPARAMETERVALUE_ACCOUNTNOTEXISTERROR = "InvalidParameterValue.AccountNotExistError" +// INVALIDPARAMETERVALUE_DBTYPENOTFOUND = "InvalidParameterValue.DBTypeNotFound" +// INVALIDPARAMETERVALUE_FLOWNOTFOUND = "InvalidParameterValue.FlowNotFound" +// INVALIDPARAMETERVALUE_ILLEGALINSTANCENAME = "InvalidParameterValue.IllegalInstanceName" +// INVALIDPARAMETERVALUE_ILLEGALORDERBY = "InvalidParameterValue.IllegalOrderBy" +// INVALIDPARAMETERVALUE_ILLEGALPASSWORD = "InvalidParameterValue.IllegalPassword" +// INVALIDPARAMETERVALUE_INSTANCENOTFOUND = "InvalidParameterValue.InstanceNotFound" +// INVALIDPARAMETERVALUE_INTERNALACCOUNT = "InvalidParameterValue.InternalAccount" +// INVALIDPARAMETERVALUE_INVALIDDBVERSION = "InvalidParameterValue.InvalidDBVersion" +// INVALIDPARAMETERVALUE_INVALIDSPEC = "InvalidParameterValue.InvalidSpec" +// INVALIDPARAMETERVALUE_PARAMERROR = "InvalidParameterValue.ParamError" +// INVALIDPARAMETERVALUE_REGIONZONEUNAVAILABLE = "InvalidParameterValue.RegionZoneUnavailable" +// INVALIDPARAMETERVALUE_STORAGEPOOLNOTFOUND = "InvalidParameterValue.StoragePoolNotFound" +// INVALIDPARAMETERVALUE_SUBNETNOTFOUND = "InvalidParameterValue.SubnetNotFound" +// INVALIDPARAMETERVALUE_VPCNOTFOUND = "InvalidParameterValue.VpcNotFound" +// LIMITEXCEEDED_USERINSTANCELIMIT = "LimitExceeded.UserInstanceLimit" +// OPERATIONDENIED_INSTANCESTATUSDENIEDERROR = "OperationDenied.InstanceStatusDeniedError" +// OPERATIONDENIED_SERVERLESSINSTANCESTATUSDENIED = "OperationDenied.ServerlessInstanceStatusDenied" +// RESOURCENOTFOUND_CLUSTERNOTFOUNDERROR = "ResourceNotFound.ClusterNotFoundError" +// RESOURCEUNAVAILABLE_INSTANCELOCKFAIL = "ResourceUnavailable.InstanceLockFail" +// RESOURCEUNAVAILABLE_INSTANCESTATUSABNORMAL = "ResourceUnavailable.InstanceStatusAbnormal" +// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" +func (c *Client) ModifyAccountParamsWithContext(ctx context.Context, request *ModifyAccountParamsRequest) (response *ModifyAccountParamsResponse, err error) { + if request == nil { + request = NewModifyAccountParamsRequest() + } + request.SetContext(ctx) + + response = NewModifyAccountParamsResponse() + err = c.Send(request, response) + return +} + +func NewModifyBackupConfigRequest() (request *ModifyBackupConfigRequest) { + request = &ModifyBackupConfigRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cynosdb", APIVersion, "ModifyBackupConfig") + + + return +} + +func NewModifyBackupConfigResponse() (response *ModifyBackupConfigResponse) { + response = &ModifyBackupConfigResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyBackupConfig +// 修改指定集群的备份配置 +// +// 可能返回的错误码: +// FAILEDOPERATION_DATABASEACCESSERROR = "FailedOperation.DatabaseAccessError" +// FAILEDOPERATION_OPERATIONFAILEDERROR = "FailedOperation.OperationFailedError" +// INVALIDPARAMETERVALUE_INVALIDPARAMETERVALUEERROR = "InvalidParameterValue.InvalidParameterValueError" +// INVALIDPARAMETERVALUE_PARAMERROR = "InvalidParameterValue.ParamError" +// RESOURCENOTFOUND_CLUSTERNOTFOUNDERROR = "ResourceNotFound.ClusterNotFoundError" +// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" +func (c *Client) ModifyBackupConfig(request *ModifyBackupConfigRequest) (response *ModifyBackupConfigResponse, err error) { + if request == nil { + request = NewModifyBackupConfigRequest() + } + + response = NewModifyBackupConfigResponse() + err = c.Send(request, response) + return +} + +// ModifyBackupConfig +// 修改指定集群的备份配置 +// +// 可能返回的错误码: +// FAILEDOPERATION_DATABASEACCESSERROR = "FailedOperation.DatabaseAccessError" +// FAILEDOPERATION_OPERATIONFAILEDERROR = "FailedOperation.OperationFailedError" +// INVALIDPARAMETERVALUE_INVALIDPARAMETERVALUEERROR = "InvalidParameterValue.InvalidParameterValueError" +// INVALIDPARAMETERVALUE_PARAMERROR = "InvalidParameterValue.ParamError" +// RESOURCENOTFOUND_CLUSTERNOTFOUNDERROR = "ResourceNotFound.ClusterNotFoundError" +// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" +func (c *Client) ModifyBackupConfigWithContext(ctx context.Context, request *ModifyBackupConfigRequest) (response *ModifyBackupConfigResponse, err error) { + if request == nil { + request = NewModifyBackupConfigRequest() + } + request.SetContext(ctx) + + response = NewModifyBackupConfigResponse() + err = c.Send(request, response) + return +} + +func NewModifyClusterParamRequest() (request *ModifyClusterParamRequest) { + request = &ModifyClusterParamRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cynosdb", APIVersion, "ModifyClusterParam") + + + return +} + +func NewModifyClusterParamResponse() (response *ModifyClusterParamResponse) { + response = &ModifyClusterParamResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyClusterParam +// 修改集群参数 +// +// 可能返回的错误码: +// FAILEDOPERATION_FLOWCREATEERROR = "FailedOperation.FlowCreateError" +// FAILEDOPERATION_OPERATIONFAILEDERROR = "FailedOperation.OperationFailedError" +// INTERNALERROR_DBOPERATIONFAILED = "InternalError.DbOperationFailed" +// INTERNALERROR_SYSTEMERROR = "InternalError.SystemError" +// INVALIDPARAMETERVALUE_INSTANCENOTFOUND = "InvalidParameterValue.InstanceNotFound" +// OPERATIONDENIED_SERVERLESSCLUSTERSTATUSDENIED = "OperationDenied.ServerlessClusterStatusDenied" +// RESOURCENOTFOUND_CLUSTERNOTFOUNDERROR = "ResourceNotFound.ClusterNotFoundError" +// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" +func (c *Client) ModifyClusterParam(request *ModifyClusterParamRequest) (response *ModifyClusterParamResponse, err error) { + if request == nil { + request = NewModifyClusterParamRequest() + } + + response = NewModifyClusterParamResponse() + err = c.Send(request, response) + return +} + +// ModifyClusterParam +// 修改集群参数 +// +// 可能返回的错误码: +// FAILEDOPERATION_FLOWCREATEERROR = "FailedOperation.FlowCreateError" +// FAILEDOPERATION_OPERATIONFAILEDERROR = "FailedOperation.OperationFailedError" +// INTERNALERROR_DBOPERATIONFAILED = "InternalError.DbOperationFailed" +// INTERNALERROR_SYSTEMERROR = "InternalError.SystemError" +// INVALIDPARAMETERVALUE_INSTANCENOTFOUND = "InvalidParameterValue.InstanceNotFound" +// OPERATIONDENIED_SERVERLESSCLUSTERSTATUSDENIED = "OperationDenied.ServerlessClusterStatusDenied" +// RESOURCENOTFOUND_CLUSTERNOTFOUNDERROR = "ResourceNotFound.ClusterNotFoundError" +// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" +func (c *Client) ModifyClusterParamWithContext(ctx context.Context, request *ModifyClusterParamRequest) (response *ModifyClusterParamResponse, err error) { + if request == nil { + request = NewModifyClusterParamRequest() + } + request.SetContext(ctx) + + response = NewModifyClusterParamResponse() + err = c.Send(request, response) + return +} + +func NewModifyDBInstanceSecurityGroupsRequest() (request *ModifyDBInstanceSecurityGroupsRequest) { + request = &ModifyDBInstanceSecurityGroupsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cynosdb", APIVersion, "ModifyDBInstanceSecurityGroups") + + + return +} + +func NewModifyDBInstanceSecurityGroupsResponse() (response *ModifyDBInstanceSecurityGroupsResponse) { + response = &ModifyDBInstanceSecurityGroupsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyDBInstanceSecurityGroups +// 本接口(ModifyDBInstanceSecurityGroups)用于修改实例绑定的安全组。 +// +// 可能返回的错误码: +// FAILEDOPERATION_OPERATIONFAILEDERROR = "FailedOperation.OperationFailedError" +// INTERNALERROR_LISTINSTANCEFAILED = "InternalError.ListInstanceFailed" +// INTERNALERROR_QUERYDATABASEFAILED = "InternalError.QueryDatabaseFailed" +// INVALIDPARAMETERVALUE_INSTANCENOTFOUND = "InvalidParameterValue.InstanceNotFound" +// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" +func (c *Client) ModifyDBInstanceSecurityGroups(request *ModifyDBInstanceSecurityGroupsRequest) (response *ModifyDBInstanceSecurityGroupsResponse, err error) { + if request == nil { + request = NewModifyDBInstanceSecurityGroupsRequest() + } + + response = NewModifyDBInstanceSecurityGroupsResponse() + err = c.Send(request, response) + return +} + +// ModifyDBInstanceSecurityGroups +// 本接口(ModifyDBInstanceSecurityGroups)用于修改实例绑定的安全组。 +// +// 可能返回的错误码: +// FAILEDOPERATION_OPERATIONFAILEDERROR = "FailedOperation.OperationFailedError" +// INTERNALERROR_LISTINSTANCEFAILED = "InternalError.ListInstanceFailed" +// INTERNALERROR_QUERYDATABASEFAILED = "InternalError.QueryDatabaseFailed" +// INVALIDPARAMETERVALUE_INSTANCENOTFOUND = "InvalidParameterValue.InstanceNotFound" +// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" +func (c *Client) ModifyDBInstanceSecurityGroupsWithContext(ctx context.Context, request *ModifyDBInstanceSecurityGroupsRequest) (response *ModifyDBInstanceSecurityGroupsResponse, err error) { + if request == nil { + request = NewModifyDBInstanceSecurityGroupsRequest() + } + request.SetContext(ctx) + + response = NewModifyDBInstanceSecurityGroupsResponse() + err = c.Send(request, response) + return +} + +func NewModifyMaintainPeriodConfigRequest() (request *ModifyMaintainPeriodConfigRequest) { + request = &ModifyMaintainPeriodConfigRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cynosdb", APIVersion, "ModifyMaintainPeriodConfig") + + + return +} + +func NewModifyMaintainPeriodConfigResponse() (response *ModifyMaintainPeriodConfigResponse) { + response = &ModifyMaintainPeriodConfigResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyMaintainPeriodConfig +// 修改维护时间配置 +// +// 可能返回的错误码: +// FAILEDOPERATION_DATABASEACCESSERROR = "FailedOperation.DatabaseAccessError" +// INTERNALERROR_SYSTEMERROR = "InternalError.SystemError" +// INVALIDPARAMETERVALUE_INSTANCENOTFOUND = "InvalidParameterValue.InstanceNotFound" +// INVALIDPARAMETERVALUE_INVALIDPARAMETERVALUEERROR = "InvalidParameterValue.InvalidParameterValueError" +// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" +func (c *Client) ModifyMaintainPeriodConfig(request *ModifyMaintainPeriodConfigRequest) (response *ModifyMaintainPeriodConfigResponse, err error) { + if request == nil { + request = NewModifyMaintainPeriodConfigRequest() + } + + response = NewModifyMaintainPeriodConfigResponse() + err = c.Send(request, response) + return +} + +// ModifyMaintainPeriodConfig +// 修改维护时间配置 +// +// 可能返回的错误码: +// FAILEDOPERATION_DATABASEACCESSERROR = "FailedOperation.DatabaseAccessError" +// INTERNALERROR_SYSTEMERROR = "InternalError.SystemError" +// INVALIDPARAMETERVALUE_INSTANCENOTFOUND = "InvalidParameterValue.InstanceNotFound" +// INVALIDPARAMETERVALUE_INVALIDPARAMETERVALUEERROR = "InvalidParameterValue.InvalidParameterValueError" +// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" +func (c *Client) ModifyMaintainPeriodConfigWithContext(ctx context.Context, request *ModifyMaintainPeriodConfigRequest) (response *ModifyMaintainPeriodConfigResponse, err error) { + if request == nil { + request = NewModifyMaintainPeriodConfigRequest() + } + request.SetContext(ctx) + + response = NewModifyMaintainPeriodConfigResponse() + err = c.Send(request, response) + return +} + +func NewOfflineClusterRequest() (request *OfflineClusterRequest) { + request = &OfflineClusterRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cynosdb", APIVersion, "OfflineCluster") + + + return +} + +func NewOfflineClusterResponse() (response *OfflineClusterResponse) { + response = &OfflineClusterResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// OfflineCluster +// 下线集群 +// +// 可能返回的错误码: +// FAILEDOPERATION_FLOWCREATEERROR = "FailedOperation.FlowCreateError" +// INTERNALERROR_DBOPERATIONFAILED = "InternalError.DbOperationFailed" +// INTERNALERROR_UNKNOWNERROR = "InternalError.UnknownError" +// OPERATIONDENIED_CLUSTEROPNOTALLOWEDERROR = "OperationDenied.ClusterOpNotAllowedError" +// RESOURCENOTFOUND_CLUSTERNOTFOUNDERROR = "ResourceNotFound.ClusterNotFoundError" // RESOURCEUNAVAILABLE_INSTANCELOCKFAIL = "ResourceUnavailable.InstanceLockFail" // RESOURCEUNAVAILABLE_INSTANCESTATUSABNORMAL = "ResourceUnavailable.InstanceStatusAbnormal" // UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" -func (c *Client) IsolateInstance(request *IsolateInstanceRequest) (response *IsolateInstanceResponse, err error) { +func (c *Client) OfflineCluster(request *OfflineClusterRequest) (response *OfflineClusterResponse, err error) { if request == nil { - request = NewIsolateInstanceRequest() + request = NewOfflineClusterRequest() } - response = NewIsolateInstanceResponse() + + response = NewOfflineClusterResponse() err = c.Send(request, response) return } -func NewModifyBackupConfigRequest() (request *ModifyBackupConfigRequest) { - request = &ModifyBackupConfigRequest{ +// OfflineCluster +// 下线集群 +// +// 可能返回的错误码: +// FAILEDOPERATION_FLOWCREATEERROR = "FailedOperation.FlowCreateError" +// INTERNALERROR_DBOPERATIONFAILED = "InternalError.DbOperationFailed" +// INTERNALERROR_UNKNOWNERROR = "InternalError.UnknownError" +// OPERATIONDENIED_CLUSTEROPNOTALLOWEDERROR = "OperationDenied.ClusterOpNotAllowedError" +// RESOURCENOTFOUND_CLUSTERNOTFOUNDERROR = "ResourceNotFound.ClusterNotFoundError" +// RESOURCEUNAVAILABLE_INSTANCELOCKFAIL = "ResourceUnavailable.InstanceLockFail" +// RESOURCEUNAVAILABLE_INSTANCESTATUSABNORMAL = "ResourceUnavailable.InstanceStatusAbnormal" +// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" +func (c *Client) OfflineClusterWithContext(ctx context.Context, request *OfflineClusterRequest) (response *OfflineClusterResponse, err error) { + if request == nil { + request = NewOfflineClusterRequest() + } + request.SetContext(ctx) + + response = NewOfflineClusterResponse() + err = c.Send(request, response) + return +} + +func NewOfflineInstanceRequest() (request *OfflineInstanceRequest) { + request = &OfflineInstanceRequest{ BaseRequest: &tchttp.BaseRequest{}, } - request.Init().WithApiInfo("cynosdb", APIVersion, "ModifyBackupConfig") + request.Init().WithApiInfo("cynosdb", APIVersion, "OfflineInstance") + + return } -func NewModifyBackupConfigResponse() (response *ModifyBackupConfigResponse) { - response = &ModifyBackupConfigResponse{ +func NewOfflineInstanceResponse() (response *OfflineInstanceResponse) { + response = &OfflineInstanceResponse{ BaseResponse: &tchttp.BaseResponse{}, } return } -// ModifyBackupConfig -// 修改指定集群的备份配置 +// OfflineInstance +// 下线实例 // // 可能返回的错误码: +// FAILEDOPERATION_DATABASEACCESSERROR = "FailedOperation.DatabaseAccessError" +// FAILEDOPERATION_FLOWCREATEERROR = "FailedOperation.FlowCreateError" +// FAILEDOPERATION_OPERATIONFAILEDERROR = "FailedOperation.OperationFailedError" +// INTERNALERROR_DBOPERATIONFAILED = "InternalError.DbOperationFailed" +// INVALIDPARAMETERVALUE_INSTANCENOTFOUND = "InvalidParameterValue.InstanceNotFound" // INVALIDPARAMETERVALUE_PARAMERROR = "InvalidParameterValue.ParamError" +// RESOURCENOTFOUND_INSTANCENOTFOUNDERROR = "ResourceNotFound.InstanceNotFoundError" +// RESOURCENOTFOUND_RESOURCEERROR = "ResourceNotFound.ResourceError" +// RESOURCEUNAVAILABLE_INSTANCELOCKFAIL = "ResourceUnavailable.InstanceLockFail" +// RESOURCEUNAVAILABLE_INSTANCESTATUSABNORMAL = "ResourceUnavailable.InstanceStatusAbnormal" // UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" -func (c *Client) ModifyBackupConfig(request *ModifyBackupConfigRequest) (response *ModifyBackupConfigResponse, err error) { +func (c *Client) OfflineInstance(request *OfflineInstanceRequest) (response *OfflineInstanceResponse, err error) { if request == nil { - request = NewModifyBackupConfigRequest() + request = NewOfflineInstanceRequest() } - response = NewModifyBackupConfigResponse() + + response = NewOfflineInstanceResponse() err = c.Send(request, response) return } -func NewModifyDBInstanceSecurityGroupsRequest() (request *ModifyDBInstanceSecurityGroupsRequest) { - request = &ModifyDBInstanceSecurityGroupsRequest{ +// OfflineInstance +// 下线实例 +// +// 可能返回的错误码: +// FAILEDOPERATION_DATABASEACCESSERROR = "FailedOperation.DatabaseAccessError" +// FAILEDOPERATION_FLOWCREATEERROR = "FailedOperation.FlowCreateError" +// FAILEDOPERATION_OPERATIONFAILEDERROR = "FailedOperation.OperationFailedError" +// INTERNALERROR_DBOPERATIONFAILED = "InternalError.DbOperationFailed" +// INVALIDPARAMETERVALUE_INSTANCENOTFOUND = "InvalidParameterValue.InstanceNotFound" +// INVALIDPARAMETERVALUE_PARAMERROR = "InvalidParameterValue.ParamError" +// RESOURCENOTFOUND_INSTANCENOTFOUNDERROR = "ResourceNotFound.InstanceNotFoundError" +// RESOURCENOTFOUND_RESOURCEERROR = "ResourceNotFound.ResourceError" +// RESOURCEUNAVAILABLE_INSTANCELOCKFAIL = "ResourceUnavailable.InstanceLockFail" +// RESOURCEUNAVAILABLE_INSTANCESTATUSABNORMAL = "ResourceUnavailable.InstanceStatusAbnormal" +// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" +func (c *Client) OfflineInstanceWithContext(ctx context.Context, request *OfflineInstanceRequest) (response *OfflineInstanceResponse, err error) { + if request == nil { + request = NewOfflineInstanceRequest() + } + request.SetContext(ctx) + + response = NewOfflineInstanceResponse() + err = c.Send(request, response) + return +} + +func NewPauseServerlessRequest() (request *PauseServerlessRequest) { + request = &PauseServerlessRequest{ BaseRequest: &tchttp.BaseRequest{}, } - request.Init().WithApiInfo("cynosdb", APIVersion, "ModifyDBInstanceSecurityGroups") + request.Init().WithApiInfo("cynosdb", APIVersion, "PauseServerless") + + return } -func NewModifyDBInstanceSecurityGroupsResponse() (response *ModifyDBInstanceSecurityGroupsResponse) { - response = &ModifyDBInstanceSecurityGroupsResponse{ +func NewPauseServerlessResponse() (response *PauseServerlessResponse) { + response = &PauseServerlessResponse{ BaseResponse: &tchttp.BaseResponse{}, } return } -// ModifyDBInstanceSecurityGroups -// 本接口(ModifyDBInstanceSecurityGroups)用于修改实例绑定的安全组。 +// PauseServerless +// 暂停serverless集群 // // 可能返回的错误码: -// INTERNALERROR_LISTINSTANCEFAILED = "InternalError.ListInstanceFailed" -// INTERNALERROR_QUERYDATABASEFAILED = "InternalError.QueryDatabaseFailed" -// INVALIDPARAMETERVALUE_INSTANCENOTFOUND = "InvalidParameterValue.InstanceNotFound" -// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" -func (c *Client) ModifyDBInstanceSecurityGroups(request *ModifyDBInstanceSecurityGroupsRequest) (response *ModifyDBInstanceSecurityGroupsResponse, err error) { +// FAILEDOPERATION_FLOWCREATEERROR = "FailedOperation.FlowCreateError" +// INTERNALERROR_SYSTEMERROR = "InternalError.SystemError" +// INVALIDPARAMETERVALUE_CLUSTERNOTFOUND = "InvalidParameterValue.ClusterNotFound" +// INVALIDPARAMETERVALUE_DBMODENOTSERVERLESSERROR = "InvalidParameterValue.DbModeNotServerlessError" +// INVALIDPARAMETERVALUE_PARAMERROR = "InvalidParameterValue.ParamError" +// OPERATIONDENIED_SERVERLESSCLUSTERSTATUSDENIED = "OperationDenied.ServerlessClusterStatusDenied" +// RESOURCENOTFOUND_CLUSTERNOTFOUNDERROR = "ResourceNotFound.ClusterNotFoundError" +func (c *Client) PauseServerless(request *PauseServerlessRequest) (response *PauseServerlessResponse, err error) { if request == nil { - request = NewModifyDBInstanceSecurityGroupsRequest() + request = NewPauseServerlessRequest() } - response = NewModifyDBInstanceSecurityGroupsResponse() + + response = NewPauseServerlessResponse() err = c.Send(request, response) return } -func NewModifyMaintainPeriodConfigRequest() (request *ModifyMaintainPeriodConfigRequest) { - request = &ModifyMaintainPeriodConfigRequest{ +// PauseServerless +// 暂停serverless集群 +// +// 可能返回的错误码: +// FAILEDOPERATION_FLOWCREATEERROR = "FailedOperation.FlowCreateError" +// INTERNALERROR_SYSTEMERROR = "InternalError.SystemError" +// INVALIDPARAMETERVALUE_CLUSTERNOTFOUND = "InvalidParameterValue.ClusterNotFound" +// INVALIDPARAMETERVALUE_DBMODENOTSERVERLESSERROR = "InvalidParameterValue.DbModeNotServerlessError" +// INVALIDPARAMETERVALUE_PARAMERROR = "InvalidParameterValue.ParamError" +// OPERATIONDENIED_SERVERLESSCLUSTERSTATUSDENIED = "OperationDenied.ServerlessClusterStatusDenied" +// RESOURCENOTFOUND_CLUSTERNOTFOUNDERROR = "ResourceNotFound.ClusterNotFoundError" +func (c *Client) PauseServerlessWithContext(ctx context.Context, request *PauseServerlessRequest) (response *PauseServerlessResponse, err error) { + if request == nil { + request = NewPauseServerlessRequest() + } + request.SetContext(ctx) + + response = NewPauseServerlessResponse() + err = c.Send(request, response) + return +} + +func NewResumeServerlessRequest() (request *ResumeServerlessRequest) { + request = &ResumeServerlessRequest{ BaseRequest: &tchttp.BaseRequest{}, } - request.Init().WithApiInfo("cynosdb", APIVersion, "ModifyMaintainPeriodConfig") + request.Init().WithApiInfo("cynosdb", APIVersion, "ResumeServerless") + + return } -func NewModifyMaintainPeriodConfigResponse() (response *ModifyMaintainPeriodConfigResponse) { - response = &ModifyMaintainPeriodConfigResponse{ +func NewResumeServerlessResponse() (response *ResumeServerlessResponse) { + response = &ResumeServerlessResponse{ BaseResponse: &tchttp.BaseResponse{}, } return } -// ModifyMaintainPeriodConfig -// 修改维护时间配置 +// ResumeServerless +// 恢复serverless集群 // // 可能返回的错误码: +// FAILEDOPERATION_DATABASEACCESSERROR = "FailedOperation.DatabaseAccessError" +// FAILEDOPERATION_FLOWCREATEERROR = "FailedOperation.FlowCreateError" // INTERNALERROR_SYSTEMERROR = "InternalError.SystemError" -// INVALIDPARAMETERVALUE_INSTANCENOTFOUND = "InvalidParameterValue.InstanceNotFound" +// INTERNALERROR_UNKNOWNERROR = "InternalError.UnknownError" +// INVALIDPARAMETERVALUE_CLUSTERNOTFOUND = "InvalidParameterValue.ClusterNotFound" +// INVALIDPARAMETERVALUE_DBMODENOTSERVERLESSERROR = "InvalidParameterValue.DbModeNotServerlessError" +// INVALIDPARAMETERVALUE_PARAMERROR = "InvalidParameterValue.ParamError" +// OPERATIONDENIED_INSTANCESTATUSDENIEDERROR = "OperationDenied.InstanceStatusDeniedError" +// OPERATIONDENIED_SERVERLESSCLUSTERSTATUSDENIED = "OperationDenied.ServerlessClusterStatusDenied" +// RESOURCENOTFOUND_CLUSTERNOTFOUNDERROR = "ResourceNotFound.ClusterNotFoundError" // UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" -func (c *Client) ModifyMaintainPeriodConfig(request *ModifyMaintainPeriodConfigRequest) (response *ModifyMaintainPeriodConfigResponse, err error) { +func (c *Client) ResumeServerless(request *ResumeServerlessRequest) (response *ResumeServerlessResponse, err error) { if request == nil { - request = NewModifyMaintainPeriodConfigRequest() + request = NewResumeServerlessRequest() } - response = NewModifyMaintainPeriodConfigResponse() + + response = NewResumeServerlessResponse() err = c.Send(request, response) return } -func NewOfflineClusterRequest() (request *OfflineClusterRequest) { - request = &OfflineClusterRequest{ +// ResumeServerless +// 恢复serverless集群 +// +// 可能返回的错误码: +// FAILEDOPERATION_DATABASEACCESSERROR = "FailedOperation.DatabaseAccessError" +// FAILEDOPERATION_FLOWCREATEERROR = "FailedOperation.FlowCreateError" +// INTERNALERROR_SYSTEMERROR = "InternalError.SystemError" +// INTERNALERROR_UNKNOWNERROR = "InternalError.UnknownError" +// INVALIDPARAMETERVALUE_CLUSTERNOTFOUND = "InvalidParameterValue.ClusterNotFound" +// INVALIDPARAMETERVALUE_DBMODENOTSERVERLESSERROR = "InvalidParameterValue.DbModeNotServerlessError" +// INVALIDPARAMETERVALUE_PARAMERROR = "InvalidParameterValue.ParamError" +// OPERATIONDENIED_INSTANCESTATUSDENIEDERROR = "OperationDenied.InstanceStatusDeniedError" +// OPERATIONDENIED_SERVERLESSCLUSTERSTATUSDENIED = "OperationDenied.ServerlessClusterStatusDenied" +// RESOURCENOTFOUND_CLUSTERNOTFOUNDERROR = "ResourceNotFound.ClusterNotFoundError" +// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" +func (c *Client) ResumeServerlessWithContext(ctx context.Context, request *ResumeServerlessRequest) (response *ResumeServerlessResponse, err error) { + if request == nil { + request = NewResumeServerlessRequest() + } + request.SetContext(ctx) + + response = NewResumeServerlessResponse() + err = c.Send(request, response) + return +} + +func NewRevokeAccountPrivilegesRequest() (request *RevokeAccountPrivilegesRequest) { + request = &RevokeAccountPrivilegesRequest{ BaseRequest: &tchttp.BaseRequest{}, } - request.Init().WithApiInfo("cynosdb", APIVersion, "OfflineCluster") + request.Init().WithApiInfo("cynosdb", APIVersion, "RevokeAccountPrivileges") + + return } -func NewOfflineClusterResponse() (response *OfflineClusterResponse) { - response = &OfflineClusterResponse{ +func NewRevokeAccountPrivilegesResponse() (response *RevokeAccountPrivilegesResponse) { + response = &RevokeAccountPrivilegesResponse{ BaseResponse: &tchttp.BaseResponse{}, } return } -// OfflineCluster -// 下线集群 +// RevokeAccountPrivileges +// 批量回收账号权限 // // 可能返回的错误码: +// FAILEDOPERATION_DATABASEACCESSERROR = "FailedOperation.DatabaseAccessError" +// FAILEDOPERATION_OPERATIONFAILEDERROR = "FailedOperation.OperationFailedError" // INTERNALERROR_DBOPERATIONFAILED = "InternalError.DbOperationFailed" +// INTERNALERROR_GETSECURITYGROUPDETAILFAILED = "InternalError.GetSecurityGroupDetailFailed" +// INTERNALERROR_GETSUBNETFAILED = "InternalError.GetSubnetFailed" +// INTERNALERROR_GETVPCFAILED = "InternalError.GetVpcFailed" +// INTERNALERROR_LISTINSTANCEFAILED = "InternalError.ListInstanceFailed" +// INTERNALERROR_OPERATEWANFAIL = "InternalError.OperateWanFail" +// INTERNALERROR_OPERATIONNOTSUPPORT = "InternalError.OperationNotSupport" +// INTERNALERROR_QUERYDATABASEFAILED = "InternalError.QueryDatabaseFailed" +// INTERNALERROR_SYSTEMERROR = "InternalError.SystemError" +// INVALIDPARAMETER_ISOLATENOTALLOWED = "InvalidParameter.IsolateNotAllowed" +// INVALIDPARAMETERVALUE_ACCOUNTEXIST = "InvalidParameterValue.AccountExist" +// INVALIDPARAMETERVALUE_ACCOUNTNOTEXISTERROR = "InvalidParameterValue.AccountNotExistError" +// INVALIDPARAMETERVALUE_DBTYPENOTFOUND = "InvalidParameterValue.DBTypeNotFound" +// INVALIDPARAMETERVALUE_FLOWNOTFOUND = "InvalidParameterValue.FlowNotFound" +// INVALIDPARAMETERVALUE_ILLEGALINSTANCENAME = "InvalidParameterValue.IllegalInstanceName" +// INVALIDPARAMETERVALUE_ILLEGALORDERBY = "InvalidParameterValue.IllegalOrderBy" +// INVALIDPARAMETERVALUE_ILLEGALPASSWORD = "InvalidParameterValue.IllegalPassword" +// INVALIDPARAMETERVALUE_INSTANCENOTFOUND = "InvalidParameterValue.InstanceNotFound" +// INVALIDPARAMETERVALUE_INTERNALACCOUNT = "InvalidParameterValue.InternalAccount" +// INVALIDPARAMETERVALUE_INVALIDDBVERSION = "InvalidParameterValue.InvalidDBVersion" +// INVALIDPARAMETERVALUE_INVALIDSPEC = "InvalidParameterValue.InvalidSpec" +// INVALIDPARAMETERVALUE_PARAMERROR = "InvalidParameterValue.ParamError" +// INVALIDPARAMETERVALUE_REGIONZONEUNAVAILABLE = "InvalidParameterValue.RegionZoneUnavailable" +// INVALIDPARAMETERVALUE_STORAGEPOOLNOTFOUND = "InvalidParameterValue.StoragePoolNotFound" +// INVALIDPARAMETERVALUE_SUBNETNOTFOUND = "InvalidParameterValue.SubnetNotFound" +// INVALIDPARAMETERVALUE_VPCNOTFOUND = "InvalidParameterValue.VpcNotFound" +// LIMITEXCEEDED_USERINSTANCELIMIT = "LimitExceeded.UserInstanceLimit" +// OPERATIONDENIED_INSTANCESTATUSDENIEDERROR = "OperationDenied.InstanceStatusDeniedError" +// OPERATIONDENIED_SERVERLESSINSTANCESTATUSDENIED = "OperationDenied.ServerlessInstanceStatusDenied" +// RESOURCENOTFOUND_CLUSTERNOTFOUNDERROR = "ResourceNotFound.ClusterNotFoundError" // RESOURCEUNAVAILABLE_INSTANCELOCKFAIL = "ResourceUnavailable.InstanceLockFail" // RESOURCEUNAVAILABLE_INSTANCESTATUSABNORMAL = "ResourceUnavailable.InstanceStatusAbnormal" // UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" -func (c *Client) OfflineCluster(request *OfflineClusterRequest) (response *OfflineClusterResponse, err error) { +func (c *Client) RevokeAccountPrivileges(request *RevokeAccountPrivilegesRequest) (response *RevokeAccountPrivilegesResponse, err error) { if request == nil { - request = NewOfflineClusterRequest() + request = NewRevokeAccountPrivilegesRequest() } - response = NewOfflineClusterResponse() + + response = NewRevokeAccountPrivilegesResponse() err = c.Send(request, response) return } -func NewOfflineInstanceRequest() (request *OfflineInstanceRequest) { - request = &OfflineInstanceRequest{ +// RevokeAccountPrivileges +// 批量回收账号权限 +// +// 可能返回的错误码: +// FAILEDOPERATION_DATABASEACCESSERROR = "FailedOperation.DatabaseAccessError" +// FAILEDOPERATION_OPERATIONFAILEDERROR = "FailedOperation.OperationFailedError" +// INTERNALERROR_DBOPERATIONFAILED = "InternalError.DbOperationFailed" +// INTERNALERROR_GETSECURITYGROUPDETAILFAILED = "InternalError.GetSecurityGroupDetailFailed" +// INTERNALERROR_GETSUBNETFAILED = "InternalError.GetSubnetFailed" +// INTERNALERROR_GETVPCFAILED = "InternalError.GetVpcFailed" +// INTERNALERROR_LISTINSTANCEFAILED = "InternalError.ListInstanceFailed" +// INTERNALERROR_OPERATEWANFAIL = "InternalError.OperateWanFail" +// INTERNALERROR_OPERATIONNOTSUPPORT = "InternalError.OperationNotSupport" +// INTERNALERROR_QUERYDATABASEFAILED = "InternalError.QueryDatabaseFailed" +// INTERNALERROR_SYSTEMERROR = "InternalError.SystemError" +// INVALIDPARAMETER_ISOLATENOTALLOWED = "InvalidParameter.IsolateNotAllowed" +// INVALIDPARAMETERVALUE_ACCOUNTEXIST = "InvalidParameterValue.AccountExist" +// INVALIDPARAMETERVALUE_ACCOUNTNOTEXISTERROR = "InvalidParameterValue.AccountNotExistError" +// INVALIDPARAMETERVALUE_DBTYPENOTFOUND = "InvalidParameterValue.DBTypeNotFound" +// INVALIDPARAMETERVALUE_FLOWNOTFOUND = "InvalidParameterValue.FlowNotFound" +// INVALIDPARAMETERVALUE_ILLEGALINSTANCENAME = "InvalidParameterValue.IllegalInstanceName" +// INVALIDPARAMETERVALUE_ILLEGALORDERBY = "InvalidParameterValue.IllegalOrderBy" +// INVALIDPARAMETERVALUE_ILLEGALPASSWORD = "InvalidParameterValue.IllegalPassword" +// INVALIDPARAMETERVALUE_INSTANCENOTFOUND = "InvalidParameterValue.InstanceNotFound" +// INVALIDPARAMETERVALUE_INTERNALACCOUNT = "InvalidParameterValue.InternalAccount" +// INVALIDPARAMETERVALUE_INVALIDDBVERSION = "InvalidParameterValue.InvalidDBVersion" +// INVALIDPARAMETERVALUE_INVALIDSPEC = "InvalidParameterValue.InvalidSpec" +// INVALIDPARAMETERVALUE_PARAMERROR = "InvalidParameterValue.ParamError" +// INVALIDPARAMETERVALUE_REGIONZONEUNAVAILABLE = "InvalidParameterValue.RegionZoneUnavailable" +// INVALIDPARAMETERVALUE_STORAGEPOOLNOTFOUND = "InvalidParameterValue.StoragePoolNotFound" +// INVALIDPARAMETERVALUE_SUBNETNOTFOUND = "InvalidParameterValue.SubnetNotFound" +// INVALIDPARAMETERVALUE_VPCNOTFOUND = "InvalidParameterValue.VpcNotFound" +// LIMITEXCEEDED_USERINSTANCELIMIT = "LimitExceeded.UserInstanceLimit" +// OPERATIONDENIED_INSTANCESTATUSDENIEDERROR = "OperationDenied.InstanceStatusDeniedError" +// OPERATIONDENIED_SERVERLESSINSTANCESTATUSDENIED = "OperationDenied.ServerlessInstanceStatusDenied" +// RESOURCENOTFOUND_CLUSTERNOTFOUNDERROR = "ResourceNotFound.ClusterNotFoundError" +// RESOURCEUNAVAILABLE_INSTANCELOCKFAIL = "ResourceUnavailable.InstanceLockFail" +// RESOURCEUNAVAILABLE_INSTANCESTATUSABNORMAL = "ResourceUnavailable.InstanceStatusAbnormal" +// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" +func (c *Client) RevokeAccountPrivilegesWithContext(ctx context.Context, request *RevokeAccountPrivilegesRequest) (response *RevokeAccountPrivilegesResponse, err error) { + if request == nil { + request = NewRevokeAccountPrivilegesRequest() + } + request.SetContext(ctx) + + response = NewRevokeAccountPrivilegesResponse() + err = c.Send(request, response) + return +} + +func NewRollBackClusterRequest() (request *RollBackClusterRequest) { + request = &RollBackClusterRequest{ BaseRequest: &tchttp.BaseRequest{}, } - request.Init().WithApiInfo("cynosdb", APIVersion, "OfflineInstance") + request.Init().WithApiInfo("cynosdb", APIVersion, "RollBackCluster") + + return } -func NewOfflineInstanceResponse() (response *OfflineInstanceResponse) { - response = &OfflineInstanceResponse{ +func NewRollBackClusterResponse() (response *RollBackClusterResponse) { + response = &RollBackClusterResponse{ BaseResponse: &tchttp.BaseResponse{}, } return } -// OfflineInstance -// 下线实例 +// RollBackCluster +// 本接口(RollBackCluster)用于回档集群 // // 可能返回的错误码: +// FAILEDOPERATION_FLOWCREATEERROR = "FailedOperation.FlowCreateError" +// FAILEDOPERATION_OPERATIONFAILEDERROR = "FailedOperation.OperationFailedError" // INTERNALERROR_DBOPERATIONFAILED = "InternalError.DbOperationFailed" -// INVALIDPARAMETERVALUE_INSTANCENOTFOUND = "InvalidParameterValue.InstanceNotFound" -// INVALIDPARAMETERVALUE_PARAMERROR = "InvalidParameterValue.ParamError" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// RESOURCENOTFOUND_CLUSTERNOTFOUNDERROR = "ResourceNotFound.ClusterNotFoundError" // RESOURCEUNAVAILABLE_INSTANCELOCKFAIL = "ResourceUnavailable.InstanceLockFail" // RESOURCEUNAVAILABLE_INSTANCESTATUSABNORMAL = "ResourceUnavailable.InstanceStatusAbnormal" // UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" -func (c *Client) OfflineInstance(request *OfflineInstanceRequest) (response *OfflineInstanceResponse, err error) { +func (c *Client) RollBackCluster(request *RollBackClusterRequest) (response *RollBackClusterResponse, err error) { if request == nil { - request = NewOfflineInstanceRequest() + request = NewRollBackClusterRequest() } - response = NewOfflineInstanceResponse() + + response = NewRollBackClusterResponse() + err = c.Send(request, response) + return +} + +// RollBackCluster +// 本接口(RollBackCluster)用于回档集群 +// +// 可能返回的错误码: +// FAILEDOPERATION_FLOWCREATEERROR = "FailedOperation.FlowCreateError" +// FAILEDOPERATION_OPERATIONFAILEDERROR = "FailedOperation.OperationFailedError" +// INTERNALERROR_DBOPERATIONFAILED = "InternalError.DbOperationFailed" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// RESOURCENOTFOUND_CLUSTERNOTFOUNDERROR = "ResourceNotFound.ClusterNotFoundError" +// RESOURCEUNAVAILABLE_INSTANCELOCKFAIL = "ResourceUnavailable.InstanceLockFail" +// RESOURCEUNAVAILABLE_INSTANCESTATUSABNORMAL = "ResourceUnavailable.InstanceStatusAbnormal" +// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" +func (c *Client) RollBackClusterWithContext(ctx context.Context, request *RollBackClusterRequest) (response *RollBackClusterResponse, err error) { + if request == nil { + request = NewRollBackClusterRequest() + } + request.SetContext(ctx) + + response = NewRollBackClusterResponse() err = c.Send(request, response) return } @@ -836,6 +2509,8 @@ func NewSetRenewFlagRequest() (request *SetRenewFlagRequest) { BaseRequest: &tchttp.BaseRequest{}, } request.Init().WithApiInfo("cynosdb", APIVersion, "SetRenewFlag") + + return } @@ -850,6 +2525,7 @@ func NewSetRenewFlagResponse() (response *SetRenewFlagResponse) { // SetRenewFlag设置实例的自动续费功能 // // 可能返回的错误码: +// FAILEDOPERATION_DATABASEACCESSERROR = "FailedOperation.DatabaseAccessError" // INTERNALERROR = "InternalError" // INTERNALERROR_DBOPERATIONFAILED = "InternalError.DbOperationFailed" // INTERNALERROR_OPERATIONNOTSUPPORT = "InternalError.OperationNotSupport" @@ -861,11 +2537,44 @@ func NewSetRenewFlagResponse() (response *SetRenewFlagResponse) { // INVALIDPARAMETERVALUE_INSTANCENOTFOUND = "InvalidParameterValue.InstanceNotFound" // INVALIDPARAMETERVALUE_PARAMERROR = "InvalidParameterValue.ParamError" // INVALIDPARAMETERVALUE_REGIONZONEUNAVAILABLE = "InvalidParameterValue.RegionZoneUnavailable" +// OPERATIONDENIED_CLUSTEROPNOTALLOWEDERROR = "OperationDenied.ClusterOpNotAllowedError" +// RESOURCENOTFOUND_CLUSTERNOTFOUNDERROR = "ResourceNotFound.ClusterNotFoundError" // RESOURCEUNAVAILABLE_INSTANCESTATUSABNORMAL = "ResourceUnavailable.InstanceStatusAbnormal" func (c *Client) SetRenewFlag(request *SetRenewFlagRequest) (response *SetRenewFlagResponse, err error) { if request == nil { request = NewSetRenewFlagRequest() } + + response = NewSetRenewFlagResponse() + err = c.Send(request, response) + return +} + +// SetRenewFlag +// SetRenewFlag设置实例的自动续费功能 +// +// 可能返回的错误码: +// FAILEDOPERATION_DATABASEACCESSERROR = "FailedOperation.DatabaseAccessError" +// INTERNALERROR = "InternalError" +// INTERNALERROR_DBOPERATIONFAILED = "InternalError.DbOperationFailed" +// INTERNALERROR_OPERATIONNOTSUPPORT = "InternalError.OperationNotSupport" +// INTERNALERROR_QUERYDATABASEFAILED = "InternalError.QueryDatabaseFailed" +// INTERNALERROR_SYSTEMERROR = "InternalError.SystemError" +// INVALIDPARAMETERVALUE_CLUSTERNOTFOUND = "InvalidParameterValue.ClusterNotFound" +// INVALIDPARAMETERVALUE_DBTYPENOTFOUND = "InvalidParameterValue.DBTypeNotFound" +// INVALIDPARAMETERVALUE_ILLEGALINSTANCENAME = "InvalidParameterValue.IllegalInstanceName" +// INVALIDPARAMETERVALUE_INSTANCENOTFOUND = "InvalidParameterValue.InstanceNotFound" +// INVALIDPARAMETERVALUE_PARAMERROR = "InvalidParameterValue.ParamError" +// INVALIDPARAMETERVALUE_REGIONZONEUNAVAILABLE = "InvalidParameterValue.RegionZoneUnavailable" +// OPERATIONDENIED_CLUSTEROPNOTALLOWEDERROR = "OperationDenied.ClusterOpNotAllowedError" +// RESOURCENOTFOUND_CLUSTERNOTFOUNDERROR = "ResourceNotFound.ClusterNotFoundError" +// RESOURCEUNAVAILABLE_INSTANCESTATUSABNORMAL = "ResourceUnavailable.InstanceStatusAbnormal" +func (c *Client) SetRenewFlagWithContext(ctx context.Context, request *SetRenewFlagRequest) (response *SetRenewFlagResponse, err error) { + if request == nil { + request = NewSetRenewFlagRequest() + } + request.SetContext(ctx) + response = NewSetRenewFlagResponse() err = c.Send(request, response) return @@ -876,6 +2585,8 @@ func NewUpgradeInstanceRequest() (request *UpgradeInstanceRequest) { BaseRequest: &tchttp.BaseRequest{}, } request.Init().WithApiInfo("cynosdb", APIVersion, "UpgradeInstance") + + return } @@ -891,15 +2602,49 @@ func NewUpgradeInstanceResponse() (response *UpgradeInstanceResponse) { // // 可能返回的错误码: // FAILEDOPERATION_CREATEORDER = "FailedOperation.CreateOrder" +// FAILEDOPERATION_DATABASEACCESSERROR = "FailedOperation.DatabaseAccessError" +// FAILEDOPERATION_OPERATIONFAILEDERROR = "FailedOperation.OperationFailedError" +// FAILEDOPERATION_TRADECREATEORDERERROR = "FailedOperation.TradeCreateOrderError" // INTERNALERROR_SYSTEMERROR = "InternalError.SystemError" +// INTERNALERROR_UNKNOWNERROR = "InternalError.UnknownError" // INVALIDPARAMETERVALUE_DBTYPENOTFOUND = "InvalidParameterValue.DBTypeNotFound" // INVALIDPARAMETERVALUE_INSTANCENOTFOUND = "InvalidParameterValue.InstanceNotFound" // INVALIDPARAMETERVALUE_PARAMERROR = "InvalidParameterValue.ParamError" +// OPERATIONDENIED_CLUSTEROPNOTALLOWEDERROR = "OperationDenied.ClusterOpNotAllowedError" +// RESOURCENOTFOUND_CLUSTERNOTFOUNDERROR = "ResourceNotFound.ClusterNotFoundError" // UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" func (c *Client) UpgradeInstance(request *UpgradeInstanceRequest) (response *UpgradeInstanceResponse, err error) { if request == nil { request = NewUpgradeInstanceRequest() } + + response = NewUpgradeInstanceResponse() + err = c.Send(request, response) + return +} + +// UpgradeInstance +// 升级实例 +// +// 可能返回的错误码: +// FAILEDOPERATION_CREATEORDER = "FailedOperation.CreateOrder" +// FAILEDOPERATION_DATABASEACCESSERROR = "FailedOperation.DatabaseAccessError" +// FAILEDOPERATION_OPERATIONFAILEDERROR = "FailedOperation.OperationFailedError" +// FAILEDOPERATION_TRADECREATEORDERERROR = "FailedOperation.TradeCreateOrderError" +// INTERNALERROR_SYSTEMERROR = "InternalError.SystemError" +// INTERNALERROR_UNKNOWNERROR = "InternalError.UnknownError" +// INVALIDPARAMETERVALUE_DBTYPENOTFOUND = "InvalidParameterValue.DBTypeNotFound" +// INVALIDPARAMETERVALUE_INSTANCENOTFOUND = "InvalidParameterValue.InstanceNotFound" +// INVALIDPARAMETERVALUE_PARAMERROR = "InvalidParameterValue.ParamError" +// OPERATIONDENIED_CLUSTEROPNOTALLOWEDERROR = "OperationDenied.ClusterOpNotAllowedError" +// RESOURCENOTFOUND_CLUSTERNOTFOUNDERROR = "ResourceNotFound.ClusterNotFoundError" +// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" +func (c *Client) UpgradeInstanceWithContext(ctx context.Context, request *UpgradeInstanceRequest) (response *UpgradeInstanceResponse, err error) { + if request == nil { + request = NewUpgradeInstanceRequest() + } + request.SetContext(ctx) + response = NewUpgradeInstanceResponse() err = c.Send(request, response) return diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cynosdb/v20190107/errors.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cynosdb/v20190107/errors.go index 90911f9b54..76e717a5aa 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cynosdb/v20190107/errors.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cynosdb/v20190107/errors.go @@ -17,12 +17,36 @@ package v20190107 const ( // 此产品的特有错误码 + // 获取权限失败,请稍后重试。如果持续不成功,请联系客服进行处理。 + FAILEDOPERATION_CAMCHECKRESOURCEERROR = "FailedOperation.CamCheckResourceError" + + // 鉴权失败,请稍后重试。如果持续不成功,请联系客服进行处理。 + FAILEDOPERATION_CAMSIGANDAUTHERROR = "FailedOperation.CamSigAndAuthError" + // 创建并支付订单失败。 FAILEDOPERATION_CREATEORDER = "FailedOperation.CreateOrder" + // 数据库访问失败,请稍后重试。如果持续不成功,请联系客服进行处理。 + FAILEDOPERATION_DATABASEACCESSERROR = "FailedOperation.DatabaseAccessError" + + // 创建流程{{1}}失败,请稍后重试。如果持续不成功,请联系客服进行处理。 + FAILEDOPERATION_FLOWCREATEERROR = "FailedOperation.FlowCreateError" + + // Flow不存在。 + FAILEDOPERATION_FLOWNOTFOUNDERROR = "FailedOperation.FlowNotFoundError" + + // 获取备份策略失败,请稍后重试。如果持续不成功,请联系客服进行处理。 + FAILEDOPERATION_GETBACKUPSTRATEGYERROR = "FailedOperation.GetBackupStrategyError" + // 账号余额不足。 FAILEDOPERATION_INSUFFICIENTBALANCE = "FailedOperation.InsufficientBalance" + // 操作失败{{1}},请稍后重试。如果持续不成功,请联系客服进行处理。 + FAILEDOPERATION_OPERATIONFAILEDERROR = "FailedOperation.OperationFailedError" + + // 创建并支付订单失败,请稍后重试。如果持续不成功,请联系客服进行处理。 + FAILEDOPERATION_TRADECREATEORDERERROR = "FailedOperation.TradeCreateOrderError" + // 内部错误。 INTERNALERROR = "InternalError" @@ -38,9 +62,15 @@ const ( // 获取VPC失败。 INTERNALERROR_GETVPCFAILED = "InternalError.GetVpcFailed" + // http请求执行异常。 + INTERNALERROR_INTERNALHTTPSERVERERROR = "InternalError.InternalHttpServerError" + // 安全组查询实例失败。 INTERNALERROR_LISTINSTANCEFAILED = "InternalError.ListInstanceFailed" + // 操作外网失败。 + INTERNALERROR_OPERATEWANFAIL = "InternalError.OperateWanFail" + // 操作不支持。 INTERNALERROR_OPERATIONNOTSUPPORT = "InternalError.OperationNotSupport" @@ -50,18 +80,39 @@ const ( // 系统内部错误。 INTERNALERROR_SYSTEMERROR = "InternalError.SystemError" + // 未知的内部错误。 + INTERNALERROR_UNKNOWNERROR = "InternalError.UnknownError" + + // 参数错误。 + INVALIDPARAMETER = "InvalidParameter" + // 当前实例不可隔离。 INVALIDPARAMETER_ISOLATENOTALLOWED = "InvalidParameter.IsolateNotAllowed" + // 参数取值错误。 + INVALIDPARAMETERVALUE = "InvalidParameterValue" + + // 账号已存在。 + INVALIDPARAMETERVALUE_ACCOUNTEXIST = "InvalidParameterValue.AccountExist" + + // 实例{{1}}不存在账号{{2}}。 + INVALIDPARAMETERVALUE_ACCOUNTNOTEXISTERROR = "InvalidParameterValue.AccountNotExistError" + // 未查询到集群。 INVALIDPARAMETERVALUE_CLUSTERNOTFOUND = "InvalidParameterValue.ClusterNotFound" // 不支持的实例类型。 INVALIDPARAMETERVALUE_DBTYPENOTFOUND = "InvalidParameterValue.DBTypeNotFound" + // 集群类型必须为serverless。 + INVALIDPARAMETERVALUE_DBMODENOTSERVERLESSERROR = "InvalidParameterValue.DbModeNotServerlessError" + // 未查询到订单id。 INVALIDPARAMETERVALUE_DEALNAMENOTFOUND = "InvalidParameterValue.DealNameNotFound" + // 任务流ID不存在。 + INVALIDPARAMETERVALUE_FLOWNOTFOUND = "InvalidParameterValue.FlowNotFound" + // 实例名称字符非法。 INVALIDPARAMETERVALUE_ILLEGALINSTANCENAME = "InvalidParameterValue.IllegalInstanceName" @@ -74,15 +125,33 @@ const ( // 实例不存在。 INVALIDPARAMETERVALUE_INSTANCENOTFOUND = "InvalidParameterValue.InstanceNotFound" + // 内置账号不允许操作。 + INVALIDPARAMETERVALUE_INTERNALACCOUNT = "InvalidParameterValue.InternalAccount" + // 实例版本非法。 INVALIDPARAMETERVALUE_INVALIDDBVERSION = "InvalidParameterValue.InvalidDBVersion" + // 参数值无效。 + INVALIDPARAMETERVALUE_INVALIDPARAMETERVALUEERROR = "InvalidParameterValue.InvalidParameterValueError" + + // 无效的地域{{1}}。 + INVALIDPARAMETERVALUE_INVALIDREGIONIDERROR = "InvalidParameterValue.InvalidRegionIdError" + // 实例规格非法。 INVALIDPARAMETERVALUE_INVALIDSPEC = "InvalidParameterValue.InvalidSpec" + // 无效的可用区{{1}}。 + INVALIDPARAMETERVALUE_INVALIDZONEIDERROR = "InvalidParameterValue.InvalidZoneIdError" + + // 参数{{1}}与{{2}}不可以同时设定。 + INVALIDPARAMETERVALUE_PARAMBOTHSETERROR = "InvalidParameterValue.ParamBothSetError" + // 参数错误。 INVALIDPARAMETERVALUE_PARAMERROR = "InvalidParameterValue.ParamError" + // 预付费类型不允许该操作。 + INVALIDPARAMETERVALUE_PREPAYPAYMODEERROR = "InvalidParameterValue.PrePayPayModeError" + // 所选地域和可用区不可用。 INVALIDPARAMETERVALUE_REGIONZONEUNAVAILABLE = "InvalidParameterValue.RegionZoneUnavailable" @@ -98,6 +167,36 @@ const ( // 用户实例个数超出限制。 LIMITEXCEEDED_USERINSTANCELIMIT = "LimitExceeded.UserInstanceLimit" + // 由于{{1}},当前集群不允许该操作。 + OPERATIONDENIED_CLUSTEROPNOTALLOWEDERROR = "OperationDenied.ClusterOpNotAllowedError" + + // 集群{{1}}当前状态不允许该操作。 + OPERATIONDENIED_CLUSTERSTATUSDENIEDERROR = "OperationDenied.ClusterStatusDeniedError" + + // 实例{{1}}当前状态不允许该操作。 + OPERATIONDENIED_INSTANCESTATUSDENIEDERROR = "OperationDenied.InstanceStatusDeniedError" + + // 账号余额不足。 + OPERATIONDENIED_INSUFFICIENTBALANCEERROR = "OperationDenied.InsufficientBalanceError" + + // serverless集群当前状态{{1}}不允许该操作。 + OPERATIONDENIED_SERVERLESSCLUSTERSTATUSDENIED = "OperationDenied.ServerlessClusterStatusDenied" + + // serverless实例当前状态{{1}}不允许该操作。 + OPERATIONDENIED_SERVERLESSINSTANCESTATUSDENIED = "OperationDenied.ServerlessInstanceStatusDenied" + + // 用户未进行实名认证,请先进行实名认证才可购买。 + OPERATIONDENIED_USERNOTAUTHENTICATEDERROR = "OperationDenied.UserNotAuthenticatedError" + + // 集群{{1}}不存在。 + RESOURCENOTFOUND_CLUSTERNOTFOUNDERROR = "ResourceNotFound.ClusterNotFoundError" + + // 实例{{1}}不存在。 + RESOURCENOTFOUND_INSTANCENOTFOUNDERROR = "ResourceNotFound.InstanceNotFoundError" + + // 参数{{1}}对应资源不存在。 + RESOURCENOTFOUND_RESOURCEERROR = "ResourceNotFound.ResourceError" + // 锁定实例失败,暂时不可操作。 RESOURCEUNAVAILABLE_INSTANCELOCKFAIL = "ResourceUnavailable.InstanceLockFail" diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cynosdb/v20190107/models.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cynosdb/v20190107/models.go index ac00015758..dcfec503f6 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cynosdb/v20190107/models.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cynosdb/v20190107/models.go @@ -38,6 +38,68 @@ type Account struct { Host *string `json:"Host,omitempty" name:"Host"` } +type AccountParam struct { + + // 参数名称,当前仅支持参数:max_user_connections + ParamName *string `json:"ParamName,omitempty" name:"ParamName"` + + // 参数值 + ParamValue *string `json:"ParamValue,omitempty" name:"ParamValue"` +} + +type ActivateInstanceRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 实例ID数组 + InstanceIdList []*string `json:"InstanceIdList,omitempty" name:"InstanceIdList"` +} + +func (r *ActivateInstanceRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ActivateInstanceRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + delete(f, "InstanceIdList") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ActivateInstanceRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ActivateInstanceResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 任务流id + FlowId *int64 `json:"FlowId,omitempty" name:"FlowId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ActivateInstanceResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ActivateInstanceResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + type AddInstancesRequest struct { *tchttp.BaseRequest @@ -77,6 +139,9 @@ type AddInstancesRequest struct { // 订单来源 OrderSource *string `json:"OrderSource,omitempty" name:"OrderSource"` + + // 交易模式 0-下单并支付 1-下单 + DealMode *int64 `json:"DealMode,omitempty" name:"DealMode"` } func (r *AddInstancesRequest) ToJsonString() string { @@ -103,6 +168,7 @@ func (r *AddInstancesRequest) FromJsonString(s string) error { delete(f, "AutoVoucher") delete(f, "DbType") delete(f, "OrderSource") + delete(f, "DealMode") if len(f) > 0 { return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AddInstancesRequest has unknown keys!", "") } @@ -154,6 +220,60 @@ type Addr struct { Port *int64 `json:"Port,omitempty" name:"Port"` } +type AssociateSecurityGroupsRequest struct { + *tchttp.BaseRequest + + // 实例组ID数组 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // 要修改的安全组ID列表,一个或者多个安全组Id组成的数组。 + SecurityGroupIds []*string `json:"SecurityGroupIds,omitempty" name:"SecurityGroupIds"` + + // 可用区 + Zone *string `json:"Zone,omitempty" name:"Zone"` +} + +func (r *AssociateSecurityGroupsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AssociateSecurityGroupsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceIds") + delete(f, "SecurityGroupIds") + delete(f, "Zone") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AssociateSecurityGroupsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type AssociateSecurityGroupsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *AssociateSecurityGroupsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AssociateSecurityGroupsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + type BackupFileInfo struct { // 快照文件ID,用于回滚 @@ -220,6 +340,27 @@ type ClusterInstanceDetail struct { InstanceStorage *int64 `json:"InstanceStorage,omitempty" name:"InstanceStorage"` } +type ClusterParamModifyLog struct { + + // 参数名称 + ParamName *string `json:"ParamName,omitempty" name:"ParamName"` + + // 当前值 + CurrentValue *string `json:"CurrentValue,omitempty" name:"CurrentValue"` + + // 修改后的值 + UpdateValue *string `json:"UpdateValue,omitempty" name:"UpdateValue"` + + // 修改状态 + Status *string `json:"Status,omitempty" name:"Status"` + + // 创建时间 + CreateTime *string `json:"CreateTime,omitempty" name:"CreateTime"` + + // 更新时间 + UpdateTime *string `json:"UpdateTime,omitempty" name:"UpdateTime"` +} + type CreateClustersRequest struct { *tchttp.BaseRequest @@ -243,19 +384,22 @@ type CreateClustersRequest struct { // 所属项目ID ProjectId *int64 `json:"ProjectId,omitempty" name:"ProjectId"` + // 当DbMode为NORMAL或不填时必选 // 普通实例Cpu核数 Cpu *int64 `json:"Cpu,omitempty" name:"Cpu"` - // 普通实例内存 + // 当DbMode为NORMAL或不填时必选 + // 普通实例内存,单位G Memory *int64 `json:"Memory,omitempty" name:"Memory"` - // 存储 + // 该参数无实际意义,已废弃。 + // 存储大小,单位G。 Storage *int64 `json:"Storage,omitempty" name:"Storage"` // 集群名称 ClusterName *string `json:"ClusterName,omitempty" name:"ClusterName"` - // 账号密码(8-64个字符,至少包含字母、数字、字符(支持的字符:_+-&=!@#$%^*()~)中的两种) + // 账号密码(8-64个字符,包含大小写英文字母、数字和符号~!@#$%^&*_-+=`|\(){}[]:;'<>,.?/中的任意三种) AdminPassword *string `json:"AdminPassword,omitempty" name:"AdminPassword"` // 端口,默认5432 @@ -282,10 +426,12 @@ type CreateClustersRequest struct { // 时间点回档,指定时间;快照回档,快照时间 ExpectTime *string `json:"ExpectTime,omitempty" name:"ExpectTime"` + // 该参数无实际意义,已废弃。 // 时间点回档,指定时间允许范围 ExpectTimeThresh *uint64 `json:"ExpectTimeThresh,omitempty" name:"ExpectTimeThresh"` // 普通实例存储上限,单位GB + // 当DbType为MYSQL,且存储计费模式为预付费时,该参数需不大于cpu与memory对应存储规格上限 StorageLimit *int64 `json:"StorageLimit,omitempty" name:"StorageLimit"` // 实例数量 @@ -335,6 +481,26 @@ type CreateClustersRequest struct { // 当DbMode为SEVERLESS时,指定集群自动暂停的延迟,单位秒,可选范围[600,691200] // 默认值:600 AutoPauseDelay *int64 `json:"AutoPauseDelay,omitempty" name:"AutoPauseDelay"` + + // 集群存储计费模式,按量计费:0,包年包月:1。默认按量计费 + // 当DbType为MYSQL时,在集群计算计费模式为后付费(包括DbMode为SERVERLESS)时,存储计费模式仅可为按量计费 + // 回档与克隆均不支持包年包月存储 + StoragePayMode *int64 `json:"StoragePayMode,omitempty" name:"StoragePayMode"` + + // 安全组id数组 + SecurityGroupIds []*string `json:"SecurityGroupIds,omitempty" name:"SecurityGroupIds"` + + // 告警策略Id数组 + AlarmPolicyIds []*string `json:"AlarmPolicyIds,omitempty" name:"AlarmPolicyIds"` + + // 参数数组 + ClusterParams []*ParamItem `json:"ClusterParams,omitempty" name:"ClusterParams"` + + // 交易模式,0-下单且支付,1-下单 + DealMode *int64 `json:"DealMode,omitempty" name:"DealMode"` + + // 参数模版ID + ParamTemplateId *int64 `json:"ParamTemplateId,omitempty" name:"ParamTemplateId"` } func (r *CreateClustersRequest) ToJsonString() string { @@ -382,6 +548,12 @@ func (r *CreateClustersRequest) FromJsonString(s string) error { delete(f, "MaxCpu") delete(f, "AutoPause") delete(f, "AutoPauseDelay") + delete(f, "StoragePayMode") + delete(f, "SecurityGroupIds") + delete(f, "AlarmPolicyIds") + delete(f, "ClusterParams") + delete(f, "DealMode") + delete(f, "ParamTemplateId") if len(f) > 0 { return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateClustersRequest has unknown keys!", "") } @@ -400,11 +572,11 @@ type CreateClustersResponse struct { // 注意:此字段可能返回 null,表示取不到有效值。 DealNames []*string `json:"DealNames,omitempty" name:"DealNames"` - // 资源ID列表(异步发货可能无法返回该字段, 强烈建议使用dealNames字段查询接口DescribeResourcesByDealName获取异步发货的资源ID) + // 资源ID列表(该字段已不再维护,请使用dealNames字段查询接口DescribeResourcesByDealName获取资源ID) // 注意:此字段可能返回 null,表示取不到有效值。 ResourceIds []*string `json:"ResourceIds,omitempty" name:"ResourceIds"` - // 集群ID列表(异步发货可能不返回该字段, 强烈建议使用dealNames查询接口DescribeResourcesByDealName获取异步发货的集群ID) + // 集群ID列表(该字段已不再维护,请使用dealNames字段查询接口DescribeResourcesByDealName获取集群ID) // 注意:此字段可能返回 null,表示取不到有效值。 ClusterIds []*string `json:"ClusterIds,omitempty" name:"ClusterIds"` @@ -515,6 +687,24 @@ type CynosdbCluster struct { // resume // pause ServerlessStatus *string `json:"ServerlessStatus,omitempty" name:"ServerlessStatus"` + + // 集群预付费存储值大小 + Storage *int64 `json:"Storage,omitempty" name:"Storage"` + + // 集群存储为预付费时的存储ID,用于预付费存储变配 + StorageId *string `json:"StorageId,omitempty" name:"StorageId"` + + // 集群存储付费模式。0-按量计费,1-包年包月 + StoragePayMode *int64 `json:"StoragePayMode,omitempty" name:"StoragePayMode"` + + // 集群计算规格对应的最小存储值 + MinStorageSize *int64 `json:"MinStorageSize,omitempty" name:"MinStorageSize"` + + // 集群计算规格对应的最大存储值 + MaxStorageSize *int64 `json:"MaxStorageSize,omitempty" name:"MaxStorageSize"` + + // 集群网络信息 + NetAddrs []*NetAddr `json:"NetAddrs,omitempty" name:"NetAddrs"` } type CynosdbClusterDetail struct { @@ -719,6 +909,13 @@ type CynosdbInstance struct { // resume // pause ServerlessStatus *string `json:"ServerlessStatus,omitempty" name:"ServerlessStatus"` + + // 预付费存储Id + // 注意:此字段可能返回 null,表示取不到有效值。 + StorageId *string `json:"StorageId,omitempty" name:"StorageId"` + + // 存储付费类型 + StoragePayMode *int64 `json:"StoragePayMode,omitempty" name:"StoragePayMode"` } type CynosdbInstanceDetail struct { @@ -815,6 +1012,17 @@ type CynosdbInstanceDetail struct { // 续费标志 RenewFlag *int64 `json:"RenewFlag,omitempty" name:"RenewFlag"` + + // serverless实例cpu下限 + MinCpu *float64 `json:"MinCpu,omitempty" name:"MinCpu"` + + // serverless实例cpu上限 + MaxCpu *float64 `json:"MaxCpu,omitempty" name:"MaxCpu"` + + // serverless实例状态, 可能值: + // resume + // pause + ServerlessStatus *string `json:"ServerlessStatus,omitempty" name:"ServerlessStatus"` } type CynosdbInstanceGrp struct { @@ -865,6 +1073,90 @@ type CynosdbInstanceGrp struct { InstanceSet []*CynosdbInstance `json:"InstanceSet,omitempty" name:"InstanceSet"` } +type DatabasePrivileges struct { + + // 数据库 + Db *string `json:"Db,omitempty" name:"Db"` + + // 权限列表 + Privileges []*string `json:"Privileges,omitempty" name:"Privileges"` +} + +type DbTable struct { + + // 数据库名称 + Db *string `json:"Db,omitempty" name:"Db"` + + // 数据库表名称 + TableName *string `json:"TableName,omitempty" name:"TableName"` +} + +type DescribeAccountAllGrantPrivilegesRequest struct { + *tchttp.BaseRequest + + // 集群id + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 账号信息 + Account *InputAccount `json:"Account,omitempty" name:"Account"` +} + +func (r *DescribeAccountAllGrantPrivilegesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeAccountAllGrantPrivilegesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + delete(f, "Account") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeAccountAllGrantPrivilegesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeAccountAllGrantPrivilegesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 权限语句 + // 注意:此字段可能返回 null,表示取不到有效值。 + PrivilegeStatements []*string `json:"PrivilegeStatements,omitempty" name:"PrivilegeStatements"` + + // 全局权限 + // 注意:此字段可能返回 null,表示取不到有效值。 + GlobalPrivileges []*string `json:"GlobalPrivileges,omitempty" name:"GlobalPrivileges"` + + // 数据库权限 + // 注意:此字段可能返回 null,表示取不到有效值。 + DatabasePrivileges []*DatabasePrivileges `json:"DatabasePrivileges,omitempty" name:"DatabasePrivileges"` + + // 数据库表权限 + // 注意:此字段可能返回 null,表示取不到有效值。 + TablePrivileges []*TablePrivileges `json:"TablePrivileges,omitempty" name:"TablePrivileges"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeAccountAllGrantPrivilegesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeAccountAllGrantPrivilegesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + type DescribeAccountsRequest struct { *tchttp.BaseRequest @@ -997,6 +1289,10 @@ type DescribeBackupListRequest struct { // 备份文件列表起始 Offset *int64 `json:"Offset,omitempty" name:"Offset"` + + // 数据库类型,取值范围: + //