get Ami Ids
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
A collection of arguments for invoking getAmiIds.
Deprecated
aws.getAmiIds has been deprecated in favor of aws.ec2.getAmiIds
Return
A collection of values returned by getAmiIds.
Parameters
Limit search to users with explicit launch permission on the image. Valid items are the numeric account ID or self
.
One or more name/value pairs to filter off of. There are several valid keys, for a full reference, check out 1.
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
.
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.
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
).
Used to sort AMIs by creation time. If no value is specified, the default value is false
.
See also
Deprecated
aws.getAmiIds has been deprecated in favor of aws.ec2.getAmiIds
Return
A collection of values returned by getAmiIds.
Parameters
Builder for com.pulumi.aws.kotlin.inputs.GetAmiIdsPlainArgs.