firewallaccessrulesv1

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package firewallaccessrulesv1 : Operations and models for the FirewallAccessRulesV1 service

Index

Constants

View Source
const (
	AccountAccessRuleInputConfiguration_Target_Asn     = "asn"
	AccountAccessRuleInputConfiguration_Target_Country = "country"
	AccountAccessRuleInputConfiguration_Target_Ip      = "ip"
	AccountAccessRuleInputConfiguration_Target_IpRange = "ip_range"
)

Constants associated with the AccountAccessRuleInputConfiguration.Target property. The request property to target.

View Source
const (
	AccountAccessRuleObjectConfiguration_Target_Asn     = "asn"
	AccountAccessRuleObjectConfiguration_Target_Country = "country"
	AccountAccessRuleObjectConfiguration_Target_Ip      = "ip"
	AccountAccessRuleObjectConfiguration_Target_IpRange = "ip_range"
)

Constants associated with the AccountAccessRuleObjectConfiguration.Target property. target ip address.

View Source
const (
	AccountAccessRuleObjectScope_Type_Account      = "account"
	AccountAccessRuleObjectScope_Type_Organization = "organization"
)

Constants associated with the AccountAccessRuleObjectScope.Type property. The scope of the access rule.

View Source
const (
	CreateAccountAccessRuleOptions_Mode_Block       = "block"
	CreateAccountAccessRuleOptions_Mode_Challenge   = "challenge"
	CreateAccountAccessRuleOptions_Mode_JsChallenge = "js_challenge"
	CreateAccountAccessRuleOptions_Mode_Whitelist   = "whitelist"
)

Constants associated with the CreateAccountAccessRuleOptions.Mode property. The action to apply to a matched request.

View Source
const (
	ListAllAccountAccessRulesOptions_Mode_Block       = "block"
	ListAllAccountAccessRulesOptions_Mode_Challenge   = "challenge"
	ListAllAccountAccessRulesOptions_Mode_JsChallenge = "js_challenge"
	ListAllAccountAccessRulesOptions_Mode_Whitelist   = "whitelist"
)

Constants associated with the ListAllAccountAccessRulesOptions.Mode property. Search access rules by mode.

View Source
const (
	ListAllAccountAccessRulesOptions_ConfigurationTarget_Asn     = "asn"
	ListAllAccountAccessRulesOptions_ConfigurationTarget_Country = "country"
	ListAllAccountAccessRulesOptions_ConfigurationTarget_Ip      = "ip"
	ListAllAccountAccessRulesOptions_ConfigurationTarget_IpRange = "ip_range"
)

Constants associated with the ListAllAccountAccessRulesOptions.ConfigurationTarget property. Search access rules by configuration target.

View Source
const (
	ListAllAccountAccessRulesOptions_Order_Mode   = "mode"
	ListAllAccountAccessRulesOptions_Order_Target = "target"
	ListAllAccountAccessRulesOptions_Order_Value  = "value"
)

Constants associated with the ListAllAccountAccessRulesOptions.Order property. Field by which to order list of access rules.

View Source
const (
	ListAllAccountAccessRulesOptions_Direction_Asc  = "asc"
	ListAllAccountAccessRulesOptions_Direction_Desc = "desc"
)

Constants associated with the ListAllAccountAccessRulesOptions.Direction property. Direction in which to order results [ascending/descending order].

View Source
const (
	ListAllAccountAccessRulesOptions_Match_All = "all"
	ListAllAccountAccessRulesOptions_Match_Any = "any"
)

Constants associated with the ListAllAccountAccessRulesOptions.Match property. Whether to match all (all) or atleast one search parameter (any).

View Source
const (
	UpdateAccountAccessRuleOptions_Mode_Block       = "block"
	UpdateAccountAccessRuleOptions_Mode_Challenge   = "challenge"
	UpdateAccountAccessRuleOptions_Mode_JsChallenge = "js_challenge"
	UpdateAccountAccessRuleOptions_Mode_Whitelist   = "whitelist"
)

Constants associated with the UpdateAccountAccessRuleOptions.Mode property. The action to apply to a matched request.

View Source
const (
	AccountAccessRuleObject_AllowedModes_Block       = "block"
	AccountAccessRuleObject_AllowedModes_Challenge   = "challenge"
	AccountAccessRuleObject_AllowedModes_JsChallenge = "js_challenge"
	AccountAccessRuleObject_AllowedModes_Whitelist   = "whitelist"
)

