MatchAttributesProperty Struct
Criteria for Network Firewall to use to inspect an individual packet in stateless rule inspection.
Each match attributes set can include one or more items such as IP address, CIDR range, port number, protocol, and TCP flags.
| Source | |
|---|---|
| Type last changed |
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_networkfirewall as networkfirewall } from 'aws-cdk-lib';
const matchAttributesProperty: networkfirewall.CfnRuleGroup.MatchAttributesProperty = {
destinationPorts: [{
fromPort: 123,
toPort: 123,
}],
destinations: [{
addressDefinition: 'addressDefinition',
}],
protocols: [123],
sourcePorts: [{
fromPort: 123,
toPort: 123,
}],
sources: [{
addressDefinition: 'addressDefinition',
}],
tcpFlags: [{
flags: ['flags'],
// the properties below are optional
masks: ['masks'],
}],
};
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_networkfirewall as networkfirewall
match_attributes_property = networkfirewall.CfnRuleGroup.MatchAttributesProperty(
destination_ports=[networkfirewall.CfnRuleGroup.PortRangeProperty(
from_port=123,
to_port=123
)],
destinations=[networkfirewall.CfnRuleGroup.AddressProperty(
address_definition="addressDefinition"
)],
protocols=[123],
source_ports=[networkfirewall.CfnRuleGroup.PortRangeProperty(
from_port=123,
to_port=123
)],
sources=[networkfirewall.CfnRuleGroup.AddressProperty(
address_definition="addressDefinition"
)],
tcp_flags=[networkfirewall.CfnRuleGroup.TCPFlagFieldProperty(
flags=["flags"],
# the properties below are optional
masks=["masks"]
)]
)
// 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.*;
MatchAttributesProperty matchAttributesProperty = 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();
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.NetworkFirewall;
var matchAttributesProperty = new MatchAttributesProperty {
DestinationPorts = new [] { new PortRangeProperty {
FromPort = 123,
ToPort = 123
} },
Destinations = new [] { new AddressProperty {
AddressDefinition = "addressDefinition"
} },
Protocols = new [] { 123 },
SourcePorts = new [] { new PortRangeProperty {
FromPort = 123,
ToPort = 123
} },
Sources = new [] { new AddressProperty {
AddressDefinition = "addressDefinition"
} },
TcpFlags = new [] { new TCPFlagFieldProperty {
Flags = new [] { "flags" },
// the properties below are optional
Masks = new [] { "masks" }
} }
};
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
matchAttributesProperty := &MatchAttributesProperty{
DestinationPorts: []interface{}{
&PortRangeProperty{
FromPort: jsii.Number(123),
ToPort: jsii.Number(123),
},
},
Destinations: []interface{}{
&AddressProperty{
AddressDefinition: jsii.String("addressDefinition"),
},
},
Protocols: []interface{}{
jsii.Number(123),
},
SourcePorts: []interface{}{
&PortRangeProperty{
FromPort: jsii.Number(123),
ToPort: jsii.Number(123),
},
},
Sources: []interface{}{
&AddressProperty{
AddressDefinition: jsii.String("addressDefinition"),
},
},
TcpFlags: []interface{}{
&TCPFlagFieldProperty{
Flags: []*string{
jsii.String("flags"),
},
// the properties below are optional
Masks: []*string{
jsii.String("masks"),
},
},
},
}
Properties
destinationPortsoptionalIResolvable | IResolvable | CfnRuleGroup.PortRangeProperty[]destination_portsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, PortRangeProperty]]]destinationPortsoptionalIResolvableDestinationPortsoptionalIResolvableDestinationPortsoptionalinterface{} #You can specify an individual port, for example 1994 and you can specify a port range, for example 1990:1994 . To match with any port, specify ANY .
This setting is only used for protocols 6 (TCP) and 17 (UDP).
destinationsoptionalIResolvable | IResolvable | CfnRuleGroup.AddressProperty[]destinationsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, AddressProperty]]]destinationsoptionalIResolvableDestinationsoptionalIResolvableDestinationsoptionalinterface{} #If not specified, this matches with any destination address.
protocolsoptionalnumber[] | IResolvableprotocolsoptionaltyping.Union[typing.List[int | float], IResolvable]protocolsoptionalList<Number>Protocolsoptionaldouble[]Protocolsoptionalinterface{} #If not specified, this matches with any protocol.
sourcePortsoptionalIResolvable | IResolvable | CfnRuleGroup.PortRangeProperty[]source_portsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, PortRangeProperty]]]sourcePortsoptionalIResolvableSourcePortsoptionalIResolvableSourcePortsoptionalinterface{} #notes
You can specify an individual port, for example 1994 and you can specify a port range, for example 1990:1994 . To match with any port, specify ANY .
If not specified, this matches with any source port.
This setting is only used for protocols 6 (TCP) and 17 (UDP).
sourcesoptionalIResolvable | IResolvable | CfnRuleGroup.AddressProperty[]sourcesoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, AddressProperty]]]sourcesoptionalIResolvableSourcesoptionalIResolvableSourcesoptionalinterface{} #If not specified, this matches with any source address.
tcpFlagsoptionalIResolvable | IResolvable | CfnRuleGroup.tcp_flagsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, TCPFlagFieldProperty]]]tcpFlagsoptionalIResolvableTcpFlagsoptionalIResolvableTcpFlagsoptionalinterface{} #If not specified, this matches with any settings. This setting is only used for protocol 6 (TCP).