-
Notifications
You must be signed in to change notification settings - Fork 38
/
fetch_udbinstance_earliest_recover_time.go
53 lines (40 loc) · 1.78 KB
/
fetch_udbinstance_earliest_recover_time.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
51
52
53
//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 FetchUDBInstanceEarliestRecoverTime
package udb
import (
"github.com/ucloud/ucloud-sdk-go/ucloud/request"
"github.com/ucloud/ucloud-sdk-go/ucloud/response"
)
// FetchUDBInstanceEarliestRecoverTimeRequest is request schema for FetchUDBInstanceEarliestRecoverTime action
type FetchUDBInstanceEarliestRecoverTimeRequest struct {
request.CommonBase
// 可用区。参见 [可用区列表](../summary/regionlist.html)
Zone *string `required:"false"`
// DB实例Id
DBId *string `required:"true"`
}
// FetchUDBInstanceEarliestRecoverTimeResponse is response schema for FetchUDBInstanceEarliestRecoverTime action
type FetchUDBInstanceEarliestRecoverTimeResponse struct {
response.CommonBase
// 获取最早可回档时间点
EarliestTime int
}
// NewFetchUDBInstanceEarliestRecoverTimeRequest will create request of FetchUDBInstanceEarliestRecoverTime action.
func (c *UDBClient) NewFetchUDBInstanceEarliestRecoverTimeRequest() *FetchUDBInstanceEarliestRecoverTimeRequest {
req := &FetchUDBInstanceEarliestRecoverTimeRequest{}
// 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
}
// FetchUDBInstanceEarliestRecoverTime - 获取UDB最早可回档的时间点
func (c *UDBClient) FetchUDBInstanceEarliestRecoverTime(req *FetchUDBInstanceEarliestRecoverTimeRequest) (*FetchUDBInstanceEarliestRecoverTimeResponse, error) {
var err error
var res FetchUDBInstanceEarliestRecoverTimeResponse
err = c.client.InvokeAction("FetchUDBInstanceEarliestRecoverTime", req, &res)
if err != nil {
return &res, err
}
return &res, nil
}