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

54 lines
1.5 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 ReleaseEIP
package unet
import (
"github.com/ucloud/ucloud-sdk-go/ucloud/request"
"github.com/ucloud/ucloud-sdk-go/ucloud/response"
)
// ReleaseEIPRequest is request schema for ReleaseEIP action
type ReleaseEIPRequest 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"`
}
// ReleaseEIPResponse is response schema for ReleaseEIP action
type ReleaseEIPResponse struct {
response.CommonBase
}
// NewReleaseEIPRequest will create request of ReleaseEIP action.
func (c *UNetClient) NewReleaseEIPRequest() *ReleaseEIPRequest {
req := &ReleaseEIPRequest{}
// 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
}
// ReleaseEIP - 释放弹性IP资源, 所释放弹性IP必须为非绑定状态.
func (c *UNetClient) ReleaseEIP(req *ReleaseEIPRequest) (*ReleaseEIPResponse, error) {
var err error
var res ReleaseEIPResponse
err = c.Client.InvokeAction("ReleaseEIP", req, &res)
if err != nil {
return &res, err
}
return &res, nil
}