浏览代码

Add DescribeDBClusterPerformance, DescribeDBNodePerformance for performance.

sdk-team 6 年之前
父节点
当前提交
f9d516ba42

+ 3 - 0
ChangeLog.txt

@@ -1,3 +1,6 @@
+2019-10-25 Version: 1.60.215
+- Add DescribeDBClusterPerformance, DescribeDBNodePerformance for performance.
+
 2019-10-24 Version: 1.60.214
 - Optimize instance relevant interface.
 

+ 0 - 108
services/polardb/abort_db_cluster_migration.go

@@ -1,108 +0,0 @@
-package polardb
-
-//Licensed under the Apache License, Version 2.0 (the "License");
-//you may not use this file except in compliance with the License.
-//You may obtain a copy of the License at
-//
-//http://www.apache.org/licenses/LICENSE-2.0
-//
-//Unless required by applicable law or agreed to in writing, software
-//distributed under the License is distributed on an "AS IS" BASIS,
-//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//See the License for the specific language governing permissions and
-//limitations under the License.
-//
-// Code generated by Alibaba Cloud SDK Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is regenerated.
-
-import (
-	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
-	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
-)
-
-// AbortDBClusterMigration invokes the polardb.AbortDBClusterMigration API synchronously
-// api document: https://help.aliyun.com/api/polardb/abortdbclustermigration.html
-func (client *Client) AbortDBClusterMigration(request *AbortDBClusterMigrationRequest) (response *AbortDBClusterMigrationResponse, err error) {
-	response = CreateAbortDBClusterMigrationResponse()
-	err = client.DoAction(request, response)
-	return
-}
-
-// AbortDBClusterMigrationWithChan invokes the polardb.AbortDBClusterMigration API asynchronously
-// api document: https://help.aliyun.com/api/polardb/abortdbclustermigration.html
-// asynchronous document: https://help.aliyun.com/document_detail/66220.html
-func (client *Client) AbortDBClusterMigrationWithChan(request *AbortDBClusterMigrationRequest) (<-chan *AbortDBClusterMigrationResponse, <-chan error) {
-	responseChan := make(chan *AbortDBClusterMigrationResponse, 1)
-	errChan := make(chan error, 1)
-	err := client.AddAsyncTask(func() {
-		defer close(responseChan)
-		defer close(errChan)
-		response, err := client.AbortDBClusterMigration(request)
-		if err != nil {
-			errChan <- err
-		} else {
-			responseChan <- response
-		}
-	})
-	if err != nil {
-		errChan <- err
-		close(responseChan)
-		close(errChan)
-	}
-	return responseChan, errChan
-}
-
-// AbortDBClusterMigrationWithCallback invokes the polardb.AbortDBClusterMigration API asynchronously
-// api document: https://help.aliyun.com/api/polardb/abortdbclustermigration.html
-// asynchronous document: https://help.aliyun.com/document_detail/66220.html
-func (client *Client) AbortDBClusterMigrationWithCallback(request *AbortDBClusterMigrationRequest, callback func(response *AbortDBClusterMigrationResponse, err error)) <-chan int {
-	result := make(chan int, 1)
-	err := client.AddAsyncTask(func() {
-		var response *AbortDBClusterMigrationResponse
-		var err error
-		defer close(result)
-		response, err = client.AbortDBClusterMigration(request)
-		callback(response, err)
-		result <- 1
-	})
-	if err != nil {
-		defer close(result)
-		callback(nil, err)
-		result <- 0
-	}
-	return result
-}
-
-// AbortDBClusterMigrationRequest is the request struct for api AbortDBClusterMigration
-type AbortDBClusterMigrationRequest struct {
-	*requests.RpcRequest
-	ResourceOwnerId      requests.Integer `position:"Query" name:"ResourceOwnerId"`
-	SecurityToken        string           `position:"Query" name:"SecurityToken"`
-	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
-	DBClusterId          string           `position:"Query" name:"DBClusterId"`
-	OwnerAccount         string           `position:"Query" name:"OwnerAccount"`
-	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
-}
-
-// AbortDBClusterMigrationResponse is the response struct for api AbortDBClusterMigration
-type AbortDBClusterMigrationResponse struct {
-	*responses.BaseResponse
-	RequestId string `json:"RequestId" xml:"RequestId"`
-}
-
-// CreateAbortDBClusterMigrationRequest creates a request to invoke AbortDBClusterMigration API
-func CreateAbortDBClusterMigrationRequest() (request *AbortDBClusterMigrationRequest) {
-	request = &AbortDBClusterMigrationRequest{
-		RpcRequest: &requests.RpcRequest{},
-	}
-	request.InitWithApiInfo("polardb", "2017-08-01", "AbortDBClusterMigration", "polardb", "openAPI")
-	return
-}
-
-// CreateAbortDBClusterMigrationResponse creates a response to parse from AbortDBClusterMigration response
-func CreateAbortDBClusterMigrationResponse() (response *AbortDBClusterMigrationResponse) {
-	response = &AbortDBClusterMigrationResponse{
-		BaseResponse: &responses.BaseResponse{},
-	}
-	return
-}

