AWS Classic
getAmi
Deprecated:
aws.getAmi has been deprecated in favor of aws.ec2.getAmi
Use this data source to get the ID of a registered AMI for use in other resources.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var example = Output.Create(Aws.Ec2.GetAmi.InvokeAsync(new Aws.Ec2.GetAmiArgs
{
ExecutableUsers =
{
"self",
},
Filters =
{
new Aws.Ec2.Inputs.GetAmiFilterArgs
{
Name = "name",
Values =
{
"myami-*",
},
},
new Aws.Ec2.Inputs.GetAmiFilterArgs
{
Name = "root-device-type",
Values =
{
"ebs",
},
},
new Aws.Ec2.Inputs.GetAmiFilterArgs
{
Name = "virtualization-type",
Values =
{
"hvm",
},
},
},
MostRecent = true,
NameRegex = "^myami-\\d{3}",
Owners =
{
"self",
},
}));
}
}
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/ec2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ec2.LookupAmi(ctx, &ec2.LookupAmiArgs{
ExecutableUsers: []string{
"self",
},
Filters: []ec2.GetAmiFilter{
ec2.GetAmiFilter{
Name: "name",
Values: []string{
"myami-*",
},
},
ec2.GetAmiFilter{
Name: "root-device-type",
Values: []string{
"ebs",
},
},
ec2.GetAmiFilter{
Name: "virtualization-type",
Values: []string{
"hvm",
},
},
},
MostRecent: pulumi.BoolRef(true),
NameRegex: pulumi.StringRef("^myami-\\d{3}"),
Owners: []string{
"self",
},
}, nil)
if err != nil {
return err
}
return nil
})
}
package generated_program;
import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var example = Output.of(Ec2Functions.getAmi(GetAmiArgs.builder()
.executableUsers("self")
.filters(
GetAmiFilterArgs.builder()
.name("name")
.values("myami-*")
.build(),
GetAmiFilterArgs.builder()
.name("root-device-type")
.values("ebs")
.build(),
GetAmiFilterArgs.builder()
.name("virtualization-type")
.values("hvm")
.build())
.mostRecent(true)
.nameRegex("^myami-\\d{3}")
.owners("self")
.build()));
}
}
import pulumi
import pulumi_aws as aws
example = aws.ec2.get_ami(executable_users=["self"],
filters=[
aws.ec2.GetAmiFilterArgs(
name="name",
values=["myami-*"],
),
aws.ec2.GetAmiFilterArgs(
name="root-device-type",
values=["ebs"],
),
aws.ec2.GetAmiFilterArgs(
name="virtualization-type",
values=["hvm"],
),
],
most_recent=True,
name_regex="^myami-\\d{3}",
owners=["self"])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = pulumi.output(aws.ec2.getAmi({
executableUsers: ["self"],
filters: [
{
name: "name",
values: ["myami-*"],
},
{
name: "root-device-type",
values: ["ebs"],
},
{
name: "virtualization-type",
values: ["hvm"],
},
],
mostRecent: true,
nameRegex: "^myami-\\d{3}",
owners: ["self"],
}));
variables:
example:
Fn::Invoke:
Function: aws:ec2:getAmi
Arguments:
executableUsers:
- self
filters:
- name: name
values:
- myami-*
- name: root-device-type
values:
- ebs
- name: virtualization-type
values:
- hvm
mostRecent: true
nameRegex: ^myami-\d{3}
owners:
- self
Using getAmi
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 getAmi(args: GetAmiArgs, opts?: InvokeOptions): Promise<GetAmiResult>
function getAmiOutput(args: GetAmiOutputArgs, opts?: InvokeOptions): Output<GetAmiResult>
def get_ami(executable_users: Optional[Sequence[str]] = None,
filters: Optional[Sequence[GetAmiFilter]] = None,
most_recent: Optional[bool] = None,
name_regex: Optional[str] = None,
owners: Optional[Sequence[str]] = None,
tags: Optional[Mapping[str, str]] = None,
opts: Optional[InvokeOptions] = None) -> GetAmiResult
def get_ami_output(executable_users: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetAmiFilterArgs]]]] = None,
most_recent: Optional[pulumi.Input[bool]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
owners: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetAmiResult]
func GetAmi(ctx *Context, args *GetAmiArgs, opts ...InvokeOption) (*GetAmiResult, error)
func GetAmiOutput(ctx *Context, args *GetAmiOutputArgs, opts ...InvokeOption) GetAmiResultOutput
> Note: This function is named GetAmi
in the Go SDK.
public static class GetAmi
{
public static Task<GetAmiResult> InvokeAsync(GetAmiArgs args, InvokeOptions? opts = null)
public static Output<GetAmiResult> Invoke(GetAmiInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAmiResult> getAmi(GetAmiArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
Function: aws:index/getAmi:getAmi
Arguments:
# Arguments dictionary
The following arguments are supported:
- Owners List<string>
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
).- Executable
Users List<string> Limit search to users with explicit launch permission on the image. Valid items are the numeric account ID or
self
.- Filters
List<Get
Ami Filter> One or more name/value pairs to filter off of. There are several valid keys, for a full reference, check out [describe-images in the AWS CLI reference][1].
- Most
Recent bool If more than one result is returned, use the most recent AMI.
- Name
Regex string A 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. It is recommended to combine this with other options to narrow down the list AWS returns.
- Dictionary<string, string>
Any tags assigned to the image.
tags.#.key
- The key name of the tag.tags.#.value
- The value of the tag.
- Owners []string
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
).- Executable
Users []string Limit search to users with explicit launch permission on the image. Valid items are the numeric account ID or
self
.- Filters
[]Get
Ami Filter One or more name/value pairs to filter off of. There are several valid keys, for a full reference, check out [describe-images in the AWS CLI reference][1].
- Most
Recent bool If more than one result is returned, use the most recent AMI.
- Name
Regex string A 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. It is recommended to combine this with other options to narrow down the list AWS returns.
- map[string]string
Any tags assigned to the image.
tags.#.key
- The key name of the tag.tags.#.value
- The value of the tag.
- owners List<String>
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
).- executable
Users List<String> Limit search to users with explicit launch permission on the image. Valid items are the numeric account ID or
self
.- filters
List<Get
Ami Filter> One or more name/value pairs to filter off of. There are several valid keys, for a full reference, check out [describe-images in the AWS CLI reference][1].
- most
Recent Boolean If more than one result is returned, use the most recent AMI.
- name
Regex String A 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. It is recommended to combine this with other options to narrow down the list AWS returns.
- Map<String,String>
Any tags assigned to the image.
tags.#.key
- The key name of the tag.tags.#.value
- The value of the tag.
- owners string[]
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
).- executable
Users string[] Limit search to users with explicit launch permission on the image. Valid items are the numeric account ID or
self
.- filters
Get
Ami Filter[] One or more name/value pairs to filter off of. There are several valid keys, for a full reference, check out [describe-images in the AWS CLI reference][1].
- most
Recent boolean If more than one result is returned, use the most recent AMI.
- name
Regex string A 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. It is recommended to combine this with other options to narrow down the list AWS returns.
- {[key: string]: string}
Any tags assigned to the image.
tags.#.key
- The key name of the tag.tags.#.value
- The value of the tag.
- owners Sequence[str]
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
).- executable_
users Sequence[str] Limit search to users with explicit launch permission on the image. Valid items are the numeric account ID or
self
.- filters
Sequence[Get
Ami Filter] One or more name/value pairs to filter off of. There are several valid keys, for a full reference, check out [describe-images in the AWS CLI reference][1].
- most_
recent bool If more than one result is returned, use the most recent AMI.
- name_
regex str A 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. It is recommended to combine this with other options to narrow down the list AWS returns.
- Mapping[str, str]
Any tags assigned to the image.
tags.#.key
- The key name of the tag.tags.#.value
- The value of the tag.
- owners List<String>
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
).- executable
Users List<String> Limit search to users with explicit launch permission on the image. Valid items are the numeric account ID or
self
.- filters List<Property Map>
One or more name/value pairs to filter off of. There are several valid keys, for a full reference, check out [describe-images in the AWS CLI reference][1].
- most
Recent Boolean If more than one result is returned, use the most recent AMI.
- name
Regex String A 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. It is recommended to combine this with other options to narrow down the list AWS returns.
- Map<String>
Any tags assigned to the image.
tags.#.key
- The key name of the tag.tags.#.value
- The value of the tag.
getAmi Result
The following output properties are available:
- Architecture string
The OS architecture of the AMI (ie:
i386
orx86_64
).- Arn string
The ARN of the AMI.
- Block
Device List<GetMappings Ami Block Device Mapping> Set of objects with block device mappings of the AMI.
- Boot
Mode string The boot mode of the image.
- Creation
Date string The date and time the image was created.
- Deprecation
Time string The date and time when the image will be deprecated.
- Description string
The description of the AMI that was provided during image creation.
- Ena
Support bool Specifies whether enhanced networking with ENA is enabled.
- Hypervisor string
The hypervisor type of the image.
- Id string
The provider-assigned unique ID for this managed resource.
- Image
Id string The ID of the AMI. Should be the same as the resource
id
.- Image
Location string The location of the AMI.
- Image
Owner stringAlias The AWS account alias (for example,
amazon
,self
) or the AWS account ID of the AMI owner.- Image
Type string The type of image.
- Kernel
Id string The kernel associated with the image, if any. Only applicable for machine images.
- Name string
The name of the AMI that was provided during image creation.
- Owner
Id string The AWS account ID of the image owner.
- Owners List<string>
- Platform string
The value is Windows for
Windows
AMIs; otherwise blank.- Platform
Details string The platform details associated with the billing code of the AMI.
- Product
Codes List<GetAmi Product Code> Any product codes associated with the AMI.
product_codes.#.product_code_id
- The product code.product_codes.#.product_code_type
- The type of product code.
- Public bool
true
if the image has public launch permissions.- Ramdisk
Id string The RAM disk associated with the image, if any. Only applicable for machine images.
- Root
Device stringName The device name of the root device.
- Root
Device stringType The type of root device (ie:
ebs
orinstance-store
).- Root
Snapshot stringId The snapshot id associated with the root device, if any (only applies to
ebs
root devices).- Sriov
Net stringSupport Specifies whether enhanced networking is enabled.
- State string
The current state of the AMI. If the state is
available
, the image is successfully registered and can be used to launch an instance.- State
Reason Dictionary<string, string> Describes a state change. Fields are
UNSET
if not available.state_reason.code
- The reason code for the state change.state_reason.message
- The message for the state change.
- Dictionary<string, string>
Any tags assigned to the image.
tags.#.key
- The key name of the tag.tags.#.value
- The value of the tag.
- Tpm
Support string If the image is configured for NitroTPM support, the value is
v2.0
.- Usage
Operation string The operation of the Amazon EC2 instance and the billing code that is associated with the AMI.
- Virtualization
Type string The type of virtualization of the AMI (ie:
hvm
orparavirtual
).- Executable
Users List<string> - Filters
List<Get
Ami Filter> - Most
Recent bool - Name
Regex string
- Architecture string
The OS architecture of the AMI (ie:
i386
orx86_64
).- Arn string
The ARN of the AMI.
- Block
Device []GetMappings Ami Block Device Mapping Set of objects with block device mappings of the AMI.
- Boot
Mode string The boot mode of the image.
- Creation
Date string The date and time the image was created.
- Deprecation
Time string The date and time when the image will be deprecated.
- Description string
The description of the AMI that was provided during image creation.
- Ena
Support bool Specifies whether enhanced networking with ENA is enabled.
- Hypervisor string
The hypervisor type of the image.
- Id string
The provider-assigned unique ID for this managed resource.
- Image
Id string The ID of the AMI. Should be the same as the resource
id
.- Image
Location string The location of the AMI.
- Image
Owner stringAlias The AWS account alias (for example,
amazon
,self
) or the AWS account ID of the AMI owner.- Image
Type string The type of image.
- Kernel
Id string The kernel associated with the image, if any. Only applicable for machine images.
- Name string
The name of the AMI that was provided during image creation.
- Owner
Id string The AWS account ID of the image owner.
- Owners []string
- Platform string
The value is Windows for
Windows
AMIs; otherwise blank.- Platform
Details string The platform details associated with the billing code of the AMI.
- Product
Codes []GetAmi Product Code Any product codes associated with the AMI.
product_codes.#.product_code_id
- The product code.product_codes.#.product_code_type
- The type of product code.
- Public bool
true
if the image has public launch permissions.- Ramdisk
Id string The RAM disk associated with the image, if any. Only applicable for machine images.
- Root
Device stringName The device name of the root device.
- Root
Device stringType The type of root device (ie:
ebs
orinstance-store
).- Root
Snapshot stringId The snapshot id associated with the root device, if any (only applies to
ebs
root devices).- Sriov
Net stringSupport Specifies whether enhanced networking is enabled.
- State string
The current state of the AMI. If the state is
available
, the image is successfully registered and can be used to launch an instance.- State
Reason map[string]string Describes a state change. Fields are
UNSET
if not available.state_reason.code
- The reason code for the state change.state_reason.message
- The message for the state change.
- map[string]string
Any tags assigned to the image.
tags.#.key
- The key name of the tag.tags.#.value
- The value of the tag.
- Tpm
Support string If the image is configured for NitroTPM support, the value is
v2.0
.- Usage
Operation string The operation of the Amazon EC2 instance and the billing code that is associated with the AMI.
- Virtualization
Type string The type of virtualization of the AMI (ie:
hvm
orparavirtual
).- Executable
Users []string - Filters
[]Get
Ami Filter - Most
Recent bool - Name
Regex string
- architecture String
The OS architecture of the AMI (ie:
i386
orx86_64
).- arn String
The ARN of the AMI.
- block
Device List<GetMappings Ami Block Device Mapping> Set of objects with block device mappings of the AMI.
- boot
Mode String The boot mode of the image.
- creation
Date String The date and time the image was created.
- deprecation
Time String The date and time when the image will be deprecated.
- description String
The description of the AMI that was provided during image creation.
- ena
Support Boolean Specifies whether enhanced networking with ENA is enabled.
- hypervisor String
The hypervisor type of the image.
- id String
The provider-assigned unique ID for this managed resource.
- image
Id String The ID of the AMI. Should be the same as the resource
id
.- image
Location String The location of the AMI.
- image
Owner StringAlias The AWS account alias (for example,
amazon
,self
) or the AWS account ID of the AMI owner.- image
Type String The type of image.
- kernel
Id String The kernel associated with the image, if any. Only applicable for machine images.
- name String
The name of the AMI that was provided during image creation.
- owner
Id String The AWS account ID of the image owner.
- owners List<String>
- platform String
The value is Windows for
Windows
AMIs; otherwise blank.- platform
Details String The platform details associated with the billing code of the AMI.
- product
Codes List<GetAmi Product Code> Any product codes associated with the AMI.
product_codes.#.product_code_id
- The product code.product_codes.#.product_code_type
- The type of product code.
- public_ Boolean
true
if the image has public launch permissions.- ramdisk
Id String The RAM disk associated with the image, if any. Only applicable for machine images.
- root
Device StringName The device name of the root device.
- root
Device StringType The type of root device (ie:
ebs
orinstance-store
).- root
Snapshot StringId The snapshot id associated with the root device, if any (only applies to
ebs
root devices).- sriov
Net StringSupport Specifies whether enhanced networking is enabled.
- state String
The current state of the AMI. If the state is
available
, the image is successfully registered and can be used to launch an instance.- state
Reason Map<String,String> Describes a state change. Fields are
UNSET
if not available.state_reason.code
- The reason code for the state change.state_reason.message
- The message for the state change.
- Map<String,String>
Any tags assigned to the image.
tags.#.key
- The key name of the tag.tags.#.value
- The value of the tag.
- tpm
Support String If the image is configured for NitroTPM support, the value is
v2.0
.- usage
Operation String The operation of the Amazon EC2 instance and the billing code that is associated with the AMI.
- virtualization
Type String The type of virtualization of the AMI (ie:
hvm
orparavirtual
).- executable
Users List<String> - filters
List<Get
Ami Filter> - most
Recent Boolean - name
Regex String
- architecture string
The OS architecture of the AMI (ie:
i386
orx86_64
).- arn string
The ARN of the AMI.
- block
Device GetMappings Ami Block Device Mapping[] Set of objects with block device mappings of the AMI.
- boot
Mode string The boot mode of the image.
- creation
Date string The date and time the image was created.
- deprecation
Time string The date and time when the image will be deprecated.
- description string
The description of the AMI that was provided during image creation.
- ena
Support boolean Specifies whether enhanced networking with ENA is enabled.
- hypervisor string
The hypervisor type of the image.
- id string
The provider-assigned unique ID for this managed resource.
- image
Id string The ID of the AMI. Should be the same as the resource
id
.- image
Location string The location of the AMI.
- image
Owner stringAlias The AWS account alias (for example,
amazon
,self
) or the AWS account ID of the AMI owner.- image
Type string The type of image.
- kernel
Id string The kernel associated with the image, if any. Only applicable for machine images.
- name string
The name of the AMI that was provided during image creation.
- owner
Id string The AWS account ID of the image owner.
- owners string[]
- platform string
The value is Windows for
Windows
AMIs; otherwise blank.- platform
Details string The platform details associated with the billing code of the AMI.
- product
Codes GetAmi Product Code[] Any product codes associated with the AMI.
product_codes.#.product_code_id
- The product code.product_codes.#.product_code_type
- The type of product code.
- public boolean
true
if the image has public launch permissions.- ramdisk
Id string The RAM disk associated with the image, if any. Only applicable for machine images.
- root
Device stringName The device name of the root device.
- root
Device stringType The type of root device (ie:
ebs
orinstance-store
).- root
Snapshot stringId The snapshot id associated with the root device, if any (only applies to
ebs
root devices).- sriov
Net stringSupport Specifies whether enhanced networking is enabled.
- state string
The current state of the AMI. If the state is
available
, the image is successfully registered and can be used to launch an instance.- state
Reason {[key: string]: string} Describes a state change. Fields are
UNSET
if not available.state_reason.code
- The reason code for the state change.state_reason.message
- The message for the state change.
- {[key: string]: string}
Any tags assigned to the image.
tags.#.key
- The key name of the tag.tags.#.value
- The value of the tag.
- tpm
Support string If the image is configured for NitroTPM support, the value is
v2.0
.- usage
Operation string The operation of the Amazon EC2 instance and the billing code that is associated with the AMI.
- virtualization
Type string The type of virtualization of the AMI (ie:
hvm
orparavirtual
).- executable
Users string[] - filters
Get
Ami Filter[] - most
Recent boolean - name
Regex string
- architecture str
The OS architecture of the AMI (ie:
i386
orx86_64
).- arn str
The ARN of the AMI.
- block_
device_ Sequence[Getmappings Ami Block Device Mapping] Set of objects with block device mappings of the AMI.
- boot_
mode str The boot mode of the image.
- creation_
date str The date and time the image was created.
- deprecation_
time str The date and time when the image will be deprecated.
- description str
The description of the AMI that was provided during image creation.
- ena_
support bool Specifies whether enhanced networking with ENA is enabled.
- hypervisor str
The hypervisor type of the image.
- id str
The provider-assigned unique ID for this managed resource.
- image_
id str The ID of the AMI. Should be the same as the resource
id
.- image_
location str The location of the AMI.
- image_
owner_ stralias The AWS account alias (for example,
amazon
,self
) or the AWS account ID of the AMI owner.- image_
type str The type of image.
- kernel_
id str The kernel associated with the image, if any. Only applicable for machine images.
- name str
The name of the AMI that was provided during image creation.
- owner_
id str The AWS account ID of the image owner.
- owners Sequence[str]
- platform str
The value is Windows for
Windows
AMIs; otherwise blank.- platform_
details str The platform details associated with the billing code of the AMI.
- product_
codes Sequence[GetAmi Product Code] Any product codes associated with the AMI.
product_codes.#.product_code_id
- The product code.product_codes.#.product_code_type
- The type of product code.
- public bool
true
if the image has public launch permissions.- ramdisk_
id str The RAM disk associated with the image, if any. Only applicable for machine images.
- root_
device_ strname The device name of the root device.
- root_
device_ strtype The type of root device (ie:
ebs
orinstance-store
).- root_
snapshot_ strid The snapshot id associated with the root device, if any (only applies to
ebs
root devices).- sriov_
net_ strsupport Specifies whether enhanced networking is enabled.
- state str
The current state of the AMI. If the state is
available
, the image is successfully registered and can be used to launch an instance.- state_
reason Mapping[str, str] Describes a state change. Fields are
UNSET
if not available.state_reason.code
- The reason code for the state change.state_reason.message
- The message for the state change.
- Mapping[str, str]
Any tags assigned to the image.
tags.#.key
- The key name of the tag.tags.#.value
- The value of the tag.
- tpm_
support str If the image is configured for NitroTPM support, the value is
v2.0
.- usage_
operation str The operation of the Amazon EC2 instance and the billing code that is associated with the AMI.
- virtualization_
type str The type of virtualization of the AMI (ie:
hvm
orparavirtual
).- executable_
users Sequence[str] - filters
Sequence[Get
Ami Filter] - most_
recent bool - name_
regex str
- architecture String
The OS architecture of the AMI (ie:
i386
orx86_64
).- arn String
The ARN of the AMI.
- block
Device List<Property Map>Mappings Set of objects with block device mappings of the AMI.
- boot
Mode String The boot mode of the image.
- creation
Date String The date and time the image was created.
- deprecation
Time String The date and time when the image will be deprecated.
- description String
The description of the AMI that was provided during image creation.
- ena
Support Boolean Specifies whether enhanced networking with ENA is enabled.
- hypervisor String
The hypervisor type of the image.
- id String
The provider-assigned unique ID for this managed resource.
- image
Id String The ID of the AMI. Should be the same as the resource
id
.- image
Location String The location of the AMI.
- image
Owner StringAlias The AWS account alias (for example,
amazon
,self
) or the AWS account ID of the AMI owner.- image
Type String The type of image.
- kernel
Id String The kernel associated with the image, if any. Only applicable for machine images.
- name String
The name of the AMI that was provided during image creation.
- owner
Id String The AWS account ID of the image owner.
- owners List<String>
- platform String
The value is Windows for
Windows
AMIs; otherwise blank.- platform
Details String The platform details associated with the billing code of the AMI.
- product
Codes List<Property Map> Any product codes associated with the AMI.
product_codes.#.product_code_id
- The product code.product_codes.#.product_code_type
- The type of product code.
- public Boolean
true
if the image has public launch permissions.- ramdisk
Id String The RAM disk associated with the image, if any. Only applicable for machine images.
- root
Device StringName The device name of the root device.
- root
Device StringType The type of root device (ie:
ebs
orinstance-store
).- root
Snapshot StringId The snapshot id associated with the root device, if any (only applies to
ebs
root devices).- sriov
Net StringSupport Specifies whether enhanced networking is enabled.
- state String
The current state of the AMI. If the state is
available
, the image is successfully registered and can be used to launch an instance.- state
Reason Map<String> Describes a state change. Fields are
UNSET
if not available.state_reason.code
- The reason code for the state change.state_reason.message
- The message for the state change.
- Map<String>
Any tags assigned to the image.
tags.#.key
- The key name of the tag.tags.#.value
- The value of the tag.
- tpm
Support String If the image is configured for NitroTPM support, the value is
v2.0
.- usage
Operation String The operation of the Amazon EC2 instance and the billing code that is associated with the AMI.
- virtualization
Type String The type of virtualization of the AMI (ie:
hvm
orparavirtual
).- executable
Users List<String> - filters List<Property Map>
- most
Recent Boolean - name
Regex String
Supporting Types
GetAmiBlockDeviceMapping
- Device
Name string The physical name of the device.
- Ebs Dictionary<string, string>
Map containing EBS information, if the device is EBS based. Unlike most object attributes, these are accessed directly (e.g.,
ebs.volume_size
orebs["volume_size"]
) rather than accessed through the first element of a list (e.g.,ebs[0].volume_size
).- No
Device string Suppresses the specified device included in the block device mapping of the AMI.
- Virtual
Name string The virtual device name (for instance stores).
- Device
Name string The physical name of the device.
- Ebs map[string]string
Map containing EBS information, if the device is EBS based. Unlike most object attributes, these are accessed directly (e.g.,
ebs.volume_size
orebs["volume_size"]
) rather than accessed through the first element of a list (e.g.,ebs[0].volume_size
).- No
Device string Suppresses the specified device included in the block device mapping of the AMI.
- Virtual
Name string The virtual device name (for instance stores).
- device
Name String The physical name of the device.
- ebs Map<String,String>
Map containing EBS information, if the device is EBS based. Unlike most object attributes, these are accessed directly (e.g.,
ebs.volume_size
orebs["volume_size"]
) rather than accessed through the first element of a list (e.g.,ebs[0].volume_size
).- no
Device String Suppresses the specified device included in the block device mapping of the AMI.
- virtual
Name String The virtual device name (for instance stores).
- device
Name string The physical name of the device.
- ebs {[key: string]: string}
Map containing EBS information, if the device is EBS based. Unlike most object attributes, these are accessed directly (e.g.,
ebs.volume_size
orebs["volume_size"]
) rather than accessed through the first element of a list (e.g.,ebs[0].volume_size
).- no
Device string Suppresses the specified device included in the block device mapping of the AMI.
- virtual
Name string The virtual device name (for instance stores).
- device_
name str The physical name of the device.
- ebs Mapping[str, str]
Map containing EBS information, if the device is EBS based. Unlike most object attributes, these are accessed directly (e.g.,
ebs.volume_size
orebs["volume_size"]
) rather than accessed through the first element of a list (e.g.,ebs[0].volume_size
).- no_
device str Suppresses the specified device included in the block device mapping of the AMI.
- virtual_
name str The virtual device name (for instance stores).
- device
Name String The physical name of the device.
- ebs Map<String>
Map containing EBS information, if the device is EBS based. Unlike most object attributes, these are accessed directly (e.g.,
ebs.volume_size
orebs["volume_size"]
) rather than accessed through the first element of a list (e.g.,ebs[0].volume_size
).- no
Device String Suppresses the specified device included in the block device mapping of the AMI.
- virtual
Name String The virtual device name (for instance stores).
GetAmiFilter
GetAmiProductCode
- Product
Code stringId - Product
Code stringType
- Product
Code stringId - Product
Code stringType
- product
Code StringId - product
Code StringType
- product
Code stringId - product
Code stringType
- product_
code_ strid - product_
code_ strtype
- product
Code StringId - product
Code StringType
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
aws
Terraform Provider.