Class CfnVPCPeeringConnection.Builder

java.lang.Object
software.amazon.awscdk.services.ec2.CfnVPCPeeringConnection.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<CfnVPCPeeringConnection>
Enclosing class:
CfnVPCPeeringConnection

@Stability(Stable) public static final class CfnVPCPeeringConnection.Builder extends Object implements software.amazon.jsii.Builder<CfnVPCPeeringConnection>
A fluent builder for CfnVPCPeeringConnection.
  • Method Details

    • create

      @Stability(Stable) public static CfnVPCPeeringConnection.Builder create(Construct scope, String id)
      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      This parameter is required.
      Returns:
      a new instance of CfnVPCPeeringConnection.Builder.
    • peerVpcId

      @Stability(Stable) public CfnVPCPeeringConnection.Builder peerVpcId(String peerVpcId)
      The ID of the VPC with which you are creating the VPC peering connection.

      You must specify this parameter in the request.

      Parameters:
      peerVpcId - The ID of the VPC with which you are creating the VPC peering connection. This parameter is required.
      Returns:
      this
    • vpcId

      @Stability(Stable) public CfnVPCPeeringConnection.Builder vpcId(String vpcId)
      The ID of the VPC.

      Parameters:
      vpcId - The ID of the VPC. This parameter is required.
      Returns:
      this
    • peerOwnerId

      @Stability(Stable) public CfnVPCPeeringConnection.Builder peerOwnerId(String peerOwnerId)
      The AWS account ID of the owner of the accepter VPC.

      Default: Your AWS account ID

      Parameters:
      peerOwnerId - The AWS account ID of the owner of the accepter VPC. This parameter is required.
      Returns:
      this
    • peerRegion

      @Stability(Stable) public CfnVPCPeeringConnection.Builder peerRegion(String peerRegion)
      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.

      Parameters:
      peerRegion - 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. This parameter is required.
      Returns:
      this
    • peerRoleArn

      @Stability(Stable) public CfnVPCPeeringConnection.Builder peerRoleArn(String peerRoleArn)
      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.

      Parameters:
      peerRoleArn - The Amazon Resource Name (ARN) of the VPC peer role for the peering connection in another AWS account. This parameter is required.
      Returns:
      this
    • tags

      @Stability(Stable) public CfnVPCPeeringConnection.Builder tags(List<? extends CfnTag> tags)
      Any tags assigned to the resource.

      Parameters:
      tags - Any tags assigned to the resource. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public CfnVPCPeeringConnection build()
      Specified by:
      build in interface software.amazon.jsii.Builder<CfnVPCPeeringConnection>
      Returns:
      a newly built instance of CfnVPCPeeringConnection.