# CfnPrefixListProps

Properties for defining a `CfnPrefixList`.

Used as props by: [CfnPrefixList](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.CfnPrefixList.html)

- Source: Generated at build time
- Type last changed: v2.129.0 · 21 Feb 2024

## 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 cfnPrefixListProps: ec2.CfnPrefixListProps = {
  addressFamily: 'addressFamily',
  prefixListName: 'prefixListName',

  // the properties below are optional
  entries: [{
    cidr: 'cidr',

    // the properties below are optional
    description: 'description',
  }],
  maxEntries: 123,
  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_ec2 as ec2

cfn_prefix_list_props = ec2.CfnPrefixListProps(
    address_family="addressFamily",
    prefix_list_name="prefixListName",

    # the properties below are optional
    entries=[ec2.CfnPrefixList.EntryProperty(
        cidr="cidr",

        # the properties below are optional
        description="description"
    )],
    max_entries=123,
    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.ec2.*;

CfnPrefixListProps cfnPrefixListProps = CfnPrefixListProps.builder()
        .addressFamily("addressFamily")
        .prefixListName("prefixListName")

        // the properties below are optional
        .entries(List.of(EntryProperty.builder()
                .cidr("cidr")

                // the properties below are optional
                .description("description")
                .build()))
        .maxEntries(123)
        .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.EC2;

var cfnPrefixListProps = new CfnPrefixListProps {
    AddressFamily = "addressFamily",
    PrefixListName = "prefixListName",

    // the properties below are optional
    Entries = new [] { new EntryProperty {
        Cidr = "cidr",

        // the properties below are optional
        Description = "description"
    } },
    MaxEntries = 123,
    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"

cfnPrefixListProps := &CfnPrefixListProps{
	AddressFamily: jsii.String("addressFamily"),
	PrefixListName: jsii.String("prefixListName"),

	// the properties below are optional
	Entries: []interface{}{
		&EntryProperty{
			Cidr: jsii.String("cidr"),

			// the properties below are optional
			Description: jsii.String("description"),
		},
	},
	MaxEntries: jsii.Number(123),
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}
```

## Properties

- `addressFamily`: string (required) — The IP address type.

  Valid Values: `IPv4` | `IPv6`

- `entries`: [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) | [CfnPrefixList.EntryProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.CfnPrefixList.EntryProperty.html)[] — The entries for the prefix list.

- `maxEntries`: number — The maximum number of entries for the prefix list.

  You can't modify the entries and the size of a prefix list at the same time.

  This property is required when you create a prefix list.

- `prefixListName`: string (required) — A name for the prefix list.

  Constraints: Up to 255 characters in length. The name cannot start with `com.amazonaws` .

- `tags`: [CfnTag](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — The tags for the prefix list.