Constants associated with the AccountAccessRuleObject.AllowedModes property.

View Source
const (
	AccountAccessRuleObject_Mode_Block       = "block"
	AccountAccessRuleObject_Mode_Challenge   = "challenge"
	AccountAccessRuleObject_Mode_JsChallenge = "js_challenge"
	AccountAccessRuleObject_Mode_Whitelist   = "whitelist"
)

Constants associated with the AccountAccessRuleObject.Mode property. The action to be applied to a request matching the instance level access rule.

View Source
const DefaultServiceName = "firewall_access_rules"

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 UnmarshalAccountAccessRuleInputConfiguration

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

UnmarshalAccountAccessRuleInputConfiguration unmarshals an instance of AccountAccessRuleInputConfiguration from the specified map of raw messages.

func UnmarshalAccountAccessRuleObject

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

UnmarshalAccountAccessRuleObject unmarshals an instance of AccountAccessRuleObject from the specified map of raw messages.

func UnmarshalAccountAccessRuleObjectConfiguration

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

UnmarshalAccountAccessRuleObjectConfiguration unmarshals an instance of AccountAccessRuleObjectConfiguration from the specified map of raw messages.

func UnmarshalAccountAccessRuleObjectScope

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

UnmarshalAccountAccessRuleObjectScope unmarshals an instance of AccountAccessRuleObjectScope from the specified map of raw messages.

func UnmarshalAccountAccessRuleResp

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

UnmarshalAccountAccessRuleResp unmarshals an instance of AccountAccessRuleResp from the specified map of raw messages.

func UnmarshalDeleteAccountAccessRuleResp

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

UnmarshalDeleteAccountAccessRuleResp unmarshals an instance of DeleteAccountAccessRuleResp from the specified map of raw messages.

func UnmarshalDeleteAccountAccessRuleRespResult

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

UnmarshalDeleteAccountAccessRuleRespResult unmarshals an instance of DeleteAccountAccessRuleRespResult from the specified map of raw messages.

func UnmarshalListAccountAccessRulesResp

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

UnmarshalListAccountAccessRulesResp unmarshals an instance of ListAccountAccessRulesResp from the specified map of raw messages.

func UnmarshalListAccountAccessRulesRespResultInfo

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

UnmarshalListAccountAccessRulesRespResultInfo unmarshals an instance of ListAccountAccessRulesRespResultInfo from the specified map of raw messages.

Types

type AccountAccessRuleInputConfiguration

type AccountAccessRuleInputConfiguration struct {
	// The request property to target.
	Target *string `json:"target" validate:"required"`

	// The value for the selected target.For ip the value is a valid ip address.For ip_range the value specifies ip range
	// limited to /16 and /24. For asn the value is an AS number. For country the value is a country code for the country.
	Value *string `json:"value" validate:"required"`
}

AccountAccessRuleInputConfiguration : Configuration object specifying access rule.

type AccountAccessRuleObject

type AccountAccessRuleObject struct {
	// Identifier of the instance level firewall access rule.
	ID *string `json:"id" validate:"required"`

	// A personal note about the rule. Typically used as a reminder or explanation for the rule.
	Notes *string `json:"notes" validate:"required"`

	// List of modes that are allowed.
	AllowedModes []string `json:"allowed_modes" validate:"required"`

	// The action to be applied to a request matching the instance level access rule.
	Mode *string `json:"mode" validate:"required"`

	// The scope definition of the access rule.
	Scope *AccountAccessRuleObjectScope `json:"scope,omitempty"`

	// The creation date-time of the instance level firewall access rule.
	CreatedOn *strfmt.DateTime `json:"created_on" validate:"required"`

	// The modification date-time of the instance level firewall access rule.
	ModifiedOn *strfmt.DateTime `json:"modified_on" validate:"required"`

	// configuration.
	Configuration *AccountAccessRuleObjectConfiguration `json:"configuration" validate:"required"`
}

AccountAccessRuleObject : access rule objects.

type AccountAccessRuleObjectConfiguration

type AccountAccessRuleObjectConfiguration struct {
	// target ip address.
	Target *string `json:"target" validate:"required"`

	// Value for the given target. For ip the value is a valid ip address.For ip_range the value specifies ip range limited
	// to /16 and /24. For asn the value is an AS number. For country the value is a country code for the country.
	Value *string `json:"value" validate:"required"`
}

