AWS SDK for Go (PILOT)
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 https://docs.aws.amazon.com/sdk-for-go/api/.

We welcome your feedback on this new version of the documentation. Send your comments to aws-sdkdocs-feedback@amazon.com.

WebACL

import "github.com/aws/aws-sdk-go/service/waf"

type WebACL struct { DefaultAction *WafAction `type:"structure" required:"true"` MetricName *string `type:"string"` Name *string `min:"1" type:"string"` Rules []*ActivatedRule `type:"list" required:"true"` WebACLArn *string `min:"1" type:"string"` WebACLId *string `min:"1" type:"string" required:"true"` }

Contains the Rules that identify the requests that you want to allow, block, or count. In a WebACL, you also specify a default action (ALLOW or BLOCK), and the action for each Rule that you add to a WebACL, for example, block requests from specified IP addresses or block requests from specified referrers. You also associate the WebACL with a CloudFront distribution to identify the requests that you want AWS WAF to filter. If you add more than one Rule to a WebACL, a request needs to match only one of the specifications to be allowed, blocked, or counted. For more information, see UpdateWebACL.

DefaultAction

For the action that is associated with a rule in a WebACL, specifies the action that you want AWS WAF to perform when a web request matches all of the conditions in a rule. For the default action in a WebACL, specifies the action that you want AWS WAF to take when a web request doesn't match all of the conditions in any of the rules in a WebACL.

MetricName

Type: *string

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

Name

Type: *string

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

Rules

The ActivatedRule object in an UpdateWebACL request specifies a Rule that you want to insert or delete, the priority of the Rule in the WebACL, and the action that you want AWS WAF to take when a web request matches the Rule (ALLOW, BLOCK, or COUNT).

To specify whether to insert or delete a Rule, use the Action parameter in the WebACLUpdate data type.

WebACLArn

Type: *string

Tha Amazon Resource Name (ARN) of the web ACL.

WebACLId

Type: *string

A unique identifier for a WebACL. You use WebACLId to get information about a WebACL (see GetWebACL), update a WebACL (see UpdateWebACL), and delete a WebACL from AWS WAF (see DeleteWebACL).

WebACLId is returned by CreateWebACL and by ListWebACLs.

WebACLId is a required field

Method

GoString

func (s WebACL) GoString() string

GoString returns the string representation

SetDefaultAction

func (s *WebACL) SetDefaultAction(v *WafAction) *WebACL

SetDefaultAction sets the DefaultAction field's value.

SetMetricName

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

SetMetricName sets the MetricName field's value.

SetName

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

SetName sets the Name field's value.

SetRules

func (s *WebACL) SetRules(v []*ActivatedRule) *WebACL

SetRules sets the Rules field's value.

SetWebACLArn

func (s *WebACL) SetWebACLArn(v string) *WebACL

SetWebACLArn sets the WebACLArn field's value.

SetWebACLId

func (s *WebACL) SetWebACLId(v string) *WebACL

SetWebACLId sets the WebACLId field's value.

String

func (s WebACL) String() string

String returns the string representation

On this page: