getAmiIds

Deprecated

aws.getAmiIds has been deprecated in favor of aws.ec2.getAmiIds

Use this data source to get a list of AMI IDs matching the specified criteria.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.Ec2Functions;
import com.pulumi.aws.ec2.inputs.GetAmiIdsArgs;
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 ubuntu = Ec2Functions.getAmiIds(GetAmiIdsArgs.builder()
.filters(GetAmiIdsFilterArgs.builder()
.name("name")
.values("ubuntu/images/ubuntu-*-*-amd64-server-*")
.build())
.owners("099720109477")
.build());
}
}

Return

A collection of values returned by getAmiIds.

Parameters

argument

A collection of arguments for invoking getAmiIds.


suspend fun getAmiIds(executableUsers: List<String>? = null, filters: List<GetAmiIdsFilter>? = null, includeDeprecated: Boolean? = null, nameRegex: String? = null, owners: List<String>, sortAscending: Boolean? = null): GetAmiIdsResult

Deprecated

aws.getAmiIds has been deprecated in favor of aws.ec2.getAmiIds

Return

A collection of values returned by getAmiIds.

Parameters

executableUsers

Limit search to users with explicit launch permission on the image. Valid items are the numeric account ID or self.

filters

One or more name/value pairs to filter off of. There are several valid keys, for a full reference, check out 1.

includeDeprecated

If true, all deprecated AMIs are included in the response. If false, no deprecated AMIs are included in the response. If no value is specified, the default value is false.

nameRegex

Regex string to apply to the AMI list returned by AWS. This allows more advanced filtering not supported from the AWS API. This filtering is done locally on what AWS returns, and could have a performance impact if the result is large. Combine this with other options to narrow down the list AWS returns.

owners

List of AMI owners to limit search. At least 1 value must be specified. Valid values: an AWS account ID, self (the current account), or an AWS owner alias (e.g., amazon, aws-marketplace, microsoft).

sortAscending

Used to sort AMIs by creation time. If no value is specified, the default value is false.

See also


suspend fun getAmiIds(argument: suspend GetAmiIdsPlainArgsBuilder.() -> Unit): GetAmiIdsResult

Deprecated

aws.getAmiIds has been deprecated in favor of aws.ec2.getAmiIds

Return

A collection of values returned by getAmiIds.

Parameters

argument

Builder for com.pulumi.aws.kotlin.inputs.GetAmiIdsPlainArgs.

See also