github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/ec2/amiCopy.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  	"errors"
    11  	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
    12  	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    13  )
    14  
    15  // The "AMI copy" resource allows duplication of an Amazon Machine Image (AMI),
    16  // including cross-region copies.
    17  //
    18  // If the source AMI has associated EBS snapshots, those will also be duplicated
    19  // along with the AMI.
    20  //
    21  // This is useful for taking a single AMI provisioned in one region and making
    22  // it available in another for a multi-region deployment.
    23  //
    24  // Copying an AMI can take several minutes. The creation of this resource will
    25  // block until the new AMI is available for use on new instances.
    26  //
    27  // ## Example Usage
    28  //
    29  // <!--Start PulumiCodeChooser -->
    30  // ```go
    31  // package main
    32  //
    33  // import (
    34  //
    35  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
    36  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    37  //
    38  // )
    39  //
    40  //	func main() {
    41  //		pulumi.Run(func(ctx *pulumi.Context) error {
    42  //			_, err := ec2.NewAmiCopy(ctx, "example", &ec2.AmiCopyArgs{
    43  //				Name:            pulumi.String("example"),
    44  //				Description:     pulumi.String("A copy of ami-xxxxxxxx"),
    45  //				SourceAmiId:     pulumi.String("ami-xxxxxxxx"),
    46  //				SourceAmiRegion: pulumi.String("us-west-1"),
    47  //				Tags: pulumi.StringMap{
    48  //					"Name": pulumi.String("HelloWorld"),
    49  //				},
    50  //			})
    51  //			if err != nil {
    52  //				return err
    53  //			}
    54  //			return nil
    55  //		})
    56  //	}
    57  //
    58  // ```
    59  // <!--End PulumiCodeChooser -->
    60  type AmiCopy struct {
    61  	pulumi.CustomResourceState
    62  
    63  	// Machine architecture for created instances. Defaults to "x8664".
    64  	Architecture pulumi.StringOutput `pulumi:"architecture"`
    65  	// ARN of the AMI.
    66  	Arn pulumi.StringOutput `pulumi:"arn"`
    67  	// 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.
    68  	BootMode pulumi.StringOutput `pulumi:"bootMode"`
    69  	// 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`)
    70  	DeprecationTime pulumi.StringPtrOutput `pulumi:"deprecationTime"`
    71  	// Longer, human-readable description for the AMI.
    72  	Description pulumi.StringPtrOutput `pulumi:"description"`
    73  	// ARN of the Outpost to which to copy the AMI.
    74  	// Only specify this parameter when copying an AMI from an AWS Region to an Outpost. The AMI must be in the Region of the destination Outpost.
    75  	DestinationOutpostArn pulumi.StringPtrOutput `pulumi:"destinationOutpostArn"`
    76  	// Nested block describing an EBS block device that should be
    77  	// attached to created instances. The structure of this block is described below.
    78  	EbsBlockDevices AmiCopyEbsBlockDeviceArrayOutput `pulumi:"ebsBlockDevices"`
    79  	// Whether enhanced networking with ENA is enabled. Defaults to `false`.
    80  	EnaSupport pulumi.BoolOutput `pulumi:"enaSupport"`
    81  	// Whether the destination snapshots of the copied image should be encrypted. Defaults to `false`
    82  	Encrypted pulumi.BoolPtrOutput `pulumi:"encrypted"`
    83  	// Nested block describing an ephemeral block device that
    84  	// should be attached to created instances. The structure of this block is described below.
    85  	EphemeralBlockDevices AmiCopyEphemeralBlockDeviceArrayOutput `pulumi:"ephemeralBlockDevices"`
    86  	Hypervisor            pulumi.StringOutput                    `pulumi:"hypervisor"`
    87  	// Path to an S3 object containing an image manifest, e.g., created
    88  	// by the `ec2-upload-bundle` command in the EC2 command line tools.
    89  	ImageLocation   pulumi.StringOutput `pulumi:"imageLocation"`
    90  	ImageOwnerAlias pulumi.StringOutput `pulumi:"imageOwnerAlias"`
    91  	ImageType       pulumi.StringOutput `pulumi:"imageType"`
    92  	// 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).
    93  	ImdsSupport pulumi.StringOutput `pulumi:"imdsSupport"`
    94  	// ID of the kernel image (AKI) that will be used as the paravirtual
    95  	// kernel in created instances.
    96  	KernelId pulumi.StringOutput `pulumi:"kernelId"`
    97  	// Full ARN of the KMS Key to use when encrypting the snapshots of an image during a copy operation. If not specified, then the default AWS KMS Key will be used
    98  	KmsKeyId           pulumi.StringOutput `pulumi:"kmsKeyId"`
    99  	ManageEbsSnapshots pulumi.BoolOutput   `pulumi:"manageEbsSnapshots"`
   100  	// Region-unique name for the AMI.
   101  	Name            pulumi.StringOutput `pulumi:"name"`
   102  	OwnerId         pulumi.StringOutput `pulumi:"ownerId"`
   103  	Platform        pulumi.StringOutput `pulumi:"platform"`
   104  	PlatformDetails pulumi.StringOutput `pulumi:"platformDetails"`
   105  	Public          pulumi.BoolOutput   `pulumi:"public"`
   106  	// ID of an initrd image (ARI) that will be used when booting the
   107  	// created instances.
   108  	RamdiskId pulumi.StringOutput `pulumi:"ramdiskId"`
   109  	// Name of the root device (for example, `/dev/sda1`, or `/dev/xvda`).
   110  	RootDeviceName pulumi.StringOutput `pulumi:"rootDeviceName"`
   111  	RootSnapshotId pulumi.StringOutput `pulumi:"rootSnapshotId"`
   112  	// Id of the AMI to copy. This id must be valid in the region
   113  	// given by `sourceAmiRegion`.
   114  	SourceAmiId pulumi.StringOutput `pulumi:"sourceAmiId"`
   115  	// Region from which the AMI will be copied. This may be the
   116  	// same as the AWS provider region in order to create a copy within the same region.
   117  	SourceAmiRegion pulumi.StringOutput `pulumi:"sourceAmiRegion"`
   118  	// When set to "simple" (the default), enables enhanced networking
   119  	// for created instances. No other value is supported at this time.
   120  	SriovNetSupport pulumi.StringOutput `pulumi:"sriovNetSupport"`
   121  	// 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.
   122  	Tags pulumi.StringMapOutput `pulumi:"tags"`
   123  	// Deprecated: Please use `tags` instead.
   124  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
   125  	// 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.
   126  	TpmSupport     pulumi.StringOutput `pulumi:"tpmSupport"`
   127  	UsageOperation pulumi.StringOutput `pulumi:"usageOperation"`
   128  	// Keyword to choose what virtualization mode created instances
   129  	// will use. Can be either "paravirtual" (the default) or "hvm". The choice of virtualization type
   130  	// changes the set of further arguments that are required, as described below.
   131  	VirtualizationType pulumi.StringOutput `pulumi:"virtualizationType"`
   132  }
   133  
   134  // NewAmiCopy registers a new resource with the given unique name, arguments, and options.
   135  func NewAmiCopy(ctx *pulumi.Context,
   136  	name string, args *AmiCopyArgs, opts ...pulumi.ResourceOption) (*AmiCopy, error) {
   137  	if args == nil {
   138  		return nil, errors.New("missing one or more required arguments")
   139  	}
   140  
   141  	if args.SourceAmiId == nil {
   142  		return nil, errors.New("invalid value for required argument 'SourceAmiId'")
   143  	}
   144  	if args.SourceAmiRegion == nil {
   145  		return nil, errors.New("invalid value for required argument 'SourceAmiRegion'")
   146  	}
   147  	opts = internal.PkgResourceDefaultOpts(opts)
   148  	var resource AmiCopy
   149  	err := ctx.RegisterResource("aws:ec2/amiCopy:AmiCopy", name, args, &resource, opts...)
   150  	if err != nil {
   151  		return nil, err
   152  	}
   153  	return &resource, nil
   154  }
   155  
   156  // GetAmiCopy gets an existing AmiCopy resource's state with the given name, ID, and optional
   157  // state properties that are used to uniquely qualify the lookup (nil if not required).
   158  func GetAmiCopy(ctx *pulumi.Context,
   159  	name string, id pulumi.IDInput, state *AmiCopyState, opts ...pulumi.ResourceOption) (*AmiCopy, error) {
   160  	var resource AmiCopy
   161  	err := ctx.ReadResource("aws:ec2/amiCopy:AmiCopy", name, id, state, &resource, opts...)
   162  	if err != nil {
   163  		return nil, err
   164  	}
   165  	return &resource, nil
   166  }
   167  
   168  // Input properties used for looking up and filtering AmiCopy resources.
   169  type amiCopyState struct {
   170  	// Machine architecture for created instances. Defaults to "x8664".
   171  	Architecture *string `pulumi:"architecture"`
   172  	// ARN of the AMI.
   173  	Arn *string `pulumi:"arn"`
   174  	// 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.
   175  	BootMode *string `pulumi:"bootMode"`
   176  	// 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`)
   177  	DeprecationTime *string `pulumi:"deprecationTime"`
   178  	// Longer, human-readable description for the AMI.
   179  	Description *string `pulumi:"description"`
   180  	// ARN of the Outpost to which to copy the AMI.
   181  	// Only specify this parameter when copying an AMI from an AWS Region to an Outpost. The AMI must be in the Region of the destination Outpost.
   182  	DestinationOutpostArn *string `pulumi:"destinationOutpostArn"`
   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 []AmiCopyEbsBlockDevice `pulumi:"ebsBlockDevices"`
   186  	// Whether enhanced networking with ENA is enabled. Defaults to `false`.
   187  	EnaSupport *bool `pulumi:"enaSupport"`
   188  	// Whether the destination snapshots of the copied image should be encrypted. Defaults to `false`
   189  	Encrypted *bool `pulumi:"encrypted"`
   190  	// Nested block describing an ephemeral block device that
   191  	// should be attached to created instances. The structure of this block is described below.
   192  	EphemeralBlockDevices []AmiCopyEphemeralBlockDevice `pulumi:"ephemeralBlockDevices"`
   193  	Hypervisor            *string                       `pulumi:"hypervisor"`
   194  	// Path to an S3 object containing an image manifest, e.g., created
   195  	// by the `ec2-upload-bundle` command in the EC2 command line tools.
   196  	ImageLocation   *string `pulumi:"imageLocation"`
   197  	ImageOwnerAlias *string `pulumi:"imageOwnerAlias"`
   198  	ImageType       *string `pulumi:"imageType"`
   199  	// 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).
   200  	ImdsSupport *string `pulumi:"imdsSupport"`
   201  	// ID of the kernel image (AKI) that will be used as the paravirtual
   202  	// kernel in created instances.
   203  	KernelId *string `pulumi:"kernelId"`
   204  	// Full ARN of the KMS Key to use when encrypting the snapshots of an image during a copy operation. If not specified, then the default AWS KMS Key will be used
   205  	KmsKeyId           *string `pulumi:"kmsKeyId"`
   206  	ManageEbsSnapshots *bool   `pulumi:"manageEbsSnapshots"`
   207  	// Region-unique name for the AMI.
   208  	Name            *string `pulumi:"name"`
   209  	OwnerId         *string `pulumi:"ownerId"`
   210  	Platform        *string `pulumi:"platform"`
   211  	PlatformDetails *string `pulumi:"platformDetails"`
   212  	Public          *bool   `pulumi:"public"`
   213  	// ID of an initrd image (ARI) that will be used when booting the
   214  	// created instances.
   215  	RamdiskId *string `pulumi:"ramdiskId"`
   216  	// Name of the root device (for example, `/dev/sda1`, or `/dev/xvda`).
   217  	RootDeviceName *string `pulumi:"rootDeviceName"`
   218  	RootSnapshotId *string `pulumi:"rootSnapshotId"`
   219  	// Id of the AMI to copy. This id must be valid in the region
   220  	// given by `sourceAmiRegion`.
   221  	SourceAmiId *string `pulumi:"sourceAmiId"`
   222  	// Region from which the AMI will be copied. This may be the
   223  	// same as the AWS provider region in order to create a copy within the same region.
   224  	SourceAmiRegion *string `pulumi:"sourceAmiRegion"`
   225  	// When set to "simple" (the default), enables enhanced networking
   226  	// for created instances. No other value is supported at this time.
   227  	SriovNetSupport *string `pulumi:"sriovNetSupport"`
   228  	// 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.
   229  	Tags map[string]string `pulumi:"tags"`
   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  	UsageOperation *string `pulumi:"usageOperation"`
   235  	// Keyword to choose what virtualization mode created instances
   236  	// will use. Can be either "paravirtual" (the default) or "hvm". The choice of virtualization type
   237  	// changes the set of further arguments that are required, as described below.
   238  	VirtualizationType *string `pulumi:"virtualizationType"`
   239  }
   240  
   241  type AmiCopyState struct {
   242  	// Machine architecture for created instances. Defaults to "x8664".
   243  	Architecture pulumi.StringPtrInput
   244  	// ARN of the AMI.
   245  	Arn pulumi.StringPtrInput
   246  	// 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.
   247  	BootMode pulumi.StringPtrInput
   248  	// 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`)
   249  	DeprecationTime pulumi.StringPtrInput
   250  	// Longer, human-readable description for the AMI.
   251  	Description pulumi.StringPtrInput
   252  	// ARN of the Outpost to which to copy the AMI.
   253  	// Only specify this parameter when copying an AMI from an AWS Region to an Outpost. The AMI must be in the Region of the destination Outpost.
   254  	DestinationOutpostArn pulumi.StringPtrInput
   255  	// Nested block describing an EBS block device that should be
   256  	// attached to created instances. The structure of this block is described below.
   257  	EbsBlockDevices AmiCopyEbsBlockDeviceArrayInput
   258  	// Whether enhanced networking with ENA is enabled. Defaults to `false`.
   259  	EnaSupport pulumi.BoolPtrInput
   260  	// Whether the destination snapshots of the copied image should be encrypted. Defaults to `false`
   261  	Encrypted pulumi.BoolPtrInput
   262  	// Nested block describing an ephemeral block device that
   263  	// should be attached to created instances. The structure of this block is described below.
   264  	EphemeralBlockDevices AmiCopyEphemeralBlockDeviceArrayInput
   265  	Hypervisor            pulumi.StringPtrInput
   266  	// Path to an S3 object containing an image manifest, e.g., created
   267  	// by the `ec2-upload-bundle` command in the EC2 command line tools.
   268  	ImageLocation   pulumi.StringPtrInput
   269  	ImageOwnerAlias pulumi.StringPtrInput
   270  	ImageType       pulumi.StringPtrInput
   271  	// 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).
   272  	ImdsSupport pulumi.StringPtrInput
   273  	// ID of the kernel image (AKI) that will be used as the paravirtual
   274  	// kernel in created instances.
   275  	KernelId pulumi.StringPtrInput
   276  	// Full ARN of the KMS Key to use when encrypting the snapshots of an image during a copy operation. If not specified, then the default AWS KMS Key will be used
   277  	KmsKeyId           pulumi.StringPtrInput
   278  	ManageEbsSnapshots pulumi.BoolPtrInput
   279  	// Region-unique name for the AMI.
   280  	Name            pulumi.StringPtrInput
   281  	OwnerId         pulumi.StringPtrInput
   282  	Platform        pulumi.StringPtrInput
   283  	PlatformDetails pulumi.StringPtrInput
   284  	Public          pulumi.BoolPtrInput
   285  	// ID of an initrd image (ARI) that will be used when booting the
   286  	// created instances.
   287  	RamdiskId pulumi.StringPtrInput
   288  	// Name of the root device (for example, `/dev/sda1`, or `/dev/xvda`).
   289  	RootDeviceName pulumi.StringPtrInput
   290  	RootSnapshotId pulumi.StringPtrInput
   291  	// Id of the AMI to copy. This id must be valid in the region
   292  	// given by `sourceAmiRegion`.
   293  	SourceAmiId pulumi.StringPtrInput
   294  	// Region from which the AMI will be copied. This may be the
   295  	// same as the AWS provider region in order to create a copy within the same region.
   296  	SourceAmiRegion pulumi.StringPtrInput
   297  	// When set to "simple" (the default), enables enhanced networking
   298  	// for created instances. No other value is supported at this time.
   299  	SriovNetSupport pulumi.StringPtrInput
   300  	// 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.
   301  	Tags pulumi.StringMapInput
   302  	// Deprecated: Please use `tags` instead.
   303  	TagsAll pulumi.StringMapInput
   304  	// 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.
   305  	TpmSupport     pulumi.StringPtrInput
   306  	UsageOperation pulumi.StringPtrInput
   307  	// Keyword to choose what virtualization mode created instances
   308  	// will use. Can be either "paravirtual" (the default) or "hvm". The choice of virtualization type
   309  	// changes the set of further arguments that are required, as described below.
   310  	VirtualizationType pulumi.StringPtrInput
   311  }
   312  
   313  func (AmiCopyState) ElementType() reflect.Type {
   314  	return reflect.TypeOf((*amiCopyState)(nil)).Elem()
   315  }
   316  
   317  type amiCopyArgs struct {
   318  	// 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`)
   319  	DeprecationTime *string `pulumi:"deprecationTime"`
   320  	// Longer, human-readable description for the AMI.
   321  	Description *string `pulumi:"description"`
   322  	// ARN of the Outpost to which to copy the AMI.
   323  	// Only specify this parameter when copying an AMI from an AWS Region to an Outpost. The AMI must be in the Region of the destination Outpost.
   324  	DestinationOutpostArn *string `pulumi:"destinationOutpostArn"`
   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 []AmiCopyEbsBlockDevice `pulumi:"ebsBlockDevices"`
   328  	// Whether the destination snapshots of the copied image should be encrypted. Defaults to `false`
   329  	Encrypted *bool `pulumi:"encrypted"`
   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 []AmiCopyEphemeralBlockDevice `pulumi:"ephemeralBlockDevices"`
   333  	// Full ARN of the KMS Key to use when encrypting the snapshots of an image during a copy operation. If not specified, then the default AWS KMS Key will be used
   334  	KmsKeyId *string `pulumi:"kmsKeyId"`
   335  	// Region-unique name for the AMI.
   336  	Name *string `pulumi:"name"`
   337  	// Id of the AMI to copy. This id must be valid in the region
   338  	// given by `sourceAmiRegion`.
   339  	SourceAmiId string `pulumi:"sourceAmiId"`
   340  	// Region from which the AMI will be copied. This may be the
   341  	// same as the AWS provider region in order to create a copy within the same region.
   342  	SourceAmiRegion string `pulumi:"sourceAmiRegion"`
   343  	// 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.
   344  	Tags map[string]string `pulumi:"tags"`
   345  }
   346  
   347  // The set of arguments for constructing a AmiCopy resource.
   348  type AmiCopyArgs struct {
   349  	// 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`)
   350  	DeprecationTime pulumi.StringPtrInput
   351  	// Longer, human-readable description for the AMI.
   352  	Description pulumi.StringPtrInput
   353  	// ARN of the Outpost to which to copy the AMI.
   354  	// Only specify this parameter when copying an AMI from an AWS Region to an Outpost. The AMI must be in the Region of the destination Outpost.
   355  	DestinationOutpostArn pulumi.StringPtrInput
   356  	// Nested block describing an EBS block device that should be
   357  	// attached to created instances. The structure of this block is described below.
   358  	EbsBlockDevices AmiCopyEbsBlockDeviceArrayInput
   359  	// Whether the destination snapshots of the copied image should be encrypted. Defaults to `false`
   360  	Encrypted pulumi.BoolPtrInput
   361  	// Nested block describing an ephemeral block device that
   362  	// should be attached to created instances. The structure of this block is described below.
   363  	EphemeralBlockDevices AmiCopyEphemeralBlockDeviceArrayInput
   364  	// Full ARN of the KMS Key to use when encrypting the snapshots of an image during a copy operation. If not specified, then the default AWS KMS Key will be used
   365  	KmsKeyId pulumi.StringPtrInput
   366  	// Region-unique name for the AMI.
   367  	Name pulumi.StringPtrInput
   368  	// Id of the AMI to copy. This id must be valid in the region
   369  	// given by `sourceAmiRegion`.
   370  	SourceAmiId pulumi.StringInput
   371  	// Region from which the AMI will be copied. This may be the
   372  	// same as the AWS provider region in order to create a copy within the same region.
   373  	SourceAmiRegion pulumi.StringInput
   374  	// 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.
   375  	Tags pulumi.StringMapInput
   376  }
   377  
   378  func (AmiCopyArgs) ElementType() reflect.Type {
   379  	return reflect.TypeOf((*amiCopyArgs)(nil)).Elem()
   380  }
   381  
   382  type AmiCopyInput interface {
   383  	pulumi.Input
   384  
   385  	ToAmiCopyOutput() AmiCopyOutput
   386  	ToAmiCopyOutputWithContext(ctx context.Context) AmiCopyOutput
   387  }
   388  
   389  func (*AmiCopy) ElementType() reflect.Type {
   390  	return reflect.TypeOf((**AmiCopy)(nil)).Elem()
   391  }
   392  
   393  func (i *AmiCopy) ToAmiCopyOutput() AmiCopyOutput {
   394  	return i.ToAmiCopyOutputWithContext(context.Background())
   395  }
   396  
   397  func (i *AmiCopy) ToAmiCopyOutputWithContext(ctx context.Context) AmiCopyOutput {
   398  	return pulumi.ToOutputWithContext(ctx, i).(AmiCopyOutput)
   399  }
   400  
   401  // AmiCopyArrayInput is an input type that accepts AmiCopyArray and AmiCopyArrayOutput values.
   402  // You can construct a concrete instance of `AmiCopyArrayInput` via:
   403  //
   404  //	AmiCopyArray{ AmiCopyArgs{...} }
   405  type AmiCopyArrayInput interface {
   406  	pulumi.Input
   407  
   408  	ToAmiCopyArrayOutput() AmiCopyArrayOutput
   409  	ToAmiCopyArrayOutputWithContext(context.Context) AmiCopyArrayOutput
   410  }
   411  
   412  type AmiCopyArray []AmiCopyInput
   413  
   414  func (AmiCopyArray) ElementType() reflect.Type {
   415  	return reflect.TypeOf((*[]*AmiCopy)(nil)).Elem()
   416  }
   417  
   418  func (i AmiCopyArray) ToAmiCopyArrayOutput() AmiCopyArrayOutput {
   419  	return i.ToAmiCopyArrayOutputWithContext(context.Background())
   420  }
   421  
   422  func (i AmiCopyArray) ToAmiCopyArrayOutputWithContext(ctx context.Context) AmiCopyArrayOutput {
   423  	return pulumi.ToOutputWithContext(ctx, i).(AmiCopyArrayOutput)
   424  }
   425  
   426  // AmiCopyMapInput is an input type that accepts AmiCopyMap and AmiCopyMapOutput values.
   427  // You can construct a concrete instance of `AmiCopyMapInput` via:
   428  //
   429  //	AmiCopyMap{ "key": AmiCopyArgs{...} }
   430  type AmiCopyMapInput interface {
   431  	pulumi.Input
   432  
   433  	ToAmiCopyMapOutput() AmiCopyMapOutput
   434  	ToAmiCopyMapOutputWithContext(context.Context) AmiCopyMapOutput
   435  }
   436  
   437  type AmiCopyMap map[string]AmiCopyInput
   438  
   439  func (AmiCopyMap) ElementType() reflect.Type {
   440  	return reflect.TypeOf((*map[string]*AmiCopy)(nil)).Elem()
   441  }
   442  
   443  func (i AmiCopyMap) ToAmiCopyMapOutput() AmiCopyMapOutput {
   444  	return i.ToAmiCopyMapOutputWithContext(context.Background())
   445  }
   446  
   447  func (i AmiCopyMap) ToAmiCopyMapOutputWithContext(ctx context.Context) AmiCopyMapOutput {
   448  	return pulumi.ToOutputWithContext(ctx, i).(AmiCopyMapOutput)
   449  }
   450  
   451  type AmiCopyOutput struct{ *pulumi.OutputState }
   452  
   453  func (AmiCopyOutput) ElementType() reflect.Type {
   454  	return reflect.TypeOf((**AmiCopy)(nil)).Elem()
   455  }
   456  
   457  func (o AmiCopyOutput) ToAmiCopyOutput() AmiCopyOutput {
   458  	return o
   459  }
   460  
   461  func (o AmiCopyOutput) ToAmiCopyOutputWithContext(ctx context.Context) AmiCopyOutput {
   462  	return o
   463  }
   464  
   465  // Machine architecture for created instances. Defaults to "x8664".
   466  func (o AmiCopyOutput) Architecture() pulumi.StringOutput {
   467  	return o.ApplyT(func(v *AmiCopy) pulumi.StringOutput { return v.Architecture }).(pulumi.StringOutput)
   468  }
   469  
   470  // ARN of the AMI.
   471  func (o AmiCopyOutput) Arn() pulumi.StringOutput {
   472  	return o.ApplyT(func(v *AmiCopy) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   473  }
   474  
   475  // 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.
   476  func (o AmiCopyOutput) BootMode() pulumi.StringOutput {
   477  	return o.ApplyT(func(v *AmiCopy) pulumi.StringOutput { return v.BootMode }).(pulumi.StringOutput)
   478  }
   479  
   480  // 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`)
   481  func (o AmiCopyOutput) DeprecationTime() pulumi.StringPtrOutput {
   482  	return o.ApplyT(func(v *AmiCopy) pulumi.StringPtrOutput { return v.DeprecationTime }).(pulumi.StringPtrOutput)
   483  }
   484  
   485  // Longer, human-readable description for the AMI.
   486  func (o AmiCopyOutput) Description() pulumi.StringPtrOutput {
   487  	return o.ApplyT(func(v *AmiCopy) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
   488  }
   489  
   490  // ARN of the Outpost to which to copy the AMI.
   491  // Only specify this parameter when copying an AMI from an AWS Region to an Outpost. The AMI must be in the Region of the destination Outpost.
   492  func (o AmiCopyOutput) DestinationOutpostArn() pulumi.StringPtrOutput {
   493  	return o.ApplyT(func(v *AmiCopy) pulumi.StringPtrOutput { return v.DestinationOutpostArn }).(pulumi.StringPtrOutput)
   494  }
   495  
   496  // Nested block describing an EBS block device that should be
   497  // attached to created instances. The structure of this block is described below.
   498  func (o AmiCopyOutput) EbsBlockDevices() AmiCopyEbsBlockDeviceArrayOutput {
   499  	return o.ApplyT(func(v *AmiCopy) AmiCopyEbsBlockDeviceArrayOutput { return v.EbsBlockDevices }).(AmiCopyEbsBlockDeviceArrayOutput)
   500  }
   501  
   502  // Whether enhanced networking with ENA is enabled. Defaults to `false`.
   503  func (o AmiCopyOutput) EnaSupport() pulumi.BoolOutput {
   504  	return o.ApplyT(func(v *AmiCopy) pulumi.BoolOutput { return v.EnaSupport }).(pulumi.BoolOutput)
   505  }
   506  
   507  // Whether the destination snapshots of the copied image should be encrypted. Defaults to `false`
   508  func (o AmiCopyOutput) Encrypted() pulumi.BoolPtrOutput {
   509  	return o.ApplyT(func(v *AmiCopy) pulumi.BoolPtrOutput { return v.Encrypted }).(pulumi.BoolPtrOutput)
   510  }
   511  
   512  // Nested block describing an ephemeral block device that
   513  // should be attached to created instances. The structure of this block is described below.
   514  func (o AmiCopyOutput) EphemeralBlockDevices() AmiCopyEphemeralBlockDeviceArrayOutput {
   515  	return o.ApplyT(func(v *AmiCopy) AmiCopyEphemeralBlockDeviceArrayOutput { return v.EphemeralBlockDevices }).(AmiCopyEphemeralBlockDeviceArrayOutput)
   516  }
   517  
   518  func (o AmiCopyOutput) Hypervisor() pulumi.StringOutput {
   519  	return o.ApplyT(func(v *AmiCopy) pulumi.StringOutput { return v.Hypervisor }).(pulumi.StringOutput)
   520  }
   521  
   522  // Path to an S3 object containing an image manifest, e.g., created
   523  // by the `ec2-upload-bundle` command in the EC2 command line tools.
   524  func (o AmiCopyOutput) ImageLocation() pulumi.StringOutput {
   525  	return o.ApplyT(func(v *AmiCopy) pulumi.StringOutput { return v.ImageLocation }).(pulumi.StringOutput)
   526  }
   527  
   528  func (o AmiCopyOutput) ImageOwnerAlias() pulumi.StringOutput {
   529  	return o.ApplyT(func(v *AmiCopy) pulumi.StringOutput { return v.ImageOwnerAlias }).(pulumi.StringOutput)
   530  }
   531  
   532  func (o AmiCopyOutput) ImageType() pulumi.StringOutput {
   533  	return o.ApplyT(func(v *AmiCopy) pulumi.StringOutput { return v.ImageType }).(pulumi.StringOutput)
   534  }
   535  
   536  // 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).
   537  func (o AmiCopyOutput) ImdsSupport() pulumi.StringOutput {
   538  	return o.ApplyT(func(v *AmiCopy) pulumi.StringOutput { return v.ImdsSupport }).(pulumi.StringOutput)
   539  }
   540  
   541  // ID of the kernel image (AKI) that will be used as the paravirtual
   542  // kernel in created instances.
   543  func (o AmiCopyOutput) KernelId() pulumi.StringOutput {
   544  	return o.ApplyT(func(v *AmiCopy) pulumi.StringOutput { return v.KernelId }).(pulumi.StringOutput)
   545  }
   546  
   547  // Full ARN of the KMS Key to use when encrypting the snapshots of an image during a copy operation. If not specified, then the default AWS KMS Key will be used
   548  func (o AmiCopyOutput) KmsKeyId() pulumi.StringOutput {
   549  	return o.ApplyT(func(v *AmiCopy) pulumi.StringOutput { return v.KmsKeyId }).(pulumi.StringOutput)
   550  }
   551  
   552  func (o AmiCopyOutput) ManageEbsSnapshots() pulumi.BoolOutput {
   553  	return o.ApplyT(func(v *AmiCopy) pulumi.BoolOutput { return v.ManageEbsSnapshots }).(pulumi.BoolOutput)
   554  }
   555  
   556  // Region-unique name for the AMI.
   557  func (o AmiCopyOutput) Name() pulumi.StringOutput {
   558  	return o.ApplyT(func(v *AmiCopy) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
   559  }
   560  
   561  func (o AmiCopyOutput) OwnerId() pulumi.StringOutput {
   562  	return o.ApplyT(func(v *AmiCopy) pulumi.StringOutput { return v.OwnerId }).(pulumi.StringOutput)
   563  }
   564  
   565  func (o AmiCopyOutput) Platform() pulumi.StringOutput {
   566  	return o.ApplyT(func(v *AmiCopy) pulumi.StringOutput { return v.Platform }).(pulumi.StringOutput)
   567  }
   568  
   569  func (o AmiCopyOutput) PlatformDetails() pulumi.StringOutput {
   570  	return o.ApplyT(func(v *AmiCopy) pulumi.StringOutput { return v.PlatformDetails }).(pulumi.StringOutput)
   571  }
   572  
   573  func (o AmiCopyOutput) Public() pulumi.BoolOutput {
   574  	return o.ApplyT(func(v *AmiCopy) pulumi.BoolOutput { return v.Public }).(pulumi.BoolOutput)
   575  }
   576  
   577  // ID of an initrd image (ARI) that will be used when booting the
   578  // created instances.
   579  func (o AmiCopyOutput) RamdiskId() pulumi.StringOutput {
   580  	return o.ApplyT(func(v *AmiCopy) pulumi.StringOutput { return v.RamdiskId }).(pulumi.StringOutput)
   581  }
   582  
   583  // Name of the root device (for example, `/dev/sda1`, or `/dev/xvda`).
   584  func (o AmiCopyOutput) RootDeviceName() pulumi.StringOutput {
   585  	return o.ApplyT(func(v *AmiCopy) pulumi.StringOutput { return v.RootDeviceName }).(pulumi.StringOutput)
   586  }
   587  
   588  func (o AmiCopyOutput) RootSnapshotId() pulumi.StringOutput {
   589  	return o.ApplyT(func(v *AmiCopy) pulumi.StringOutput { return v.RootSnapshotId }).(pulumi.StringOutput)
   590  }
   591  
   592  // Id of the AMI to copy. This id must be valid in the region
   593  // given by `sourceAmiRegion`.
   594  func (o AmiCopyOutput) SourceAmiId() pulumi.StringOutput {
   595  	return o.ApplyT(func(v *AmiCopy) pulumi.StringOutput { return v.SourceAmiId }).(pulumi.StringOutput)
   596  }
   597  
   598  // Region from which the AMI will be copied. This may be the
   599  // same as the AWS provider region in order to create a copy within the same region.
   600  func (o AmiCopyOutput) SourceAmiRegion() pulumi.StringOutput {
   601  	return o.ApplyT(func(v *AmiCopy) pulumi.StringOutput { return v.SourceAmiRegion }).(pulumi.StringOutput)
   602  }
   603  
   604  // When set to "simple" (the default), enables enhanced networking
   605  // for created instances. No other value is supported at this time.
   606  func (o AmiCopyOutput) SriovNetSupport() pulumi.StringOutput {
   607  	return o.ApplyT(func(v *AmiCopy) pulumi.StringOutput { return v.SriovNetSupport }).(pulumi.StringOutput)
   608  }
   609  
   610  // 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.
   611  func (o AmiCopyOutput) Tags() pulumi.StringMapOutput {
   612  	return o.ApplyT(func(v *AmiCopy) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
   613  }
   614  
   615  // Deprecated: Please use `tags` instead.
   616  func (o AmiCopyOutput) TagsAll() pulumi.StringMapOutput {
   617  	return o.ApplyT(func(v *AmiCopy) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
   618  }
   619  
   620  // 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.
   621  func (o AmiCopyOutput) TpmSupport() pulumi.StringOutput {
   622  	return o.ApplyT(func(v *AmiCopy) pulumi.StringOutput { return v.TpmSupport }).(pulumi.StringOutput)
   623  }
   624  
   625  func (o AmiCopyOutput) UsageOperation() pulumi.StringOutput {
   626  	return o.ApplyT(func(v *AmiCopy) pulumi.StringOutput { return v.UsageOperation }).(pulumi.StringOutput)
   627  }
   628  
   629  // Keyword to choose what virtualization mode created instances
   630  // will use. Can be either "paravirtual" (the default) or "hvm". The choice of virtualization type
   631  // changes the set of further arguments that are required, as described below.
   632  func (o AmiCopyOutput) VirtualizationType() pulumi.StringOutput {
   633  	return o.ApplyT(func(v *AmiCopy) pulumi.StringOutput { return v.VirtualizationType }).(pulumi.StringOutput)
   634  }
   635  
   636  type AmiCopyArrayOutput struct{ *pulumi.OutputState }
   637  
   638  func (AmiCopyArrayOutput) ElementType() reflect.Type {
   639  	return reflect.TypeOf((*[]*AmiCopy)(nil)).Elem()
   640  }
   641  
   642  func (o AmiCopyArrayOutput) ToAmiCopyArrayOutput() AmiCopyArrayOutput {
   643  	return o
   644  }
   645  
   646  func (o AmiCopyArrayOutput) ToAmiCopyArrayOutputWithContext(ctx context.Context) AmiCopyArrayOutput {
   647  	return o
   648  }
   649  
   650  func (o AmiCopyArrayOutput) Index(i pulumi.IntInput) AmiCopyOutput {
   651  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AmiCopy {
   652  		return vs[0].([]*AmiCopy)[vs[1].(int)]
   653  	}).(AmiCopyOutput)
   654  }
   655  
   656  type AmiCopyMapOutput struct{ *pulumi.OutputState }
   657  
   658  func (AmiCopyMapOutput) ElementType() reflect.Type {
   659  	return reflect.TypeOf((*map[string]*AmiCopy)(nil)).Elem()
   660  }
   661  
   662  func (o AmiCopyMapOutput) ToAmiCopyMapOutput() AmiCopyMapOutput {
   663  	return o
   664  }
   665  
   666  func (o AmiCopyMapOutput) ToAmiCopyMapOutputWithContext(ctx context.Context) AmiCopyMapOutput {
   667  	return o
   668  }
   669  
   670  func (o AmiCopyMapOutput) MapIndex(k pulumi.StringInput) AmiCopyOutput {
   671  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AmiCopy {
   672  		return vs[0].(map[string]*AmiCopy)[vs[1].(string)]
   673  	}).(AmiCopyOutput)
   674  }
   675  
   676  func init() {
   677  	pulumi.RegisterInputType(reflect.TypeOf((*AmiCopyInput)(nil)).Elem(), &AmiCopy{})
   678  	pulumi.RegisterInputType(reflect.TypeOf((*AmiCopyArrayInput)(nil)).Elem(), AmiCopyArray{})
   679  	pulumi.RegisterInputType(reflect.TypeOf((*AmiCopyMapInput)(nil)).Elem(), AmiCopyMap{})
   680  	pulumi.RegisterOutputType(AmiCopyOutput{})
   681  	pulumi.RegisterOutputType(AmiCopyArrayOutput{})
   682  	pulumi.RegisterOutputType(AmiCopyMapOutput{})
   683  }