volcengine.vpc.PrefixList
Explore with Pulumi AI
Provides a resource to manage vpc prefix list
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@volcengine/pulumi";
const foo = new volcengine.vpc.PrefixList("foo", {
    description: "acc test description",
    ipVersion: "IPv4",
    maxEntries: 7,
    prefixListEntries: [
        {
            cidr: "192.168.4.0/28",
            description: "acc-test-1",
        },
        {
            cidr: "192.168.9.0/28",
            description: "acc-test-4",
        },
        {
            cidr: "192.168.8.0/28",
            description: "acc-test-5",
        },
    ],
    prefixListName: "acc-test-prefix",
    tags: [{
        key: "tf-key1",
        value: "tf-value1",
    }],
});
import pulumi
import pulumi_volcengine as volcengine
foo = volcengine.vpc.PrefixList("foo",
    description="acc test description",
    ip_version="IPv4",
    max_entries=7,
    prefix_list_entries=[
        volcengine.vpc.PrefixListPrefixListEntryArgs(
            cidr="192.168.4.0/28",
            description="acc-test-1",
        ),
        volcengine.vpc.PrefixListPrefixListEntryArgs(
            cidr="192.168.9.0/28",
            description="acc-test-4",
        ),
        volcengine.vpc.PrefixListPrefixListEntryArgs(
            cidr="192.168.8.0/28",
            description="acc-test-5",
        ),
    ],
    prefix_list_name="acc-test-prefix",
    tags=[volcengine.vpc.PrefixListTagArgs(
        key="tf-key1",
        value="tf-value1",
    )])
