Volcengine v0.0.38 published on Friday, Oct 31, 2025 by Volcengine
Volcengine v0.0.38 published on Friday, Oct 31, 2025 by Volcengine
Use this data source to query detailed information of vpc prefix lists
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@pulumi/volcengine";
import * as volcengine from "@volcengine/pulumi";
const fooPrefixList = new volcengine.vpc.PrefixList("fooPrefixList", {
prefixListName: "acc-test-prefix",
maxEntries: 3,
description: "acc test description",
ipVersion: "IPv4",
prefixListEntries: [
{
cidr: "192.168.4.0/28",
description: "acc-test-1",
},
{
cidr: "192.168.5.0/28",
description: "acc-test-2",
},
],
tags: [{
key: "tf-key1",
value: "tf-value1",
}],
});
const fooPrefixLists = volcengine.vpc.getPrefixListsOutput({
ids: [fooPrefixList.id],
});
import pulumi
import pulumi_volcengine as volcengine
foo_prefix_list = volcengine.vpc.PrefixList("fooPrefixList",
prefix_list_name="acc-test-prefix",
max_entries=3,
description="acc test description",
ip_version="IPv4",
prefix_list_entries=[
volcengine.vpc.PrefixListPrefixListEntryArgs(
cidr="192.168.4.0/28",
description="acc-test-1",
),
volcengine.vpc.PrefixListPrefixListEntryArgs(
cidr="192.168.5.0/28",
description="acc-test-2",
),
],
tags=[volcengine.vpc.PrefixListTagArgs(
key="tf-key1",
value="tf-value1",
)])
foo_prefix_lists = volcengine.vpc.get_prefix_lists_output(ids=[foo_prefix_list.id])
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 {
fooPrefixList, err := vpc.NewPrefixList(ctx, "fooPrefixList", &vpc.PrefixListArgs{
PrefixListName: pulumi.String("acc-test-prefix"),
MaxEntries: pulumi.Int(3),
Description: pulumi.String("acc test description"),
IpVersion: pulumi.String("IPv4"),
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.5.0/28"),
Description: pulumi.String("acc-test-2"),
},
},
Tags: vpc.PrefixListTagArray{
&vpc.PrefixListTagArgs{
Key: pulumi.String("tf-key1"),
Value: pulumi.String("tf-value1"),
},
},
})
if err != nil {
return err
}
_ = vpc.GetPrefixListsOutput(ctx, vpc.GetPrefixListsOutputArgs{
Ids: pulumi.StringArray{
fooPrefixList.ID(),
},
}, nil)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var fooPrefixList = new Volcengine.Vpc.PrefixList("fooPrefixList", new()
{
PrefixListName = "acc-test-prefix",
MaxEntries = 3,
Description = "acc test description",
IpVersion = "IPv4",
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.5.0/28",
Description = "acc-test-2",
},
},
Tags = new[]
{
new Volcengine.Vpc.Inputs.PrefixListTagArgs
{
Key = "tf-key1",
Value = "tf-value1",
},
},
});
var fooPrefixLists = Volcengine.Vpc.GetPrefixLists.Invoke(new()
{
Ids = new[]
{
fooPrefixList.Id,
},
});
});
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 com.pulumi.volcengine.vpc.VpcFunctions;
import com.pulumi.volcengine.vpc.inputs.GetPrefixListsArgs;
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 fooPrefixList = new PrefixList("fooPrefixList", PrefixListArgs.builder()
.prefixListName("acc-test-prefix")
.maxEntries(3)
.description("acc test description")
.ipVersion("IPv4")
.prefixListEntries(
PrefixListPrefixListEntryArgs.builder()
.cidr("192.168.4.0/28")
.description("acc-test-1")
.build(),
PrefixListPrefixListEntryArgs.builder()
.cidr("192.168.5.0/28")
.description("acc-test-2")
.build())
.tags(PrefixListTagArgs.builder()
.key("tf-key1")
.value("tf-value1")
.build())
.build());
final var fooPrefixLists = VpcFunctions.getPrefixLists(GetPrefixListsArgs.builder()
.ids(fooPrefixList.id())
.build());
}
}
resources:
fooPrefixList:
type: volcengine:vpc:PrefixList
properties:
prefixListName: acc-test-prefix
maxEntries: 3
description: acc test description
ipVersion: IPv4
prefixListEntries:
- cidr: 192.168.4.0/28
description: acc-test-1
- cidr: 192.168.5.0/28
description: acc-test-2
tags:
- key: tf-key1
value: tf-value1
variables:
fooPrefixLists:
fn::invoke:
Function: volcengine:vpc:getPrefixLists
Arguments:
ids:
- ${fooPrefixList.id}
Using getPrefixLists
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getPrefixLists(args: GetPrefixListsArgs, opts?: InvokeOptions): Promise<GetPrefixListsResult>
function getPrefixListsOutput(args: GetPrefixListsOutputArgs, opts?: InvokeOptions): Output<GetPrefixListsResult>def get_prefix_lists(ids: Optional[Sequence[str]] = None,
ip_version: Optional[str] = None,
output_file: Optional[str] = None,
prefix_list_name: Optional[str] = None,
tag_filters: Optional[Sequence[GetPrefixListsTagFilter]] = None,
opts: Optional[InvokeOptions] = None) -> GetPrefixListsResult
def get_prefix_lists_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
ip_version: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
prefix_list_name: Optional[pulumi.Input[str]] = None,
tag_filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetPrefixListsTagFilterArgs]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetPrefixListsResult]func GetPrefixLists(ctx *Context, args *GetPrefixListsArgs, opts ...InvokeOption) (*GetPrefixListsResult, error)
func GetPrefixListsOutput(ctx *Context, args *GetPrefixListsOutputArgs, opts ...InvokeOption) GetPrefixListsResultOutput> Note: This function is named GetPrefixLists in the Go SDK.
public static class GetPrefixLists
{
public static Task<GetPrefixListsResult> InvokeAsync(GetPrefixListsArgs args, InvokeOptions? opts = null)
public static Output<GetPrefixListsResult> Invoke(GetPrefixListsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetPrefixListsResult> getPrefixLists(GetPrefixListsArgs args, InvokeOptions options)
public static Output<GetPrefixListsResult> getPrefixLists(GetPrefixListsArgs args, InvokeOptions options)
fn::invoke:
function: volcengine:vpc/getPrefixLists:getPrefixLists
arguments:
# arguments dictionaryThe following arguments are supported:
- Ids List<string>
- A list of prefix list ids.
- Ip
Version string - IP version of prefix list.
- Output
File string - File name where to save data source results.
- Prefix
List stringName - A Name of prefix list.
- Tag
Filters List<GetPrefix Lists Tag Filter> - List of tag filters.
- Ids []string
- A list of prefix list ids.
- Ip
Version string - IP version of prefix list.
- Output
File string - File name where to save data source results.
- Prefix
List stringName - A Name of prefix list.
- Tag
Filters []GetPrefix Lists Tag Filter - List of tag filters.
- ids List<String>
- A list of prefix list ids.
- ip
Version String - IP version of prefix list.
- output
File String - File name where to save data source results.
- prefix
List StringName - A Name of prefix list.
- tag
Filters List<GetPrefix Lists Tag Filter> - List of tag filters.
- ids string[]
- A list of prefix list ids.
- ip
Version string - IP version of prefix list.
- output
File string - File name where to save data source results.
- prefix
List stringName - A Name of prefix list.
- tag
Filters GetPrefix Lists Tag Filter[] - List of tag filters.
- ids Sequence[str]
- A list of prefix list ids.
- ip_
version str - IP version of prefix list.
- output_
file str - File name where to save data source results.
- prefix_
list_ strname - A Name of prefix list.
- tag_
filters Sequence[GetPrefix Lists Tag Filter] - List of tag filters.
- ids List<String>
- A list of prefix list ids.
- ip
Version String - IP version of prefix list.
- output
File String - File name where to save data source results.
- prefix
List StringName - A Name of prefix list.
- tag
Filters List<Property Map> - List of tag filters.
getPrefixLists Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Prefix
Lists List<GetPrefix Lists Prefix List> - The collection of query.
- Total
Count int - The total count of query.
- Ids List<string>
- Ip
Version string - The ip version of the prefix list.
- Output
File string - Prefix
List stringName - The prefix list name.
- Tag
Filters List<GetPrefix Lists Tag Filter>
- Id string
- The provider-assigned unique ID for this managed resource.
- Prefix
Lists []GetPrefix Lists Prefix List - The collection of query.
- Total
Count int - The total count of query.
- Ids []string
- Ip
Version string - The ip version of the prefix list.
- Output
File string - Prefix
List stringName - The prefix list name.
- Tag
Filters []GetPrefix Lists Tag Filter
- id String
- The provider-assigned unique ID for this managed resource.
- prefix
Lists List<GetPrefix Lists Prefix List> - The collection of query.
- total
Count Integer - The total count of query.
- ids List<String>
- ip
Version String - The ip version of the prefix list.
- output
File String - prefix
List StringName - The prefix list name.
- tag
Filters List<GetPrefix Lists Tag Filter>
- id string
- The provider-assigned unique ID for this managed resource.
- prefix
Lists GetPrefix Lists Prefix List[] - The collection of query.
- total
Count number - The total count of query.
- ids string[]
- ip
Version string - The ip version of the prefix list.
- output
File string - prefix
List stringName - The prefix list name.
- tag
Filters GetPrefix Lists Tag Filter[]
- id str
- The provider-assigned unique ID for this managed resource.
- prefix_
lists Sequence[GetPrefix Lists Prefix List] - The collection of query.
- total_
count int - The total count of query.
- ids Sequence[str]
- ip_
version str - The ip version of the prefix list.
- output_
file str - prefix_
list_ strname - The prefix list name.
- tag_
filters Sequence[GetPrefix Lists Tag Filter]
- id String
- The provider-assigned unique ID for this managed resource.
- prefix
Lists List<Property Map> - The collection of query.
- total
Count Number - The total count of query.
- ids List<String>
- ip
Version String - The ip version of the prefix list.
- output
File String - prefix
List StringName - The prefix list name.
- tag
Filters List<Property Map>
Supporting Types
GetPrefixListsPrefixList
- Association
Count int - Number of associated resources for prefix list.
- Cidrs List<string>
- CIDR address block information for prefix list.
- Creation
Time string - The creation time of the prefix list.
- Description string
- Description.
- Id string
- The id of the prefix list.
- Ip
Version string - IP version of prefix list.
- Max
Entries int - Maximum number of entries, which is the maximum number of items that can be added to the prefix list.
- Prefix
List List<GetAssociations Prefix Lists Prefix List Prefix List Association> - Collection of resources associated with VPC prefix list.
- Prefix
List List<GetEntries Prefix Lists Prefix List Prefix List Entry> - The prefix list entries.
- Prefix
List stringId - The prefix list id.
- Prefix
List stringName - A Name of prefix list.
- Status string
- The status of the prefix list.
- Update
Time string - The update time of the prefix list.
- Association
Count int - Number of associated resources for prefix list.
- Cidrs []string
- CIDR address block information for prefix list.
- Creation
Time string - The creation time of the prefix list.
- Description string
- Description.
- Id string
- The id of the prefix list.
- Ip
Version string - IP version of prefix list.
- Max
Entries int - Maximum number of entries, which is the maximum number of items that can be added to the prefix list.
- Prefix
List []GetAssociations Prefix Lists Prefix List Prefix List Association - Collection of resources associated with VPC prefix list.
- Prefix
List []GetEntries Prefix Lists Prefix List Prefix List Entry - The prefix list entries.
- Prefix
List stringId - The prefix list id.
- Prefix
List stringName - A Name of prefix list.
- Status string
- The status of the prefix list.
- Update
Time string - The update time of the prefix list.
- association
Count Integer - Number of associated resources for prefix list.
- cidrs List<String>
- CIDR address block information for prefix list.
- creation
Time String - The creation time of the prefix list.
- description String
- Description.
- id String
- The id of the prefix list.
- ip
Version String - IP version of prefix list.
- max
Entries Integer - Maximum number of entries, which is the maximum number of items that can be added to the prefix list.
- prefix
List List<GetAssociations Prefix Lists Prefix List Prefix List Association> - Collection of resources associated with VPC prefix list.
- prefix
List List<GetEntries Prefix Lists Prefix List Prefix List Entry> - The prefix list entries.
- prefix
List StringId - The prefix list id.
- prefix
List StringName - A Name of prefix list.
- status String
- The status of the prefix list.
- update
Time String - The update time of the prefix list.
- association
Count number - Number of associated resources for prefix list.
- cidrs string[]
- CIDR address block information for prefix list.
- creation
Time string - The creation time of the prefix list.
- description string
- Description.
- id string
- The id of the prefix list.
- ip
Version string - IP version of prefix list.
- max
Entries number - Maximum number of entries, which is the maximum number of items that can be added to the prefix list.
- prefix
List GetAssociations Prefix Lists Prefix List Prefix List Association[] - Collection of resources associated with VPC prefix list.
- prefix
List GetEntries Prefix Lists Prefix List Prefix List Entry[] - The prefix list entries.
- prefix
List stringId - The prefix list id.
- prefix
List stringName - A Name of prefix list.
- status string
- The status of the prefix list.
- update
Time string - The update time of the prefix list.
- association_
count int - Number of associated resources for prefix list.
- cidrs Sequence[str]
- CIDR address block information for prefix list.
- creation_
time str - The creation time of the prefix list.
- description str
- Description.
- id str
- The id of the prefix list.
- ip_
version str - IP version of prefix list.
- max_
entries int - Maximum number of entries, which is the maximum number of items that can be added to the prefix list.
- prefix_
list_ Sequence[Getassociations Prefix Lists Prefix List Prefix List Association] - Collection of resources associated with VPC prefix list.
- prefix_
list_ Sequence[Getentries Prefix Lists Prefix List Prefix List Entry] - The prefix list entries.
- prefix_
list_ strid - The prefix list id.
- prefix_
list_ strname - A Name of prefix list.
- status str
- The status of the prefix list.
- update_
time str - The update time of the prefix list.
- association
Count Number - Number of associated resources for prefix list.
- cidrs List<String>
- CIDR address block information for prefix list.
- creation
Time String - The creation time of the prefix list.
- description String
- Description.
- id String
- The id of the prefix list.
- ip
Version String - IP version of prefix list.
- max
Entries Number - Maximum number of entries, which is the maximum number of items that can be added to the prefix list.
- prefix
List List<Property Map>Associations - Collection of resources associated with VPC prefix list.
- prefix
List List<Property Map>Entries - The prefix list entries.
- prefix
List StringId - The prefix list id.
- prefix
List StringName - A Name of prefix list.
- status String
- The status of the prefix list.
- update
Time String - The update time of the prefix list.
GetPrefixListsPrefixListPrefixListAssociation
- 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.
GetPrefixListsPrefixListPrefixListEntry
- Cidr string
- CIDR address blocks for prefix list entries.
- Description string
- Description.
- Prefix
List stringId - The prefix list id.
- Cidr string
- CIDR address blocks for prefix list entries.
- Description string
- Description.
- Prefix
List stringId - The prefix list id.
- cidr String
- CIDR address blocks for prefix list entries.
- description String
- Description.
- prefix
List StringId - The prefix list id.
- cidr string
- CIDR address blocks for prefix list entries.
- description string
- Description.
- prefix
List stringId - The prefix list id.
- cidr str
- CIDR address blocks for prefix list entries.
- description str
- Description.
- prefix_
list_ strid - The prefix list id.
- cidr String
- CIDR address blocks for prefix list entries.
- description String
- Description.
- prefix
List StringId - The prefix list id.
GetPrefixListsTagFilter
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengineTerraform Provider.
Volcengine v0.0.38 published on Friday, Oct 31, 2025 by Volcengine
