# VpcInterfaceProperty

The details of a VPC interface.

> When configuring VPC interfaces for NDI outputs, keep in mind the following:
>
> - VPC interfaces must be defined as nested attributes within the `AWS::MediaConnect::Flow` resource, and not within the top-level `AWS::MediaConnect::FlowVpcInterface` resource.
> - There's a maximum limit of three VPC interfaces for each flow. If you've already reached this limit, you can't update the flow to use a different VPC interface without first removing an existing one.
>
> To update your VPC interfaces in this scenario, you must first remove the VPC interface that’s not being used. Next, add the new VPC interfaces. Lastly, update the `VpcInterfaceAdapter` in the `NDIConfig` property. These changes must be performed as separate manual operations and cannot be done through a single template update.

- Source: Generated at build time
- Type last changed: v2.245.0 · 27 Mar 2026

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_mediaconnect as mediaconnect } from 'aws-cdk-lib';
const vpcInterfaceProperty: mediaconnect.CfnFlow.VpcInterfaceProperty = {
  name: 'name',
  roleArn: 'roleArn',
  securityGroupIds: ['securityGroupIds'],
  subnetId: 'subnetId',

  // the properties below are optional
  networkInterfaceIds: ['networkInterfaceIds'],
  networkInterfaceType: 'networkInterfaceType',
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
```

Python:

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

vpc_interface_property = mediaconnect.CfnFlow.VpcInterfaceProperty(
    name="name",
    role_arn="roleArn",
    security_group_ids=["securityGroupIds"],
    subnet_id="subnetId",

    # the properties below are optional
    network_interface_ids=["networkInterfaceIds"],
    network_interface_type="networkInterfaceType",
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)
```

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

VpcInterfaceProperty vpcInterfaceProperty = VpcInterfaceProperty.builder()
        .name("name")
        .roleArn("roleArn")
        .securityGroupIds(List.of("securityGroupIds"))
        .subnetId("subnetId")

        // the properties below are optional
        .networkInterfaceIds(List.of("networkInterfaceIds"))
        .networkInterfaceType("networkInterfaceType")
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .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.MediaConnect;

var vpcInterfaceProperty = new VpcInterfaceProperty {
    Name = "name",
    RoleArn = "roleArn",
    SecurityGroupIds = new [] { "securityGroupIds" },
    SubnetId = "subnetId",

    // the properties below are optional
    NetworkInterfaceIds = new [] { "networkInterfaceIds" },
    NetworkInterfaceType = "networkInterfaceType",
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } }
};
```

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"

vpcInterfaceProperty := &VpcInterfaceProperty{
	Name: jsii.String("name"),
	RoleArn: jsii.String("roleArn"),
	SecurityGroupIds: []*string{
		jsii.String("securityGroupIds"),
	},
	SubnetId: jsii.String("subnetId"),

	// the properties below are optional
	NetworkInterfaceIds: []*string{
		jsii.String("networkInterfaceIds"),
	},
	NetworkInterfaceType: jsii.String("networkInterfaceType"),
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}
```

## Properties

- `name`: string (required) — Immutable and has to be a unique against other VpcInterfaces in this Flow.

- `networkInterfaceIds`: string[] — IDs of the network interfaces created in customer's account by MediaConnect .

- `networkInterfaceType`: string — The type of network interface.

- `roleArn`: string (required) — A role Arn MediaConnect can assume to create ENIs in your account.

- `securityGroupIds`: string[] (required) — Security Group IDs to be used on ENI.

- `subnetId`: string (required) — Subnet must be in the AZ of the Flow.

- `tags`: [CfnTag](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — Key-value pairs that can be used to tag this VPC interface.
