Documentation ¶
Overview ¶
Package wafrulepackagesapiv1 : Operations and models for the WafRulePackagesApiV1 service
Index ¶
- Constants
- func GetServiceURLForRegion(region string) (string, error)
- func UnmarshalWafPackageResponse(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalWafPackageResponseResult(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalWafPackagesResponse(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalWafPackagesResponseResultInfo(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalWafPackagesResponseResultItem(m map[string]json.RawMessage, result interface{}) (err error)
- type GetWafPackageOptions
- type ListWafPackagesOptions
- func (options *ListWafPackagesOptions) SetDirection(direction string) *ListWafPackagesOptions
- func (options *ListWafPackagesOptions) SetHeaders(param map[string]string) *ListWafPackagesOptions
- func (options *ListWafPackagesOptions) SetMatch(match string) *ListWafPackagesOptions
- func (options *ListWafPackagesOptions) SetName(name string) *ListWafPackagesOptions
- func (options *ListWafPackagesOptions) SetOrder(order string) *ListWafPackagesOptions
- func (options *ListWafPackagesOptions) SetPage(page int64) *ListWafPackagesOptions
- func (options *ListWafPackagesOptions) SetPerPage(perPage int64) *ListWafPackagesOptions
- type UpdateWafPackageOptions
- func (options *UpdateWafPackageOptions) SetActionMode(actionMode string) *UpdateWafPackageOptions
- func (options *UpdateWafPackageOptions) SetHeaders(param map[string]string) *UpdateWafPackageOptions
- func (options *UpdateWafPackageOptions) SetPackageID(packageID string) *UpdateWafPackageOptions
- func (options *UpdateWafPackageOptions) SetSensitivity(sensitivity string) *UpdateWafPackageOptions
- type WafPackageResponse
- type WafPackageResponseResult
- type WafPackagesResponse
- type WafPackagesResponseResultInfo
- type WafPackagesResponseResultItem
- type WafRulePackagesApiV1
- func (wafRulePackagesApi *WafRulePackagesApiV1) Clone() *WafRulePackagesApiV1
- func (wafRulePackagesApi *WafRulePackagesApiV1) DisableRetries()
- func (wafRulePackagesApi *WafRulePackagesApiV1) EnableRetries(maxRetries int, maxRetryInterval time.Duration)
- func (wafRulePackagesApi *WafRulePackagesApiV1) GetEnableGzipCompression() bool
- func (wafRulePackagesApi *WafRulePackagesApiV1) GetServiceURL() string
- func (wafRulePackagesApi *WafRulePackagesApiV1) GetWafPackage(getWafPackageOptions *GetWafPackageOptions) (result *WafPackageResponse, response *core.DetailedResponse, err error)
- func (wafRulePackagesApi *WafRulePackagesApiV1) GetWafPackageWithContext(ctx context.Context, getWafPackageOptions *GetWafPackageOptions) (result *WafPackageResponse, response *core.DetailedResponse, err error)
- func (wafRulePackagesApi *WafRulePackagesApiV1) ListWafPackages(listWafPackagesOptions *ListWafPackagesOptions) (result *WafPackagesResponse, response *core.DetailedResponse, err error)
- func (wafRulePackagesApi *WafRulePackagesApiV1) ListWafPackagesWithContext(ctx context.Context, listWafPackagesOptions *ListWafPackagesOptions) (result *WafPackagesResponse, response *core.DetailedResponse, err error)
- func (*WafRulePackagesApiV1) NewGetWafPackageOptions(packageID string) *GetWafPackageOptions
- func (*WafRulePackagesApiV1) NewListWafPackagesOptions() *ListWafPackagesOptions
- func (*WafRulePackagesApiV1) NewUpdateWafPackageOptions(packageID string) *UpdateWafPackageOptions
- func (wafRulePackagesApi *WafRulePackagesApiV1) SetDefaultHeaders(headers http.Header)
- func (wafRulePackagesApi *WafRulePackagesApiV1) SetEnableGzipCompression(enableGzip bool)
- func (wafRulePackagesApi *WafRulePackagesApiV1) SetServiceURL(url string) error
- func (wafRulePackagesApi *WafRulePackagesApiV1) UpdateWafPackage(updateWafPackageOptions *UpdateWafPackageOptions) (result *WafPackageResponse, response *core.DetailedResponse, err error)
- func (wafRulePackagesApi *WafRulePackagesApiV1) UpdateWafPackageWithContext(ctx context.Context, updateWafPackageOptions *UpdateWafPackageOptions) (result *WafPackageResponse, response *core.DetailedResponse, err error)
- type WafRulePackagesApiV1Options
Constants ¶
const ( ListWafPackagesOptions_Direction_Asc = "asc" ListWafPackagesOptions_Direction_Desc = "desc" )
Constants associated with the ListWafPackagesOptions.Direction property. Direction to order packages.
const ( ListWafPackagesOptions_Match_All = "all" ListWafPackagesOptions_Match_Any = "any" )
Constants associated with the ListWafPackagesOptions.Match property. Whether to match all search requirements or at least one (any).
const ( UpdateWafPackageOptions_Sensitivity_High = "high" UpdateWafPackageOptions_Sensitivity_Low = "low" UpdateWafPackageOptions_Sensitivity_Medium = "medium" UpdateWafPackageOptions_Sensitivity_Off = "off" )
Constants associated with the UpdateWafPackageOptions.Sensitivity property. The sensitivity of the firewall package.
const ( UpdateWafPackageOptions_ActionMode_Block = "block" UpdateWafPackageOptions_ActionMode_Challenge = "challenge" UpdateWafPackageOptions_ActionMode_Simulate = "simulate" )
Constants associated with the UpdateWafPackageOptions.ActionMode property. The default action that will be taken for rules under the firewall package.
const DefaultServiceName = "waf_rule_packages_api"
DefaultServiceName is the default key used to find external configuration information.
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
GetServiceURLForRegion returns the service URL to be used for the specified region
func UnmarshalWafPackageResponse ¶
func UnmarshalWafPackageResponse(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalWafPackageResponse unmarshals an instance of WafPackageResponse from the specified map of raw messages.
func UnmarshalWafPackageResponseResult ¶
func UnmarshalWafPackageResponseResult(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalWafPackageResponseResult unmarshals an instance of WafPackageResponseResult from the specified map of raw messages.
func UnmarshalWafPackagesResponse ¶
func UnmarshalWafPackagesResponse(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalWafPackagesResponse unmarshals an instance of WafPackagesResponse from the specified map of raw messages.
func UnmarshalWafPackagesResponseResultInfo ¶
func UnmarshalWafPackagesResponseResultInfo(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalWafPackagesResponseResultInfo unmarshals an instance of WafPackagesResponseResultInfo from the specified map of raw messages.
func UnmarshalWafPackagesResponseResultItem ¶
func UnmarshalWafPackagesResponseResultItem(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalWafPackagesResponseResultItem unmarshals an instance of WafPackagesResponseResultItem from the specified map of raw messages.
Types ¶
type GetWafPackageOptions ¶
type GetWafPackageOptions struct { // Package ID. PackageID *string `json:"package_id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string }
GetWafPackageOptions : The GetWafPackage options.
func (*GetWafPackageOptions) SetHeaders ¶
func (options *GetWafPackageOptions) SetHeaders(param map[string]string) *GetWafPackageOptions
SetHeaders : Allow user to set Headers
func (*GetWafPackageOptions) SetPackageID ¶
func (options *GetWafPackageOptions) SetPackageID(packageID string) *GetWafPackageOptions
SetPackageID : Allow user to set PackageID
type ListWafPackagesOptions ¶
type ListWafPackagesOptions struct { // Name of the firewall package. Name *string `json:"name,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 }
ListWafPackagesOptions : The ListWafPackages options.
func (*ListWafPackagesOptions) SetDirection ¶
func (options *ListWafPackagesOptions) SetDirection(direction string) *ListWafPackagesOptions
SetDirection : Allow user to set Direction
func (*ListWafPackagesOptions) SetHeaders ¶
func (options *ListWafPackagesOptions) SetHeaders(param map[string]string) *ListWafPackagesOptions
SetHeaders : Allow user to set Headers
func (*ListWafPackagesOptions) SetMatch ¶
func (options *ListWafPackagesOptions) SetMatch(match string) *ListWafPackagesOptions
SetMatch : Allow user to set Match
func (*ListWafPackagesOptions) SetName ¶
func (options *ListWafPackagesOptions) SetName(name string) *ListWafPackagesOptions
SetName : Allow user to set Name
func (*ListWafPackagesOptions) SetOrder ¶
func (options *ListWafPackagesOptions) SetOrder(order string) *ListWafPackagesOptions
SetOrder : Allow user to set Order
func (*ListWafPackagesOptions) SetPage ¶
func (options *ListWafPackagesOptions) SetPage(page int64) *ListWafPackagesOptions
SetPage : Allow user to set Page
func (*ListWafPackagesOptions) SetPerPage ¶
func (options *ListWafPackagesOptions) SetPerPage(perPage int64) *ListWafPackagesOptions
SetPerPage : Allow user to set PerPage
type UpdateWafPackageOptions ¶
type UpdateWafPackageOptions struct { // Package ID. PackageID *string `json:"package_id" validate:"required,ne="` // The sensitivity of the firewall package. Sensitivity *string `json:"sensitivity,omitempty"` // The default action that will be taken for rules under the firewall package. ActionMode *string `json:"action_mode,omitempty"` // Allows users to set headers on API requests Headers map[string]string }
UpdateWafPackageOptions : The UpdateWafPackage options.
func (*UpdateWafPackageOptions) SetActionMode ¶
func (options *UpdateWafPackageOptions) SetActionMode(actionMode string) *UpdateWafPackageOptions
SetActionMode : Allow user to set ActionMode
func (*UpdateWafPackageOptions) SetHeaders ¶
func (options *UpdateWafPackageOptions) SetHeaders(param map[string]string) *UpdateWafPackageOptions
SetHeaders : Allow user to set Headers
func (*UpdateWafPackageOptions) SetPackageID ¶
func (options *UpdateWafPackageOptions) SetPackageID(packageID string) *UpdateWafPackageOptions
SetPackageID : Allow user to set PackageID
func (*UpdateWafPackageOptions) SetSensitivity ¶
func (options *UpdateWafPackageOptions) SetSensitivity(sensitivity string) *UpdateWafPackageOptions
SetSensitivity : Allow user to set Sensitivity
type WafPackageResponse ¶
type WafPackageResponse 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 *WafPackageResponseResult `json:"result" validate:"required"` }
WafPackageResponse : waf package response.
type WafPackageResponseResult ¶
type WafPackageResponseResult struct { // ID. ID *string `json:"id,omitempty"` // Name. Name *string `json:"name,omitempty"` // Description. Description *string `json:"description,omitempty"` // Detection mode. DetectionMode *string `json:"detection_mode,omitempty"` // Value. ZoneID *string `json:"zone_id,omitempty"` // Value. Status *string `json:"status,omitempty"` // Value. Sensitivity *string `json:"sensitivity,omitempty"` // Value. ActionMode *string `json:"action_mode,omitempty"` }
WafPackageResponseResult : Container for response information.
type WafPackagesResponse ¶
type WafPackagesResponse 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 []WafPackagesResponseResultItem `json:"result" validate:"required"` // Statistics of results. ResultInfo *WafPackagesResponseResultInfo `json:"result_info" validate:"required"` }
WafPackagesResponse : waf packages response.
type WafPackagesResponseResultInfo ¶
type WafPackagesResponseResultInfo 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"` }
WafPackagesResponseResultInfo : Statistics of results.
type WafPackagesResponseResultItem ¶
type WafPackagesResponseResultItem struct { // ID. ID *string `json:"id,omitempty"` // Name. Name *string `json:"name,omitempty"` // Description. Description *string `json:"description,omitempty"` // Detection mode. DetectionMode *string `json:"detection_mode,omitempty"` // Value. ZoneID *string `json:"zone_id,omitempty"` // Value. Status *string `json:"status,omitempty"` }
WafPackagesResponseResultItem : WafPackagesResponseResultItem struct
type WafRulePackagesApiV1 ¶
type WafRulePackagesApiV1 struct { Service *core.BaseService // Cloud resource name. Crn *string // Zone ID. ZoneID *string }
WafRulePackagesApiV1 : This document describes CIS WAF Rule Packages API.
Version: 1.0.1
func NewWafRulePackagesApiV1 ¶
func NewWafRulePackagesApiV1(options *WafRulePackagesApiV1Options) (service *WafRulePackagesApiV1, err error)
NewWafRulePackagesApiV1 : constructs an instance of WafRulePackagesApiV1 with passed in options.
func NewWafRulePackagesApiV1UsingExternalConfig ¶
func NewWafRulePackagesApiV1UsingExternalConfig(options *WafRulePackagesApiV1Options) (wafRulePackagesApi *WafRulePackagesApiV1, err error)
NewWafRulePackagesApiV1UsingExternalConfig : constructs an instance of WafRulePackagesApiV1 with passed in options and external configuration.
func (*WafRulePackagesApiV1) Clone ¶ added in v0.12.1
func (wafRulePackagesApi *WafRulePackagesApiV1) Clone() *WafRulePackagesApiV1
Clone makes a copy of "wafRulePackagesApi" suitable for processing requests.
func (*WafRulePackagesApiV1) DisableRetries ¶ added in v0.12.1
func (wafRulePackagesApi *WafRulePackagesApiV1) DisableRetries()
DisableRetries disables automatic retries for requests invoked for this service instance.
func (*WafRulePackagesApiV1) EnableRetries ¶ added in v0.12.1
func (wafRulePackagesApi *WafRulePackagesApiV1) 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 (*WafRulePackagesApiV1) GetEnableGzipCompression ¶ added in v0.12.1
func (wafRulePackagesApi *WafRulePackagesApiV1) GetEnableGzipCompression() bool
GetEnableGzipCompression returns the service's EnableGzipCompression field
func (*WafRulePackagesApiV1) GetServiceURL ¶ added in v0.12.1
func (wafRulePackagesApi *WafRulePackagesApiV1) GetServiceURL() string
GetServiceURL returns the service URL
func (*WafRulePackagesApiV1) GetWafPackage ¶
func (wafRulePackagesApi *WafRulePackagesApiV1) GetWafPackage(getWafPackageOptions *GetWafPackageOptions) (result *WafPackageResponse, response *core.DetailedResponse, err error)
GetWafPackage : Get WAF rule package Get information about a single firewall package.
func (*WafRulePackagesApiV1) GetWafPackageWithContext ¶ added in v0.12.1
func (wafRulePackagesApi *WafRulePackagesApiV1) GetWafPackageWithContext(ctx context.Context, getWafPackageOptions *GetWafPackageOptions) (result *WafPackageResponse, response *core.DetailedResponse, err error)
GetWafPackageWithContext is an alternate form of the GetWafPackage method which supports a Context parameter
func (*WafRulePackagesApiV1) ListWafPackages ¶
func (wafRulePackagesApi *WafRulePackagesApiV1) ListWafPackages(listWafPackagesOptions *ListWafPackagesOptions) (result *WafPackagesResponse, response *core.DetailedResponse, err error)
ListWafPackages : List all WAF rule packages Get firewall packages for a zone.
func (*WafRulePackagesApiV1) ListWafPackagesWithContext ¶ added in v0.12.1
func (wafRulePackagesApi *WafRulePackagesApiV1) ListWafPackagesWithContext(ctx context.Context, listWafPackagesOptions *ListWafPackagesOptions) (result *WafPackagesResponse, response *core.DetailedResponse, err error)
ListWafPackagesWithContext is an alternate form of the ListWafPackages method which supports a Context parameter
func (*WafRulePackagesApiV1) NewGetWafPackageOptions ¶
func (*WafRulePackagesApiV1) NewGetWafPackageOptions(packageID string) *GetWafPackageOptions
NewGetWafPackageOptions : Instantiate GetWafPackageOptions
func (*WafRulePackagesApiV1) NewListWafPackagesOptions ¶
func (*WafRulePackagesApiV1) NewListWafPackagesOptions() *ListWafPackagesOptions
NewListWafPackagesOptions : Instantiate ListWafPackagesOptions
func (*WafRulePackagesApiV1) NewUpdateWafPackageOptions ¶
func (*WafRulePackagesApiV1) NewUpdateWafPackageOptions(packageID string) *UpdateWafPackageOptions
NewUpdateWafPackageOptions : Instantiate UpdateWafPackageOptions
func (*WafRulePackagesApiV1) SetDefaultHeaders ¶ added in v0.12.1
func (wafRulePackagesApi *WafRulePackagesApiV1) SetDefaultHeaders(headers http.Header)
SetDefaultHeaders sets HTTP headers to be sent in every request
func (*WafRulePackagesApiV1) SetEnableGzipCompression ¶ added in v0.12.1
func (wafRulePackagesApi *WafRulePackagesApiV1) SetEnableGzipCompression(enableGzip bool)
SetEnableGzipCompression sets the service's EnableGzipCompression field
func (*WafRulePackagesApiV1) SetServiceURL ¶
func (wafRulePackagesApi *WafRulePackagesApiV1) SetServiceURL(url string) error
SetServiceURL sets the service URL
func (*WafRulePackagesApiV1) UpdateWafPackage ¶
func (wafRulePackagesApi *WafRulePackagesApiV1) UpdateWafPackage(updateWafPackageOptions *UpdateWafPackageOptions) (result *WafPackageResponse, response *core.DetailedResponse, err error)
UpdateWafPackage : Change WAF rule package package Change the sensitivity and action for an anomaly detection type WAF rule package.
func (*WafRulePackagesApiV1) UpdateWafPackageWithContext ¶ added in v0.12.1
func (wafRulePackagesApi *WafRulePackagesApiV1) UpdateWafPackageWithContext(ctx context.Context, updateWafPackageOptions *UpdateWafPackageOptions) (result *WafPackageResponse, response *core.DetailedResponse, err error)
UpdateWafPackageWithContext is an alternate form of the UpdateWafPackage method which supports a Context parameter
type WafRulePackagesApiV1Options ¶
type WafRulePackagesApiV1Options struct { ServiceName string URL string Authenticator core.Authenticator // Cloud resource name. Crn *string `validate:"required"` // Zone ID. ZoneID *string `validate:"required"` }
WafRulePackagesApiV1Options : Service options