# EgressRuleConfig

Configuration for an egress security group rule.

Extends: EgressRuleConfig
Extends: RuleConfig

- Source: [`aws-ec2/lib/peer.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0/packages/aws-cdk-lib/aws-ec2/lib/peer.ts#L58)
- Type last changed: v2.256.0 · 20 May 2026

## 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',
};
```

## Properties

- `cidrIp`: string — The IPv4 address range, in CIDR format.

  **Default:** No IPv4 CIDR

- `cidrIpv6`: string — The IPv6 address range, in CIDR format.

  **Default:** No IPv6 CIDR

- `destinationPrefixListId`: string — The ID of a destination prefix list.

  **Default:** No destination prefix list

- `destinationSecurityGroupId`: string — The ID of a destination security group.

  **Default:** No destination security group
