Class CfnWebACL
A CloudFormation AWS::WAF::WebACL
.
Inherited Members
Namespace: Amazon.CDK.AWS.WAF
Assembly: Amazon.CDK.AWS.WAF.dll
Syntax (csharp)
public class CfnWebACL : CfnResource, IConstruct, IDependable, IInspectable
Syntax (vb)
Public Class CfnWebACL
Inherits CfnResource
Implements IConstruct, IDependable, IInspectable
Remarks
This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide.
For the latest version of AWS WAF , use the AWS WAF V2 API and see the AWS WAF Developer Guide . With the latest version, AWS WAF has a single set of endpoints for regional and global use.
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 Amazon 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.
CloudformationResource: AWS::WAF::WebACL
Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-waf-webacl.html
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.WAF;
var cfnWebACL = new CfnWebACL(this, "MyCfnWebACL", new CfnWebACLProps {
DefaultAction = new WafActionProperty {
Type = "type"
},
MetricName = "metricName",
Name = "name",
// the properties below are optional
Rules = new [] { new ActivatedRuleProperty {
Priority = 123,
RuleId = "ruleId",
// the properties below are optional
Action = new WafActionProperty {
Type = "type"
}
} }
});
Synopsis
Constructors
CfnWebACL(Construct, String, ICfnWebACLProps) | Create a new |
CfnWebACL(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnWebACL(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
DefaultAction | The action to perform if none of the |
MetricName | The name of the metrics for this |
Name | A friendly name or description of the |
Rules | An array that contains the action for each |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnWebACL(Construct, String, ICfnWebACLProps)
Create a new AWS::WAF::WebACL
.
public CfnWebACL(Construct scope, string id, ICfnWebACLProps props)
Parameters
- scope Construct
- scope in which this resource is defined.
- id System.String
- scoped id of the resource.
- props ICfnWebACLProps
- resource properties.
CfnWebACL(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnWebACL(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnWebACL(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnWebACL(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
DefaultAction
The action to perform if none of the Rules
contained in the WebACL
match.
public virtual object DefaultAction { get; set; }
Property Value
System.Object
Remarks
The action is specified by the WafAction
object.
MetricName
The name of the metrics for this WebACL
.
public virtual string MetricName { get; set; }
Property Value
System.String
Remarks
The name can contain only alphanumeric characters (A-Z, a-z, 0-9), with maximum length 128 and minimum length one. It can't contain whitespace or metric names reserved for AWS WAF , including "All" and "Default_Action." You can't change MetricName
after you create the WebACL
.
Name
A friendly name or description of the WebACL
.
public virtual string Name { get; set; }
Property Value
System.String
Remarks
You can't change the name of a WebACL
after you create it.
Rules
An array that contains the action for each Rule
in a WebACL
, the priority of the Rule
, and the ID of the Rule
.
public virtual object Rules { get; set; }
Property Value
System.Object
Remarks
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
- tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>