alertsv1

package
v0.46.1 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 8 Imported by: 2

Documentation

Overview

Package alertsv1 : Operations and models for the AlertsV1 service

Index

Constants

View Source
const (
	CreateAlertPolicyOptions_AlertType_ClickhouseAlertFwAnomaly    = "clickhouse_alert_fw_anomaly"
	CreateAlertPolicyOptions_AlertType_ClickhouseAlertFwEntAnomaly = "clickhouse_alert_fw_ent_anomaly"
	CreateAlertPolicyOptions_AlertType_DosAttackL7                 = "dos_attack_l7"
	CreateAlertPolicyOptions_AlertType_G6PoolToggleAlert           = "g6_pool_toggle_alert"
)

Constants associated with the CreateAlertPolicyOptions.AlertType property. Condition for the alert.

View Source
const (
	GetAlertPolicyRespResult_AlertType_ClickhouseAlertFwAnomaly    = "clickhouse_alert_fw_anomaly"
	GetAlertPolicyRespResult_AlertType_ClickhouseAlertFwEntAnomaly = "clickhouse_alert_fw_ent_anomaly"
	GetAlertPolicyRespResult_AlertType_DosAttackL7                 = "dos_attack_l7"
	GetAlertPolicyRespResult_AlertType_G6PoolToggleAlert           = "g6_pool_toggle_alert"
)

Constants associated with the GetAlertPolicyRespResult.AlertType property. Condition for the alert.

View Source
const (
	ListAlertPoliciesRespResultItem_AlertType_ClickhouseAlertFwAnomaly    = "clickhouse_alert_fw_anomaly"
	ListAlertPoliciesRespResultItem_AlertType_ClickhouseAlertFwEntAnomaly = "clickhouse_alert_fw_ent_anomaly"
	ListAlertPoliciesRespResultItem_AlertType_DosAttackL7                 = "dos_attack_l7"
	ListAlertPoliciesRespResultItem_AlertType_G6PoolToggleAlert           = "g6_pool_toggle_alert"
)

Constants associated with the ListAlertPoliciesRespResultItem.AlertType property. Condition for the alert.

View Source
const (
	UpdateAlertPolicyOptions_AlertType_ClickhouseAlertFwAnomaly    = "clickhouse_alert_fw_anomaly"
	UpdateAlertPolicyOptions_AlertType_ClickhouseAlertFwEntAnomaly = "clickhouse_alert_fw_ent_anomaly"
	UpdateAlertPolicyOptions_AlertType_DosAttackL7                 = "dos_attack_l7"
	UpdateAlertPolicyOptions_AlertType_G6PoolToggleAlert           = "g6_pool_toggle_alert"
)

Constants associated with the UpdateAlertPolicyOptions.AlertType property. Condition for the alert. Use 'dos_attack_l7' to set up an HTTP DDOS Attack Alerter, use 'g6_pool_toggle_alert' to set up Load Balancing Pool Enablement Alerter, use 'clickhouse_alert_fw_anomaly' to set up WAF Alerter and 'clickhouse_alert_fw_ent_anomaly' to set up Advanced Security Alerter.

View Source
const DefaultServiceName = "alerts"

DefaultServiceName is the default key used to find external configuration information.

View Source
const DefaultServiceURL = "https://api.cis.cloud.ibm.com"

DefaultServiceURL is the default URL to make service requests to.

Variables

This section is empty.

Functions

func GetServiceURLForRegion

func GetServiceURLForRegion(region string) (string, error)

GetServiceURLForRegion returns the service URL to be used for the specified region

func UnmarshalAlertSuccessResp

