1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. ecs
  5. getEcsPrefixLists
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

alicloud.ecs.getEcsPrefixLists

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

    This data source provides the Ecs Prefix Lists of the current Alibaba Cloud user.

    NOTE: Available in v1.152.0+.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const example = alicloud.ecs.getEcsPrefixLists({
        ids: ["E2RY53-xxxx"],
        nameRegex: "tf-testAcc",
    });
    export const outputId = example.then(example => example.lists?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    example = alicloud.ecs.get_ecs_prefix_lists(ids=["E2RY53-xxxx"],
        name_regex="tf-testAcc")
    pulumi.export("outputId", example.lists[0].id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := ecs.GetEcsPrefixLists(ctx, &ecs.GetEcsPrefixListsArgs{
    			Ids: []string{
    				"E2RY53-xxxx",
    			},
    			NameRegex: pulumi.StringRef("tf-testAcc"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("outputId", example.Lists[0].Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = AliCloud.Ecs.GetEcsPrefixLists.Invoke(new()
        {
            Ids = new[]
            {
                "E2RY53-xxxx",
            },
            NameRegex = "tf-testAcc",
        });
    
        return new Dictionary<string, object?>
        {
            ["outputId"] = example.Apply(getEcsPrefixListsResult => getEcsPrefixListsResult.Lists[0]?.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.ecs.EcsFunctions;
    import com.pulumi.alicloud.ecs.inputs.GetEcsPrefixListsArgs;
    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) {
            final var example = EcsFunctions.getEcsPrefixLists(GetEcsPrefixListsArgs.builder()
                .ids("E2RY53-xxxx")
                .nameRegex("tf-testAcc")
                .build());
    
            ctx.export("outputId", example.applyValue(getEcsPrefixListsResult -> getEcsPrefixListsResult.lists()[0].id()));
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: alicloud:ecs:getEcsPrefixLists
          Arguments:
            ids:
              - E2RY53-xxxx
            nameRegex: tf-testAcc
    outputs:
      outputId: ${example.lists[0].id}
    

    Using getEcsPrefixLists

    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 getEcsPrefixLists(args: GetEcsPrefixListsArgs, opts?: InvokeOptions): Promise<GetEcsPrefixListsResult>
    function getEcsPrefixListsOutput(args: GetEcsPrefixListsOutputArgs, opts?: InvokeOptions): Output<GetEcsPrefixListsResult>
    def get_ecs_prefix_lists(address_family: Optional[str] = None,
                             enable_details: Optional[bool] = None,
                             ids: Optional[Sequence[str]] = None,
                             name_regex: Optional[str] = None,
                             output_file: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetEcsPrefixListsResult
    def get_ecs_prefix_lists_output(address_family: Optional[pulumi.Input[str]] = None,
                             enable_details: Optional[pulumi.Input[bool]] = None,
                             ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                             name_regex: Optional[pulumi.Input[str]] = None,
                             output_file: Optional[pulumi.Input[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetEcsPrefixListsResult]
    func GetEcsPrefixLists(ctx *Context, args *GetEcsPrefixListsArgs, opts ...InvokeOption) (*GetEcsPrefixListsResult, error)
    func GetEcsPrefixListsOutput(ctx *Context, args *GetEcsPrefixListsOutputArgs, opts ...InvokeOption) GetEcsPrefixListsResultOutput

    > Note: This function is named GetEcsPrefixLists in the Go SDK.

    public static class GetEcsPrefixLists 
    {
        public static Task<GetEcsPrefixListsResult> InvokeAsync(GetEcsPrefixListsArgs args, InvokeOptions? opts = null)
        public static Output<GetEcsPrefixListsResult> Invoke(GetEcsPrefixListsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetEcsPrefixListsResult> getEcsPrefixLists(GetEcsPrefixListsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:ecs/getEcsPrefixLists:getEcsPrefixLists
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AddressFamily string
    The address family of the prefix list. Valid values: IPv4,IPv6. This parameter is empty by default, which indicates that all prefix lists are to be queried.
    EnableDetails bool
    Ids List<string>
    A list of Prefix List IDs.
    NameRegex string
    A regex string to filter results by prefix_list_name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    AddressFamily string
    The address family of the prefix list. Valid values: IPv4,IPv6. This parameter is empty by default, which indicates that all prefix lists are to be queried.
    EnableDetails bool
    Ids []string
    A list of Prefix List IDs.
    NameRegex string
    A regex string to filter results by prefix_list_name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    addressFamily String
    The address family of the prefix list. Valid values: IPv4,IPv6. This parameter is empty by default, which indicates that all prefix lists are to be queried.
    enableDetails Boolean
    ids List<String>
    A list of Prefix List IDs.
    nameRegex String
    A regex string to filter results by prefix_list_name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    addressFamily string
    The address family of the prefix list. Valid values: IPv4,IPv6. This parameter is empty by default, which indicates that all prefix lists are to be queried.
    enableDetails boolean
    ids string[]
    A list of Prefix List IDs.
    nameRegex string
    A regex string to filter results by prefix_list_name.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    address_family str
    The address family of the prefix list. Valid values: IPv4,IPv6. This parameter is empty by default, which indicates that all prefix lists are to be queried.
    enable_details bool
    ids Sequence[str]
    A list of Prefix List IDs.
    name_regex str
    A regex string to filter results by prefix_list_name.
    output_file str
    File name where to save data source results (after running pulumi preview).
    addressFamily String
    The address family of the prefix list. Valid values: IPv4,IPv6. This parameter is empty by default, which indicates that all prefix lists are to be queried.
    enableDetails Boolean
    ids List<String>
    A list of Prefix List IDs.
    nameRegex String
    A regex string to filter results by prefix_list_name.
    outputFile String
    File name where to save data source results (after running pulumi preview).

    getEcsPrefixLists Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    Lists List<Pulumi.AliCloud.Ecs.Outputs.GetEcsPrefixListsList>
    Names List<string>
    AddressFamily string
    EnableDetails bool
    NameRegex string
    OutputFile string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    Lists []GetEcsPrefixListsList
    Names []string
    AddressFamily string
    EnableDetails bool
    NameRegex string
    OutputFile string
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    lists List<GetEcsPrefixListsList>
    names List<String>
    addressFamily String
    enableDetails Boolean
    nameRegex String
    outputFile String
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    lists GetEcsPrefixListsList[]
    names string[]
    addressFamily string
    enableDetails boolean
    nameRegex string
    outputFile string
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    lists Sequence[GetEcsPrefixListsList]
    names Sequence[str]
    address_family str
    enable_details bool
    name_regex str
    output_file str
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    lists List<Property Map>
    names List<String>
    addressFamily String
    enableDetails Boolean
    nameRegex String
    outputFile String

    Supporting Types

    GetEcsPrefixListsList

    AddressFamily string
    The address family of the prefix list. Valid values:IPv4,IPv6.
    AssociationCount int
    The amount of associated resources.
    CreateTime string
    The time when the prefix list was created.
    Description string
    The description of the prefix list.
    Entries List<Pulumi.AliCloud.Ecs.Inputs.GetEcsPrefixListsListEntry>
    Id string
    The ID of the prefix list.
    MaxEntries int
    The maximum number of entries that the prefix list supports.
    PrefixListId string
    The ID of the prefix list.
    PrefixListName string
    The name of the prefix list.
    AddressFamily string
    The address family of the prefix list. Valid values:IPv4,IPv6.
    AssociationCount int
    The amount of associated resources.
    CreateTime string
    The time when the prefix list was created.
    Description string
    The description of the prefix list.
    Entries []GetEcsPrefixListsListEntry
    Id string
    The ID of the prefix list.
    MaxEntries int
    The maximum number of entries that the prefix list supports.
    PrefixListId string
    The ID of the prefix list.
    PrefixListName string
    The name of the prefix list.
    addressFamily String
    The address family of the prefix list. Valid values:IPv4,IPv6.
    associationCount Integer
    The amount of associated resources.
    createTime String
    The time when the prefix list was created.
    description String
    The description of the prefix list.
    entries List<GetEcsPrefixListsListEntry>
    id String
    The ID of the prefix list.
    maxEntries Integer
    The maximum number of entries that the prefix list supports.
    prefixListId String
    The ID of the prefix list.
    prefixListName String
    The name of the prefix list.
    addressFamily string
    The address family of the prefix list. Valid values:IPv4,IPv6.
    associationCount number
    The amount of associated resources.
    createTime string
    The time when the prefix list was created.
    description string
    The description of the prefix list.
    entries GetEcsPrefixListsListEntry[]
    id string
    The ID of the prefix list.
    maxEntries number
    The maximum number of entries that the prefix list supports.
    prefixListId string
    The ID of the prefix list.
    prefixListName string
    The name of the prefix list.
    address_family str
    The address family of the prefix list. Valid values:IPv4,IPv6.
    association_count int
    The amount of associated resources.
    create_time str
    The time when the prefix list was created.
    description str
    The description of the prefix list.
    entries Sequence[GetEcsPrefixListsListEntry]
    id str
    The ID of the prefix list.
    max_entries int
    The maximum number of entries that the prefix list supports.
    prefix_list_id str
    The ID of the prefix list.
    prefix_list_name str
    The name of the prefix list.
    addressFamily String
    The address family of the prefix list. Valid values:IPv4,IPv6.
    associationCount Number
    The amount of associated resources.
    createTime String
    The time when the prefix list was created.
    description String
    The description of the prefix list.
    entries List<Property Map>
    id String
    The ID of the prefix list.
    maxEntries Number
    The maximum number of entries that the prefix list supports.
    prefixListId String
    The ID of the prefix list.
    prefixListName String
    The name of the prefix list.

    GetEcsPrefixListsListEntry

    Cidr string
    Description string
    Cidr string
    Description string
    cidr String
    description String
    cidr string
    description string
    cidr String
    description String

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi