-
Notifications
You must be signed in to change notification settings - Fork 38
/
check_udbinstance_to_haallowance.go
50 lines (38 loc) · 1.65 KB
/
check_udbinstance_to_haallowance.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
//Code is generated by ucloud code generator, don't modify it by hand, it will cause undefined behaviors.
//go:generate ucloud-gen-go-api UDB CheckUDBInstanceToHAAllowance
package udb
import (
"github.com/ucloud/ucloud-sdk-go/ucloud/request"
"github.com/ucloud/ucloud-sdk-go/ucloud/response"
)
// CheckUDBInstanceToHAAllowanceRequest is request schema for CheckUDBInstanceToHAAllowance action
type CheckUDBInstanceToHAAllowanceRequest struct {
request.CommonBase
// 实例的Id,该值可以通过DescribeUDBInstance获取
DBId *string `required:"true"`
}
// CheckUDBInstanceToHAAllowanceResponse is response schema for CheckUDBInstanceToHAAllowance action
type CheckUDBInstanceToHAAllowanceResponse struct {
response.CommonBase
// Yes ,No ,Yes即可以升级,No为不可以升级
Allowance string
}
// NewCheckUDBInstanceToHAAllowanceRequest will create request of CheckUDBInstanceToHAAllowance action.
func (c *UDBClient) NewCheckUDBInstanceToHAAllowanceRequest() *CheckUDBInstanceToHAAllowanceRequest {
req := &CheckUDBInstanceToHAAllowanceRequest{}
// setup request with client config
c.client.SetupRequest(req)
// setup retryable with default retry policy (retry for non-create action and common error)
req.SetRetryable(true)
return req
}
// CheckUDBInstanceToHAAllowance - 核查db是否可以升级为高可用
func (c *UDBClient) CheckUDBInstanceToHAAllowance(req *CheckUDBInstanceToHAAllowanceRequest) (*CheckUDBInstanceToHAAllowanceResponse, error) {
var err error
var res CheckUDBInstanceToHAAllowanceResponse
err = c.client.InvokeAction("CheckUDBInstanceToHAAllowance", req, &res)
if err != nil {
return &res, err
}
return &res, nil
}