func UnmarshalAlertSuccessResp(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalAlertSuccessResp unmarshals an instance of AlertSuccessResp from the specified map of raw messages.

func UnmarshalAlertSuccessRespErrorsItem

func UnmarshalAlertSuccessRespErrorsItem(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalAlertSuccessRespErrorsItem unmarshals an instance of AlertSuccessRespErrorsItem from the specified map of raw messages.

func UnmarshalAlertSuccessRespMessagesItem

func UnmarshalAlertSuccessRespMessagesItem(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalAlertSuccessRespMessagesItem unmarshals an instance of AlertSuccessRespMessagesItem from the specified map of raw messages.

func UnmarshalAlertSuccessRespResult

func UnmarshalAlertSuccessRespResult(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalAlertSuccessRespResult unmarshals an instance of AlertSuccessRespResult from the specified map of raw messages.

func UnmarshalCreateAlertPolicyInputMechanisms

func UnmarshalCreateAlertPolicyInputMechanisms(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalCreateAlertPolicyInputMechanisms unmarshals an instance of CreateAlertPolicyInputMechanisms from the specified map of raw messages.

func UnmarshalCreateAlertPolicyInputMechanismsEmailItem

func UnmarshalCreateAlertPolicyInputMechanismsEmailItem(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalCreateAlertPolicyInputMechanismsEmailItem unmarshals an instance of CreateAlertPolicyInputMechanismsEmailItem from the specified map of raw messages.

func UnmarshalCreateAlertPolicyInputMechanismsWebhooksItem

func UnmarshalCreateAlertPolicyInputMechanismsWebhooksItem(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalCreateAlertPolicyInputMechanismsWebhooksItem unmarshals an instance of CreateAlertPolicyInputMechanismsWebhooksItem from the specified map of raw messages.

func UnmarshalGetAlertPolicyResp

func UnmarshalGetAlertPolicyResp(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalGetAlertPolicyResp unmarshals an instance of GetAlertPolicyResp from the specified map of raw messages.

func UnmarshalGetAlertPolicyRespErrorsItem

func UnmarshalGetAlertPolicyRespErrorsItem(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalGetAlertPolicyRespErrorsItem unmarshals an instance of GetAlertPolicyRespErrorsItem from the specified map of raw messages.

func UnmarshalGetAlertPolicyRespMessagesItem

func UnmarshalGetAlertPolicyRespMessagesItem(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalGetAlertPolicyRespMessagesItem unmarshals an instance of GetAlertPolicyRespMessagesItem from the specified map of raw messages.

func UnmarshalGetAlertPolicyRespResult

func UnmarshalGetAlertPolicyRespResult(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalGetAlertPolicyRespResult unmarshals an instance of GetAlertPolicyRespResult from the specified map of raw messages.

func UnmarshalGetAlertPolicyRespResultMechanisms

func UnmarshalGetAlertPolicyRespResultMechanisms(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalGetAlertPolicyRespResultMechanisms unmarshals an instance of GetAlertPolicyRespResultMechanisms from the specified map of raw messages.

func UnmarshalGetAlertPolicyRespResultMechanismsEmailItem

func UnmarshalGetAlertPolicyRespResultMechanismsEmailItem(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalGetAlertPolicyRespResultMechanismsEmailItem unmarshals an instance of GetAlertPolicyRespResultMechanismsEmailItem from the specified map of raw messages.

func UnmarshalGetAlertPolicyRespResultMechanismsWebhooksItem

func UnmarshalGetAlertPolicyRespResultMechanismsWebhooksItem(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalGetAlertPolicyRespResultMechanismsWebhooksItem unmarshals an instance of GetAlertPolicyRespResultMechanismsWebhooksItem from the specified map of raw messages.

func UnmarshalListAlertPoliciesResp

func UnmarshalListAlertPoliciesResp(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalListAlertPoliciesResp unmarshals an instance of ListAlertPoliciesResp from the specified map of raw messages.

func UnmarshalListAlertPoliciesRespErrorsItem

func UnmarshalListAlertPoliciesRespErrorsItem(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalListAlertPoliciesRespErrorsItem unmarshals an instance of ListAlertPoliciesRespErrorsItem from the specified map of raw messages.

func UnmarshalListAlertPoliciesRespMessagesItem

func UnmarshalListAlertPoliciesRespMessagesItem(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalListAlertPoliciesRespMessagesItem unmarshals an instance of ListAlertPoliciesRespMessagesItem from the specified map of raw messages.

func UnmarshalListAlertPoliciesRespResultItem

func UnmarshalListAlertPoliciesRespResultItem(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalListAlertPoliciesRespResultItem unmarshals an instance of ListAlertPoliciesRespResultItem from the specified map of raw messages.

func UnmarshalListAlertPoliciesRespResultItemMechanisms

func UnmarshalListAlertPoliciesRespResultItemMechanisms(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalListAlertPoliciesRespResultItemMechanisms unmarshals an instance of ListAlertPoliciesRespResultItemMechanisms from the specified map of raw messages.

func UnmarshalListAlertPoliciesRespResultItemMechanismsEmailItem

func UnmarshalListAlertPoliciesRespResultItemMechanismsEmailItem(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalListAlertPoliciesRespResultItemMechanismsEmailItem unmarshals an instance of ListAlertPoliciesRespResultItemMechanismsEmailItem from the specified map of raw messages.

func UnmarshalListAlertPoliciesRespResultItemMechanismsWebhooksItem

func UnmarshalListAlertPoliciesRespResultItemMechanismsWebhooksItem(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalListAlertPoliciesRespResultItemMechanismsWebhooksItem unmarshals an instance of ListAlertPoliciesRespResultItemMechanismsWebhooksItem from the specified map of raw messages.

func UnmarshalUpdateAlertPolicyInputMechanisms

func UnmarshalUpdateAlertPolicyInputMechanisms(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalUpdateAlertPolicyInputMechanisms unmarshals an instance of UpdateAlertPolicyInputMechanisms from the specified map of raw messages.

func UnmarshalUpdateAlertPolicyInputMechanismsEmailItem

func UnmarshalUpdateAlertPolicyInputMechanismsEmailItem(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalUpdateAlertPolicyInputMechanismsEmailItem unmarshals an instance of UpdateAlertPolicyInputMechanismsEmailItem from the specified map of raw messages.

func UnmarshalUpdateAlertPolicyInputMechanismsWebhooksItem

func UnmarshalUpdateAlertPolicyInputMechanismsWebhooksItem(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalUpdateAlertPolicyInputMechanismsWebhooksItem unmarshals an instance of UpdateAlertPolicyInputMechanismsWebhooksItem from the specified map of raw messages.

Types

type AlertSuccessResp

type AlertSuccessResp struct {
	// Was operation successful.
	Success *bool `json:"success" validate:"required"`

	// Array of errors encountered.
	Errors []AlertSuccessRespErrorsItem `json:"errors" validate:"required"`

	// Array of messages returned.
	Messages []AlertSuccessRespMessagesItem `json:"messages" validate:"required"`

	// Container for response information.
	Result *AlertSuccessRespResult `json:"result" validate:"required"`
}

AlertSuccessResp : Alert Policies Response.

type AlertSuccessRespErrorsItem

type AlertSuccessRespErrorsItem struct {
	ID *string `json:"id,omitempty"`
}

AlertSuccessRespErrorsItem : AlertSuccessRespErrorsItem struct

type AlertSuccessRespMessagesItem

type AlertSuccessRespMessagesItem struct {
	ID *string `json:"id,omitempty"`
}

AlertSuccessRespMessagesItem : AlertSuccessRespMessagesItem struct

type AlertSuccessRespResult

type AlertSuccessRespResult struct {
	// Policy ID.
	ID *string `json:"id" validate:"required"`
}

AlertSuccessRespResult : Container for response information.

type AlertsV1

type AlertsV1 struct {
	Service *core.BaseService

	// Full url-encoded CRN of the service instance.
	Crn *string
}

AlertsV1 : CIS Alert Policies

API Version: 1.0.0

func NewAlertsV1

func NewAlertsV1(options *AlertsV1Options) (service *AlertsV1, err error)

NewAlertsV1 : constructs an instance of AlertsV1 with passed in options.

func NewAlertsV1UsingExternalConfig

func NewAlertsV1UsingExternalConfig(options *AlertsV1Options) (alerts *AlertsV1, err error)

NewAlertsV1UsingExternalConfig : constructs an instance of AlertsV1 with passed in options and external configuration.

func (*AlertsV1) Clone

func (alerts *AlertsV1) Clone() *AlertsV1

Clone makes a copy of "alerts" suitable for processing requests.

func (*AlertsV1) CreateAlertPolicy

func (alerts *AlertsV1) CreateAlertPolicy(createAlertPolicyOptions *CreateAlertPolicyOptions) (result *AlertSuccessResp, response *core.DetailedResponse, err error)

CreateAlertPolicy : Create an alert policy Create a new alert policy for the CIS instance.

func (*AlertsV1) CreateAlertPolicyWithContext

func (alerts *AlertsV1) CreateAlertPolicyWithContext(ctx context.Context, createAlertPolicyOptions *CreateAlertPolicyOptions) (result *AlertSuccessResp, response *core.DetailedResponse, err error)

CreateAlertPolicyWithContext is an alternate form of the CreateAlertPolicy method which supports a Context parameter

func (*AlertsV1) DeleteAlertPolicy

func (alerts *AlertsV1) DeleteAlertPolicy(deleteAlertPolicyOptions *DeleteAlertPolicyOptions) (result *AlertSuccessResp, response *core.DetailedResponse, err error)

DeleteAlertPolicy : Delete an alert policy Delete an alert policy for the CIS instance.

func (*AlertsV1) DeleteAlertPolicyWithContext

func (alerts *AlertsV1) DeleteAlertPolicyWithContext(ctx context.Context, deleteAlertPolicyOptions *DeleteAlertPolicyOptions) (result *AlertSuccessResp, response *core.DetailedResponse, err error)

DeleteAlertPolicyWithContext is an alternate form of the DeleteAlertPolicy method which supports a Context parameter

func (*AlertsV1) DisableRetries

func (alerts *AlertsV1) DisableRetries()

DisableRetries disables automatic retries for requests invoked for this service instance.

func (*AlertsV1) EnableRetries

func (alerts *AlertsV1) EnableRetries(maxRetries int, maxRetryInterval time.Duration)

EnableRetries enables automatic retries for requests invoked for this service instance. If either parameter is specified as 0, then a default value is used instead.

func (*AlertsV1) GetAlertPolicies

func (alerts *AlertsV1) GetAlertPolicies(getAlertPoliciesOptions *GetAlertPoliciesOptions) (result *ListAlertPoliciesResp, response *core.DetailedResponse, err error)

GetAlertPolicies : List alert policies List configured alert policies for the CIS instance.

func (*AlertsV1) GetAlertPoliciesWithContext

func (alerts *AlertsV1) GetAlertPoliciesWithContext(ctx context.Context, getAlertPoliciesOptions *GetAlertPoliciesOptions) (result *ListAlertPoliciesResp, response *core.DetailedResponse, err error)

GetAlertPoliciesWithContext is an alternate form of the GetAlertPolicies method which supports a Context parameter

func (*AlertsV1) GetAlertPolicy

func (alerts *AlertsV1) GetAlertPolicy(getAlertPolicyOptions *GetAlertPolicyOptions) (result *GetAlertPolicyResp, response *core.DetailedResponse, err error)

GetAlertPolicy : Get an alert policy Get an alert policy for the CIS instance.

func (*AlertsV1) GetAlertPolicyWithContext

func (alerts *AlertsV1) GetAlertPolicyWithContext(ctx context.Context, getAlertPolicyOptions *GetAlertPolicyOptions) (result *GetAlertPolicyResp, response *core.DetailedResponse, err error)

GetAlertPolicyWithContext is an alternate form of the GetAlertPolicy method which supports a Context parameter

func (*AlertsV1) GetEnableGzipCompression

func (alerts *AlertsV1) GetEnableGzipCompression() bool

GetEnableGzipCompression returns the service's EnableGzipCompression field

func (*AlertsV1) GetServiceURL

func (alerts *AlertsV1) GetServiceURL() string

GetServiceURL returns the service URL

func (*AlertsV1) NewCreateAlertPolicyOptions

func (*AlertsV1) NewCreateAlertPolicyOptions() *CreateAlertPolicyOptions

NewCreateAlertPolicyOptions : Instantiate CreateAlertPolicyOptions

func (*AlertsV1) NewDeleteAlertPolicyOptions

func (*AlertsV1) NewDeleteAlertPolicyOptions(policyID string) *DeleteAlertPolicyOptions

NewDeleteAlertPolicyOptions : Instantiate DeleteAlertPolicyOptions

func (*AlertsV1) NewGetAlertPoliciesOptions

func (*AlertsV1) NewGetAlertPoliciesOptions() *GetAlertPoliciesOptions

NewGetAlertPoliciesOptions : Instantiate GetAlertPoliciesOptions

func (*AlertsV1) NewGetAlertPolicyOptions

func (*AlertsV1) NewGetAlertPolicyOptions(policyID string) *GetAlertPolicyOptions

NewGetAlertPolicyOptions : Instantiate GetAlertPolicyOptions

func (*AlertsV1) NewUpdateAlertPolicyOptions

func (*AlertsV1) NewUpdateAlertPolicyOptions(policyID string) *UpdateAlertPolicyOptions

NewUpdateAlertPolicyOptions : Instantiate UpdateAlertPolicyOptions

func (*AlertsV1) SetDefaultHeaders

func (alerts *AlertsV1) SetDefaultHeaders(headers http.Header)

SetDefaultHeaders sets HTTP headers to be sent in every request

func (*AlertsV1) SetEnableGzipCompression

func (alerts *AlertsV1) SetEnableGzipCompression(enableGzip bool)

SetEnableGzipCompression sets the service's EnableGzipCompression field

func (*AlertsV1) SetServiceURL

func (alerts *AlertsV1) SetServiceURL(url string) error

SetServiceURL sets the service URL

func (*AlertsV1) UpdateAlertPolicy

func (alerts *AlertsV1) UpdateAlertPolicy(updateAlertPolicyOptions *UpdateAlertPolicyOptions) (result *AlertSuccessResp, response *core.DetailedResponse, err error)

UpdateAlertPolicy : Update an alert policy Update an existing alert policy for the CIS instance.

func (*AlertsV1) UpdateAlertPolicyWithContext

func (alerts *AlertsV1) UpdateAlertPolicyWithContext(ctx context.Context, updateAlertPolicyOptions *UpdateAlertPolicyOptions) (result *AlertSuccessResp, response *core.DetailedResponse, err error)

UpdateAlertPolicyWithContext is an alternate form of the UpdateAlertPolicy method which supports a Context parameter

type AlertsV1Options

type AlertsV1Options struct {
	ServiceName   string
	URL           string
	Authenticator core.Authenticator

	// Full url-encoded CRN of the service instance.
	Crn *string `validate:"required"`
}

AlertsV1Options : Service options

type CreateAlertPolicyInputMechanisms

type CreateAlertPolicyInputMechanisms struct {
	Email []CreateAlertPolicyInputMechanismsEmailItem `json:"email,omitempty"`

	Webhooks []CreateAlertPolicyInputMechanismsWebhooksItem `json:"webhooks,omitempty"`
}

CreateAlertPolicyInputMechanisms : Delivery mechanisms for the alert.

type CreateAlertPolicyInputMechanismsEmailItem

type CreateAlertPolicyInputMechanismsEmailItem struct {
	ID *string `json:"id,omitempty"`
}

CreateAlertPolicyInputMechanismsEmailItem : CreateAlertPolicyInputMechanismsEmailItem struct

type CreateAlertPolicyInputMechanismsWebhooksItem

type CreateAlertPolicyInputMechanismsWebhooksItem struct {
	ID *string `json:"id,omitempty"`
}

CreateAlertPolicyInputMechanismsWebhooksItem : CreateAlertPolicyInputMechanismsWebhooksItem struct

type CreateAlertPolicyOptions

type CreateAlertPolicyOptions struct {
	// Policy name.
	Name *string `json:"name,omitempty"`

	// Policy description.
	Description *string `json:"description,omitempty"`

	// Is the alert policy active.
	Enabled *bool `json:"enabled,omitempty"`

	// Condition for the alert.
	AlertType *string `json:"alert_type,omitempty"`

	// Delivery mechanisms for the alert.
	Mechanisms *CreateAlertPolicyInputMechanisms `json:"mechanisms,omitempty"`

	// Optional filters depending for the alert type.
	Filters interface{} `json:"filters,omitempty"`

	// Conditions depending on the alert type. HTTP DDOS Attack Alerter does not have any conditions. The Load Balancing
	// Pool Enablement Alerter takes conditions that describe for all pools whether the pool is being enabled, disabled, or
	// both. This field is not required when creating a new alert.
	Conditions interface{} `json:"conditions,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

CreateAlertPolicyOptions : The CreateAlertPolicy options.

func (*CreateAlertPolicyOptions) SetAlertType

func (_options *CreateAlertPolicyOptions) SetAlertType(alertType string) *CreateAlertPolicyOptions

SetAlertType : Allow user to set AlertType

func (*CreateAlertPolicyOptions) SetConditions

func (_options *CreateAlertPolicyOptions) SetConditions(conditions interface{}) *CreateAlertPolicyOptions

SetConditions : Allow user to set Conditions

func (*CreateAlertPolicyOptions) SetDescription

func (_options *CreateAlertPolicyOptions) SetDescription(description string) *CreateAlertPolicyOptions

SetDescription : Allow user to set Description

func (*CreateAlertPolicyOptions) SetEnabled

func (_options *CreateAlertPolicyOptions) SetEnabled(enabled bool) *CreateAlertPolicyOptions

SetEnabled : Allow user to set Enabled

func (*CreateAlertPolicyOptions) SetFilters

func (_options *CreateAlertPolicyOptions) SetFilters(filters interface{}) *CreateAlertPolicyOptions

SetFilters : Allow user to set Filters

func (*CreateAlertPolicyOptions) SetHeaders

func (options *CreateAlertPolicyOptions) SetHeaders(param map[string]string) *CreateAlertPolicyOptions

SetHeaders : Allow user to set Headers

func (*CreateAlertPolicyOptions) SetMechanisms

SetMechanisms : Allow user to set Mechanisms

func (*CreateAlertPolicyOptions) SetName

func (_options *CreateAlertPolicyOptions) SetName(name string) *CreateAlertPolicyOptions

SetName : Allow user to set Name

type DeleteAlertPolicyOptions

type DeleteAlertPolicyOptions struct {
	// Alert policy identifier.
	PolicyID *string `json:"policy_id" validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

DeleteAlertPolicyOptions : The DeleteAlertPolicy options.

func (*DeleteAlertPolicyOptions) SetHeaders

func (options *DeleteAlertPolicyOptions) SetHeaders(param map[string]string) *DeleteAlertPolicyOptions

SetHeaders : Allow user to set Headers

func (*DeleteAlertPolicyOptions) SetPolicyID

func (_options *DeleteAlertPolicyOptions) SetPolicyID(policyID string) *DeleteAlertPolicyOptions

SetPolicyID : Allow user to set PolicyID

type GetAlertPoliciesOptions

type GetAlertPoliciesOptions struct {

	// Allows users to set headers on API requests
	Headers map[string]string
}

GetAlertPoliciesOptions : The GetAlertPolicies options.

func (*GetAlertPoliciesOptions) SetHeaders

func (options *GetAlertPoliciesOptions) SetHeaders(param map[string]string) *GetAlertPoliciesOptions

SetHeaders : Allow user to set Headers

type GetAlertPolicyOptions

type GetAlertPolicyOptions struct {
	// Alert policy identifier.
	PolicyID *string `json:"policy_id" validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

GetAlertPolicyOptions : The GetAlertPolicy options.

func (*GetAlertPolicyOptions) SetHeaders

func (options *GetAlertPolicyOptions) SetHeaders(param map[string]string) *GetAlertPolicyOptions

SetHeaders : Allow user to set Headers

func (*GetAlertPolicyOptions) SetPolicyID

func (_options *GetAlertPolicyOptions) SetPolicyID(policyID string) *GetAlertPolicyOptions

SetPolicyID : Allow user to set PolicyID

type GetAlertPolicyResp

type GetAlertPolicyResp struct {
	// Was operation successful.
	Success *bool `json:"success" validate:"required"`

	// Array of errors encountered.
	Errors []GetAlertPolicyRespErrorsItem `json:"errors" validate:"required"`

	// Array of messages returned.
	Messages []GetAlertPolicyRespMessagesItem `json:"messages" validate:"required"`

	// Container for response information.
	Result *GetAlertPolicyRespResult `json:"result" validate:"required"`
}

GetAlertPolicyResp : Get Alert Policies Response.

type GetAlertPolicyRespErrorsItem

type GetAlertPolicyRespErrorsItem struct {
	ID *string `json:"id,omitempty"`
}

GetAlertPolicyRespErrorsItem : GetAlertPolicyRespErrorsItem struct

type GetAlertPolicyRespMessagesItem

type GetAlertPolicyRespMessagesItem struct {
	ID *string `json:"id,omitempty"`
}

GetAlertPolicyRespMessagesItem : GetAlertPolicyRespMessagesItem struct

type GetAlertPolicyRespResult

type GetAlertPolicyRespResult struct {
	// Policy ID.
	ID *string `json:"id" validate:"required"`

	// Policy Name.
	Name *string `json:"name" validate:"required"`

	// Alert Policy description.
	Description *string `json:"description" validate:"required"`

	// Is the alert enabled.
	Enabled *bool `json:"enabled" validate:"required"`

	// Condition for the alert.
	AlertType *string `json:"alert_type" validate:"required"`

	// Delivery mechanisms for the alert, can include an email, a webhook, or both.
	Mechanisms *GetAlertPolicyRespResultMechanisms `json:"mechanisms" validate:"required"`

	// When was the policy first created.
	Created *string `json:"created" validate:"required"`

	// When was the policy last modified.
	Modified *string `json:"modified" validate:"required"`

	// Optional conditions depending for the alert type.
	Conditions interface{} `json:"conditions" validate:"required"`

	// Optional filters depending for the alert type.
	Filters interface{} `json:"filters" validate:"required"`
}

GetAlertPolicyRespResult : Container for response information.

type GetAlertPolicyRespResultMechanisms

type GetAlertPolicyRespResultMechanisms struct {
	Email []GetAlertPolicyRespResultMechanismsEmailItem `json:"email,omitempty"`

	Webhooks []GetAlertPolicyRespResultMechanismsWebhooksItem `json:"webhooks,omitempty"`
}

GetAlertPolicyRespResultMechanisms : Delivery mechanisms for the alert, can include an email, a webhook, or both.

type GetAlertPolicyRespResultMechanismsEmailItem

type GetAlertPolicyRespResultMechanismsEmailItem struct {
	ID *string `json:"id,omitempty"`
}

GetAlertPolicyRespResultMechanismsEmailItem : GetAlertPolicyRespResultMechanismsEmailItem struct

type GetAlertPolicyRespResultMechanismsWebhooksItem

type GetAlertPolicyRespResultMechanismsWebhooksItem struct {
	ID *string `json:"id,omitempty"`
}

GetAlertPolicyRespResultMechanismsWebhooksItem : GetAlertPolicyRespResultMechanismsWebhooksItem struct

type ListAlertPoliciesResp

type ListAlertPoliciesResp struct {
	// Was operation successful.
	Success *bool `json:"success" validate:"required"`

	// Array of errors encountered.
	Errors []ListAlertPoliciesRespErrorsItem `json:"errors" validate:"required"`

	// Array of messages returned.
	Messages []ListAlertPoliciesRespMessagesItem `json:"messages" validate:"required"`

	// Container for response information.
	Result []ListAlertPoliciesRespResultItem `json:"result" validate:"required"`
}

ListAlertPoliciesResp : List Alert Policies Response.

type ListAlertPoliciesRespErrorsItem

type ListAlertPoliciesRespErrorsItem struct {
	ID *string `json:"id,omitempty"`
}

ListAlertPoliciesRespErrorsItem : ListAlertPoliciesRespErrorsItem struct

type ListAlertPoliciesRespMessagesItem

type ListAlertPoliciesRespMessagesItem struct {
	ID *string `json:"id,omitempty"`
}

ListAlertPoliciesRespMessagesItem : ListAlertPoliciesRespMessagesItem struct

type ListAlertPoliciesRespResultItem

type ListAlertPoliciesRespResultItem struct {
	// Policy ID.
	ID *string `json:"id" validate:"required"`

	// Policy Name.
	Name *string `json:"name" validate:"required"`

	// Alert Policy description.
	Description *string `json:"description" validate:"required"`

	// Is the alert enabled.
	Enabled *bool `json:"enabled" validate:"required"`

	// Condition for the alert.
	AlertType *string `json:"alert_type" validate:"required"`

	// Delivery mechanisms for the alert, can include an email, a webhook, or both.
	Mechanisms *ListAlertPoliciesRespResultItemMechanisms `json:"mechanisms" validate:"required"`

	// When was the policy first created.
	Created *string `json:"created" validate:"required"`

	// When was the policy last modified.
	Modified *string `json:"modified" validate:"required"`

	// Optional conditions depending for the alert type.
	Conditions interface{} `json:"conditions" validate:"required"`

	// Optional filters depending for the alert type.
	Filters interface{} `json:"filters" validate:"required"`
}

ListAlertPoliciesRespResultItem : ListAlertPoliciesRespResultItem struct

type ListAlertPoliciesRespResultItemMechanisms

type ListAlertPoliciesRespResultItemMechanisms struct {
	Email []ListAlertPoliciesRespResultItemMechanismsEmailItem `json:"email,omitempty"`

	Webhooks []ListAlertPoliciesRespResultItemMechanismsWebhooksItem `json:"webhooks,omitempty"`
}

ListAlertPoliciesRespResultItemMechanisms : Delivery mechanisms for the alert, can include an email, a webhook, or both.

type ListAlertPoliciesRespResultItemMechanismsEmailItem

type ListAlertPoliciesRespResultItemMechanismsEmailItem struct {
	ID *string `json:"id,omitempty"`
}

ListAlertPoliciesRespResultItemMechanismsEmailItem : ListAlertPoliciesRespResultItemMechanismsEmailItem struct

type ListAlertPoliciesRespResultItemMechanismsWebhooksItem

type ListAlertPoliciesRespResultItemMechanismsWebhooksItem struct {
	ID *string `json:"id,omitempty"`
}

ListAlertPoliciesRespResultItemMechanismsWebhooksItem : ListAlertPoliciesRespResultItemMechanismsWebhooksItem struct

type UpdateAlertPolicyInputMechanisms

type UpdateAlertPolicyInputMechanisms struct {
	Email []UpdateAlertPolicyInputMechanismsEmailItem `json:"email,omitempty"`

	Webhooks []UpdateAlertPolicyInputMechanismsWebhooksItem `json:"webhooks,omitempty"`
}

UpdateAlertPolicyInputMechanisms : Delivery mechanisms for the alert, can include an email, a webhook, or both.

type UpdateAlertPolicyInputMechanismsEmailItem

type UpdateAlertPolicyInputMechanismsEmailItem struct {
	ID *string `json:"id,omitempty"`
}

UpdateAlertPolicyInputMechanismsEmailItem : UpdateAlertPolicyInputMechanismsEmailItem struct

type UpdateAlertPolicyInputMechanismsWebhooksItem

type UpdateAlertPolicyInputMechanismsWebhooksItem struct {
	ID *string `json:"id,omitempty"`
}

UpdateAlertPolicyInputMechanismsWebhooksItem : UpdateAlertPolicyInputMechanismsWebhooksItem struct

type UpdateAlertPolicyOptions

type UpdateAlertPolicyOptions struct {
	// Alert policy identifier.
	PolicyID *string `json:"policy_id" validate:"required,ne="`

	// Policy name.
	Name *string `json:"name,omitempty"`

	// Policy description.
	Description *string `json:"description,omitempty"`

	// Is the alert policy active.
	Enabled *bool `json:"enabled,omitempty"`

	// Condition for the alert. Use 'dos_attack_l7' to set up an HTTP DDOS Attack Alerter, use 'g6_pool_toggle_alert' to
	// set up Load Balancing Pool Enablement Alerter, use 'clickhouse_alert_fw_anomaly' to set up WAF Alerter and
	// 'clickhouse_alert_fw_ent_anomaly' to set up Advanced Security Alerter.
	AlertType *string `json:"alert_type,omitempty"`

	// Delivery mechanisms for the alert, can include an email, a webhook, or both.
	Mechanisms *UpdateAlertPolicyInputMechanisms `json:"mechanisms,omitempty"`

	// Conditions depending on the alert type. HTTP DDOS Attack Alerter does not have any conditions. The Load Balancing
	// Pool Enablement Alerter takes conditions that describe for all pools whether the pool is being enabled, disabled, or
	// both.
	Conditions interface{} `json:"conditions,omitempty"`

	// Optional filters depending for the alert type. HTTP DDOS Attack Alerter does not require any filters. The Load
	// Balancing Pool Enablement Alerter requires a list of IDs for the pools and their corresponding alert trigger (set
	// whether alerts are recieved on disablement, enablement, or both). The basic WAF Alerter requires a list of zones to
	// be monitored. The Advanced Security Alerter requires a list of zones to be monitored as well as a list of services
	// to monitor.
	Filters interface{} `json:"filters,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

UpdateAlertPolicyOptions : The UpdateAlertPolicy options.

func (*UpdateAlertPolicyOptions) SetAlertType

func (_options *UpdateAlertPolicyOptions) SetAlertType(alertType string) *UpdateAlertPolicyOptions

SetAlertType : Allow user to set AlertType

func (*UpdateAlertPolicyOptions) SetConditions

func (_options *UpdateAlertPolicyOptions) SetConditions(conditions interface{}) *UpdateAlertPolicyOptions

SetConditions : Allow user to set Conditions

func (*UpdateAlertPolicyOptions) SetDescription

func (_options *UpdateAlertPolicyOptions) SetDescription(description string) *UpdateAlertPolicyOptions

SetDescription : Allow user to set Description

func (*UpdateAlertPolicyOptions) SetEnabled

func (_options *UpdateAlertPolicyOptions) SetEnabled(enabled bool) *UpdateAlertPolicyOptions

SetEnabled : Allow user to set Enabled

func (*UpdateAlertPolicyOptions) SetFilters

func (_options *UpdateAlertPolicyOptions) SetFilters(filters interface{}) *UpdateAlertPolicyOptions

SetFilters : Allow user to set Filters

func (*UpdateAlertPolicyOptions) SetHeaders

func (options *UpdateAlertPolicyOptions) SetHeaders(param map[string]string) *UpdateAlertPolicyOptions

SetHeaders : Allow user to set Headers

func (*UpdateAlertPolicyOptions) SetMechanisms

SetMechanisms : Allow user to set Mechanisms

func (*UpdateAlertPolicyOptions) SetName

func (_options *UpdateAlertPolicyOptions) SetName(name string) *UpdateAlertPolicyOptions

SetName : Allow user to set Name

func (*UpdateAlertPolicyOptions) SetPolicyID

func (_options *UpdateAlertPolicyOptions) SetPolicyID(policyID string) *UpdateAlertPolicyOptions

SetPolicyID : Allow user to set PolicyID

Jump to

Keyboard shortcuts

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