瀏覽代碼

Add DescribeJobErrorCode.

sdk-team 6 年之前
父節點
當前提交
f326d82a7d

+ 3 - 0
ChangeLog.txt

@@ -1,3 +1,6 @@
+2019-11-08 Version: 1.60.229
+- Add DescribeJobErrorCode.
+
 2019-11-05 Version: 1.60.228
 - Add OperateBlackNo.
 

+ 7 - 7
services/dbs/configure_backup_plan.go

@@ -77,27 +77,27 @@ func (client *Client) ConfigureBackupPlanWithCallback(request *ConfigureBackupPl
 type ConfigureBackupPlanRequest struct {
 	*requests.RpcRequest
 	SourceEndpointRegion              string           `position:"Query" name:"SourceEndpointRegion"`
-	DuplicationArchivePeriod          requests.Integer `position:"Query" name:"DuplicationArchivePeriod"`
 	BackupGatewayId                   requests.Integer `position:"Query" name:"BackupGatewayId"`
 	SourceEndpointInstanceID          string           `position:"Query" name:"SourceEndpointInstanceID"`
 	SourceEndpointUserName            string           `position:"Query" name:"SourceEndpointUserName"`
 	ClientToken                       string           `position:"Query" name:"ClientToken"`
-	SourceEndpointPassword            string           `position:"Query" name:"SourceEndpointPassword"`
 	BackupPlanId                      string           `position:"Query" name:"BackupPlanId"`
+	SourceEndpointDatabaseName        string           `position:"Query" name:"SourceEndpointDatabaseName"`
+	DuplicationInfrequentAccessPeriod requests.Integer `position:"Query" name:"DuplicationInfrequentAccessPeriod"`
+	BackupStartTime                   string           `position:"Query" name:"BackupStartTime"`
+	SourceEndpointIP                  string           `position:"Query" name:"SourceEndpointIP"`
+	EnableBackupLog                   requests.Boolean `position:"Query" name:"EnableBackupLog"`
+	DuplicationArchivePeriod          requests.Integer `position:"Query" name:"DuplicationArchivePeriod"`
+	SourceEndpointPassword            string           `position:"Query" name:"SourceEndpointPassword"`
 	BackupObjects                     string           `position:"Query" name:"BackupObjects"`
 	OwnerId                           string           `position:"Query" name:"OwnerId"`
 	SourceEndpointPort                requests.Integer `position:"Query" name:"SourceEndpointPort"`
-	SourceEndpointDatabaseName        string           `position:"Query" name:"SourceEndpointDatabaseName"`
 	BackupRetentionPeriod             requests.Integer `position:"Query" name:"BackupRetentionPeriod"`
-	DuplicationInfrequentAccessPeriod requests.Integer `position:"Query" name:"DuplicationInfrequentAccessPeriod"`
 	BackupPeriod                      string           `position:"Query" name:"BackupPeriod"`
-	BackupStartTime                   string           `position:"Query" name:"BackupStartTime"`
 	SourceEndpointInstanceType        string           `position:"Query" name:"SourceEndpointInstanceType"`
-	SourceEndpointIP                  string           `position:"Query" name:"SourceEndpointIP"`
 	BackupPlanName                    string           `position:"Query" name:"BackupPlanName"`
 	SourceEndpointOracleSID           string           `position:"Query" name:"SourceEndpointOracleSID"`
 	OSSBucketName                     string           `position:"Query" name:"OSSBucketName"`
-	EnableBackupLog                   requests.Boolean `position:"Query" name:"EnableBackupLog"`
 }
 
 // ConfigureBackupPlanResponse is the response struct for api ConfigureBackupPlan

+ 5 - 5
services/dbs/create_backup_plan.go

@@ -77,16 +77,16 @@ func (client *Client) CreateBackupPlanWithCallback(request *CreateBackupPlanRequ
 type CreateBackupPlanRequest struct {
 	*requests.RpcRequest
 	DatabaseType   string           `position:"Query" name:"DatabaseType"`
-	Period         string           `position:"Query" name:"Period"`
 	ClientToken    string           `position:"Query" name:"ClientToken"`
-	OwnerId        string           `position:"Query" name:"OwnerId"`
-	UsedTime       requests.Integer `position:"Query" name:"UsedTime"`
 	InstanceClass  string           `position:"Query" name:"InstanceClass"`
 	StorageType    string           `position:"Query" name:"StorageType"`
-	BackupMethod   string           `position:"Query" name:"BackupMethod"`
 	DatabaseRegion string           `position:"Query" name:"DatabaseRegion"`
-	StorageRegion  string           `position:"Query" name:"StorageRegion"`
 	InstanceType   string           `position:"Query" name:"InstanceType"`
+	Period         string           `position:"Query" name:"Period"`
+	OwnerId        string           `position:"Query" name:"OwnerId"`
+	UsedTime       requests.Integer `position:"Query" name:"UsedTime"`
+	BackupMethod   string           `position:"Query" name:"BackupMethod"`
+	StorageRegion  string           `position:"Query" name:"StorageRegion"`
 	Region         string           `position:"Query" name:"Region"`
 	PayType        string           `position:"Query" name:"PayType"`
 }

+ 7 - 7
services/dbs/create_restore_task.go

@@ -77,22 +77,22 @@ func (client *Client) CreateRestoreTaskWithCallback(request *CreateRestoreTaskRe
 type CreateRestoreTaskRequest struct {
 	*requests.RpcRequest
 	BackupGatewayId                 requests.Integer `position:"Query" name:"BackupGatewayId"`
-	DestinationEndpointOracleSID    string           `position:"Query" name:"DestinationEndpointOracleSID"`
-	RestoreTime                     requests.Integer `position:"Query" name:"RestoreTime"`
 	DestinationEndpointInstanceType string           `position:"Query" name:"DestinationEndpointInstanceType"`
 	ClientToken                     string           `position:"Query" name:"ClientToken"`
+	BackupPlanId                    string           `position:"Query" name:"BackupPlanId"`
+	DestinationEndpointRegion       string           `position:"Query" name:"DestinationEndpointRegion"`
+	DestinationEndpointUserName     string           `position:"Query" name:"DestinationEndpointUserName"`
+	RestoreObjects                  string           `position:"Query" name:"RestoreObjects"`
+	RestoreTaskName                 string           `position:"Query" name:"RestoreTaskName"`
+	DestinationEndpointOracleSID    string           `position:"Query" name:"DestinationEndpointOracleSID"`
+	RestoreTime                     requests.Integer `position:"Query" name:"RestoreTime"`
 	DestinationEndpointInstanceID   string           `position:"Query" name:"DestinationEndpointInstanceID"`
 	DestinationEndpointPort         requests.Integer `position:"Query" name:"DestinationEndpointPort"`
-	BackupPlanId                    string           `position:"Query" name:"BackupPlanId"`
 	BackupSetId                     string           `position:"Query" name:"BackupSetId"`
 	OwnerId                         string           `position:"Query" name:"OwnerId"`
-	DestinationEndpointRegion       string           `position:"Query" name:"DestinationEndpointRegion"`
 	RestoreDir                      string           `position:"Query" name:"RestoreDir"`
 	DestinationEndpointIP           string           `position:"Query" name:"DestinationEndpointIP"`
 	DestinationEndpointDatabaseName string           `position:"Query" name:"DestinationEndpointDatabaseName"`
-	DestinationEndpointUserName     string           `position:"Query" name:"DestinationEndpointUserName"`
-	RestoreObjects                  string           `position:"Query" name:"RestoreObjects"`
-	RestoreTaskName                 string           `position:"Query" name:"RestoreTaskName"`
 	DuplicateConflict               string           `position:"Query" name:"DuplicateConflict"`
 	DestinationEndpointPassword     string           `position:"Query" name:"DestinationEndpointPassword"`
 }

+ 2 - 2
services/dbs/describe_backup_gateway_list.go

@@ -78,10 +78,10 @@ type DescribeBackupGatewayListRequest struct {
 	*requests.RpcRequest
 	Identifier  string           `position:"Query" name:"Identifier"`
 	ClientToken string           `position:"Query" name:"ClientToken"`
-	PageSize    requests.Integer `position:"Query" name:"PageSize"`
-	Region      string           `position:"Query" name:"Region"`
 	PageNum     requests.Integer `position:"Query" name:"PageNum"`
 	OwnerId     string           `position:"Query" name:"OwnerId"`
+	PageSize    requests.Integer `position:"Query" name:"PageSize"`
+	Region      string           `position:"Query" name:"Region"`
 }
 
 // DescribeBackupGatewayListResponse is the response struct for api DescribeBackupGatewayList

+ 2 - 2
services/dbs/describe_backup_plan_list.go

@@ -77,11 +77,11 @@ func (client *Client) DescribeBackupPlanListWithCallback(request *DescribeBackup
 type DescribeBackupPlanListRequest struct {
 	*requests.RpcRequest
 	ClientToken  string           `position:"Query" name:"ClientToken"`
-	PageSize     requests.Integer `position:"Query" name:"PageSize"`
 	BackupPlanId string           `position:"Query" name:"BackupPlanId"`
-	Region       string           `position:"Query" name:"Region"`
 	PageNum      requests.Integer `position:"Query" name:"PageNum"`
 	OwnerId      string           `position:"Query" name:"OwnerId"`
+	PageSize     requests.Integer `position:"Query" name:"PageSize"`
+	Region       string           `position:"Query" name:"Region"`
 }
 
 // DescribeBackupPlanListResponse is the response struct for api DescribeBackupPlanList

+ 1 - 1
services/dbs/describe_full_backup_list.go

@@ -77,10 +77,10 @@ func (client *Client) DescribeFullBackupListWithCallback(request *DescribeFullBa
 type DescribeFullBackupListRequest struct {
 	*requests.RpcRequest
 	ClientToken  string           `position:"Query" name:"ClientToken"`
-	PageSize     requests.Integer `position:"Query" name:"PageSize"`
 	BackupPlanId string           `position:"Query" name:"BackupPlanId"`
 	PageNum      requests.Integer `position:"Query" name:"PageNum"`
 	OwnerId      string           `position:"Query" name:"OwnerId"`
+	PageSize     requests.Integer `position:"Query" name:"PageSize"`
 }
 
 // DescribeFullBackupListResponse is the response struct for api DescribeFullBackupList

+ 1 - 1
services/dbs/describe_increment_backup_list.go

@@ -77,10 +77,10 @@ func (client *Client) DescribeIncrementBackupListWithCallback(request *DescribeI
 type DescribeIncrementBackupListRequest struct {
 	*requests.RpcRequest
 	ClientToken  string           `position:"Query" name:"ClientToken"`
-	PageSize     requests.Integer `position:"Query" name:"PageSize"`
 	BackupPlanId string           `position:"Query" name:"BackupPlanId"`
 	PageNum      requests.Integer `position:"Query" name:"PageNum"`
 	OwnerId      string           `position:"Query" name:"OwnerId"`
+	PageSize     requests.Integer `position:"Query" name:"PageSize"`
 }
 
 // DescribeIncrementBackupListResponse is the response struct for api DescribeIncrementBackupList

+ 111 - 0
services/dbs/describe_job_error_code.go

@@ -0,0 +1,111 @@
+package dbs
+
+//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"
+)
+
+// DescribeJobErrorCode invokes the dbs.DescribeJobErrorCode API synchronously
+// api document: https://help.aliyun.com/api/dbs/describejoberrorcode.html
+func (client *Client) DescribeJobErrorCode(request *DescribeJobErrorCodeRequest) (response *DescribeJobErrorCodeResponse, err error) {
+	response = CreateDescribeJobErrorCodeResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DescribeJobErrorCodeWithChan invokes the dbs.DescribeJobErrorCode API asynchronously
+// api document: https://help.aliyun.com/api/dbs/describejoberrorcode.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeJobErrorCodeWithChan(request *DescribeJobErrorCodeRequest) (<-chan *DescribeJobErrorCodeResponse, <-chan error) {
+	responseChan := make(chan *DescribeJobErrorCodeResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DescribeJobErrorCode(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DescribeJobErrorCodeWithCallback invokes the dbs.DescribeJobErrorCode API asynchronously
+// api document: https://help.aliyun.com/api/dbs/describejoberrorcode.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeJobErrorCodeWithCallback(request *DescribeJobErrorCodeRequest, callback func(response *DescribeJobErrorCodeResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DescribeJobErrorCodeResponse
+		var err error
+		defer close(result)
+		response, err = client.DescribeJobErrorCode(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DescribeJobErrorCodeRequest is the request struct for api DescribeJobErrorCode
+type DescribeJobErrorCodeRequest struct {
+	*requests.RpcRequest
+	ClientToken string `position:"Query" name:"ClientToken"`
+	Language    string `position:"Query" name:"Language"`
+	OwnerId     string `position:"Query" name:"OwnerId"`
+	TaskId      string `position:"Query" name:"TaskId"`
+}
+
+// DescribeJobErrorCodeResponse is the response struct for api DescribeJobErrorCode
+type DescribeJobErrorCodeResponse struct {
+	*responses.BaseResponse
+	Success        bool   `json:"Success" xml:"Success"`
+	ErrCode        string `json:"ErrCode" xml:"ErrCode"`
+	ErrMessage     string `json:"ErrMessage" xml:"ErrMessage"`
+	HttpStatusCode int    `json:"HttpStatusCode" xml:"HttpStatusCode"`
+	RequestId      string `json:"RequestId" xml:"RequestId"`
+	Item           Item   `json:"Item" xml:"Item"`
+}
+
+// CreateDescribeJobErrorCodeRequest creates a request to invoke DescribeJobErrorCode API
+func CreateDescribeJobErrorCodeRequest() (request *DescribeJobErrorCodeRequest) {
+	request = &DescribeJobErrorCodeRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Dbs", "2019-03-06", "DescribeJobErrorCode", "cbs", "openAPI")
+	return
+}
+
+// CreateDescribeJobErrorCodeResponse creates a response to parse from DescribeJobErrorCode response
+func CreateDescribeJobErrorCodeResponse() (response *DescribeJobErrorCodeResponse) {
+	response = &DescribeJobErrorCodeResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 1 - 1
services/dbs/describe_node_cidr_list.go

@@ -77,8 +77,8 @@ func (client *Client) DescribeNodeCidrListWithCallback(request *DescribeNodeCidr
 type DescribeNodeCidrListRequest struct {
 	*requests.RpcRequest
 	ClientToken string `position:"Query" name:"ClientToken"`
-	Region      string `position:"Query" name:"Region"`
 	OwnerId     string `position:"Query" name:"OwnerId"`
+	Region      string `position:"Query" name:"Region"`
 }
 
 // DescribeNodeCidrListResponse is the response struct for api DescribeNodeCidrList

+ 1 - 1
services/dbs/describe_pre_check_progress_list.go

@@ -77,9 +77,9 @@ func (client *Client) DescribePreCheckProgressListWithCallback(request *Describe
 type DescribePreCheckProgressListRequest struct {
 	*requests.RpcRequest
 	ClientToken   string `position:"Query" name:"ClientToken"`
-	RestoreTaskId string `position:"Query" name:"RestoreTaskId"`
 	BackupPlanId  string `position:"Query" name:"BackupPlanId"`
 	OwnerId       string `position:"Query" name:"OwnerId"`
+	RestoreTaskId string `position:"Query" name:"RestoreTaskId"`
 }
 
 // DescribePreCheckProgressListResponse is the response struct for api DescribePreCheckProgressList

+ 2 - 2
services/dbs/describe_restore_task_list.go

@@ -77,11 +77,11 @@ func (client *Client) DescribeRestoreTaskListWithCallback(request *DescribeResto
 type DescribeRestoreTaskListRequest struct {
 	*requests.RpcRequest
 	ClientToken   string           `position:"Query" name:"ClientToken"`
-	RestoreTaskId string           `position:"Query" name:"RestoreTaskId"`
-	PageSize      requests.Integer `position:"Query" name:"PageSize"`
 	BackupPlanId  string           `position:"Query" name:"BackupPlanId"`
 	PageNum       requests.Integer `position:"Query" name:"PageNum"`
 	OwnerId       string           `position:"Query" name:"OwnerId"`
+	RestoreTaskId string           `position:"Query" name:"RestoreTaskId"`
+	PageSize      requests.Integer `position:"Query" name:"PageSize"`
 }
 
 // DescribeRestoreTaskListResponse is the response struct for api DescribeRestoreTaskList

+ 1 - 1
services/dbs/modify_backup_plan_name.go

@@ -76,10 +76,10 @@ func (client *Client) ModifyBackupPlanNameWithCallback(request *ModifyBackupPlan
 // ModifyBackupPlanNameRequest is the request struct for api ModifyBackupPlanName
 type ModifyBackupPlanNameRequest struct {
 	*requests.RpcRequest
-	BackupPlanName string `position:"Query" name:"BackupPlanName"`
 	ClientToken    string `position:"Query" name:"ClientToken"`
 	BackupPlanId   string `position:"Query" name:"BackupPlanId"`
 	OwnerId        string `position:"Query" name:"OwnerId"`
+	BackupPlanName string `position:"Query" name:"BackupPlanName"`
 }
 
 // ModifyBackupPlanNameResponse is the response struct for api ModifyBackupPlanName

+ 3 - 3
services/dbs/modify_backup_source_endpoint.go

@@ -81,14 +81,14 @@ type ModifyBackupSourceEndpointRequest struct {
 	SourceEndpointInstanceID   string           `position:"Query" name:"SourceEndpointInstanceID"`
 	SourceEndpointUserName     string           `position:"Query" name:"SourceEndpointUserName"`
 	ClientToken                string           `position:"Query" name:"ClientToken"`
-	SourceEndpointPassword     string           `position:"Query" name:"SourceEndpointPassword"`
 	BackupPlanId               string           `position:"Query" name:"BackupPlanId"`
+	SourceEndpointDatabaseName string           `position:"Query" name:"SourceEndpointDatabaseName"`
+	SourceEndpointIP           string           `position:"Query" name:"SourceEndpointIP"`
+	SourceEndpointPassword     string           `position:"Query" name:"SourceEndpointPassword"`
 	BackupObjects              string           `position:"Query" name:"BackupObjects"`
 	OwnerId                    string           `position:"Query" name:"OwnerId"`
 	SourceEndpointPort         requests.Integer `position:"Query" name:"SourceEndpointPort"`
-	SourceEndpointDatabaseName string           `position:"Query" name:"SourceEndpointDatabaseName"`
 	SourceEndpointInstanceType string           `position:"Query" name:"SourceEndpointInstanceType"`
-	SourceEndpointIP           string           `position:"Query" name:"SourceEndpointIP"`
 	SourceEndpointOracleSID    string           `position:"Query" name:"SourceEndpointOracleSID"`
 }
 

+ 2 - 2
services/dbs/modify_backup_strategy.go

@@ -76,11 +76,11 @@ func (client *Client) ModifyBackupStrategyWithCallback(request *ModifyBackupStra
 // ModifyBackupStrategyRequest is the request struct for api ModifyBackupStrategy
 type ModifyBackupStrategyRequest struct {
 	*requests.RpcRequest
-	BackupPeriod    string `position:"Query" name:"BackupPeriod"`
-	BackupStartTime string `position:"Query" name:"BackupStartTime"`
 	ClientToken     string `position:"Query" name:"ClientToken"`
 	BackupPlanId    string `position:"Query" name:"BackupPlanId"`
 	OwnerId         string `position:"Query" name:"OwnerId"`
+	BackupPeriod    string `position:"Query" name:"BackupPeriod"`
+	BackupStartTime string `position:"Query" name:"BackupStartTime"`
 }
 
 // ModifyBackupStrategyResponse is the response struct for api ModifyBackupStrategy

+ 1 - 1
services/dbs/start_restore_task.go

@@ -77,8 +77,8 @@ func (client *Client) StartRestoreTaskWithCallback(request *StartRestoreTaskRequ
 type StartRestoreTaskRequest struct {
 	*requests.RpcRequest
 	ClientToken   string `position:"Query" name:"ClientToken"`
-	RestoreTaskId string `position:"Query" name:"RestoreTaskId"`
 	OwnerId       string `position:"Query" name:"OwnerId"`
+	RestoreTaskId string `position:"Query" name:"RestoreTaskId"`
 }
 
 // StartRestoreTaskResponse is the response struct for api StartRestoreTask

+ 26 - 0
services/dbs/struct_item.go

@@ -0,0 +1,26 @@
+package dbs
+
+//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.
+
+// Item is a nested struct in dbs response
+type Item struct {
+	JobId        string `json:"JobId" xml:"JobId"`
+	Language     string `json:"Language" xml:"Language"`
+	ErrorCode    string `json:"ErrorCode" xml:"ErrorCode"`
+	ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"`
+	JobType      string `json:"JobType" xml:"JobType"`
+	JobState     string `json:"JobState" xml:"JobState"`
+}