Interface VpcAttributes

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
VpcAttributes.Jsii$Proxy

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-11T03:45:53.537Z") @Stability(Stable) public interface VpcAttributes extends software.amazon.jsii.JsiiSerializable
Properties that reference an external Vpc.

Example:

 IVpc vpc = Vpc.fromVpcAttributes(this, "VPC", VpcAttributes.builder()
         .vpcId("vpc-1234")
         .availabilityZones(List.of("us-east-1a", "us-east-1b"))
         // Either pass literals for all IDs
         .publicSubnetIds(List.of("s-12345", "s-67890"))
         // OR: import a list of known length
         .privateSubnetIds(Fn.importListValue("PrivateSubnetIds", 2))
         // OR: split an imported string to a list of known length
         .isolatedSubnetIds(Fn.split(",", StringParameter.valueForStringParameter(this, "MyParameter"), 2))
         .build());
 
  • Method Details

    • getAvailabilityZones

      @Stability(Stable) @NotNull List<String> getAvailabilityZones()
      List of availability zones for the subnets in this VPC.
    • getVpcId

      @Stability(Stable) @NotNull String getVpcId()
      VPC's identifier.
    • getIsolatedSubnetIds

      @Stability(Stable) @Nullable default List<String> getIsolatedSubnetIds()
      List of isolated subnet IDs.

      Must be undefined or match the availability zones in length and order.

      Default: - The VPC does not have any isolated subnets

    • getIsolatedSubnetIpv4CidrBlocks

      @Stability(Stable) @Nullable default List<String> getIsolatedSubnetIpv4CidrBlocks()
      List of IPv4 CIDR blocks for the isolated subnets.

      Must be undefined or have an entry for every isolated subnet group.

      Default: - Retrieving the IPv4 CIDR block of any isolated subnet will fail

    • getIsolatedSubnetNames

      @Stability(Stable) @Nullable default List<String> getIsolatedSubnetNames()
      List of names for the isolated subnets.

      Must be undefined or have a name for every isolated subnet group.

      Default: - All isolated subnets will have the name `Isolated`

    • getIsolatedSubnetRouteTableIds

      @Stability(Stable) @Nullable default List<String> getIsolatedSubnetRouteTableIds()
      List of IDs of route tables for the isolated subnets.

      Must be undefined or have a name for every isolated subnet group.

      Default: - Retrieving the route table ID of any isolated subnet will fail

    • getPrivateSubnetIds

      @Stability(Stable) @Nullable default List<String> getPrivateSubnetIds()
      List of private subnet IDs.

      Must be undefined or match the availability zones in length and order.

      Default: - The VPC does not have any private subnets

    • getPrivateSubnetIpv4CidrBlocks

      @Stability(Stable) @Nullable default List<String> getPrivateSubnetIpv4CidrBlocks()
      List of IPv4 CIDR blocks for the private subnets.

      Must be undefined or have an entry for every private subnet group.

      Default: - Retrieving the IPv4 CIDR block of any private subnet will fail

    • getPrivateSubnetNames

      @Stability(Stable) @Nullable default List<String> getPrivateSubnetNames()
      List of names for the private subnets.

      Must be undefined or have a name for every private subnet group.

      Default: - All private subnets will have the name `Private`

    • getPrivateSubnetRouteTableIds

      @Stability(Stable) @Nullable default List<String> getPrivateSubnetRouteTableIds()
      List of IDs of route tables for the private subnets.

      Must be undefined or have a name for every private subnet group.

      Default: - Retrieving the route table ID of any private subnet will fail

    • getPublicSubnetIds

      @Stability(Stable) @Nullable default List<String> getPublicSubnetIds()
      List of public subnet IDs.

      Must be undefined or match the availability zones in length and order.

      Default: - The VPC does not have any public subnets

    • getPublicSubnetIpv4CidrBlocks

      @Stability(Stable) @Nullable default List<String> getPublicSubnetIpv4CidrBlocks()
      List of IPv4 CIDR blocks for the public subnets.

      Must be undefined or have an entry for every public subnet group.

      Default: - Retrieving the IPv4 CIDR block of any public subnet will fail

    • getPublicSubnetNames

      @Stability(Stable) @Nullable default List<String> getPublicSubnetNames()
      List of names for the public subnets.

      Must be undefined or have a name for every public subnet group.

      Default: - All public subnets will have the name `Public`

    • getPublicSubnetRouteTableIds

      @Stability(Stable) @Nullable default List<String> getPublicSubnetRouteTableIds()
      List of IDs of route tables for the public subnets.

      Must be undefined or have a name for every public subnet group.

      Default: - Retrieving the route table ID of any public subnet will fail

    • getRegion

      @Stability(Stable) @Nullable default String getRegion()
      The region the VPC is in.

      Default: - The region of the stack where the VPC belongs to

    • getVpcCidrBlock

      @Stability(Stable) @Nullable default String getVpcCidrBlock()
      VPC's CIDR range.

      Default: - Retrieving the CIDR from the VPC will fail

    • getVpnGatewayId

      @Stability(Stable) @Nullable default String getVpnGatewayId()
      VPN gateway's identifier.
    • builder

      @Stability(Stable) static VpcAttributes.Builder builder()
      Returns:
      a VpcAttributes.Builder of VpcAttributes