Interface VpcAttributes

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

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:39.558Z") @Stability(Stable) public interface VpcAttributes extends software.amazon.jsii.JsiiSerializable
Properties that reference an external Vpc.

Example:

 ISecurityGroup sg = SecurityGroup.fromSecurityGroupId(this, "FsxSecurityGroup", "{SECURITY-GROUP-ID}");
 IFileSystem fs = LustreFileSystem.fromLustreFileSystemAttributes(this, "FsxLustreFileSystem", FileSystemAttributes.builder()
         .dnsName("{FILE-SYSTEM-DNS-NAME}")
         .fileSystemId("{FILE-SYSTEM-ID}")
         .securityGroup(sg)
         .build());
 IVpc vpc = Vpc.fromVpcAttributes(this, "Vpc", VpcAttributes.builder()
         .availabilityZones(List.of("us-west-2a", "us-west-2b"))
         .publicSubnetIds(List.of("{US-WEST-2A-SUBNET-ID}", "{US-WEST-2B-SUBNET-ID}"))
         .vpcId("{VPC-ID}")
         .build());
 Instance inst = Instance.Builder.create(this, "inst")
         .instanceType(InstanceType.of(InstanceClass.T2, InstanceSize.LARGE))
         .machineImage(AmazonLinuxImage.Builder.create()
                 .generation(AmazonLinuxGeneration.AMAZON_LINUX_2)
                 .build())
         .vpc(vpc)
         .vpcSubnets(SubnetSelection.builder()
                 .subnetType(SubnetType.PUBLIC)
                 .build())
         .build();
 fs.connections.allowDefaultPortFrom(inst);
 
  • 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.

    • 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.

    • getIsolatedSubnetRouteTableIds

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

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

    • 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.

    • 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.

    • getPrivateSubnetRouteTableIds

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

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

    • 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.

    • 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.

    • getPublicSubnetRouteTableIds

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

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

    • 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