Class CfnRuleGroup
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.networkfirewall.CfnRuleGroup
- All Implemented Interfaces:
IInspectable,ITaggable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-06T23:25:13.100Z")
@Stability(Stable)
public class CfnRuleGroup
extends CfnResource
implements IInspectable, ITaggable
Use the
RuleGroup to define a reusable collection of stateless or stateful network traffic filtering rules.
You use rule groups in an FirewallPolicy to specify the filtering behavior of an Firewall .
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.networkfirewall.*;
CfnRuleGroup cfnRuleGroup = CfnRuleGroup.Builder.create(this, "MyCfnRuleGroup")
.capacity(123)
.ruleGroupName("ruleGroupName")
.type("type")
// the properties below are optional
.description("description")
.ruleGroup(RuleGroupProperty.builder()
.rulesSource(RulesSourceProperty.builder()
.rulesSourceList(RulesSourceListProperty.builder()
.generatedRulesType("generatedRulesType")
.targets(List.of("targets"))
.targetTypes(List.of("targetTypes"))
.build())
.rulesString("rulesString")
.statefulRules(List.of(StatefulRuleProperty.builder()
.action("action")
.header(HeaderProperty.builder()
.destination("destination")
.destinationPort("destinationPort")
.direction("direction")
.protocol("protocol")
.source("source")
.sourcePort("sourcePort")
.build())
.ruleOptions(List.of(RuleOptionProperty.builder()
.keyword("keyword")
// the properties below are optional
.settings(List.of("settings"))
.build()))
.build()))
.statelessRulesAndCustomActions(StatelessRulesAndCustomActionsProperty.builder()
.statelessRules(List.of(StatelessRuleProperty.builder()
.priority(123)
.ruleDefinition(RuleDefinitionProperty.builder()
.actions(List.of("actions"))
.matchAttributes(MatchAttributesProperty.builder()
.destinationPorts(List.of(PortRangeProperty.builder()
.fromPort(123)
.toPort(123)
.build()))
.destinations(List.of(AddressProperty.builder()
.addressDefinition("addressDefinition")
.build()))
.protocols(List.of(123))
.sourcePorts(List.of(PortRangeProperty.builder()
.fromPort(123)
.toPort(123)
.build()))
.sources(List.of(AddressProperty.builder()
.addressDefinition("addressDefinition")
.build()))
.tcpFlags(List.of(TCPFlagFieldProperty.builder()
.flags(List.of("flags"))
// the properties below are optional
.masks(List.of("masks"))
.build()))
.build())
.build())
.build()))
// the properties below are optional
.customActions(List.of(CustomActionProperty.builder()
.actionDefinition(ActionDefinitionProperty.builder()
.publishMetricAction(PublishMetricActionProperty.builder()
.dimensions(List.of(DimensionProperty.builder()
.value("value")
.build()))
.build())
.build())
.actionName("actionName")
.build()))
.build())
.build())
// the properties below are optional
.referenceSets(ReferenceSetsProperty.builder()
.ipSetReferences(Map.of(
"ipSetReferencesKey", Map.of(
"referenceArn", "referenceArn")))
.build())
.ruleVariables(RuleVariablesProperty.builder()
.ipSets(Map.of(
"ipSetsKey", Map.of(
"definition", List.of("definition"))))
.portSets(Map.of(
"portSetsKey", PortSetProperty.builder()
.definition(List.of("definition"))
.build()))
.build())
.statefulRuleOptions(StatefulRuleOptionsProperty.builder()
.ruleOrder("ruleOrder")
.build())
.build())
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceA custom action to use in stateless rule actions settings.static interfaceA single IP address specification.static final classA fluent builder forCfnRuleGroup.static interfaceAn optional, non-standard action to use for stateless packet handling.static interfaceThe value to use in an Amazon CloudWatch custom metric dimension.static interfaceThe 5-tuple criteria for AWS Network Firewall to use to inspect packet headers in stateful traffic flow inspection.static interfaceA list of IP addresses and address ranges, in CIDR notation.static interfaceConfigures one or moreIPSetReferencesfor a Suricata-compatible rule group.static interfaceCriteria for Network Firewall to use to inspect an individual packet in stateless rule inspection.static interfaceA single port range specification.static interfaceA set of port ranges for use in the rules in a rule group.static interfaceStateless inspection criteria that publishes the specified metrics to Amazon CloudWatch for the matching packet.static interfaceConfigures theReferenceSetsfor a stateful rule group.static interfaceThe inspection criteria and action for a single stateless rule.static interfaceThe object that defines the rules in a rule group.static interfaceAdditional settings for a stateful rule.static interfaceStateful inspection criteria for a domain list rule group.static interfaceThe stateless or stateful rules definitions for use in a single rule group.static interfaceSettings that are available for use in the rules in theRuleGroupwhere this is defined.static interfaceAdditional options governing how Network Firewall handles the rule group.static interfaceA single Suricata rules specification, for use in a stateful rule group.static interfaceA single stateless rule.static interfaceStateless inspection criteria.static interfaceTCP flags and masks to inspect packets for.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnRuleGroup(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnRuleGroup(software.amazon.jsii.JsiiObjectRef objRef) CfnRuleGroup(software.constructs.Construct scope, String id, CfnRuleGroupProps props) -
Method Summary
Modifier and TypeMethodDescriptionThe Amazon Resource Name (ARN) of theRuleGroup.The unique ID of theRuleGroupresource.The maximum operating resources that this rule group can use.A description of the rule group.An object that defines the rule group rules.The descriptive name of the rule group.getTags()Tag Manager which manages the tags for this resource.An array of key-value pairs to apply to this resource.getType()Indicates whether the rule group is stateless or stateful.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetCapacity(Number value) The maximum operating resources that this rule group can use.voidsetDescription(String value) A description of the rule group.voidsetRuleGroup(IResolvable value) An object that defines the rule group rules.voidAn object that defines the rule group rules.voidsetRuleGroupName(String value) The descriptive name of the rule group.voidsetTagsRaw(List<CfnTag> value) An array of key-value pairs to apply to this resource.voidIndicates whether the rule group is stateless or stateful.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnRuleGroup
protected CfnRuleGroup(software.amazon.jsii.JsiiObjectRef objRef) -
CfnRuleGroup
protected CfnRuleGroup(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnRuleGroup
@Stability(Stable) public CfnRuleGroup(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnRuleGroupProps props) - Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties. This parameter is required.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrRuleGroupArn
The Amazon Resource Name (ARN) of theRuleGroup. -
getAttrRuleGroupId
The unique ID of theRuleGroupresource. -
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getTags
Tag Manager which manages the tags for this resource. -
getCapacity
The maximum operating resources that this rule group can use. -
setCapacity
The maximum operating resources that this rule group can use. -
getRuleGroupName
The descriptive name of the rule group. -
setRuleGroupName
The descriptive name of the rule group. -
getType
Indicates whether the rule group is stateless or stateful. -
setType
Indicates whether the rule group is stateless or stateful. -
getDescription
A description of the rule group. -
setDescription
A description of the rule group. -
getRuleGroup
An object that defines the rule group rules. -
setRuleGroup
An object that defines the rule group rules. -
setRuleGroup
An object that defines the rule group rules. -
getTagsRaw
An array of key-value pairs to apply to this resource. -
setTagsRaw
An array of key-value pairs to apply to this resource.
-