1. Packages
  2. Volcengine
  3. API Docs
  4. vpc
  5. PrefixLists
Volcengine v0.0.24 published on Tuesday, Jun 25, 2024 by Volcengine

volcengine.vpc.PrefixLists

Explore with Pulumi AI

volcengine logo
Volcengine v0.0.24 published on Tuesday, Jun 25, 2024 by Volcengine

    Use this data source to query detailed information of vpc prefix lists

    Example Usage

    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.PrefixLists.Invoke(new()
        {
            Ids = new[]
            {
                fooPrefixList.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.PrefixListsOutput(ctx, vpc.PrefixListsOutputArgs{
    			Ids: pulumi.StringArray{
    				fooPrefixList.ID(),
    			},
    		}, nil)
    		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 com.pulumi.volcengine.vpc.VpcFunctions;
    import com.pulumi.volcengine.vpc.inputs.PrefixListsArgs;
    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.PrefixLists(PrefixListsArgs.builder()
                .ids(fooPrefixList.id())
                .build());
    
        }
    }
    
    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.prefix_lists_output(ids=[foo_prefix_list.id])
    
    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.PrefixListsOutput({
        ids: [fooPrefixList.id],
    });
    
    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:PrefixLists
          Arguments:
            ids:
              - ${fooPrefixList.id}
    

    Using PrefixLists

    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 prefixLists(args: PrefixListsArgs, opts?: InvokeOptions): Promise<PrefixListsResult>
    function prefixListsOutput(args: PrefixListsOutputArgs, opts?: InvokeOptions): Output<PrefixListsResult>
    def 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[PrefixListsTagFilter]] = None,
                     opts: Optional[InvokeOptions] = None) -> PrefixListsResult
    def 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[PrefixListsTagFilterArgs]]]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[PrefixListsResult]
    func PrefixLists(ctx *Context, args *PrefixListsArgs, opts ...InvokeOption) (*PrefixListsResult, error)
    func PrefixListsOutput(ctx *Context, args *PrefixListsOutputArgs, opts ...InvokeOption) PrefixListsResultOutput
    public static class PrefixLists 
    {
        public static Task<PrefixListsResult> InvokeAsync(PrefixListsArgs args, InvokeOptions? opts = null)
        public static Output<PrefixListsResult> Invoke(PrefixListsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<PrefixListsResult> prefixLists(PrefixListsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: volcengine:vpc:PrefixLists
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Ids List<string>
    A list of prefix list ids.
    IpVersion string
    IP version of prefix list.
    OutputFile string
    File name where to save data source results.
    PrefixListName string
    A Name of prefix list.
    TagFilters List<PrefixListsTagFilter>
    List of tag filters.
    Ids []string
    A list of prefix list ids.
    IpVersion string
    IP version of prefix list.
    OutputFile string
    File name where to save data source results.
    PrefixListName string
    A Name of prefix list.
    TagFilters []PrefixListsTagFilter
    List of tag filters.
    ids List<String>
    A list of prefix list ids.
    ipVersion String
    IP version of prefix list.
    outputFile String
    File name where to save data source results.
    prefixListName String
    A Name of prefix list.
    tagFilters List<PrefixListsTagFilter>
    List of tag filters.
    ids string[]
    A list of prefix list ids.
    ipVersion string
    IP version of prefix list.
    outputFile string
    File name where to save data source results.
    prefixListName string
    A Name of prefix list.
    tagFilters PrefixListsTagFilter[]
    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_name str
    A Name of prefix list.
    tag_filters Sequence[PrefixListsTagFilter]
    List of tag filters.
    ids List<String>
    A list of prefix list ids.
    ipVersion String
    IP version of prefix list.
    outputFile String
    File name where to save data source results.
    prefixListName String
    A Name of prefix list.
    tagFilters List<Property Map>
    List of tag filters.

    PrefixLists Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    PrefixLists List<PrefixListsPrefixList>
    The collection of query.
    TotalCount int
    The total count of query.
    Ids List<string>
    IpVersion string
    The ip version of the prefix list.
    OutputFile string
    PrefixListName string
    The prefix list name.
    TagFilters List<PrefixListsTagFilter>
    Id string
    The provider-assigned unique ID for this managed resource.
    PrefixLists []PrefixListsPrefixList
    The collection of query.
    TotalCount int
    The total count of query.
    Ids []string
    IpVersion string
    The ip version of the prefix list.
    OutputFile string
    PrefixListName string
    The prefix list name.
    TagFilters []PrefixListsTagFilter
    id String
    The provider-assigned unique ID for this managed resource.
    prefixLists List<PrefixListsPrefixList>
    The collection of query.
    totalCount Integer
    The total count of query.
    ids List<String>
    ipVersion String
    The ip version of the prefix list.
    outputFile String
    prefixListName String
    The prefix list name.
    tagFilters List<PrefixListsTagFilter>
    id string
    The provider-assigned unique ID for this managed resource.
    prefixLists PrefixListsPrefixList[]
    The collection of query.
    totalCount number
    The total count of query.
    ids string[]
    ipVersion string
    The ip version of the prefix list.
    outputFile string
    prefixListName string
    The prefix list name.
    tagFilters PrefixListsTagFilter[]
    id str
    The provider-assigned unique ID for this managed resource.
    prefix_lists Sequence[PrefixListsPrefixList]
    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_name str
    The prefix list name.
    tag_filters Sequence[PrefixListsTagFilter]
    id String
    The provider-assigned unique ID for this managed resource.
    prefixLists List<Property Map>
    The collection of query.
    totalCount Number
    The total count of query.
    ids List<String>
    ipVersion String
    The ip version of the prefix list.
    outputFile String
    prefixListName String
    The prefix list name.
    tagFilters List<Property Map>

    Supporting Types

    PrefixListsPrefixList

    AssociationCount int
    Number of associated resources for prefix list.
    Cidrs List<string>
    CIDR address block information for prefix list.
    CreationTime string
    The creation time of the prefix list.
    Description string
    Description.
    Id string
    The id of the prefix list.
    IpVersion string
    IP version of prefix list.
    MaxEntries int
    Maximum number of entries, which is the maximum number of items that can be added to the prefix list.
    PrefixListAssociations List<PrefixListsPrefixListPrefixListAssociation>
    Collection of resources associated with VPC prefix list.
    PrefixListEntries List<PrefixListsPrefixListPrefixListEntry>
    The prefix list entries.
    PrefixListId string
    The prefix list id.
    PrefixListName string
    A Name of prefix list.
    Status string
    The status of the prefix list.
    UpdateTime string
    The update time of the prefix list.
    AssociationCount int
    Number of associated resources for prefix list.
    Cidrs []string
    CIDR address block information for prefix list.
    CreationTime string
    The creation time of the prefix list.
    Description string
    Description.
    Id string
    The id of the prefix list.
    IpVersion string
    IP version of prefix list.
    MaxEntries int
    Maximum number of entries, which is the maximum number of items that can be added to the prefix list.
    PrefixListAssociations []PrefixListsPrefixListPrefixListAssociation
    Collection of resources associated with VPC prefix list.
    PrefixListEntries []PrefixListsPrefixListPrefixListEntry
    The prefix list entries.
    PrefixListId string
    The prefix list id.
    PrefixListName string
    A Name of prefix list.
    Status string
    The status of the prefix list.
    UpdateTime string
    The update time of the prefix list.
    associationCount Integer
    Number of associated resources for prefix list.
    cidrs List<String>
    CIDR address block information for prefix list.
    creationTime String
    The creation time of the prefix list.
    description String
    Description.
    id String
    The id of the prefix list.
    ipVersion String
    IP version of prefix list.
    maxEntries Integer
    Maximum number of entries, which is the maximum number of items that can be added to the prefix list.
    prefixListAssociations List<PrefixListsPrefixListPrefixListAssociation>
    Collection of resources associated with VPC prefix list.
    prefixListEntries List<PrefixListsPrefixListPrefixListEntry>
    The prefix list entries.
    prefixListId String
    The prefix list id.
    prefixListName String
    A Name of prefix list.
    status String
    The status of the prefix list.
    updateTime String
    The update time of the prefix list.
    associationCount number
    Number of associated resources for prefix list.
    cidrs string[]
    CIDR address block information for prefix list.
    creationTime string
    The creation time of the prefix list.
    description string
    Description.
    id string
    The id of the prefix list.
    ipVersion string
    IP version of prefix list.
    maxEntries number
    Maximum number of entries, which is the maximum number of items that can be added to the prefix list.
    prefixListAssociations PrefixListsPrefixListPrefixListAssociation[]
    Collection of resources associated with VPC prefix list.
    prefixListEntries PrefixListsPrefixListPrefixListEntry[]
    The prefix list entries.
    prefixListId string
    The prefix list id.
    prefixListName string
    A Name of prefix list.
    status string
    The status of the prefix list.
    updateTime 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_associations Sequence[PrefixListsPrefixListPrefixListAssociation]
    Collection of resources associated with VPC prefix list.
    prefix_list_entries Sequence[PrefixListsPrefixListPrefixListEntry]
    The prefix list entries.
    prefix_list_id str
    The prefix list id.
    prefix_list_name str
    A Name of prefix list.
    status str
    The status of the prefix list.
    update_time str
    The update time of the prefix list.
    associationCount Number
    Number of associated resources for prefix list.
    cidrs List<String>
    CIDR address block information for prefix list.
    creationTime String
    The creation time of the prefix list.
    description String
    Description.
    id String
    The id of the prefix list.
    ipVersion String
    IP version of prefix list.
    maxEntries Number
    Maximum number of entries, which is the maximum number of items that can be added to the prefix list.
    prefixListAssociations List<Property Map>
    Collection of resources associated with VPC prefix list.
    prefixListEntries List<Property Map>
    The prefix list entries.
    prefixListId String
    The prefix list id.
    prefixListName String
    A Name of prefix list.
    status String
    The status of the prefix list.
    updateTime String
    The update time of the prefix list.

    PrefixListsPrefixListPrefixListAssociation

    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.

    PrefixListsPrefixListPrefixListEntry

    Cidr string
    CIDR address blocks for prefix list entries.
    Description string
    Description.
    PrefixListId string
    The prefix list id.
    Cidr string
    CIDR address blocks for prefix list entries.
    Description string
    Description.
    PrefixListId string
    The prefix list id.
    cidr String
    CIDR address blocks for prefix list entries.
    description String
    Description.
    prefixListId String
    The prefix list id.
    cidr string
    CIDR address blocks for prefix list entries.
    description string
    Description.
    prefixListId string
    The prefix list id.
    cidr str
    CIDR address blocks for prefix list entries.
    description str
    Description.
    prefix_list_id str
    The prefix list id.
    cidr String
    CIDR address blocks for prefix list entries.
    description String
    Description.
    prefixListId String
    The prefix list id.

    PrefixListsTagFilter

    Key string
    The key of the tag.
    Values List<string>
    The values of the tag.
    Key string
    The key of the tag.
    Values []string
    The values of the tag.
    key String
    The key of the tag.
    values List<String>
    The values of the tag.
    key string
    The key of the tag.
    values string[]
    The values of the tag.
    key str
    The key of the tag.
    values Sequence[str]
    The values of the tag.
    key String
    The key of the tag.
    values List<String>
    The values of the tag.

    Package Details

    Repository
    volcengine volcengine/pulumi-volcengine
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the volcengine Terraform Provider.
    volcengine logo
    Volcengine v0.0.24 published on Tuesday, Jun 25, 2024 by Volcengine