Try AWS Native preview for resources not in the classic version.
aws.ec2.getManagedPrefixLists
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
This resource can be useful for getting back a list of managed prefix list ids to be referenced elsewhere.
Example Usage
The following returns all managed prefix lists filtered by tags
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const testEnv = aws.ec2.getManagedPrefixLists({
tags: {
Env: "test",
},
});
const testEnvGetManagedPrefixList = .map(__index => (aws.ec2.getManagedPrefixList({
id: _arg0_.ids[__index],
})));
import pulumi
import pulumi_aws as aws
test_env = aws.ec2.get_managed_prefix_lists(tags={
"Env": "test",
})
test_env_get_managed_prefix_list = [aws.ec2.get_managed_prefix_list(id=test_env.ids[__index]) for __index in range(len(test_env.ids))]
Coming soon!
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var testEnv = Aws.Ec2.GetManagedPrefixLists.Invoke(new()
{
Tags =
{
{ "Env", "test" },
},
});
var testEnvGetManagedPrefixList = ;
});
Coming soon!
Coming soon!
Using getManagedPrefixLists
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 getManagedPrefixLists(args: GetManagedPrefixListsArgs, opts?: InvokeOptions): Promise<GetManagedPrefixListsResult>
function getManagedPrefixListsOutput(args: GetManagedPrefixListsOutputArgs, opts?: InvokeOptions): Output<GetManagedPrefixListsResult>
def get_managed_prefix_lists(filters: Optional[Sequence[GetManagedPrefixListsFilter]] = None,
tags: Optional[Mapping[str, str]] = None,
opts: Optional[InvokeOptions] = None) -> GetManagedPrefixListsResult
def get_managed_prefix_lists_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetManagedPrefixListsFilterArgs]]]] = None,
tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetManagedPrefixListsResult]
func GetManagedPrefixLists(ctx *Context, args *GetManagedPrefixListsArgs, opts ...InvokeOption) (*GetManagedPrefixListsResult, error)
func GetManagedPrefixListsOutput(ctx *Context, args *GetManagedPrefixListsOutputArgs, opts ...InvokeOption) GetManagedPrefixListsResultOutput
> Note: This function is named GetManagedPrefixLists
in the Go SDK.
public static class GetManagedPrefixLists
{
public static Task<GetManagedPrefixListsResult> InvokeAsync(GetManagedPrefixListsArgs args, InvokeOptions? opts = null)
public static Output<GetManagedPrefixListsResult> Invoke(GetManagedPrefixListsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetManagedPrefixListsResult> getManagedPrefixLists(GetManagedPrefixListsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: aws:ec2/getManagedPrefixLists:getManagedPrefixLists
arguments:
# arguments dictionary
The following arguments are supported:
- Filters
List<Get
Managed Prefix Lists Filter> - Custom filter block as described below.
- Dictionary<string, string>
Map of tags, each pair of which must exactly match a pair on the desired .
More complex filters can be expressed using one or more
filter
sub-blocks, which take the following arguments:
- Filters
[]Get
Managed Prefix Lists Filter - Custom filter block as described below.
- map[string]string
Map of tags, each pair of which must exactly match a pair on the desired .
More complex filters can be expressed using one or more
filter
sub-blocks, which take the following arguments:
- filters
List<Get
Managed Prefix Lists Filter> - Custom filter block as described below.
- Map<String,String>
Map of tags, each pair of which must exactly match a pair on the desired .
More complex filters can be expressed using one or more
filter
sub-blocks, which take the following arguments:
- filters
Get
Managed Prefix Lists Filter[] - Custom filter block as described below.
- {[key: string]: string}
Map of tags, each pair of which must exactly match a pair on the desired .
More complex filters can be expressed using one or more
filter
sub-blocks, which take the following arguments:
- filters
Sequence[Get
Managed Prefix Lists Filter] - Custom filter block as described below.
- Mapping[str, str]
Map of tags, each pair of which must exactly match a pair on the desired .
More complex filters can be expressed using one or more
filter
sub-blocks, which take the following arguments:
- filters List<Property Map>
- Custom filter block as described below.
- Map<String>
Map of tags, each pair of which must exactly match a pair on the desired .
More complex filters can be expressed using one or more
filter
sub-blocks, which take the following arguments:
getManagedPrefixLists Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- List of all the managed prefix list ids found.
- Dictionary<string, string>
- Filters
List<Get
Managed Prefix Lists Filter>
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- List of all the managed prefix list ids found.
- map[string]string
- Filters
[]Get
Managed Prefix Lists Filter
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- List of all the managed prefix list ids found.
- Map<String,String>
- filters
List<Get
Managed Prefix Lists Filter>
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- List of all the managed prefix list ids found.
- {[key: string]: string}
- filters
Get
Managed Prefix Lists Filter[]
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- List of all the managed prefix list ids found.
- Mapping[str, str]
- filters
Sequence[Get
Managed Prefix Lists Filter]
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- List of all the managed prefix list ids found.
- Map<String>
- filters List<Property Map>
Supporting Types
GetManagedPrefixListsFilter
- Name string
- Name of the field to filter by, as defined by the underlying AWS API.
- Values List<string>
- Set of values that are accepted for the given field. A managed prefix list will be selected if any one of the given values matches.
- Name string
- Name of the field to filter by, as defined by the underlying AWS API.
- Values []string
- Set of values that are accepted for the given field. A managed prefix list will be selected if any one of the given values matches.
- name String
- Name of the field to filter by, as defined by the underlying AWS API.
- values List<String>
- Set of values that are accepted for the given field. A managed prefix list will be selected if any one of the given values matches.
- name string
- Name of the field to filter by, as defined by the underlying AWS API.
- values string[]
- Set of values that are accepted for the given field. A managed prefix list will be selected if any one of the given values matches.
- name str
- Name of the field to filter by, as defined by the underlying AWS API.
- values Sequence[str]
- Set of values that are accepted for the given field. A managed prefix list will be selected if any one of the given values matches.
- name String
- Name of the field to filter by, as defined by the underlying AWS API.
- values List<String>
- Set of values that are accepted for the given field. A managed prefix list will be selected if any one of the given values matches.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.
Try AWS Native preview for resources not in the classic version.