+ 0 - 1
services/polardb/close_db_cluster_migration.go

@@ -77,7 +77,6 @@ func (client *Client) CloseDBClusterMigrationWithCallback(request *CloseDBCluste
 type CloseDBClusterMigrationRequest struct {
 	*requests.RpcRequest
 	ResourceOwnerId      requests.Integer `position:"Query" name:"ResourceOwnerId"`
-	SecurityToken        string           `position:"Query" name:"SecurityToken"`
 	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
 	DBClusterId          string           `position:"Query" name:"DBClusterId"`
 	OwnerAccount         string           `position:"Query" name:"OwnerAccount"`

+ 0 - 108
services/polardb/continue_db_cluster_migration.go

@@ -1,108 +0,0 @@
-package polardb
-
-//Licensed under the Apache License, Version 2.0 (the "License");
-//you may not use this file except in compliance with the License.
-//You may obtain a copy of the License at
-//
-//http://www.apache.org/licenses/LICENSE-2.0
-//
-//Unless required by applicable law or agreed to in writing, software
-//distributed under the License is distributed on an "AS IS" BASIS,
-//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//See the License for the specific language governing permissions and
-//limitations under the License.
-//
-// Code generated by Alibaba Cloud SDK Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is regenerated.
-
-import (
-	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
-	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
-)
-
-// ContinueDBClusterMigration invokes the polardb.ContinueDBClusterMigration API synchronously
-// api document: https://help.aliyun.com/api/polardb/continuedbclustermigration.html
-func (client *Client) ContinueDBClusterMigration(request *ContinueDBClusterMigrationRequest) (response *ContinueDBClusterMigrationResponse, err error) {
-	response = CreateContinueDBClusterMigrationResponse()
-	err = client.DoAction(request, response)
-	return
-}
-
-// ContinueDBClusterMigrationWithChan invokes the polardb.ContinueDBClusterMigration API asynchronously
-// api document: https://help.aliyun.com/api/polardb/continuedbclustermigration.html
-// asynchronous document: https://help.aliyun.com/document_detail/66220.html
-func (client *Client) ContinueDBClusterMigrationWithChan(request *ContinueDBClusterMigrationRequest) (<-chan *ContinueDBClusterMigrationResponse, <-chan error) {
-	responseChan := make(chan *ContinueDBClusterMigrationResponse, 1)
-	errChan := make(chan error, 1)
-	err := client.AddAsyncTask(func() {
-		defer close(responseChan)
-		defer close(errChan)
-		response, err := client.ContinueDBClusterMigration(request)
-		if err != nil {
-			errChan <- err
-		} else {
-			responseChan <- response
-		}
-	})
-	if err != nil {
-		errChan <- err
-		close(responseChan)
-		close(errChan)
-	}
-	return responseChan, errChan
-}
-
-// ContinueDBClusterMigrationWithCallback invokes the polardb.ContinueDBClusterMigration API asynchronously
-// api document: https://help.aliyun.com/api/polardb/continuedbclustermigration.html
-// asynchronous document: https://help.aliyun.com/document_detail/66220.html
-func (client *Client) ContinueDBClusterMigrationWithCallback(request *ContinueDBClusterMigrationRequest, callback func(response *ContinueDBClusterMigrationResponse, err error)) <-chan int {
-	result := make(chan int, 1)
-	err := client.AddAsyncTask(func() {
-		var response *ContinueDBClusterMigrationResponse
-		var err error
-		defer close(result)
-		response, err = client.ContinueDBClusterMigration(request)
-		callback(response, err)
-		result <- 1
-	})
-	if err != nil {
-		defer close(result)
-		callback(nil, err)
-		result <- 0
-	}
-	return result
-}
-
-// ContinueDBClusterMigrationRequest is the request struct for api ContinueDBClusterMigration
-type ContinueDBClusterMigrationRequest struct {
-	*requests.RpcRequest
-	ResourceOwnerId      requests.Integer `position:"Query" name:"ResourceOwnerId"`
-	SecurityToken        string           `position:"Query" name:"SecurityToken"`
-	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
-	DBClusterId          string           `position:"Query" name:"DBClusterId"`
-	OwnerAccount         string           `position:"Query" name:"OwnerAccount"`
-	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
-}
-
-// ContinueDBClusterMigrationResponse is the response struct for api ContinueDBClusterMigration
-type ContinueDBClusterMigrationResponse struct {
-	*responses.BaseResponse
-	RequestId string `json:"RequestId" xml:"RequestId"`
-}
-
-// CreateContinueDBClusterMigrationRequest creates a request to invoke ContinueDBClusterMigration API
-func CreateContinueDBClusterMigrationRequest() (request *ContinueDBClusterMigrationRequest) {
-	request = &ContinueDBClusterMigrationRequest{
-		RpcRequest: &requests.RpcRequest{},
-	}
-	request.InitWithApiInfo("polardb", "2017-08-01", "ContinueDBClusterMigration", "polardb", "openAPI")
-	return
-}
-
-// CreateContinueDBClusterMigrationResponse creates a response to parse from ContinueDBClusterMigration response
-func CreateContinueDBClusterMigrationResponse() (response *ContinueDBClusterMigrationResponse) {
-	response = &ContinueDBClusterMigrationResponse{
-		BaseResponse: &responses.BaseResponse{},
-	}
-	return
-}

+ 2 - 0
services/polardb/create_database.go

@@ -84,7 +84,9 @@ type CreateDatabaseRequest struct {
 	DBClusterId          string           `position:"Query" name:"DBClusterId"`
 	OwnerAccount         string           `position:"Query" name:"OwnerAccount"`
 	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
+	Collate              string           `position:"Query" name:"Collate"`
 	DBName               string           `position:"Query" name:"DBName"`
+	Ctype                string           `position:"Query" name:"Ctype"`
 	CharacterSetName     string           `position:"Query" name:"CharacterSetName"`
 }
 

+ 0 - 1
services/polardb/describe_db_cluster_migration.go

@@ -77,7 +77,6 @@ func (client *Client) DescribeDBClusterMigrationWithCallback(request *DescribeDB
 type DescribeDBClusterMigrationRequest struct {
 	*requests.RpcRequest
 	ResourceOwnerId      requests.Integer `position:"Query" name:"ResourceOwnerId"`
-	SecurityToken        string           `position:"Query" name:"SecurityToken"`
 	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
 	DBClusterId          string           `position:"Query" name:"DBClusterId"`
 	OwnerAccount         string           `position:"Query" name:"OwnerAccount"`

+ 118 - 0
services/polardb/describe_db_cluster_performance.go

@@ -0,0 +1,118 @@
+package polardb
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// DescribeDBClusterPerformance invokes the polardb.DescribeDBClusterPerformance API synchronously
+// api document: https://help.aliyun.com/api/polardb/describedbclusterperformance.html
+func (client *Client) DescribeDBClusterPerformance(request *DescribeDBClusterPerformanceRequest) (response *DescribeDBClusterPerformanceResponse, err error) {
+	response = CreateDescribeDBClusterPerformanceResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DescribeDBClusterPerformanceWithChan invokes the polardb.DescribeDBClusterPerformance API asynchronously
+// api document: https://help.aliyun.com/api/polardb/describedbclusterperformance.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeDBClusterPerformanceWithChan(request *DescribeDBClusterPerformanceRequest) (<-chan *DescribeDBClusterPerformanceResponse, <-chan error) {
+	responseChan := make(chan *DescribeDBClusterPerformanceResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DescribeDBClusterPerformance(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DescribeDBClusterPerformanceWithCallback invokes the polardb.DescribeDBClusterPerformance API asynchronously
+// api document: https://help.aliyun.com/api/polardb/describedbclusterperformance.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeDBClusterPerformanceWithCallback(request *DescribeDBClusterPerformanceRequest, callback func(response *DescribeDBClusterPerformanceResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DescribeDBClusterPerformanceResponse
+		var err error
+		defer close(result)
+		response, err = client.DescribeDBClusterPerformance(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DescribeDBClusterPerformanceRequest is the request struct for api DescribeDBClusterPerformance
+type DescribeDBClusterPerformanceRequest struct {
+	*requests.RpcRequest
+	ResourceOwnerId      requests.Integer `position:"Query" name:"ResourceOwnerId"`
+	StartTime            string           `position:"Query" name:"StartTime"`
+	Key                  string           `position:"Query" name:"Key"`
+	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
+	DBClusterId          string           `position:"Query" name:"DBClusterId"`
+	OwnerAccount         string           `position:"Query" name:"OwnerAccount"`
+	EndTime              string           `position:"Query" name:"EndTime"`
+	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
+	Metric               string           `position:"Query" name:"Metric"`
+}
+
+// DescribeDBClusterPerformanceResponse is the response struct for api DescribeDBClusterPerformance
+type DescribeDBClusterPerformanceResponse struct {
+	*responses.BaseResponse
+	RequestId       string                                        `json:"RequestId" xml:"RequestId"`
+	DBClusterId     string                                        `json:"DBClusterId" xml:"DBClusterId"`
+	Engine          string                                        `json:"Engine" xml:"Engine"`
+	DBType          string                                        `json:"DBType" xml:"DBType"`
+	DBVersion       string                                        `json:"DBVersion" xml:"DBVersion"`
+	StartTime       string                                        `json:"StartTime" xml:"StartTime"`
+	EndTime         string                                        `json:"EndTime" xml:"EndTime"`
+	PerformanceKeys PerformanceKeysInDescribeDBClusterPerformance `json:"PerformanceKeys" xml:"PerformanceKeys"`
+}
+
+// CreateDescribeDBClusterPerformanceRequest creates a request to invoke DescribeDBClusterPerformance API
+func CreateDescribeDBClusterPerformanceRequest() (request *DescribeDBClusterPerformanceRequest) {
+	request = &DescribeDBClusterPerformanceRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("polardb", "2017-08-01", "DescribeDBClusterPerformance", "polardb", "openAPI")
+	return
+}
+
+// CreateDescribeDBClusterPerformanceResponse creates a response to parse from DescribeDBClusterPerformance response
+func CreateDescribeDBClusterPerformanceResponse() (response *DescribeDBClusterPerformanceResponse) {
+	response = &DescribeDBClusterPerformanceResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 118 - 0
services/polardb/describe_db_node_performance.go

@@ -0,0 +1,118 @@
+package polardb
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// DescribeDBNodePerformance invokes the polardb.DescribeDBNodePerformance API synchronously
+// api document: https://help.aliyun.com/api/polardb/describedbnodeperformance.html
+func (client *Client) DescribeDBNodePerformance(request *DescribeDBNodePerformanceRequest) (response *DescribeDBNodePerformanceResponse, err error) {
+	response = CreateDescribeDBNodePerformanceResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DescribeDBNodePerformanceWithChan invokes the polardb.DescribeDBNodePerformance API asynchronously
+// api document: https://help.aliyun.com/api/polardb/describedbnodeperformance.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeDBNodePerformanceWithChan(request *DescribeDBNodePerformanceRequest) (<-chan *DescribeDBNodePerformanceResponse, <-chan error) {
+	responseChan := make(chan *DescribeDBNodePerformanceResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DescribeDBNodePerformance(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DescribeDBNodePerformanceWithCallback invokes the polardb.DescribeDBNodePerformance API asynchronously
+// api document: https://help.aliyun.com/api/polardb/describedbnodeperformance.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeDBNodePerformanceWithCallback(request *DescribeDBNodePerformanceRequest, callback func(response *DescribeDBNodePerformanceResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DescribeDBNodePerformanceResponse
+		var err error
+		defer close(result)
+		response, err = client.DescribeDBNodePerformance(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DescribeDBNodePerformanceRequest is the request struct for api DescribeDBNodePerformance
+type DescribeDBNodePerformanceRequest struct {
+	*requests.RpcRequest
+	ResourceOwnerId      requests.Integer `position:"Query" name:"ResourceOwnerId"`
+	DBNodeId             string           `position:"Query" name:"DBNodeId"`
+	StartTime            string           `position:"Query" name:"StartTime"`
+	Key                  string           `position:"Query" name:"Key"`
+	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
+	OwnerAccount         string           `position:"Query" name:"OwnerAccount"`
+	EndTime              string           `position:"Query" name:"EndTime"`
+	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
+	Metric               string           `position:"Query" name:"Metric"`
+}
+
+// DescribeDBNodePerformanceResponse is the response struct for api DescribeDBNodePerformance
+type DescribeDBNodePerformanceResponse struct {
+	*responses.BaseResponse
+	RequestId       string                                     `json:"RequestId" xml:"RequestId"`
+	DBNodeId        string                                     `json:"DBNodeId" xml:"DBNodeId"`
+	Engine          string                                     `json:"Engine" xml:"Engine"`
+	DBType          string                                     `json:"DBType" xml:"DBType"`
+	DBVersion       string                                     `json:"DBVersion" xml:"DBVersion"`
+	StartTime       string                                     `json:"StartTime" xml:"StartTime"`
+	EndTime         string                                     `json:"EndTime" xml:"EndTime"`
+	PerformanceKeys PerformanceKeysInDescribeDBNodePerformance `json:"PerformanceKeys" xml:"PerformanceKeys"`
+}
+
+// CreateDescribeDBNodePerformanceRequest creates a request to invoke DescribeDBNodePerformance API
+func CreateDescribeDBNodePerformanceRequest() (request *DescribeDBNodePerformanceRequest) {
+	request = &DescribeDBNodePerformanceRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("polardb", "2017-08-01", "DescribeDBNodePerformance", "polardb", "openAPI")
+	return
+}
+
+// CreateDescribeDBNodePerformanceResponse creates a response to parse from DescribeDBNodePerformance response
+func CreateDescribeDBNodePerformanceResponse() (response *DescribeDBNodePerformanceResponse) {
+	response = &DescribeDBNodePerformanceResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 27 - 25
services/polardb/lock_db_cluster_deletion.go → services/polardb/failover_db_cluster.go

@@ -20,24 +20,24 @@ import (
 	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
 )
 
-// LockDBClusterDeletion invokes the polardb.LockDBClusterDeletion API synchronously
-// api document: https://help.aliyun.com/api/polardb/lockdbclusterdeletion.html
-func (client *Client) LockDBClusterDeletion(request *LockDBClusterDeletionRequest) (response *LockDBClusterDeletionResponse, err error) {
-	response = CreateLockDBClusterDeletionResponse()
+// FailoverDBCluster invokes the polardb.FailoverDBCluster API synchronously
+// api document: https://help.aliyun.com/api/polardb/failoverdbcluster.html
+func (client *Client) FailoverDBCluster(request *FailoverDBClusterRequest) (response *FailoverDBClusterResponse, err error) {
+	response = CreateFailoverDBClusterResponse()
 	err = client.DoAction(request, response)
 	return
 }
 
-// LockDBClusterDeletionWithChan invokes the polardb.LockDBClusterDeletion API asynchronously
-// api document: https://help.aliyun.com/api/polardb/lockdbclusterdeletion.html
+// FailoverDBClusterWithChan invokes the polardb.FailoverDBCluster API asynchronously
+// api document: https://help.aliyun.com/api/polardb/failoverdbcluster.html
 // asynchronous document: https://help.aliyun.com/document_detail/66220.html
-func (client *Client) LockDBClusterDeletionWithChan(request *LockDBClusterDeletionRequest) (<-chan *LockDBClusterDeletionResponse, <-chan error) {
-	responseChan := make(chan *LockDBClusterDeletionResponse, 1)
+func (client *Client) FailoverDBClusterWithChan(request *FailoverDBClusterRequest) (<-chan *FailoverDBClusterResponse, <-chan error) {
+	responseChan := make(chan *FailoverDBClusterResponse, 1)
 	errChan := make(chan error, 1)
 	err := client.AddAsyncTask(func() {
 		defer close(responseChan)
 		defer close(errChan)
-		response, err := client.LockDBClusterDeletion(request)
+		response, err := client.FailoverDBCluster(request)
 		if err != nil {
 			errChan <- err
 		} else {
@@ -52,16 +52,16 @@ func (client *Client) LockDBClusterDeletionWithChan(request *LockDBClusterDeleti
 	return responseChan, errChan
 }
 
-// LockDBClusterDeletionWithCallback invokes the polardb.LockDBClusterDeletion API asynchronously
-// api document: https://help.aliyun.com/api/polardb/lockdbclusterdeletion.html
+// FailoverDBClusterWithCallback invokes the polardb.FailoverDBCluster API asynchronously
+// api document: https://help.aliyun.com/api/polardb/failoverdbcluster.html
 // asynchronous document: https://help.aliyun.com/document_detail/66220.html
-func (client *Client) LockDBClusterDeletionWithCallback(request *LockDBClusterDeletionRequest, callback func(response *LockDBClusterDeletionResponse, err error)) <-chan int {
+func (client *Client) FailoverDBClusterWithCallback(request *FailoverDBClusterRequest, callback func(response *FailoverDBClusterResponse, err error)) <-chan int {
 	result := make(chan int, 1)
 	err := client.AddAsyncTask(func() {
-		var response *LockDBClusterDeletionResponse
+		var response *FailoverDBClusterResponse
 		var err error
 		defer close(result)
-		response, err = client.LockDBClusterDeletion(request)
+		response, err = client.FailoverDBCluster(request)
 		callback(response, err)
 		result <- 1
 	})
@@ -73,34 +73,36 @@ func (client *Client) LockDBClusterDeletionWithCallback(request *LockDBClusterDe
 	return result
 }
 
-// LockDBClusterDeletionRequest is the request struct for api LockDBClusterDeletion
-type LockDBClusterDeletionRequest struct {
+// FailoverDBClusterRequest is the request struct for api FailoverDBCluster
+type FailoverDBClusterRequest struct {
 	*requests.RpcRequest
 	ResourceOwnerId      requests.Integer `position:"Query" name:"ResourceOwnerId"`
+	ClientToken          string           `position:"Query" name:"ClientToken"`
 	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
 	DBClusterId          string           `position:"Query" name:"DBClusterId"`
 	OwnerAccount         string           `position:"Query" name:"OwnerAccount"`
 	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
+	TargetDBNodeId       string           `position:"Query" name:"TargetDBNodeId"`
 }
 
-// LockDBClusterDeletionResponse is the response struct for api LockDBClusterDeletion
-type LockDBClusterDeletionResponse struct {
+// FailoverDBClusterResponse is the response struct for api FailoverDBCluster
+type FailoverDBClusterResponse struct {
 	*responses.BaseResponse
 	RequestId string `json:"RequestId" xml:"RequestId"`
 }
 
-// CreateLockDBClusterDeletionRequest creates a request to invoke LockDBClusterDeletion API
-func CreateLockDBClusterDeletionRequest() (request *LockDBClusterDeletionRequest) {
-	request = &LockDBClusterDeletionRequest{
+// CreateFailoverDBClusterRequest creates a request to invoke FailoverDBCluster API
+func CreateFailoverDBClusterRequest() (request *FailoverDBClusterRequest) {
+	request = &FailoverDBClusterRequest{
 		RpcRequest: &requests.RpcRequest{},
 	}
-	request.InitWithApiInfo("polardb", "2017-08-01", "LockDBClusterDeletion", "polardb", "openAPI")
+	request.InitWithApiInfo("polardb", "2017-08-01", "FailoverDBCluster", "polardb", "openAPI")
 	return
 }
 
-// CreateLockDBClusterDeletionResponse creates a response to parse from LockDBClusterDeletion response
-func CreateLockDBClusterDeletionResponse() (response *LockDBClusterDeletionResponse) {
-	response = &LockDBClusterDeletionResponse{
+// CreateFailoverDBClusterResponse creates a response to parse from FailoverDBCluster response
+func CreateFailoverDBClusterResponse() (response *FailoverDBClusterResponse) {
+	response = &FailoverDBClusterResponse{
 		BaseResponse: &responses.BaseResponse{},
 	}
 	return

+ 0 - 118
services/polardb/list_tag_resources.go

@@ -1,118 +0,0 @@
-package polardb
-
-//Licensed under the Apache License, Version 2.0 (the "License");
-//you may not use this file except in compliance with the License.
-//You may obtain a copy of the License at
-//
-//http://www.apache.org/licenses/LICENSE-2.0
-//
-//Unless required by applicable law or agreed to in writing, software
-//distributed under the License is distributed on an "AS IS" BASIS,
-//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//See the License for the specific language governing permissions and
-//limitations under the License.
-//
-// Code generated by Alibaba Cloud SDK Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is regenerated.
-
-import (
-	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
-	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
-)
-
-// ListTagResources invokes the polardb.ListTagResources API synchronously
-// api document: https://help.aliyun.com/api/polardb/listtagresources.html
-func (client *Client) ListTagResources(request *ListTagResourcesRequest) (response *ListTagResourcesResponse, err error) {
-	response = CreateListTagResourcesResponse()
-	err = client.DoAction(request, response)
-	return
-}
-
-// ListTagResourcesWithChan invokes the polardb.ListTagResources API asynchronously
-// api document: https://help.aliyun.com/api/polardb/listtagresources.html
-// asynchronous document: https://help.aliyun.com/document_detail/66220.html
-func (client *Client) ListTagResourcesWithChan(request *ListTagResourcesRequest) (<-chan *ListTagResourcesResponse, <-chan error) {
-	responseChan := make(chan *ListTagResourcesResponse, 1)
-	errChan := make(chan error, 1)
-	err := client.AddAsyncTask(func() {
-		defer close(responseChan)
-		defer close(errChan)
-		response, err := client.ListTagResources(request)
-		if err != nil {
-			errChan <- err
-		} else {
-			responseChan <- response
-		}
-	})
-	if err != nil {
-		errChan <- err
-		close(responseChan)
-		close(errChan)
-	}
-	return responseChan, errChan
-}
-
-// ListTagResourcesWithCallback invokes the polardb.ListTagResources API asynchronously
-// api document: https://help.aliyun.com/api/polardb/listtagresources.html
-// asynchronous document: https://help.aliyun.com/document_detail/66220.html
-func (client *Client) ListTagResourcesWithCallback(request *ListTagResourcesRequest, callback func(response *ListTagResourcesResponse, err error)) <-chan int {
-	result := make(chan int, 1)
-	err := client.AddAsyncTask(func() {
-		var response *ListTagResourcesResponse
-		var err error
-		defer close(result)
-		response, err = client.ListTagResources(request)
-		callback(response, err)
-		result <- 1
-	})
-	if err != nil {
-		defer close(result)
-		callback(nil, err)
-		result <- 0
-	}
-	return result
-}
-
-// ListTagResourcesRequest is the request struct for api ListTagResources
-type ListTagResourcesRequest struct {
-	*requests.RpcRequest
-	ResourceOwnerId      requests.Integer       `position:"Query" name:"ResourceOwnerId"`
-	NextToken            string                 `position:"Query" name:"NextToken"`
-	Tag                  *[]ListTagResourcesTag `position:"Query" name:"Tag"  type:"Repeated"`
-	ResourceId           *[]string              `position:"Query" name:"ResourceId"  type:"Repeated"`
-	ResourceOwnerAccount string                 `position:"Query" name:"ResourceOwnerAccount"`
-	OwnerAccount         string                 `position:"Query" name:"OwnerAccount"`
-	OwnerId              requests.Integer       `position:"Query" name:"OwnerId"`
-	ResourceType         string                 `position:"Query" name:"ResourceType"`
-}
-
-// ListTagResourcesTag is a repeated param struct in ListTagResourcesRequest
-type ListTagResourcesTag struct {
-	Value string `name:"Value"`
-	Key   string `name:"Key"`
-}
-
-// ListTagResourcesResponse is the response struct for api ListTagResources
-type ListTagResourcesResponse struct {
-	*responses.BaseResponse
-	RequestId    string       `json:"RequestId" xml:"RequestId"`
-	NextToken    string       `json:"NextToken" xml:"NextToken"`
-	TagResources TagResources `json:"TagResources" xml:"TagResources"`
-}
-
-// CreateListTagResourcesRequest creates a request to invoke ListTagResources API
-func CreateListTagResourcesRequest() (request *ListTagResourcesRequest) {
-	request = &ListTagResourcesRequest{
-		RpcRequest: &requests.RpcRequest{},
-	}
-	request.InitWithApiInfo("polardb", "2017-08-01", "ListTagResources", "polardb", "openAPI")
-	return
-}
-
-// CreateListTagResourcesResponse creates a response to parse from ListTagResources response
-func CreateListTagResourcesResponse() (response *ListTagResourcesResponse) {
-	response = &ListTagResourcesResponse{
-		BaseResponse: &responses.BaseResponse{},
-	}
-	return
-}

+ 1 - 0
services/polardb/struct_db_account.go

@@ -21,6 +21,7 @@ type DBAccount struct {
 	AccountStatus      string              `json:"AccountStatus" xml:"AccountStatus"`
 	AccountDescription string              `json:"AccountDescription" xml:"AccountDescription"`
 	AccountType        string              `json:"AccountType" xml:"AccountType"`
+	AccountLockState   string              `json:"AccountLockState" xml:"AccountLockState"`
 	PrivilegeExceeded  string              `json:"PrivilegeExceeded" xml:"PrivilegeExceeded"`
 	DatabasePrivileges []DatabasePrivilege `json:"DatabasePrivileges" xml:"DatabasePrivileges"`
 }

+ 10 - 9
services/polardb/struct_db_node.go

@@ -17,13 +17,14 @@ package polardb
 
 // DBNode is a nested struct in polardb response
 type DBNode struct {
-	DBNodeClass    string `json:"DBNodeClass" xml:"DBNodeClass"`
-	MaxIOPS        int    `json:"MaxIOPS" xml:"MaxIOPS"`
-	DBNodeRole     string `json:"DBNodeRole" xml:"DBNodeRole"`
-	RegionId       string `json:"RegionId" xml:"RegionId"`
-	MaxConnections int    `json:"MaxConnections" xml:"MaxConnections"`
-	ZoneId         string `json:"ZoneId" xml:"ZoneId"`
-	DBNodeStatus   string `json:"DBNodeStatus" xml:"DBNodeStatus"`
-	DBNodeId       string `json:"DBNodeId" xml:"DBNodeId"`
-	CreationTime   string `json:"CreationTime" xml:"CreationTime"`
+	DBNodeClass      string `json:"DBNodeClass" xml:"DBNodeClass"`
+	MaxIOPS          int    `json:"MaxIOPS" xml:"MaxIOPS"`
+	FailoverPriority int    `json:"FailoverPriority" xml:"FailoverPriority"`
+	DBNodeRole       string `json:"DBNodeRole" xml:"DBNodeRole"`
+	MaxConnections   int    `json:"MaxConnections" xml:"MaxConnections"`
+	RegionId         string `json:"RegionId" xml:"RegionId"`
+	ZoneId           string `json:"ZoneId" xml:"ZoneId"`
+	DBNodeStatus     string `json:"DBNodeStatus" xml:"DBNodeStatus"`
+	DBNodeId         string `json:"DBNodeId" xml:"DBNodeId"`
+	CreationTime     string `json:"CreationTime" xml:"CreationTime"`
 }

+ 24 - 0
services/polardb/struct_performance_item.go

@@ -0,0 +1,24 @@
+package polardb
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+// PerformanceItem is a nested struct in polardb response
+type PerformanceItem struct {
+	DBNodeId    string                               `json:"DBNodeId" xml:"DBNodeId"`
+	MetricName  string                               `json:"MetricName" xml:"MetricName"`
+	Measurement string                               `json:"Measurement" xml:"Measurement"`
+	Points      PointsInDescribeDBClusterPerformance `json:"Points" xml:"Points"`
+}

+ 4 - 3
services/polardb/struct_tag_resources.go → services/polardb/struct_performance_item_value.go

@@ -15,7 +15,8 @@ package polardb
 // Code generated by Alibaba Cloud SDK Code Generator.
 // Changes may cause incorrect behavior and will be lost if the code is regenerated.
 
-// TagResources is a nested struct in polardb response
-type TagResources struct {
-	TagResource []TagResource `json:"TagResource" xml:"TagResource"`
+// PerformanceItemValue is a nested struct in polardb response
+type PerformanceItemValue struct {
+	Value     string `json:"Value" xml:"Value"`
+	Timestamp int64  `json:"Timestamp" xml:"Timestamp"`
 }

+ 3 - 6
services/polardb/struct_tag_resource.go → services/polardb/struct_performance_keys_in_describe_db_cluster_performance.go

@@ -15,10 +15,7 @@ package polardb
 // Code generated by Alibaba Cloud SDK Code Generator.
 // Changes may cause incorrect behavior and will be lost if the code is regenerated.
 
-// TagResource is a nested struct in polardb response
-type TagResource struct {
-	TagKey       string `json:"TagKey" xml:"TagKey"`
-	TagValue     string `json:"TagValue" xml:"TagValue"`
-	ResourceType string `json:"ResourceType" xml:"ResourceType"`
-	ResourceId   string `json:"ResourceId" xml:"ResourceId"`
+// PerformanceKeysInDescribeDBClusterPerformance is a nested struct in polardb response
+type PerformanceKeysInDescribeDBClusterPerformance struct {
+	PerformanceItem []PerformanceItem `json:"PerformanceItem" xml:"PerformanceItem"`
 }

+ 21 - 0
services/polardb/struct_performance_keys_in_describe_db_node_performance.go

@@ -0,0 +1,21 @@
+package polardb
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+// PerformanceKeysInDescribeDBNodePerformance is a nested struct in polardb response
+type PerformanceKeysInDescribeDBNodePerformance struct {
+	PerformanceItem []PerformanceItem `json:"PerformanceItem" xml:"PerformanceItem"`
+}

+ 21 - 0
services/polardb/struct_points_in_describe_db_cluster_performance.go

@@ -0,0 +1,21 @@
+package polardb
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+// PointsInDescribeDBClusterPerformance is a nested struct in polardb response
+type PointsInDescribeDBClusterPerformance struct {
+	PerformanceItemValue []PerformanceItemValue `json:"PerformanceItemValue" xml:"PerformanceItemValue"`
+}

+ 21 - 0
services/polardb/struct_points_in_describe_db_node_performance.go

@@ -0,0 +1,21 @@
+package polardb
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+// PointsInDescribeDBNodePerformance is a nested struct in polardb response
+type PointsInDescribeDBNodePerformance struct {
+	PerformanceItemValue []PerformanceItemValue `json:"PerformanceItemValue" xml:"PerformanceItemValue"`
+}

+ 0 - 107
services/polardb/unlock_db_cluster_deletion.go

@@ -1,107 +0,0 @@
-package polardb
-
-//Licensed under the Apache License, Version 2.0 (the "License");
-//you may not use this file except in compliance with the License.
-//You may obtain a copy of the License at
-//
-//http://www.apache.org/licenses/LICENSE-2.0
-//
-//Unless required by applicable law or agreed to in writing, software
-//distributed under the License is distributed on an "AS IS" BASIS,
-//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//See the License for the specific language governing permissions and
-//limitations under the License.
-//
-// Code generated by Alibaba Cloud SDK Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is regenerated.
-
-import (
-	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
-	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
-)
-
-// UnlockDBClusterDeletion invokes the polardb.UnlockDBClusterDeletion API synchronously
-// api document: https://help.aliyun.com/api/polardb/unlockdbclusterdeletion.html
-func (client *Client) UnlockDBClusterDeletion(request *UnlockDBClusterDeletionRequest) (response *UnlockDBClusterDeletionResponse, err error) {
-	response = CreateUnlockDBClusterDeletionResponse()
-	err = client.DoAction(request, response)
-	return
-}
-
-// UnlockDBClusterDeletionWithChan invokes the polardb.UnlockDBClusterDeletion API asynchronously
-// api document: https://help.aliyun.com/api/polardb/unlockdbclusterdeletion.html
-// asynchronous document: https://help.aliyun.com/document_detail/66220.html
-func (client *Client) UnlockDBClusterDeletionWithChan(request *UnlockDBClusterDeletionRequest) (<-chan *UnlockDBClusterDeletionResponse, <-chan error) {
-	responseChan := make(chan *UnlockDBClusterDeletionResponse, 1)
-	errChan := make(chan error, 1)
-	err := client.AddAsyncTask(func() {
-		defer close(responseChan)
-		defer close(errChan)
-		response, err := client.UnlockDBClusterDeletion(request)
-		if err != nil {
-			errChan <- err
-		} else {
-			responseChan <- response
-		}
-	})
-	if err != nil {
-		errChan <- err
-		close(responseChan)
-		close(errChan)
-	}
-	return responseChan, errChan
-}
-
-// UnlockDBClusterDeletionWithCallback invokes the polardb.UnlockDBClusterDeletion API asynchronously
-// api document: https://help.aliyun.com/api/polardb/unlockdbclusterdeletion.html
-// asynchronous document: https://help.aliyun.com/document_detail/66220.html
-func (client *Client) UnlockDBClusterDeletionWithCallback(request *UnlockDBClusterDeletionRequest, callback func(response *UnlockDBClusterDeletionResponse, err error)) <-chan int {
-	result := make(chan int, 1)
-	err := client.AddAsyncTask(func() {
-		var response *UnlockDBClusterDeletionResponse
-		var err error
-		defer close(result)
-		response, err = client.UnlockDBClusterDeletion(request)
-		callback(response, err)
-		result <- 1
-	})
-	if err != nil {
-		defer close(result)
-		callback(nil, err)
-		result <- 0
-	}
-	return result
-}
-
-// UnlockDBClusterDeletionRequest is the request struct for api UnlockDBClusterDeletion
-type UnlockDBClusterDeletionRequest struct {
-	*requests.RpcRequest
-	ResourceOwnerId      requests.Integer `position:"Query" name:"ResourceOwnerId"`
-	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
-	DBClusterId          string           `position:"Query" name:"DBClusterId"`
-	OwnerAccount         string           `position:"Query" name:"OwnerAccount"`
-	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
-}
-
-// UnlockDBClusterDeletionResponse is the response struct for api UnlockDBClusterDeletion
-type UnlockDBClusterDeletionResponse struct {
-	*responses.BaseResponse
-	RequestId string `json:"RequestId" xml:"RequestId"`
-}
-
-// CreateUnlockDBClusterDeletionRequest creates a request to invoke UnlockDBClusterDeletion API
-func CreateUnlockDBClusterDeletionRequest() (request *UnlockDBClusterDeletionRequest) {
-	request = &UnlockDBClusterDeletionRequest{
-		RpcRequest: &requests.RpcRequest{},
-	}
-	request.InitWithApiInfo("polardb", "2017-08-01", "UnlockDBClusterDeletion", "polardb", "openAPI")
-	return
-}
-
-// CreateUnlockDBClusterDeletionResponse creates a response to parse from UnlockDBClusterDeletion response
-func CreateUnlockDBClusterDeletionResponse() (response *UnlockDBClusterDeletionResponse) {
-	response = &UnlockDBClusterDeletionResponse{
-		BaseResponse: &responses.BaseResponse{},
-	}
-	return
-}