Class VpnConnection

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IResource, IVpnConnection, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-24T21:00:29.006Z") @Stability(Stable) public class VpnConnection extends VpnConnectionBase
Define a VPN Connection.

Example:

 // Across all tunnels in the account/region
 Metric allDataOut = VpnConnection.metricAllTunnelDataOut();
 // For a specific vpn connection
 VpnConnection vpnConnection = vpc.addVpnConnection("Dynamic", VpnConnectionOptions.builder()
         .ip("1.2.3.4")
         .build());
 Metric state = vpnConnection.metricTunnelState();
 
  • Constructor Details

    • VpnConnection

      protected VpnConnection(software.amazon.jsii.JsiiObjectRef objRef)
    • VpnConnection

      protected VpnConnection(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • VpnConnection

      @Stability(Stable) public VpnConnection(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull VpnConnectionProps props)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props - This parameter is required.
  • Method Details

    • fromVpnConnectionAttributes

      @Stability(Stable) @NotNull public static IVpnConnection fromVpnConnectionAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull VpnConnectionAttributes attrs)
      Import a VPN connection by supplying all attributes directly.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      attrs - This parameter is required.
    • metricAll

      @Stability(Stable) @NotNull public static Metric metricAll(@NotNull String metricName, @Nullable MetricOptions props)
      Return the given named metric for all VPN connections in the account/region.

      Parameters:
      metricName - This parameter is required.
      props -
    • metricAll

      @Stability(Stable) @NotNull public static Metric metricAll(@NotNull String metricName)
      Return the given named metric for all VPN connections in the account/region.

      Parameters:
      metricName - This parameter is required.
    • metricAllTunnelDataIn

      @Stability(Stable) @NotNull public static Metric metricAllTunnelDataIn(@Nullable MetricOptions props)
      Metric for the tunnel data in of all VPN connections in the account/region.

      Default: sum over 5 minutes

      Parameters:
      props -
    • metricAllTunnelDataIn

      @Stability(Stable) @NotNull public static Metric metricAllTunnelDataIn()
      Metric for the tunnel data in of all VPN connections in the account/region.

      Default: sum over 5 minutes

    • metricAllTunnelDataOut

      @Stability(Stable) @NotNull public static Metric metricAllTunnelDataOut(@Nullable MetricOptions props)
      Metric for the tunnel data out of all VPN connections.

      Default: sum over 5 minutes

      Parameters:
      props -
    • metricAllTunnelDataOut

      @Stability(Stable) @NotNull public static Metric metricAllTunnelDataOut()
      Metric for the tunnel data out of all VPN connections.

      Default: sum over 5 minutes

    • metricAllTunnelState

      @Stability(Stable) @NotNull public static Metric metricAllTunnelState(@Nullable MetricOptions props)
      Metric for the tunnel state of all VPN connections in the account/region.

      Default: average over 5 minutes

      Parameters:
      props -
    • metricAllTunnelState

      @Stability(Stable) @NotNull public static Metric metricAllTunnelState()
      Metric for the tunnel state of all VPN connections in the account/region.

      Default: average over 5 minutes

    • getCustomerGatewayAsn

      @Stability(Stable) @NotNull public Number getCustomerGatewayAsn()
      The ASN of the customer gateway.
      Specified by:
      getCustomerGatewayAsn in interface IVpnConnection
      Specified by:
      getCustomerGatewayAsn in class VpnConnectionBase
    • getCustomerGatewayId

      @Stability(Stable) @NotNull public String getCustomerGatewayId()
      The id of the customer gateway.
      Specified by:
      getCustomerGatewayId in interface IVpnConnection
      Specified by:
      getCustomerGatewayId in class VpnConnectionBase
    • getCustomerGatewayIp

      @Stability(Stable) @NotNull public String getCustomerGatewayIp()
      The ip address of the customer gateway.
      Specified by:
      getCustomerGatewayIp in interface IVpnConnection
      Specified by:
      getCustomerGatewayIp in class VpnConnectionBase
    • getVpnId

      @Stability(Stable) @NotNull public String getVpnId()
      The id of the VPN connection.
      Specified by:
      getVpnId in interface IVpnConnection
      Specified by:
      getVpnId in class VpnConnectionBase