Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi
alicloud.ecs.getEcsPrefixLists
Explore with Pulumi AI
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)
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 Changes to this property will trigger replacement.
- 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.
- A list of Prefix List IDs.
- Name
Regex Changes to this property will trigger replacement.
- 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 Changes to this property will trigger replacement.
- 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.
- A list of Prefix List IDs.
- Name
Regex Changes to this property will trigger replacement.
- 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 Changes to this property will trigger replacement.
- 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
Changes to this property will trigger replacement.
- A list of Prefix List IDs.
- name
Regex Changes to this property will trigger replacement.
- 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 Changes to this property will trigger replacement.
- 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
Changes to this property will trigger replacement.
- A list of Prefix List IDs.
- name
Regex Changes to this property will trigger replacement.
- 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 Changes to this property will trigger replacement.
- 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.
- A list of Prefix List IDs.
- name_
regex Changes to this property will trigger replacement.
- 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 Changes to this property will trigger replacement.
- 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
Changes to this property will trigger replacement.
- A list of Prefix List IDs.
- name
Regex Changes to this property will trigger replacement.
- 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 This property is required. string - 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. 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.Ali Cloud. Ecs. Inputs. Get Ecs Prefix Lists List Entry> - Id
This property is required. string - 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. string - The ID of the prefix list.
- Prefix
List Name This property is required. string - The name of the prefix list.
- Address
Family This property is required. string - 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. 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. []GetEcs Prefix Lists List Entry - Id
This property is required. string - 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. string - The ID of the prefix list.
- Prefix
List Name This property is required. string - The name of the prefix list.
- address
Family This property is required. String - The address family of the prefix list. Valid values:
IPv4
,IPv6
. - association
Count This property is required. Integer - The amount of associated resources.
- create
Time 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<GetEcs Prefix Lists List Entry> - id
This property is required. String - The ID of the prefix list.
- max
Entries This property is required. Integer - The maximum number of entries that the prefix list supports.
- prefix
List Id This property is required. String - The ID of the prefix list.
- prefix
List Name This property is required. String - The name of the prefix list.
- address
Family This property is required. string - The address family of the prefix list. Valid values:
IPv4
,IPv6
. - association
Count This property is required. number - The amount of associated resources.
- create
Time 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. GetEcs Prefix Lists List Entry[] - id
This property is required. string - The ID of the prefix list.
- max
Entries This property is required. number - The maximum number of entries that the prefix list supports.
- prefix
List Id This property is required. string - The ID of the prefix list.
- prefix
List Name 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[GetEcs Prefix Lists List Entry] - 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.
- address
Family This property is required. String - The address family of the prefix list. Valid values:
IPv4
,IPv6
. - association
Count This property is required. Number - The amount of associated resources.
- create
Time 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.
- max
Entries This property is required. Number - The maximum number of entries that the prefix list supports.
- prefix
List Id This property is required. String - The ID of the prefix list.
- prefix
List Name 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.