EgressRuleConfig Struct
Configuration for an egress security group rule.
| Source | aws-ec2/lib/peer.ts |
|---|---|
| Type last changed |
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 egressRuleConfig: ec2.EgressRuleConfig = {
cidrIp: 'cidrIp',
cidrIpv6: 'cidrIpv6',
destinationPrefixListId: 'destinationPrefixListId',
destinationSecurityGroupId: 'destinationSecurityGroupId',
};
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
egress_rule_config = ec2.EgressRuleConfig(
cidr_ip="cidrIp",
cidr_ipv6="cidrIpv6",
destination_prefix_list_id="destinationPrefixListId",
destination_security_group_id="destinationSecurityGroupId"
)
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.*;
EgressRuleConfig egressRuleConfig = EgressRuleConfig.builder()
.cidrIp("cidrIp")
.cidrIpv6("cidrIpv6")
.destinationPrefixListId("destinationPrefixListId")
.destinationSecurityGroupId("destinationSecurityGroupId")
.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 egressRuleConfig = new EgressRuleConfig {
CidrIp = "cidrIp",
CidrIpv6 = "cidrIpv6",
DestinationPrefixListId = "destinationPrefixListId",
DestinationSecurityGroupId = "destinationSecurityGroupId"
};
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"
egressRuleConfig := &EgressRuleConfig{
CidrIp: jsii.String("cidrIp"),
CidrIpv6: jsii.String("cidrIpv6"),
DestinationPrefixListId: jsii.String("destinationPrefixListId"),
DestinationSecurityGroupId: jsii.String("destinationSecurityGroupId"),
}
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
destinationPrefixListIdoptionalstringdestination_prefix_list_idoptionalstrdestinationPrefixListIdoptionalStringDestinationPrefixListIdoptionalstringDestinationPrefixListIdoptional*string #The ID of a destination prefix list.
Default: No destination prefix list
destinationSecurityGroupIdoptionalstringdestination_security_group_idoptionalstrdestinationSecurityGroupIdoptionalStringDestinationSecurityGroupIdoptionalstringDestinationSecurityGroupIdoptional*string #The ID of a destination security group.
Default: No destination security group