AccountAccessRuleObjectConfiguration : configuration.

type AccountAccessRuleObjectScope

type AccountAccessRuleObjectScope struct {
	// The scope of the access rule.
	Type *string `json:"type" validate:"required"`
}

AccountAccessRuleObjectScope : The scope definition of the access rule.

type AccountAccessRuleResp

type AccountAccessRuleResp struct {
	// Operation success flag.
	Success *bool `json:"success" validate:"required"`

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

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

	// access rule objects.
	Result *AccountAccessRuleObject `json:"result" validate:"required"`
}

AccountAccessRuleResp : access rule response output.

type CreateAccountAccessRuleOptions

type CreateAccountAccessRuleOptions struct {
	// The action to apply to a matched request.
	Mode *string `json:"mode,omitempty"`

	// A personal note about the rule. Typically used as a reminder or explanation for the rule.
	Notes *string `json:"notes,omitempty"`

	// Configuration object specifying access rule.
	Configuration *AccountAccessRuleInputConfiguration `json:"configuration,omitempty"`

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

CreateAccountAccessRuleOptions : The CreateAccountAccessRule options.

func (*CreateAccountAccessRuleOptions) SetConfiguration

SetConfiguration : Allow user to set Configuration

func (*CreateAccountAccessRuleOptions) SetHeaders

SetHeaders : Allow user to set Headers

func (*CreateAccountAccessRuleOptions) SetMode

SetMode : Allow user to set Mode

func (*CreateAccountAccessRuleOptions) SetNotes

SetNotes : Allow user to set Notes

type DeleteAccountAccessRuleOptions

type DeleteAccountAccessRuleOptions struct {
	// Identifier of the access rule to be deleted.
	AccessruleIdentifier *string `json:"accessrule_identifier" validate:"required"`

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

DeleteAccountAccessRuleOptions : The DeleteAccountAccessRule options.

func (*DeleteAccountAccessRuleOptions) SetAccessruleIdentifier

func (options *DeleteAccountAccessRuleOptions) SetAccessruleIdentifier(accessruleIdentifier string) *DeleteAccountAccessRuleOptions

SetAccessruleIdentifier : Allow user to set AccessruleIdentifier

func (*DeleteAccountAccessRuleOptions) SetHeaders

SetHeaders : Allow user to set Headers

type DeleteAccountAccessRuleResp

type DeleteAccountAccessRuleResp struct {
	// Operation success flag.
	Success *bool `json:"success" validate:"required"`

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

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

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

DeleteAccountAccessRuleResp : delete access rule response.

type DeleteAccountAccessRuleRespResult

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

DeleteAccountAccessRuleRespResult : Container for response information.

type FirewallAccessRulesV1

type FirewallAccessRulesV1 struct {
	Service *core.BaseService

	// Full crn of the service instance.
	Crn *string
}

FirewallAccessRulesV1 : Instance Level Firewall Access Rules

Version: 1.0.1

func NewFirewallAccessRulesV1

func NewFirewallAccessRulesV1(options *FirewallAccessRulesV1Options) (service *FirewallAccessRulesV1, err error)

NewFirewallAccessRulesV1 : constructs an instance of FirewallAccessRulesV1 with passed in options.

func NewFirewallAccessRulesV1UsingExternalConfig

func NewFirewallAccessRulesV1UsingExternalConfig(options *FirewallAccessRulesV1Options) (firewallAccessRules *FirewallAccessRulesV1, err error)

NewFirewallAccessRulesV1UsingExternalConfig : constructs an instance of FirewallAccessRulesV1 with passed in options and external configuration.

func (*FirewallAccessRulesV1) CreateAccountAccessRule

func (firewallAccessRules *FirewallAccessRulesV1) CreateAccountAccessRule(createAccountAccessRuleOptions *CreateAccountAccessRuleOptions) (result *AccountAccessRuleResp, response *core.DetailedResponse, err error)

CreateAccountAccessRule : Create an instance level firewall access rule Create a new instance level firewall access rule for a given service instance.

func (*FirewallAccessRulesV1) DeleteAccountAccessRule

func (firewallAccessRules *FirewallAccessRulesV1) DeleteAccountAccessRule(deleteAccountAccessRuleOptions *DeleteAccountAccessRuleOptions) (result *DeleteAccountAccessRuleResp, response *core.DetailedResponse, err error)

DeleteAccountAccessRule : Delete an instance level access rule Delete an instance level access rule given its id.

func (*FirewallAccessRulesV1) GetAccountAccessRule

func (firewallAccessRules *FirewallAccessRulesV1) GetAccountAccessRule(getAccountAccessRuleOptions *GetAccountAccessRuleOptions) (result *AccountAccessRuleResp, response *core.DetailedResponse, err error)

GetAccountAccessRule : Get the details of an instance level Get the details of an instance level firewall access rule for a given service instance.

func (*FirewallAccessRulesV1) ListAllAccountAccessRules

func (firewallAccessRules *FirewallAccessRulesV1) ListAllAccountAccessRules(listAllAccountAccessRulesOptions *ListAllAccountAccessRulesOptions) (result *ListAccountAccessRulesResp, response *core.DetailedResponse, err error)

ListAllAccountAccessRules : List all instance level firewall access rules List all instance level firewall access rules.

func (*FirewallAccessRulesV1) NewAccountAccessRuleInputConfiguration

func (*FirewallAccessRulesV1) NewAccountAccessRuleInputConfiguration(target string, value string) (model *AccountAccessRuleInputConfiguration, err error)

NewAccountAccessRuleInputConfiguration : Instantiate AccountAccessRuleInputConfiguration (Generic Model Constructor)

func (*FirewallAccessRulesV1) NewCreateAccountAccessRuleOptions

func (*FirewallAccessRulesV1) NewCreateAccountAccessRuleOptions() *CreateAccountAccessRuleOptions

NewCreateAccountAccessRuleOptions : Instantiate CreateAccountAccessRuleOptions

func (*FirewallAccessRulesV1) NewDeleteAccountAccessRuleOptions

func (*FirewallAccessRulesV1) NewDeleteAccountAccessRuleOptions(accessruleIdentifier string) *DeleteAccountAccessRuleOptions

NewDeleteAccountAccessRuleOptions : Instantiate DeleteAccountAccessRuleOptions

func (*FirewallAccessRulesV1) NewGetAccountAccessRuleOptions

func (*FirewallAccessRulesV1) NewGetAccountAccessRuleOptions(accessruleIdentifier string) *GetAccountAccessRuleOptions

NewGetAccountAccessRuleOptions : Instantiate GetAccountAccessRuleOptions

func (*FirewallAccessRulesV1) NewListAllAccountAccessRulesOptions

func (*FirewallAccessRulesV1) NewListAllAccountAccessRulesOptions() *ListAllAccountAccessRulesOptions

NewListAllAccountAccessRulesOptions : Instantiate ListAllAccountAccessRulesOptions

func (*FirewallAccessRulesV1) NewUpdateAccountAccessRuleOptions

func (*FirewallAccessRulesV1) NewUpdateAccountAccessRuleOptions(accessruleIdentifier string) *UpdateAccountAccessRuleOptions

NewUpdateAccountAccessRuleOptions : Instantiate UpdateAccountAccessRuleOptions

func (*FirewallAccessRulesV1) SetServiceURL

func (firewallAccessRules *FirewallAccessRulesV1) SetServiceURL(url string) error

SetServiceURL sets the service URL

func (*FirewallAccessRulesV1) UpdateAccountAccessRule

func (firewallAccessRules *FirewallAccessRulesV1) UpdateAccountAccessRule(updateAccountAccessRuleOptions *UpdateAccountAccessRuleOptions) (result *AccountAccessRuleResp, response *core.DetailedResponse, err error)

UpdateAccountAccessRule : Update an instance level firewall access rule Update an existing instance level firewall access rule for a given service instance.

type FirewallAccessRulesV1Options

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

	// Full crn of the service instance.
	Crn *string `validate:"required"`
}

FirewallAccessRulesV1Options : Service options

type GetAccountAccessRuleOptions

type GetAccountAccessRuleOptions struct {
	// Identifier of firewall access rule for the given zone.
	AccessruleIdentifier *string `json:"accessrule_identifier" validate:"required"`

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

GetAccountAccessRuleOptions : The GetAccountAccessRule options.

func (*GetAccountAccessRuleOptions) SetAccessruleIdentifier

func (options *GetAccountAccessRuleOptions) SetAccessruleIdentifier(accessruleIdentifier string) *GetAccountAccessRuleOptions

SetAccessruleIdentifier : Allow user to set AccessruleIdentifier

func (*GetAccountAccessRuleOptions) SetHeaders

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

SetHeaders : Allow user to set Headers

type ListAccountAccessRulesResp

type ListAccountAccessRulesResp struct {
	// Operation success flag.
	Success *bool `json:"success" validate:"required"`

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

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

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

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

ListAccountAccessRulesResp : access rule list response.

type ListAccountAccessRulesRespResultInfo

type ListAccountAccessRulesRespResultInfo 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"`
}

ListAccountAccessRulesRespResultInfo : Statistics of results.

type ListAllAccountAccessRulesOptions

type ListAllAccountAccessRulesOptions struct {
	// Search access rules by note.(Not case sensitive).
	Notes *string `json:"notes,omitempty"`

	// Search access rules by mode.
	Mode *string `json:"mode,omitempty"`

	// Search access rules by configuration target.
	ConfigurationTarget *string `json:"configuration.target,omitempty"`

	// Search access rules by configuration value which can be IP, IPrange, or country code.
	ConfigurationValue *string `json:"configuration.value,omitempty"`

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

	// Maximum number of access rules per page.
	PerPage *int64 `json:"per_page,omitempty"`

	// Field by which to order list of access rules.
	Order *string `json:"order,omitempty"`

	// Direction in which to order results [ascending/descending order].
	Direction *string `json:"direction,omitempty"`

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

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

ListAllAccountAccessRulesOptions : The ListAllAccountAccessRules options.

func (*ListAllAccountAccessRulesOptions) SetConfigurationTarget

func (options *ListAllAccountAccessRulesOptions) SetConfigurationTarget(configurationTarget string) *ListAllAccountAccessRulesOptions

SetConfigurationTarget : Allow user to set ConfigurationTarget

func (*ListAllAccountAccessRulesOptions) SetConfigurationValue

func (options *ListAllAccountAccessRulesOptions) SetConfigurationValue(configurationValue string) *ListAllAccountAccessRulesOptions

SetConfigurationValue : Allow user to set ConfigurationValue

func (*ListAllAccountAccessRulesOptions) SetDirection

SetDirection : Allow user to set Direction

func (*ListAllAccountAccessRulesOptions) SetHeaders

SetHeaders : Allow user to set Headers

func (*ListAllAccountAccessRulesOptions) SetMatch

SetMatch : Allow user to set Match

func (*ListAllAccountAccessRulesOptions) SetMode

SetMode : Allow user to set Mode

func (*ListAllAccountAccessRulesOptions) SetNotes

SetNotes : Allow user to set Notes

func (*ListAllAccountAccessRulesOptions) SetOrder

SetOrder : Allow user to set Order

func (*ListAllAccountAccessRulesOptions) SetPage

SetPage : Allow user to set Page

func (*ListAllAccountAccessRulesOptions) SetPerPage

SetPerPage : Allow user to set PerPage

type UpdateAccountAccessRuleOptions

type UpdateAccountAccessRuleOptions struct {
	// Identifier of firewall access rule.
	AccessruleIdentifier *string `json:"accessrule_identifier" validate:"required"`

	// The action to apply to a matched request.
	Mode *string `json:"mode,omitempty"`

	// A personal note about the rule. Typically used as a reminder or explanation for the rule.
	Notes *string `json:"notes,omitempty"`

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

UpdateAccountAccessRuleOptions : The UpdateAccountAccessRule options.

func (*UpdateAccountAccessRuleOptions) SetAccessruleIdentifier

func (options *UpdateAccountAccessRuleOptions) SetAccessruleIdentifier(accessruleIdentifier string) *UpdateAccountAccessRuleOptions

SetAccessruleIdentifier : Allow user to set AccessruleIdentifier

func (*UpdateAccountAccessRuleOptions) SetHeaders

SetHeaders : Allow user to set Headers

func (*UpdateAccountAccessRuleOptions) SetMode

SetMode : Allow user to set Mode

func (*UpdateAccountAccessRuleOptions) SetNotes

SetNotes : Allow user to set Notes

Jump to

Keyboard shortcuts

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