alarmreminding

package
v0.0.0-...-57791d6 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: Apache-2.0 Imports: 1 Imported by: 1

Documentation

Overview

The Anti-DDoS traffic cleaning service (Anti-DDoS for short) defends resources (Elastic Cloud Servers (ECSs), Elastic Load Balance (ELB) instances, and Bare Metal Servers (BMSs)) on HUAWEI CLOUD against network- and application-layer distributed denial of service (DDoS) attacks and sends alarms immediately when detecting an attack. In addition, Anti-DDoS improves the utilization of bandwidth and ensures the stable running of users' services.

Example to query alarm configuration.

actual, err := alarmreminding.WarnAlert(client.ServiceClient()).Extract()
if err != nil {
  panic(err)
}

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetWarnAlertURL

func GetWarnAlertURL(c *golangsdk.ServiceClient) string

func UpdateWarnAlertURL

func UpdateWarnAlertURL(c *golangsdk.ServiceClient) string

Types

type UpdateOps

type UpdateOps struct {
	// The topic urn.
	TopicUrn string `json:"topic_urn"`

	// The display name of alert config.
	DisplayName string `json:"display_name"`

	// Alarm configuration.
	WarnConfig *WarnConfig `json:"warn_config"`
}

func (UpdateOps) ToUpdateMap

func (opts UpdateOps) ToUpdateMap() (map[string]interface{}, error)

type UpdateOpsBuilder

type UpdateOpsBuilder interface {
	ToUpdateMap() (map[string]interface{}, error)
}

type UpdateResult

type UpdateResult struct {
	// contains filtered or unexported fields
}

func UpdateWarnAlert

func UpdateWarnAlert(client *golangsdk.ServiceClient, opts UpdateOpsBuilder) (r UpdateResult)

func (UpdateResult) Extract

func (r UpdateResult) Extract() (*WarnAlertResponse, error)

type WarnAlertResponse

type WarnAlertResponse struct {
	// Alarm configuration
	WarnConfig struct {
		// DDoS attacks
		AntiDDoS bool `json:"antiDDoS,"`

		// Deprecated
		// Brute force cracking (system logins, FTP, and DB)
		BruceForce bool `json:"bruce_force,omitempty"`

		// Deprecated
		// Alarms about remote logins
		RemoteLogin bool `json:"remote_login,omitempty"`

		// Deprecated
		// Weak passwords (system and database)
		WeakPassword bool `json:"weak_password,omitempty"`

		// Deprecated
		// Overly high rights of a database process
		HighPrivilege bool `json:"high_privilege,omitempty"`

		// Deprecated
		// Web page backdoors
		BackDoors bool `json:"back_doors,omitempty"`

		// Deprecated
		// Reserved
		Waf bool `json:"waf,omitempty"`

		// Deprecated
		// Possible values: 0: indicates that alarms are sent once a day. 1: indicates that alarms are sent once every half hour. This parameter is mandatory for the Host Intrusion Detection (HID) service.
		SendFrequency int `json:"send_frequency,omitempty"`
	} `json:"warn_config,"`

	// ID of an alarm group
	TopicUrn string `json:"topic_urn,"`

	// Description of an alarm group
	DisplayName string `json:"display_name,"`
}

type WarnAlertResult

type WarnAlertResult struct {
	// contains filtered or unexported fields
}

func GetWarnAlert

func GetWarnAlert(client *golangsdk.ServiceClient) (r WarnAlertResult)

func (WarnAlertResult) Extract

func (r WarnAlertResult) Extract() (*WarnAlertResponse, error)

type WarnConfig

type WarnConfig struct {
	// Whether to enable alarm config
	EnableAntiDDoS *bool `json:"antiDDoS,omitempty"`

	// Deprecated
	// Brute force cracking (system logins, FTP, and DB)
	BruceForce *bool `json:"bruce_force,omitempty"`

	// Deprecated
	// Alarms about remote logins
	RemoteLogin *bool `json:"remote_login,omitempty"`

	// Deprecated
	// Weak passwords (system and database)
	WeakPassword *bool `json:"weak_password,omitempty"`

	// Deprecated
	// Overly high rights of a database process
	HighPrivilege *bool `json:"high_privilege,omitempty"`

	// Deprecated
	// Web page backdoors
	BackDoors *bool `json:"back_doors,omitempty"`

	// Deprecated
	// Reserved
	Waf *bool `json:"waf,omitempty"`

	// Deprecated
	// Possible values: 0: indicates that alarms are sent once a day. 1: indicates that alarms are sent once every half hour. This parameter is mandatory for the Host Intrusion Detection (HID) service.
	SendFrequency *int `json:"send_frequency,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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