You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
packer/vendor/github.com/ucloud/ucloud-sdk-go/services/unet/bind_eip.go

60 lines
1.8 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

//Code is generated by ucloud code generator, don't modify it by hand, it will cause undefined behaviors.
//go:generate ucloud-gen-go-api UNet BindEIP
package unet
import (
"github.com/ucloud/ucloud-sdk-go/ucloud/request"
"github.com/ucloud/ucloud-sdk-go/ucloud/response"
)
// BindEIPRequest is request schema for BindEIP action
type BindEIPRequest struct {
request.CommonBase
// [公共参数] 地域
// Region *string `required:"true"`
// [公共参数] 项目ID。不填写为默认项目子帐号必须填写
// ProjectId *string `required:"false"`
// 弹性IP的资源Id
EIPId *string `required:"true"`
// 弹性IP请求绑定的资源类型, 枚举值为: uhost: 云主机; ulb, 负载均衡器 upm: 物理机; hadoophost: 大数据集群;fortresshost堡垒机udockhost容器udhost私有专区主机natgwnatgwudbudbvpngwipsec vpnucdr云灾备dbaudit数据库审计
ResourceType *string `required:"true"`
// 弹性IP请求绑定的资源ID
ResourceId *string `required:"true"`
}
// BindEIPResponse is response schema for BindEIP action
type BindEIPResponse struct {
response.CommonBase
}
// NewBindEIPRequest will create request of BindEIP action.
func (c *UNetClient) NewBindEIPRequest() *BindEIPRequest {
req := &BindEIPRequest{}
// 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
}
// BindEIP - 将尚未使用的弹性IP绑定到指定的资源
func (c *UNetClient) BindEIP(req *BindEIPRequest) (*BindEIPResponse, error) {
var err error
var res BindEIPResponse
err = c.Client.InvokeAction("BindEIP", req, &res)
if err != nil {
return &res, err
}
return &res, nil
}