wafrulegroupsapiv1

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: 4

Documentation

Overview

Package wafrulegroupsapiv1 : Operations and models for the WafRuleGroupsApiV1 service

Index

Constants

View Source
const (
	ListWafRuleGroupsOptions_Mode_Off = "off"
	ListWafRuleGroupsOptions_Mode_On  = "on"
)

Constants associated with the ListWafRuleGroupsOptions.Mode property. Whether or not the rules contained within this group are configurable/usable.

View Source
const (
	ListWafRuleGroupsOptions_Direction_Asc  = "asc"
	ListWafRuleGroupsOptions_Direction_Desc = "desc"
)

Constants associated with the ListWafRuleGroupsOptions.Direction property. Direction to order packages.

View Source
const (
	ListWafRuleGroupsOptions_Match_All = "all"
	ListWafRuleGroupsOptions_Match_Any = "any"
)

Constants associated with the ListWafRuleGroupsOptions.Match property. Whether to match all search requirements or at least one (any).

View Source
const (
	UpdateWafRuleGroupOptions_Mode_Off = "off"
	UpdateWafRuleGroupOptions_Mode_On  = "on"
)

Constants associated with the UpdateWafRuleGroupOptions.Mode property. Whether or not the rules contained within this group are configurable/usable.

View Source
const DefaultServiceName = "waf_rule_groups_api"

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 added in v0.12.1

func GetServiceURLForRegion(region string) (string, error)

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

func UnmarshalWafGroupResponse

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

UnmarshalWafGroupResponse unmarshals an instance of WafGroupResponse from the specified map of raw messages.

func UnmarshalWafGroupResponseResultInfo

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

UnmarshalWafGroupResponseResultInfo unmarshals an instance of WafGroupResponseResultInfo from the specified map of raw messages.

func UnmarshalWafGroupsResponse

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

UnmarshalWafGroupsResponse unmarshals an instance of WafGroupsResponse from the specified map of raw messages.

func UnmarshalWafGroupsResponseResultInfo

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

UnmarshalWafGroupsResponseResultInfo unmarshals an instance of WafGroupsResponseResultInfo from the specified map of raw messages.

func UnmarshalWafRuleProperties

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

UnmarshalWafRuleProperties unmarshals an instance of WafRuleProperties from the specified map of raw messages.

Types

type GetWafRuleGroupOptions

