management

package
v0.9.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 15, 2025 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTag

func CreateTag(client *golangsdk.ServiceClient, firewallId string, opts CreateTagOpts) error

This function is used to create a tag

func Delete

func Delete(client *golangsdk.ServiceClient, firewallId string) (*string, error)

This function is used to delete a firewall. It takes effect only for pay-per-use firewalls.

Types

type ChargeInfo

type ChargeInfo struct {
	// Billing mode. The value can only be "postPaid", indicating pay-per-use billing.
	ChargeMode string `json:"charge_mode" required:"true"`
}

type ChargeInfoResp

type ChargeInfoResp struct {
	// Billing mode. The value can only be "postPaid", indicating pay-per-use billing.
	ChargeMode  string `json:"charge_mode" required:"true"`
	PeriodType  string `json:"period_type"`
	PeriodNum   string `json:"period_num"`
	IsAutoRenew string `json:"is_auto_renew"`
	IsAutoPay   string `json:"is_auto_pay"`
}

type CreateFlavor

type CreateFlavor struct {
	// Firewall edition. Only the professional edition is supported.
	Version string `json:"version" required:"true"`
}

type CreateOpts

type CreateOpts struct {
	// Specifies the firewall name
	Name string `json:"name" required:"true"`
	// Specifies the enterprise project ID, which is the ID of a project planned based on organizations.
	// You can obtain the enterprise project ID by referring to
	// https://docs.otc.t-systems.com/cloud-firewall/api-ref/appendix/obtaining_an_enterprise_project_id.html
	// If the enterprise project function is not enabled, the value is 0.
	EnterpriseProjectId string `json:"enterprise_project_id,omitempty"`
	// List of service resource tags. After tags are added to firewall resources, you can query resources and combine CDRs by key and value.
	Tags []CreateTags `json:"tags,omitempty"`
	// Specifies the firewall specifications.
	Flavor CreateFlavor `json:"flavor" required:"true"`
	// Specifies the billing type, which can be yearly/monthly or pay-per-use (default setting).
	ChargeInfo ChargeInfo `json:"charge_info" required:"true"`
}

type CreateResponse

type CreateResponse struct {
	// job_id: Instance creation task ID. This parameter is returned only when pay-per-use instances are created.
	// Note for developer: This is the same as instance ID.
	JobID string `json:"job_id"`
	// order_id: Order ID. This parameter is returned only when yearly/monthly instances are created.
	OrderID string `json:"order_id"`
	// data: Request body for creating a firewall.
	Data CreateResponseData `json:"data"`
}

ResponseBody represents the response body parameters.

func Create

func Create(client *golangsdk.ServiceClient, opts CreateOpts) (*CreateResponse, error)

This function is used to create a firewall

type CreateResponseData

type CreateResponseData struct {
	// Specifies the firewall name
	Name string `json:"name"`
	// Specifies the enterprise project ID, which is the ID of a project planned based on organizations.
	EnterpriseProjectId string `json:"enterprise_project_id"`
	// Specifies the number of nodes
	Tags []Tags `json:"tags"`
	// Specifies the firewall specifications.
	Flavor FlavorResp `json:"flavor"`
	// Specifies the billing type.
	ChargeInfo ChargeInfoResp `json:"charge_info"`
}

type CreateTagOpts

type CreateTagOpts struct {
	// List of service resource tags. After tags are added to firewall resources, you can query resources and combine CDRs by key and value.
	Tags []CreateTags `json:"tags,omitempty"`
}

type CreateTags

type CreateTags struct {
	// Resource tag key.
	Key string `json:"key,omitempty"`

	// Resource tag value.
	Value string `json:"value,omitempty"`
}

type DeleteJob

type DeleteJob struct {
	// ID of a firewall deletion task.
	JobId string `json:"data"`
}

type FlavorResp

type FlavorResp struct {
	// Firewall edition.
	Version string `json:"version"`
}

type Tags

type Tags struct {
	// Resource tag key.
	Key string `json:"key"`
	// Resource tag value.
	Value string `json:"value"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL