Skip to content
v2.278.0

RuleConfig Struct ​

Common configuration properties shared by ingress and egress security group rules.

Example ​

ts
// 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 ruleConfig: ec2.RuleConfig = {
  cidrIp: 'cidrIp',
  cidrIpv6: 'cidrIpv6',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ec2 as ec2

rule_config = ec2.RuleConfig(
    cidr_ip="cidrIp",
    cidr_ipv6="cidrIpv6"
)
java
// 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.*;

RuleConfig ruleConfig = RuleConfig.builder()
        .cidrIp("cidrIp")
        .cidrIpv6("cidrIpv6")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// 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 ruleConfig = new RuleConfig {
    CidrIp = "cidrIp",
    CidrIpv6 = "cidrIpv6"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

ruleConfig := &RuleConfig{
	CidrIp: jsii.String("cidrIp"),
	CidrIpv6: jsii.String("cidrIpv6"),
}

Properties ​

cidrIpoptionalstringcidr_ipoptionalstrcidrIpoptionalStringCidrIpoptionalstringCidrIpoptional*string #
The IPv4 address range, in CIDR format.

Default: No IPv4 CIDR

cidrIpv6optionalstringcidr_ipv6optionalstrcidrIpv6optionalStringCidrIpv6optionalstringCidrIpv6optional*string #
The IPv6 address range, in CIDR format.

Default: No IPv6 CIDR