Documentation ¶
Overview ¶
Package firewallapiv1 : Operations and models for the FirewallApiV1 service
Index ¶
- Constants
- func GetServiceURLForRegion(region string) (string, error)
- func UnmarshalResultInfo(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalSecurityLevelSettingResp(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalSecurityLevelSettingRespMessagesItem(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalSecurityLevelSettingRespResult(m map[string]json.RawMessage, result interface{}) (err error)
- type FirewallApiV1
- func (firewallApi *FirewallApiV1) Clone() *FirewallApiV1
- func (firewallApi *FirewallApiV1) DisableRetries()
- func (firewallApi *FirewallApiV1) EnableRetries(maxRetries int, maxRetryInterval time.Duration)
- func (firewallApi *FirewallApiV1) GetEnableGzipCompression() bool
- func (firewallApi *FirewallApiV1) GetSecurityLevelSetting(getSecurityLevelSettingOptions *GetSecurityLevelSettingOptions) (result *SecurityLevelSettingResp, response *core.DetailedResponse, err error)
- func (firewallApi *FirewallApiV1) GetSecurityLevelSettingWithContext(ctx context.Context, ...) (result *SecurityLevelSettingResp, response *core.DetailedResponse, err error)
- func (firewallApi *FirewallApiV1) GetServiceURL() string
- func (*FirewallApiV1) NewGetSecurityLevelSettingOptions() *GetSecurityLevelSettingOptions
- func (*FirewallApiV1) NewSetSecurityLevelSettingOptions() *SetSecurityLevelSettingOptions
- func (firewallApi *FirewallApiV1) SetDefaultHeaders(headers http.Header)
- func (firewallApi *FirewallApiV1) SetEnableGzipCompression(enableGzip bool)
- func (firewallApi *FirewallApiV1) SetSecurityLevelSetting(setSecurityLevelSettingOptions *SetSecurityLevelSettingOptions) (result *SecurityLevelSettingResp, response *core.DetailedResponse, err error)
- func (firewallApi *FirewallApiV1) SetSecurityLevelSettingWithContext(ctx context.Context, ...) (result *SecurityLevelSettingResp, response *core.DetailedResponse, err error)
- func (firewallApi *FirewallApiV1) SetServiceURL(url string) error
- type FirewallApiV1Options
- type GetSecurityLevelSettingOptions
- type ResultInfo
- type SecurityLevelSettingResp
- type SecurityLevelSettingRespMessagesItem
- type SecurityLevelSettingRespResult
- type SetSecurityLevelSettingOptions
Constants ¶
const ( SetSecurityLevelSettingOptions_Value_EssentiallyOff = "essentially_off" SetSecurityLevelSettingOptions_Value_High = "high" SetSecurityLevelSettingOptions_Value_Low = "low" SetSecurityLevelSettingOptions_Value_Medium = "medium" SetSecurityLevelSettingOptions_Value_UnderAttack = "under_attack" )
Constants associated with the SetSecurityLevelSettingOptions.Value property. security level.
const DefaultServiceName = "firewall_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.
const (
SecurityLevelSettingRespResult_ID_SecurityLevel = "security_level"
)
Constants associated with the SecurityLevelSettingRespResult.ID property. identifier.
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 UnmarshalResultInfo ¶
func UnmarshalResultInfo(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalResultInfo unmarshals an instance of ResultInfo from the specified map of raw messages.
func UnmarshalSecurityLevelSettingResp ¶
func UnmarshalSecurityLevelSettingResp(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalSecurityLevelSettingResp unmarshals an instance of SecurityLevelSettingResp from the specified map of raw messages.
func UnmarshalSecurityLevelSettingRespMessagesItem ¶
func UnmarshalSecurityLevelSettingRespMessagesItem(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalSecurityLevelSettingRespMessagesItem unmarshals an instance of SecurityLevelSettingRespMessagesItem from the specified map of raw messages.
func UnmarshalSecurityLevelSettingRespResult ¶
func UnmarshalSecurityLevelSettingRespResult(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalSecurityLevelSettingRespResult unmarshals an instance of SecurityLevelSettingRespResult from the specified map of raw messages.
Types ¶
type FirewallApiV1 ¶
type FirewallApiV1 struct { Service *core.BaseService // cloud resource name. Crn *string // zone identifier. ZoneIdentifier *string }
FirewallApiV1 : Firewall API
Version: 1.0.0
func NewFirewallApiV1 ¶
func NewFirewallApiV1(options *FirewallApiV1Options) (service *FirewallApiV1, err error)
NewFirewallApiV1 : constructs an instance of FirewallApiV1 with passed in options.
func NewFirewallApiV1UsingExternalConfig ¶
func NewFirewallApiV1UsingExternalConfig(options *FirewallApiV1Options) (firewallApi *FirewallApiV1, err error)
NewFirewallApiV1UsingExternalConfig : constructs an instance of FirewallApiV1 with passed in options and external configuration.
func (*FirewallApiV1) Clone ¶ added in v0.12.1
func (firewallApi *FirewallApiV1) Clone() *FirewallApiV1
Clone makes a copy of "firewallApi" suitable for processing requests.
func (*FirewallApiV1) DisableRetries ¶ added in v0.12.1
func (firewallApi *FirewallApiV1) DisableRetries()
DisableRetries disables automatic retries for requests invoked for this service instance.
func (*FirewallApiV1) EnableRetries ¶ added in v0.12.1
func (firewallApi *FirewallApiV1) 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 (*FirewallApiV1) GetEnableGzipCompression ¶ added in v0.12.1
func (firewallApi *FirewallApiV1) GetEnableGzipCompression() bool
GetEnableGzipCompression returns the service's EnableGzipCompression field
func (*FirewallApiV1) GetSecurityLevelSetting ¶
func (firewallApi *FirewallApiV1) GetSecurityLevelSetting(getSecurityLevelSettingOptions *GetSecurityLevelSettingOptions) (result *SecurityLevelSettingResp, response *core.DetailedResponse, err error)
GetSecurityLevelSetting : Get security level setting For a given zone identifier, get security level setting.
func (*FirewallApiV1) GetSecurityLevelSettingWithContext ¶ added in v0.12.1
func (firewallApi *FirewallApiV1) GetSecurityLevelSettingWithContext(ctx context.Context, getSecurityLevelSettingOptions *GetSecurityLevelSettingOptions) (result *SecurityLevelSettingResp, response *core.DetailedResponse, err error)
GetSecurityLevelSettingWithContext is an alternate form of the GetSecurityLevelSetting method which supports a Context parameter
func (*FirewallApiV1) GetServiceURL ¶ added in v0.12.1
func (firewallApi *FirewallApiV1) GetServiceURL() string
GetServiceURL returns the service URL
func (*FirewallApiV1) NewGetSecurityLevelSettingOptions ¶
func (*FirewallApiV1) NewGetSecurityLevelSettingOptions() *GetSecurityLevelSettingOptions
NewGetSecurityLevelSettingOptions : Instantiate GetSecurityLevelSettingOptions
func (*FirewallApiV1) NewSetSecurityLevelSettingOptions ¶
func (*FirewallApiV1) NewSetSecurityLevelSettingOptions() *SetSecurityLevelSettingOptions
NewSetSecurityLevelSettingOptions : Instantiate SetSecurityLevelSettingOptions
func (*FirewallApiV1) SetDefaultHeaders ¶ added in v0.12.1
func (firewallApi *FirewallApiV1) SetDefaultHeaders(headers http.Header)
SetDefaultHeaders sets HTTP headers to be sent in every request
func (*FirewallApiV1) SetEnableGzipCompression ¶ added in v0.12.1
func (firewallApi *FirewallApiV1) SetEnableGzipCompression(enableGzip bool)
SetEnableGzipCompression sets the service's EnableGzipCompression field
func (*FirewallApiV1) SetSecurityLevelSetting ¶
func (firewallApi *FirewallApiV1) SetSecurityLevelSetting(setSecurityLevelSettingOptions *SetSecurityLevelSettingOptions) (result *SecurityLevelSettingResp, response *core.DetailedResponse, err error)
SetSecurityLevelSetting : Set security level setting For a given zone identifier, set security level setting.
func (*FirewallApiV1) SetSecurityLevelSettingWithContext ¶ added in v0.12.1
func (firewallApi *FirewallApiV1) SetSecurityLevelSettingWithContext(ctx context.Context, setSecurityLevelSettingOptions *SetSecurityLevelSettingOptions) (result *SecurityLevelSettingResp, response *core.DetailedResponse, err error)
SetSecurityLevelSettingWithContext is an alternate form of the SetSecurityLevelSetting method which supports a Context parameter
func (*FirewallApiV1) SetServiceURL ¶
func (firewallApi *FirewallApiV1) SetServiceURL(url string) error
SetServiceURL sets the service URL
type FirewallApiV1Options ¶
type FirewallApiV1Options struct { ServiceName string URL string Authenticator core.Authenticator // cloud resource name. Crn *string `validate:"required"` // zone identifier. ZoneIdentifier *string `validate:"required"` }
FirewallApiV1Options : Service options
type GetSecurityLevelSettingOptions ¶
type GetSecurityLevelSettingOptions struct { // Allows users to set headers on API requests Headers map[string]string }
GetSecurityLevelSettingOptions : The GetSecurityLevelSetting options.
func (*GetSecurityLevelSettingOptions) SetHeaders ¶
func (options *GetSecurityLevelSettingOptions) SetHeaders(param map[string]string) *GetSecurityLevelSettingOptions
SetHeaders : Allow user to set Headers
type ResultInfo ¶
type ResultInfo struct { // output pages. Page *int64 `json:"page" validate:"required"` // output per page. PerPage *int64 `json:"per_page" validate:"required"` // firewall hit count. Count *int64 `json:"count" validate:"required"` // total count. TotalCount *int64 `json:"total_count" validate:"required"` }
ResultInfo : result information.
type SecurityLevelSettingResp ¶
type SecurityLevelSettingResp struct { // result object. Result *SecurityLevelSettingRespResult `json:"result" validate:"required"` // result information. ResultInfo *ResultInfo `json:"result_info" validate:"required"` // success response. Success *bool `json:"success" validate:"required"` // array of errors. Errors [][]string `json:"errors" validate:"required"` // array of messages. Messages []SecurityLevelSettingRespMessagesItem `json:"messages" validate:"required"` }
SecurityLevelSettingResp : security level setting response.
type SecurityLevelSettingRespMessagesItem ¶
type SecurityLevelSettingRespMessagesItem struct { // messages. Status *string `json:"status,omitempty"` }
SecurityLevelSettingRespMessagesItem : SecurityLevelSettingRespMessagesItem struct
type SecurityLevelSettingRespResult ¶
type SecurityLevelSettingRespResult struct { // identifier. ID *string `json:"id" validate:"required"` // value. Value *string `json:"value" validate:"required"` // editable. Editable *bool `json:"editable" validate:"required"` // modified date. ModifiedOn *string `json:"modified_on" validate:"required"` }
SecurityLevelSettingRespResult : result object.
type SetSecurityLevelSettingOptions ¶
type SetSecurityLevelSettingOptions struct { // security level. Value *string `json:"value,omitempty"` // Allows users to set headers on API requests Headers map[string]string }
SetSecurityLevelSettingOptions : The SetSecurityLevelSetting options.
func (*SetSecurityLevelSettingOptions) SetHeaders ¶
func (options *SetSecurityLevelSettingOptions) SetHeaders(param map[string]string) *SetSecurityLevelSettingOptions
SetHeaders : Allow user to set Headers
func (*SetSecurityLevelSettingOptions) SetValue ¶
func (options *SetSecurityLevelSettingOptions) SetValue(value string) *SetSecurityLevelSettingOptions
SetValue : Allow user to set Value