volcengine.vpc.PrefixList
Explore with Pulumi AI
Provides a resource to manage vpc prefix list
Example Usage
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 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
})
}
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());
}
}
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",
)])
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",
}],
});
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=[volcengine.vpc.PrefixListPrefixListEntryArgs(
cidr="string",
description="string",
)],
prefix_list_name="string",
tags=[volcengine.vpc.PrefixListTagArgs(
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
The PrefixList resource accepts the following input properties:
- 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 string
- The description of the prefix list.
- Ip
Version string - IP version type. Possible values: IPv4 (default): IPv4 type. IPv6: IPv6 type.
- Prefix
List List<PrefixEntries List Prefix List Entry> - Prefix list entry list.
- Prefix
List stringName - The name of the prefix list.
- List<Prefix
List 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 string
- The description of the prefix list.
- Ip
Version string - IP version type. Possible values: IPv4 (default): IPv4 type. IPv6: IPv6 type.
- Prefix
List []PrefixEntries List Prefix List Entry Args - Prefix list entry list.
- Prefix
List stringName - The name of the prefix list.
- []Prefix
List Tag Args - Tags.
- max
Entries 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.
- ip
Version String - IP version type. Possible values: IPv4 (default): IPv4 type. IPv6: IPv6 type.
- prefix
List List<PrefixEntries List Prefix List Entry> - Prefix list entry list.
- prefix
List StringName - The name of the prefix list.
- List<Prefix
List Tag> - Tags.
- max
Entries 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.
- ip
Version string - IP version type. Possible values: IPv4 (default): IPv4 type. IPv6: IPv6 type.
- prefix
List PrefixEntries List Prefix List Entry[] - Prefix list entry list.
- prefix
List stringName - The name of the prefix list.
- Prefix
List 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[Prefix
List Tag Args] - Tags.
- max
Entries 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.
- ip
Version String - IP version type. Possible values: IPv4 (default): IPv4 type. IPv6: IPv6 type.
- prefix
List List<Property Map>Entries - Prefix list entry list.
- prefix
List 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.
- Prefix
List 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.
- Prefix
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.
- prefix
List 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.
- prefix
List 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.
- prefix
List 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) -> PrefixList
func 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)
Resource lookup is not supported in YAML
- 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.
- Ip
Version string - 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 List<PrefixAssociations List Prefix List Association> - Collection of resources associated with VPC prefix list.
- Prefix
List List<PrefixEntries List Prefix List Entry> - Prefix list entry list.
- Prefix
List stringName - The name of the prefix list.
- List<Prefix
List Tag> - Tags.
- Description string
- The description of the prefix list.
- Ip
Version string - 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 []PrefixAssociations List Prefix List Association Args - Collection of resources associated with VPC prefix list.
- Prefix
List []PrefixEntries List Prefix List Entry Args - Prefix list entry list.
- Prefix
List stringName - The name of the prefix list.
- []Prefix
List Tag Args - Tags.
- description String
- The description of the prefix list.
- ip
Version String - IP version type. Possible values: IPv4 (default): IPv4 type. IPv6: IPv6 type.
- max
Entries 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.
- prefix
List List<PrefixAssociations List Prefix List Association> - Collection of resources associated with VPC prefix list.
- prefix
List List<PrefixEntries List Prefix List Entry> - Prefix list entry list.
- prefix
List StringName - The name of the prefix list.
- List<Prefix
List Tag> - Tags.
- description string
- The description of the prefix list.
- ip
Version string - IP version type. Possible values: IPv4 (default): IPv4 type. IPv6: IPv6 type.
- max
Entries 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.
- prefix
List PrefixAssociations List Prefix List Association[] - Collection of resources associated with VPC prefix list.
- prefix
List PrefixEntries List Prefix List Entry[] - Prefix list entry list.
- prefix
List stringName - The name of the prefix list.
- Prefix
List 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[Prefix
List Tag Args] - Tags.
- description String
- The description of the prefix list.
- ip
Version String - IP version type. Possible values: IPv4 (default): IPv4 type. IPv6: IPv6 type.
- max
Entries 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.
- prefix
List List<Property Map>Associations - Collection of resources associated with VPC prefix list.
- prefix
List List<Property Map>Entries - Prefix list entry list.
- prefix
List StringName - The name of the prefix list.
- List<Property Map>
- Tags.
Supporting Types
PrefixListPrefixListAssociation, PrefixListPrefixListAssociationArgs
- Resource
Id string - Associated resource ID.
- Resource
Type string - Related resource types.
- Resource
Id string - Associated resource ID.
- Resource
Type string - Related resource types.
- resource
Id String - Associated resource ID.
- resource
Type String - Related resource types.
- resource
Id string - Associated resource ID.
- resource
Type string - Related resource types.
- resource_
id str - Associated resource ID.
- resource_
type str - Related resource types.
- resource
Id String - Associated resource ID.
- resource
Type 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
volcengine
Terraform Provider.