Class VpnConnection
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.core.Construct
software.amazon.awscdk.core.Resource
software.amazon.awscdk.services.ec2.VpnConnectionBase
software.amazon.awscdk.services.ec2.VpnConnection
- All Implemented Interfaces:
IConstruct
,IDependable
,IResource
,IVpnConnection
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:39.589Z")
@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();
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IResource
IResource.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.ec2.IVpnConnection
IVpnConnection.Jsii$Default
-
Constructor Summary
ModifierConstructorDescriptionprotected
VpnConnection
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
VpnConnection
(software.amazon.jsii.JsiiObjectRef objRef) VpnConnection
(software.constructs.Construct scope, String id, VpnConnectionProps props) -
Method Summary
Modifier and TypeMethodDescriptionstatic IVpnConnection
fromVpnConnectionAttributes
(software.constructs.Construct scope, String id, VpnConnectionAttributes attrs) Import a VPN connection by supplying all attributes directly.The ASN of the customer gateway.The id of the customer gateway.The ip address of the customer gateway.getVpnId()
The id of the VPN connection.static Metric
Return the given named metric for all VPN connections in the account/region.static Metric
metricAll
(String metricName, MetricOptions props) Return the given named metric for all VPN connections in the account/region.static Metric
Metric for the tunnel data in of all VPN connections in the account/region.static Metric
Metric for the tunnel data in of all VPN connections in the account/region.static Metric
Metric for the tunnel data out of all VPN connections.static Metric
Metric for the tunnel data out of all VPN connections.static Metric
Metric for the tunnel state of all VPN connections in the account/region.static Metric
Metric for the tunnel state of all VPN connections in the account/region.Methods inherited from class software.amazon.awscdk.services.ec2.VpnConnectionBase
metric, metric, metricTunnelDataIn, metricTunnelDataIn, metricTunnelDataOut, metricTunnelDataOut, metricTunnelState, metricTunnelState
Methods inherited from class software.amazon.awscdk.core.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResource
Methods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
Methods inherited from class software.constructs.Construct
toString
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.awscdk.core.IConstruct
getNode
Methods inherited from interface software.amazon.awscdk.core.IResource
applyRemovalPolicy, getEnv, getStack
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
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
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
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
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
Metric for the tunnel state of all VPN connections in the account/region.Default: average over 5 minutes
-
getCustomerGatewayAsn
The ASN of the customer gateway.- Specified by:
getCustomerGatewayAsn
in interfaceIVpnConnection
- Specified by:
getCustomerGatewayAsn
in classVpnConnectionBase
-
getCustomerGatewayId
The id of the customer gateway.- Specified by:
getCustomerGatewayId
in interfaceIVpnConnection
- Specified by:
getCustomerGatewayId
in classVpnConnectionBase
-
getCustomerGatewayIp
The ip address of the customer gateway.- Specified by:
getCustomerGatewayIp
in interfaceIVpnConnection
- Specified by:
getCustomerGatewayIp
in classVpnConnectionBase
-
getVpnId
The id of the VPN connection.- Specified by:
getVpnId
in interfaceIVpnConnection
- Specified by:
getVpnId
in classVpnConnectionBase
-