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

57 lines
1.4 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 ReleaseVIP
package unet
import (
"github.com/ucloud/ucloud-sdk-go/ucloud/request"
"github.com/ucloud/ucloud-sdk-go/ucloud/response"
)
// ReleaseVIPRequest is request schema for ReleaseVIP action
type ReleaseVIPRequest struct {
request.CommonBase
// [公共参数] 地域
// Region *string `required:"true"`
// [公共参数] 可用区
// Zone *string `required:"false"`
// [公共参数] 项目ID。不填写为默认项目子帐号必须填写
// ProjectId *string `required:"false"`
// 内网VIP的id
VIPId *string `required:"true"`
}
// ReleaseVIPResponse is response schema for ReleaseVIP action
type ReleaseVIPResponse struct {
response.CommonBase
}
// NewReleaseVIPRequest will create request of ReleaseVIP action.
func (c *UNetClient) NewReleaseVIPRequest() *ReleaseVIPRequest {
req := &ReleaseVIPRequest{}
// 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
}
// ReleaseVIP - 释放VIP资源
func (c *UNetClient) ReleaseVIP(req *ReleaseVIPRequest) (*ReleaseVIPResponse, error) {
var err error
var res ReleaseVIPResponse
err = c.Client.InvokeAction("ReleaseVIP", req, &res)
if err != nil {
return &res, err
}
return &res, nil
}