github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/ec2/ami.go (about)

     1  // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
     2  // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
     3  
     4  package ec2
     5  
     6  import (
     7  	"context"
     8  	"reflect"
     9  
    10  	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
    11  	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    12  )
    13  
    14  // The AMI resource allows the creation and management of a completely-custom
    15  // *Amazon Machine Image* (AMI).
    16  //
    17  // If you just want to duplicate an existing AMI, possibly copying it to another
    18  // region, it's better to use `ec2.AmiCopy` instead.
    19  //
    20  // If you just want to share an existing AMI with another AWS account,
    21  // it's better to use `ec2.AmiLaunchPermission` instead.
    22  //
    23  // ## Example Usage
    24  //
    25  // <!--Start PulumiCodeChooser -->
    26  // ```go
    27  // package main
    28  //
    29  // import (
    30  //
    31  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
    32  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    33  //
    34  // )
    35  //
    36  //	func main() {
    37  //		pulumi.Run(func(ctx *pulumi.Context) error {
    38  //			// Create an AMI that will start a machine whose root device is backed by
    39  //			// an EBS volume populated from a snapshot. We assume that such a snapshot
    40  //			// already exists with the id "snap-xxxxxxxx".
    41  //			_, err := ec2.NewAmi(ctx, "example", &ec2.AmiArgs{
    42  //				Name:               pulumi.String("example"),
    43  //				VirtualizationType: pulumi.String("hvm"),
    44  //				RootDeviceName:     pulumi.String("/dev/xvda"),
    45  //				ImdsSupport:        pulumi.String("v2.0"),
    46  //				EbsBlockDevices: ec2.AmiEbsBlockDeviceArray{
    47  //					&ec2.AmiEbsBlockDeviceArgs{
    48  //						DeviceName: pulumi.String("/dev/xvda"),
    49  //						SnapshotId: pulumi.String("snap-xxxxxxxx"),
    50  //						VolumeSize: pulumi.Int(8),
    51  //					},
    52  //				},
    53  //			})
    54  //			if err != nil {
    55  //				return err
    56  //			}
    57  //			return nil
    58  //		})
    59  //	}
    60  //
    61  // ```
    62  // <!--End PulumiCodeChooser -->
    63  //
    64  // ## Import
    65  //
    66  // Using `pulumi import`, import `aws_ami` using the ID of the AMI. For example:
    67  //
    68  // ```sh
    69  // $ pulumi import aws:ec2/ami:Ami example ami-12345678
    70  // ```
    71  type Ami struct {
    72  	pulumi.CustomResourceState
    73  
    74  	// Machine architecture for created instances. Defaults to "x8664".
    75  	Architecture pulumi.StringPtrOutput `pulumi:"architecture"`
    76  	// ARN of the AMI.
    77  	Arn pulumi.StringOutput `pulumi:"arn"`
    78  	// Boot mode of the AMI. For more information, see [Boot modes](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html) in the Amazon Elastic Compute Cloud User Guide.
    79  	BootMode pulumi.StringPtrOutput `pulumi:"bootMode"`
    80  	// 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](https://tools.ietf.org/html/rfc3339#section-5.8) (`YYYY-MM-DDTHH:MM:SSZ`)
    81  	DeprecationTime pulumi.StringPtrOutput `pulumi:"deprecationTime"`
    82  	// Longer, human-readable description for the AMI.
    83  	Description pulumi.StringPtrOutput `pulumi:"description"`
    84  	// Nested block describing an EBS block device that should be
    85  	// attached to created instances. The structure of this block is described below.
    86  	EbsBlockDevices AmiEbsBlockDeviceArrayOutput `pulumi:"ebsBlockDevices"`
    87  	// Whether enhanced networking with ENA is enabled. Defaults to `false`.
    88  	EnaSupport pulumi.BoolPtrOutput `pulumi:"enaSupport"`
    89  	// Nested block describing an ephemeral block device that
    90  	// should be attached to created instances. The structure of this block is described below.
    91  	EphemeralBlockDevices AmiEphemeralBlockDeviceArrayOutput `pulumi:"ephemeralBlockDevices"`
    92  	// Hypervisor type of the image.
    93  	Hypervisor pulumi.StringOutput `pulumi:"hypervisor"`
    94  	// Path to an S3 object containing an image manifest, e.g., created
    95  	// by the `ec2-upload-bundle` command in the EC2 command line tools.
    96  	ImageLocation pulumi.StringOutput `pulumi:"imageLocation"`
    97  	// AWS account alias (for example, amazon, self) or the AWS account ID of the AMI owner.
    98  	ImageOwnerAlias pulumi.StringOutput `pulumi:"imageOwnerAlias"`
    99  	// Type of image.
   100  	ImageType pulumi.StringOutput `pulumi:"imageType"`
   101  	// 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](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-IMDS-new-instances.html#configure-IMDS-new-instances-ami-configuration).
   102  	ImdsSupport pulumi.StringPtrOutput `pulumi:"imdsSupport"`
   103  	// ID of the kernel image (AKI) that will be used as the paravirtual
   104  	// kernel in created instances.
   105  	KernelId           pulumi.StringPtrOutput `pulumi:"kernelId"`
   106  	ManageEbsSnapshots pulumi.BoolOutput      `pulumi:"manageEbsSnapshots"`
   107  	// Region-unique name for the AMI.
   108  	Name pulumi.StringOutput `pulumi:"name"`
   109  	// AWS account ID of the image owner.
   110  	OwnerId pulumi.StringOutput `pulumi:"ownerId"`
   111  	// This value is set to windows for Windows AMIs; otherwise, it is blank.
   112  	Platform pulumi.StringOutput `pulumi:"platform"`
   113  	// Platform details associated with the billing code of the AMI.
   114  	PlatformDetails pulumi.StringOutput `pulumi:"platformDetails"`
   115  	// Whether the image has public launch permissions.
   116  	Public pulumi.BoolOutput `pulumi:"public"`
   117  	// ID of an initrd image (ARI) that will be used when booting the
   118  	// created instances.
   119  	RamdiskId pulumi.StringPtrOutput `pulumi:"ramdiskId"`
   120  	// Name of the root device (for example, `/dev/sda1`, or `/dev/xvda`).
   121  	RootDeviceName pulumi.StringPtrOutput `pulumi:"rootDeviceName"`
   122  	// Snapshot ID for the root volume (for EBS-backed AMIs)
   123  	RootSnapshotId pulumi.StringOutput `pulumi:"rootSnapshotId"`
   124  	// When set to "simple" (the default), enables enhanced networking
   125  	// for created instances. No other value is supported at this time.
   126  	SriovNetSupport pulumi.StringPtrOutput `pulumi:"sriovNetSupport"`
   127  	// Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   128  	Tags pulumi.StringMapOutput `pulumi:"tags"`
   129  	// Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   130  	//
   131  	// Deprecated: Please use `tags` instead.
   132  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
   133  	// If the image is configured for NitroTPM support, the value is `v2.0`. For more information, see [NitroTPM](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitrotpm.html) in the Amazon Elastic Compute Cloud User Guide.
   134  	TpmSupport pulumi.StringPtrOutput `pulumi:"tpmSupport"`
   135  	// Operation of the Amazon EC2 instance and the billing code that is associated with the AMI.
   136  	UsageOperation pulumi.StringOutput `pulumi:"usageOperation"`
   137  	// Keyword to choose what virtualization mode created instances
   138  	// will use. Can be either "paravirtual" (the default) or "hvm". The choice of virtualization type
   139  	// changes the set of further arguments that are required, as described below.
   140  	VirtualizationType pulumi.StringPtrOutput `pulumi:"virtualizationType"`
   141  }
   142  
   143  // NewAmi registers a new resource with the given unique name, arguments, and options.
   144  func NewAmi(ctx *pulumi.Context,
   145  	name string, args *AmiArgs, opts ...pulumi.ResourceOption) (*Ami, error) {
   146  	if args == nil {
   147  		args = &AmiArgs{}
   148  	}
   149  
   150  	opts = internal.PkgResourceDefaultOpts(opts)
   151  	var resource Ami
   152  	err := ctx.RegisterResource("aws:ec2/ami:Ami", name, args, &resource, opts...)
   153  	if err != nil {
   154  		return nil, err
   155  	}
   156  	return &resource, nil
   157  }
   158  
   159  // GetAmi gets an existing Ami resource's state with the given name, ID, and optional
   160  // state properties that are used to uniquely qualify the lookup (nil if not required).
   161  func GetAmi(ctx *pulumi.Context,
   162  	name string, id pulumi.IDInput, state *AmiState, opts ...pulumi.ResourceOption) (*Ami, error) {
   163  	var resource Ami
   164  	err := ctx.ReadResource("aws:ec2/ami:Ami", name, id, state, &resource, opts...)
   165  	if err != nil {
   166  		return nil, err
   167  	}
   168  	return &resource, nil
   169  }
   170  
   171  // Input properties used for looking up and filtering Ami resources.
   172  type amiState struct {
   173  	// Machine architecture for created instances. Defaults to "x8664".
   174  	Architecture *string `pulumi:"architecture"`
   175  	// ARN of the AMI.
   176  	Arn *string `pulumi:"arn"`
   177  	// Boot mode of the AMI. For more information, see [Boot modes](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html) in the Amazon Elastic Compute Cloud User Guide.
   178  	BootMode *string `pulumi:"bootMode"`
   179  	// 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](https://tools.ietf.org/html/rfc3339#section-5.8) (`YYYY-MM-DDTHH:MM:SSZ`)
   180  	DeprecationTime *string `pulumi:"deprecationTime"`
   181  	// Longer, human-readable description for the AMI.
   182  	Description *string `pulumi:"description"`
   183  	// Nested block describing an EBS block device that should be
   184  	// attached to created instances. The structure of this block is described below.
   185  	EbsBlockDevices []AmiEbsBlockDevice `pulumi:"ebsBlockDevices"`
   186  	// Whether enhanced networking with ENA is enabled. Defaults to `false`.
   187  	EnaSupport *bool `pulumi:"enaSupport"`
   188  	// Nested block describing an ephemeral block device that
   189  	// should be attached to created instances. The structure of this block is described below.
   190  	EphemeralBlockDevices []AmiEphemeralBlockDevice `pulumi:"ephemeralBlockDevices"`
   191  	// Hypervisor type of the image.
   192  	Hypervisor *string `pulumi:"hypervisor"`
   193  	// Path to an S3 object containing an image manifest, e.g., created
   194  	// by the `ec2-upload-bundle` command in the EC2 command line tools.
   195  	ImageLocation *string `pulumi:"imageLocation"`
   196  	// AWS account alias (for example, amazon, self) or the AWS account ID of the AMI owner.
   197  	ImageOwnerAlias *string `pulumi:"imageOwnerAlias"`
   198  	// Type of image.
   199  	ImageType *string `pulumi:"imageType"`
   200  	// 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](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-IMDS-new-instances.html#configure-IMDS-new-instances-ami-configuration).
   201  	ImdsSupport *string `pulumi:"imdsSupport"`
   202  	// ID of the kernel image (AKI) that will be used as the paravirtual
   203  	// kernel in created instances.
   204  	KernelId           *string `pulumi:"kernelId"`
   205  	ManageEbsSnapshots *bool   `pulumi:"manageEbsSnapshots"`
   206  	// Region-unique name for the AMI.
   207  	Name *string `pulumi:"name"`
   208  	// AWS account ID of the image owner.
   209  	OwnerId *string `pulumi:"ownerId"`
   210  	// This value is set to windows for Windows AMIs; otherwise, it is blank.
   211  	Platform *string `pulumi:"platform"`
   212  	// Platform details associated with the billing code of the AMI.
   213  	PlatformDetails *string `pulumi:"platformDetails"`
   214  	// Whether the image has public launch permissions.
   215  	Public *bool `pulumi:"public"`
   216  	// ID of an initrd image (ARI) that will be used when booting the
   217  	// created instances.
   218  	RamdiskId *string `pulumi:"ramdiskId"`
   219  	// Name of the root device (for example, `/dev/sda1`, or `/dev/xvda`).
   220  	RootDeviceName *string `pulumi:"rootDeviceName"`
   221  	// Snapshot ID for the root volume (for EBS-backed AMIs)
   222  	RootSnapshotId *string `pulumi:"rootSnapshotId"`
   223  	// When set to "simple" (the default), enables enhanced networking
   224  	// for created instances. No other value is supported at this time.
   225  	SriovNetSupport *string `pulumi:"sriovNetSupport"`
   226  	// Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   227  	Tags map[string]string `pulumi:"tags"`
   228  	// Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   229  	//
   230  	// Deprecated: Please use `tags` instead.
   231  	TagsAll map[string]string `pulumi:"tagsAll"`
   232  	// If the image is configured for NitroTPM support, the value is `v2.0`. For more information, see [NitroTPM](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitrotpm.html) in the Amazon Elastic Compute Cloud User Guide.
   233  	TpmSupport *string `pulumi:"tpmSupport"`
   234  	// Operation of the Amazon EC2 instance and the billing code that is associated with the AMI.
   235  	UsageOperation *string `pulumi:"usageOperation"`
   236  	// Keyword to choose what virtualization mode created instances
   237  	// will use. Can be either "paravirtual" (the default) or "hvm". The choice of virtualization type
   238  	// changes the set of further arguments that are required, as described below.
   239  	VirtualizationType *string `pulumi:"virtualizationType"`
   240  }
   241  
   242  type AmiState struct {
   243  	// Machine architecture for created instances. Defaults to "x8664".
   244  	Architecture pulumi.StringPtrInput
   245  	// ARN of the AMI.
   246  	Arn pulumi.StringPtrInput
   247  	// Boot mode of the AMI. For more information, see [Boot modes](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html) in the Amazon Elastic Compute Cloud User Guide.
   248  	BootMode pulumi.StringPtrInput
   249  	// 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](https://tools.ietf.org/html/rfc3339#section-5.8) (`YYYY-MM-DDTHH:MM:SSZ`)
   250  	DeprecationTime pulumi.StringPtrInput
   251  	// Longer, human-readable description for the AMI.
   252  	Description pulumi.StringPtrInput
   253  	// Nested block describing an EBS block device that should be
   254  	// attached to created instances. The structure of this block is described below.
   255  	EbsBlockDevices AmiEbsBlockDeviceArrayInput
   256  	// Whether enhanced networking with ENA is enabled. Defaults to `false`.
   257  	EnaSupport pulumi.BoolPtrInput
   258  	// Nested block describing an ephemeral block device that
   259  	// should be attached to created instances. The structure of this block is described below.
   260  	EphemeralBlockDevices AmiEphemeralBlockDeviceArrayInput
   261  	// Hypervisor type of the image.
   262  	Hypervisor pulumi.StringPtrInput
   263  	// Path to an S3 object containing an image manifest, e.g., created
   264  	// by the `ec2-upload-bundle` command in the EC2 command line tools.
   265  	ImageLocation pulumi.StringPtrInput
   266  	// AWS account alias (for example, amazon, self) or the AWS account ID of the AMI owner.
   267  	ImageOwnerAlias pulumi.StringPtrInput
   268  	// Type of image.
   269  	ImageType pulumi.StringPtrInput
   270  	// 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](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-IMDS-new-instances.html#configure-IMDS-new-instances-ami-configuration).
   271  	ImdsSupport pulumi.StringPtrInput
   272  	// ID of the kernel image (AKI) that will be used as the paravirtual
   273  	// kernel in created instances.
   274  	KernelId           pulumi.StringPtrInput
   275  	ManageEbsSnapshots pulumi.BoolPtrInput
   276  	// Region-unique name for the AMI.
   277  	Name pulumi.StringPtrInput
   278  	// AWS account ID of the image owner.
   279  	OwnerId pulumi.StringPtrInput
   280  	// This value is set to windows for Windows AMIs; otherwise, it is blank.
   281  	Platform pulumi.StringPtrInput
   282  	// Platform details associated with the billing code of the AMI.
   283  	PlatformDetails pulumi.StringPtrInput
   284  	// Whether the image has public launch permissions.
   285  	Public pulumi.BoolPtrInput
   286  	// ID of an initrd image (ARI) that will be used when booting the
   287  	// created instances.
   288  	RamdiskId pulumi.StringPtrInput
   289  	// Name of the root device (for example, `/dev/sda1`, or `/dev/xvda`).
   290  	RootDeviceName pulumi.StringPtrInput
   291  	// Snapshot ID for the root volume (for EBS-backed AMIs)
   292  	RootSnapshotId pulumi.StringPtrInput
   293  	// When set to "simple" (the default), enables enhanced networking
   294  	// for created instances. No other value is supported at this time.
   295  	SriovNetSupport pulumi.StringPtrInput
   296  	// Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   297  	Tags pulumi.StringMapInput
   298  	// Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   299  	//
   300  	// Deprecated: Please use `tags` instead.
   301  	TagsAll pulumi.StringMapInput
   302  	// If the image is configured for NitroTPM support, the value is `v2.0`. For more information, see [NitroTPM](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitrotpm.html) in the Amazon Elastic Compute Cloud User Guide.
   303  	TpmSupport pulumi.StringPtrInput
   304  	// Operation of the Amazon EC2 instance and the billing code that is associated with the AMI.
   305  	UsageOperation pulumi.StringPtrInput
   306  	// Keyword to choose what virtualization mode created instances
   307  	// will use. Can be either "paravirtual" (the default) or "hvm". The choice of virtualization type
   308  	// changes the set of further arguments that are required, as described below.
   309  	VirtualizationType pulumi.StringPtrInput
   310  }
   311  
   312  func (AmiState) ElementType() reflect.Type {
   313  	return reflect.TypeOf((*amiState)(nil)).Elem()
   314  }
   315  
   316  type amiArgs struct {
   317  	// Machine architecture for created instances. Defaults to "x8664".
   318  	Architecture *string `pulumi:"architecture"`
   319  	// Boot mode of the AMI. For more information, see [Boot modes](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html) in the Amazon Elastic Compute Cloud User Guide.
   320  	BootMode *string `pulumi:"bootMode"`
   321  	// 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](https://tools.ietf.org/html/rfc3339#section-5.8) (`YYYY-MM-DDTHH:MM:SSZ`)
   322  	DeprecationTime *string `pulumi:"deprecationTime"`
   323  	// Longer, human-readable description for the AMI.
   324  	Description *string `pulumi:"description"`
   325  	// Nested block describing an EBS block device that should be
   326  	// attached to created instances. The structure of this block is described below.
   327  	EbsBlockDevices []AmiEbsBlockDevice `pulumi:"ebsBlockDevices"`
   328  	// Whether enhanced networking with ENA is enabled. Defaults to `false`.
   329  	EnaSupport *bool `pulumi:"enaSupport"`
   330  	// Nested block describing an ephemeral block device that
   331  	// should be attached to created instances. The structure of this block is described below.
   332  	EphemeralBlockDevices []AmiEphemeralBlockDevice `pulumi:"ephemeralBlockDevices"`
   333  	// Path to an S3 object containing an image manifest, e.g., created
   334  	// by the `ec2-upload-bundle` command in the EC2 command line tools.
   335  	ImageLocation *string `pulumi:"imageLocation"`
   336  	// 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](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-IMDS-new-instances.html#configure-IMDS-new-instances-ami-configuration).
   337  	ImdsSupport *string `pulumi:"imdsSupport"`
   338  	// ID of the kernel image (AKI) that will be used as the paravirtual
   339  	// kernel in created instances.
   340  	KernelId *string `pulumi:"kernelId"`
   341  	// Region-unique name for the AMI.
   342  	Name *string `pulumi:"name"`
   343  	// ID of an initrd image (ARI) that will be used when booting the
   344  	// created instances.
   345  	RamdiskId *string `pulumi:"ramdiskId"`
   346  	// Name of the root device (for example, `/dev/sda1`, or `/dev/xvda`).
   347  	RootDeviceName *string `pulumi:"rootDeviceName"`
   348  	// When set to "simple" (the default), enables enhanced networking
   349  	// for created instances. No other value is supported at this time.
   350  	SriovNetSupport *string `pulumi:"sriovNetSupport"`
   351  	// Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   352  	Tags map[string]string `pulumi:"tags"`
   353  	// If the image is configured for NitroTPM support, the value is `v2.0`. For more information, see [NitroTPM](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitrotpm.html) in the Amazon Elastic Compute Cloud User Guide.
   354  	TpmSupport *string `pulumi:"tpmSupport"`
   355  	// Keyword to choose what virtualization mode created instances
   356  	// will use. Can be either "paravirtual" (the default) or "hvm". The choice of virtualization type
   357  	// changes the set of further arguments that are required, as described below.
   358  	VirtualizationType *string `pulumi:"virtualizationType"`
   359  }
   360  
   361  // The set of arguments for constructing a Ami resource.
   362  type AmiArgs struct {
   363  	// Machine architecture for created instances. Defaults to "x8664".
   364  	Architecture pulumi.StringPtrInput
   365  	// Boot mode of the AMI. For more information, see [Boot modes](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html) in the Amazon Elastic Compute Cloud User Guide.
   366  	BootMode pulumi.StringPtrInput
   367  	// 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](https://tools.ietf.org/html/rfc3339#section-5.8) (`YYYY-MM-DDTHH:MM:SSZ`)
   368  	DeprecationTime pulumi.StringPtrInput
   369  	// Longer, human-readable description for the AMI.
   370  	Description pulumi.StringPtrInput
   371  	// Nested block describing an EBS block device that should be
   372  	// attached to created instances. The structure of this block is described below.
   373  	EbsBlockDevices AmiEbsBlockDeviceArrayInput
   374  	// Whether enhanced networking with ENA is enabled. Defaults to `false`.
   375  	EnaSupport pulumi.BoolPtrInput
   376  	// Nested block describing an ephemeral block device that
   377  	// should be attached to created instances. The structure of this block is described below.
   378  	EphemeralBlockDevices AmiEphemeralBlockDeviceArrayInput
   379  	// Path to an S3 object containing an image manifest, e.g., created
   380  	// by the `ec2-upload-bundle` command in the EC2 command line tools.
   381  	ImageLocation pulumi.StringPtrInput
   382  	// 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](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-IMDS-new-instances.html#configure-IMDS-new-instances-ami-configuration).
   383  	ImdsSupport pulumi.StringPtrInput
   384  	// ID of the kernel image (AKI) that will be used as the paravirtual
   385  	// kernel in created instances.
   386  	KernelId pulumi.StringPtrInput
   387  	// Region-unique name for the AMI.
   388  	Name pulumi.StringPtrInput
   389  	// ID of an initrd image (ARI) that will be used when booting the
   390  	// created instances.
   391  	RamdiskId pulumi.StringPtrInput
   392  	// Name of the root device (for example, `/dev/sda1`, or `/dev/xvda`).
   393  	RootDeviceName pulumi.StringPtrInput
   394  	// When set to "simple" (the default), enables enhanced networking
   395  	// for created instances. No other value is supported at this time.
   396  	SriovNetSupport pulumi.StringPtrInput
   397  	// Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   398  	Tags pulumi.StringMapInput
   399  	// If the image is configured for NitroTPM support, the value is `v2.0`. For more information, see [NitroTPM](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitrotpm.html) in the Amazon Elastic Compute Cloud User Guide.
   400  	TpmSupport pulumi.StringPtrInput
   401  	// Keyword to choose what virtualization mode created instances
   402  	// will use. Can be either "paravirtual" (the default) or "hvm". The choice of virtualization type
   403  	// changes the set of further arguments that are required, as described below.
   404  	VirtualizationType pulumi.StringPtrInput
   405  }
   406  
   407  func (AmiArgs) ElementType() reflect.Type {
   408  	return reflect.TypeOf((*amiArgs)(nil)).Elem()
   409  }
   410  
   411  type AmiInput interface {
   412  	pulumi.Input
   413  
   414  	ToAmiOutput() AmiOutput
   415  	ToAmiOutputWithContext(ctx context.Context) AmiOutput
   416  }
   417  
   418  func (*Ami) ElementType() reflect.Type {
   419  	return reflect.TypeOf((**Ami)(nil)).Elem()
   420  }
   421  
   422  func (i *Ami) ToAmiOutput() AmiOutput {
   423  	return i.ToAmiOutputWithContext(context.Background())
   424  }
   425  
   426  func (i *Ami) ToAmiOutputWithContext(ctx context.Context) AmiOutput {
   427  	return pulumi.ToOutputWithContext(ctx, i).(AmiOutput)
   428  }
   429  
   430  // AmiArrayInput is an input type that accepts AmiArray and AmiArrayOutput values.
   431  // You can construct a concrete instance of `AmiArrayInput` via:
   432  //
   433  //	AmiArray{ AmiArgs{...} }
   434  type AmiArrayInput interface {
   435  	pulumi.Input
   436  
   437  	ToAmiArrayOutput() AmiArrayOutput
   438  	ToAmiArrayOutputWithContext(context.Context) AmiArrayOutput
   439  }
   440  
   441  type AmiArray []AmiInput
   442  
   443  func (AmiArray) ElementType() reflect.Type {
   444  	return reflect.TypeOf((*[]*Ami)(nil)).Elem()
   445  }
   446  
   447  func (i AmiArray) ToAmiArrayOutput() AmiArrayOutput {
   448  	return i.ToAmiArrayOutputWithContext(context.Background())
   449  }
   450  
   451  func (i AmiArray) ToAmiArrayOutputWithContext(ctx context.Context) AmiArrayOutput {
   452  	return pulumi.ToOutputWithContext(ctx, i).(AmiArrayOutput)
   453  }
   454  
   455  // AmiMapInput is an input type that accepts AmiMap and AmiMapOutput values.
   456  // You can construct a concrete instance of `AmiMapInput` via:
   457  //
   458  //	AmiMap{ "key": AmiArgs{...} }
   459  type AmiMapInput interface {
   460  	pulumi.Input
   461  
   462  	ToAmiMapOutput() AmiMapOutput
   463  	ToAmiMapOutputWithContext(context.Context) AmiMapOutput
   464  }
   465  
   466  type AmiMap map[string]AmiInput
   467  
   468  func (AmiMap) ElementType() reflect.Type {
   469  	return reflect.TypeOf((*map[string]*Ami)(nil)).Elem()
   470  }
   471  
   472  func (i AmiMap) ToAmiMapOutput() AmiMapOutput {
   473  	return i.ToAmiMapOutputWithContext(context.Background())
   474  }
   475  
   476  func (i AmiMap) ToAmiMapOutputWithContext(ctx context.Context) AmiMapOutput {
   477  	return pulumi.ToOutputWithContext(ctx, i).(AmiMapOutput)
   478  }
   479  
   480  type AmiOutput struct{ *pulumi.OutputState }
   481  
   482  func (AmiOutput) ElementType() reflect.Type {
   483  	return reflect.TypeOf((**Ami)(nil)).Elem()
   484  }
   485  
   486  func (o AmiOutput) ToAmiOutput() AmiOutput {
   487  	return o
   488  }
   489  
   490  func (o AmiOutput) ToAmiOutputWithContext(ctx context.Context) AmiOutput {
   491  	return o
   492  }
   493  
   494  // Machine architecture for created instances. Defaults to "x8664".
   495  func (o AmiOutput) Architecture() pulumi.StringPtrOutput {
   496  	return o.ApplyT(func(v *Ami) pulumi.StringPtrOutput { return v.Architecture }).(pulumi.StringPtrOutput)
   497  }
   498  
   499  // ARN of the AMI.
   500  func (o AmiOutput) Arn() pulumi.StringOutput {
   501  	return o.ApplyT(func(v *Ami) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   502  }
   503  
   504  // Boot mode of the AMI. For more information, see [Boot modes](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html) in the Amazon Elastic Compute Cloud User Guide.
   505  func (o AmiOutput) BootMode() pulumi.StringPtrOutput {
   506  	return o.ApplyT(func(v *Ami) pulumi.StringPtrOutput { return v.BootMode }).(pulumi.StringPtrOutput)
   507  }
   508  
   509  // 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](https://tools.ietf.org/html/rfc3339#section-5.8) (`YYYY-MM-DDTHH:MM:SSZ`)
   510  func (o AmiOutput) DeprecationTime() pulumi.StringPtrOutput {
   511  	return o.ApplyT(func(v *Ami) pulumi.StringPtrOutput { return v.DeprecationTime }).(pulumi.StringPtrOutput)
   512  }
   513  
   514  // Longer, human-readable description for the AMI.
   515  func (o AmiOutput) Description() pulumi.StringPtrOutput {
   516  	return o.ApplyT(func(v *Ami) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
   517  }
   518  
   519  // Nested block describing an EBS block device that should be
   520  // attached to created instances. The structure of this block is described below.
   521  func (o AmiOutput) EbsBlockDevices() AmiEbsBlockDeviceArrayOutput {
   522  	return o.ApplyT(func(v *Ami) AmiEbsBlockDeviceArrayOutput { return v.EbsBlockDevices }).(AmiEbsBlockDeviceArrayOutput)
   523  }
   524  
   525  // Whether enhanced networking with ENA is enabled. Defaults to `false`.
   526  func (o AmiOutput) EnaSupport() pulumi.BoolPtrOutput {
   527  	return o.ApplyT(func(v *Ami) pulumi.BoolPtrOutput { return v.EnaSupport }).(pulumi.BoolPtrOutput)
   528  }
   529  
   530  // Nested block describing an ephemeral block device that
   531  // should be attached to created instances. The structure of this block is described below.
   532  func (o AmiOutput) EphemeralBlockDevices() AmiEphemeralBlockDeviceArrayOutput {
   533  	return o.ApplyT(func(v *Ami) AmiEphemeralBlockDeviceArrayOutput { return v.EphemeralBlockDevices }).(AmiEphemeralBlockDeviceArrayOutput)
   534  }
   535  
   536  // Hypervisor type of the image.
   537  func (o AmiOutput) Hypervisor() pulumi.StringOutput {
   538  	return o.ApplyT(func(v *Ami) pulumi.StringOutput { return v.Hypervisor }).(pulumi.StringOutput)
   539  }
   540  
   541  // Path to an S3 object containing an image manifest, e.g., created
   542  // by the `ec2-upload-bundle` command in the EC2 command line tools.
   543  func (o AmiOutput) ImageLocation() pulumi.StringOutput {
   544  	return o.ApplyT(func(v *Ami) pulumi.StringOutput { return v.ImageLocation }).(pulumi.StringOutput)
   545  }
   546  
   547  // AWS account alias (for example, amazon, self) or the AWS account ID of the AMI owner.
   548  func (o AmiOutput) ImageOwnerAlias() pulumi.StringOutput {
   549  	return o.ApplyT(func(v *Ami) pulumi.StringOutput { return v.ImageOwnerAlias }).(pulumi.StringOutput)
   550  }
   551  
   552  // Type of image.
   553  func (o AmiOutput) ImageType() pulumi.StringOutput {
   554  	return o.ApplyT(func(v *Ami) pulumi.StringOutput { return v.ImageType }).(pulumi.StringOutput)
   555  }
   556  
   557  // 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](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-IMDS-new-instances.html#configure-IMDS-new-instances-ami-configuration).
   558  func (o AmiOutput) ImdsSupport() pulumi.StringPtrOutput {
   559  	return o.ApplyT(func(v *Ami) pulumi.StringPtrOutput { return v.ImdsSupport }).(pulumi.StringPtrOutput)
   560  }
   561  
   562  // ID of the kernel image (AKI) that will be used as the paravirtual
   563  // kernel in created instances.
   564  func (o AmiOutput) KernelId() pulumi.StringPtrOutput {
   565  	return o.ApplyT(func(v *Ami) pulumi.StringPtrOutput { return v.KernelId }).(pulumi.StringPtrOutput)
   566  }
   567  
   568  func (o AmiOutput) ManageEbsSnapshots() pulumi.BoolOutput {
   569  	return o.ApplyT(func(v *Ami) pulumi.BoolOutput { return v.ManageEbsSnapshots }).(pulumi.BoolOutput)
   570  }
   571  
   572  // Region-unique name for the AMI.
   573  func (o AmiOutput) Name() pulumi.StringOutput {
   574  	return o.ApplyT(func(v *Ami) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
   575  }
   576  
   577  // AWS account ID of the image owner.
   578  func (o AmiOutput) OwnerId() pulumi.StringOutput {
   579  	return o.ApplyT(func(v *Ami) pulumi.StringOutput { return v.OwnerId }).(pulumi.StringOutput)
   580  }
   581  
   582  // This value is set to windows for Windows AMIs; otherwise, it is blank.
   583  func (o AmiOutput) Platform() pulumi.StringOutput {
   584  	return o.ApplyT(func(v *Ami) pulumi.StringOutput { return v.Platform }).(pulumi.StringOutput)
   585  }
   586  
   587  // Platform details associated with the billing code of the AMI.
   588  func (o AmiOutput) PlatformDetails() pulumi.StringOutput {
   589  	return o.ApplyT(func(v *Ami) pulumi.StringOutput { return v.PlatformDetails }).(pulumi.StringOutput)
   590  }
   591  
   592  // Whether the image has public launch permissions.
   593  func (o AmiOutput) Public() pulumi.BoolOutput {
   594  	return o.ApplyT(func(v *Ami) pulumi.BoolOutput { return v.Public }).(pulumi.BoolOutput)
   595  }
   596  
   597  // ID of an initrd image (ARI) that will be used when booting the
   598  // created instances.
   599  func (o AmiOutput) RamdiskId() pulumi.StringPtrOutput {
   600  	return o.ApplyT(func(v *Ami) pulumi.StringPtrOutput { return v.RamdiskId }).(pulumi.StringPtrOutput)
   601  }
   602  
   603  // Name of the root device (for example, `/dev/sda1`, or `/dev/xvda`).
   604  func (o AmiOutput) RootDeviceName() pulumi.StringPtrOutput {
   605  	return o.ApplyT(func(v *Ami) pulumi.StringPtrOutput { return v.RootDeviceName }).(pulumi.StringPtrOutput)
   606  }
   607  
   608  // Snapshot ID for the root volume (for EBS-backed AMIs)
   609  func (o AmiOutput) RootSnapshotId() pulumi.StringOutput {
   610  	return o.ApplyT(func(v *Ami) pulumi.StringOutput { return v.RootSnapshotId }).(pulumi.StringOutput)
   611  }
   612  
   613  // When set to "simple" (the default), enables enhanced networking
   614  // for created instances. No other value is supported at this time.
   615  func (o AmiOutput) SriovNetSupport() pulumi.StringPtrOutput {
   616  	return o.ApplyT(func(v *Ami) pulumi.StringPtrOutput { return v.SriovNetSupport }).(pulumi.StringPtrOutput)
   617  }
   618  
   619  // Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   620  func (o AmiOutput) Tags() pulumi.StringMapOutput {
   621  	return o.ApplyT(func(v *Ami) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
   622  }
   623  
   624  // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   625  //
   626  // Deprecated: Please use `tags` instead.
   627  func (o AmiOutput) TagsAll() pulumi.StringMapOutput {
   628  	return o.ApplyT(func(v *Ami) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
   629  }
   630  
   631  // If the image is configured for NitroTPM support, the value is `v2.0`. For more information, see [NitroTPM](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitrotpm.html) in the Amazon Elastic Compute Cloud User Guide.
   632  func (o AmiOutput) TpmSupport() pulumi.StringPtrOutput {
   633  	return o.ApplyT(func(v *Ami) pulumi.StringPtrOutput { return v.TpmSupport }).(pulumi.StringPtrOutput)
   634  }
   635  
   636  // Operation of the Amazon EC2 instance and the billing code that is associated with the AMI.
   637  func (o AmiOutput) UsageOperation() pulumi.StringOutput {
   638  	return o.ApplyT(func(v *Ami) pulumi.StringOutput { return v.UsageOperation }).(pulumi.StringOutput)
   639  }
   640  
   641  // Keyword to choose what virtualization mode created instances
   642  // will use. Can be either "paravirtual" (the default) or "hvm". The choice of virtualization type
   643  // changes the set of further arguments that are required, as described below.
   644  func (o AmiOutput) VirtualizationType() pulumi.StringPtrOutput {
   645  	return o.ApplyT(func(v *Ami) pulumi.StringPtrOutput { return v.VirtualizationType }).(pulumi.StringPtrOutput)
   646  }
   647  
   648  type AmiArrayOutput struct{ *pulumi.OutputState }
   649  
   650  func (AmiArrayOutput) ElementType() reflect.Type {
   651  	return reflect.TypeOf((*[]*Ami)(nil)).Elem()
   652  }
   653  
   654  func (o AmiArrayOutput) ToAmiArrayOutput() AmiArrayOutput {
   655  	return o
   656  }
   657  
   658  func (o AmiArrayOutput) ToAmiArrayOutputWithContext(ctx context.Context) AmiArrayOutput {
   659  	return o
   660  }
   661  
   662  func (o AmiArrayOutput) Index(i pulumi.IntInput) AmiOutput {
   663  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Ami {
   664  		return vs[0].([]*Ami)[vs[1].(int)]
   665  	}).(AmiOutput)
   666  }
   667  
   668  type AmiMapOutput struct{ *pulumi.OutputState }
   669  
   670  func (AmiMapOutput) ElementType() reflect.Type {
   671  	return reflect.TypeOf((*map[string]*Ami)(nil)).Elem()
   672  }
   673  
   674  func (o AmiMapOutput) ToAmiMapOutput() AmiMapOutput {
   675  	return o
   676  }
   677  
   678  func (o AmiMapOutput) ToAmiMapOutputWithContext(ctx context.Context) AmiMapOutput {
   679  	return o
   680  }
   681  
   682  func (o AmiMapOutput) MapIndex(k pulumi.StringInput) AmiOutput {
   683  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Ami {
   684  		return vs[0].(map[string]*Ami)[vs[1].(string)]
   685  	}).(AmiOutput)
   686  }
   687  
   688  func init() {
   689  	pulumi.RegisterInputType(reflect.TypeOf((*AmiInput)(nil)).Elem(), &Ami{})
   690  	pulumi.RegisterInputType(reflect.TypeOf((*AmiArrayInput)(nil)).Elem(), AmiArray{})
   691  	pulumi.RegisterInputType(reflect.TypeOf((*AmiMapInput)(nil)).Elem(), AmiMap{})
   692  	pulumi.RegisterOutputType(AmiOutput{})
   693  	pulumi.RegisterOutputType(AmiArrayOutput{})
   694  	pulumi.RegisterOutputType(AmiMapOutput{})
   695  }