1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. ecs
  5. getEcsPrefixLists
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.ecs.getEcsPrefixLists

Explore with Pulumi AI

Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 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);
Copy
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)
Copy
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
	})
}
Copy
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),
    };
});
Copy
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()));
    }
}
Copy
variables:
  example:
    fn::invoke:
      function: alicloud:ecs:getEcsPrefixLists
      arguments:
        ids:
          - E2RY53-xxxx
        nameRegex: tf-testAcc
outputs:
  outputId: ${example.lists[0].id}
Copy

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>
Copy
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]
Copy
func GetEcsPrefixLists(ctx *Context, args *GetEcsPrefixListsArgs, opts ...InvokeOption) (*GetEcsPrefixListsResult, error)
func GetEcsPrefixListsOutput(ctx *Context, args *GetEcsPrefixListsOutputArgs, opts ...InvokeOption) GetEcsPrefixListsResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetEcsPrefixListsResult> getEcsPrefixLists(GetEcsPrefixListsArgs args, InvokeOptions options)
public static Output<GetEcsPrefixListsResult> getEcsPrefixLists(GetEcsPrefixListsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: alicloud:ecs/getEcsPrefixLists:getEcsPrefixLists
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

AddressFamily Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. List<string>
A list of Prefix List IDs.
NameRegex Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. []string
A list of Prefix List IDs.
NameRegex Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. List<String>
A list of Prefix List IDs.
nameRegex Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string[]
A list of Prefix List IDs.
nameRegex Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. Sequence[str]
A list of Prefix List IDs.
name_regex Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. List<String>
A list of Prefix List IDs.
nameRegex Changes to this property will trigger replacement. 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 This property is required. string
The address family of the prefix list. Valid values:IPv4,IPv6.
AssociationCount This property is required. int
The amount of associated resources.
CreateTime This property is required. string
The time when the prefix list was created.
Description This property is required. string
The description of the prefix list.
Entries This property is required. List<Pulumi.AliCloud.Ecs.Inputs.GetEcsPrefixListsListEntry>
Id This property is required. string
The ID of the prefix list.
MaxEntries This property is required. int
The maximum number of entries that the prefix list supports.
PrefixListId This property is required. string
The ID of the prefix list.
PrefixListName This property is required. string
The name of the prefix list.
AddressFamily This property is required. string
The address family of the prefix list. Valid values:IPv4,IPv6.
AssociationCount This property is required. int
The amount of associated resources.
CreateTime This property is required. string
The time when the prefix list was created.
Description This property is required. string
The description of the prefix list.
Entries This property is required. []GetEcsPrefixListsListEntry
Id This property is required. string
The ID of the prefix list.
MaxEntries This property is required. int
The maximum number of entries that the prefix list supports.
PrefixListId This property is required. string
The ID of the prefix list.
PrefixListName This property is required. string
The name of the prefix list.
addressFamily This property is required. String
The address family of the prefix list. Valid values:IPv4,IPv6.
associationCount This property is required. Integer
The amount of associated resources.
createTime This property is required. String
The time when the prefix list was created.
description This property is required. String
The description of the prefix list.
entries This property is required. List<GetEcsPrefixListsListEntry>
id This property is required. String
The ID of the prefix list.
maxEntries This property is required. Integer
The maximum number of entries that the prefix list supports.
prefixListId This property is required. String
The ID of the prefix list.
prefixListName This property is required. String
The name of the prefix list.
addressFamily This property is required. string
The address family of the prefix list. Valid values:IPv4,IPv6.
associationCount This property is required. number
The amount of associated resources.
createTime This property is required. string
The time when the prefix list was created.
description This property is required. string
The description of the prefix list.
entries This property is required. GetEcsPrefixListsListEntry[]
id This property is required. string
The ID of the prefix list.
maxEntries This property is required. number
The maximum number of entries that the prefix list supports.
prefixListId This property is required. string
The ID of the prefix list.
prefixListName This property is required. string
The name of the prefix list.
address_family This property is required. str
The address family of the prefix list. Valid values:IPv4,IPv6.
association_count This property is required. int
The amount of associated resources.
create_time This property is required. str
The time when the prefix list was created.
description This property is required. str
The description of the prefix list.
entries This property is required. Sequence[GetEcsPrefixListsListEntry]
id This property is required. str
The ID of the prefix list.
max_entries This property is required. int
The maximum number of entries that the prefix list supports.
prefix_list_id This property is required. str
The ID of the prefix list.
prefix_list_name This property is required. str
The name of the prefix list.
addressFamily This property is required. String
The address family of the prefix list. Valid values:IPv4,IPv6.
associationCount This property is required. Number
The amount of associated resources.
createTime This property is required. String
The time when the prefix list was created.
description This property is required. String
The description of the prefix list.
entries This property is required. List<Property Map>
id This property is required. String
The ID of the prefix list.
maxEntries This property is required. Number
The maximum number of entries that the prefix list supports.
prefixListId This property is required. String
The ID of the prefix list.
prefixListName This property is required. String
The name of the prefix list.

GetEcsPrefixListsListEntry

Cidr This property is required. string
Description This property is required. string
The description of the prefix list.
Cidr This property is required. string
Description This property is required. string
The description of the prefix list.
cidr This property is required. String
description This property is required. String
The description of the prefix list.
cidr This property is required. string
description This property is required. string
The description of the prefix list.
cidr This property is required. str
description This property is required. str
The description of the prefix list.
cidr This property is required. String
description This property is required. String
The description of the prefix list.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi