Class VpnConnection
Define a VPN Connection.
Inherited Members
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class VpnConnection : VpnConnectionBase, IVpnConnection, IResource
Syntax (vb)
Public Class VpnConnection
Inherits VpnConnectionBase
Implements IVpnConnection, IResource
Remarks
Resource: AWS::EC2::VPNConnection
ExampleMetadata: fixture=with-vpc infused
Examples
// Across all tunnels in the account/region
var allDataOut = VpnConnection.MetricAllTunnelDataOut();
// For a specific vpn connection
var vpnConnection = vpc.AddVpnConnection("Dynamic", new VpnConnectionOptions {
Ip = "1.2.3.4"
});
var state = vpnConnection.MetricTunnelState();
Synopsis
Constructors
VpnConnection(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
VpnConnection(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
VpnConnection(Construct, String, IVpnConnectionProps) |
Properties
CustomerGatewayAsn | The ASN of the customer gateway. |
CustomerGatewayId | The id of the customer gateway. |
CustomerGatewayIp | The ip address of the customer gateway. |
VpnId | The id of the VPN connection. |
Methods
FromVpnConnectionAttributes(Construct, String, IVpnConnectionAttributes) | Import a VPN connection by supplying all attributes directly. |
MetricAll(String, IMetricOptions) | Return the given named metric for all VPN connections in the account/region. |
MetricAllTunnelDataIn(IMetricOptions) | Metric for the tunnel data in of all VPN connections in the account/region. |
MetricAllTunnelDataOut(IMetricOptions) | Metric for the tunnel data out of all VPN connections. |
MetricAllTunnelState(IMetricOptions) | Metric for the tunnel state of all VPN connections in the account/region. |
Constructors
VpnConnection(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected VpnConnection(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
VpnConnection(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected VpnConnection(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
VpnConnection(Construct, String, IVpnConnectionProps)
public VpnConnection(Construct scope, string id, IVpnConnectionProps props)
Parameters
- scope Constructs.Construct
- id System.String
- props IVpnConnectionProps
Properties
CustomerGatewayAsn
The ASN of the customer gateway.
public override double CustomerGatewayAsn { get; }
Property Value
System.Double
Overrides
CustomerGatewayId
The id of the customer gateway.
public override string CustomerGatewayId { get; }
Property Value
System.String
Overrides
CustomerGatewayIp
The ip address of the customer gateway.
public override string CustomerGatewayIp { get; }
Property Value
System.String
Overrides
VpnId
The id of the VPN connection.
public override string VpnId { get; }
Property Value
System.String
Overrides
Methods
FromVpnConnectionAttributes(Construct, String, IVpnConnectionAttributes)
Import a VPN connection by supplying all attributes directly.
public static IVpnConnection FromVpnConnectionAttributes(Construct scope, string id, IVpnConnectionAttributes attrs)
Parameters
- scope Constructs.Construct
- id System.String
- attrs IVpnConnectionAttributes
Returns
MetricAll(String, IMetricOptions)
Return the given named metric for all VPN connections in the account/region.
public static Metric MetricAll(string metricName, IMetricOptions props = null)
Parameters
- metricName System.String
- props IMetricOptions
Returns
MetricAllTunnelDataIn(IMetricOptions)
Metric for the tunnel data in of all VPN connections in the account/region.
public static Metric MetricAllTunnelDataIn(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Default: sum over 5 minutes
MetricAllTunnelDataOut(IMetricOptions)
Metric for the tunnel data out of all VPN connections.
public static Metric MetricAllTunnelDataOut(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Default: sum over 5 minutes
MetricAllTunnelState(IMetricOptions)
Metric for the tunnel state of all VPN connections in the account/region.
public static Metric MetricAllTunnelState(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Default: average over 5 minutes