Alibaba Cloud v3.87.0 published on Saturday, Oct 18, 2025 by Pulumi
alicloud.ecs.getEcsPrefixLists
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.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)
public static Output<GetEcsPrefixListsResult> getEcsPrefixLists(GetEcsPrefixListsArgs args, InvokeOptions options)
fn::invoke:
function: alicloud:ecs/getEcsPrefixLists:getEcsPrefixLists
arguments:
# arguments dictionary
The following arguments are supported:
- Address
Family 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. - Enable
Details bool - Ids List<string>
- A list of Prefix List IDs.
- Name
Regex string - A regex string to filter results by
prefix_list_name
. - Output
File string - File name where to save data source results (after running
pulumi preview
).
- Address
Family 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. - Enable
Details bool - Ids []string
- A list of Prefix List IDs.
- Name
Regex string - A regex string to filter results by
prefix_list_name
. - Output
File string - File name where to save data source results (after running
pulumi preview
).
- address
Family 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. - enable
Details Boolean - ids List<String>
- A list of Prefix List IDs.
- name
Regex String - A regex string to filter results by
prefix_list_name
. - output
File String - File name where to save data source results (after running
pulumi preview
).
- address
Family 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. - enable
Details boolean - ids string[]
- A list of Prefix List IDs.
- name
Regex string - A regex string to filter results by
prefix_list_name
. - output
File 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
).
- address
Family 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. - enable
Details Boolean - ids List<String>
- A list of Prefix List IDs.
- name
Regex String - A regex string to filter results by
prefix_list_name
. - output
File 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.
Ali Cloud. Ecs. Outputs. Get Ecs Prefix Lists List> - Names List<string>
- Address
Family string - Enable
Details bool - Name
Regex string - Output
File string
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Lists
[]Get
Ecs Prefix Lists List - Names []string
- Address
Family string - Enable
Details bool - Name
Regex string - Output
File string
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- lists
List<Get
Ecs Prefix Lists List> - names List<String>
- address
Family String - enable
Details Boolean - name
Regex String - output
File String
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- lists
Get
Ecs Prefix Lists List[] - names string[]
- address
Family string - enable
Details boolean - name
Regex string - output
File string
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- lists
Sequence[Get
Ecs Prefix Lists List] - 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>
- address
Family String - enable
Details Boolean - name
Regex String - output
File String
Supporting Types
GetEcsPrefixListsList
- Address
Family string - The address family of the prefix list. Valid values:
IPv4
,IPv6
. - Association
Count int - The amount of associated resources.
- Create
Time string - The time when the prefix list was created.
- Description string
- The description of the prefix list.
- Entries
List<Pulumi.
Ali Cloud. Ecs. Inputs. Get Ecs Prefix Lists List Entry> - Id string
- The ID of the prefix list.
- Max
Entries int - The maximum number of entries that the prefix list supports.
- Prefix
List stringId - The ID of the prefix list.
- Prefix
List stringName - The name of the prefix list.
- Address
Family string - The address family of the prefix list. Valid values:
IPv4
,IPv6
. - Association
Count int - The amount of associated resources.
- Create
Time string - The time when the prefix list was created.
- Description string
- The description of the prefix list.
- Entries
[]Get
Ecs Prefix Lists List Entry - Id string
- The ID of the prefix list.
- Max
Entries int - The maximum number of entries that the prefix list supports.
- Prefix
List stringId - The ID of the prefix list.
- Prefix
List stringName - The name of the prefix list.
- address
Family String - The address family of the prefix list. Valid values:
IPv4
,IPv6
. - association
Count Integer - The amount of associated resources.
- create
Time String - The time when the prefix list was created.
- description String
- The description of the prefix list.
- entries
List<Get
Ecs Prefix Lists List Entry> - id String
- The ID of the prefix list.
- max
Entries Integer - The maximum number of entries that the prefix list supports.
- prefix
List StringId - The ID of the prefix list.
- prefix
List StringName - The name of the prefix list.
- address
Family string - The address family of the prefix list. Valid values:
IPv4
,IPv6
. - association
Count number - The amount of associated resources.
- create
Time string - The time when the prefix list was created.
- description string
- The description of the prefix list.
- entries
Get
Ecs Prefix Lists List Entry[] - id string
- The ID of the prefix list.
- max
Entries number - The maximum number of entries that the prefix list supports.
- prefix
List stringId - The ID of the prefix list.
- prefix
List stringName - 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[Get
Ecs Prefix Lists List Entry] - id str
- The ID of the prefix list.
- max_
entries int - The maximum number of entries that the prefix list supports.
- prefix_
list_ strid - The ID of the prefix list.
- prefix_
list_ strname - The name of the prefix list.
- address
Family String - The address family of the prefix list. Valid values:
IPv4
,IPv6
. - association
Count Number - The amount of associated resources.
- create
Time 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.
- max
Entries Number - The maximum number of entries that the prefix list supports.
- prefix
List StringId - The ID of the prefix list.
- prefix
List StringName - The name of the prefix list.
GetEcsPrefixListsListEntry
- Cidr string
- Description string
- The description of the prefix list.
- Cidr string
- Description string
- The description of the prefix list.
- cidr String
- description String
- The description of the prefix list.
- cidr string
- description string
- The description of the prefix list.
- cidr str
- description str
- The description of the prefix list.
- cidr String
- description 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.