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

54 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 DeleteFirewall
package unet
import (
"github.com/ucloud/ucloud-sdk-go/ucloud/request"
"github.com/ucloud/ucloud-sdk-go/ucloud/response"
)
// DeleteFirewallRequest is request schema for DeleteFirewall action
type DeleteFirewallRequest struct {
request.CommonBase
// [公共参数] 地域
// Region *string `required:"true"`
// [公共参数] 项目ID。不填写为默认项目子帐号必须填写
// ProjectId *string `required:"false"`
// 防火墙资源ID
FWId *string `required:"true"`
}
// DeleteFirewallResponse is response schema for DeleteFirewall action
type DeleteFirewallResponse struct {
response.CommonBase
}
// NewDeleteFirewallRequest will create request of DeleteFirewall action.
func (c *UNetClient) NewDeleteFirewallRequest() *DeleteFirewallRequest {
req := &DeleteFirewallRequest{}
// 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
}
// DeleteFirewall - 删除防火墙
func (c *UNetClient) DeleteFirewall(req *DeleteFirewallRequest) (*DeleteFirewallResponse, error) {
var err error
var res DeleteFirewallResponse
err = c.Client.InvokeAction("DeleteFirewall", req, &res)
if err != nil {
return &res, err
}
return &res, nil
}