AWS Native is in preview. AWS Classic is fully supported.
aws-native.ec2.PrefixList
Explore with Pulumi AI
AWS Native is in preview. AWS Classic is fully supported.
Resource schema of AWS::EC2::PrefixList Type
Example Usage
Example
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AwsNative = Pulumi.AwsNative;
return await Deployment.RunAsync(() =>
{
var newPrefixList = new AwsNative.Ec2.PrefixList("newPrefixList", new()
{
PrefixListName = "vpc-1-servers",
AddressFamily = AwsNative.Ec2.PrefixListAddressFamily.IPv4,
MaxEntries = 10,
Entries = new[]
{
new AwsNative.Ec2.Inputs.PrefixListEntryArgs
{
Cidr = "10.0.0.5/32",
Description = "Server 1",
},
new AwsNative.Ec2.Inputs.PrefixListEntryArgs
{
Cidr = "10.0.0.10/32",
Description = "Server 2",
},
},
Tags = new[]
{
new AwsNative.Inputs.TagArgs
{
Key = "Name",
Value = "VPC-1-Servers",
},
},
});
});
package main
import (
awsnative "github.com/pulumi/pulumi-aws-native/sdk/go/aws"
"github.com/pulumi/pulumi-aws-native/sdk/go/aws/ec2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ec2.NewPrefixList(ctx, "newPrefixList", &ec2.PrefixListArgs{
PrefixListName: pulumi.String("vpc-1-servers"),
AddressFamily: ec2.PrefixListAddressFamilyIPv4,
MaxEntries: pulumi.Int(10),
Entries: ec2.PrefixListEntryArray{
&ec2.PrefixListEntryArgs{
Cidr: pulumi.String("10.0.0.5/32"),
Description: pulumi.String("Server 1"),
},
&ec2.PrefixListEntryArgs{
Cidr: pulumi.String("10.0.0.10/32"),
Description: pulumi.String("Server 2"),
},
},
Tags: aws.TagArray{
&aws.TagArgs{
Key: pulumi.String("Name"),
Value: pulumi.String("VPC-1-Servers"),
},
},
})
if err != nil {
return err
}
return nil
})
}
Coming soon!
import pulumi
import pulumi_aws_native as aws_native
new_prefix_list = aws_native.ec2.PrefixList("newPrefixList",
prefix_list_name="vpc-1-servers",
address_family=aws_native.ec2.PrefixListAddressFamily.I_PV4,
max_entries=10,
entries=[
aws_native.ec2.PrefixListEntryArgs(
cidr="10.0.0.5/32",
description="Server 1",
),
aws_native.ec2.PrefixListEntryArgs(
cidr="10.0.0.10/32",
description="Server 2",
),
],
tags=[aws_native.TagArgs(
key="Name",
value="VPC-1-Servers",
)])
import * as pulumi from "@pulumi/pulumi";
import * as aws_native from "@pulumi/aws-native";
const newPrefixList = new aws_native.ec2.PrefixList("newPrefixList", {
prefixListName: "vpc-1-servers",
addressFamily: aws_native.ec2.PrefixListAddressFamily.IPv4,
maxEntries: 10,
entries: [
{
cidr: "10.0.0.5/32",
description: "Server 1",
},
{
cidr: "10.0.0.10/32",
description: "Server 2",
},
],
tags: [{
key: "Name",
value: "VPC-1-Servers",
}],
});
Coming soon!
Example
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AwsNative = Pulumi.AwsNative;
return await Deployment.RunAsync(() =>
{
var newPrefixList = new AwsNative.Ec2.PrefixList("newPrefixList", new()
{
PrefixListName = "vpc-1-servers",
AddressFamily = AwsNative.Ec2.PrefixListAddressFamily.IPv4,
MaxEntries = 10,
Entries = new[]
{
new AwsNative.Ec2.Inputs.PrefixListEntryArgs
{
Cidr = "10.0.0.5/32",
Description = "Server 1",
},
new AwsNative.Ec2.Inputs.PrefixListEntryArgs
{
Cidr = "10.0.0.10/32",
Description = "Server 2",
},
},
Tags = new[]
{
new AwsNative.Inputs.TagArgs
{
Key = "Name",
Value = "VPC-1-Servers",
},
},
});
});
package main
import (
awsnative "github.com/pulumi/pulumi-aws-native/sdk/go/aws"
"github.com/pulumi/pulumi-aws-native/sdk/go/aws/ec2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ec2.NewPrefixList(ctx, "newPrefixList", &ec2.PrefixListArgs{
PrefixListName: pulumi.String("vpc-1-servers"),
AddressFamily: ec2.PrefixListAddressFamilyIPv4,
MaxEntries: pulumi.Int(10),
Entries: ec2.PrefixListEntryArray{
&ec2.PrefixListEntryArgs{
Cidr: pulumi.String("10.0.0.5/32"),
Description: pulumi.String("Server 1"),
},
&ec2.PrefixListEntryArgs{
Cidr: pulumi.String("10.0.0.10/32"),
Description: pulumi.String("Server 2"),
},
},
Tags: aws.TagArray{
&aws.TagArgs{
Key: pulumi.String("Name"),
Value: pulumi.String("VPC-1-Servers"),
},
},
})
if err != nil {
return err
}
return nil
})
}
Coming soon!
import pulumi
import pulumi_aws_native as aws_native
new_prefix_list = aws_native.ec2.PrefixList("newPrefixList",
prefix_list_name="vpc-1-servers",
address_family=aws_native.ec2.PrefixListAddressFamily.I_PV4,
max_entries=10,
entries=[
aws_native.ec2.PrefixListEntryArgs(
cidr="10.0.0.5/32",
description="Server 1",
),
aws_native.ec2.PrefixListEntryArgs(
cidr="10.0.0.10/32",
description="Server 2",
),
],
tags=[aws_native.TagArgs(
key="Name",
value="VPC-1-Servers",
)])
import * as pulumi from "@pulumi/pulumi";
import * as aws_native from "@pulumi/aws-native";
const newPrefixList = new aws_native.ec2.PrefixList("newPrefixList", {
prefixListName: "vpc-1-servers",
addressFamily: aws_native.ec2.PrefixListAddressFamily.IPv4,
maxEntries: 10,
entries: [
{
cidr: "10.0.0.5/32",
description: "Server 1",
},
{
cidr: "10.0.0.10/32",
description: "Server 2",
},
],
tags: [{
key: "Name",
value: "VPC-1-Servers",
}],
});
Coming soon!
Create PrefixList Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PrefixList(name: string, args: PrefixListArgs, opts?: CustomResourceOptions);
@overload
def PrefixList(resource_name: str,
args: PrefixListArgs,
opts: Optional[ResourceOptions] = None)
@overload
def PrefixList(resource_name: str,
opts: Optional[ResourceOptions] = None,
address_family: Optional[PrefixListAddressFamily] = None,
entries: Optional[Sequence[PrefixListEntryArgs]] = None,
max_entries: Optional[int] = None,
prefix_list_name: Optional[str] = None,
tags: Optional[Sequence[_root_inputs.TagArgs]] = None)
func NewPrefixList(ctx *Context, name string, args PrefixListArgs, opts ...ResourceOption) (*PrefixList, error)
public PrefixList(string name, PrefixListArgs args, CustomResourceOptions? opts = null)
public PrefixList(String name, PrefixListArgs args)
public PrefixList(String name, PrefixListArgs args, CustomResourceOptions options)
type: aws-native:ec2:PrefixList
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args PrefixListArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args PrefixListArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args PrefixListArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PrefixListArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PrefixListArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
PrefixList Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The PrefixList resource accepts the following input properties:
- Address
Family Pulumi.Aws Native. Ec2. Prefix List Address Family - Ip Version of Prefix List.
- Entries
List<Pulumi.
Aws Native. Ec2. Inputs. Prefix List Entry> - Entries of Prefix List.
- Max
Entries int - Max Entries of Prefix List.
- Prefix
List stringName - Name of Prefix List.
- List<Pulumi.
Aws Native. Inputs. Tag> - Tags for Prefix List
- Address
Family PrefixList Address Family - Ip Version of Prefix List.
- Entries
[]Prefix
List Entry Args - Entries of Prefix List.
- Max
Entries int - Max Entries of Prefix List.
- Prefix
List stringName - Name of Prefix List.
- Tag
Args - Tags for Prefix List
- address
Family PrefixList Address Family - Ip Version of Prefix List.
- entries
List<Prefix
List Entry> - Entries of Prefix List.
- max
Entries Integer - Max Entries of Prefix List.
- prefix
List StringName - Name of Prefix List.
- List<Tag>
- Tags for Prefix List
- address
Family PrefixList Address Family - Ip Version of Prefix List.
- entries
Prefix
List Entry[] - Entries of Prefix List.
- max
Entries number - Max Entries of Prefix List.
- prefix
List stringName - Name of Prefix List.
- Tag[]
- Tags for Prefix List
- address_
family PrefixList Address Family - Ip Version of Prefix List.
- entries
Sequence[Prefix
List Entry Args] - Entries of Prefix List.
- max_
entries int - Max Entries of Prefix List.
- prefix_
list_ strname - Name of Prefix List.
- Sequence[Tag
Args] - Tags for Prefix List
- address
Family "IPv4" | "IPv6" - Ip Version of Prefix List.
- entries List<Property Map>
- Entries of Prefix List.
- max
Entries Number - Max Entries of Prefix List.
- prefix
List StringName - Name of Prefix List.
- List<Property Map>
- Tags for Prefix List
Outputs
All input properties are implicitly available as output properties. Additionally, the PrefixList resource produces the following output properties:
- Arn string
- The Amazon Resource Name (ARN) of the Prefix List.
- Id string
- The provider-assigned unique ID for this managed resource.
- Owner
Id string - Owner Id of Prefix List.
- Prefix
List stringId - Id of Prefix List.
- Version int
- Version of Prefix List.
- Arn string
- The Amazon Resource Name (ARN) of the Prefix List.
- Id string
- The provider-assigned unique ID for this managed resource.
- Owner
Id string - Owner Id of Prefix List.
- Prefix
List stringId - Id of Prefix List.
- Version int
- Version of Prefix List.
- arn String
- The Amazon Resource Name (ARN) of the Prefix List.
- id String
- The provider-assigned unique ID for this managed resource.
- owner
Id String - Owner Id of Prefix List.
- prefix
List StringId - Id of Prefix List.
- version Integer
- Version of Prefix List.
- arn string
- The Amazon Resource Name (ARN) of the Prefix List.
- id string
- The provider-assigned unique ID for this managed resource.
- owner
Id string - Owner Id of Prefix List.
- prefix
List stringId - Id of Prefix List.
- version number
- Version of Prefix List.
- arn str
- The Amazon Resource Name (ARN) of the Prefix List.
- id str
- The provider-assigned unique ID for this managed resource.
- owner_
id str - Owner Id of Prefix List.
- prefix_
list_ strid - Id of Prefix List.
- version int
- Version of Prefix List.
- arn String
- The Amazon Resource Name (ARN) of the Prefix List.
- id String
- The provider-assigned unique ID for this managed resource.
- owner
Id String - Owner Id of Prefix List.
- prefix
List StringId - Id of Prefix List.
- version Number
- Version of Prefix List.
Supporting Types
PrefixListAddressFamily, PrefixListAddressFamilyArgs
- IPv4
- IPv4
- IPv6
- IPv6
- Prefix
List Address Family IPv4 - IPv4
- Prefix
List Address Family IPv6 - IPv6
- IPv4
- IPv4
- IPv6
- IPv6
- IPv4
- IPv4
- IPv6
- IPv6
- I_PV4
- IPv4
- I_PV6
- IPv6
- "IPv4"
- IPv4
- "IPv6"
- IPv6
PrefixListEntry, PrefixListEntryArgs
- Cidr string
- The CIDR block.
- Description string
A description for the entry.
Constraints: Up to 255 characters in length.
- Cidr string
- The CIDR block.
- Description string
A description for the entry.
Constraints: Up to 255 characters in length.
- cidr String
- The CIDR block.
- description String
A description for the entry.
Constraints: Up to 255 characters in length.
- cidr string
- The CIDR block.
- description string
A description for the entry.
Constraints: Up to 255 characters in length.
- cidr str
- The CIDR block.
- description str
A description for the entry.
Constraints: Up to 255 characters in length.
- cidr String
- The CIDR block.
- description String
A description for the entry.
Constraints: Up to 255 characters in length.
Tag, TagArgs
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
AWS Native is in preview. AWS Classic is fully supported.