published on Thursday, Sep 17, 2026 by Pulumi
published on Thursday, Sep 17, 2026 by Pulumi
This data source provides the ESA Lists of the current Alibaba Cloud user.
NOTE: Available since v1.293.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "terraform_example";
const _default = new alicloud.esa.List("default", {
kind: "ip",
name: name,
description: name,
items: [
"10.1.1.1",
"10.1.1.2",
],
});
const ids = alicloud.esa.getListsOutput({
ids: [_default.id],
});
export const esaListsId0 = ids.apply(ids => ids.lists?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform_example"
default = alicloud.esa.List("default",
kind="ip",
name=name,
description=name,
items=[
"10.1.1.1",
"10.1.1.2",
])
ids = alicloud.esa.get_lists_output(ids=[default.id])
pulumi.export("esaListsId0", ids.lists[0].id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/esa"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "terraform_example"
if param := cfg.Get("name"); param != "" {
name = param
}
_default, err := esa.NewList(ctx, "default", &esa.ListArgs{
Kind: pulumi.String("ip"),
Name: pulumi.String(name),
Description: pulumi.String(name),
Items: pulumi.StringArray{
pulumi.String("10.1.1.1"),
pulumi.String("10.1.1.2"),
},
})
if err != nil {
return err
}
ids := esa.GetListsOutput(ctx, esa.GetListsOutputArgs{
Ids: pulumi.StringArray{
_default.ID().ToIDOutput().ToStringOutput(),
},
}, nil)
ctx.Export("esaListsId0", ids.ApplyT(func(ids esa.GetListsResult) (*string, error) {
return ids.Lists[0].Id, nil
}).(pulumi.StringPtrOutput))
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "terraform_example";
var @default = new AliCloud.Esa.List("default", new()
{
Kind = "ip",
Name = name,
Description = name,
Items = new[]
{
"10.1.1.1",
"10.1.1.2",
},
});
var ids = AliCloud.Esa.GetLists.Invoke(new()
{
Ids = new[]
{
@default.Id,
},
});
return new Dictionary<string, object?>
{
["esaListsId0"] = ids.Apply(getListsResult => getListsResult.Lists[0]?.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.esa.List;
import com.pulumi.alicloud.esa.ListArgs;
import com.pulumi.alicloud.esa.EsaFunctions;
import com.pulumi.alicloud.esa.inputs.GetListsArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 config = ctx.config();
final var name = config.get("name").orElse("terraform_example");
var default_ = new List("default", ListArgs.builder()
.kind("ip")
.name(name)
.description(name)
.items(
"10.1.1.1",
"10.1.1.2")
.build());
final var ids = EsaFunctions.getLists(GetListsArgs.builder()
.ids(default_.id())
.build());
ctx.export("esaListsId0", ids.applyValue(_ids -> _ids.lists()[0].id()));
}
}
configuration:
name:
type: string
default: terraform_example
resources:
default:
type: alicloud:esa:List
properties:
kind: ip
name: ${name}
description: ${name}
items:
- 10.1.1.1
- 10.1.1.2
variables:
ids:
fn::invoke:
function: alicloud:esa:getLists
arguments:
ids:
- ${default.id}
outputs:
esaListsId0: ${ids.lists[0].id}
pulumi {
required_providers {
alicloud = {
source = "pulumi/alicloud"
}
}
}
data "alicloud_esa_getlists" "ids" {
ids = [alicloud_esa_list.default.id]
}
resource "alicloud_esa_list" "default" {
kind = "ip"
name = var.name
description = var.name
items = ["10.1.1.1", "10.1.1.2"]
}
variable "name" {
type = string
default = "terraform_example"
}
output "esaListsId0" {
value = data.alicloud_esa_getlists.ids.lists[0].id
}
Using getLists
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 getLists(args: GetListsArgs, opts?: InvokeOptions): Promise<GetListsResult>
function getListsOutput(args: GetListsOutputArgs, opts?: InvokeOutputOptions): Output<GetListsResult>def get_lists(ids: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
query_args: Optional[GetListsQueryArgs] = None,
opts: Optional[InvokeOptions] = None) -> GetListsResult
def get_lists_output(ids: pulumi.Input[Optional[Sequence[pulumi.Input[str]]]] = None,
name_regex: pulumi.Input[Optional[str]] = None,
output_file: pulumi.Input[Optional[str]] = None,
query_args: pulumi.Input[Optional[GetListsQueryArgsArgs]] = None,
opts: Optional[InvokeOutputOptions] = None) -> Output[GetListsResult]func GetLists(ctx *Context, args *GetListsArgs, opts ...InvokeOption) (*GetListsResult, error)
func GetListsOutput(ctx *Context, args *GetListsOutputArgs, opts ...InvokeOption) GetListsResultOutput> Note: This function is named GetLists in the Go SDK.
public static class GetLists
{
public static Task<GetListsResult> InvokeAsync(GetListsArgs args, InvokeOptions? opts = null)
public static Output<GetListsResult> Invoke(GetListsInvokeArgs args, InvokeOptions? opts = null)
public static Output<GetListsResult> Invoke(GetListsInvokeArgs args, InvokeOutputOptions opts)
}public static CompletableFuture<GetListsResult> getLists(GetListsArgs args, InvokeOptions options)
public static Output<GetListsResult> getLists(GetListsArgs args, InvokeOptions options)
public static Output<GetListsResult> getLists(GetListsArgs args, InvokeOutputOptions options)
fn::invoke:
function: alicloud:esa/getLists:getLists
arguments:
# arguments dictionarydata "alicloud_esa_get_lists" "name" {
# arguments
}The following arguments are supported:
- Ids List<string>
- A list of List IDs used to filter the returned results locally.
- Name
Regex string - A regex string used to filter the returned results locally by List name.
- Output
File string - File name where to save data source results (after running
pulumi preview). - Query
Args Pulumi.Ali Cloud. Esa. Inputs. Get Lists Query Args - The query parameters sent to the server. At most one block is supported. See
queryArgsbelow.
- Ids []string
- A list of List IDs used to filter the returned results locally.
- Name
Regex string - A regex string used to filter the returned results locally by List name.
- Output
File string - File name where to save data source results (after running
pulumi preview). - Query
Args GetLists Query Args - The query parameters sent to the server. At most one block is supported. See
queryArgsbelow.
- ids list(string)
- A list of List IDs used to filter the returned results locally.
- name_
regex string - A regex string used to filter the returned results locally by List name.
- output_
file string - File name where to save data source results (after running
pulumi preview). - query_
args object - The query parameters sent to the server. At most one block is supported. See
queryArgsbelow.
- ids List<String>
- A list of List IDs used to filter the returned results locally.
- name
Regex String - A regex string used to filter the returned results locally by List name.
- output
File String - File name where to save data source results (after running
pulumi preview). - query
Args GetLists Query Args - The query parameters sent to the server. At most one block is supported. See
queryArgsbelow.
- ids string[]
- A list of List IDs used to filter the returned results locally.
- name
Regex string - A regex string used to filter the returned results locally by List name.
- output
File string - File name where to save data source results (after running
pulumi preview). - query
Args GetLists Query Args - The query parameters sent to the server. At most one block is supported. See
queryArgsbelow.
- ids Sequence[str]
- A list of List IDs used to filter the returned results locally.
- name_
regex str - A regex string used to filter the returned results locally by List name.
- output_
file str - File name where to save data source results (after running
pulumi preview). - query_
args GetLists Query Args - The query parameters sent to the server. At most one block is supported. See
queryArgsbelow.
- ids List<String>
- A list of List IDs used to filter the returned results locally.
- name
Regex String - A regex string used to filter the returned results locally by List name.
- output
File String - File name where to save data source results (after running
pulumi preview). - query
Args Property Map - The query parameters sent to the server. At most one block is supported. See
queryArgsbelow.
getLists 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. Esa. Outputs. Get Lists List> - A list of Lists. Each element contains the following attributes:
- Names List<string>
- A list of List names.
- Name
Regex string - Output
File string - Query
Args Pulumi.Ali Cloud. Esa. Outputs. Get Lists Query Args
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Lists
[]Get
Lists List - A list of Lists. Each element contains the following attributes:
- Names []string
- A list of List names.
- Name
Regex string - Output
File string - Query
Args GetLists Query Args
- id string
- The provider-assigned unique ID for this managed resource.
- ids list(string)
- lists list(object)
- A list of Lists. Each element contains the following attributes:
- names list(string)
- A list of List names.
- name_
regex string - output_
file string - query_
args object
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- lists
List<Get
Lists List> - A list of Lists. Each element contains the following attributes:
- names List<String>
- A list of List names.
- name
Regex String - output
File String - query
Args GetLists Query Args
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- lists
Get
Lists List[] - A list of Lists. Each element contains the following attributes:
- names string[]
- A list of List names.
- name
Regex string - output
File string - query
Args GetLists Query Args
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- lists
Sequence[Get
Lists List] - A list of Lists. Each element contains the following attributes:
- names Sequence[str]
- A list of List names.
- name_
regex str - output_
file str - query_
args GetLists Query Args
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- lists List<Property Map>
- A list of Lists. Each element contains the following attributes:
- names List<String>
- A list of List names.
- name
Regex String - output
File String - query
Args Property Map
Supporting Types
GetListsList
- Description string
- The description of the List.
- Id string
- The ID of the List.
- Kind string
- The type of the List.
- Length int
- The number of items contained in the List.
- List
Id string - The ID of the List.
- Name string
- The name of the List.
- Update
Time string - The last modification time of the List.
- Description string
- The description of the List.
- Id string
- The ID of the List.
- Kind string
- The type of the List.
- Length int
- The number of items contained in the List.
- List
Id string - The ID of the List.
- Name string
- The name of the List.
- Update
Time string - The last modification time of the List.
- description string
- The description of the List.
- id string
- The ID of the List.
- kind string
- The type of the List.
- length number
- The number of items contained in the List.
- list_
id string - The ID of the List.
- name string
- The name of the List.
- update_
time string - The last modification time of the List.
- description String
- The description of the List.
- id String
- The ID of the List.
- kind String
- The type of the List.
- length Integer
- The number of items contained in the List.
- list
Id String - The ID of the List.
- name String
- The name of the List.
- update
Time String - The last modification time of the List.
- description string
- The description of the List.
- id string
- The ID of the List.
- kind string
- The type of the List.
- length number
- The number of items contained in the List.
- list
Id string - The ID of the List.
- name string
- The name of the List.
- update
Time string - The last modification time of the List.
- description str
- The description of the List.
- id str
- The ID of the List.
- kind str
- The type of the List.
- length int
- The number of items contained in the List.
- list_
id str - The ID of the List.
- name str
- The name of the List.
- update_
time str - The last modification time of the List.
- description String
- The description of the List.
- id String
- The ID of the List.
- kind String
- The type of the List.
- length Number
- The number of items contained in the List.
- list
Id String - The ID of the List.
- name String
- The name of the List.
- update
Time String - The last modification time of the List.
GetListsQueryArgs
- Desc bool
Whether to sort in descending order. Valid values:
true,false.QueryArgs values are passed unchanged for server-side interpretation; filtering behavior depends on the ESA API.
- Description
Like string - The fuzzy search for list description.
- Id
Like string - The fuzzy search for list ID.
- Item
Like string - The value passed to the ListLists API to filter list contents.
- Kind string
- The type of the custom list, e.g.
ip. - Name
Item stringLike - The fuzzy search matching a list name or its items.
- Name
Like string - The fuzzy search for list name.
- Order
By string - Specify the column to sort by.
- Desc bool
Whether to sort in descending order. Valid values:
true,false.QueryArgs values are passed unchanged for server-side interpretation; filtering behavior depends on the ESA API.
- Description
Like string - The fuzzy search for list description.
- Id
Like string - The fuzzy search for list ID.
- Item
Like string - The value passed to the ListLists API to filter list contents.
- Kind string
- The type of the custom list, e.g.
ip. - Name
Item stringLike - The fuzzy search matching a list name or its items.
- Name
Like string - The fuzzy search for list name.
- Order
By string - Specify the column to sort by.
- desc bool
Whether to sort in descending order. Valid values:
true,false.QueryArgs values are passed unchanged for server-side interpretation; filtering behavior depends on the ESA API.
- description_
like string - The fuzzy search for list description.
- id_
like string - The fuzzy search for list ID.
- item_
like string - The value passed to the ListLists API to filter list contents.
- kind string
- The type of the custom list, e.g.
ip. - name_
item_ stringlike - The fuzzy search matching a list name or its items.
- name_
like string - The fuzzy search for list name.
- order_
by string - Specify the column to sort by.
- desc Boolean
Whether to sort in descending order. Valid values:
true,false.QueryArgs values are passed unchanged for server-side interpretation; filtering behavior depends on the ESA API.
- description
Like String - The fuzzy search for list description.
- id
Like String - The fuzzy search for list ID.
- item
Like String - The value passed to the ListLists API to filter list contents.
- kind String
- The type of the custom list, e.g.
ip. - name
Item StringLike - The fuzzy search matching a list name or its items.
- name
Like String - The fuzzy search for list name.
- order
By String - Specify the column to sort by.
- desc boolean
Whether to sort in descending order. Valid values:
true,false.QueryArgs values are passed unchanged for server-side interpretation; filtering behavior depends on the ESA API.
- description
Like string - The fuzzy search for list description.
- id
Like string - The fuzzy search for list ID.
- item
Like string - The value passed to the ListLists API to filter list contents.
- kind string
- The type of the custom list, e.g.
ip. - name
Item stringLike - The fuzzy search matching a list name or its items.
- name
Like string - The fuzzy search for list name.
- order
By string - Specify the column to sort by.
- desc bool
Whether to sort in descending order. Valid values:
true,false.QueryArgs values are passed unchanged for server-side interpretation; filtering behavior depends on the ESA API.
- description_
like str - The fuzzy search for list description.
- id_
like str - The fuzzy search for list ID.
- item_
like str - The value passed to the ListLists API to filter list contents.
- kind str
- The type of the custom list, e.g.
ip. - name_
item_ strlike - The fuzzy search matching a list name or its items.
- name_
like str - The fuzzy search for list name.
- order_
by str - Specify the column to sort by.
- desc Boolean
Whether to sort in descending order. Valid values:
true,false.QueryArgs values are passed unchanged for server-side interpretation; filtering behavior depends on the ESA API.
- description
Like String - The fuzzy search for list description.
- id
Like String - The fuzzy search for list ID.
- item
Like String - The value passed to the ListLists API to filter list contents.
- kind String
- The type of the custom list, e.g.
ip. - name
Item StringLike - The fuzzy search matching a list name or its items.
- name
Like String - The fuzzy search for list name.
- order
By String - Specify the column to sort by.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.
published on Thursday, Sep 17, 2026 by Pulumi