packer-cn/vendor/github.com/ucloud/ucloud-sdk-go/services/unet/modify_eipweight.go

57 lines
1.9 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//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 ModifyEIPWeight
package unet
import (
"github.com/ucloud/ucloud-sdk-go/ucloud/request"
"github.com/ucloud/ucloud-sdk-go/ucloud/response"
)
// ModifyEIPWeightRequest is request schema for ModifyEIPWeight action
type ModifyEIPWeightRequest struct {
request.CommonBase
// [公共参数] 地域。 参见 [地域和可用区列表](../summary/regionlist.html)
// Region *string `required:"true"`
// [公共参数] 项目ID。不填写为默认项目子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html)
// ProjectId *string `required:"false"`
// 弹性IP的资源ID
EIPId *string `required:"true"`
// 外网出口权重, 范围[0-100] 取值为0时, 该弹性IP不会被使用. 取值为100时, 同主机下只会使用这个弹性IP其他弹性IP不会被使用 请勿将多个绑定在同一资源的弹性IP设置为相同权重
Weight *int `required:"true"`
}
// ModifyEIPWeightResponse is response schema for ModifyEIPWeight action
type ModifyEIPWeightResponse struct {
response.CommonBase
}
// NewModifyEIPWeightRequest will create request of ModifyEIPWeight action.
func (c *UNetClient) NewModifyEIPWeightRequest() *ModifyEIPWeightRequest {
req := &ModifyEIPWeightRequest{}
// 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
}
// ModifyEIPWeight - 修改弹性IP的外网出口权重
func (c *UNetClient) ModifyEIPWeight(req *ModifyEIPWeightRequest) (*ModifyEIPWeightResponse, error) {
var err error
var res ModifyEIPWeightResponse
err = c.Client.InvokeAction("ModifyEIPWeight", req, &res)
if err != nil {
return &res, err
}
return &res, nil
}