package main
import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vpc"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := vpc.NewPrefixList(ctx, "foo", &vpc.PrefixListArgs{
			Description: pulumi.String("acc test description"),
			IpVersion:   pulumi.String("IPv4"),
			MaxEntries:  pulumi.Int(7),
			PrefixListEntries: vpc.PrefixListPrefixListEntryArray{
				&vpc.PrefixListPrefixListEntryArgs{
					Cidr:        pulumi.String("192.168.4.0/28"),
					Description: pulumi.String("acc-test-1"),
				},
				&vpc.PrefixListPrefixListEntryArgs{
					Cidr:        pulumi.String("192.168.9.0/28"),
					Description: pulumi.String("acc-test-4"),
				},
				&vpc.PrefixListPrefixListEntryArgs{
					Cidr:        pulumi.String("192.168.8.0/28"),
					Description: pulumi.String("acc-test-5"),
				},
			},
			PrefixListName: pulumi.String("acc-test-prefix"),
			Tags: vpc.PrefixListTagArray{
				&vpc.PrefixListTagArgs{
					Key:   pulumi.String("tf-key1"),
					Value: pulumi.String("tf-value1"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() => 
{
    var foo = new Volcengine.Vpc.PrefixList("foo", new()
    {
        Description = "acc test description",
        IpVersion = "IPv4",
        MaxEntries = 7,
        PrefixListEntries = new[]
        {
            new Volcengine.Vpc.Inputs.PrefixListPrefixListEntryArgs
            {
                Cidr = "192.168.4.0/28",
                Description = "acc-test-1",
            },
            new Volcengine.Vpc.Inputs.PrefixListPrefixListEntryArgs
            {
                Cidr = "192.168.9.0/28",
                Description = "acc-test-4",
            },
            new Volcengine.Vpc.Inputs.PrefixListPrefixListEntryArgs
            {
                Cidr = "192.168.8.0/28",
                Description = "acc-test-5",
            },
        },
        PrefixListName = "acc-test-prefix",
        Tags = new[]
        {
            new Volcengine.Vpc.Inputs.PrefixListTagArgs
            {
                Key = "tf-key1",
                Value = "tf-value1",
            },
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.vpc.PrefixList;
import com.pulumi.volcengine.vpc.PrefixListArgs;
import com.pulumi.volcengine.vpc.inputs.PrefixListPrefixListEntryArgs;
import com.pulumi.volcengine.vpc.inputs.PrefixListTagArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        var foo = new PrefixList("foo", PrefixListArgs.builder()        
            .description("acc test description")
            .ipVersion("IPv4")
            .maxEntries(7)
            .prefixListEntries(            
                PrefixListPrefixListEntryArgs.builder()
                    .cidr("192.168.4.0/28")
                    .description("acc-test-1")
                    .build(),
                PrefixListPrefixListEntryArgs.builder()
                    .cidr("192.168.9.0/28")
                    .description("acc-test-4")
                    .build(),
                PrefixListPrefixListEntryArgs.builder()
                    .cidr("192.168.8.0/28")
                    .description("acc-test-5")
                    .build())
            .prefixListName("acc-test-prefix")
            .tags(PrefixListTagArgs.builder()
                .key("tf-key1")
                .value("tf-value1")
                .build())
            .build());
    }
}
resources:
  foo:
    type: volcengine:vpc:PrefixList
    properties:
      description: acc test description
      ipVersion: IPv4
      maxEntries: 7
      prefixListEntries:
        - cidr: 192.168.4.0/28
          description: acc-test-1
        - cidr: 192.168.9.0/28
          description: acc-test-4
        - cidr: 192.168.8.0/28
          description: acc-test-5
      prefixListName: acc-test-prefix
      tags:
        - key: tf-key1
          value: tf-value1
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,
               max_entries: Optional[int] = None,
               description: Optional[str] = None,
               ip_version: Optional[str] = None,
               prefix_list_entries: Optional[Sequence[PrefixListPrefixListEntryArgs]] = None,
               prefix_list_name: Optional[str] = None,
               tags: Optional[Sequence[PrefixListTagArgs]] = 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: volcengine:vpc: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.
Constructor example
The following reference example uses placeholder values for all input properties.
var prefixListResource = new Volcengine.Vpc.PrefixList("prefixListResource", new()
{
    MaxEntries = 0,
    Description = "string",
    IpVersion = "string",
    PrefixListEntries = new[]
    {
        new Volcengine.Vpc.Inputs.PrefixListPrefixListEntryArgs
        {
            Cidr = "string",
            Description = "string",
        },
    },
    PrefixListName = "string",
    Tags = new[]
    {
        new Volcengine.Vpc.Inputs.PrefixListTagArgs
        {
            Key = "string",
            Value = "string",
        },
    },
});
example, err := vpc.NewPrefixList(ctx, "prefixListResource", &vpc.PrefixListArgs{
	MaxEntries:  pulumi.Int(0),
	Description: pulumi.String("string"),
	IpVersion:   pulumi.String("string"),
	PrefixListEntries: vpc.PrefixListPrefixListEntryArray{
		&vpc.PrefixListPrefixListEntryArgs{
			Cidr:        pulumi.String("string"),
			Description: pulumi.String("string"),
		},
	},
	PrefixListName: pulumi.String("string"),
	Tags: vpc.PrefixListTagArray{
		&vpc.PrefixListTagArgs{
			Key:   pulumi.String("string"),
			Value: pulumi.String("string"),
		},
	},
})
var prefixListResource = new PrefixList("prefixListResource", PrefixListArgs.builder()
    .maxEntries(0)
    .description("string")
    .ipVersion("string")
    .prefixListEntries(PrefixListPrefixListEntryArgs.builder()
        .cidr("string")
        .description("string")
        .build())
    .prefixListName("string")
    .tags(PrefixListTagArgs.builder()
        .key("string")
        .value("string")
        .build())
    .build());
prefix_list_resource = volcengine.vpc.PrefixList("prefixListResource",
    max_entries=0,
    description="string",
    ip_version="string",
    prefix_list_entries=[{
        "cidr": "string",
        "description": "string",
    }],
    prefix_list_name="string",
    tags=[{
        "key": "string",
        "value": "string",
    }])
const prefixListResource = new volcengine.vpc.PrefixList("prefixListResource", {
    maxEntries: 0,
    description: "string",
    ipVersion: "string",
    prefixListEntries: [{
        cidr: "string",
        description: "string",
    }],
    prefixListName: "string",
    tags: [{
        key: "string",
        value: "string",
    }],
});
type: volcengine:vpc:PrefixList
properties:
    description: string
    ipVersion: string
    maxEntries: 0
    prefixListEntries:
        - cidr: string
          description: string
    prefixListName: string
    tags:
        - key: string
          value: string
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:
- MaxEntries int
- Maximum number of entries, which is the maximum number of entries that can be added to the prefix list. The value range is 1 to 200.
- Description string
- The description of the prefix list.
- IpVersion string
- IP version type. Possible values: IPv4 (default): IPv4 type. IPv6: IPv6 type.
- PrefixList List<PrefixEntries List Prefix List Entry> 
- Prefix list entry list.
- PrefixList stringName 
- The name of the prefix list.
- 
List<PrefixList Tag> 
- Tags.
- MaxEntries int
- Maximum number of entries, which is the maximum number of entries that can be added to the prefix list. The value range is 1 to 200.
- Description string
- The description of the prefix list.
- IpVersion string
- IP version type. Possible values: IPv4 (default): IPv4 type. IPv6: IPv6 type.
- PrefixList []PrefixEntries List Prefix List Entry Args 
- Prefix list entry list.
- PrefixList stringName 
- The name of the prefix list.
- 
[]PrefixList Tag Args 
- Tags.
- maxEntries Integer
- Maximum number of entries, which is the maximum number of entries that can be added to the prefix list. The value range is 1 to 200.
- description String
- The description of the prefix list.
- ipVersion String
- IP version type. Possible values: IPv4 (default): IPv4 type. IPv6: IPv6 type.
- prefixList List<PrefixEntries List Prefix List Entry> 
- Prefix list entry list.
- prefixList StringName 
- The name of the prefix list.
- 
List<PrefixList Tag> 
- Tags.
- maxEntries number
- Maximum number of entries, which is the maximum number of entries that can be added to the prefix list. The value range is 1 to 200.
- description string
- The description of the prefix list.
- ipVersion string
- IP version type. Possible values: IPv4 (default): IPv4 type. IPv6: IPv6 type.
- prefixList PrefixEntries List Prefix List Entry[] 
- Prefix list entry list.
- prefixList stringName 
- The name of the prefix list.
- 
PrefixList Tag[] 
- Tags.
- max_entries int
- Maximum number of entries, which is the maximum number of entries that can be added to the prefix list. The value range is 1 to 200.
- description str
- The description of the prefix list.
- ip_version str
- IP version type. Possible values: IPv4 (default): IPv4 type. IPv6: IPv6 type.
- prefix_list_ Sequence[Prefixentries List Prefix List Entry Args] 
- Prefix list entry list.
- prefix_list_ strname 
- The name of the prefix list.
- 
Sequence[PrefixList Tag Args] 
- Tags.
- maxEntries Number
- Maximum number of entries, which is the maximum number of entries that can be added to the prefix list. The value range is 1 to 200.
- description String
- The description of the prefix list.
- ipVersion String
- IP version type. Possible values: IPv4 (default): IPv4 type. IPv6: IPv6 type.
- prefixList List<Property Map>Entries 
- Prefix list entry list.
- prefixList StringName 
- The name of the prefix list.
- List<Property Map>
- Tags.
Outputs
All input properties are implicitly available as output properties. Additionally, the PrefixList resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- PrefixList List<PrefixAssociations List Prefix List Association> 
- Collection of resources associated with VPC prefix list.
- Id string
- The provider-assigned unique ID for this managed resource.
- PrefixList []PrefixAssociations List Prefix List Association 
- Collection of resources associated with VPC prefix list.
- id String
- The provider-assigned unique ID for this managed resource.
- prefixList List<PrefixAssociations List Prefix List Association> 
- Collection of resources associated with VPC prefix list.
- id string
- The provider-assigned unique ID for this managed resource.
- prefixList PrefixAssociations List Prefix List Association[] 
- Collection of resources associated with VPC prefix list.
- id str
- The provider-assigned unique ID for this managed resource.
- prefix_list_ Sequence[Prefixassociations List Prefix List Association] 
- Collection of resources associated with VPC prefix list.
- id String
- The provider-assigned unique ID for this managed resource.
- prefixList List<Property Map>Associations 
- Collection of resources associated with VPC prefix list.
Look up Existing PrefixList Resource
Get an existing PrefixList resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: PrefixListState, opts?: CustomResourceOptions): PrefixList@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        description: Optional[str] = None,
        ip_version: Optional[str] = None,
        max_entries: Optional[int] = None,
        prefix_list_associations: Optional[Sequence[PrefixListPrefixListAssociationArgs]] = None,
        prefix_list_entries: Optional[Sequence[PrefixListPrefixListEntryArgs]] = None,
        prefix_list_name: Optional[str] = None,
        tags: Optional[Sequence[PrefixListTagArgs]] = None) -> PrefixListfunc GetPrefixList(ctx *Context, name string, id IDInput, state *PrefixListState, opts ...ResourceOption) (*PrefixList, error)public static PrefixList Get(string name, Input<string> id, PrefixListState? state, CustomResourceOptions? opts = null)public static PrefixList get(String name, Output<String> id, PrefixListState state, CustomResourceOptions options)resources:  _:    type: volcengine:vpc:PrefixList    get:      id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Description string
- The description of the prefix list.
- IpVersion string
- IP version type. Possible values: IPv4 (default): IPv4 type. IPv6: IPv6 type.
- MaxEntries int
- Maximum number of entries, which is the maximum number of entries that can be added to the prefix list. The value range is 1 to 200.
- PrefixList List<PrefixAssociations List Prefix List Association> 
- Collection of resources associated with VPC prefix list.
- PrefixList List<PrefixEntries List Prefix List Entry> 
- Prefix list entry list.
- PrefixList stringName 
- The name of the prefix list.
- 
List<PrefixList Tag> 
- Tags.
- Description string
- The description of the prefix list.
- IpVersion string
- IP version type. Possible values: IPv4 (default): IPv4 type. IPv6: IPv6 type.
- MaxEntries int
- Maximum number of entries, which is the maximum number of entries that can be added to the prefix list. The value range is 1 to 200.
- PrefixList []PrefixAssociations List Prefix List Association Args 
- Collection of resources associated with VPC prefix list.
- PrefixList []PrefixEntries List Prefix List Entry Args 
- Prefix list entry list.
- PrefixList stringName 
- The name of the prefix list.
- 
[]PrefixList Tag Args 
- Tags.
- description String
- The description of the prefix list.
- ipVersion String
- IP version type. Possible values: IPv4 (default): IPv4 type. IPv6: IPv6 type.
- maxEntries Integer
- Maximum number of entries, which is the maximum number of entries that can be added to the prefix list. The value range is 1 to 200.
- prefixList List<PrefixAssociations List Prefix List Association> 
- Collection of resources associated with VPC prefix list.
- prefixList List<PrefixEntries List Prefix List Entry> 
- Prefix list entry list.
- prefixList StringName 
- The name of the prefix list.
- 
List<PrefixList Tag> 
- Tags.
- description string
- The description of the prefix list.
- ipVersion string
- IP version type. Possible values: IPv4 (default): IPv4 type. IPv6: IPv6 type.
- maxEntries number
- Maximum number of entries, which is the maximum number of entries that can be added to the prefix list. The value range is 1 to 200.
- prefixList PrefixAssociations List Prefix List Association[] 
- Collection of resources associated with VPC prefix list.
- prefixList PrefixEntries List Prefix List Entry[] 
- Prefix list entry list.
- prefixList stringName 
- The name of the prefix list.
- 
PrefixList Tag[] 
- Tags.
- description str
- The description of the prefix list.
- ip_version str
- IP version type. Possible values: IPv4 (default): IPv4 type. IPv6: IPv6 type.
- max_entries int
- Maximum number of entries, which is the maximum number of entries that can be added to the prefix list. The value range is 1 to 200.
- prefix_list_ Sequence[Prefixassociations List Prefix List Association Args] 
- Collection of resources associated with VPC prefix list.
- prefix_list_ Sequence[Prefixentries List Prefix List Entry Args] 
- Prefix list entry list.
- prefix_list_ strname 
- The name of the prefix list.
- 
Sequence[PrefixList Tag Args] 
- Tags.
- description String
- The description of the prefix list.
- ipVersion String
- IP version type. Possible values: IPv4 (default): IPv4 type. IPv6: IPv6 type.
- maxEntries Number
- Maximum number of entries, which is the maximum number of entries that can be added to the prefix list. The value range is 1 to 200.
- prefixList List<Property Map>Associations 
- Collection of resources associated with VPC prefix list.
- prefixList List<Property Map>Entries 
- Prefix list entry list.
- prefixList StringName 
- The name of the prefix list.
- List<Property Map>
- Tags.
Supporting Types
PrefixListPrefixListAssociation, PrefixListPrefixListAssociationArgs          
- ResourceId string
- Associated resource ID.
- ResourceType string
- Related resource types.
- ResourceId string
- Associated resource ID.
- ResourceType string
- Related resource types.
- resourceId String
- Associated resource ID.
- resourceType String
- Related resource types.
- resourceId string
- Associated resource ID.
- resourceType string
- Related resource types.
- resource_id str
- Associated resource ID.
- resource_type str
- Related resource types.
- resourceId String
- Associated resource ID.
- resourceType String
- Related resource types.
PrefixListPrefixListEntry, PrefixListPrefixListEntryArgs          
- Cidr string
- CIDR of prefix list entries.
- Description string
- Description of prefix list entries.
- Cidr string
- CIDR of prefix list entries.
- Description string
- Description of prefix list entries.
- cidr String
- CIDR of prefix list entries.
- description String
- Description of prefix list entries.
- cidr string
- CIDR of prefix list entries.
- description string
- Description of prefix list entries.
- cidr str
- CIDR of prefix list entries.
- description str
- Description of prefix list entries.
- cidr String
- CIDR of prefix list entries.
- description String
- Description of prefix list entries.
PrefixListTag, PrefixListTagArgs      
Import
VpcPrefixList can be imported using the id, e.g.
$ pulumi import volcengine:vpc/prefixList:PrefixList default resource_id
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the volcengineTerraform Provider.