# VpcEncryptionControlExclusionsProperty

Describes the exclusion configurations for various resource types in VPC Encryption Control.

For more information, see [Enforce VPC encryption in transit](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-encryption-controls.html) in the *Amazon VPC User Guide*.

- Source: Generated at build time
- Type last changed: v2.264.0 · 10 Aug 2026

## Example

TypeScript:

```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 vpcEncryptionControlExclusionsProperty: ec2.CfnVPC.VpcEncryptionControlExclusionsProperty = {
  egressOnlyInternetGateway: {
    state: 'state',
    stateMessage: 'stateMessage',
  },
  elasticFileSystem: {
    state: 'state',
    stateMessage: 'stateMessage',
  },
  internetGateway: {
    state: 'state',
    stateMessage: 'stateMessage',
  },
  lambda: {
    state: 'state',
    stateMessage: 'stateMessage',
  },
  natGateway: {
    state: 'state',
    stateMessage: 'stateMessage',
  },
  virtualPrivateGateway: {
    state: 'state',
    stateMessage: 'stateMessage',
  },
  vpcLattice: {
    state: 'state',
    stateMessage: 'stateMessage',
  },
  vpcPeering: {
    state: 'state',
    stateMessage: 'stateMessage',
  },
};
```

Python:

```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

vpc_encryption_control_exclusions_property = ec2.CfnVPC.VpcEncryptionControlExclusionsProperty(
    egress_only_internet_gateway=ec2.CfnVPC.VpcEncryptionControlExclusionProperty(
        state="state",
        state_message="stateMessage"
    ),
    elastic_file_system=ec2.CfnVPC.VpcEncryptionControlExclusionProperty(
        state="state",
        state_message="stateMessage"
    ),
    internet_gateway=ec2.CfnVPC.VpcEncryptionControlExclusionProperty(
        state="state",
        state_message="stateMessage"
    ),
    lambda_=ec2.CfnVPC.VpcEncryptionControlExclusionProperty(
        state="state",
        state_message="stateMessage"
    ),
    nat_gateway=ec2.CfnVPC.VpcEncryptionControlExclusionProperty(
        state="state",
        state_message="stateMessage"
    ),
    virtual_private_gateway=ec2.CfnVPC.VpcEncryptionControlExclusionProperty(
        state="state",
        state_message="stateMessage"
    ),
    vpc_lattice=ec2.CfnVPC.VpcEncryptionControlExclusionProperty(
        state="state",
        state_message="stateMessage"
    ),
    vpc_peering=ec2.CfnVPC.VpcEncryptionControlExclusionProperty(
        state="state",
        state_message="stateMessage"
    )
)
```

Java:

```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.*;

VpcEncryptionControlExclusionsProperty vpcEncryptionControlExclusionsProperty = VpcEncryptionControlExclusionsProperty.builder()
        .egressOnlyInternetGateway(VpcEncryptionControlExclusionProperty.builder()
                .state("state")
                .stateMessage("stateMessage")
                .build())
        .elasticFileSystem(VpcEncryptionControlExclusionProperty.builder()
                .state("state")
                .stateMessage("stateMessage")
                .build())
        .internetGateway(VpcEncryptionControlExclusionProperty.builder()
                .state("state")
                .stateMessage("stateMessage")
                .build())
        .lambda(VpcEncryptionControlExclusionProperty.builder()
                .state("state")
                .stateMessage("stateMessage")
                .build())
        .natGateway(VpcEncryptionControlExclusionProperty.builder()
                .state("state")
                .stateMessage("stateMessage")
                .build())
        .virtualPrivateGateway(VpcEncryptionControlExclusionProperty.builder()
                .state("state")
                .stateMessage("stateMessage")
                .build())
        .vpcLattice(VpcEncryptionControlExclusionProperty.builder()
                .state("state")
                .stateMessage("stateMessage")
                .build())
        .vpcPeering(VpcEncryptionControlExclusionProperty.builder()
                .state("state")
                .stateMessage("stateMessage")
                .build())
        .build();
```

C# / .NET:

```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 vpcEncryptionControlExclusionsProperty = new VpcEncryptionControlExclusionsProperty {
    EgressOnlyInternetGateway = new VpcEncryptionControlExclusionProperty {
        State = "state",
        StateMessage = "stateMessage"
    },
    ElasticFileSystem = new VpcEncryptionControlExclusionProperty {
        State = "state",
        StateMessage = "stateMessage"
    },
    InternetGateway = new VpcEncryptionControlExclusionProperty {
        State = "state",
        StateMessage = "stateMessage"
    },
    Lambda = new VpcEncryptionControlExclusionProperty {
        State = "state",
        StateMessage = "stateMessage"
    },
    NatGateway = new VpcEncryptionControlExclusionProperty {
        State = "state",
        StateMessage = "stateMessage"
    },
    VirtualPrivateGateway = new VpcEncryptionControlExclusionProperty {
        State = "state",
        StateMessage = "stateMessage"
    },
    VpcLattice = new VpcEncryptionControlExclusionProperty {
        State = "state",
        StateMessage = "stateMessage"
    },
    VpcPeering = new VpcEncryptionControlExclusionProperty {
        State = "state",
        StateMessage = "stateMessage"
    }
};
```

