Interface IVpc

All Superinterfaces:
software.constructs.IConstruct, software.constructs.IDependable, IEnvironmentAware, IResource, IVPCRef, software.amazon.jsii.JsiiSerializable
All Known Subinterfaces:
IVpc.Jsii$Default, IVpcV2, IVpcV2.Jsii$Default
All Known Implementing Classes:
IVpc.Jsii$Proxy, IVpcV2.Jsii$Proxy, Vpc, VpcV2, VpcV2Base

@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)", date="2025-11-13T16:10:03.421Z") @Stability(Stable) public interface IVpc extends software.amazon.jsii.JsiiSerializable, IResource, IVPCRef
  • Method Details

    • getAvailabilityZones

      @Stability(Stable) @NotNull List<String> getAvailabilityZones()
      AZs for this VPC.
    • getInternetConnectivityEstablished

      @Stability(Stable) @NotNull software.constructs.IDependable getInternetConnectivityEstablished()
      Dependable that can be depended upon to force internet connectivity established on the VPC.
    • getIsolatedSubnets

      @Stability(Stable) @NotNull List<ISubnet> getIsolatedSubnets()
      List of isolated subnets in this VPC.
    • getPrivateSubnets

      @Stability(Stable) @NotNull List<ISubnet> getPrivateSubnets()
      List of private subnets in this VPC.
    • getPublicSubnets

      @Stability(Stable) @NotNull List<ISubnet> getPublicSubnets()
      List of public subnets in this VPC.
    • getVpcArn

      @Stability(Stable) @NotNull String getVpcArn()
      ARN for this VPC.
    • getVpcCidrBlock

      @Stability(Stable) @NotNull String getVpcCidrBlock()
      CIDR range for this VPC.
    • getVpcId

      @Stability(Stable) @NotNull String getVpcId()
      Identifier for this VPC.
    • getVpnGatewayId

      @Stability(Stable) @Nullable default String getVpnGatewayId()
      Identifier for the VPN gateway.
    • addClientVpnEndpoint

      @Stability(Stable) @NotNull ClientVpnEndpoint addClientVpnEndpoint(@NotNull String id, @NotNull ClientVpnEndpointOptions options)
      Adds a new client VPN endpoint to this VPC.

      Parameters:
      id - This parameter is required.
      options - This parameter is required.
    • addFlowLog

      @Stability(Stable) @NotNull FlowLog addFlowLog(@NotNull String id, @Nullable FlowLogOptions options)
      Adds a new Flow Log to this VPC.

      Parameters:
      id - This parameter is required.
      options -
    • addFlowLog

      @Stability(Stable) @NotNull FlowLog addFlowLog(@NotNull String id)
      Adds a new Flow Log to this VPC.

      Parameters:
      id - This parameter is required.
    • addGatewayEndpoint

      @Stability(Stable) @NotNull GatewayVpcEndpoint addGatewayEndpoint(@NotNull String id, @NotNull GatewayVpcEndpointOptions options)
      Adds a new gateway endpoint to this VPC.

      Parameters:
      id - This parameter is required.
      options - This parameter is required.
    • addInterfaceEndpoint

      @Stability(Stable) @NotNull InterfaceVpcEndpoint addInterfaceEndpoint(@NotNull String id, @NotNull InterfaceVpcEndpointOptions options)
      Adds a new interface endpoint to this VPC.

      Parameters:
      id - This parameter is required.
      options - This parameter is required.
    • addVpnConnection

      @Stability(Stable) @NotNull VpnConnection addVpnConnection(@NotNull String id, @NotNull VpnConnectionOptions options)
      Adds a new VPN connection to this VPC.

      Parameters:
      id - This parameter is required.
      options - This parameter is required.
    • enableVpnGateway

      @Stability(Stable) void enableVpnGateway(@NotNull EnableVpnGatewayOptions options)
      Adds a VPN Gateway to this VPC.

      Parameters:
      options - This parameter is required.
    • selectSubnets

      @Stability(Stable) @NotNull SelectedSubnets selectSubnets(@Nullable SubnetSelection selection)
      Return information on the subnets appropriate for the given selection strategy.

      Requires that at least one subnet is matched, throws a descriptive error message otherwise.

      Parameters:
      selection -
    • selectSubnets

      @Stability(Stable) @NotNull SelectedSubnets selectSubnets()
      Return information on the subnets appropriate for the given selection strategy.

      Requires that at least one subnet is matched, throws a descriptive error message otherwise.

    • getNode

      @Stability(Stable) @NotNull software.constructs.Node getNode()
      The tree node.
      Specified by:
      getNode in interface software.constructs.IConstruct
    • getEnv

      @Stability(Stable) @NotNull ResourceEnvironment getEnv()
      The environment this resource belongs to.

      For resources that are created and managed in a Stack (those created by creating new class instances like new Role(), new Bucket(), etc.), this is always the same as the environment of the stack they belong to.

      For referenced resources (those obtained from referencing methods like Role.fromRoleArn(), Bucket.fromBucketName(), etc.), they might be different than the stack they were imported into.

      Specified by:
      getEnv in interface IEnvironmentAware