# VpnConnectionAttributes

Attributes of an imported VpnConnection.

Used as argument in: [VpnConnection.fromVpnConnectionAttributes](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.VpnConnection.html#fromvpnconnectionattributes)

- Source: [`aws-ec2/lib/vpn.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-ec2/lib/vpn.ts#L200)
- Type last changed: v2.43.0 · 21 Sep 2022

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
const vpnConnectionAttributes: ec2.VpnConnectionAttributes = {
  customerGatewayAsn: 123,
  customerGatewayId: 'customerGatewayId',
  customerGatewayIp: 'customerGatewayIp',
  vpnId: 'vpnId',
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ec2 as ec2

vpn_connection_attributes = ec2.VpnConnectionAttributes(
    customer_gateway_asn=123,
    customer_gateway_id="customerGatewayId",
    customer_gateway_ip="customerGatewayIp",
    vpn_id="vpnId"
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.ec2.*;

VpnConnectionAttributes vpnConnectionAttributes = VpnConnectionAttributes.builder()
        .customerGatewayAsn(123)
        .customerGatewayId("customerGatewayId")
        .customerGatewayIp("customerGatewayIp")
        .vpnId("vpnId")
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.EC2;

var vpnConnectionAttributes = new VpnConnectionAttributes {
    CustomerGatewayAsn = 123,
    CustomerGatewayId = "customerGatewayId",
    CustomerGatewayIp = "customerGatewayIp",
    VpnId = "vpnId"
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

vpnConnectionAttributes := &VpnConnectionAttributes{
	CustomerGatewayAsn: jsii.Number(123),
	CustomerGatewayId: jsii.String("customerGatewayId"),
	CustomerGatewayIp: jsii.String("customerGatewayIp"),
	VpnId: jsii.String("vpnId"),
}
```

## Properties

- `customerGatewayAsn`: number (required) — The ASN of the customer gateway.

- `customerGatewayId`: string (required) — The id of the customer gateway.

- `customerGatewayIp`: string (required) — The ip address of the customer gateway.

- `vpnId`: string (required) — The id of the VPN connection.
