# NetworkInterfaceSpecificationRequestProperty

- Source: Generated at build time
- Type last changed: v2.251.0 · 24 Apr 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_ec2 as ec2 } from 'aws-cdk-lib';
const networkInterfaceSpecificationRequestProperty: ec2.CfnEC2Fleet.NetworkInterfaceSpecificationRequestProperty = {
  associatePublicIpAddress: false,
  deleteOnTermination: false,
  description: 'description',
  deviceIndex: 123,
  groups: ['groups'],
  interfaceType: 'interfaceType',
  ipv6AddressCount: 123,
  ipv6Addresses: [{
    ipv6Address: 'ipv6Address',
  }],
  networkCardIndex: 123,
  networkInterfaceId: 'networkInterfaceId',
  privateIpAddress: 'privateIpAddress',
  privateIpAddresses: [{
    primary: false,
    privateIpAddress: 'privateIpAddress',
  }],
  secondaryPrivateIpAddressCount: 123,
  subnetId: 'subnetId',
};
```

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_specification_request_property = ec2.CfnEC2Fleet.NetworkInterfaceSpecificationRequestProperty(
    associate_public_ip_address=False,
    delete_on_termination=False,
    description="description",
    device_index=123,
    groups=["groups"],
    interface_type="interfaceType",
    ipv6_address_count=123,
    ipv6_addresses=[ec2.CfnEC2Fleet.Ipv6AddressRequestProperty(
        ipv6_address="ipv6Address"
    )],
    network_card_index=123,
    network_interface_id="networkInterfaceId",
    private_ip_address="privateIpAddress",
    private_ip_addresses=[ec2.CfnEC2Fleet.PrivateIpAddressSpecificationRequestProperty(
        primary=False,
        private_ip_address="privateIpAddress"
    )],
    secondary_private_ip_address_count=123,
    subnet_id="subnetId"
)
```

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

NetworkInterfaceSpecificationRequestProperty networkInterfaceSpecificationRequestProperty = NetworkInterfaceSpecificationRequestProperty.builder()
        .associatePublicIpAddress(false)
        .deleteOnTermination(false)
        .description("description")
        .deviceIndex(123)
        .groups(List.of("groups"))
        .interfaceType("interfaceType")
        .ipv6AddressCount(123)
        .ipv6Addresses(List.of(Ipv6AddressRequestProperty.builder()
                .ipv6Address("ipv6Address")
                .build()))
        .networkCardIndex(123)
        .networkInterfaceId("networkInterfaceId")
        .privateIpAddress("privateIpAddress")
        .privateIpAddresses(List.of(PrivateIpAddressSpecificationRequestProperty.builder()
                .primary(false)
                .privateIpAddress("privateIpAddress")
                .build()))
        .secondaryPrivateIpAddressCount(123)
        .subnetId("subnetId")
        .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 networkInterfaceSpecificationRequestProperty = new NetworkInterfaceSpecificationRequestProperty {
    AssociatePublicIpAddress = false,
    DeleteOnTermination = false,
    Description = "description",
    DeviceIndex = 123,
    Groups = new [] { "groups" },
    InterfaceType = "interfaceType",
    Ipv6AddressCount = 123,
    Ipv6Addresses = new [] { new Ipv6AddressRequestProperty {
        Ipv6Address = "ipv6Address"
    } },
    NetworkCardIndex = 123,
    NetworkInterfaceId = "networkInterfaceId",
    PrivateIpAddress = "privateIpAddress",
    PrivateIpAddresses = new [] { new PrivateIpAddressSpecificationRequestProperty {
        Primary = false,
        PrivateIpAddress = "privateIpAddress"
    } },
    SecondaryPrivateIpAddressCount = 123,
    SubnetId = "subnetId"
};
```

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"

networkInterfaceSpecificationRequestProperty := &NetworkInterfaceSpecificationRequestProperty{
	AssociatePublicIpAddress: jsii.Boolean(false),
	DeleteOnTermination: jsii.Boolean(false),
	Description: jsii.String("description"),
	DeviceIndex: jsii.Number(123),
	Groups: []*string{
		jsii.String("groups"),
	},
	InterfaceType: jsii.String("interfaceType"),
	Ipv6AddressCount: jsii.Number(123),
	Ipv6Addresses: []interface{}{
		&Ipv6AddressRequestProperty{
			Ipv6Address: jsii.String("ipv6Address"),
		},
	},
	NetworkCardIndex: jsii.Number(123),
	NetworkInterfaceId: jsii.String("networkInterfaceId"),
	PrivateIpAddress: jsii.String("privateIpAddress"),
	PrivateIpAddresses: []interface{}{
		&PrivateIpAddressSpecificationRequestProperty{
			Primary: jsii.Boolean(false),
			PrivateIpAddress: jsii.String("privateIpAddress"),
		},
	},
	SecondaryPrivateIpAddressCount: jsii.Number(123),
	SubnetId: jsii.String("subnetId"),
}
```

## Properties

- `associatePublicIpAddress`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html)

- `deleteOnTermination`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html)

- `description`: string

- `deviceIndex`: number

- `groups`: string[]

- `interfaceType`: string

- `ipv6AddressCount`: number

- `ipv6Addresses`: [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) | [CfnEC2Fleet.Ipv6AddressRequestProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.CfnEC2Fleet.Ipv6AddressRequestProperty.html)[]

- `networkCardIndex`: number

- `networkInterfaceId`: string

- `privateIpAddress`: string

- `privateIpAddresses`: [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) | [CfnEC2Fleet.PrivateIpAddressSpecificationRequestProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.CfnEC2Fleet.PrivateIpAddressSpecificationRequestProperty.html)[]

- `secondaryPrivateIpAddressCount`: number

- `subnetId`: string
