class VpnConnectionBase
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.EC2.VpnConnectionBase |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsec2#VpnConnectionBase |
![]() | software.amazon.awscdk.services.ec2.VpnConnectionBase |
![]() | aws_cdk.aws_ec2.VpnConnectionBase |
![]() | aws-cdk-lib » aws_ec2 » VpnConnectionBase |
Implements
IConstruct
, IDependable
, IResource
, IVpn
Extends
Resource
Implemented by
Vpn
Base class for Vpn connections.
Initializer
new VpnConnectionBase(scope: Construct, id: string, props?: ResourceProps)
Parameters
- scope
Construct
- id
string
- props
Resource
Props
Properties
Name | Type | Description |
---|---|---|
customer | number | The ASN of the customer gateway. |
customer | string | The id of the customer gateway. |
customer | string | The ip address of the customer gateway. |
env | Resource | The environment this resource belongs to. |
node | Node | The tree node. |
stack | Stack | The stack in which this resource is defined. |
vpn | string | The id of the VPN connection. |
customerGatewayAsn
Type:
number
The ASN of the customer gateway.
customerGatewayId
Type:
string
The id of the customer gateway.
customerGatewayIp
Type:
string
The ip address of the customer gateway.
env
Type:
Resource
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
node
Type:
Node
The tree node.
stack
Type:
Stack
The stack in which this resource is defined.
vpnId
Type:
string
The id of the VPN connection.
Methods
Name | Description |
---|---|
apply | Apply the given removal policy to this resource. |
metric(metricName, props?) | Return the given named metric for this VPNConnection. |
metric | The bytes received through the VPN tunnel. |
metric | The bytes sent through the VPN tunnel. |
metric | The state of the tunnel. 0 indicates DOWN and 1 indicates UP. |
to | Returns a string representation of this construct. |
applyRemovalPolicy(policy)
public applyRemovalPolicy(policy: RemovalPolicy): void
Parameters
- policy
Removal
Policy
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY
), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN
).
metric(metricName, props?)
public metric(metricName: string, props?: MetricOptions): Metric
Parameters
- metricName
string
- props
Metric
Options
Returns
Return the given named metric for this VPNConnection.
metricTunnelDataIn(props?)
public metricTunnelDataIn(props?: MetricOptions): Metric
Parameters
- props
Metric
Options
Returns
The bytes received through the VPN tunnel.
Sum over 5 minutes
metricTunnelDataOut(props?)
public metricTunnelDataOut(props?: MetricOptions): Metric
Parameters
- props
Metric
Options
Returns
The bytes sent through the VPN tunnel.
Sum over 5 minutes
metricTunnelState(props?)
public metricTunnelState(props?: MetricOptions): Metric
Parameters
- props
Metric
Options
Returns
The state of the tunnel. 0 indicates DOWN and 1 indicates UP.
Average over 5 minutes
toString()
public toString(): string
Returns
string
Returns a string representation of this construct.