class AclCidr
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.EC2.AclCidr |
Java | software.amazon.awscdk.services.ec2.AclCidr |
Python | aws_cdk.aws_ec2.AclCidr |
TypeScript (source) | @aws-cdk/aws-ec2 » AclCidr |
Either an IPv4 or an IPv6 CIDR.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as ec2 from '@aws-cdk/aws-ec2';
const aclCidr = ec2.AclCidr.anyIpv4();
Initializer
new AclCidr()
Methods
Name | Description |
---|---|
to | |
static any | The CIDR containing all IPv4 addresses (i.e., 0.0.0.0/0). |
static any | The CIDR containing all IPv6 addresses (i.e., ::/0). |
static ipv4(ipv4Cidr) | An IP network range in CIDR notation (for example, 172.16.0.0/24). |
static ipv6(ipv6Cidr) | An IPv6 network range in CIDR notation (for example, 2001:db8::/48). |
CidrConfig()
topublic toCidrConfig(): AclCidrConfig
Returns
Ipv4()
static anypublic static anyIpv4(): AclCidr
Returns
The CIDR containing all IPv4 addresses (i.e., 0.0.0.0/0).
Ipv6()
static anypublic static anyIpv6(): AclCidr
Returns
The CIDR containing all IPv6 addresses (i.e., ::/0).
static ipv4(ipv4Cidr)
public static ipv4(ipv4Cidr: string): AclCidr
Parameters
- ipv4Cidr
string
Returns
An IP network range in CIDR notation (for example, 172.16.0.0/24).
static ipv6(ipv6Cidr)
public static ipv6(ipv6Cidr: string): AclCidr
Parameters
- ipv6Cidr
string
Returns
An IPv6 network range in CIDR notation (for example, 2001:db8::/48).