Class CfnWebACL
This is AWS WAF Classic documentation.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.WAF
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnWebACL : CfnResource, IInspectable
Syntax (vb)
Public Class CfnWebACL
Inherits CfnResource
Implements IInspectable
Remarks
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.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-waf-webacl.html
CloudformationResource: AWS::WAF::WebACL
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(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 |
CfnWebACL(Construct, String, ICfnWebACLProps) |
Properties
AttrId | |
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(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
CfnWebACL(Construct, String, ICfnWebACLProps)
public CfnWebACL(Construct scope, string id, ICfnWebACLProps props)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnWebACLProps
Resource properties.
Properties
AttrId
public virtual string AttrId { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Id
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
MetricName
The name of the metrics for this WebACL
.
public virtual string MetricName { get; set; }
Property Value
System.String
Name
A friendly name or description of the WebACL
.
public virtual string Name { get; set; }
Property Value
System.String
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
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>