class AclCidr
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.EC2.AclCidr |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsec2#AclCidr |
Java | software.amazon.awscdk.services.ec2.AclCidr |
Python | aws_cdk.aws_ec2.AclCidr |
TypeScript (source) | aws-cdk-lib » 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 { aws_ec2 as ec2 } from 'aws-cdk-lib';
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).