@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:38.253Z") @Stability(value=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.
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();
| Modifier and Type | Class and Description |
|---|---|
static class |
CfnNetworkAclEntry.Builder
A fluent builder for
CfnNetworkAclEntry. |
static interface |
CfnNetworkAclEntry.IcmpProperty
Describes the ICMP type and code.
|
static interface |
CfnNetworkAclEntry.PortRangeProperty
Describes a range of ports.
|
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnNetworkAclEntry(software.constructs.Construct scope,
String id,
CfnNetworkAclEntryProps props)
Create a new `AWS::EC2::NetworkAclEntry`.
|
protected |
CfnNetworkAclEntry(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnNetworkAclEntry(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
String |
getAttrId()
The ID of the network ACL entry.
|
protected Map<String,Object> |
getCfnProperties() |
String |
getCidrBlock()
The IPv4 CIDR range to allow or deny, in CIDR notation (for example, 172.16.0.0/24).
|
Object |
getEgress()
Whether this rule applies to egress traffic from the subnet ( `true` ) or ingress traffic to the subnet ( `false` ).
|
Object |
getIcmp()
The Internet Control Message Protocol (ICMP) code and type.
|
String |
getIpv6CidrBlock()
The IPv6 network range to allow or deny, in CIDR notation.
|
String |
getNetworkAclId()
The ID of the ACL for the entry.
|
Object |
getPortRange()
The range of port numbers for the UDP/TCP protocol.
|
Number |
getProtocol()
The IP protocol that the rule applies to.
|
String |
getRuleAction()
Whether to allow or deny traffic that matches the rule;
|
Number |
getRuleNumber()
Rule number to assign to the entry, such as 100.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
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 |
setEgress(Boolean value)
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(CfnNetworkAclEntry.IcmpProperty value)
The Internet Control Message Protocol (ICMP) code and type.
|
void |
setIcmp(IResolvable value)
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(CfnNetworkAclEntry.PortRangeProperty value)
The range of port numbers for the UDP/TCP protocol.
|
void |
setPortRange(IResolvable value)
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.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnNetworkAclEntry(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnNetworkAclEntry(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnNetworkAclEntry(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
CfnNetworkAclEntryProps props)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.props - - resource properties. This parameter is required.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull public String getAttrId()
@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public String getNetworkAclId()
@Stability(value=Stable)
public void setNetworkAclId(@NotNull
String value)
@Stability(value=Stable) @NotNull public Number getProtocol()
You must specify -1 or a protocol number. You can specify -1 for all protocols.
If you specify -1, all ports are opened and the
PortRangeproperty is ignored.
@Stability(value=Stable)
public void setProtocol(@NotNull
Number value)
You must specify -1 or a protocol number. You can specify -1 for all protocols.
If you specify -1, all ports are opened and the
PortRangeproperty is ignored.
@Stability(value=Stable) @NotNull public String getRuleAction()
valid values are "allow" or "deny".
@Stability(value=Stable)
public void setRuleAction(@NotNull
String value)
valid values are "allow" or "deny".
@Stability(value=Stable) @NotNull public Number getRuleNumber()
ACL entries are processed in ascending order by rule number. Entries can't use the same rule number unless one is an egress rule and the other is an ingress rule.
@Stability(value=Stable)
public void setRuleNumber(@NotNull
Number value)
ACL entries are processed in ascending order by rule number. Entries can't use the same rule number unless one is an egress rule and the other is an ingress rule.
@Stability(value=Stable) @Nullable public String getCidrBlock()
@Stability(value=Stable)
public void setCidrBlock(@Nullable
String value)
@Stability(value=Stable) @Nullable public Object getEgress()
By default, AWS CloudFormation specifies false .
@Stability(value=Stable)
public void setEgress(@Nullable
Boolean value)
By default, AWS CloudFormation specifies false .
@Stability(value=Stable)
public void setEgress(@Nullable
IResolvable value)
By default, AWS CloudFormation specifies false .
@Stability(value=Stable) @Nullable public Object getIcmp()
Requirement is conditional: Required if specifying 1 (ICMP) for the protocol parameter.
@Stability(value=Stable)
public void setIcmp(@Nullable
CfnNetworkAclEntry.IcmpProperty value)
Requirement is conditional: Required if specifying 1 (ICMP) for the protocol parameter.
@Stability(value=Stable)
public void setIcmp(@Nullable
IResolvable value)
Requirement is conditional: Required if specifying 1 (ICMP) for the protocol parameter.
@Stability(value=Stable) @Nullable public String getIpv6CidrBlock()
Requirement is conditional: You must specify the CidrBlock or Ipv6CidrBlock property.
@Stability(value=Stable)
public void setIpv6CidrBlock(@Nullable
String value)
Requirement is conditional: You must specify the CidrBlock or Ipv6CidrBlock property.
@Stability(value=Stable) @Nullable public Object getPortRange()
Conditional required if specifying 6 (TCP) or 17 (UDP) for the protocol parameter.
@Stability(value=Stable)
public void setPortRange(@Nullable
CfnNetworkAclEntry.PortRangeProperty value)
Conditional required if specifying 6 (TCP) or 17 (UDP) for the protocol parameter.
@Stability(value=Stable)
public void setPortRange(@Nullable
IResolvable value)
Conditional required if specifying 6 (TCP) or 17 (UDP) for the protocol parameter.
Copyright © 2022. All rights reserved.