type GetWafRuleGroupOptions struct {
	// Package ID.
	PkgID *string `json:"pkg_id" validate:"required,ne="`

	// Group ID.
	GroupID *string `json:"group_id" validate:"required,ne="`

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

GetWafRuleGroupOptions : The GetWafRuleGroup options.

func (*GetWafRuleGroupOptions) SetGroupID

func (options *GetWafRuleGroupOptions) SetGroupID(groupID string) *GetWafRuleGroupOptions

SetGroupID : Allow user to set GroupID

func (*GetWafRuleGroupOptions) SetHeaders

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

SetHeaders : Allow user to set Headers

func (*GetWafRuleGroupOptions) SetPkgID

func (options *GetWafRuleGroupOptions) SetPkgID(pkgID string) *GetWafRuleGroupOptions

SetPkgID : Allow user to set PkgID

type ListWafRuleGroupsOptions

type ListWafRuleGroupsOptions struct {
	// Package ID.
	PkgID *string `json:"pkg_id" validate:"required,ne="`

	// Name of the firewall package.
	Name *string `json:"name,omitempty"`

	// Whether or not the rules contained within this group are configurable/usable.
	Mode *string `json:"mode,omitempty"`

	// How many rules are contained within this group.
	RulesCount *string `json:"rules_count,omitempty"`

	// Page number of paginated results.
	Page *int64 `json:"page,omitempty"`

	// Number of packages per page.
	PerPage *int64 `json:"per_page,omitempty"`

	// Field to order packages by.
	Order *string `json:"order,omitempty"`

	// Direction to order packages.
	Direction *string `json:"direction,omitempty"`

	// Whether to match all search requirements or at least one (any).
	Match *string `json:"match,omitempty"`

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

ListWafRuleGroupsOptions : The ListWafRuleGroups options.

func (*ListWafRuleGroupsOptions) SetDirection

func (options *ListWafRuleGroupsOptions) SetDirection(direction string) *ListWafRuleGroupsOptions

SetDirection : Allow user to set Direction

func (*ListWafRuleGroupsOptions) SetHeaders

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

SetHeaders : Allow user to set Headers

func (*ListWafRuleGroupsOptions) SetMatch

func (options *ListWafRuleGroupsOptions) SetMatch(match string) *ListWafRuleGroupsOptions

SetMatch : Allow user to set Match

func (*ListWafRuleGroupsOptions) SetMode

SetMode : Allow user to set Mode

func (*ListWafRuleGroupsOptions) SetName

SetName : Allow user to set Name

func (*ListWafRuleGroupsOptions) SetOrder

func (options *ListWafRuleGroupsOptions) SetOrder(order string) *ListWafRuleGroupsOptions

SetOrder : Allow user to set Order

func (*ListWafRuleGroupsOptions) SetPage

SetPage : Allow user to set Page

func (*ListWafRuleGroupsOptions) SetPerPage

func (options *ListWafRuleGroupsOptions) SetPerPage(perPage int64) *ListWafRuleGroupsOptions

SetPerPage : Allow user to set PerPage

func (*ListWafRuleGroupsOptions) SetPkgID

func (options *ListWafRuleGroupsOptions) SetPkgID(pkgID string) *ListWafRuleGroupsOptions

SetPkgID : Allow user to set PkgID

func (*ListWafRuleGroupsOptions) SetRulesCount

func (options *ListWafRuleGroupsOptions) SetRulesCount(rulesCount string) *ListWafRuleGroupsOptions

SetRulesCount : Allow user to set RulesCount

type UpdateWafRuleGroupOptions

type UpdateWafRuleGroupOptions struct {
	// Package ID.
	PkgID *string `json:"pkg_id" validate:"required,ne="`

	// Group ID.
	GroupID *string `json:"group_id" validate:"required,ne="`

	// Whether or not the rules contained within this group are configurable/usable.
	Mode *string `json:"mode,omitempty"`

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

UpdateWafRuleGroupOptions : The UpdateWafRuleGroup options.

func (*UpdateWafRuleGroupOptions) SetGroupID

func (options *UpdateWafRuleGroupOptions) SetGroupID(groupID string) *UpdateWafRuleGroupOptions

SetGroupID : Allow user to set GroupID

func (*UpdateWafRuleGroupOptions) SetHeaders

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

SetHeaders : Allow user to set Headers

func (*UpdateWafRuleGroupOptions) SetMode

SetMode : Allow user to set Mode

func (*UpdateWafRuleGroupOptions) SetPkgID

SetPkgID : Allow user to set PkgID

type WafGroupResponse

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

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

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

	// waf rule properties.
	Result *WafRuleProperties `json:"result" validate:"required"`

	// Statistics of results.
	ResultInfo *WafGroupResponseResultInfo `json:"result_info" validate:"required"`
}

WafGroupResponse : waf group response.

type WafGroupResponseResultInfo

type WafGroupResponseResultInfo struct {
	// Page number.
	Page *int64 `json:"page" validate:"required"`

	// Number of results per page.
	PerPage *int64 `json:"per_page" validate:"required"`

	// Number of results.
	Count *int64 `json:"count" validate:"required"`

	// Total number of results.
	TotalCount *int64 `json:"total_count" validate:"required"`
}

WafGroupResponseResultInfo : Statistics of results.

type WafGroupsResponse

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

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

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

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

	// Statistics of results.
	ResultInfo *WafGroupsResponseResultInfo `json:"result_info" validate:"required"`
}

WafGroupsResponse : waf groups response.

type WafGroupsResponseResultInfo

type WafGroupsResponseResultInfo struct {
	// Page number.
	Page *int64 `json:"page" validate:"required"`

	// Number of results per page.
	PerPage *int64 `json:"per_page" validate:"required"`

	// Number of results.
	Count *int64 `json:"count" validate:"required"`

	// Total number of results.
	TotalCount *int64 `json:"total_count" validate:"required"`
}

WafGroupsResponseResultInfo : Statistics of results.

type WafRuleGroupsApiV1

type WafRuleGroupsApiV1 struct {
	Service *core.BaseService

	// cloud resource name.
	Crn *string

	// Zone ID.
	ZoneID *string
}

WafRuleGroupsApiV1 : This document describes CIS WAF Rule Groups API.

Version: 1.0.0

func NewWafRuleGroupsApiV1

func NewWafRuleGroupsApiV1(options *WafRuleGroupsApiV1Options) (service *WafRuleGroupsApiV1, err error)

NewWafRuleGroupsApiV1 : constructs an instance of WafRuleGroupsApiV1 with passed in options.

func NewWafRuleGroupsApiV1UsingExternalConfig

func NewWafRuleGroupsApiV1UsingExternalConfig(options *WafRuleGroupsApiV1Options) (wafRuleGroupsApi *WafRuleGroupsApiV1, err error)

NewWafRuleGroupsApiV1UsingExternalConfig : constructs an instance of WafRuleGroupsApiV1 with passed in options and external configuration.

func (*WafRuleGroupsApiV1) Clone added in v0.12.1

func (wafRuleGroupsApi *WafRuleGroupsApiV1) Clone() *WafRuleGroupsApiV1

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

func (*WafRuleGroupsApiV1) DisableRetries added in v0.12.1

func (wafRuleGroupsApi *WafRuleGroupsApiV1) DisableRetries()

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

func (*WafRuleGroupsApiV1) EnableRetries added in v0.12.1

func (wafRuleGroupsApi *WafRuleGroupsApiV1) 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 (*WafRuleGroupsApiV1) GetEnableGzipCompression added in v0.12.1

func (wafRuleGroupsApi *WafRuleGroupsApiV1) GetEnableGzipCompression() bool

GetEnableGzipCompression returns the service's EnableGzipCompression field

func (*WafRuleGroupsApiV1) GetServiceURL added in v0.12.1

func (wafRuleGroupsApi *WafRuleGroupsApiV1) GetServiceURL() string

GetServiceURL returns the service URL

func (*WafRuleGroupsApiV1) GetWafRuleGroup

func (wafRuleGroupsApi *WafRuleGroupsApiV1) GetWafRuleGroup(getWafRuleGroupOptions *GetWafRuleGroupOptions) (result *WafGroupResponse, response *core.DetailedResponse, err error)

GetWafRuleGroup : Get WAF rule group Get a single WAF rule group.

func (*WafRuleGroupsApiV1) GetWafRuleGroupWithContext added in v0.12.1

func (wafRuleGroupsApi *WafRuleGroupsApiV1) GetWafRuleGroupWithContext(ctx context.Context, getWafRuleGroupOptions *GetWafRuleGroupOptions) (result *WafGroupResponse, response *core.DetailedResponse, err error)

GetWafRuleGroupWithContext is an alternate form of the GetWafRuleGroup method which supports a Context parameter

func (*WafRuleGroupsApiV1) ListWafRuleGroups

func (wafRuleGroupsApi *WafRuleGroupsApiV1) ListWafRuleGroups(listWafRuleGroupsOptions *ListWafRuleGroupsOptions) (result *WafGroupsResponse, response *core.DetailedResponse, err error)

ListWafRuleGroups : List all WAF rule groups List all WAF rule groups contained within a package.

func (*WafRuleGroupsApiV1) ListWafRuleGroupsWithContext added in v0.12.1

func (wafRuleGroupsApi *WafRuleGroupsApiV1) ListWafRuleGroupsWithContext(ctx context.Context, listWafRuleGroupsOptions *ListWafRuleGroupsOptions) (result *WafGroupsResponse, response *core.DetailedResponse, err error)

ListWafRuleGroupsWithContext is an alternate form of the ListWafRuleGroups method which supports a Context parameter

func (*WafRuleGroupsApiV1) NewGetWafRuleGroupOptions

func (*WafRuleGroupsApiV1) NewGetWafRuleGroupOptions(pkgID string, groupID string) *GetWafRuleGroupOptions

NewGetWafRuleGroupOptions : Instantiate GetWafRuleGroupOptions

func (*WafRuleGroupsApiV1) NewListWafRuleGroupsOptions

func (*WafRuleGroupsApiV1) NewListWafRuleGroupsOptions(pkgID string) *ListWafRuleGroupsOptions

NewListWafRuleGroupsOptions : Instantiate ListWafRuleGroupsOptions

func (*WafRuleGroupsApiV1) NewUpdateWafRuleGroupOptions

func (*WafRuleGroupsApiV1) NewUpdateWafRuleGroupOptions(pkgID string, groupID string) *UpdateWafRuleGroupOptions

NewUpdateWafRuleGroupOptions : Instantiate UpdateWafRuleGroupOptions

func (*WafRuleGroupsApiV1) SetDefaultHeaders added in v0.12.1

func (wafRuleGroupsApi *WafRuleGroupsApiV1) SetDefaultHeaders(headers http.Header)

SetDefaultHeaders sets HTTP headers to be sent in every request

func (*WafRuleGroupsApiV1) SetEnableGzipCompression added in v0.12.1

func (wafRuleGroupsApi *WafRuleGroupsApiV1) SetEnableGzipCompression(enableGzip bool)

SetEnableGzipCompression sets the service's EnableGzipCompression field

func (*WafRuleGroupsApiV1) SetServiceURL

func (wafRuleGroupsApi *WafRuleGroupsApiV1) SetServiceURL(url string) error

SetServiceURL sets the service URL

func (*WafRuleGroupsApiV1) UpdateWafRuleGroup

func (wafRuleGroupsApi *WafRuleGroupsApiV1) UpdateWafRuleGroup(updateWafRuleGroupOptions *UpdateWafRuleGroupOptions) (result *WafGroupResponse, response *core.DetailedResponse, err error)

UpdateWafRuleGroup : Update WAF rule group Update the state of a WAF rule group.

func (*WafRuleGroupsApiV1) UpdateWafRuleGroupWithContext added in v0.12.1

func (wafRuleGroupsApi *WafRuleGroupsApiV1) UpdateWafRuleGroupWithContext(ctx context.Context, updateWafRuleGroupOptions *UpdateWafRuleGroupOptions) (result *WafGroupResponse, response *core.DetailedResponse, err error)

UpdateWafRuleGroupWithContext is an alternate form of the UpdateWafRuleGroup method which supports a Context parameter

type WafRuleGroupsApiV1Options

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

	// cloud resource name.
	Crn *string `validate:"required"`

	// Zone ID.
	ZoneID *string `validate:"required"`
}

WafRuleGroupsApiV1Options : Service options

type WafRuleProperties

type WafRuleProperties struct {
	// ID.
	ID *string `json:"id,omitempty"`

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

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

	// Number of rules.
	RulesCount *int64 `json:"rules_count,omitempty"`

	// Number of modified rules.
	ModifiedRulesCount *int64 `json:"modified_rules_count,omitempty"`

	// Package ID.
	PackageID *string `json:"package_id,omitempty"`

	// Mode.
	Mode *string `json:"mode,omitempty"`

	// Allowed Modes.
	AllowedModes []string `json:"allowed_modes,omitempty"`
}

WafRuleProperties : waf rule properties.

Jump to

Keyboard shortcuts

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