Skip to content
v2.278.0

IngressRuleConfig Struct ​

Configuration for an ingress security group rule.

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 ingressRuleConfig: ec2.IngressRuleConfig = {
  cidrIp: 'cidrIp',
  cidrIpv6: 'cidrIpv6',
  sourcePrefixListId: 'sourcePrefixListId',
  sourceSecurityGroupId: 'sourceSecurityGroupId',
  sourceSecurityGroupOwnerId: 'sourceSecurityGroupOwnerId',
};
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

ingress_rule_config = ec2.IngressRuleConfig(
    cidr_ip="cidrIp",
    cidr_ipv6="cidrIpv6",
    source_prefix_list_id="sourcePrefixListId",
    source_security_group_id="sourceSecurityGroupId",
    source_security_group_owner_id="sourceSecurityGroupOwnerId"
)
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.*;

IngressRuleConfig ingressRuleConfig = IngressRuleConfig.builder()
        .cidrIp("cidrIp")
        .cidrIpv6("cidrIpv6")
        .sourcePrefixListId("sourcePrefixListId")
        .sourceSecurityGroupId("sourceSecurityGroupId")
        .sourceSecurityGroupOwnerId("sourceSecurityGroupOwnerId")
        .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 ingressRuleConfig = new IngressRuleConfig {
    CidrIp = "cidrIp",
    CidrIpv6 = "cidrIpv6",
    SourcePrefixListId = "sourcePrefixListId",
    SourceSecurityGroupId = "sourceSecurityGroupId",
    SourceSecurityGroupOwnerId = "sourceSecurityGroupOwnerId"
};
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"

ingressRuleConfig := &IngressRuleConfig{
	CidrIp: jsii.String("cidrIp"),
	CidrIpv6: jsii.String("cidrIpv6"),
	SourcePrefixListId: jsii.String("sourcePrefixListId"),
	SourceSecurityGroupId: jsii.String("sourceSecurityGroupId"),
	SourceSecurityGroupOwnerId: jsii.String("sourceSecurityGroupOwnerId"),
}

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

sourcePrefixListIdoptionalstringsource_prefix_list_idoptionalstrsourcePrefixListIdoptionalStringSourcePrefixListIdoptionalstringSourcePrefixListIdoptional*string #
The ID of a source prefix list.

Default: No source prefix list

sourceSecurityGroupIdoptionalstringsource_security_group_idoptionalstrsourceSecurityGroupIdoptionalStringSourceSecurityGroupIdoptionalstringSourceSecurityGroupIdoptional*string #
The ID of a source security group.

Default: No source security group

sourceSecurityGroupOwnerIdoptionalstringsource_security_group_owner_idoptionalstrsourceSecurityGroupOwnerIdoptionalStringSourceSecurityGroupOwnerIdoptionalstringSourceSecurityGroupOwnerIdoptional*string #
The AWS account ID of the owner of a source security group.

Default: No source security group owner ID