zonelockdownv1

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2020 License: Apache-2.0 Imports: 5 Imported by: 6

Documentation

Overview

Package zonelockdownv1 : Operations and models for the ZoneLockdownV1 service

Index

Constants

View Source
const (
	LockdownInputConfigurationsItem_Target_Ip      = "ip"
	LockdownInputConfigurationsItem_Target_IpRange = "ip_range"
)

Constants associated with the LockdownInputConfigurationsItem.Target property. properties.

View Source
const (
	LockdownObjectConfigurationsItem_Target_Ip      = "ip"
	LockdownObjectConfigurationsItem_Target_IpRange = "ip_range"
)

Constants associated with the LockdownObjectConfigurationsItem.Target property. target.

View Source
const DefaultServiceName = "zone_lockdown"

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 UnmarshalDeleteLockdownResp

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

UnmarshalDeleteLockdownResp unmarshals an instance of DeleteLockdownResp from the specified map of raw messages.

func UnmarshalDeleteLockdownRespResult

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

UnmarshalDeleteLockdownRespResult unmarshals an instance of DeleteLockdownRespResult from the specified map of raw messages.

func UnmarshalListLockdownResp

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

UnmarshalListLockdownResp unmarshals an instance of ListLockdownResp from the specified map of raw messages.

func UnmarshalListLockdownRespResultInfo

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

UnmarshalListLockdownRespResultInfo unmarshals an instance of ListLockdownRespResultInfo from the specified map of raw messages.

func UnmarshalLockdownInputConfigurationsItem

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

UnmarshalLockdownInputConfigurationsItem unmarshals an instance of LockdownInputConfigurationsItem from the specified map of raw messages.

func UnmarshalLockdownObject

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

UnmarshalLockdownObject unmarshals an instance of LockdownObject from the specified map of raw messages.

func UnmarshalLockdownObjectConfigurationsItem

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

UnmarshalLockdownObjectConfigurationsItem unmarshals an instance of LockdownObjectConfigurationsItem from the specified map of raw messages.

func UnmarshalLockdownResp

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

UnmarshalLockdownResp unmarshals an instance of LockdownResp from the specified map of raw messages.

Types

type CreateZoneLockdownRuleOptions

