1. Packages
  2. AWS Cloud Control
  3. API Docs
  4. ec2
  5. PrefixList

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.9.0 published on Monday, Nov 18, 2024 by Pulumi

aws-native.ec2.PrefixList

Explore with Pulumi AI

aws-native logo

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.9.0 published on Monday, Nov 18, 2024 by Pulumi

    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=[
            {
                "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",
        }])
    
    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=[
            {
                "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",
        }])
    
    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

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The PrefixList resource accepts the following input properties:

    AddressFamily Pulumi.AwsNative.Ec2.PrefixListAddressFamily
    Ip Version of Prefix List.
    Entries List<Pulumi.AwsNative.Ec2.Inputs.PrefixListEntry>
    Entries of Prefix List.
    MaxEntries int
    Max Entries of Prefix List.
    PrefixListName string
    Name of Prefix List.
    Tags List<Pulumi.AwsNative.Inputs.Tag>
    Tags for Prefix List
    AddressFamily PrefixListAddressFamily
    Ip Version of Prefix List.
    Entries []PrefixListEntryArgs
    Entries of Prefix List.
    MaxEntries int
    Max Entries of Prefix List.
    PrefixListName string
    Name of Prefix List.
    Tags TagArgs
    Tags for Prefix List
    addressFamily PrefixListAddressFamily
    Ip Version of Prefix List.
    entries List<PrefixListEntry>
    Entries of Prefix List.
    maxEntries Integer
    Max Entries of Prefix List.
    prefixListName String
    Name of Prefix List.
    tags List<Tag>
    Tags for Prefix List
    addressFamily PrefixListAddressFamily
    Ip Version of Prefix List.
    entries PrefixListEntry[]
    Entries of Prefix List.
    maxEntries number
    Max Entries of Prefix List.
    prefixListName string
    Name of Prefix List.
    tags Tag[]
    Tags for Prefix List
    address_family PrefixListAddressFamily
    Ip Version of Prefix List.
    entries Sequence[PrefixListEntryArgs]
    Entries of Prefix List.
    max_entries int
    Max Entries of Prefix List.
    prefix_list_name str
    Name of Prefix List.
    tags Sequence[TagArgs]
    Tags for Prefix List
    addressFamily "IPv4" | "IPv6"
    Ip Version of Prefix List.
    entries List<Property Map>
    Entries of Prefix List.
    maxEntries Number
    Max Entries of Prefix List.
    prefixListName String
    Name of Prefix List.
    tags 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.
    OwnerId string
    Owner Id of Prefix List.
    PrefixListId string
    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.
    OwnerId string
    Owner Id of Prefix List.
    PrefixListId string
    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.
    ownerId String
    Owner Id of Prefix List.
    prefixListId String
    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.
    ownerId string
    Owner Id of Prefix List.
    prefixListId string
    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_id str
    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.
    ownerId String
    Owner Id of Prefix List.
    prefixListId String
    Id of Prefix List.
    version Number
    Version of Prefix List.

    Supporting Types

    PrefixListAddressFamily, PrefixListAddressFamilyArgs

    IPv4
    IPv4
    IPv6
    IPv6
    PrefixListAddressFamilyIPv4
    IPv4
    PrefixListAddressFamilyIPv6
    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

    Key string
    The key name of the tag
    Value string
    The value of the tag
    Key string
    The key name of the tag
    Value string
    The value of the tag
    key String
    The key name of the tag
    value String
    The value of the tag
    key string
    The key name of the tag
    value string
    The value of the tag
    key str
    The key name of the tag
    value str
    The value of the tag
    key String
    The key name of the tag
    value String
    The value of the tag

    Package Details

    Repository
    AWS Native pulumi/pulumi-aws-native
    License
    Apache-2.0
    aws-native logo

    We recommend new projects start with resources from the AWS provider.

    AWS Cloud Control v1.9.0 published on Monday, Nov 18, 2024 by Pulumi