Class CfnNetworkAclEntry
Specifies an entry, known as a rule, in a network ACL with a rule number you specify.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnNetworkAclEntry : CfnResource, IInspectable
Syntax (vb)
Public Class CfnNetworkAclEntry
Inherits CfnResource
Implements IInspectable
Remarks
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.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-networkaclentry.html
CloudformationResource: AWS::EC2::NetworkAclEntry
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.EC2;
var cfnNetworkAclEntry = new CfnNetworkAclEntry(this, "MyCfnNetworkAclEntry", new CfnNetworkAclEntryProps {
NetworkAclId = "networkAclId",
Protocol = 123,
RuleAction = "ruleAction",
RuleNumber = 123,
// the properties below are optional
CidrBlock = "cidrBlock",
Egress = false,
Icmp = new IcmpProperty {
Code = 123,
Type = 123
},
Ipv6CidrBlock = "ipv6CidrBlock",
PortRange = new PortRangeProperty {
From = 123,
To = 123
}
});
Synopsis
Constructors
CfnNetworkAclEntry(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnNetworkAclEntry(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
CfnNetworkAclEntry(Construct, String, ICfnNetworkAclEntryProps) |
Properties
AttrId | The ID of the network ACL entry. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
CidrBlock | 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. |
Egress | Whether this rule applies to egress traffic from the subnet ( |
Icmp | The Internet Control Message Protocol (ICMP) code and type. |
Ipv6CidrBlock | The IPv6 network range to allow or deny, in CIDR notation. |
NetworkAclId | The ID of the ACL for the entry. |
PortRange | The range of port numbers for the UDP/TCP protocol. |
Protocol | The IP protocol that the rule applies to. |
RuleAction | Whether to allow or deny traffic that matches the rule; |
RuleNumber | Rule number to assign to the entry, such as 100. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnNetworkAclEntry(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnNetworkAclEntry(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnNetworkAclEntry(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnNetworkAclEntry(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
CfnNetworkAclEntry(Construct, String, ICfnNetworkAclEntryProps)
public CfnNetworkAclEntry(Construct scope, string id, ICfnNetworkAclEntryProps 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 ICfnNetworkAclEntryProps
Resource properties.
Properties
AttrId
The ID of the network ACL entry.
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
CidrBlock
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.
public virtual string CidrBlock { get; set; }
Property Value
System.String
Egress
Whether this rule applies to egress traffic from the subnet ( true
) or ingress traffic to the subnet ( false
).
public virtual object Egress { get; set; }
Property Value
System.Object
Icmp
The Internet Control Message Protocol (ICMP) code and type.
public virtual object Icmp { get; set; }
Property Value
System.Object
Ipv6CidrBlock
The IPv6 network range to allow or deny, in CIDR notation.
public virtual string Ipv6CidrBlock { get; set; }
Property Value
System.String
NetworkAclId
The ID of the ACL for the entry.
public virtual string NetworkAclId { get; set; }
Property Value
System.String
PortRange
The range of port numbers for the UDP/TCP protocol.
public virtual object PortRange { get; set; }
Property Value
System.Object
Protocol
The IP protocol that the rule applies to.
public virtual double Protocol { get; set; }
Property Value
System.Double
RuleAction
Whether to allow or deny traffic that matches the rule;
public virtual string RuleAction { get; set; }
Property Value
System.String
RuleNumber
Rule number to assign to the entry, such as 100.
public virtual double RuleNumber { get; set; }
Property Value
System.Double
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>