type CreateZoneLockdownRuleOptions struct {
	// Lockdown rule identifier.
	ID *string `json:"id,omitempty"`

	// Whether this zone lockdown is currently paused.
	Paused *bool `json:"paused,omitempty"`

	// A note that you can use to describe the reason for a Lockdown rule.
	Description *string `json:"description,omitempty"`

	// URLs to be included in this rule definition. Wildcards are permitted. The URL pattern entered here will be escaped
	// before use. This limits the URL to just simple wildcard patterns.
	Urls []string `json:"urls,omitempty"`

	// List of IP addresses or CIDR ranges to use for this rule. This can include any number of ip or ip_range
	// configurations that can access the provided URLs.
	Configurations []LockdownInputConfigurationsItem `json:"configurations,omitempty"`

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

CreateZoneLockdownRuleOptions : The CreateZoneLockdownRule options.

func (*CreateZoneLockdownRuleOptions) SetConfigurations

SetConfigurations : Allow user to set Configurations

func (*CreateZoneLockdownRuleOptions) SetDescription

func (options *CreateZoneLockdownRuleOptions) SetDescription(description string) *CreateZoneLockdownRuleOptions

SetDescription : Allow user to set Description

func (*CreateZoneLockdownRuleOptions) SetHeaders

SetHeaders : Allow user to set Headers

func (*CreateZoneLockdownRuleOptions) SetID

SetID : Allow user to set ID

func (*CreateZoneLockdownRuleOptions) SetPaused

SetPaused : Allow user to set Paused

func (*CreateZoneLockdownRuleOptions) SetUrls

SetUrls : Allow user to set Urls

type DeleteLockdownResp

type DeleteLockdownResp struct {
	// Operation success flag.
	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 *DeleteLockdownRespResult `json:"result" validate:"required"`
}

DeleteLockdownResp : delete lockdown response.

type DeleteLockdownRespResult

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

DeleteLockdownRespResult : Container for response information.

type DeleteZoneLockdownRuleOptions

type DeleteZoneLockdownRuleOptions struct {
	// Identifier of the lockdown rule to be deleted.
	LockdownRuleIdentifier *string `json:"lockdown_rule_identifier" validate:"required"`

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

DeleteZoneLockdownRuleOptions : The DeleteZoneLockdownRule options.

func (*DeleteZoneLockdownRuleOptions) SetHeaders

SetHeaders : Allow user to set Headers

func (*DeleteZoneLockdownRuleOptions) SetLockdownRuleIdentifier

func (options *DeleteZoneLockdownRuleOptions) SetLockdownRuleIdentifier(lockdownRuleIdentifier string) *DeleteZoneLockdownRuleOptions

SetLockdownRuleIdentifier : Allow user to set LockdownRuleIdentifier

type GetLockdownOptions

type GetLockdownOptions struct {
	// Identifier of lockdown rule for the given zone.
	LockdownRuleIdentifier *string `json:"lockdown_rule_identifier" validate:"required"`

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

GetLockdownOptions : The GetLockdown options.

func (*GetLockdownOptions) SetHeaders

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

SetHeaders : Allow user to set Headers

func (*GetLockdownOptions) SetLockdownRuleIdentifier

func (options *GetLockdownOptions) SetLockdownRuleIdentifier(lockdownRuleIdentifier string) *GetLockdownOptions

SetLockdownRuleIdentifier : Allow user to set LockdownRuleIdentifier

type ListAllZoneLockownRulesOptions

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

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

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

ListAllZoneLockownRulesOptions : The ListAllZoneLockownRules options.

func (*ListAllZoneLockownRulesOptions) SetHeaders

SetHeaders : Allow user to set Headers

func (*ListAllZoneLockownRulesOptions) SetPage

SetPage : Allow user to set Page

func (*ListAllZoneLockownRulesOptions) SetPerPage

SetPerPage : Allow user to set PerPage

type ListLockdownResp

type ListLockdownResp 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 []LockdownObject `json:"result" validate:"required"`

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

ListLockdownResp : list lockdown response.

type ListLockdownRespResultInfo

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

ListLockdownRespResultInfo : Statistics of results.

type LockdownInputConfigurationsItem

type LockdownInputConfigurationsItem struct {
	// properties.
	Target *string `json:"target" validate:"required"`

	// IP addresses or CIDR, if target is "ip", then value should be an IP addresses, otherwise CIDR.
	Value *string `json:"value" validate:"required"`
}

LockdownInputConfigurationsItem : LockdownInputConfigurationsItem struct

type LockdownObject

type LockdownObject struct {
	// Lockdown rule identifier.
	ID *string `json:"id" validate:"required"`

	// Whether this zone lockdown is currently paused.
	Paused *bool `json:"paused" validate:"required"`

	// A note that you can use to describe the reason for a Lockdown rule.
	Description *string `json:"description" validate:"required"`

	// URLs to be included in this rule definition. Wildcards are permitted. The URL pattern entered here will be escaped
	// before use. This limits the URL to just simple wildcard patterns.
	Urls []string `json:"urls" validate:"required"`

	// List of IP addresses or CIDR ranges to use for this rule. This can include any number of ip or ip_range
	// configurations that can access the provided URLs.
	Configurations []LockdownObjectConfigurationsItem `json:"configurations" validate:"required"`
}

LockdownObject : lockdown object.

type LockdownObjectConfigurationsItem

type LockdownObjectConfigurationsItem struct {
	// target.
	Target *string `json:"target" validate:"required"`

	// IP addresses or CIDR, if target is "ip", then value should be an IP addresses, otherwise CIDR.
	Value *string `json:"value" validate:"required"`
}

LockdownObjectConfigurationsItem : LockdownObjectConfigurationsItem struct

type LockdownResp

type LockdownResp 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"`

	// lockdown object.
	Result *LockdownObject `json:"result" validate:"required"`
}

LockdownResp : lockdown response.

type UpdateLockdownRuleOptions

type UpdateLockdownRuleOptions struct {
	// Identifier of lockdown rule.
	LockdownRuleIdentifier *string `json:"lockdown_rule_identifier" validate:"required"`

	// Lockdown rule identifier.
	ID *string `json:"id,omitempty"`

	// Whether this zone lockdown is currently paused.
	Paused *bool `json:"paused,omitempty"`

	// A note that you can use to describe the reason for a Lockdown rule.
	Description *string `json:"description,omitempty"`

	// URLs to be included in this rule definition. Wildcards are permitted. The URL pattern entered here will be escaped
	// before use. This limits the URL to just simple wildcard patterns.
	Urls []string `json:"urls,omitempty"`

	// List of IP addresses or CIDR ranges to use for this rule. This can include any number of ip or ip_range
	// configurations that can access the provided URLs.
	Configurations []LockdownInputConfigurationsItem `json:"configurations,omitempty"`

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

UpdateLockdownRuleOptions : The UpdateLockdownRule options.

func (*UpdateLockdownRuleOptions) SetConfigurations

func (options *UpdateLockdownRuleOptions) SetConfigurations(configurations []LockdownInputConfigurationsItem) *UpdateLockdownRuleOptions

SetConfigurations : Allow user to set Configurations

func (*UpdateLockdownRuleOptions) SetDescription

func (options *UpdateLockdownRuleOptions) SetDescription(description string) *UpdateLockdownRuleOptions

SetDescription : Allow user to set Description

func (*UpdateLockdownRuleOptions) SetHeaders

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

SetHeaders : Allow user to set Headers

func (*UpdateLockdownRuleOptions) SetID

SetID : Allow user to set ID

func (*UpdateLockdownRuleOptions) SetLockdownRuleIdentifier

func (options *UpdateLockdownRuleOptions) SetLockdownRuleIdentifier(lockdownRuleIdentifier string) *UpdateLockdownRuleOptions

SetLockdownRuleIdentifier : Allow user to set LockdownRuleIdentifier

func (*UpdateLockdownRuleOptions) SetPaused

func (options *UpdateLockdownRuleOptions) SetPaused(paused bool) *UpdateLockdownRuleOptions

SetPaused : Allow user to set Paused

func (*UpdateLockdownRuleOptions) SetUrls

SetUrls : Allow user to set Urls

type ZoneLockdownV1

type ZoneLockdownV1 struct {
	Service *core.BaseService

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

	// Zone identifier (zone id).
	ZoneIdentifier *string
}

ZoneLockdownV1 : Zone Lockdown

Version: 1.0.1

func NewZoneLockdownV1

func NewZoneLockdownV1(options *ZoneLockdownV1Options) (service *ZoneLockdownV1, err error)

NewZoneLockdownV1 : constructs an instance of ZoneLockdownV1 with passed in options.

func NewZoneLockdownV1UsingExternalConfig

func NewZoneLockdownV1UsingExternalConfig(options *ZoneLockdownV1Options) (zoneLockdown *ZoneLockdownV1, err error)

NewZoneLockdownV1UsingExternalConfig : constructs an instance of ZoneLockdownV1 with passed in options and external configuration.

func (*ZoneLockdownV1) CreateZoneLockdownRule

func (zoneLockdown *ZoneLockdownV1) CreateZoneLockdownRule(createZoneLockdownRuleOptions *CreateZoneLockdownRuleOptions) (result *LockdownResp, response *core.DetailedResponse, err error)

CreateZoneLockdownRule : Create a new lockdown rule Create a new lockdown rule for a given zone under a service instance.

func (*ZoneLockdownV1) DeleteZoneLockdownRule

func (zoneLockdown *ZoneLockdownV1) DeleteZoneLockdownRule(deleteZoneLockdownRuleOptions *DeleteZoneLockdownRuleOptions) (result *DeleteLockdownResp, response *core.DetailedResponse, err error)

DeleteZoneLockdownRule : Delete a lockdown rule Delete a lockdown rule for a particular zone, given its id.

func (*ZoneLockdownV1) GetLockdown

func (zoneLockdown *ZoneLockdownV1) GetLockdown(getLockdownOptions *GetLockdownOptions) (result *LockdownResp, response *core.DetailedResponse, err error)

GetLockdown : Get a lockdown rule's details by id For a given service instance, zone id and lockdown rule id, get the lockdown rule details.

func (*ZoneLockdownV1) ListAllZoneLockownRules

func (zoneLockdown *ZoneLockdownV1) ListAllZoneLockownRules(listAllZoneLockownRulesOptions *ListAllZoneLockownRulesOptions) (result *ListLockdownResp, response *core.DetailedResponse, err error)

ListAllZoneLockownRules : List all lockdown rules for a zone List all lockdown rules for a zone.

func (*ZoneLockdownV1) NewCreateZoneLockdownRuleOptions

func (*ZoneLockdownV1) NewCreateZoneLockdownRuleOptions() *CreateZoneLockdownRuleOptions

NewCreateZoneLockdownRuleOptions : Instantiate CreateZoneLockdownRuleOptions

func (*ZoneLockdownV1) NewDeleteZoneLockdownRuleOptions

func (*ZoneLockdownV1) NewDeleteZoneLockdownRuleOptions(lockdownRuleIdentifier string) *DeleteZoneLockdownRuleOptions

NewDeleteZoneLockdownRuleOptions : Instantiate DeleteZoneLockdownRuleOptions

func (*ZoneLockdownV1) NewGetLockdownOptions

func (*ZoneLockdownV1) NewGetLockdownOptions(lockdownRuleIdentifier string) *GetLockdownOptions

NewGetLockdownOptions : Instantiate GetLockdownOptions

func (*ZoneLockdownV1) NewListAllZoneLockownRulesOptions

func (*ZoneLockdownV1) NewListAllZoneLockownRulesOptions() *ListAllZoneLockownRulesOptions

NewListAllZoneLockownRulesOptions : Instantiate ListAllZoneLockownRulesOptions

func (*ZoneLockdownV1) NewLockdownInputConfigurationsItem

func (*ZoneLockdownV1) NewLockdownInputConfigurationsItem(target string, value string) (model *LockdownInputConfigurationsItem, err error)

NewLockdownInputConfigurationsItem : Instantiate LockdownInputConfigurationsItem (Generic Model Constructor)

func (*ZoneLockdownV1) NewUpdateLockdownRuleOptions

func (*ZoneLockdownV1) NewUpdateLockdownRuleOptions(lockdownRuleIdentifier string) *UpdateLockdownRuleOptions

NewUpdateLockdownRuleOptions : Instantiate UpdateLockdownRuleOptions

func (*ZoneLockdownV1) SetServiceURL

func (zoneLockdown *ZoneLockdownV1) SetServiceURL(url string) error

SetServiceURL sets the service URL

func (*ZoneLockdownV1) UpdateLockdownRule

func (zoneLockdown *ZoneLockdownV1) UpdateLockdownRule(updateLockdownRuleOptions *UpdateLockdownRuleOptions) (result *LockdownResp, response *core.DetailedResponse, err error)

UpdateLockdownRule : Update a lockdown rule Update an existing lockdown rule for a given zone under a given service instance.

type ZoneLockdownV1Options

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

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

	// Zone identifier (zone id).
	ZoneIdentifier *string `validate:"required"`
}

ZoneLockdownV1Options : Service options

Jump to

Keyboard shortcuts

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