AmiArgs

data class AmiArgs(val architecture: Output<String>? = null, val bootMode: Output<String>? = null, val deprecationTime: Output<String>? = null, val description: Output<String>? = null, val ebsBlockDevices: Output<List<AmiEbsBlockDeviceArgs>>? = null, val enaSupport: Output<Boolean>? = null, val ephemeralBlockDevices: Output<List<AmiEphemeralBlockDeviceArgs>>? = null, val imageLocation: Output<String>? = null, val imdsSupport: Output<String>? = null, val kernelId: Output<String>? = null, val name: Output<String>? = null, val ramdiskId: Output<String>? = null, val rootDeviceName: Output<String>? = null, val sriovNetSupport: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val tpmSupport: Output<String>? = null, val virtualizationType: Output<String>? = null) : ConvertibleToJava<AmiArgs>

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

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

aws_ami can be imported using the ID of the AMI, e.g.,

$ pulumi import aws:ec2/ami:Ami example ami-12345678

Constructors

Link copied to clipboard
constructor(architecture: Output<String>? = null, bootMode: Output<String>? = null, deprecationTime: Output<String>? = null, description: Output<String>? = null, ebsBlockDevices: Output<List<AmiEbsBlockDeviceArgs>>? = null, enaSupport: Output<Boolean>? = null, ephemeralBlockDevices: Output<List<AmiEphemeralBlockDeviceArgs>>? = null, imageLocation: Output<String>? = null, imdsSupport: Output<String>? = null, kernelId: Output<String>? = null, name: Output<String>? = null, ramdiskId: Output<String>? = null, rootDeviceName: Output<String>? = null, sriovNetSupport: Output<String>? = null, tags: Output<Map<String, String>>? = null, tpmSupport: Output<String>? = null, virtualizationType: Output<String>? = null)

Properties

Link copied to clipboard
val architecture: Output<String>? = null

Machine architecture for created instances. Defaults to "x86_64".

Link copied to clipboard
val bootMode: Output<String>? = null

Boot mode of the AMI. For more information, see Boot modes in the Amazon Elastic Compute Cloud User Guide.

Link copied to clipboard
val deprecationTime: Output<String>? = null

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)

Link copied to clipboard
val description: Output<String>? = null

Longer, human-readable description for the AMI.

Link copied to clipboard

Nested block describing an EBS block device that should be attached to created instances. The structure of this block is described below.

Link copied to clipboard
val enaSupport: Output<Boolean>? = null

Whether enhanced networking with ENA is enabled. Defaults to false.

Link copied to clipboard

Nested block describing an ephemeral block device that should be attached to created instances. The structure of this block is described below.

Link copied to clipboard
val imageLocation: Output<String>? = null

Path to an S3 object containing an image manifest, e.g., created by the ec2-upload-bundle command in the EC2 command line tools.

Link copied to clipboard
val imdsSupport: Output<String>? = null

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.

Link copied to clipboard
val kernelId: Output<String>? = null

ID of the kernel image (AKI) that will be used as the paravirtual kernel in created instances.

Link copied to clipboard
val name: Output<String>? = null

Region-unique name for the AMI.

Link copied to clipboard
val ramdiskId: Output<String>? = null

ID of an initrd image (ARI) that will be used when booting the created instances.

Link copied to clipboard
val rootDeviceName: Output<String>? = null

Name of the root device (for example, /dev/sda1, or /dev/xvda).

Link copied to clipboard
val sriovNetSupport: Output<String>? = null

When set to "simple" (the default), enables enhanced networking for created instances. No other value is supported at this time.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

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.

Link copied to clipboard
val tpmSupport: Output<String>? = null

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.

Link copied to clipboard
val virtualizationType: Output<String>? = null

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.

Functions

Link copied to clipboard
open override fun toJava(): AmiArgs