API Reference

PREVIEW DOCUMENTATION - This is a preview of a new format for the AWS SDK for Go API Reference documentation. For the current AWS SDK for Go API Reference, see

We welcome your feedback on this new version of the documentation. Send your comments to


import ""

type CreateRateBasedRuleInput struct { ChangeToken *string `min:"1" type:"string" required:"true"` MetricName *string `type:"string" required:"true"` Name *string `min:"1" type:"string" required:"true"` RateKey *string `type:"string" required:"true" enum:"RateKey"` RateLimit *int64 `min:"2000" type:"long" required:"true"` }


Type: *string

The ChangeToken that you used to submit the CreateRateBasedRule request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus.

ChangeToken is a required field


Type: *string

A friendly name or description for the metrics for this RateBasedRule. The name can contain only alphanumeric characters (A-Z, a-z, 0-9); the name can't contain whitespace. You can't change the name of the metric after you create the RateBasedRule.

MetricName is a required field


Type: *string

A friendly name or description of the RateBasedRule. You can't change the name of a RateBasedRule after you create it.

Name is a required field


Type: *string

The field that AWS WAF uses to determine if requests are likely arriving from a single source and thus subject to rate monitoring. The only valid value for RateKey is IP. IP indicates that requests that arrive from the same IP address are subject to the RateLimit that is specified in the RateBasedRule.

RateKey is a required field


Type: *int64

The maximum number of requests, which have an identical value in the field that is specified by RateKey, allowed in a five-minute period. If the number of requests exceeds the RateLimit and the other predicates specified in the rule are also met, AWS WAF triggers the action that is specified for this rule.

RateLimit is a required field



func (s CreateRateBasedRuleInput) GoString() string

GoString returns the string representation


func (s *CreateRateBasedRuleInput) SetChangeToken(v string) *CreateRateBasedRuleInput

SetChangeToken sets the ChangeToken field's value.


func (s *CreateRateBasedRuleInput) SetMetricName(v string) *CreateRateBasedRuleInput

SetMetricName sets the MetricName field's value.


func (s *CreateRateBasedRuleInput) SetName(v string) *CreateRateBasedRuleInput

SetName sets the Name field's value.


func (s *CreateRateBasedRuleInput) SetRateKey(v string) *CreateRateBasedRuleInput

SetRateKey sets the RateKey field's value.


func (s *CreateRateBasedRuleInput) SetRateLimit(v int64) *CreateRateBasedRuleInput

SetRateLimit sets the RateLimit field's value.


func (s CreateRateBasedRuleInput) String() string

String returns the string representation


func (s *CreateRateBasedRuleInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

On this page: