-
Notifications
You must be signed in to change notification settings - Fork 38
/
modify_phost_info.go
62 lines (46 loc) · 1.63 KB
/
modify_phost_info.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
54
55
56
57
58
59
60
61
62
//Code is generated by ucloud code generator, don't modify it by hand, it will cause undefined behaviors.
//go:generate ucloud-gen-go-api UPHost ModifyPHostInfo
package uphost
import (
"github.com/ucloud/ucloud-sdk-go/ucloud/request"
"github.com/ucloud/ucloud-sdk-go/ucloud/response"
)
// ModifyPHostInfoRequest is request schema for ModifyPHostInfo action
type ModifyPHostInfoRequest struct {
request.CommonBase
// 可用区。参见 [可用区列表](../summary/regionlist.html)
// Zone *string `required:"false"`
// 物理机资源ID
PHostId *string `required:"true"`
// 物理机名称,默认不更改
Name *string `required:"false"`
// 物理机备注,默认不更改
Remark *string `required:"false"`
// 业务组,默认不更改
Tag *string `required:"false"`
}
// ModifyPHostInfoResponse is response schema for ModifyPHostInfo action
type ModifyPHostInfoResponse struct {
response.CommonBase
// PHost 的资源ID
PHostId string
}
// NewModifyPHostInfoRequest will create request of ModifyPHostInfo action.
func (c *UPHostClient) NewModifyPHostInfoRequest() *ModifyPHostInfoRequest {
req := &ModifyPHostInfoRequest{}
// 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
}
// ModifyPHostInfo - 更改物理机信息
func (c *UPHostClient) ModifyPHostInfo(req *ModifyPHostInfoRequest) (*ModifyPHostInfoResponse, error) {
var err error
var res ModifyPHostInfoResponse
err = c.Client.InvokeAction("ModifyPHostInfo", req, &res)
if err != nil {
return &res, err
}
return &res, nil
}