Class CfnVPCPeeringConnectionPropsMixin

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.Mixin
software.amazon.awscdk.cfnpropertymixins.services.ec2.CfnVPCPeeringConnectionPropsMixin
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable, software.constructs.IMixin

@Generated(value="jsii-pacmak/1.127.0 (build 2117ad5)", date="2026-03-11T13:19:58.766Z") @Stability(Stable) public class CfnVPCPeeringConnectionPropsMixin extends Mixin implements software.constructs.IMixin
Requests a VPC peering connection between two VPCs: a requester VPC that you own and an accepter VPC with which to create the connection.

The accepter VPC can belong to a different AWS account and can be in a different Region than the requester VPC.

The requester VPC and accepter VPC cannot have overlapping CIDR blocks. If you create a VPC peering connection request between VPCs with overlapping CIDR blocks, the VPC peering connection has a status of failed .

If the VPCs belong to different accounts, the acceptor account must have a role that allows the requester account to accept the VPC peering connection. For an example, see Walkthrough: Peer with a VPC in another AWS account .

If the requester and acceptor VPCs are in the same account, the peering request is accepted without a peering role.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.cfnpropertymixins.services.ec2.*;
 import software.amazon.awscdk.*;
 IMergeStrategy mergeStrategy;
 CfnVPCPeeringConnectionPropsMixin cfnVPCPeeringConnectionPropsMixin = CfnVPCPeeringConnectionPropsMixin.Builder.create(CfnVPCPeeringConnectionMixinProps.builder()
         .assumeRoleRegion("assumeRoleRegion")
         .peerOwnerId("peerOwnerId")
         .peerRegion("peerRegion")
         .peerRoleArn("peerRoleArn")
         .peerVpcId("peerVpcId")
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .vpcId("vpcId")
         .build())
 .strategy(mergeStrategy)
 .build();
 

See Also:
  • Field Details

    • CFN_PROPERTY_KEYS

      @Stability(Stable) protected static final List<String> CFN_PROPERTY_KEYS
  • Constructor Details

    • CfnVPCPeeringConnectionPropsMixin

      protected CfnVPCPeeringConnectionPropsMixin(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnVPCPeeringConnectionPropsMixin

      protected CfnVPCPeeringConnectionPropsMixin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnVPCPeeringConnectionPropsMixin

      @Stability(Stable) public CfnVPCPeeringConnectionPropsMixin(@NotNull CfnVPCPeeringConnectionMixinProps props, @Nullable CfnPropertyMixinOptions options)
      Create a mixin to apply properties to AWS::EC2::VPCPeeringConnection.

      Parameters:
      props - L1 properties to apply. This parameter is required.
      options - Mixin options.
    • CfnVPCPeeringConnectionPropsMixin

      @Stability(Stable) public CfnVPCPeeringConnectionPropsMixin(@NotNull CfnVPCPeeringConnectionMixinProps props)
      Create a mixin to apply properties to AWS::EC2::VPCPeeringConnection.

      Parameters:
      props - L1 properties to apply. This parameter is required.
  • Method Details

    • applyTo

      @Stability(Stable) public void applyTo(@NotNull software.constructs.IConstruct construct)
      Apply the mixin properties to the construct.

      Specified by:
      applyTo in interface software.constructs.IMixin
      Specified by:
      applyTo in class Mixin
      Parameters:
      construct - This parameter is required.
    • supports

      @Stability(Stable) @NotNull public Boolean supports(@NotNull software.constructs.IConstruct construct)
      Check if this mixin supports the given construct.

      Specified by:
      supports in interface software.constructs.IMixin
      Overrides:
      supports in class Mixin
      Parameters:
      construct - This parameter is required.
    • getProps

      @Stability(Stable) @NotNull protected CfnVPCPeeringConnectionMixinProps getProps()
    • getStrategy

      @Stability(Stable) @NotNull protected IMergeStrategy getStrategy()