Try AWS Native preview for resources not in the classic version.
aws.ec2.Ami
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
The AMI resource allows the creation and management of a completely-custom Amazon Machine Image (AMI).
If you just want to duplicate an existing AMI, possibly copying it to another
region, it’s better to use aws.ec2.AmiCopy
instead.
If you just want to share an existing AMI with another AWS account,
it’s better to use aws.ec2.AmiLaunchPermission
instead.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
// Create an AMI that will start a machine whose root device is backed by
// an EBS volume populated from a snapshot. We assume that such a snapshot
// already exists with the id "snap-xxxxxxxx".
var example = new Aws.Ec2.Ami("example", new()
{
EbsBlockDevices = new[]
{
new Aws.Ec2.Inputs.AmiEbsBlockDeviceArgs
{
DeviceName = "/dev/xvda",
SnapshotId = "snap-xxxxxxxx",
VolumeSize = 8,
},
},
ImdsSupport = "v2.0",
RootDeviceName = "/dev/xvda",
VirtualizationType = "hvm",
});
});
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.NewAmi(ctx, "example", &ec2.AmiArgs{
EbsBlockDevices: ec2.AmiEbsBlockDeviceArray{
&ec2.AmiEbsBlockDeviceArgs{
DeviceName: pulumi.String("/dev/xvda"),
SnapshotId: pulumi.String("snap-xxxxxxxx"),
VolumeSize: pulumi.Int(8),
},
},
ImdsSupport: pulumi.String("v2.0"),
RootDeviceName: pulumi.String("/dev/xvda"),
VirtualizationType: pulumi.String("hvm"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.Ami;
import com.pulumi.aws.ec2.AmiArgs;
import com.pulumi.aws.ec2.inputs.AmiEbsBlockDeviceArgs;
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) {
var example = new Ami("example", AmiArgs.builder()
.ebsBlockDevices(AmiEbsBlockDeviceArgs.builder()
.deviceName("/dev/xvda")
.snapshotId("snap-xxxxxxxx")
.volumeSize(8)
.build())
.imdsSupport("v2.0")
.rootDeviceName("/dev/xvda")
.virtualizationType("hvm")
.build());
}
}
import pulumi
import pulumi_aws as aws
# Create an AMI that will start a machine whose root device is backed by
# an EBS volume populated from a snapshot. We assume that such a snapshot
# already exists with the id "snap-xxxxxxxx".
example = aws.ec2.Ami("example",
ebs_block_devices=[aws.ec2.AmiEbsBlockDeviceArgs(
device_name="/dev/xvda",
snapshot_id="snap-xxxxxxxx",
volume_size=8,
)],
imds_support="v2.0",
root_device_name="/dev/xvda",
virtualization_type="hvm")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
// Create an AMI that will start a machine whose root device is backed by
// an EBS volume populated from a snapshot. We assume that such a snapshot
// already exists with the id "snap-xxxxxxxx".
const example = new aws.ec2.Ami("example", {
ebsBlockDevices: [{
deviceName: "/dev/xvda",
snapshotId: "snap-xxxxxxxx",
volumeSize: 8,
}],
imdsSupport: "v2.0",
rootDeviceName: "/dev/xvda",
virtualizationType: "hvm",
});
resources:
# Create an AMI that will start a machine whose root device is backed by
# // an EBS volume populated from a snapshot. We assume that such a snapshot
# // already exists with the id "snap-xxxxxxxx".
example:
type: aws:ec2:Ami
properties:
ebsBlockDevices:
- deviceName: /dev/xvda
snapshotId: snap-xxxxxxxx
volumeSize: 8
imdsSupport: v2.0
rootDeviceName: /dev/xvda
virtualizationType: hvm
Create Ami Resource
new Ami(name: string, args?: AmiArgs, opts?: CustomResourceOptions);
@overload
def Ami(resource_name: str,
opts: Optional[ResourceOptions] = None,
architecture: Optional[str] = None,
boot_mode: Optional[str] = None,
deprecation_time: Optional[str] = None,
description: Optional[str] = None,
ebs_block_devices: Optional[Sequence[AmiEbsBlockDeviceArgs]] = None,
ena_support: Optional[bool] = None,
ephemeral_block_devices: Optional[Sequence[AmiEphemeralBlockDeviceArgs]] = None,
image_location: Optional[str] = None,
imds_support: Optional[str] = None,
kernel_id: Optional[str] = None,
name: Optional[str] = None,
ramdisk_id: Optional[str] = None,
root_device_name: Optional[str] = None,
sriov_net_support: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
tpm_support: Optional[str] = None,
virtualization_type: Optional[str] = None)
@overload
def Ami(resource_name: str,
args: Optional[AmiArgs] = None,
opts: Optional[ResourceOptions] = None)
func NewAmi(ctx *Context, name string, args *AmiArgs, opts ...ResourceOption) (*Ami, error)
public Ami(string name, AmiArgs? args = null, CustomResourceOptions? opts = null)
type: aws:ec2:Ami
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AmiArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args AmiArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args AmiArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AmiArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AmiArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Ami Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Ami resource accepts the following input properties:
- Architecture string
Machine architecture for created instances. Defaults to "x86_64".
- Boot
Mode string Boot mode of the AMI. For more information, see Boot modes in the Amazon Elastic Compute Cloud User Guide.
- Deprecation
Time string Date and time to deprecate the AMI. If you specified a value for seconds, Amazon EC2 rounds the seconds to the nearest minute. Valid values: RFC3339 time string (
YYYY-MM-DDTHH:MM:SSZ
)- Description string
Longer, human-readable description for the AMI.
- Ebs
Block List<Pulumi.Devices Aws. Ec2. Inputs. Ami Ebs Block Device Args> Nested block describing an EBS block device that should be attached to created instances. The structure of this block is described below.
- Ena
Support bool Whether enhanced networking with ENA is enabled. Defaults to
false
.- Ephemeral
Block List<Pulumi.Devices Aws. Ec2. Inputs. Ami Ephemeral Block Device Args> Nested block describing an ephemeral block device that should be attached to created instances. The structure of this block is described below.
- Image
Location string Path to an S3 object containing an image manifest, e.g., created by the
ec2-upload-bundle
command in the EC2 command line tools.- Imds
Support string If EC2 instances started from this image should require the use of the Instance Metadata Service V2 (IMDSv2), set this argument to
v2.0
. For more information, see Configure instance metadata options for new instances.- Kernel
Id string ID of the kernel image (AKI) that will be used as the paravirtual kernel in created instances.
- Name string
Region-unique name for the AMI.
- Ramdisk
Id string ID of an initrd image (ARI) that will be used when booting the created instances.
- Root
Device stringName Name of the root device (for example,
/dev/sda1
, or/dev/xvda
).- Sriov
Net stringSupport When set to "simple" (the default), enables enhanced networking for created instances. No other value is supported at this time.
- Dictionary<string, string>
Map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.- Tpm
Support string If the image is configured for NitroTPM support, the value is
v2.0
. For more information, see NitroTPM in the Amazon Elastic Compute Cloud User Guide.- Virtualization
Type string Keyword to choose what virtualization mode created instances will use. Can be either "paravirtual" (the default) or "hvm". The choice of virtualization type changes the set of further arguments that are required, as described below.
- Architecture string
Machine architecture for created instances. Defaults to "x86_64".
- Boot
Mode string Boot mode of the AMI. For more information, see Boot modes in the Amazon Elastic Compute Cloud User Guide.
- Deprecation
Time string Date and time to deprecate the AMI. If you specified a value for seconds, Amazon EC2 rounds the seconds to the nearest minute. Valid values: RFC3339 time string (
YYYY-MM-DDTHH:MM:SSZ
)- Description string
Longer, human-readable description for the AMI.
- Ebs
Block []AmiDevices Ebs Block Device Args Nested block describing an EBS block device that should be attached to created instances. The structure of this block is described below.
- Ena
Support bool Whether enhanced networking with ENA is enabled. Defaults to
false
.- Ephemeral
Block []AmiDevices Ephemeral Block Device Args Nested block describing an ephemeral block device that should be attached to created instances. The structure of this block is described below.
- Image
Location string Path to an S3 object containing an image manifest, e.g., created by the
ec2-upload-bundle
command in the EC2 command line tools.- Imds
Support string If EC2 instances started from this image should require the use of the Instance Metadata Service V2 (IMDSv2), set this argument to
v2.0
. For more information, see Configure instance metadata options for new instances.- Kernel
Id string ID of the kernel image (AKI) that will be used as the paravirtual kernel in created instances.
- Name string
Region-unique name for the AMI.
- Ramdisk
Id string ID of an initrd image (ARI) that will be used when booting the created instances.
- Root
Device stringName Name of the root device (for example,
/dev/sda1
, or/dev/xvda
).- Sriov
Net stringSupport When set to "simple" (the default), enables enhanced networking for created instances. No other value is supported at this time.
- map[string]string
Map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.- Tpm
Support string If the image is configured for NitroTPM support, the value is
v2.0
. For more information, see NitroTPM in the Amazon Elastic Compute Cloud User Guide.- Virtualization
Type string Keyword to choose what virtualization mode created instances will use. Can be either "paravirtual" (the default) or "hvm". The choice of virtualization type changes the set of further arguments that are required, as described below.
- architecture String
Machine architecture for created instances. Defaults to "x86_64".
- boot
Mode String Boot mode of the AMI. For more information, see Boot modes in the Amazon Elastic Compute Cloud User Guide.
- deprecation
Time String Date and time to deprecate the AMI. If you specified a value for seconds, Amazon EC2 rounds the seconds to the nearest minute. Valid values: RFC3339 time string (
YYYY-MM-DDTHH:MM:SSZ
)- description String
Longer, human-readable description for the AMI.
- ebs
Block List<AmiDevices Ebs Block Device Args> Nested block describing an EBS block device that should be attached to created instances. The structure of this block is described below.
- ena
Support Boolean Whether enhanced networking with ENA is enabled. Defaults to
false
.- ephemeral
Block List<AmiDevices Ephemeral Block Device Args> Nested block describing an ephemeral block device that should be attached to created instances. The structure of this block is described below.
- image
Location String Path to an S3 object containing an image manifest, e.g., created by the
ec2-upload-bundle
command in the EC2 command line tools.- imds
Support String If EC2 instances started from this image should require the use of the Instance Metadata Service V2 (IMDSv2), set this argument to
v2.0
. For more information, see Configure instance metadata options for new instances.- kernel
Id String ID of the kernel image (AKI) that will be used as the paravirtual kernel in created instances.
- name String
Region-unique name for the AMI.
- ramdisk
Id String ID of an initrd image (ARI) that will be used when booting the created instances.
- root
Device StringName Name of the root device (for example,
/dev/sda1
, or/dev/xvda
).- sriov
Net StringSupport When set to "simple" (the default), enables enhanced networking for created instances. No other value is supported at this time.
- Map<String,String>
Map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.- tpm
Support String If the image is configured for NitroTPM support, the value is
v2.0
. For more information, see NitroTPM in the Amazon Elastic Compute Cloud User Guide.- virtualization
Type String Keyword to choose what virtualization mode created instances will use. Can be either "paravirtual" (the default) or "hvm". The choice of virtualization type changes the set of further arguments that are required, as described below.
- architecture string
Machine architecture for created instances. Defaults to "x86_64".
- boot
Mode string Boot mode of the AMI. For more information, see Boot modes in the Amazon Elastic Compute Cloud User Guide.
- deprecation
Time string Date and time to deprecate the AMI. If you specified a value for seconds, Amazon EC2 rounds the seconds to the nearest minute. Valid values: RFC3339 time string (
YYYY-MM-DDTHH:MM:SSZ
)- description string
Longer, human-readable description for the AMI.
- ebs
Block AmiDevices Ebs Block Device Args[] Nested block describing an EBS block device that should be attached to created instances. The structure of this block is described below.
- ena
Support boolean Whether enhanced networking with ENA is enabled. Defaults to
false
.- ephemeral
Block AmiDevices Ephemeral Block Device Args[] Nested block describing an ephemeral block device that should be attached to created instances. The structure of this block is described below.
- image
Location string Path to an S3 object containing an image manifest, e.g., created by the
ec2-upload-bundle
command in the EC2 command line tools.- imds
Support string If EC2 instances started from this image should require the use of the Instance Metadata Service V2 (IMDSv2), set this argument to
v2.0
. For more information, see Configure instance metadata options for new instances.- kernel
Id string ID of the kernel image (AKI) that will be used as the paravirtual kernel in created instances.
- name string
Region-unique name for the AMI.
- ramdisk
Id string ID of an initrd image (ARI) that will be used when booting the created instances.
- root
Device stringName Name of the root device (for example,
/dev/sda1
, or/dev/xvda
).- sriov
Net stringSupport When set to "simple" (the default), enables enhanced networking for created instances. No other value is supported at this time.
- {[key: string]: string}
Map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.- tpm
Support string If the image is configured for NitroTPM support, the value is
v2.0
. For more information, see NitroTPM in the Amazon Elastic Compute Cloud User Guide.- virtualization
Type string Keyword to choose what virtualization mode created instances will use. Can be either "paravirtual" (the default) or "hvm". The choice of virtualization type changes the set of further arguments that are required, as described below.
- architecture str
Machine architecture for created instances. Defaults to "x86_64".
- boot_
mode str Boot mode of the AMI. For more information, see Boot modes in the Amazon Elastic Compute Cloud User Guide.
- deprecation_
time str Date and time to deprecate the AMI. If you specified a value for seconds, Amazon EC2 rounds the seconds to the nearest minute. Valid values: RFC3339 time string (
YYYY-MM-DDTHH:MM:SSZ
)- description str
Longer, human-readable description for the AMI.
- ebs_
block_ Sequence[Amidevices Ebs Block Device Args] Nested block describing an EBS block device that should be attached to created instances. The structure of this block is described below.
- ena_
support bool Whether enhanced networking with ENA is enabled. Defaults to
false
.- ephemeral_
block_ Sequence[Amidevices Ephemeral Block Device Args] Nested block describing an ephemeral block device that should be attached to created instances. The structure of this block is described below.
- image_
location str Path to an S3 object containing an image manifest, e.g., created by the
ec2-upload-bundle
command in the EC2 command line tools.- imds_
support str If EC2 instances started from this image should require the use of the Instance Metadata Service V2 (IMDSv2), set this argument to
v2.0
. For more information, see Configure instance metadata options for new instances.- kernel_
id str ID of the kernel image (AKI) that will be used as the paravirtual kernel in created instances.
- name str
Region-unique name for the AMI.
- ramdisk_
id str ID of an initrd image (ARI) that will be used when booting the created instances.
- root_
device_ strname Name of the root device (for example,
/dev/sda1
, or/dev/xvda
).- sriov_
net_ strsupport When set to "simple" (the default), enables enhanced networking for created instances. No other value is supported at this time.
- Mapping[str, str]
Map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.- tpm_
support str If the image is configured for NitroTPM support, the value is
v2.0
. For more information, see NitroTPM in the Amazon Elastic Compute Cloud User Guide.- virtualization_
type str Keyword to choose what virtualization mode created instances will use. Can be either "paravirtual" (the default) or "hvm". The choice of virtualization type changes the set of further arguments that are required, as described below.
- architecture String
Machine architecture for created instances. Defaults to "x86_64".
- boot
Mode String Boot mode of the AMI. For more information, see Boot modes in the Amazon Elastic Compute Cloud User Guide.
- deprecation
Time String Date and time to deprecate the AMI. If you specified a value for seconds, Amazon EC2 rounds the seconds to the nearest minute. Valid values: RFC3339 time string (
YYYY-MM-DDTHH:MM:SSZ
)- description String
Longer, human-readable description for the AMI.
- ebs
Block List<Property Map>Devices Nested block describing an EBS block device that should be attached to created instances. The structure of this block is described below.
- ena
Support Boolean Whether enhanced networking with ENA is enabled. Defaults to
false
.- ephemeral
Block List<Property Map>Devices Nested block describing an ephemeral block device that should be attached to created instances. The structure of this block is described below.
- image
Location String Path to an S3 object containing an image manifest, e.g., created by the
ec2-upload-bundle
command in the EC2 command line tools.- imds
Support String If EC2 instances started from this image should require the use of the Instance Metadata Service V2 (IMDSv2), set this argument to
v2.0
. For more information, see Configure instance metadata options for new instances.- kernel
Id String ID of the kernel image (AKI) that will be used as the paravirtual kernel in created instances.
- name String
Region-unique name for the AMI.
- ramdisk
Id String ID of an initrd image (ARI) that will be used when booting the created instances.
- root
Device StringName Name of the root device (for example,
/dev/sda1
, or/dev/xvda
).- sriov
Net StringSupport When set to "simple" (the default), enables enhanced networking for created instances. No other value is supported at this time.
- Map<String>
Map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.- tpm
Support String If the image is configured for NitroTPM support, the value is
v2.0
. For more information, see NitroTPM in the Amazon Elastic Compute Cloud User Guide.- virtualization
Type String Keyword to choose what virtualization mode created instances will use. Can be either "paravirtual" (the default) or "hvm". The choice of virtualization type changes the set of further arguments that are required, as described below.
Outputs
All input properties are implicitly available as output properties. Additionally, the Ami resource produces the following output properties:
- Arn string
ARN of the AMI.
- Hypervisor string
Hypervisor type of the image.
- Id string
The provider-assigned unique ID for this managed resource.
- Image
Owner stringAlias AWS account alias (for example, amazon, self) or the AWS account ID of the AMI owner.
- Image
Type string Type of image.
- Manage
Ebs boolSnapshots - Owner
Id string AWS account ID of the image owner.
- Platform string
This value is set to windows for Windows AMIs; otherwise, it is blank.
- Platform
Details string Platform details associated with the billing code of the AMI.
- Public bool
Whether the image has public launch permissions.
- Root
Snapshot stringId Snapshot ID for the root volume (for EBS-backed AMIs)
- Dictionary<string, string>
Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.- Usage
Operation string Operation of the Amazon EC2 instance and the billing code that is associated with the AMI.
- Arn string
ARN of the AMI.
- Hypervisor string
Hypervisor type of the image.
- Id string
The provider-assigned unique ID for this managed resource.
- Image
Owner stringAlias AWS account alias (for example, amazon, self) or the AWS account ID of the AMI owner.
- Image
Type string Type of image.
- Manage
Ebs boolSnapshots - Owner
Id string AWS account ID of the image owner.
- Platform string
This value is set to windows for Windows AMIs; otherwise, it is blank.
- Platform
Details string Platform details associated with the billing code of the AMI.
- Public bool
Whether the image has public launch permissions.
- Root
Snapshot stringId Snapshot ID for the root volume (for EBS-backed AMIs)
- map[string]string
Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.- Usage
Operation string Operation of the Amazon EC2 instance and the billing code that is associated with the AMI.
- arn String
ARN of the AMI.
- hypervisor String
Hypervisor type of the image.
- id String
The provider-assigned unique ID for this managed resource.
- image
Owner StringAlias AWS account alias (for example, amazon, self) or the AWS account ID of the AMI owner.
- image
Type String Type of image.
- manage
Ebs BooleanSnapshots - owner
Id String AWS account ID of the image owner.
- platform String
This value is set to windows for Windows AMIs; otherwise, it is blank.
- platform
Details String Platform details associated with the billing code of the AMI.
- public_ Boolean
Whether the image has public launch permissions.
- root
Snapshot StringId Snapshot ID for the root volume (for EBS-backed AMIs)
- Map<String,String>
Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.- usage
Operation String Operation of the Amazon EC2 instance and the billing code that is associated with the AMI.
- arn string
ARN of the AMI.
- hypervisor string
Hypervisor type of the image.
- id string
The provider-assigned unique ID for this managed resource.
- image
Owner stringAlias AWS account alias (for example, amazon, self) or the AWS account ID of the AMI owner.
- image
Type string Type of image.
- manage
Ebs booleanSnapshots - owner
Id string AWS account ID of the image owner.
- platform string
This value is set to windows for Windows AMIs; otherwise, it is blank.
- platform
Details string Platform details associated with the billing code of the AMI.
- public boolean
Whether the image has public launch permissions.
- root
Snapshot stringId Snapshot ID for the root volume (for EBS-backed AMIs)
- {[key: string]: string}
Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.- usage
Operation string Operation of the Amazon EC2 instance and the billing code that is associated with the AMI.
- arn str
ARN of the AMI.
- hypervisor str
Hypervisor type of the image.
- id str
The provider-assigned unique ID for this managed resource.
- image_
owner_ stralias AWS account alias (for example, amazon, self) or the AWS account ID of the AMI owner.
- image_
type str Type of image.
- manage_
ebs_ boolsnapshots - owner_
id str AWS account ID of the image owner.
- platform str
This value is set to windows for Windows AMIs; otherwise, it is blank.
- platform_
details str Platform details associated with the billing code of the AMI.
- public bool
Whether the image has public launch permissions.
- root_
snapshot_ strid Snapshot ID for the root volume (for EBS-backed AMIs)
- Mapping[str, str]
Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.- usage_
operation str Operation of the Amazon EC2 instance and the billing code that is associated with the AMI.
- arn String
ARN of the AMI.
- hypervisor String
Hypervisor type of the image.
- id String
The provider-assigned unique ID for this managed resource.
- image
Owner StringAlias AWS account alias (for example, amazon, self) or the AWS account ID of the AMI owner.
- image
Type String Type of image.
- manage
Ebs BooleanSnapshots - owner
Id String AWS account ID of the image owner.
- platform String
This value is set to windows for Windows AMIs; otherwise, it is blank.
- platform
Details String Platform details associated with the billing code of the AMI.
- public Boolean
Whether the image has public launch permissions.
- root
Snapshot StringId Snapshot ID for the root volume (for EBS-backed AMIs)
- Map<String>
Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.- usage
Operation String Operation of the Amazon EC2 instance and the billing code that is associated with the AMI.
Look up Existing Ami Resource
Get an existing Ami resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: AmiState, opts?: CustomResourceOptions): Ami
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
architecture: Optional[str] = None,
arn: Optional[str] = None,
boot_mode: Optional[str] = None,
deprecation_time: Optional[str] = None,
description: Optional[str] = None,
ebs_block_devices: Optional[Sequence[AmiEbsBlockDeviceArgs]] = None,
ena_support: Optional[bool] = None,
ephemeral_block_devices: Optional[Sequence[AmiEphemeralBlockDeviceArgs]] = None,
hypervisor: Optional[str] = None,
image_location: Optional[str] = None,
image_owner_alias: Optional[str] = None,
image_type: Optional[str] = None,
imds_support: Optional[str] = None,
kernel_id: Optional[str] = None,
manage_ebs_snapshots: Optional[bool] = None,
name: Optional[str] = None,
owner_id: Optional[str] = None,
platform: Optional[str] = None,
platform_details: Optional[str] = None,
public: Optional[bool] = None,
ramdisk_id: Optional[str] = None,
root_device_name: Optional[str] = None,
root_snapshot_id: Optional[str] = None,
sriov_net_support: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
tags_all: Optional[Mapping[str, str]] = None,
tpm_support: Optional[str] = None,
usage_operation: Optional[str] = None,
virtualization_type: Optional[str] = None) -> Ami
func GetAmi(ctx *Context, name string, id IDInput, state *AmiState, opts ...ResourceOption) (*Ami, error)
public static Ami Get(string name, Input<string> id, AmiState? state, CustomResourceOptions? opts = null)
public static Ami get(String name, Output<String> id, AmiState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Architecture string
Machine architecture for created instances. Defaults to "x86_64".
- Arn string
ARN of the AMI.
- Boot
Mode string Boot mode of the AMI. For more information, see Boot modes in the Amazon Elastic Compute Cloud User Guide.
- Deprecation
Time string Date and time to deprecate the AMI. If you specified a value for seconds, Amazon EC2 rounds the seconds to the nearest minute. Valid values: RFC3339 time string (
YYYY-MM-DDTHH:MM:SSZ
)- Description string
Longer, human-readable description for the AMI.
- Ebs
Block List<Pulumi.Devices Aws. Ec2. Inputs. Ami Ebs Block Device Args> Nested block describing an EBS block device that should be attached to created instances. The structure of this block is described below.
- Ena
Support bool Whether enhanced networking with ENA is enabled. Defaults to
false
.- Ephemeral
Block List<Pulumi.Devices Aws. Ec2. Inputs. Ami Ephemeral Block Device Args> Nested block describing an ephemeral block device that should be attached to created instances. The structure of this block is described below.
- Hypervisor string
Hypervisor type of the image.
- Image
Location string Path to an S3 object containing an image manifest, e.g., created by the
ec2-upload-bundle
command in the EC2 command line tools.- Image
Owner stringAlias AWS account alias (for example, amazon, self) or the AWS account ID of the AMI owner.
- Image
Type string Type of image.
- Imds
Support string If EC2 instances started from this image should require the use of the Instance Metadata Service V2 (IMDSv2), set this argument to
v2.0
. For more information, see Configure instance metadata options for new instances.- Kernel
Id string ID of the kernel image (AKI) that will be used as the paravirtual kernel in created instances.
- Manage
Ebs boolSnapshots - Name string
Region-unique name for the AMI.
- Owner
Id string AWS account ID of the image owner.
- Platform string
This value is set to windows for Windows AMIs; otherwise, it is blank.
- Platform
Details string Platform details associated with the billing code of the AMI.
- Public bool
Whether the image has public launch permissions.
- Ramdisk
Id string ID of an initrd image (ARI) that will be used when booting the created instances.
- Root
Device stringName Name of the root device (for example,
/dev/sda1
, or/dev/xvda
).- Root
Snapshot stringId Snapshot ID for the root volume (for EBS-backed AMIs)
- Sriov
Net stringSupport When set to "simple" (the default), enables enhanced networking for created instances. No other value is supported at this time.
- Dictionary<string, string>
Map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.- Dictionary<string, string>
Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.- Tpm
Support string If the image is configured for NitroTPM support, the value is
v2.0
. For more information, see NitroTPM in the Amazon Elastic Compute Cloud User Guide.- Usage
Operation string Operation of the Amazon EC2 instance and the billing code that is associated with the AMI.
- Virtualization
Type string Keyword to choose what virtualization mode created instances will use. Can be either "paravirtual" (the default) or "hvm". The choice of virtualization type changes the set of further arguments that are required, as described below.
- Architecture string
Machine architecture for created instances. Defaults to "x86_64".
- Arn string
ARN of the AMI.
- Boot
Mode string Boot mode of the AMI. For more information, see Boot modes in the Amazon Elastic Compute Cloud User Guide.
- Deprecation
Time string Date and time to deprecate the AMI. If you specified a value for seconds, Amazon EC2 rounds the seconds to the nearest minute. Valid values: RFC3339 time string (
YYYY-MM-DDTHH:MM:SSZ
)- Description string
Longer, human-readable description for the AMI.
- Ebs
Block []AmiDevices Ebs Block Device Args Nested block describing an EBS block device that should be attached to created instances. The structure of this block is described below.
- Ena
Support bool Whether enhanced networking with ENA is enabled. Defaults to
false
.- Ephemeral
Block []AmiDevices Ephemeral Block Device Args Nested block describing an ephemeral block device that should be attached to created instances. The structure of this block is described below.
- Hypervisor string
Hypervisor type of the image.
- Image
Location string Path to an S3 object containing an image manifest, e.g., created by the
ec2-upload-bundle
command in the EC2 command line tools.- Image
Owner stringAlias AWS account alias (for example, amazon, self) or the AWS account ID of the AMI owner.
- Image
Type string Type of image.
- Imds
Support string If EC2 instances started from this image should require the use of the Instance Metadata Service V2 (IMDSv2), set this argument to
v2.0
. For more information, see Configure instance metadata options for new instances.- Kernel
Id string ID of the kernel image (AKI) that will be used as the paravirtual kernel in created instances.
- Manage
Ebs boolSnapshots - Name string
Region-unique name for the AMI.
- Owner
Id string AWS account ID of the image owner.
- Platform string
This value is set to windows for Windows AMIs; otherwise, it is blank.
- Platform
Details string Platform details associated with the billing code of the AMI.
- Public bool
Whether the image has public launch permissions.
- Ramdisk
Id string ID of an initrd image (ARI) that will be used when booting the created instances.
- Root
Device stringName Name of the root device (for example,
/dev/sda1
, or/dev/xvda
).- Root
Snapshot stringId Snapshot ID for the root volume (for EBS-backed AMIs)
- Sriov
Net stringSupport When set to "simple" (the default), enables enhanced networking for created instances. No other value is supported at this time.
- map[string]string
Map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.- map[string]string
Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.- Tpm
Support string If the image is configured for NitroTPM support, the value is
v2.0
. For more information, see NitroTPM in the Amazon Elastic Compute Cloud User Guide.- Usage
Operation string Operation of the Amazon EC2 instance and the billing code that is associated with the AMI.
- Virtualization
Type string Keyword to choose what virtualization mode created instances will use. Can be either "paravirtual" (the default) or "hvm". The choice of virtualization type changes the set of further arguments that are required, as described below.
- architecture String
Machine architecture for created instances. Defaults to "x86_64".
- arn String
ARN of the AMI.
- boot
Mode String Boot mode of the AMI. For more information, see Boot modes in the Amazon Elastic Compute Cloud User Guide.
- deprecation
Time String Date and time to deprecate the AMI. If you specified a value for seconds, Amazon EC2 rounds the seconds to the nearest minute. Valid values: RFC3339 time string (
YYYY-MM-DDTHH:MM:SSZ
)- description String
Longer, human-readable description for the AMI.
- ebs
Block List<AmiDevices Ebs Block Device Args> Nested block describing an EBS block device that should be attached to created instances. The structure of this block is described below.
- ena
Support Boolean Whether enhanced networking with ENA is enabled. Defaults to
false
.- ephemeral
Block List<AmiDevices Ephemeral Block Device Args> Nested block describing an ephemeral block device that should be attached to created instances. The structure of this block is described below.
- hypervisor String
Hypervisor type of the image.
- image
Location String Path to an S3 object containing an image manifest, e.g., created by the
ec2-upload-bundle
command in the EC2 command line tools.- image
Owner StringAlias AWS account alias (for example, amazon, self) or the AWS account ID of the AMI owner.
- image
Type String Type of image.
- imds
Support String If EC2 instances started from this image should require the use of the Instance Metadata Service V2 (IMDSv2), set this argument to
v2.0
. For more information, see Configure instance metadata options for new instances.- kernel
Id String ID of the kernel image (AKI) that will be used as the paravirtual kernel in created instances.
- manage
Ebs BooleanSnapshots - name String
Region-unique name for the AMI.
- owner
Id String AWS account ID of the image owner.
- platform String
This value is set to windows for Windows AMIs; otherwise, it is blank.
- platform
Details String Platform details associated with the billing code of the AMI.
- public_ Boolean
Whether the image has public launch permissions.
- ramdisk
Id String ID of an initrd image (ARI) that will be used when booting the created instances.
- root
Device StringName Name of the root device (for example,
/dev/sda1
, or/dev/xvda
).- root
Snapshot StringId Snapshot ID for the root volume (for EBS-backed AMIs)
- sriov
Net StringSupport When set to "simple" (the default), enables enhanced networking for created instances. No other value is supported at this time.
- Map<String,String>
Map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.- Map<String,String>
Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.- tpm
Support String If the image is configured for NitroTPM support, the value is
v2.0
. For more information, see NitroTPM in the Amazon Elastic Compute Cloud User Guide.- usage
Operation String Operation of the Amazon EC2 instance and the billing code that is associated with the AMI.
- virtualization
Type String Keyword to choose what virtualization mode created instances will use. Can be either "paravirtual" (the default) or "hvm". The choice of virtualization type changes the set of further arguments that are required, as described below.
- architecture string
Machine architecture for created instances. Defaults to "x86_64".
- arn string
ARN of the AMI.
- boot
Mode string Boot mode of the AMI. For more information, see Boot modes in the Amazon Elastic Compute Cloud User Guide.
- deprecation
Time string Date and time to deprecate the AMI. If you specified a value for seconds, Amazon EC2 rounds the seconds to the nearest minute. Valid values: RFC3339 time string (
YYYY-MM-DDTHH:MM:SSZ
)- description string
Longer, human-readable description for the AMI.
- ebs
Block AmiDevices Ebs Block Device Args[] Nested block describing an EBS block device that should be attached to created instances. The structure of this block is described below.
- ena
Support boolean Whether enhanced networking with ENA is enabled. Defaults to
false
.- ephemeral
Block AmiDevices Ephemeral Block Device Args[] Nested block describing an ephemeral block device that should be attached to created instances. The structure of this block is described below.
- hypervisor string
Hypervisor type of the image.
- image
Location string Path to an S3 object containing an image manifest, e.g., created by the
ec2-upload-bundle
command in the EC2 command line tools.- image
Owner stringAlias AWS account alias (for example, amazon, self) or the AWS account ID of the AMI owner.
- image
Type string Type of image.
- imds
Support string If EC2 instances started from this image should require the use of the Instance Metadata Service V2 (IMDSv2), set this argument to
v2.0
. For more information, see Configure instance metadata options for new instances.- kernel
Id string ID of the kernel image (AKI) that will be used as the paravirtual kernel in created instances.
- manage
Ebs booleanSnapshots - name string
Region-unique name for the AMI.
- owner
Id string AWS account ID of the image owner.
- platform string
This value is set to windows for Windows AMIs; otherwise, it is blank.
- platform
Details string Platform details associated with the billing code of the AMI.
- public boolean
Whether the image has public launch permissions.
- ramdisk
Id string ID of an initrd image (ARI) that will be used when booting the created instances.
- root
Device stringName Name of the root device (for example,
/dev/sda1
, or/dev/xvda
).- root
Snapshot stringId Snapshot ID for the root volume (for EBS-backed AMIs)
- sriov
Net stringSupport When set to "simple" (the default), enables enhanced networking for created instances. No other value is supported at this time.
- {[key: string]: string}
Map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.- {[key: string]: string}
Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.- tpm
Support string If the image is configured for NitroTPM support, the value is
v2.0
. For more information, see NitroTPM in the Amazon Elastic Compute Cloud User Guide.- usage
Operation string Operation of the Amazon EC2 instance and the billing code that is associated with the AMI.
- virtualization
Type string Keyword to choose what virtualization mode created instances will use. Can be either "paravirtual" (the default) or "hvm". The choice of virtualization type changes the set of further arguments that are required, as described below.
- architecture str
Machine architecture for created instances. Defaults to "x86_64".
- arn str
ARN of the AMI.
- boot_
mode str Boot mode of the AMI. For more information, see Boot modes in the Amazon Elastic Compute Cloud User Guide.
- deprecation_
time str Date and time to deprecate the AMI. If you specified a value for seconds, Amazon EC2 rounds the seconds to the nearest minute. Valid values: RFC3339 time string (
YYYY-MM-DDTHH:MM:SSZ
)- description str
Longer, human-readable description for the AMI.
- ebs_
block_ Sequence[Amidevices Ebs Block Device Args] Nested block describing an EBS block device that should be attached to created instances. The structure of this block is described below.
- ena_
support bool Whether enhanced networking with ENA is enabled. Defaults to
false
.- ephemeral_
block_ Sequence[Amidevices Ephemeral Block Device Args] Nested block describing an ephemeral block device that should be attached to created instances. The structure of this block is described below.
- hypervisor str
Hypervisor type of the image.
- image_
location str Path to an S3 object containing an image manifest, e.g., created by the
ec2-upload-bundle
command in the EC2 command line tools.- image_
owner_ stralias AWS account alias (for example, amazon, self) or the AWS account ID of the AMI owner.
- image_
type str Type of image.
- imds_
support str If EC2 instances started from this image should require the use of the Instance Metadata Service V2 (IMDSv2), set this argument to
v2.0
. For more information, see Configure instance metadata options for new instances.- kernel_
id str ID of the kernel image (AKI) that will be used as the paravirtual kernel in created instances.
- manage_
ebs_ boolsnapshots - name str
Region-unique name for the AMI.
- owner_
id str AWS account ID of the image owner.
- platform str
This value is set to windows for Windows AMIs; otherwise, it is blank.
- platform_
details str Platform details associated with the billing code of the AMI.
- public bool
Whether the image has public launch permissions.
- ramdisk_
id str ID of an initrd image (ARI) that will be used when booting the created instances.
- root_
device_ strname Name of the root device (for example,
/dev/sda1
, or/dev/xvda
).- root_
snapshot_ strid Snapshot ID for the root volume (for EBS-backed AMIs)
- sriov_
net_ strsupport When set to "simple" (the default), enables enhanced networking for created instances. No other value is supported at this time.
- Mapping[str, str]
Map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.- Mapping[str, str]
Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.- tpm_
support str If the image is configured for NitroTPM support, the value is
v2.0
. For more information, see NitroTPM in the Amazon Elastic Compute Cloud User Guide.- usage_
operation str Operation of the Amazon EC2 instance and the billing code that is associated with the AMI.
- virtualization_
type str Keyword to choose what virtualization mode created instances will use. Can be either "paravirtual" (the default) or "hvm". The choice of virtualization type changes the set of further arguments that are required, as described below.
- architecture String
Machine architecture for created instances. Defaults to "x86_64".
- arn String
ARN of the AMI.
- boot
Mode String Boot mode of the AMI. For more information, see Boot modes in the Amazon Elastic Compute Cloud User Guide.
- deprecation
Time String Date and time to deprecate the AMI. If you specified a value for seconds, Amazon EC2 rounds the seconds to the nearest minute. Valid values: RFC3339 time string (
YYYY-MM-DDTHH:MM:SSZ
)- description String
Longer, human-readable description for the AMI.
- ebs
Block List<Property Map>Devices Nested block describing an EBS block device that should be attached to created instances. The structure of this block is described below.
- ena
Support Boolean Whether enhanced networking with ENA is enabled. Defaults to
false
.- ephemeral
Block List<Property Map>Devices Nested block describing an ephemeral block device that should be attached to created instances. The structure of this block is described below.
- hypervisor String
Hypervisor type of the image.
- image
Location String Path to an S3 object containing an image manifest, e.g., created by the
ec2-upload-bundle
command in the EC2 command line tools.- image
Owner StringAlias AWS account alias (for example, amazon, self) or the AWS account ID of the AMI owner.
- image
Type String Type of image.
- imds
Support String If EC2 instances started from this image should require the use of the Instance Metadata Service V2 (IMDSv2), set this argument to
v2.0
. For more information, see Configure instance metadata options for new instances.- kernel
Id String ID of the kernel image (AKI) that will be used as the paravirtual kernel in created instances.
- manage
Ebs BooleanSnapshots - name String
Region-unique name for the AMI.
- owner
Id String AWS account ID of the image owner.
- platform String
This value is set to windows for Windows AMIs; otherwise, it is blank.
- platform
Details String Platform details associated with the billing code of the AMI.
- public Boolean
Whether the image has public launch permissions.
- ramdisk
Id String ID of an initrd image (ARI) that will be used when booting the created instances.
- root
Device StringName Name of the root device (for example,
/dev/sda1
, or/dev/xvda
).- root
Snapshot StringId Snapshot ID for the root volume (for EBS-backed AMIs)
- sriov
Net StringSupport When set to "simple" (the default), enables enhanced networking for created instances. No other value is supported at this time.
- Map<String>
Map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.- Map<String>
Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.- tpm
Support String If the image is configured for NitroTPM support, the value is
v2.0
. For more information, see NitroTPM in the Amazon Elastic Compute Cloud User Guide.- usage
Operation String Operation of the Amazon EC2 instance and the billing code that is associated with the AMI.
- virtualization
Type String Keyword to choose what virtualization mode created instances will use. Can be either "paravirtual" (the default) or "hvm". The choice of virtualization type changes the set of further arguments that are required, as described below.
Supporting Types
AmiEbsBlockDevice
- Device
Name string Path at which the device is exposed to created instances.
- Delete
On boolTermination Boolean controlling whether the EBS volumes created to support each created instance will be deleted once that instance is terminated.
- Encrypted bool
Boolean controlling whether the created EBS volumes will be encrypted. Can't be used with
snapshot_id
.- Iops int
Number of I/O operations per second the created volumes will support.
- Outpost
Arn string ARN of the Outpost on which the snapshot is stored.
- Snapshot
Id string ID of an EBS snapshot that will be used to initialize the created EBS volumes. If set, the
volume_size
attribute must be at least as large as the referenced snapshot.- Throughput int
Throughput that the EBS volume supports, in MiB/s. Only valid for
volume_type
ofgp3
.- Volume
Size int Size of created volumes in GiB. If
snapshot_id
is set andvolume_size
is omitted then the volume will have the same size as the selected snapshot.- Volume
Type string Type of EBS volume to create. Can be
standard
,gp2
,gp3
,io1
,io2
,sc1
orst1
(Default:standard
).
- Device
Name string Path at which the device is exposed to created instances.
- Delete
On boolTermination Boolean controlling whether the EBS volumes created to support each created instance will be deleted once that instance is terminated.
- Encrypted bool
Boolean controlling whether the created EBS volumes will be encrypted. Can't be used with
snapshot_id
.- Iops int
Number of I/O operations per second the created volumes will support.
- Outpost
Arn string ARN of the Outpost on which the snapshot is stored.
- Snapshot
Id string ID of an EBS snapshot that will be used to initialize the created EBS volumes. If set, the
volume_size
attribute must be at least as large as the referenced snapshot.- Throughput int
Throughput that the EBS volume supports, in MiB/s. Only valid for
volume_type
ofgp3
.- Volume
Size int Size of created volumes in GiB. If
snapshot_id
is set andvolume_size
is omitted then the volume will have the same size as the selected snapshot.- Volume
Type string Type of EBS volume to create. Can be
standard
,gp2
,gp3
,io1
,io2
,sc1
orst1
(Default:standard
).
- device
Name String Path at which the device is exposed to created instances.
- delete
On BooleanTermination Boolean controlling whether the EBS volumes created to support each created instance will be deleted once that instance is terminated.
- encrypted Boolean
Boolean controlling whether the created EBS volumes will be encrypted. Can't be used with
snapshot_id
.- iops Integer
Number of I/O operations per second the created volumes will support.
- outpost
Arn String ARN of the Outpost on which the snapshot is stored.
- snapshot
Id String ID of an EBS snapshot that will be used to initialize the created EBS volumes. If set, the
volume_size
attribute must be at least as large as the referenced snapshot.- throughput Integer
Throughput that the EBS volume supports, in MiB/s. Only valid for
volume_type
ofgp3
.- volume
Size Integer Size of created volumes in GiB. If
snapshot_id
is set andvolume_size
is omitted then the volume will have the same size as the selected snapshot.- volume
Type String Type of EBS volume to create. Can be
standard
,gp2
,gp3
,io1
,io2
,sc1
orst1
(Default:standard
).
- device
Name string Path at which the device is exposed to created instances.
- delete
On booleanTermination Boolean controlling whether the EBS volumes created to support each created instance will be deleted once that instance is terminated.
- encrypted boolean
Boolean controlling whether the created EBS volumes will be encrypted. Can't be used with
snapshot_id
.- iops number
Number of I/O operations per second the created volumes will support.
- outpost
Arn string ARN of the Outpost on which the snapshot is stored.
- snapshot
Id string ID of an EBS snapshot that will be used to initialize the created EBS volumes. If set, the
volume_size
attribute must be at least as large as the referenced snapshot.- throughput number
Throughput that the EBS volume supports, in MiB/s. Only valid for
volume_type
ofgp3
.- volume
Size number Size of created volumes in GiB. If
snapshot_id
is set andvolume_size
is omitted then the volume will have the same size as the selected snapshot.- volume
Type string Type of EBS volume to create. Can be
standard
,gp2
,gp3
,io1
,io2
,sc1
orst1
(Default:standard
).
- device_
name str Path at which the device is exposed to created instances.
- delete_
on_ booltermination Boolean controlling whether the EBS volumes created to support each created instance will be deleted once that instance is terminated.
- encrypted bool
Boolean controlling whether the created EBS volumes will be encrypted. Can't be used with
snapshot_id
.- iops int
Number of I/O operations per second the created volumes will support.
- outpost_
arn str ARN of the Outpost on which the snapshot is stored.
- snapshot_
id str ID of an EBS snapshot that will be used to initialize the created EBS volumes. If set, the
volume_size
attribute must be at least as large as the referenced snapshot.- throughput int
Throughput that the EBS volume supports, in MiB/s. Only valid for
volume_type
ofgp3
.- volume_
size int Size of created volumes in GiB. If
snapshot_id
is set andvolume_size
is omitted then the volume will have the same size as the selected snapshot.- volume_
type str Type of EBS volume to create. Can be
standard
,gp2
,gp3
,io1
,io2
,sc1
orst1
(Default:standard
).
- device
Name String Path at which the device is exposed to created instances.
- delete
On BooleanTermination Boolean controlling whether the EBS volumes created to support each created instance will be deleted once that instance is terminated.
- encrypted Boolean
Boolean controlling whether the created EBS volumes will be encrypted. Can't be used with
snapshot_id
.- iops Number
Number of I/O operations per second the created volumes will support.
- outpost
Arn String ARN of the Outpost on which the snapshot is stored.
- snapshot
Id String ID of an EBS snapshot that will be used to initialize the created EBS volumes. If set, the
volume_size
attribute must be at least as large as the referenced snapshot.- throughput Number
Throughput that the EBS volume supports, in MiB/s. Only valid for
volume_type
ofgp3
.- volume
Size Number Size of created volumes in GiB. If
snapshot_id
is set andvolume_size
is omitted then the volume will have the same size as the selected snapshot.- volume
Type String Type of EBS volume to create. Can be
standard
,gp2
,gp3
,io1
,io2
,sc1
orst1
(Default:standard
).
AmiEphemeralBlockDevice
- Device
Name string Path at which the device is exposed to created instances.
- Virtual
Name string Name for the ephemeral device, of the form "ephemeralN" where N is a volume number starting from zero.
- Device
Name string Path at which the device is exposed to created instances.
- Virtual
Name string Name for the ephemeral device, of the form "ephemeralN" where N is a volume number starting from zero.
- device
Name String Path at which the device is exposed to created instances.
- virtual
Name String Name for the ephemeral device, of the form "ephemeralN" where N is a volume number starting from zero.
- device
Name string Path at which the device is exposed to created instances.
- virtual
Name string Name for the ephemeral device, of the form "ephemeralN" where N is a volume number starting from zero.
- device_
name str Path at which the device is exposed to created instances.
- virtual_
name str Name for the ephemeral device, of the form "ephemeralN" where N is a volume number starting from zero.
- device
Name String Path at which the device is exposed to created instances.
- virtual
Name String Name for the ephemeral device, of the form "ephemeralN" where N is a volume number starting from zero.
Import
aws_ami
can be imported using the ID of the AMI, e.g.,
$ pulumi import aws:ec2/ami:Ami example ami-12345678
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.