Bläddra i källkod

RDS SDK Auto Released By junjun.zhang,Version:1.51.11

Signed-off-by: haowei.yao <haowei.yao@alibaba-inc.com>
haowei.yao 6 år sedan
förälder
incheckning
8008011dd8

+ 4 - 0
ChangeLog.txt

@@ -1,3 +1,7 @@
+2019-01-28 Version: 1.51.11
+1, modify DescribeSlowLogs OpenApi.
+
+
 2019-01-23 Version: 1.51.10
 1, release new version
 

+ 7 - 7
services/rds/describe_proxy_function_support.go

@@ -88,13 +88,13 @@ type DescribeProxyFunctionSupportRequest struct {
 type DescribeProxyFunctionSupportResponse struct {
 	*responses.BaseResponse
 	RequestId                       string `json:"RequestId" xml:"RequestId"`
-	IsProxyEnable                   int    `json:"IsProxyEnable" xml:"IsProxyEnable"`
-	IsRwsplitEnable                 int    `json:"IsRwsplitEnable" xml:"IsRwsplitEnable"`
-	IsRwsplitSupportReplicationLag  int    `json:"IsRwsplitSupportReplicationLag" xml:"IsRwsplitSupportReplicationLag"`
-	IsRwsplitSupportWeight          int    `json:"IsRwsplitSupportWeight" xml:"IsRwsplitSupportWeight"`
-	IsTransparentSwitchEnable       int    `json:"IsTransparentSwitchEnable" xml:"IsTransparentSwitchEnable"`
-	IsShortConnectionOptimizeEnable int    `json:"IsShortConnectionOptimizeEnable" xml:"IsShortConnectionOptimizeEnable"`
-	IsAntiBruteFroceEnable          int    `json:"IsAntiBruteFroceEnable" xml:"IsAntiBruteFroceEnable"`
+	IsProxySwitchEnable             bool   `json:"IsProxySwitchEnable" xml:"IsProxySwitchEnable"`
+	IsRwsplitEnable                 bool   `json:"IsRwsplitEnable" xml:"IsRwsplitEnable"`
+	IsRwsplitSupportReplicationLag  bool   `json:"IsRwsplitSupportReplicationLag" xml:"IsRwsplitSupportReplicationLag"`
+	IsRwsplitSupportWeight          bool   `json:"IsRwsplitSupportWeight" xml:"IsRwsplitSupportWeight"`
+	IsTransparentSwitchEnable       bool   `json:"IsTransparentSwitchEnable" xml:"IsTransparentSwitchEnable"`
+	IsShortConnectionOptimizeEnable bool   `json:"IsShortConnectionOptimizeEnable" xml:"IsShortConnectionOptimizeEnable"`
+	IsAntiBruteFroceEnable          bool   `json:"IsAntiBruteFroceEnable" xml:"IsAntiBruteFroceEnable"`
 }
 
 // CreateDescribeProxyFunctionSupportRequest creates a request to invoke DescribeProxyFunctionSupport API

+ 0 - 1
services/rds/describe_slow_log_records.go

@@ -76,7 +76,6 @@ func (client *Client) DescribeSlowLogRecordsWithCallback(request *DescribeSlowLo
 // DescribeSlowLogRecordsRequest is the request struct for api DescribeSlowLogRecords
 type DescribeSlowLogRecordsRequest struct {
 	*requests.RpcRequest
-	SQLId                requests.Integer `position:"Query" name:"SQLId"`
 	ResourceOwnerId      requests.Integer `position:"Query" name:"ResourceOwnerId"`
 	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
 	OwnerAccount         string           `position:"Query" name:"OwnerAccount"`

+ 111 - 0
services/rds/migrate_to_other_region.go

@@ -0,0 +1,111 @@
+package rds
+
+//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"
+)
+
+// MigrateToOtherRegion invokes the rds.MigrateToOtherRegion API synchronously
+// api document: https://help.aliyun.com/api/rds/migratetootherregion.html
+func (client *Client) MigrateToOtherRegion(request *MigrateToOtherRegionRequest) (response *MigrateToOtherRegionResponse, err error) {
+	response = CreateMigrateToOtherRegionResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// MigrateToOtherRegionWithChan invokes the rds.MigrateToOtherRegion API asynchronously
+// api document: https://help.aliyun.com/api/rds/migratetootherregion.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) MigrateToOtherRegionWithChan(request *MigrateToOtherRegionRequest) (<-chan *MigrateToOtherRegionResponse, <-chan error) {
+	responseChan := make(chan *MigrateToOtherRegionResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.MigrateToOtherRegion(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// MigrateToOtherRegionWithCallback invokes the rds.MigrateToOtherRegion API asynchronously
+// api document: https://help.aliyun.com/api/rds/migratetootherregion.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) MigrateToOtherRegionWithCallback(request *MigrateToOtherRegionRequest, callback func(response *MigrateToOtherRegionResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *MigrateToOtherRegionResponse
+		var err error
+		defer close(result)
+		response, err = client.MigrateToOtherRegion(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// MigrateToOtherRegionRequest is the request struct for api MigrateToOtherRegion
+type MigrateToOtherRegionRequest struct {
+	*requests.RpcRequest
+	ResourceOwnerId      requests.Integer `position:"Query" name:"ResourceOwnerId"`
+	TargetZoneId         string           `position:"Query" name:"TargetZoneId"`
+	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
+	EffectiveTime        string           `position:"Query" name:"EffectiveTime"`
+	OwnerAccount         string           `position:"Query" name:"OwnerAccount"`
+	DBInstanceId         string           `position:"Query" name:"DBInstanceId"`
+	TargetRegionId       string           `position:"Query" name:"TargetRegionId"`
+	SwitchTime           string           `position:"Query" name:"SwitchTime"`
+	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
+}
+
+// MigrateToOtherRegionResponse is the response struct for api MigrateToOtherRegion
+type MigrateToOtherRegionResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateMigrateToOtherRegionRequest creates a request to invoke MigrateToOtherRegion API
+func CreateMigrateToOtherRegionRequest() (request *MigrateToOtherRegionRequest) {
+	request = &MigrateToOtherRegionRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Rds", "2014-08-15", "MigrateToOtherRegion", "rds", "openAPI")
+	return
+}
+
+// CreateMigrateToOtherRegionResponse creates a response to parse from MigrateToOtherRegion response
+func CreateMigrateToOtherRegionResponse() (response *MigrateToOtherRegionResponse) {
+	response = &MigrateToOtherRegionResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 111 - 0
services/rds/restore_table.go

@@ -0,0 +1,111 @@
+package rds
+
+//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"
+)
+
+// RestoreTable invokes the rds.RestoreTable API synchronously
+// api document: https://help.aliyun.com/api/rds/restoretable.html
+func (client *Client) RestoreTable(request *RestoreTableRequest) (response *RestoreTableResponse, err error) {
+	response = CreateRestoreTableResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// RestoreTableWithChan invokes the rds.RestoreTable API asynchronously
+// api document: https://help.aliyun.com/api/rds/restoretable.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) RestoreTableWithChan(request *RestoreTableRequest) (<-chan *RestoreTableResponse, <-chan error) {
+	responseChan := make(chan *RestoreTableResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.RestoreTable(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// RestoreTableWithCallback invokes the rds.RestoreTable API asynchronously
+// api document: https://help.aliyun.com/api/rds/restoretable.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) RestoreTableWithCallback(request *RestoreTableRequest, callback func(response *RestoreTableResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *RestoreTableResponse
+		var err error
+		defer close(result)
+		response, err = client.RestoreTable(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// RestoreTableRequest is the request struct for api RestoreTable
+type RestoreTableRequest struct {
+	*requests.RpcRequest
+	ResourceOwnerId      requests.Integer `position:"Query" name:"ResourceOwnerId"`
+	RestoreTime          string           `position:"Query" name:"RestoreTime"`
+	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
+	ClientToken          string           `position:"Query" name:"ClientToken"`
+	BackupId             string           `position:"Query" name:"BackupId"`
+	OwnerAccount         string           `position:"Query" name:"OwnerAccount"`
+	TableMeta            string           `position:"Query" name:"TableMeta"`
+	DBInstanceId         string           `position:"Query" name:"DBInstanceId"`
+	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
+}
+
+// RestoreTableResponse is the response struct for api RestoreTable
+type RestoreTableResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateRestoreTableRequest creates a request to invoke RestoreTable API
+func CreateRestoreTableRequest() (request *RestoreTableRequest) {
+	request = &RestoreTableRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Rds", "2014-08-15", "RestoreTable", "rds", "openAPI")
+	return
+}
+
+// CreateRestoreTableResponse creates a response to parse from RestoreTable response
+func CreateRestoreTableResponse() (response *RestoreTableResponse) {
+	response = &RestoreTableResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 1 - 1
services/rds/struct_backup.go

@@ -35,5 +35,5 @@ type Backup struct {
 	BackupSize                int    `json:"BackupSize" xml:"BackupSize"`
 	HostInstanceID            string `json:"HostInstanceID" xml:"HostInstanceID"`
 	StoreStatus               string `json:"StoreStatus" xml:"StoreStatus"`
-	ConsistentTime            string `json:"ConsistentTime" xml:"ConsistentTime"`
+	MetaStatus                string `json:"MetaStatus" xml:"MetaStatus"`
 }

+ 1 - 2
services/rds/struct_sql_slow_log.go

@@ -18,8 +18,7 @@ package rds
 // SQLSlowLog is a nested struct in rds response
 type SQLSlowLog struct {
 	SlowLogId                     int    `json:"SlowLogId" xml:"SlowLogId"`
-	SQLId                         int    `json:"SQLId" xml:"SQLId"`
-	SQLHASH                       int    `json:"SQLHASH" xml:"SQLHASH"`
+	SQLHASH                       string `json:"SQLHASH" xml:"SQLHASH"`
 	SQLIdStr                      string `json:"SQLIdStr" xml:"SQLIdStr"`
 	DBName                        string `json:"DBName" xml:"DBName"`
 	SQLText                       string `json:"SQLText" xml:"SQLText"`