# NetworkInterfaceOptionsProperty

Describes the network interface options when creating an AWS Verified Access endpoint using the `network-interface` type.

- Source: Generated at build time
- Type last changed: v2.178.0 · 6 Feb 2025

## 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 networkInterfaceOptionsProperty: ec2.CfnVerifiedAccessEndpoint.NetworkInterfaceOptionsProperty = {
  networkInterfaceId: 'networkInterfaceId',
  port: 123,
  portRanges: [{
    fromPort: 123,
    toPort: 123,
  }],
  protocol: 'protocol',
};
```

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

network_interface_options_property = ec2.CfnVerifiedAccessEndpoint.NetworkInterfaceOptionsProperty(
    network_interface_id="networkInterfaceId",
    port=123,
    port_ranges=[ec2.CfnVerifiedAccessEndpoint.PortRangeProperty(
        from_port=123,
        to_port=123
    )],
    protocol="protocol"
)
```

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.*;

NetworkInterfaceOptionsProperty networkInterfaceOptionsProperty = NetworkInterfaceOptionsProperty.builder()
        .networkInterfaceId("networkInterfaceId")
        .port(123)
        .portRanges(List.of(PortRangeProperty.builder()
                .fromPort(123)
                .toPort(123)
                .build()))
        .protocol("protocol")
        .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 networkInterfaceOptionsProperty = new NetworkInterfaceOptionsProperty {
    NetworkInterfaceId = "networkInterfaceId",
    Port = 123,
    PortRanges = new [] { new PortRangeProperty {
        FromPort = 123,
        ToPort = 123
    } },
    Protocol = "protocol"
};
```

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"

networkInterfaceOptionsProperty := &NetworkInterfaceOptionsProperty{
	NetworkInterfaceId: jsii.String("networkInterfaceId"),
	Port: jsii.Number(123),
	PortRanges: []interface{}{
		&PortRangeProperty{
			FromPort: jsii.Number(123),
			ToPort: jsii.Number(123),
		},
	},
	Protocol: jsii.String("protocol"),
}
```

## Properties

- `networkInterfaceId`: string — The ID of the network interface.

- `port`: number — The IP port number.

- `portRanges`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnVerifiedAccessEndpoint.PortRangeProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.CfnVerifiedAccessEndpoint.PortRangeProperty.html)[] — The port ranges.

- `protocol`: string — The IP protocol.
