CfnPrefixListProps Struct
Properties for defining a CfnPrefixList.
| Source | |
|---|---|
| Type last changed |
Example
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
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
// 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();
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"
} }
};
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
addressFamilystringaddress_familystraddressFamilyStringAddressFamilystringAddressFamily*string required #The IP address type.
Valid Values: IPv4 | IPv6
entriesoptionalIResolvable | IResolvable | CfnPrefixList.EntryProperty[]entriesoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, EntryProperty]]]entriesoptionalIResolvableEntriesoptionalIResolvableEntriesoptionalinterface{} #The entries for the prefix list.
maxEntriesoptionalnumbermax_entriesoptionalint | floatmaxEntriesoptionalNumberMaxEntriesoptionaldoubleMaxEntriesoptional*float64 #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.
prefixListNamestringprefix_list_namestrprefixListNameStringPrefixListNamestringPrefixListName*string required #A name for the prefix list.
Constraints: Up to 255 characters in length. The name cannot start with com.amazonaws .