Documentation ¶
Overview ¶
Package zoneratelimitsv1 : Operations and models for the ZoneRateLimitsV1 service
Index ¶
- Constants
- func GetServiceURLForRegion(region string) (string, error)
- func UnmarshalDeleteRateLimitResp(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalDeleteRateLimitRespResult(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalListRatelimitResp(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalListRatelimitRespResultInfo(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalRatelimitInputAction(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalRatelimitInputActionResponse(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalRatelimitInputBypassItem(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalRatelimitInputCorrelate(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalRatelimitInputMatch(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalRatelimitInputMatchRequest(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalRatelimitInputMatchResponse(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalRatelimitInputMatchResponseHeadersItem(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalRatelimitObject(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalRatelimitObjectAction(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalRatelimitObjectActionResponse(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalRatelimitObjectBypassItem(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalRatelimitObjectCorrelate(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalRatelimitObjectMatch(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalRatelimitObjectMatchRequest(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalRatelimitObjectMatchResponse(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalRatelimitObjectMatchResponseHeadersItem(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalRatelimitResp(m map[string]json.RawMessage, result interface{}) (err error)
- type CreateZoneRateLimitsOptions
- func (options *CreateZoneRateLimitsOptions) SetAction(action *RatelimitInputAction) *CreateZoneRateLimitsOptions
- func (options *CreateZoneRateLimitsOptions) SetBypass(bypass []RatelimitInputBypassItem) *CreateZoneRateLimitsOptions
- func (options *CreateZoneRateLimitsOptions) SetCorrelate(correlate *RatelimitInputCorrelate) *CreateZoneRateLimitsOptions
- func (options *CreateZoneRateLimitsOptions) SetDescription(description string) *CreateZoneRateLimitsOptions
- func (options *CreateZoneRateLimitsOptions) SetDisabled(disabled bool) *CreateZoneRateLimitsOptions
- func (options *CreateZoneRateLimitsOptions) SetHeaders(param map[string]string) *CreateZoneRateLimitsOptions
- func (options *CreateZoneRateLimitsOptions) SetMatch(match *RatelimitInputMatch) *CreateZoneRateLimitsOptions
- func (options *CreateZoneRateLimitsOptions) SetPeriod(period int64) *CreateZoneRateLimitsOptions
- func (options *CreateZoneRateLimitsOptions) SetThreshold(threshold int64) *CreateZoneRateLimitsOptions
- type DeleteRateLimitResp
- type DeleteRateLimitRespResult
- type DeleteZoneRateLimitOptions
- type GetRateLimitOptions
- type ListAllZoneRateLimitsOptions
- func (options *ListAllZoneRateLimitsOptions) SetHeaders(param map[string]string) *ListAllZoneRateLimitsOptions
- func (options *ListAllZoneRateLimitsOptions) SetPage(page int64) *ListAllZoneRateLimitsOptions
- func (options *ListAllZoneRateLimitsOptions) SetPerPage(perPage int64) *ListAllZoneRateLimitsOptions
- type ListRatelimitResp
- type ListRatelimitRespResultInfo
- type RatelimitInputAction
- type RatelimitInputActionResponse
- type RatelimitInputBypassItem
- type RatelimitInputCorrelate
- type RatelimitInputMatch
- type RatelimitInputMatchRequest
- type RatelimitInputMatchResponse
- type RatelimitInputMatchResponseHeadersItem
- type RatelimitObject
- type RatelimitObjectAction
- type RatelimitObjectActionResponse
- type RatelimitObjectBypassItem
- type RatelimitObjectCorrelate
- type RatelimitObjectMatch
- type RatelimitObjectMatchRequest
- type RatelimitObjectMatchResponse
- type RatelimitObjectMatchResponseHeadersItem
- type RatelimitResp
- type UpdateRateLimitOptions
- func (options *UpdateRateLimitOptions) SetAction(action *RatelimitInputAction) *UpdateRateLimitOptions
- func (options *UpdateRateLimitOptions) SetBypass(bypass []RatelimitInputBypassItem) *UpdateRateLimitOptions
- func (options *UpdateRateLimitOptions) SetCorrelate(correlate *RatelimitInputCorrelate) *UpdateRateLimitOptions
- func (options *UpdateRateLimitOptions) SetDescription(description string) *UpdateRateLimitOptions
- func (options *UpdateRateLimitOptions) SetDisabled(disabled bool) *UpdateRateLimitOptions
- func (options *UpdateRateLimitOptions) SetHeaders(param map[string]string) *UpdateRateLimitOptions
- func (options *UpdateRateLimitOptions) SetMatch(match *RatelimitInputMatch) *UpdateRateLimitOptions
- func (options *UpdateRateLimitOptions) SetPeriod(period int64) *UpdateRateLimitOptions
- func (options *UpdateRateLimitOptions) SetRateLimitIdentifier(rateLimitIdentifier string) *UpdateRateLimitOptions
- func (options *UpdateRateLimitOptions) SetThreshold(threshold int64) *UpdateRateLimitOptions
- type ZoneRateLimitsV1
- func (zoneRateLimits *ZoneRateLimitsV1) Clone() *ZoneRateLimitsV1
- func (zoneRateLimits *ZoneRateLimitsV1) CreateZoneRateLimits(createZoneRateLimitsOptions *CreateZoneRateLimitsOptions) (result *RatelimitResp, response *core.DetailedResponse, err error)
- func (zoneRateLimits *ZoneRateLimitsV1) CreateZoneRateLimitsWithContext(ctx context.Context, createZoneRateLimitsOptions *CreateZoneRateLimitsOptions) (result *RatelimitResp, response *core.DetailedResponse, err error)
- func (zoneRateLimits *ZoneRateLimitsV1) DeleteZoneRateLimit(deleteZoneRateLimitOptions *DeleteZoneRateLimitOptions) (result *DeleteRateLimitResp, response *core.DetailedResponse, err error)
- func (zoneRateLimits *ZoneRateLimitsV1) DeleteZoneRateLimitWithContext(ctx context.Context, deleteZoneRateLimitOptions *DeleteZoneRateLimitOptions) (result *DeleteRateLimitResp, response *core.DetailedResponse, err error)
- func (zoneRateLimits *ZoneRateLimitsV1) DisableRetries()
- func (zoneRateLimits *ZoneRateLimitsV1) EnableRetries(maxRetries int, maxRetryInterval time.Duration)
- func (zoneRateLimits *ZoneRateLimitsV1) GetEnableGzipCompression() bool
- func (zoneRateLimits *ZoneRateLimitsV1) GetRateLimit(getRateLimitOptions *GetRateLimitOptions) (result *RatelimitResp, response *core.DetailedResponse, err error)
- func (zoneRateLimits *ZoneRateLimitsV1) GetRateLimitWithContext(ctx context.Context, getRateLimitOptions *GetRateLimitOptions) (result *RatelimitResp, response *core.DetailedResponse, err error)
- func (zoneRateLimits *ZoneRateLimitsV1) GetServiceURL() string
- func (zoneRateLimits *ZoneRateLimitsV1) ListAllZoneRateLimits(listAllZoneRateLimitsOptions *ListAllZoneRateLimitsOptions) (result *ListRatelimitResp, response *core.DetailedResponse, err error)
- func (zoneRateLimits *ZoneRateLimitsV1) ListAllZoneRateLimitsWithContext(ctx context.Context, ...) (result *ListRatelimitResp, response *core.DetailedResponse, err error)
- func (*ZoneRateLimitsV1) NewCreateZoneRateLimitsOptions() *CreateZoneRateLimitsOptions
- func (*ZoneRateLimitsV1) NewDeleteZoneRateLimitOptions(rateLimitIdentifier string) *DeleteZoneRateLimitOptions
- func (*ZoneRateLimitsV1) NewGetRateLimitOptions(rateLimitIdentifier string) *GetRateLimitOptions
- func (*ZoneRateLimitsV1) NewListAllZoneRateLimitsOptions() *ListAllZoneRateLimitsOptions
- func (*ZoneRateLimitsV1) NewRatelimitInputAction(mode string) (model *RatelimitInputAction, err error)
- func (*ZoneRateLimitsV1) NewRatelimitInputBypassItem(name string, value string) (model *RatelimitInputBypassItem, err error)
- func (*ZoneRateLimitsV1) NewRatelimitInputCorrelate(by string) (model *RatelimitInputCorrelate, err error)
- func (*ZoneRateLimitsV1) NewRatelimitInputMatchRequest(url string) (model *RatelimitInputMatchRequest, err error)
- func (*ZoneRateLimitsV1) NewRatelimitInputMatchResponseHeadersItem(name string, op string, value string) (model *RatelimitInputMatchResponseHeadersItem, err error)
- func (*ZoneRateLimitsV1) NewUpdateRateLimitOptions(rateLimitIdentifier string) *UpdateRateLimitOptions
- func (zoneRateLimits *ZoneRateLimitsV1) SetDefaultHeaders(headers http.Header)
- func (zoneRateLimits *ZoneRateLimitsV1) SetEnableGzipCompression(enableGzip bool)
- func (zoneRateLimits *ZoneRateLimitsV1) SetServiceURL(url string) error
- func (zoneRateLimits *ZoneRateLimitsV1) UpdateRateLimit(updateRateLimitOptions *UpdateRateLimitOptions) (result *RatelimitResp, response *core.DetailedResponse, err error)
- func (zoneRateLimits *ZoneRateLimitsV1) UpdateRateLimitWithContext(ctx context.Context, updateRateLimitOptions *UpdateRateLimitOptions) (result *RatelimitResp, response *core.DetailedResponse, err error)
- type ZoneRateLimitsV1Options
Constants ¶
const ( RatelimitInputAction_Mode_Ban = "ban" RatelimitInputAction_Mode_Challenge = "challenge" RatelimitInputAction_Mode_JsChallenge = "js_challenge" RatelimitInputAction_Mode_Simulate = "simulate" )
Constants associated with the RatelimitInputAction.Mode property. The type of action to perform.
const ( RatelimitInputActionResponse_ContentType_ApplicationJSON = "application/json" RatelimitInputActionResponse_ContentType_TextPlain = "text/plain" RatelimitInputActionResponse_ContentType_TextXml = "text/xml" )
Constants associated with the RatelimitInputActionResponse.ContentType property. The content type of the body.
const ( RatelimitInputMatchRequest_Methods_All = "_ALL_" RatelimitInputMatchRequest_Methods_Delete = "DELETE" RatelimitInputMatchRequest_Methods_Get = "GET" RatelimitInputMatchRequest_Methods_Head = "HEAD" RatelimitInputMatchRequest_Methods_Patch = "PATCH" RatelimitInputMatchRequest_Methods_Post = "POST" RatelimitInputMatchRequest_Methods_Put = "PUT" )
Constants associated with the RatelimitInputMatchRequest.Methods property.
const ( RatelimitInputMatchRequest_Schemes_All = "_ALL_" RatelimitInputMatchRequest_Schemes_Http = "HTTP" RatelimitInputMatchRequest_Schemes_Https = "HTTPS" )
Constants associated with the RatelimitInputMatchRequest.Schemes property.
const ( RatelimitInputMatchResponseHeadersItem_Op_Eq = "eq" RatelimitInputMatchResponseHeadersItem_Op_Ne = "ne" )
Constants associated with the RatelimitInputMatchResponseHeadersItem.Op property. The operator when matchin, eq means equals, ne means not equals.
const ( RatelimitObjectAction_Mode_Ban = "ban" RatelimitObjectAction_Mode_Challenge = "challenge" RatelimitObjectAction_Mode_JsChallenge = "js_challenge" RatelimitObjectAction_Mode_Simulate = "simulate" )
Constants associated with the RatelimitObjectAction.Mode property. The type of action to perform.
const ( RatelimitObjectActionResponse_ContentType_ApplicationJSON = "application/json" RatelimitObjectActionResponse_ContentType_TextPlain = "text/plain" RatelimitObjectActionResponse_ContentType_TextXml = "text/xml" )
Constants associated with the RatelimitObjectActionResponse.ContentType property. The content type of the body.
const ( RatelimitObjectMatchRequest_Methods_All = "_ALL_" RatelimitObjectMatchRequest_Methods_Delete = "DELETE" RatelimitObjectMatchRequest_Methods_Get = "GET" RatelimitObjectMatchRequest_Methods_Head = "HEAD" RatelimitObjectMatchRequest_Methods_Patch = "PATCH" RatelimitObjectMatchRequest_Methods_Post = "POST" RatelimitObjectMatchRequest_Methods_Put = "PUT" )
Constants associated with the RatelimitObjectMatchRequest.Methods property.
const ( RatelimitObjectMatchRequest_Schemes_All = "_ALL_" RatelimitObjectMatchRequest_Schemes_Http = "HTTP" RatelimitObjectMatchRequest_Schemes_Https = "HTTPS" )
Constants associated with the RatelimitObjectMatchRequest.Schemes property.
const ( RatelimitObjectMatchResponseHeadersItem_Op_Eq = "eq" RatelimitObjectMatchResponseHeadersItem_Op_Ne = "ne" )
Constants associated with the RatelimitObjectMatchResponseHeadersItem.Op property. The operator when matchin, eq means equals, ne means not equals.
const DefaultServiceName = "zone_rate_limits"
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 (
RatelimitInputBypassItem_Name_URL = "url"
)
Constants associated with the RatelimitInputBypassItem.Name property. Rate limit name.
const (
RatelimitInputCorrelate_By_Nat = "nat"
)
Constants associated with the RatelimitInputCorrelate.By property. NAT rate limits by.
const (
RatelimitInputMatchResponseHeadersItem_Value_Hit = "HIT"
)
Constants associated with the RatelimitInputMatchResponseHeadersItem.Value property. The value of the header, which will be exactly matched.
const (
RatelimitObjectBypassItem_Name_URL = "url"
)
Constants associated with the RatelimitObjectBypassItem.Name property. rate limit name.
const (
RatelimitObjectCorrelate_By_Nat = "nat"
)
Constants associated with the RatelimitObjectCorrelate.By property. rate limit enabled by.
const (
RatelimitObjectMatchResponseHeadersItem_Value_Hit = "HIT"
)
Constants associated with the RatelimitObjectMatchResponseHeadersItem.Value property. The value of the header, which will be exactly matched.
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 UnmarshalDeleteRateLimitResp ¶
func UnmarshalDeleteRateLimitResp(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalDeleteRateLimitResp unmarshals an instance of DeleteRateLimitResp from the specified map of raw messages.
func UnmarshalDeleteRateLimitRespResult ¶
func UnmarshalDeleteRateLimitRespResult(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalDeleteRateLimitRespResult unmarshals an instance of DeleteRateLimitRespResult from the specified map of raw messages.
func UnmarshalListRatelimitResp ¶
func UnmarshalListRatelimitResp(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalListRatelimitResp unmarshals an instance of ListRatelimitResp from the specified map of raw messages.
func UnmarshalListRatelimitRespResultInfo ¶
func UnmarshalListRatelimitRespResultInfo(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalListRatelimitRespResultInfo unmarshals an instance of ListRatelimitRespResultInfo from the specified map of raw messages.
func UnmarshalRatelimitInputAction ¶
func UnmarshalRatelimitInputAction(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalRatelimitInputAction unmarshals an instance of RatelimitInputAction from the specified map of raw messages.
func UnmarshalRatelimitInputActionResponse ¶
func UnmarshalRatelimitInputActionResponse(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalRatelimitInputActionResponse unmarshals an instance of RatelimitInputActionResponse from the specified map of raw messages.
func UnmarshalRatelimitInputBypassItem ¶
func UnmarshalRatelimitInputBypassItem(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalRatelimitInputBypassItem unmarshals an instance of RatelimitInputBypassItem from the specified map of raw messages.
func UnmarshalRatelimitInputCorrelate ¶
func UnmarshalRatelimitInputCorrelate(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalRatelimitInputCorrelate unmarshals an instance of RatelimitInputCorrelate from the specified map of raw messages.
func UnmarshalRatelimitInputMatch ¶
func UnmarshalRatelimitInputMatch(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalRatelimitInputMatch unmarshals an instance of RatelimitInputMatch from the specified map of raw messages.
func UnmarshalRatelimitInputMatchRequest ¶
func UnmarshalRatelimitInputMatchRequest(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalRatelimitInputMatchRequest unmarshals an instance of RatelimitInputMatchRequest from the specified map of raw messages.
func UnmarshalRatelimitInputMatchResponse ¶
func UnmarshalRatelimitInputMatchResponse(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalRatelimitInputMatchResponse unmarshals an instance of RatelimitInputMatchResponse from the specified map of raw messages.
func UnmarshalRatelimitInputMatchResponseHeadersItem ¶
func UnmarshalRatelimitInputMatchResponseHeadersItem(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalRatelimitInputMatchResponseHeadersItem unmarshals an instance of RatelimitInputMatchResponseHeadersItem from the specified map of raw messages.
func UnmarshalRatelimitObject ¶
func UnmarshalRatelimitObject(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalRatelimitObject unmarshals an instance of RatelimitObject from the specified map of raw messages.
func UnmarshalRatelimitObjectAction ¶
func UnmarshalRatelimitObjectAction(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalRatelimitObjectAction unmarshals an instance of RatelimitObjectAction from the specified map of raw messages.
func UnmarshalRatelimitObjectActionResponse ¶
func UnmarshalRatelimitObjectActionResponse(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalRatelimitObjectActionResponse unmarshals an instance of RatelimitObjectActionResponse from the specified map of raw messages.
func UnmarshalRatelimitObjectBypassItem ¶
func UnmarshalRatelimitObjectBypassItem(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalRatelimitObjectBypassItem unmarshals an instance of RatelimitObjectBypassItem from the specified map of raw messages.
func UnmarshalRatelimitObjectCorrelate ¶
func UnmarshalRatelimitObjectCorrelate(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalRatelimitObjectCorrelate unmarshals an instance of RatelimitObjectCorrelate from the specified map of raw messages.
func UnmarshalRatelimitObjectMatch ¶
func UnmarshalRatelimitObjectMatch(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalRatelimitObjectMatch unmarshals an instance of RatelimitObjectMatch from the specified map of raw messages.
func UnmarshalRatelimitObjectMatchRequest ¶
func UnmarshalRatelimitObjectMatchRequest(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalRatelimitObjectMatchRequest unmarshals an instance of RatelimitObjectMatchRequest from the specified map of raw messages.
func UnmarshalRatelimitObjectMatchResponse ¶
func UnmarshalRatelimitObjectMatchResponse(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalRatelimitObjectMatchResponse unmarshals an instance of RatelimitObjectMatchResponse from the specified map of raw messages.
func UnmarshalRatelimitObjectMatchResponseHeadersItem ¶
func UnmarshalRatelimitObjectMatchResponseHeadersItem(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalRatelimitObjectMatchResponseHeadersItem unmarshals an instance of RatelimitObjectMatchResponseHeadersItem from the specified map of raw messages.
func UnmarshalRatelimitResp ¶
func UnmarshalRatelimitResp(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalRatelimitResp unmarshals an instance of RatelimitResp from the specified map of raw messages.
Types ¶
type CreateZoneRateLimitsOptions ¶
type CreateZoneRateLimitsOptions struct { // Whether this ratelimit is currently disabled. Disabled *bool `json:"disabled,omitempty"` // A note that you can use to describe the reason for a rate limit. Description *string `json:"description,omitempty"` // Criteria that would allow the rate limit to be bypassed, for example to express that you shouldn't apply a rate // limit to a given set of URLs. Bypass []RatelimitInputBypassItem `json:"bypass,omitempty"` // The threshold that triggers the rate limit mitigations, combine with period. i.e. threshold per period. Threshold *int64 `json:"threshold,omitempty"` // The time in seconds to count matching traffic. If the count exceeds threshold within this period the action will be // performed. Period *int64 `json:"period,omitempty"` // action. Action *RatelimitInputAction `json:"action,omitempty"` // Enable NAT based rate limits. Correlate *RatelimitInputCorrelate `json:"correlate,omitempty"` // Determines which traffic the rate limit counts towards the threshold. Needs to be one of "request" or "response" // objects. Match *RatelimitInputMatch `json:"match,omitempty"` // Allows users to set headers on API requests Headers map[string]string }
CreateZoneRateLimitsOptions : The CreateZoneRateLimits options.
func (*CreateZoneRateLimitsOptions) SetAction ¶
func (options *CreateZoneRateLimitsOptions) SetAction(action *RatelimitInputAction) *CreateZoneRateLimitsOptions
SetAction : Allow user to set Action
func (*CreateZoneRateLimitsOptions) SetBypass ¶
func (options *CreateZoneRateLimitsOptions) SetBypass(bypass []RatelimitInputBypassItem) *CreateZoneRateLimitsOptions
SetBypass : Allow user to set Bypass
func (*CreateZoneRateLimitsOptions) SetCorrelate ¶
func (options *CreateZoneRateLimitsOptions) SetCorrelate(correlate *RatelimitInputCorrelate) *CreateZoneRateLimitsOptions
SetCorrelate : Allow user to set Correlate
func (*CreateZoneRateLimitsOptions) SetDescription ¶
func (options *CreateZoneRateLimitsOptions) SetDescription(description string) *CreateZoneRateLimitsOptions
SetDescription : Allow user to set Description
func (*CreateZoneRateLimitsOptions) SetDisabled ¶
func (options *CreateZoneRateLimitsOptions) SetDisabled(disabled bool) *CreateZoneRateLimitsOptions
SetDisabled : Allow user to set Disabled
func (*CreateZoneRateLimitsOptions) SetHeaders ¶
func (options *CreateZoneRateLimitsOptions) SetHeaders(param map[string]string) *CreateZoneRateLimitsOptions
SetHeaders : Allow user to set Headers
func (*CreateZoneRateLimitsOptions) SetMatch ¶
func (options *CreateZoneRateLimitsOptions) SetMatch(match *RatelimitInputMatch) *CreateZoneRateLimitsOptions
SetMatch : Allow user to set Match
func (*CreateZoneRateLimitsOptions) SetPeriod ¶
func (options *CreateZoneRateLimitsOptions) SetPeriod(period int64) *CreateZoneRateLimitsOptions
SetPeriod : Allow user to set Period
func (*CreateZoneRateLimitsOptions) SetThreshold ¶
func (options *CreateZoneRateLimitsOptions) SetThreshold(threshold int64) *CreateZoneRateLimitsOptions
SetThreshold : Allow user to set Threshold
type DeleteRateLimitResp ¶
type DeleteRateLimitResp 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 *DeleteRateLimitRespResult `json:"result" validate:"required"` }
DeleteRateLimitResp : rate limit delete response.
type DeleteRateLimitRespResult ¶
type DeleteRateLimitRespResult struct { // ID. ID *string `json:"id" validate:"required"` }
DeleteRateLimitRespResult : Container for response information.
type DeleteZoneRateLimitOptions ¶
type DeleteZoneRateLimitOptions struct { // Identifier of the rate limit to be deleted. RateLimitIdentifier *string `json:"rate_limit_identifier" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string }
DeleteZoneRateLimitOptions : The DeleteZoneRateLimit options.
func (*DeleteZoneRateLimitOptions) SetHeaders ¶
func (options *DeleteZoneRateLimitOptions) SetHeaders(param map[string]string) *DeleteZoneRateLimitOptions
SetHeaders : Allow user to set Headers
func (*DeleteZoneRateLimitOptions) SetRateLimitIdentifier ¶
func (options *DeleteZoneRateLimitOptions) SetRateLimitIdentifier(rateLimitIdentifier string) *DeleteZoneRateLimitOptions
SetRateLimitIdentifier : Allow user to set RateLimitIdentifier
type GetRateLimitOptions ¶
type GetRateLimitOptions struct { // Identifier of rate limit for the given zone. RateLimitIdentifier *string `json:"rate_limit_identifier" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string }
GetRateLimitOptions : The GetRateLimit options.
func (*GetRateLimitOptions) SetHeaders ¶
func (options *GetRateLimitOptions) SetHeaders(param map[string]string) *GetRateLimitOptions
SetHeaders : Allow user to set Headers
func (*GetRateLimitOptions) SetRateLimitIdentifier ¶
func (options *GetRateLimitOptions) SetRateLimitIdentifier(rateLimitIdentifier string) *GetRateLimitOptions
SetRateLimitIdentifier : Allow user to set RateLimitIdentifier
type ListAllZoneRateLimitsOptions ¶
type ListAllZoneRateLimitsOptions struct { // Page number of paginated results. Page *int64 `json:"page,omitempty"` // Maximum number of rate limits per page. PerPage *int64 `json:"per_page,omitempty"` // Allows users to set headers on API requests Headers map[string]string }
ListAllZoneRateLimitsOptions : The ListAllZoneRateLimits options.
func (*ListAllZoneRateLimitsOptions) SetHeaders ¶
func (options *ListAllZoneRateLimitsOptions) SetHeaders(param map[string]string) *ListAllZoneRateLimitsOptions
SetHeaders : Allow user to set Headers
func (*ListAllZoneRateLimitsOptions) SetPage ¶
func (options *ListAllZoneRateLimitsOptions) SetPage(page int64) *ListAllZoneRateLimitsOptions
SetPage : Allow user to set Page
func (*ListAllZoneRateLimitsOptions) SetPerPage ¶
func (options *ListAllZoneRateLimitsOptions) SetPerPage(perPage int64) *ListAllZoneRateLimitsOptions
SetPerPage : Allow user to set PerPage
type ListRatelimitResp ¶
type ListRatelimitResp 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 []RatelimitObject `json:"result" validate:"required"` // Statistics of results. ResultInfo *ListRatelimitRespResultInfo `json:"result_info" validate:"required"` }
ListRatelimitResp : rate limit list response.
type ListRatelimitRespResultInfo ¶
type ListRatelimitRespResultInfo 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"` }
ListRatelimitRespResultInfo : Statistics of results.
type RatelimitInputAction ¶
type RatelimitInputAction struct { // The type of action to perform. Mode *string `json:"mode" validate:"required"` // The time in seconds as an integer to perform the mitigation action. Must be the same or greater than the period. // This field is valid only when mode is "simulate" or "ban". Timeout *int64 `json:"timeout,omitempty"` // Custom content-type and body to return, this overrides the custom error for the zone. This field is not required. // Omission will result in default HTML error page.This field is valid only when mode is "simulate" or "ban". Response *RatelimitInputActionResponse `json:"response,omitempty"` }
RatelimitInputAction : action.
type RatelimitInputActionResponse ¶
type RatelimitInputActionResponse struct { // The content type of the body. ContentType *string `json:"content_type,omitempty"` // The body to return, the content here should conform to the content_type. Body *string `json:"body,omitempty"` }
RatelimitInputActionResponse : Custom content-type and body to return, this overrides the custom error for the zone. This field is not required. Omission will result in default HTML error page.This field is valid only when mode is "simulate" or "ban".
type RatelimitInputBypassItem ¶
type RatelimitInputBypassItem struct { // Rate limit name. Name *string `json:"name" validate:"required"` // The url to bypass. Value *string `json:"value" validate:"required"` }
RatelimitInputBypassItem : RatelimitInputBypassItem struct
type RatelimitInputCorrelate ¶
type RatelimitInputCorrelate struct { // NAT rate limits by. By *string `json:"by" validate:"required"` }
RatelimitInputCorrelate : Enable NAT based rate limits.
type RatelimitInputMatch ¶
type RatelimitInputMatch struct { // request. Request *RatelimitInputMatchRequest `json:"request,omitempty"` // response. Response *RatelimitInputMatchResponse `json:"response,omitempty"` }
RatelimitInputMatch : Determines which traffic the rate limit counts towards the threshold. Needs to be one of "request" or "response" objects.
type RatelimitInputMatchRequest ¶
type RatelimitInputMatchRequest struct { // A subset of the list HTTP methods, or ["_ALL_"] for selecting all methods. Methods []string `json:"methods,omitempty"` // HTTP schemes list, or ["_ALL_"] for selecting all schemes. Schemes []string `json:"schemes,omitempty"` // The URL pattern to match comprised of the host and path, i.e. example.org/path. Wildcard are expanded to match // applicable traffic, query strings are not matched. Use * for all traffic to your zone. URL *string `json:"url" validate:"required"` }
RatelimitInputMatchRequest : request.
type RatelimitInputMatchResponse ¶
type RatelimitInputMatchResponse struct { // HTTP Status codes, can be one [403], many [401,403] or indicate all by not providing this value. This field is not // required. Status []int64 `json:"status,omitempty"` // Array of response headers to match. If a response does not meet the header criteria then the request will not be // counted towards the rate limit. HeadersVar []RatelimitInputMatchResponseHeadersItem `json:"headers,omitempty"` // Deprecated, please use response headers instead and also provide "origin_traffic:false" to avoid legacy behaviour // interacting with the response.headers property. OriginTraffic *bool `json:"origin_traffic,omitempty"` }
RatelimitInputMatchResponse : response.
type RatelimitInputMatchResponseHeadersItem ¶
type RatelimitInputMatchResponseHeadersItem struct { // The name of the response header to match. Name *string `json:"name" validate:"required"` // The operator when matchin, eq means equals, ne means not equals. Op *string `json:"op" validate:"required"` // The value of the header, which will be exactly matched. Value *string `json:"value" validate:"required"` }
RatelimitInputMatchResponseHeadersItem : RatelimitInputMatchResponseHeadersItem struct
type RatelimitObject ¶
type RatelimitObject struct { // Identifier of the rate limit. ID *string `json:"id" validate:"required"` // Whether this ratelimit is currently disabled. Disabled *bool `json:"disabled" validate:"required"` // A note that you can use to describe the reason for a rate limit. Description *string `json:"description" validate:"required"` // Criteria that would allow the rate limit to be bypassed, for example to express that you shouldn't apply a rate // limit to a given set of URLs. Bypass []RatelimitObjectBypassItem `json:"bypass" validate:"required"` // The threshold that triggers the rate limit mitigations, combine with period. i.e. threshold per period. Threshold *int64 `json:"threshold" validate:"required"` // The time in seconds to count matching traffic. If the count exceeds threshold within this period the action will be // performed. Period *int64 `json:"period" validate:"required"` // Enable NAT based rate limits. Correlate *RatelimitObjectCorrelate `json:"correlate,omitempty"` // action. Action *RatelimitObjectAction `json:"action" validate:"required"` // Determines which traffic the rate limit counts towards the threshold. Needs to be one of "request" or "response" // objects. Match *RatelimitObjectMatch `json:"match" validate:"required"` }
RatelimitObject : rate limit object.
type RatelimitObjectAction ¶
type RatelimitObjectAction struct { // The type of action to perform. Mode *string `json:"mode" validate:"required"` // The time in seconds as an integer to perform the mitigation action. Must be the same or greater than the period. // This field is valid only when mode is "simulate" or "ban". Timeout *int64 `json:"timeout,omitempty"` // Custom content-type and body to return, this overrides the custom error for the zone. This field is not required. // Omission will result in default HTML error page.This field is valid only when mode is "simulate" or "ban". Response *RatelimitObjectActionResponse `json:"response,omitempty"` }
RatelimitObjectAction : action.
type RatelimitObjectActionResponse ¶
type RatelimitObjectActionResponse struct { // The content type of the body. ContentType *string `json:"content_type" validate:"required"` // The body to return, the content here should conform to the content_type. Body *string `json:"body" validate:"required"` }
RatelimitObjectActionResponse : Custom content-type and body to return, this overrides the custom error for the zone. This field is not required. Omission will result in default HTML error page.This field is valid only when mode is "simulate" or "ban".
type RatelimitObjectBypassItem ¶
type RatelimitObjectBypassItem struct { // rate limit name. Name *string `json:"name" validate:"required"` // The url to bypass. Value *string `json:"value" validate:"required"` }
RatelimitObjectBypassItem : RatelimitObjectBypassItem struct
type RatelimitObjectCorrelate ¶
type RatelimitObjectCorrelate struct { // rate limit enabled by. By *string `json:"by" validate:"required"` }
RatelimitObjectCorrelate : Enable NAT based rate limits.
type RatelimitObjectMatch ¶
type RatelimitObjectMatch struct { // request. Request *RatelimitObjectMatchRequest `json:"request,omitempty"` // response. Response *RatelimitObjectMatchResponse `json:"response,omitempty"` }
RatelimitObjectMatch : Determines which traffic the rate limit counts towards the threshold. Needs to be one of "request" or "response" objects.
type RatelimitObjectMatchRequest ¶
type RatelimitObjectMatchRequest struct { // A subset of the list HTTP methods, or ["_ALL_"] for selecting all methods. Methods []string `json:"methods,omitempty"` // HTTP schemes list, or ["_ALL_"] for selecting all schemes. Schemes []string `json:"schemes,omitempty"` // The URL pattern to match comprised of the host and path, i.e. example.org/path. Wildcard are expanded to match // applicable traffic, query strings are not matched. Use * for all traffic to your zone. URL *string `json:"url" validate:"required"` }
RatelimitObjectMatchRequest : request.
type RatelimitObjectMatchResponse ¶
type RatelimitObjectMatchResponse struct { // HTTP Status codes, can be one [403], many [401,403] or indicate all by not providing this value. This field is not // required. Status []int64 `json:"status,omitempty"` // Array of response headers to match. If a response does not meet the header criteria then the request will not be // counted towards the rate limit. HeadersVar []RatelimitObjectMatchResponseHeadersItem `json:"headers,omitempty"` // Deprecated, please use response headers instead and also provide "origin_traffic:false" to avoid legacy behaviour // interacting with the response.headers property. OriginTraffic *bool `json:"origin_traffic,omitempty"` }
RatelimitObjectMatchResponse : response.
type RatelimitObjectMatchResponseHeadersItem ¶
type RatelimitObjectMatchResponseHeadersItem struct { // The name of the response header to match. Name *string `json:"name" validate:"required"` // The operator when matchin, eq means equals, ne means not equals. Op *string `json:"op" validate:"required"` // The value of the header, which will be exactly matched. Value *string `json:"value" validate:"required"` }
RatelimitObjectMatchResponseHeadersItem : RatelimitObjectMatchResponseHeadersItem struct
type RatelimitResp ¶
type RatelimitResp 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"` // rate limit object. Result *RatelimitObject `json:"result" validate:"required"` }
RatelimitResp : rate limit response.
type UpdateRateLimitOptions ¶
type UpdateRateLimitOptions struct { // Identifier of rate limit. RateLimitIdentifier *string `json:"rate_limit_identifier" validate:"required,ne="` // Whether this ratelimit is currently disabled. Disabled *bool `json:"disabled,omitempty"` // A note that you can use to describe the reason for a rate limit. Description *string `json:"description,omitempty"` // Criteria that would allow the rate limit to be bypassed, for example to express that you shouldn't apply a rate // limit to a given set of URLs. Bypass []RatelimitInputBypassItem `json:"bypass,omitempty"` // The threshold that triggers the rate limit mitigations, combine with period. i.e. threshold per period. Threshold *int64 `json:"threshold,omitempty"` // The time in seconds to count matching traffic. If the count exceeds threshold within this period the action will be // performed. Period *int64 `json:"period,omitempty"` // action. Action *RatelimitInputAction `json:"action,omitempty"` // Enable NAT based rate limits. Correlate *RatelimitInputCorrelate `json:"correlate,omitempty"` // Determines which traffic the rate limit counts towards the threshold. Needs to be one of "request" or "response" // objects. Match *RatelimitInputMatch `json:"match,omitempty"` // Allows users to set headers on API requests Headers map[string]string }
UpdateRateLimitOptions : The UpdateRateLimit options.
func (*UpdateRateLimitOptions) SetAction ¶
func (options *UpdateRateLimitOptions) SetAction(action *RatelimitInputAction) *UpdateRateLimitOptions
SetAction : Allow user to set Action
func (*UpdateRateLimitOptions) SetBypass ¶
func (options *UpdateRateLimitOptions) SetBypass(bypass []RatelimitInputBypassItem) *UpdateRateLimitOptions
SetBypass : Allow user to set Bypass
func (*UpdateRateLimitOptions) SetCorrelate ¶
func (options *UpdateRateLimitOptions) SetCorrelate(correlate *RatelimitInputCorrelate) *UpdateRateLimitOptions
SetCorrelate : Allow user to set Correlate
func (*UpdateRateLimitOptions) SetDescription ¶
func (options *UpdateRateLimitOptions) SetDescription(description string) *UpdateRateLimitOptions
SetDescription : Allow user to set Description
func (*UpdateRateLimitOptions) SetDisabled ¶
func (options *UpdateRateLimitOptions) SetDisabled(disabled bool) *UpdateRateLimitOptions
SetDisabled : Allow user to set Disabled
func (*UpdateRateLimitOptions) SetHeaders ¶
func (options *UpdateRateLimitOptions) SetHeaders(param map[string]string) *UpdateRateLimitOptions
SetHeaders : Allow user to set Headers
func (*UpdateRateLimitOptions) SetMatch ¶
func (options *UpdateRateLimitOptions) SetMatch(match *RatelimitInputMatch) *UpdateRateLimitOptions
SetMatch : Allow user to set Match
func (*UpdateRateLimitOptions) SetPeriod ¶
func (options *UpdateRateLimitOptions) SetPeriod(period int64) *UpdateRateLimitOptions
SetPeriod : Allow user to set Period
func (*UpdateRateLimitOptions) SetRateLimitIdentifier ¶
func (options *UpdateRateLimitOptions) SetRateLimitIdentifier(rateLimitIdentifier string) *UpdateRateLimitOptions
SetRateLimitIdentifier : Allow user to set RateLimitIdentifier
func (*UpdateRateLimitOptions) SetThreshold ¶
func (options *UpdateRateLimitOptions) SetThreshold(threshold int64) *UpdateRateLimitOptions
SetThreshold : Allow user to set Threshold
type ZoneRateLimitsV1 ¶
type ZoneRateLimitsV1 struct { Service *core.BaseService // Full url-encoded cloud resource name (CRN) of resource instance. Crn *string // Zone identifier of the zone for which rate limit is to be created. ZoneIdentifier *string }
ZoneRateLimitsV1 : Zone Rate Limits
Version: 1.0.1
func NewZoneRateLimitsV1 ¶
func NewZoneRateLimitsV1(options *ZoneRateLimitsV1Options) (service *ZoneRateLimitsV1, err error)
NewZoneRateLimitsV1 : constructs an instance of ZoneRateLimitsV1 with passed in options.
func NewZoneRateLimitsV1UsingExternalConfig ¶
func NewZoneRateLimitsV1UsingExternalConfig(options *ZoneRateLimitsV1Options) (zoneRateLimits *ZoneRateLimitsV1, err error)
NewZoneRateLimitsV1UsingExternalConfig : constructs an instance of ZoneRateLimitsV1 with passed in options and external configuration.
func (*ZoneRateLimitsV1) Clone ¶ added in v0.12.1
func (zoneRateLimits *ZoneRateLimitsV1) Clone() *ZoneRateLimitsV1
Clone makes a copy of "zoneRateLimits" suitable for processing requests.
func (*ZoneRateLimitsV1) CreateZoneRateLimits ¶
func (zoneRateLimits *ZoneRateLimitsV1) CreateZoneRateLimits(createZoneRateLimitsOptions *CreateZoneRateLimitsOptions) (result *RatelimitResp, response *core.DetailedResponse, err error)
CreateZoneRateLimits : Create rate limit Create a new rate limit for a given zone under a service instance.
func (*ZoneRateLimitsV1) CreateZoneRateLimitsWithContext ¶ added in v0.12.1
func (zoneRateLimits *ZoneRateLimitsV1) CreateZoneRateLimitsWithContext(ctx context.Context, createZoneRateLimitsOptions *CreateZoneRateLimitsOptions) (result *RatelimitResp, response *core.DetailedResponse, err error)
CreateZoneRateLimitsWithContext is an alternate form of the CreateZoneRateLimits method which supports a Context parameter
func (*ZoneRateLimitsV1) DeleteZoneRateLimit ¶
func (zoneRateLimits *ZoneRateLimitsV1) DeleteZoneRateLimit(deleteZoneRateLimitOptions *DeleteZoneRateLimitOptions) (result *DeleteRateLimitResp, response *core.DetailedResponse, err error)
DeleteZoneRateLimit : Delete rate limit Delete a rate limit given its id.
func (*ZoneRateLimitsV1) DeleteZoneRateLimitWithContext ¶ added in v0.12.1
func (zoneRateLimits *ZoneRateLimitsV1) DeleteZoneRateLimitWithContext(ctx context.Context, deleteZoneRateLimitOptions *DeleteZoneRateLimitOptions) (result *DeleteRateLimitResp, response *core.DetailedResponse, err error)
DeleteZoneRateLimitWithContext is an alternate form of the DeleteZoneRateLimit method which supports a Context parameter
func (*ZoneRateLimitsV1) DisableRetries ¶ added in v0.12.1
func (zoneRateLimits *ZoneRateLimitsV1) DisableRetries()
DisableRetries disables automatic retries for requests invoked for this service instance.
func (*ZoneRateLimitsV1) EnableRetries ¶ added in v0.12.1
func (zoneRateLimits *ZoneRateLimitsV1) 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 (*ZoneRateLimitsV1) GetEnableGzipCompression ¶ added in v0.12.1
func (zoneRateLimits *ZoneRateLimitsV1) GetEnableGzipCompression() bool
GetEnableGzipCompression returns the service's EnableGzipCompression field
func (*ZoneRateLimitsV1) GetRateLimit ¶
func (zoneRateLimits *ZoneRateLimitsV1) GetRateLimit(getRateLimitOptions *GetRateLimitOptions) (result *RatelimitResp, response *core.DetailedResponse, err error)
GetRateLimit : Get a rate limit Get the details of a rate limit for a given zone under a given service instance.
func (*ZoneRateLimitsV1) GetRateLimitWithContext ¶ added in v0.12.1
func (zoneRateLimits *ZoneRateLimitsV1) GetRateLimitWithContext(ctx context.Context, getRateLimitOptions *GetRateLimitOptions) (result *RatelimitResp, response *core.DetailedResponse, err error)
GetRateLimitWithContext is an alternate form of the GetRateLimit method which supports a Context parameter
func (*ZoneRateLimitsV1) GetServiceURL ¶ added in v0.12.1
func (zoneRateLimits *ZoneRateLimitsV1) GetServiceURL() string
GetServiceURL returns the service URL
func (*ZoneRateLimitsV1) ListAllZoneRateLimits ¶
func (zoneRateLimits *ZoneRateLimitsV1) ListAllZoneRateLimits(listAllZoneRateLimitsOptions *ListAllZoneRateLimitsOptions) (result *ListRatelimitResp, response *core.DetailedResponse, err error)
ListAllZoneRateLimits : List all rate limits The details of Rate Limit for a given zone under a given service instance.
func (*ZoneRateLimitsV1) ListAllZoneRateLimitsWithContext ¶ added in v0.12.1
func (zoneRateLimits *ZoneRateLimitsV1) ListAllZoneRateLimitsWithContext(ctx context.Context, listAllZoneRateLimitsOptions *ListAllZoneRateLimitsOptions) (result *ListRatelimitResp, response *core.DetailedResponse, err error)
ListAllZoneRateLimitsWithContext is an alternate form of the ListAllZoneRateLimits method which supports a Context parameter
func (*ZoneRateLimitsV1) NewCreateZoneRateLimitsOptions ¶
func (*ZoneRateLimitsV1) NewCreateZoneRateLimitsOptions() *CreateZoneRateLimitsOptions
NewCreateZoneRateLimitsOptions : Instantiate CreateZoneRateLimitsOptions
func (*ZoneRateLimitsV1) NewDeleteZoneRateLimitOptions ¶
func (*ZoneRateLimitsV1) NewDeleteZoneRateLimitOptions(rateLimitIdentifier string) *DeleteZoneRateLimitOptions
NewDeleteZoneRateLimitOptions : Instantiate DeleteZoneRateLimitOptions
func (*ZoneRateLimitsV1) NewGetRateLimitOptions ¶
func (*ZoneRateLimitsV1) NewGetRateLimitOptions(rateLimitIdentifier string) *GetRateLimitOptions
NewGetRateLimitOptions : Instantiate GetRateLimitOptions
func (*ZoneRateLimitsV1) NewListAllZoneRateLimitsOptions ¶
func (*ZoneRateLimitsV1) NewListAllZoneRateLimitsOptions() *ListAllZoneRateLimitsOptions
NewListAllZoneRateLimitsOptions : Instantiate ListAllZoneRateLimitsOptions
func (*ZoneRateLimitsV1) NewRatelimitInputAction ¶
func (*ZoneRateLimitsV1) NewRatelimitInputAction(mode string) (model *RatelimitInputAction, err error)
NewRatelimitInputAction : Instantiate RatelimitInputAction (Generic Model Constructor)
func (*ZoneRateLimitsV1) NewRatelimitInputBypassItem ¶
func (*ZoneRateLimitsV1) NewRatelimitInputBypassItem(name string, value string) (model *RatelimitInputBypassItem, err error)
NewRatelimitInputBypassItem : Instantiate RatelimitInputBypassItem (Generic Model Constructor)
func (*ZoneRateLimitsV1) NewRatelimitInputCorrelate ¶
func (*ZoneRateLimitsV1) NewRatelimitInputCorrelate(by string) (model *RatelimitInputCorrelate, err error)
NewRatelimitInputCorrelate : Instantiate RatelimitInputCorrelate (Generic Model Constructor)
func (*ZoneRateLimitsV1) NewRatelimitInputMatchRequest ¶
func (*ZoneRateLimitsV1) NewRatelimitInputMatchRequest(url string) (model *RatelimitInputMatchRequest, err error)
NewRatelimitInputMatchRequest : Instantiate RatelimitInputMatchRequest (Generic Model Constructor)
func (*ZoneRateLimitsV1) NewRatelimitInputMatchResponseHeadersItem ¶
func (*ZoneRateLimitsV1) NewRatelimitInputMatchResponseHeadersItem(name string, op string, value string) (model *RatelimitInputMatchResponseHeadersItem, err error)
NewRatelimitInputMatchResponseHeadersItem : Instantiate RatelimitInputMatchResponseHeadersItem (Generic Model Constructor)
func (*ZoneRateLimitsV1) NewUpdateRateLimitOptions ¶
func (*ZoneRateLimitsV1) NewUpdateRateLimitOptions(rateLimitIdentifier string) *UpdateRateLimitOptions
NewUpdateRateLimitOptions : Instantiate UpdateRateLimitOptions
func (*ZoneRateLimitsV1) SetDefaultHeaders ¶ added in v0.12.1
func (zoneRateLimits *ZoneRateLimitsV1) SetDefaultHeaders(headers http.Header)
SetDefaultHeaders sets HTTP headers to be sent in every request
func (*ZoneRateLimitsV1) SetEnableGzipCompression ¶ added in v0.12.1
func (zoneRateLimits *ZoneRateLimitsV1) SetEnableGzipCompression(enableGzip bool)
SetEnableGzipCompression sets the service's EnableGzipCompression field
func (*ZoneRateLimitsV1) SetServiceURL ¶
func (zoneRateLimits *ZoneRateLimitsV1) SetServiceURL(url string) error
SetServiceURL sets the service URL
func (*ZoneRateLimitsV1) UpdateRateLimit ¶
func (zoneRateLimits *ZoneRateLimitsV1) UpdateRateLimit(updateRateLimitOptions *UpdateRateLimitOptions) (result *RatelimitResp, response *core.DetailedResponse, err error)
UpdateRateLimit : Update rate limit Update an existing rate limit for a given zone under a service instance.
func (*ZoneRateLimitsV1) UpdateRateLimitWithContext ¶ added in v0.12.1
func (zoneRateLimits *ZoneRateLimitsV1) UpdateRateLimitWithContext(ctx context.Context, updateRateLimitOptions *UpdateRateLimitOptions) (result *RatelimitResp, response *core.DetailedResponse, err error)
UpdateRateLimitWithContext is an alternate form of the UpdateRateLimit method which supports a Context parameter
type ZoneRateLimitsV1Options ¶
type ZoneRateLimitsV1Options struct { ServiceName string URL string Authenticator core.Authenticator // Full url-encoded cloud resource name (CRN) of resource instance. Crn *string `validate:"required"` // Zone identifier of the zone for which rate limit is to be created. ZoneIdentifier *string `validate:"required"` }
ZoneRateLimitsV1Options : Service options