CfnVPCPeeringConnectionProps Struct
Properties for defining a CfnVPCPeeringConnection.
| Source | |
|---|---|
| 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 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
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
// 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();
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
// 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
assumeRoleRegionoptionalstringassume_role_regionoptionalstrassumeRoleRegionoptionalStringAssumeRoleRegionoptionalstringAssumeRoleRegionoptional*string #The Region code to use when calling Security Token Service (STS) to assume the PeerRoleArn, if provided.
You can update this property.
peerOwnerIdoptionalstringpeer_owner_idoptionalstrpeerOwnerIdoptionalStringPeerOwnerIdoptionalstringPeerOwnerIdoptional*string #The AWS account ID of the owner of the accepter VPC.
Default: Your AWS account ID
peerRegionoptionalstringpeer_regionoptionalstrpeerRegionoptionalStringPeerRegionoptionalstringPeerRegionoptional*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.
peerRoleArnoptionalstringpeer_role_arnoptionalstrpeerRoleArnoptionalStringPeerRoleArnoptionalstringPeerRoleArnoptional*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.
peerVpcIdstring | IVPCRefpeer_vpc_idtyping.Union[str, IVPCRef]peerVpcIdStringPeerVpcIdstringPeerVpcIdinterface{} required #The ID of the VPC with which you are creating the VPC peering connection.
You must specify this parameter in the request.