ips

package
v0.9.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetIPSFeatureStatus

func SetIPSFeatureStatus(client *golangsdk.ServiceClient, opts SetFeatureStatusOpts) error

This function is used to enable or disable the feature.

func SetProtectionMode

func SetProtectionMode(client *golangsdk.ServiceClient, opts SetProtectionModeOpts) error

This function is used to change the protection mode.

Types

type GetIPSFeatureStatusQueryParameters

type GetIPSFeatureStatusQueryParameters struct {
	// Protected object ID, which is used to distinguish between Internet border protection and VPC border protection
	// after a cloud firewall is created. You can obtain the ID by calling the Get function in management package.
	// In the return value, find the ID in ProtectObjects[n].ObjectID.
	// If the value of type is 0, the protected object ID belongs to the Internet border.
	// If the value of type is 1, the protected object ID belongs to the VPC border.
	ObjectID string `q:"object_id" required:"true"`
}

type GetIPSFeatureStatusResponse

type GetIPSFeatureStatusResponse struct {
	// Returned value for querying the IPS switch.
	Data IpsSwitchResponseDTO `json:"data"`
}

type GetProtectionModeQueryParameters

type GetProtectionModeQueryParameters struct {
	// Protected object ID, which is used to distinguish between Internet border protection and VPC border protection
	// after a cloud firewall is created. You can obtain the ID by calling the Get function in management package.
	// In the return value, find the ID in ProtectObjects[n].ObjectID.
	// If the value of type is 0, the protected object ID belongs to the Internet border.
	// If the value of type is 1, the protected object ID belongs to the VPC border.
	ObjectID string `q:"object_id" required:"true"`
}

type GetProtectionModeResponse

type GetProtectionModeResponse struct {
	// Returned value for querying the IPS switch.
	Data IpsProtectModeObject `json:"data"`
}

type IpsProtectModeObject

type IpsProtectModeObject struct {
	// IPS protection mode ID.
	ID string `json:"id"`
	// IPS protection mode: 0 (observation mode), 1 (strict mode), 2 (medium mode), or 3 (loose mode).
	// The observation mode is the default mode.
	Mode int `json:"mode"`
}

func GetProtectionMode

func GetProtectionMode(client *golangsdk.ServiceClient, objectId string) (*IpsProtectModeObject, error)

This function is used to query a protection mode. objectId: Protected object ID, which is used to distinguish between Internet border protection and VPC border protection after a cloud firewall is created. You can obtain the ID by calling the Get function in management package. In the return value, find the ID in ProtectObjects[n].ObjectID. If the value of type is 0, the protected object ID belongs to the Internet border. If the value of type is 1, the protected object ID belongs to the VPC border.

type IpsSwitchResponseDTO

type IpsSwitchResponseDTO struct {
	// IPS switch ID.
	ID string `json:"id"`
	// Basic defense status: 0 (disabled), 1 (enabled).
	BasicDefenseStatus int `json:"basic_defense_status"`
	// Virtual patch status: 0 (disabled), 1 (enabled).
	VirtualPatchesStatus int `json:"virtual_patches_status"`
}

func GetIPSFeatureStatus

func GetIPSFeatureStatus(client *golangsdk.ServiceClient, objectId string) (*IpsSwitchResponseDTO, error)

This function is used to query the status of the IPS feature. objectId: Protected object ID, which is used to distinguish between Internet border protection and VPC border protection after a cloud firewall is created. You can obtain the ID by calling the Get function in management package. In the return value, find the ID in ProtectObjects[n].ObjectID. If the value of type is 0, the protected object ID belongs to the Internet border. If the value of type is 1, the protected object ID belongs to the VPC border.

type SetFeatureStatusOpts

type SetFeatureStatusOpts struct {
	// Protected object ID, which is used to distinguish between Internet border protection and VPC border protection
	// after a cloud firewall is created. You can obtain the ID by calling the Get function in management package.
	// In the return value, find the ID in ProtectObjects[n].ObjectID.
	// If the value of type is 0, the protected object ID belongs to the Internet border.
	// If the value of type is 1, the protected object ID belongs to the VPC border.
	ObjectID string `json:"object_id" required:"true"`
	// Patch type. Its value can only be 2 (virtual patch).
	IpsType int `json:"ips_type" required:"true"`
	// IPS feature status: 0 (disabled), 1 (enabled).
	Status *int `json:"status" required:"true"`
}

type SetProtectionModeOpts

type SetProtectionModeOpts struct {
	// Protected object ID, which is used to distinguish between Internet border protection and VPC border protection
	// after a cloud firewall is created. You can obtain the ID by calling the Get function in management package.
	// In the return value, find the ID in ProtectObjects[n].ObjectID.
	// If the value of type is 0, the protected object ID belongs to the Internet border.
	// If the value of type is 1, the protected object ID belongs to the VPC border.
	ObjectID string `json:"object_id" required:"true"`
	// IPS protection mode: 0 (observation mode), 1 (strict mode), 2 (medium mode), or 3 (loose mode).
	Mode *int `json:"mode" required:"true"`
}

Jump to

Keyboard shortcuts

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