Przeglądaj źródła

Return backup job id when create backup.

sdk-team 6 lat temu
rodzic
commit
00813b55af

+ 4 - 0
ChangeLog.txt

@@ -1,3 +1,7 @@
+2019-08-21 Version: 1.60.113
+- Return backup job id when create backup.
+- Return backup set size when describe backups.
+
 2019-08-21 Version: 1.60.112
 - Modify getTopicList and getConsumerList response.
 

+ 108 - 0
services/polardb/abort_db_cluster_migration.go

@@ -0,0 +1,108 @@
+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
+}

+ 108 - 0
services/polardb/continue_db_cluster_migration.go

@@ -0,0 +1,108 @@
+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 - 1
services/polardb/create_backup.go

@@ -86,7 +86,8 @@ type CreateBackupRequest struct {
 // CreateBackupResponse is the response struct for api CreateBackup
 type CreateBackupResponse struct {
 	*responses.BaseResponse
-	RequestId string `json:"RequestId" xml:"RequestId"`
+	RequestId   string `json:"RequestId" xml:"RequestId"`
+	BackupJobId string `json:"BackupJobId" xml:"BackupJobId"`
 }
 
 // CreateCreateBackupRequest creates a request to invoke CreateBackup API

+ 1 - 1
services/polardb/describe_db_cluster_attribute.go

@@ -105,7 +105,7 @@ type DescribeDBClusterAttributeResponse struct {
 	Expired              string   `json:"Expired" xml:"Expired"`
 	MaintainTime         string   `json:"MaintainTime" xml:"MaintainTime"`
 	StorageUsed          int64    `json:"StorageUsed" xml:"StorageUsed"`
-	StorageMax           int      `json:"StorageMax" xml:"StorageMax"`
+	StorageMax           int64    `json:"StorageMax" xml:"StorageMax"`
 	ZoneIds              string   `json:"ZoneIds" xml:"ZoneIds"`
 	SQLSize              int64    `json:"SQLSize" xml:"SQLSize"`
 	IsLatestVersion      bool     `json:"IsLatestVersion" xml:"IsLatestVersion"`

+ 1 - 0
services/polardb/describe_db_cluster_migration.go

@@ -96,6 +96,7 @@ type DescribeDBClusterMigrationResponse struct {
 	ExpiredTime            string `json:"ExpiredTime" xml:"ExpiredTime"`
 	RdsReadWriteMode       string `json:"RdsReadWriteMode" xml:"RdsReadWriteMode"`
 	DBClusterReadWriteMode string `json:"DBClusterReadWriteMode" xml:"DBClusterReadWriteMode"`
+	Comment                string `json:"Comment" xml:"Comment"`
 }
 
 // CreateDescribeDBClusterMigrationRequest creates a request to invoke DescribeDBClusterMigration API

+ 0 - 1
services/polardb/endpoint.go

@@ -17,7 +17,6 @@ func GetEndpointMap() map[string]string {
 			"cn-hongkong":    "polardb.aliyuncs.com",
 			"ap-southeast-1": "polardb.aliyuncs.com",
 			"us-east-1":      "polardb.ap-northeast-1.aliyuncs.com",
-			"us-west-1":      "polardb.us-west-1us-west-1.aliyuncs.com",
 			"cn-hangzhou":    "polardb.aliyuncs.com",
 		}
 	}

+ 1 - 0
services/polardb/struct_backup.go

@@ -26,4 +26,5 @@ type Backup struct {
 	BackupMode      string `json:"BackupMode" xml:"BackupMode"`
 	BackupMethod    string `json:"BackupMethod" xml:"BackupMethod"`
 	StoreStatus     string `json:"StoreStatus" xml:"StoreStatus"`
+	BackupSetSize   string `json:"BackupSetSize" xml:"BackupSetSize"`
 }