-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
2,059 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
//Code is generated by ucloud code generator, don't modify it by hand, it will cause undefined behaviors. | ||
//go:generate ucloud-gen-go-api UHost CreateIsolationGroup | ||
|
||
package uhost | ||
|
||
import ( | ||
"github.com/ucloud/ucloud-sdk-go/ucloud/request" | ||
"github.com/ucloud/ucloud-sdk-go/ucloud/response" | ||
) | ||
|
||
// CreateIsolationGroupRequest is request schema for CreateIsolationGroup action | ||
type CreateIsolationGroupRequest struct { | ||
request.CommonBase | ||
|
||
// [公共参数] 地域。 参见 [地域和可用区列表](../summary/regionlist.html) | ||
// Region *string `required:"true"` | ||
|
||
// [公共参数] 项目id | ||
// ProjectId *string `required:"false"` | ||
|
||
// 硬件隔离组名称。请遵照[[api:uhost-api:specification|字段规范]]设定隔离组名称。 | ||
GroupName *string `required:"true"` | ||
|
||
// 备注。请遵照[[api:uhost-api:specification|字段规范]]设定隔离组备注。 | ||
Remark *string `required:"false"` | ||
} | ||
|
||
// CreateIsolationGroupResponse is response schema for CreateIsolationGroup action | ||
type CreateIsolationGroupResponse struct { | ||
response.CommonBase | ||
|
||
// 硬件隔离组id | ||
GroupId string | ||
} | ||
|
||
// NewCreateIsolationGroupRequest will create request of CreateIsolationGroup action. | ||
func (c *UHostClient) NewCreateIsolationGroupRequest() *CreateIsolationGroupRequest { | ||
req := &CreateIsolationGroupRequest{} | ||
|
||
// 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(false) | ||
return req | ||
} | ||
|
||
// CreateIsolationGroup - 创建硬件隔离组,组内机器严格隔离在不同宿主机上。 | ||
func (c *UHostClient) CreateIsolationGroup(req *CreateIsolationGroupRequest) (*CreateIsolationGroupResponse, error) { | ||
var err error | ||
var res CreateIsolationGroupResponse | ||
|
||
err = c.Client.InvokeAction("CreateIsolationGroup", req, &res) | ||
if err != nil { | ||
return &res, err | ||
} | ||
|
||
return &res, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
//Code is generated by ucloud code generator, don't modify it by hand, it will cause undefined behaviors. | ||
//go:generate ucloud-gen-go-api UHost DeleteIsolationGroup | ||
|
||
package uhost | ||
|
||
import ( | ||
"github.com/ucloud/ucloud-sdk-go/ucloud/request" | ||
"github.com/ucloud/ucloud-sdk-go/ucloud/response" | ||
) | ||
|
||
// DeleteIsolationGroupRequest is request schema for DeleteIsolationGroup action | ||
type DeleteIsolationGroupRequest struct { | ||
request.CommonBase | ||
|
||
// [公共参数] 地域。 参见 [地域和可用区列表](../summary/regionlist.html) | ||
// Region *string `required:"true"` | ||
|
||
// [公共参数] 项目id | ||
// ProjectId *string `required:"false"` | ||
|
||
// 硬件隔离组id | ||
GroupId *string `required:"true"` | ||
} | ||
|
||
// DeleteIsolationGroupResponse is response schema for DeleteIsolationGroup action | ||
type DeleteIsolationGroupResponse struct { | ||
response.CommonBase | ||
|
||
// 硬件隔离组id | ||
GroupId string | ||
} | ||
|
||
// NewDeleteIsolationGroupRequest will create request of DeleteIsolationGroup action. | ||
func (c *UHostClient) NewDeleteIsolationGroupRequest() *DeleteIsolationGroupRequest { | ||
req := &DeleteIsolationGroupRequest{} | ||
|
||
// 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 | ||
} | ||
|
||
// DeleteIsolationGroup - 删除硬件隔离组。 | ||
func (c *UHostClient) DeleteIsolationGroup(req *DeleteIsolationGroupRequest) (*DeleteIsolationGroupResponse, error) { | ||
var err error | ||
var res DeleteIsolationGroupResponse | ||
|
||
err = c.Client.InvokeAction("DeleteIsolationGroup", req, &res) | ||
if err != nil { | ||
return &res, err | ||
} | ||
|
||
return &res, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 UHost DescribeIsolationGroup | ||
|
||
package uhost | ||
|
||
import ( | ||
"github.com/ucloud/ucloud-sdk-go/ucloud/request" | ||
"github.com/ucloud/ucloud-sdk-go/ucloud/response" | ||
) | ||
|
||
// DescribeIsolationGroupRequest is request schema for DescribeIsolationGroup action | ||
type DescribeIsolationGroupRequest struct { | ||
request.CommonBase | ||
|
||
// [公共参数] 地域。 参见 [地域和可用区列表](../summary/regionlist.html) | ||
// Region *string `required:"true"` | ||
|
||
// [公共参数] 项目id | ||
// ProjectId *string `required:"false"` | ||
|
||
// 待查的硬件隔离组id | ||
GroupId *string `required:"false"` | ||
|
||
// 列表起始位置偏移量,默认为0 | ||
Offset *int `required:"false"` | ||
|
||
// 返回数据长度,默认为20,最大100 | ||
Limit *int `required:"false"` | ||
} | ||
|
||
// DescribeIsolationGroupResponse is response schema for DescribeIsolationGroup action | ||
type DescribeIsolationGroupResponse struct { | ||
response.CommonBase | ||
|
||
// 硬件隔离组集合。参见数据结构IsolationGroup。 | ||
IsolationGroupSet []IsolationGroup | ||
} | ||
|
||
// NewDescribeIsolationGroupRequest will create request of DescribeIsolationGroup action. | ||
func (c *UHostClient) NewDescribeIsolationGroupRequest() *DescribeIsolationGroupRequest { | ||
req := &DescribeIsolationGroupRequest{} | ||
|
||
// 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 | ||
} | ||
|
||
// DescribeIsolationGroup - 查询硬件隔离组列表。 | ||
func (c *UHostClient) DescribeIsolationGroup(req *DescribeIsolationGroupRequest) (*DescribeIsolationGroupResponse, error) { | ||
var err error | ||
var res DescribeIsolationGroupResponse | ||
|
||
err = c.Client.InvokeAction("DescribeIsolationGroup", req, &res) | ||
if err != nil { | ||
return &res, err | ||
} | ||
|
||
return &res, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 UHost LeaveIsolationGroup | ||
|
||
package uhost | ||
|
||
import ( | ||
"github.com/ucloud/ucloud-sdk-go/ucloud/request" | ||
"github.com/ucloud/ucloud-sdk-go/ucloud/response" | ||
) | ||
|
||
// LeaveIsolationGroupRequest is request schema for LeaveIsolationGroup action | ||
type LeaveIsolationGroupRequest struct { | ||
request.CommonBase | ||
|
||
// [公共参数] 地域。 参见 [地域和可用区列表](../summary/regionlist.html) | ||
// Region *string `required:"true"` | ||
|
||
// [公共参数] 可用区信息 | ||
// Zone *string `required:"false"` | ||
|
||
// [公共参数] 项目id | ||
// ProjectId *string `required:"false"` | ||
|
||
// 硬件隔离组id | ||
GroupId *string `required:"true"` | ||
|
||
// 主机id | ||
UHostId *string `required:"true"` | ||
} | ||
|
||
// LeaveIsolationGroupResponse is response schema for LeaveIsolationGroup action | ||
type LeaveIsolationGroupResponse struct { | ||
response.CommonBase | ||
|
||
// 主机id | ||
UHostId string | ||
} | ||
|
||
// NewLeaveIsolationGroupRequest will create request of LeaveIsolationGroup action. | ||
func (c *UHostClient) NewLeaveIsolationGroupRequest() *LeaveIsolationGroupRequest { | ||
req := &LeaveIsolationGroupRequest{} | ||
|
||
// 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 | ||
} | ||
|
||
// LeaveIsolationGroup - 移除硬件隔离组中的主机 | ||
func (c *UHostClient) LeaveIsolationGroup(req *LeaveIsolationGroupRequest) (*LeaveIsolationGroupResponse, error) { | ||
var err error | ||
var res LeaveIsolationGroupResponse | ||
|
||
err = c.Client.InvokeAction("LeaveIsolationGroup", req, &res) | ||
if err != nil { | ||
return &res, err | ||
} | ||
|
||
return &res, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package uhost | ||
|
||
/* | ||
IsolationGroup - 硬件隔离组信息 | ||
this model is auto created by ucloud code generater for open api, | ||
you can also see https://docs.ucloud.cn for detail. | ||
*/ | ||
type IsolationGroup struct { | ||
|
||
// 硬件隔离组名称 | ||
GroupName string | ||
|
||
// 硬件隔离组id | ||
GroupId string | ||
|
||
// 每个可用区中的机器数量。参见数据结构SpreadInfo。 | ||
SpreadInfoSet []SpreadInfo | ||
|
||
// 备注 | ||
Remark string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package uhost | ||
|
||
/* | ||
SpreadInfo - 每个可用区中硬件隔离组信息 | ||
this model is auto created by ucloud code generater for open api, | ||
you can also see https://docs.ucloud.cn for detail. | ||
*/ | ||
type SpreadInfo struct { | ||
|
||
// 可用区信息 | ||
Zone string | ||
|
||
// 可用区中硬件隔离组中云主机的数量,不超过7。 | ||
UHostCount int | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.