Interface VpcV2Attributes
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
VpcV2Attributes.Jsii$Proxy
@Generated(value="jsii-pacmak/1.106.0 (build e852934)",
date="2025-02-12T12:32:13.389Z")
@Stability(Experimental)
public interface VpcV2Attributes
extends software.amazon.jsii.JsiiSerializable
(experimental) Options to import a VPC created outside of CDK stack.
Example:
Stack stack = new Stack(); IVpcV2 acceptorVpc = VpcV2.fromVpcV2Attributes(this, "acceptorVpc", VpcV2Attributes.builder() .vpcId("vpc-XXXX") .vpcCidrBlock("10.0.0.0/16") .region("us-east-2") .ownerAccountId("111111111111") .build()); String acceptorRoleArn = "arn:aws:iam::111111111111:role/VpcPeeringRole"; VpcV2 requestorVpc = VpcV2.Builder.create(this, "VpcB") .primaryAddressBlock(IpAddresses.ipv4("10.1.0.0/16")) .build(); VPCPeeringConnection peeringConnection = requestorVpc.createPeeringConnection("crossAccountCrossRegionPeering", VPCPeeringConnectionOptions.builder() .acceptorVpc(acceptorVpc) .peerRoleArn(acceptorRoleArn) .build());
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final class
A builder forVpcV2Attributes
static final class
An implementation forVpcV2Attributes
-
Method Summary
Modifier and TypeMethodDescriptionstatic VpcV2Attributes.Builder
builder()
default String
(experimental) The ID of the AWS account that owns the imported VPC required in case of cross account VPC as given value will be used to set field account for imported VPC, which then later can be used for establishing VPC peering connection.default String
(experimental) Region in which imported VPC is hosted required in case of cross region VPC as given value will be used to set field region for imported VPC, which then later can be used for establishing VPC peering connection.default List<VPCCidrBlockattributes>
(experimental) Import Secondary CIDR blocks associated with VPC.default List<SubnetV2Attributes>
(experimental) Subnets associated with imported VPC.(experimental) Primary VPC CIDR Block of the imported VPC Can only be IPv4.getVpcId()
(experimental) The VPC ID Refers to physical Id of the resource.default String
(experimental) A VPN Gateway is attached to the VPC.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getVpcCidrBlock
(experimental) Primary VPC CIDR Block of the imported VPC Can only be IPv4. -
getVpcId
(experimental) The VPC ID Refers to physical Id of the resource. -
getOwnerAccountId
(experimental) The ID of the AWS account that owns the imported VPC required in case of cross account VPC as given value will be used to set field account for imported VPC, which then later can be used for establishing VPC peering connection.Default: - constructed with stack account value
-
getRegion
(experimental) Region in which imported VPC is hosted required in case of cross region VPC as given value will be used to set field region for imported VPC, which then later can be used for establishing VPC peering connection.Default: - constructed with stack region value
-
getSecondaryCidrBlocks
(experimental) Import Secondary CIDR blocks associated with VPC.Default: - No secondary IP address
-
getSubnets
(experimental) Subnets associated with imported VPC.Default: - no subnets provided to be imported
-
getVpnGatewayId
(experimental) A VPN Gateway is attached to the VPC.Default: - No VPN Gateway
-
builder
- Returns:
- a
VpcV2Attributes.Builder
ofVpcV2Attributes
-