Class CfnNetworkAclEntry
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.ec2.CfnNetworkAclEntry
- All Implemented Interfaces:
IInspectable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-22T02:24:00.344Z")
@Stability(Stable)
public class CfnNetworkAclEntry
extends CfnResource
implements IInspectable
Specifies an entry, known as a rule, in a network ACL with a rule number you specify.
Each network ACL has a set of numbered ingress rules and a separate set of numbered egress rules.
To create the network ACL, see AWS::EC2::NetworkAcl .
For information about the protocol value, see Protocol Numbers on the Internet Assigned Numbers Authority (IANA) website.
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.ec2.*; CfnNetworkAclEntry cfnNetworkAclEntry = CfnNetworkAclEntry.Builder.create(this, "MyCfnNetworkAclEntry") .networkAclId("networkAclId") .protocol(123) .ruleAction("ruleAction") .ruleNumber(123) // the properties below are optional .cidrBlock("cidrBlock") .egress(false) .icmp(IcmpProperty.builder() .code(123) .type(123) .build()) .ipv6CidrBlock("ipv6CidrBlock") .portRange(PortRangeProperty.builder() .from(123) .to(123) .build()) .build();
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
A fluent builder forCfnNetworkAclEntry
.static interface
Describes the ICMP type and code.static interface
Describes a range of ports.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionprotected
CfnNetworkAclEntry
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnNetworkAclEntry
(software.amazon.jsii.JsiiObjectRef objRef) CfnNetworkAclEntry
(software.constructs.Construct scope, String id, CfnNetworkAclEntryProps props) -
Method Summary
Modifier and TypeMethodDescriptionThe ID of the network ACL entry.The IPv4 CIDR range to allow or deny, in CIDR notation (for example, 172.16.0.0/24).Whether this rule applies to egress traffic from the subnet (true
) or ingress traffic to the subnet (false
).getIcmp()
The Internet Control Message Protocol (ICMP) code and type.The IPv6 network range to allow or deny, in CIDR notation.The ID of the ACL for the entry.The range of port numbers for the UDP/TCP protocol.The IP protocol that the rule applies to.Whether to allow or deny traffic that matches the rule;Rule number to assign to the entry, such as 100.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setCidrBlock
(String value) The IPv4 CIDR range to allow or deny, in CIDR notation (for example, 172.16.0.0/24).void
Whether this rule applies to egress traffic from the subnet (true
) or ingress traffic to the subnet (false
).void
setEgress
(IResolvable value) Whether this rule applies to egress traffic from the subnet (true
) or ingress traffic to the subnet (false
).void
setIcmp
(IResolvable value) The Internet Control Message Protocol (ICMP) code and type.void
The Internet Control Message Protocol (ICMP) code and type.void
setIpv6CidrBlock
(String value) The IPv6 network range to allow or deny, in CIDR notation.void
setNetworkAclId
(String value) The ID of the ACL for the entry.void
setPortRange
(IResolvable value) The range of port numbers for the UDP/TCP protocol.void
The range of port numbers for the UDP/TCP protocol.void
setProtocol
(Number value) The IP protocol that the rule applies to.void
setRuleAction
(String value) Whether to allow or deny traffic that matches the rule;void
setRuleNumber
(Number value) Rule number to assign to the entry, such as 100.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, validateProperties
Methods inherited from class software.amazon.awscdk.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.constructs.Construct
getNode, isConstruct
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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
-
CfnNetworkAclEntry
protected CfnNetworkAclEntry(software.amazon.jsii.JsiiObjectRef objRef) -
CfnNetworkAclEntry
protected CfnNetworkAclEntry(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnNetworkAclEntry
@Stability(Stable) public CfnNetworkAclEntry(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnNetworkAclEntryProps 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:
inspect
in 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:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrId
The ID of the network ACL entry. -
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getNetworkAclId
The ID of the ACL for the entry. -
setNetworkAclId
The ID of the ACL for the entry. -
getProtocol
The IP protocol that the rule applies to. -
setProtocol
The IP protocol that the rule applies to. -
getRuleAction
Whether to allow or deny traffic that matches the rule; -
setRuleAction
Whether to allow or deny traffic that matches the rule; -
getRuleNumber
Rule number to assign to the entry, such as 100. -
setRuleNumber
Rule number to assign to the entry, such as 100. -
getCidrBlock
The IPv4 CIDR range to allow or deny, in CIDR notation (for example, 172.16.0.0/24). You must specify an IPv4 CIDR block or an IPv6 CIDR block. -
setCidrBlock
The IPv4 CIDR range to allow or deny, in CIDR notation (for example, 172.16.0.0/24). You must specify an IPv4 CIDR block or an IPv6 CIDR block. -
getEgress
Whether this rule applies to egress traffic from the subnet (true
) or ingress traffic to the subnet (false
). -
setEgress
Whether this rule applies to egress traffic from the subnet (true
) or ingress traffic to the subnet (false
). -
setEgress
Whether this rule applies to egress traffic from the subnet (true
) or ingress traffic to the subnet (false
). -
getIcmp
The Internet Control Message Protocol (ICMP) code and type. -
setIcmp
The Internet Control Message Protocol (ICMP) code and type. -
setIcmp
The Internet Control Message Protocol (ICMP) code and type. -
getIpv6CidrBlock
The IPv6 network range to allow or deny, in CIDR notation. -
setIpv6CidrBlock
The IPv6 network range to allow or deny, in CIDR notation. -
getPortRange
The range of port numbers for the UDP/TCP protocol. -
setPortRange
The range of port numbers for the UDP/TCP protocol. -
setPortRange
The range of port numbers for the UDP/TCP protocol.
-