logs

package
v0.9.8 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateLogConfig

func CreateLogConfig(client *golangsdk.ServiceClient, opts LogConfigOpts) (*string, error)

This function is used to add log configurations.

func UpdateLogConfig

func UpdateLogConfig(client *golangsdk.ServiceClient, opts LogConfigOpts) (*string, error)

// This function is used to update log configurations.

Types

type DataResponse

type DataResponse struct {
	// Return value for updating log configurations. The value is the firewall ID.
	Data string `json:"data"`
}

type GetResponse

type GetResponse struct {
	// Log configurations
	Data LogConfig `json:"data"`
}

type LogConfig

type LogConfig struct {
	// Firewall ID.
	FWInstanceID string `json:"fw_instance_id"`

	// Whether to enable LTS: 1 (yes), 0 (no).
	LtsEnable int `json:"lts_enable"`

	// Log Tank Service (LTS) log group ID.
	LtsLogGroupID string `json:"lts_log_group_id"`

	// Attack log stream ID.
	LtsAttackLogStreamID string `json:"lts_attack_log_stream_id"`

	// Whether to enable the attack log stream: 1 (yes), 0 (no).
	LtsAttackLogStreamEnable int `json:"lts_attack_log_stream_enable"`

	// Access control log stream ID.
	LtsAccessLogStreamID string `json:"lts_access_log_stream_id"`

	// Whether to enable the access control stream: 1 (yes), 0 (no).
	LtsAccessLogStreamEnable int `json:"lts_access_log_stream_enable"`

	// Traffic log ID.
	LtsFlowLogStreamID string `json:"lts_flow_log_stream_id"`

	// Whether to enable the traffic log function: 1 (yes), 0 (no).
	LtsFlowLogStreamEnable int `json:"lts_flow_log_stream_enable"`
}

func GetLogConfig

func GetLogConfig(client *golangsdk.ServiceClient, opts QueryParameters) (*LogConfig, error)

This function is used to obtain log configurations.

type LogConfigOpts

type LogConfigOpts struct {
	// Firewall ID, which can be obtained by referring to Obtaining a Firewall ID.
	FWInstanceID string `json:"fw_instance_id" required:"true"`

	// Whether to enable LTS: 1 (yes), 0 (no).
	// If set to 1, then LtsAttackLogStreamEnable, LtsAccessLogStreamEnable,
	// and LtsFlowLogStreamEnable must be mandatory.
	LtsEnable *int `json:"lts_enable" required:"true"`

	// Log Tank Service (LTS) log group ID, which can be obtained by calling the
	// API for querying all the log groups of an account in LTS.
	// Find the value in log_groups.log_group_id (the period [.] is used to
	// separate different levels of objects).
	LtsLogGroupID string `json:"lts_log_group_id" required:"true"`

	// Attack log stream ID, which can be obtained by calling the API for
	// querying all the log streams in a specified log group in LTS.
	// Find the value in log_streams.log_stream_id (the period [.] is used to
	// separate different levels of objects).
	LtsAttackLogStreamID string `json:"lts_attack_log_stream_id,omitempty"`

	// Whether to enable the attack log stream: 1 (yes), 0 (no).
	LtsAttackLogStreamEnable int `json:"lts_attack_log_stream_enable"`

	// Access control log stream ID, which can be obtained by calling the API
	// for querying all the log streams in a specified log group in LTS.
	// Find the value in log_streams.log_stream_id (the period [.] is used to
	// separate different levels of objects).
	LtsAccessLogStreamID string `json:"lts_access_log_stream_id,omitempty"`

	// Whether to enable the access control stream: 1 (yes), 0 (no).
	LtsAccessLogStreamEnable int `json:"lts_access_log_stream_enable"`

	// Traffic log ID, which can be obtained by calling the API for querying
	// all the log streams in a specified log group in LTS.
	// Find the value in log_streams.log_stream_id (the period [.] is used to
	// separate different levels of objects).
	LtsFlowLogStreamID string `json:"lts_flow_log_stream_id,omitempty"`

	// Whether to enable the traffic log function: 1 (yes), 0 (no).
	LtsFlowLogStreamEnable int `json:"lts_flow_log_stream_enable"`
}

type QueryParameters

type QueryParameters struct {
	// Enterprise project ID
	EnterpriseProjectID string `q:"enterprise_project_id,omitempty"`
	// Firewall instance ID. This field is required.
	FwInstanceID string `q:"fw_instance_id" required:"true"`
}

Jump to

Keyboard shortcuts

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