# CfnVPCPeeringConnectionProps

Struct · External

Properties for defining a `CfnVPCPeeringConnection`.

Used as props by: [CfnVPCPeeringConnection](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.CfnVPCPeeringConnection.html)

- Source: Generated at build time
- Type last changed: v2.241.0 · 2 Mar 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 cfnVPCPeeringConnectionProps: ec2.CfnVPCPeeringConnectionProps = {
  peerVpcId: 'peerVpcId',
  vpcId: 'vpcId',

  // the properties below are optional
  assumeRoleRegion: 'assumeRoleRegion',
  peerOwnerId: 'peerOwnerId',
  peerRegion: 'peerRegion',
  peerRoleArn: 'peerRoleArn',
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
```

Python:

```python
from aws_cdk import CfnTag
# 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

cfn_vpc_peering_connection_props = ec2.CfnVPCPeeringConnectionProps(
    peer_vpc_id="peerVpcId",
    vpc_id="vpcId",

    # the properties below are optional
    assume_role_region="assumeRoleRegion",
    peer_owner_id="peerOwnerId",
    peer_region="peerRegion",
    peer_role_arn="peerRoleArn",
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)
```

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

CfnVPCPeeringConnectionProps cfnVPCPeeringConnectionProps = CfnVPCPeeringConnectionProps.builder()
        .peerVpcId("peerVpcId")
        .vpcId("vpcId")

        // the properties below are optional
        .assumeRoleRegion("assumeRoleRegion")
        .peerOwnerId("peerOwnerId")
        .peerRegion("peerRegion")
        .peerRoleArn("peerRoleArn")
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .build();
```

C#:

```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 cfnVPCPeeringConnectionProps = new CfnVPCPeeringConnectionProps {
    PeerVpcId = "peerVpcId",
    VpcId = "vpcId",

    // the properties below are optional
    AssumeRoleRegion = "assumeRoleRegion",
    PeerOwnerId = "peerOwnerId",
    PeerRegion = "peerRegion",
    PeerRoleArn = "peerRoleArn",
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } }
};
```

Go:

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

cfnVPCPeeringConnectionProps := &CfnVPCPeeringConnectionProps{
	PeerVpcId: jsii.String("peerVpcId"),
	VpcId: jsii.String("vpcId"),

	// the properties below are optional
	AssumeRoleRegion: jsii.String("assumeRoleRegion"),
	PeerOwnerId: jsii.String("peerOwnerId"),
	PeerRegion: jsii.String("peerRegion"),
	PeerRoleArn: jsii.String("peerRoleArn"),
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}
```

## Properties

- `assumeRoleRegion`: string — The Region code to use when calling Security Token Service (STS) to assume the PeerRoleArn, if provided.

  You can update this property.

- `peerOwnerId`: string — The AWS account ID of the owner of the accepter VPC.

  Default: Your AWS account ID

- `peerRegion`: string — The Region code for the accepter VPC, if the accepter VPC is located in a Region other than the Region in which you make the request.

  Default: The Region in which you make the request.

- `peerRoleArn`: string — The Amazon Resource Name (ARN) of the VPC peer role for the peering connection in another AWS account.

  This is required when you are peering a VPC in a different AWS account.

- `peerVpcId`: string | [IVPCRef](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_ec2.IVPCRef.html) (required) — The ID of the VPC with which you are creating the VPC peering connection.

  You must specify this parameter in the request.

- `tags`: [CfnTag](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — Any tags assigned to the resource.

- `vpcId`: string | [IVPCRef](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_ec2.IVPCRef.html) (required) — The ID of the VPC.