Golang:

```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"

vpcEncryptionControlExclusionsProperty := &VpcEncryptionControlExclusionsProperty{
	EgressOnlyInternetGateway: &VpcEncryptionControlExclusionProperty{
		State: jsii.String("state"),
		StateMessage: jsii.String("stateMessage"),
	},
	ElasticFileSystem: &VpcEncryptionControlExclusionProperty{
		State: jsii.String("state"),
		StateMessage: jsii.String("stateMessage"),
	},
	InternetGateway: &VpcEncryptionControlExclusionProperty{
		State: jsii.String("state"),
		StateMessage: jsii.String("stateMessage"),
	},
	Lambda: &VpcEncryptionControlExclusionProperty{
		State: jsii.String("state"),
		StateMessage: jsii.String("stateMessage"),
	},
	NatGateway: &VpcEncryptionControlExclusionProperty{
		State: jsii.String("state"),
		StateMessage: jsii.String("stateMessage"),
	},
	VirtualPrivateGateway: &VpcEncryptionControlExclusionProperty{
		State: jsii.String("state"),
		StateMessage: jsii.String("stateMessage"),
	},
	VpcLattice: &VpcEncryptionControlExclusionProperty{
		State: jsii.String("state"),
		StateMessage: jsii.String("stateMessage"),
	},
	VpcPeering: &VpcEncryptionControlExclusionProperty{
		State: jsii.String("state"),
		StateMessage: jsii.String("stateMessage"),
	},
}
```

## Properties

- `egressOnlyInternetGateway`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnVPC.VpcEncryptionControlExclusionProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.CfnVPC.VpcEncryptionControlExclusionProperty.html) — Describes an exclusion configuration for VPC Encryption Control.

  For more information, see [Enforce VPC encryption in transit](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-encryption-controls.html) in the *Amazon VPC User Guide*.

- `elasticFileSystem`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnVPC.VpcEncryptionControlExclusionProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.CfnVPC.VpcEncryptionControlExclusionProperty.html) — Describes an exclusion configuration for VPC Encryption Control.

  For more information, see [Enforce VPC encryption in transit](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-encryption-controls.html) in the *Amazon VPC User Guide*.

- `internetGateway`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnVPC.VpcEncryptionControlExclusionProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.CfnVPC.VpcEncryptionControlExclusionProperty.html) — Describes an exclusion configuration for VPC Encryption Control.

  For more information, see [Enforce VPC encryption in transit](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-encryption-controls.html) in the *Amazon VPC User Guide*.

- `lambda`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnVPC.VpcEncryptionControlExclusionProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.CfnVPC.VpcEncryptionControlExclusionProperty.html) — Describes an exclusion configuration for VPC Encryption Control.

  For more information, see [Enforce VPC encryption in transit](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-encryption-controls.html) in the *Amazon VPC User Guide*.

- `natGateway`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnVPC.VpcEncryptionControlExclusionProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.CfnVPC.VpcEncryptionControlExclusionProperty.html) — Describes an exclusion configuration for VPC Encryption Control.

  For more information, see [Enforce VPC encryption in transit](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-encryption-controls.html) in the *Amazon VPC User Guide*.

- `virtualPrivateGateway`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnVPC.VpcEncryptionControlExclusionProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.CfnVPC.VpcEncryptionControlExclusionProperty.html) — Describes an exclusion configuration for VPC Encryption Control.

  For more information, see [Enforce VPC encryption in transit](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-encryption-controls.html) in the *Amazon VPC User Guide*.

- `vpcLattice`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnVPC.VpcEncryptionControlExclusionProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.CfnVPC.VpcEncryptionControlExclusionProperty.html) — Describes an exclusion configuration for VPC Encryption Control.

  For more information, see [Enforce VPC encryption in transit](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-encryption-controls.html) in the *Amazon VPC User Guide*.

- `vpcPeering`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnVPC.VpcEncryptionControlExclusionProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.CfnVPC.VpcEncryptionControlExclusionProperty.html) — Describes an exclusion configuration for VPC Encryption Control.

  For more information, see [Enforce VPC encryption in transit](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-encryption-controls.html) in the *Amazon VPC User Guide*.
