github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/ec2/spotInstanceRequest.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  // Provides an EC2 Spot Instance Request resource. This allows instances to be
    15  // requested on the spot market.
    16  //
    17  // By default this provider creates Spot Instance Requests with a `persistent` type,
    18  // which means that for the duration of their lifetime, AWS will launch an
    19  // instance with the configured details if and when the spot market will accept
    20  // the requested price.
    21  //
    22  // On destruction, this provider will make an attempt to terminate the associated Spot
    23  // Instance if there is one present.
    24  //
    25  // Spot Instances requests with a `one-time` type will close the spot request
    26  // when the instance is terminated either by the request being below the current spot
    27  // price availability or by a user.
    28  //
    29  // > **NOTE:** Because their behavior depends on the live status of the spot
    30  // market, Spot Instance Requests have a unique lifecycle that makes them behave
    31  // differently than other resources. Most importantly: there is __no
    32  // guarantee__ that a Spot Instance exists to fulfill the request at any given
    33  // point in time. See the [AWS Spot Instance
    34  // documentation](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-spot-instances.html)
    35  // for more information.
    36  //
    37  // > **NOTE [AWS strongly discourages](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-best-practices.html#which-spot-request-method-to-use) the use of the legacy APIs called by this resource.
    38  // We recommend using the EC2 Instance resource with `instanceMarketOptions` instead.
    39  //
    40  // ## Example Usage
    41  //
    42  // <!--Start PulumiCodeChooser -->
    43  // ```go
    44  // package main
    45  //
    46  // import (
    47  //
    48  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
    49  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    50  //
    51  // )
    52  //
    53  //	func main() {
    54  //		pulumi.Run(func(ctx *pulumi.Context) error {
    55  //			// Request a spot instance at $0.03
    56  //			_, err := ec2.NewSpotInstanceRequest(ctx, "cheap_worker", &ec2.SpotInstanceRequestArgs{
    57  //				Ami:          pulumi.String("ami-1234"),
    58  //				SpotPrice:    pulumi.String("0.03"),
    59  //				InstanceType: pulumi.String("c4.xlarge"),
    60  //				Tags: pulumi.StringMap{
    61  //					"Name": pulumi.String("CheapWorker"),
    62  //				},
    63  //			})
    64  //			if err != nil {
    65  //				return err
    66  //			}
    67  //			return nil
    68  //		})
    69  //	}
    70  //
    71  // ```
    72  // <!--End PulumiCodeChooser -->
    73  type SpotInstanceRequest struct {
    74  	pulumi.CustomResourceState
    75  
    76  	// AMI to use for the instance. Required unless `launchTemplate` is specified and the Launch Template specifes an AMI. If an AMI is specified in the Launch Template, setting `ami` will override the AMI specified in the Launch Template.
    77  	Ami pulumi.StringOutput `pulumi:"ami"`
    78  	Arn pulumi.StringOutput `pulumi:"arn"`
    79  	// Whether to associate a public IP address with an instance in a VPC.
    80  	AssociatePublicIpAddress pulumi.BoolOutput `pulumi:"associatePublicIpAddress"`
    81  	// AZ to start the instance in.
    82  	AvailabilityZone pulumi.StringOutput `pulumi:"availabilityZone"`
    83  	// The required duration for the Spot instances, in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360).
    84  	// The duration period starts as soon as your Spot instance receives its instance ID. At the end of the duration period, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates.
    85  	// Note that you can't specify an Availability Zone group or a launch group if you specify a duration.
    86  	BlockDurationMinutes pulumi.IntPtrOutput `pulumi:"blockDurationMinutes"`
    87  	// Describes an instance's Capacity Reservation targeting option. See Capacity Reservation Specification below for more details.
    88  	//
    89  	// > **NOTE:** Changing `cpuCoreCount` and/or `cpuThreadsPerCore` will cause the resource to be destroyed and re-created.
    90  	CapacityReservationSpecification SpotInstanceRequestCapacityReservationSpecificationOutput `pulumi:"capacityReservationSpecification"`
    91  	// Sets the number of CPU cores for an instance. This option is only supported on creation of instance type that support CPU Options [CPU Cores and Threads Per CPU Core Per Instance Type](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html#cpu-options-supported-instances-values) - specifying this option for unsupported instance types will return an error from the EC2 API.
    92  	//
    93  	// Deprecated: use 'cpu_options' argument instead
    94  	CpuCoreCount pulumi.IntOutput `pulumi:"cpuCoreCount"`
    95  	// The CPU options for the instance. See CPU Options below for more details.
    96  	CpuOptions SpotInstanceRequestCpuOptionsOutput `pulumi:"cpuOptions"`
    97  	// If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See [Optimizing CPU Options](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html) for more information.
    98  	//
    99  	// Deprecated: use 'cpu_options' argument instead
   100  	CpuThreadsPerCore pulumi.IntOutput `pulumi:"cpuThreadsPerCore"`
   101  	// Configuration block for customizing the credit specification of the instance. See Credit Specification below for more details. This provider will only perform drift detection of its value when present in a configuration. Removing this configuration on existing instances will only stop managing it. It will not change the configuration back to the default for the instance type.
   102  	CreditSpecification SpotInstanceRequestCreditSpecificationPtrOutput `pulumi:"creditSpecification"`
   103  	// If true, enables [EC2 Instance Stop Protection](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Stop_Start.html#Using_StopProtection).
   104  	DisableApiStop pulumi.BoolOutput `pulumi:"disableApiStop"`
   105  	// If true, enables [EC2 Instance Termination Protection](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/terminating-instances.html#Using_ChangingDisableAPITermination).
   106  	DisableApiTermination pulumi.BoolOutput `pulumi:"disableApiTermination"`
   107  	// One or more configuration blocks with additional EBS block devices to attach to the instance. Block device configurations only apply on resource creation. See Block Devices below for details on attributes and drift detection. When accessing this as an attribute reference, it is a set of objects.
   108  	EbsBlockDevices SpotInstanceRequestEbsBlockDeviceArrayOutput `pulumi:"ebsBlockDevices"`
   109  	// If true, the launched EC2 instance will be EBS-optimized. Note that if this is not set on an instance type that is optimized by default then this will show as disabled but if the instance type is optimized by default then there is no need to set this and there is no effect to disabling it. See the [EBS Optimized section](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html) of the AWS User Guide for more information.
   110  	EbsOptimized pulumi.BoolOutput `pulumi:"ebsOptimized"`
   111  	// Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
   112  	EnclaveOptions SpotInstanceRequestEnclaveOptionsOutput `pulumi:"enclaveOptions"`
   113  	// One or more configuration blocks to customize Ephemeral (also known as "Instance Store") volumes on the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a set of objects.
   114  	EphemeralBlockDevices SpotInstanceRequestEphemeralBlockDeviceArrayOutput `pulumi:"ephemeralBlockDevices"`
   115  	// If true, wait for password data to become available and retrieve it. Useful for getting the administrator password for instances running Microsoft Windows. The password data is exported to the `passwordData` attribute. See [GetPasswordData](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetPasswordData.html) for more information.
   116  	GetPasswordData pulumi.BoolPtrOutput `pulumi:"getPasswordData"`
   117  	// If true, the launched EC2 instance will support hibernation.
   118  	Hibernation pulumi.BoolPtrOutput `pulumi:"hibernation"`
   119  	// ID of a dedicated host that the instance will be assigned to. Use when an instance is to be launched on a specific dedicated host.
   120  	HostId pulumi.StringOutput `pulumi:"hostId"`
   121  	// ARN of the host resource group in which to launch the instances. If you specify an ARN, omit the `tenancy` parameter or set it to `host`.
   122  	HostResourceGroupArn pulumi.StringOutput `pulumi:"hostResourceGroupArn"`
   123  	// IAM Instance Profile to launch the instance with. Specified as the name of the Instance Profile. Ensure your credentials have the correct permission to assign the instance profile according to the [EC2 documentation](http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2.html#roles-usingrole-ec2instance-permissions), notably `iam:PassRole`.
   124  	IamInstanceProfile pulumi.StringOutput `pulumi:"iamInstanceProfile"`
   125  	// Shutdown behavior for the instance. Amazon defaults this to `stop` for EBS-backed instances and `terminate` for instance-store instances. Cannot be set on instance-store instances. See [Shutdown Behavior](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/terminating-instances.html#Using_ChangingInstanceInitiatedShutdownBehavior) for more information.
   126  	InstanceInitiatedShutdownBehavior pulumi.StringOutput `pulumi:"instanceInitiatedShutdownBehavior"`
   127  	// Indicates Spot instance behavior when it is interrupted. Valid values are `terminate`, `stop`, or `hibernate`. Default value is `terminate`.
   128  	InstanceInterruptionBehavior pulumi.StringPtrOutput `pulumi:"instanceInterruptionBehavior"`
   129  	InstanceState                pulumi.StringOutput    `pulumi:"instanceState"`
   130  	// Instance type to use for the instance. Required unless `launchTemplate` is specified and the Launch Template specifies an instance type. If an instance type is specified in the Launch Template, setting `instanceType` will override the instance type specified in the Launch Template. Updates to this field will trigger a stop/start of the EC2 instance.
   131  	InstanceType pulumi.StringOutput `pulumi:"instanceType"`
   132  	// Number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet.
   133  	Ipv6AddressCount pulumi.IntOutput `pulumi:"ipv6AddressCount"`
   134  	// Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface
   135  	Ipv6Addresses pulumi.StringArrayOutput `pulumi:"ipv6Addresses"`
   136  	// Key name of the Key Pair to use for the instance; which can be managed using the `ec2.KeyPair` resource.
   137  	KeyName pulumi.StringOutput `pulumi:"keyName"`
   138  	// A launch group is a group of spot instances that launch together and terminate together.
   139  	// If left empty instances are launched and terminated individually.
   140  	LaunchGroup pulumi.StringPtrOutput `pulumi:"launchGroup"`
   141  	// Specifies a Launch Template to configure the instance. Parameters configured on this resource will override the corresponding parameters in the Launch Template. See Launch Template Specification below for more details.
   142  	LaunchTemplate SpotInstanceRequestLaunchTemplatePtrOutput `pulumi:"launchTemplate"`
   143  	// Maintenance and recovery options for the instance. See Maintenance Options below for more details.
   144  	MaintenanceOptions SpotInstanceRequestMaintenanceOptionsOutput `pulumi:"maintenanceOptions"`
   145  	// Customize the metadata options of the instance. See Metadata Options below for more details.
   146  	MetadataOptions SpotInstanceRequestMetadataOptionsOutput `pulumi:"metadataOptions"`
   147  	// If true, the launched EC2 instance will have detailed monitoring enabled. (Available since v0.6.0)
   148  	Monitoring pulumi.BoolOutput `pulumi:"monitoring"`
   149  	// Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
   150  	NetworkInterfaces SpotInstanceRequestNetworkInterfaceArrayOutput `pulumi:"networkInterfaces"`
   151  	OutpostArn        pulumi.StringOutput                            `pulumi:"outpostArn"`
   152  	PasswordData      pulumi.StringOutput                            `pulumi:"passwordData"`
   153  	// Placement Group to start the instance in.
   154  	PlacementGroup pulumi.StringOutput `pulumi:"placementGroup"`
   155  	// Number of the partition the instance is in. Valid only if the `ec2.PlacementGroup` resource's `strategy` argument is set to `"partition"`.
   156  	PlacementPartitionNumber  pulumi.IntOutput    `pulumi:"placementPartitionNumber"`
   157  	PrimaryNetworkInterfaceId pulumi.StringOutput `pulumi:"primaryNetworkInterfaceId"`
   158  	// The private DNS name assigned to the instance. Can only be
   159  	// used inside the Amazon EC2, and only available if you've enabled DNS hostnames
   160  	// for your VPC
   161  	PrivateDns pulumi.StringOutput `pulumi:"privateDns"`
   162  	// Options for the instance hostname. The default values are inherited from the subnet. See Private DNS Name Options below for more details.
   163  	PrivateDnsNameOptions SpotInstanceRequestPrivateDnsNameOptionsOutput `pulumi:"privateDnsNameOptions"`
   164  	// Private IP address to associate with the instance in a VPC.
   165  	PrivateIp pulumi.StringOutput `pulumi:"privateIp"`
   166  	// The public DNS name assigned to the instance. For EC2-VPC, this
   167  	// is only available if you've enabled DNS hostnames for your VPC
   168  	PublicDns pulumi.StringOutput `pulumi:"publicDns"`
   169  	// The public IP address assigned to the instance, if applicable.
   170  	PublicIp pulumi.StringOutput `pulumi:"publicIp"`
   171  	// Configuration block to customize details about the root block device of the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a list containing one object.
   172  	RootBlockDevice SpotInstanceRequestRootBlockDeviceOutput `pulumi:"rootBlockDevice"`
   173  	// List of secondary private IPv4 addresses to assign to the instance's primary network interface (eth0) in a VPC. Can only be assigned to the primary network interface (eth0) attached at instance creation, not a pre-existing network interface i.e., referenced in a `networkInterface` block. Refer to the [Elastic network interfaces documentation](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html#AvailableIpPerENI) to see the maximum number of private IP addresses allowed per instance type.
   174  	SecondaryPrivateIps pulumi.StringArrayOutput `pulumi:"secondaryPrivateIps"`
   175  	// List of security group names to associate with.
   176  	//
   177  	// > **NOTE:** If you are creating Instances in a VPC, use `vpcSecurityGroupIds` instead.
   178  	SecurityGroups pulumi.StringArrayOutput `pulumi:"securityGroups"`
   179  	// Controls if traffic is routed to the instance when the destination address does not match the instance. Used for NAT or VPNs. Defaults true.
   180  	SourceDestCheck pulumi.BoolPtrOutput `pulumi:"sourceDestCheck"`
   181  	// The current [bid
   182  	// status](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html)
   183  	// of the Spot Instance Request.
   184  	SpotBidStatus pulumi.StringOutput `pulumi:"spotBidStatus"`
   185  	// The Instance ID (if any) that is currently fulfilling
   186  	// the Spot Instance request.
   187  	SpotInstanceId pulumi.StringOutput `pulumi:"spotInstanceId"`
   188  	// The maximum price to request on the spot market.
   189  	SpotPrice pulumi.StringOutput `pulumi:"spotPrice"`
   190  	// The current [request
   191  	// state](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-requests.html#creating-spot-request-status)
   192  	// of the Spot Instance Request.
   193  	SpotRequestState pulumi.StringOutput `pulumi:"spotRequestState"`
   194  	// If set to `one-time`, after
   195  	// the instance is terminated, the spot request will be closed.
   196  	SpotType pulumi.StringPtrOutput `pulumi:"spotType"`
   197  	// VPC Subnet ID to launch in.
   198  	SubnetId pulumi.StringOutput `pulumi:"subnetId"`
   199  	// Map of tags to assign to the resource. Note that these tags apply to the instance and not block storage devices. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   200  	Tags pulumi.StringMapOutput `pulumi:"tags"`
   201  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   202  	//
   203  	// Deprecated: Please use `tags` instead.
   204  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
   205  	// Tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of `dedicated` runs on single-tenant hardware. The `host` tenancy is not supported for the import-instance command. Valid values are `default`, `dedicated`, and `host`.
   206  	Tenancy pulumi.StringOutput `pulumi:"tenancy"`
   207  	// User data to provide when launching the instance. Do not pass gzip-compressed data via this argument; see `userDataBase64` instead. Updates to this field will trigger a stop/start of the EC2 instance by default. If the `userDataReplaceOnChange` is set then updates to this field will trigger a destroy and recreate.
   208  	UserData pulumi.StringOutput `pulumi:"userData"`
   209  	// Can be used instead of `userData` to pass base64-encoded binary data directly. Use this instead of `userData` whenever the value is not a valid UTF-8 string. For example, gzip-encoded user data must be base64-encoded and passed via this argument to avoid corruption. Updates to this field will trigger a stop/start of the EC2 instance by default. If the `userDataReplaceOnChange` is set then updates to this field will trigger a destroy and recreate.
   210  	UserDataBase64 pulumi.StringOutput `pulumi:"userDataBase64"`
   211  	// When used in combination with `userData` or `userDataBase64` will trigger a destroy and recreate when set to `true`. Defaults to `false` if not set.
   212  	UserDataReplaceOnChange pulumi.BoolPtrOutput `pulumi:"userDataReplaceOnChange"`
   213  	// The start date and time of the request, in UTC [RFC3339](https://tools.ietf.org/html/rfc3339#section-5.8) format(for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.
   214  	ValidFrom pulumi.StringOutput `pulumi:"validFrom"`
   215  	// The end date and time of the request, in UTC [RFC3339](https://tools.ietf.org/html/rfc3339#section-5.8) format(for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new Spot instance requests are placed or enabled to fulfill the request. The default end date is 7 days from the current date.
   216  	ValidUntil pulumi.StringOutput `pulumi:"validUntil"`
   217  	// Map of tags to assign, at instance-creation time, to root and EBS volumes.
   218  	//
   219  	// > **NOTE:** Do not use `volumeTags` if you plan to manage block device tags outside the `ec2.Instance` configuration, such as using `tags` in an `ebs.Volume` resource attached via `ec2.VolumeAttachment`. Doing so will result in resource cycling and inconsistent behavior.
   220  	VolumeTags pulumi.StringMapOutput `pulumi:"volumeTags"`
   221  	// List of security group IDs to associate with.
   222  	VpcSecurityGroupIds pulumi.StringArrayOutput `pulumi:"vpcSecurityGroupIds"`
   223  	// If set, this provider will
   224  	// wait for the Spot Request to be fulfilled, and will throw an error if the
   225  	// timeout of 10m is reached.
   226  	WaitForFulfillment pulumi.BoolPtrOutput `pulumi:"waitForFulfillment"`
   227  }
   228  
   229  // NewSpotInstanceRequest registers a new resource with the given unique name, arguments, and options.
   230  func NewSpotInstanceRequest(ctx *pulumi.Context,
   231  	name string, args *SpotInstanceRequestArgs, opts ...pulumi.ResourceOption) (*SpotInstanceRequest, error) {
   232  	if args == nil {
   233  		args = &SpotInstanceRequestArgs{}
   234  	}
   235  
   236  	opts = internal.PkgResourceDefaultOpts(opts)
   237  	var resource SpotInstanceRequest
   238  	err := ctx.RegisterResource("aws:ec2/spotInstanceRequest:SpotInstanceRequest", name, args, &resource, opts...)
   239  	if err != nil {
   240  		return nil, err
   241  	}
   242  	return &resource, nil
   243  }
   244  
   245  // GetSpotInstanceRequest gets an existing SpotInstanceRequest resource's state with the given name, ID, and optional
   246  // state properties that are used to uniquely qualify the lookup (nil if not required).
   247  func GetSpotInstanceRequest(ctx *pulumi.Context,
   248  	name string, id pulumi.IDInput, state *SpotInstanceRequestState, opts ...pulumi.ResourceOption) (*SpotInstanceRequest, error) {
   249  	var resource SpotInstanceRequest
   250  	err := ctx.ReadResource("aws:ec2/spotInstanceRequest:SpotInstanceRequest", name, id, state, &resource, opts...)
   251  	if err != nil {
   252  		return nil, err
   253  	}
   254  	return &resource, nil
   255  }
   256  
   257  // Input properties used for looking up and filtering SpotInstanceRequest resources.
   258  type spotInstanceRequestState struct {
   259  	// AMI to use for the instance. Required unless `launchTemplate` is specified and the Launch Template specifes an AMI. If an AMI is specified in the Launch Template, setting `ami` will override the AMI specified in the Launch Template.
   260  	Ami *string `pulumi:"ami"`
   261  	Arn *string `pulumi:"arn"`
   262  	// Whether to associate a public IP address with an instance in a VPC.
   263  	AssociatePublicIpAddress *bool `pulumi:"associatePublicIpAddress"`
   264  	// AZ to start the instance in.
   265  	AvailabilityZone *string `pulumi:"availabilityZone"`
   266  	// The required duration for the Spot instances, in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360).
   267  	// The duration period starts as soon as your Spot instance receives its instance ID. At the end of the duration period, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates.
   268  	// Note that you can't specify an Availability Zone group or a launch group if you specify a duration.
   269  	BlockDurationMinutes *int `pulumi:"blockDurationMinutes"`
   270  	// Describes an instance's Capacity Reservation targeting option. See Capacity Reservation Specification below for more details.
   271  	//
   272  	// > **NOTE:** Changing `cpuCoreCount` and/or `cpuThreadsPerCore` will cause the resource to be destroyed and re-created.
   273  	CapacityReservationSpecification *SpotInstanceRequestCapacityReservationSpecification `pulumi:"capacityReservationSpecification"`
   274  	// Sets the number of CPU cores for an instance. This option is only supported on creation of instance type that support CPU Options [CPU Cores and Threads Per CPU Core Per Instance Type](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html#cpu-options-supported-instances-values) - specifying this option for unsupported instance types will return an error from the EC2 API.
   275  	//
   276  	// Deprecated: use 'cpu_options' argument instead
   277  	CpuCoreCount *int `pulumi:"cpuCoreCount"`
   278  	// The CPU options for the instance. See CPU Options below for more details.
   279  	CpuOptions *SpotInstanceRequestCpuOptions `pulumi:"cpuOptions"`
   280  	// If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See [Optimizing CPU Options](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html) for more information.
   281  	//
   282  	// Deprecated: use 'cpu_options' argument instead
   283  	CpuThreadsPerCore *int `pulumi:"cpuThreadsPerCore"`
   284  	// Configuration block for customizing the credit specification of the instance. See Credit Specification below for more details. This provider will only perform drift detection of its value when present in a configuration. Removing this configuration on existing instances will only stop managing it. It will not change the configuration back to the default for the instance type.
   285  	CreditSpecification *SpotInstanceRequestCreditSpecification `pulumi:"creditSpecification"`
   286  	// If true, enables [EC2 Instance Stop Protection](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Stop_Start.html#Using_StopProtection).
   287  	DisableApiStop *bool `pulumi:"disableApiStop"`
   288  	// If true, enables [EC2 Instance Termination Protection](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/terminating-instances.html#Using_ChangingDisableAPITermination).
   289  	DisableApiTermination *bool `pulumi:"disableApiTermination"`
   290  	// One or more configuration blocks with additional EBS block devices to attach to the instance. Block device configurations only apply on resource creation. See Block Devices below for details on attributes and drift detection. When accessing this as an attribute reference, it is a set of objects.
   291  	EbsBlockDevices []SpotInstanceRequestEbsBlockDevice `pulumi:"ebsBlockDevices"`
   292  	// If true, the launched EC2 instance will be EBS-optimized. Note that if this is not set on an instance type that is optimized by default then this will show as disabled but if the instance type is optimized by default then there is no need to set this and there is no effect to disabling it. See the [EBS Optimized section](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html) of the AWS User Guide for more information.
   293  	EbsOptimized *bool `pulumi:"ebsOptimized"`
   294  	// Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
   295  	EnclaveOptions *SpotInstanceRequestEnclaveOptions `pulumi:"enclaveOptions"`
   296  	// One or more configuration blocks to customize Ephemeral (also known as "Instance Store") volumes on the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a set of objects.
   297  	EphemeralBlockDevices []SpotInstanceRequestEphemeralBlockDevice `pulumi:"ephemeralBlockDevices"`
   298  	// If true, wait for password data to become available and retrieve it. Useful for getting the administrator password for instances running Microsoft Windows. The password data is exported to the `passwordData` attribute. See [GetPasswordData](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetPasswordData.html) for more information.
   299  	GetPasswordData *bool `pulumi:"getPasswordData"`
   300  	// If true, the launched EC2 instance will support hibernation.
   301  	Hibernation *bool `pulumi:"hibernation"`
   302  	// ID of a dedicated host that the instance will be assigned to. Use when an instance is to be launched on a specific dedicated host.
   303  	HostId *string `pulumi:"hostId"`
   304  	// ARN of the host resource group in which to launch the instances. If you specify an ARN, omit the `tenancy` parameter or set it to `host`.
   305  	HostResourceGroupArn *string `pulumi:"hostResourceGroupArn"`
   306  	// IAM Instance Profile to launch the instance with. Specified as the name of the Instance Profile. Ensure your credentials have the correct permission to assign the instance profile according to the [EC2 documentation](http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2.html#roles-usingrole-ec2instance-permissions), notably `iam:PassRole`.
   307  	IamInstanceProfile *string `pulumi:"iamInstanceProfile"`
   308  	// Shutdown behavior for the instance. Amazon defaults this to `stop` for EBS-backed instances and `terminate` for instance-store instances. Cannot be set on instance-store instances. See [Shutdown Behavior](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/terminating-instances.html#Using_ChangingInstanceInitiatedShutdownBehavior) for more information.
   309  	InstanceInitiatedShutdownBehavior *string `pulumi:"instanceInitiatedShutdownBehavior"`
   310  	// Indicates Spot instance behavior when it is interrupted. Valid values are `terminate`, `stop`, or `hibernate`. Default value is `terminate`.
   311  	InstanceInterruptionBehavior *string `pulumi:"instanceInterruptionBehavior"`
   312  	InstanceState                *string `pulumi:"instanceState"`
   313  	// Instance type to use for the instance. Required unless `launchTemplate` is specified and the Launch Template specifies an instance type. If an instance type is specified in the Launch Template, setting `instanceType` will override the instance type specified in the Launch Template. Updates to this field will trigger a stop/start of the EC2 instance.
   314  	InstanceType *string `pulumi:"instanceType"`
   315  	// Number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet.
   316  	Ipv6AddressCount *int `pulumi:"ipv6AddressCount"`
   317  	// Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface
   318  	Ipv6Addresses []string `pulumi:"ipv6Addresses"`
   319  	// Key name of the Key Pair to use for the instance; which can be managed using the `ec2.KeyPair` resource.
   320  	KeyName *string `pulumi:"keyName"`
   321  	// A launch group is a group of spot instances that launch together and terminate together.
   322  	// If left empty instances are launched and terminated individually.
   323  	LaunchGroup *string `pulumi:"launchGroup"`
   324  	// Specifies a Launch Template to configure the instance. Parameters configured on this resource will override the corresponding parameters in the Launch Template. See Launch Template Specification below for more details.
   325  	LaunchTemplate *SpotInstanceRequestLaunchTemplate `pulumi:"launchTemplate"`
   326  	// Maintenance and recovery options for the instance. See Maintenance Options below for more details.
   327  	MaintenanceOptions *SpotInstanceRequestMaintenanceOptions `pulumi:"maintenanceOptions"`
   328  	// Customize the metadata options of the instance. See Metadata Options below for more details.
   329  	MetadataOptions *SpotInstanceRequestMetadataOptions `pulumi:"metadataOptions"`
   330  	// If true, the launched EC2 instance will have detailed monitoring enabled. (Available since v0.6.0)
   331  	Monitoring *bool `pulumi:"monitoring"`
   332  	// Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
   333  	NetworkInterfaces []SpotInstanceRequestNetworkInterface `pulumi:"networkInterfaces"`
   334  	OutpostArn        *string                               `pulumi:"outpostArn"`
   335  	PasswordData      *string                               `pulumi:"passwordData"`
   336  	// Placement Group to start the instance in.
   337  	PlacementGroup *string `pulumi:"placementGroup"`
   338  	// Number of the partition the instance is in. Valid only if the `ec2.PlacementGroup` resource's `strategy` argument is set to `"partition"`.
   339  	PlacementPartitionNumber  *int    `pulumi:"placementPartitionNumber"`
   340  	PrimaryNetworkInterfaceId *string `pulumi:"primaryNetworkInterfaceId"`
   341  	// The private DNS name assigned to the instance. Can only be
   342  	// used inside the Amazon EC2, and only available if you've enabled DNS hostnames
   343  	// for your VPC
   344  	PrivateDns *string `pulumi:"privateDns"`
   345  	// Options for the instance hostname. The default values are inherited from the subnet. See Private DNS Name Options below for more details.
   346  	PrivateDnsNameOptions *SpotInstanceRequestPrivateDnsNameOptions `pulumi:"privateDnsNameOptions"`
   347  	// Private IP address to associate with the instance in a VPC.
   348  	PrivateIp *string `pulumi:"privateIp"`
   349  	// The public DNS name assigned to the instance. For EC2-VPC, this
   350  	// is only available if you've enabled DNS hostnames for your VPC
   351  	PublicDns *string `pulumi:"publicDns"`
   352  	// The public IP address assigned to the instance, if applicable.
   353  	PublicIp *string `pulumi:"publicIp"`
   354  	// Configuration block to customize details about the root block device of the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a list containing one object.
   355  	RootBlockDevice *SpotInstanceRequestRootBlockDevice `pulumi:"rootBlockDevice"`
   356  	// List of secondary private IPv4 addresses to assign to the instance's primary network interface (eth0) in a VPC. Can only be assigned to the primary network interface (eth0) attached at instance creation, not a pre-existing network interface i.e., referenced in a `networkInterface` block. Refer to the [Elastic network interfaces documentation](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html#AvailableIpPerENI) to see the maximum number of private IP addresses allowed per instance type.
   357  	SecondaryPrivateIps []string `pulumi:"secondaryPrivateIps"`
   358  	// List of security group names to associate with.
   359  	//
   360  	// > **NOTE:** If you are creating Instances in a VPC, use `vpcSecurityGroupIds` instead.
   361  	SecurityGroups []string `pulumi:"securityGroups"`
   362  	// Controls if traffic is routed to the instance when the destination address does not match the instance. Used for NAT or VPNs. Defaults true.
   363  	SourceDestCheck *bool `pulumi:"sourceDestCheck"`
   364  	// The current [bid
   365  	// status](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html)
   366  	// of the Spot Instance Request.
   367  	SpotBidStatus *string `pulumi:"spotBidStatus"`
   368  	// The Instance ID (if any) that is currently fulfilling
   369  	// the Spot Instance request.
   370  	SpotInstanceId *string `pulumi:"spotInstanceId"`
   371  	// The maximum price to request on the spot market.
   372  	SpotPrice *string `pulumi:"spotPrice"`
   373  	// The current [request
   374  	// state](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-requests.html#creating-spot-request-status)
   375  	// of the Spot Instance Request.
   376  	SpotRequestState *string `pulumi:"spotRequestState"`
   377  	// If set to `one-time`, after
   378  	// the instance is terminated, the spot request will be closed.
   379  	SpotType *string `pulumi:"spotType"`
   380  	// VPC Subnet ID to launch in.
   381  	SubnetId *string `pulumi:"subnetId"`
   382  	// Map of tags to assign to the resource. Note that these tags apply to the instance and not block storage devices. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   383  	Tags map[string]string `pulumi:"tags"`
   384  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   385  	//
   386  	// Deprecated: Please use `tags` instead.
   387  	TagsAll map[string]string `pulumi:"tagsAll"`
   388  	// Tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of `dedicated` runs on single-tenant hardware. The `host` tenancy is not supported for the import-instance command. Valid values are `default`, `dedicated`, and `host`.
   389  	Tenancy *string `pulumi:"tenancy"`
   390  	// User data to provide when launching the instance. Do not pass gzip-compressed data via this argument; see `userDataBase64` instead. Updates to this field will trigger a stop/start of the EC2 instance by default. If the `userDataReplaceOnChange` is set then updates to this field will trigger a destroy and recreate.
   391  	UserData *string `pulumi:"userData"`
   392  	// Can be used instead of `userData` to pass base64-encoded binary data directly. Use this instead of `userData` whenever the value is not a valid UTF-8 string. For example, gzip-encoded user data must be base64-encoded and passed via this argument to avoid corruption. Updates to this field will trigger a stop/start of the EC2 instance by default. If the `userDataReplaceOnChange` is set then updates to this field will trigger a destroy and recreate.
   393  	UserDataBase64 *string `pulumi:"userDataBase64"`
   394  	// When used in combination with `userData` or `userDataBase64` will trigger a destroy and recreate when set to `true`. Defaults to `false` if not set.
   395  	UserDataReplaceOnChange *bool `pulumi:"userDataReplaceOnChange"`
   396  	// The start date and time of the request, in UTC [RFC3339](https://tools.ietf.org/html/rfc3339#section-5.8) format(for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.
   397  	ValidFrom *string `pulumi:"validFrom"`
   398  	// The end date and time of the request, in UTC [RFC3339](https://tools.ietf.org/html/rfc3339#section-5.8) format(for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new Spot instance requests are placed or enabled to fulfill the request. The default end date is 7 days from the current date.
   399  	ValidUntil *string `pulumi:"validUntil"`
   400  	// Map of tags to assign, at instance-creation time, to root and EBS volumes.
   401  	//
   402  	// > **NOTE:** Do not use `volumeTags` if you plan to manage block device tags outside the `ec2.Instance` configuration, such as using `tags` in an `ebs.Volume` resource attached via `ec2.VolumeAttachment`. Doing so will result in resource cycling and inconsistent behavior.
   403  	VolumeTags map[string]string `pulumi:"volumeTags"`
   404  	// List of security group IDs to associate with.
   405  	VpcSecurityGroupIds []string `pulumi:"vpcSecurityGroupIds"`
   406  	// If set, this provider will
   407  	// wait for the Spot Request to be fulfilled, and will throw an error if the
   408  	// timeout of 10m is reached.
   409  	WaitForFulfillment *bool `pulumi:"waitForFulfillment"`
   410  }
   411  
   412  type SpotInstanceRequestState struct {
   413  	// AMI to use for the instance. Required unless `launchTemplate` is specified and the Launch Template specifes an AMI. If an AMI is specified in the Launch Template, setting `ami` will override the AMI specified in the Launch Template.
   414  	Ami pulumi.StringPtrInput
   415  	Arn pulumi.StringPtrInput
   416  	// Whether to associate a public IP address with an instance in a VPC.
   417  	AssociatePublicIpAddress pulumi.BoolPtrInput
   418  	// AZ to start the instance in.
   419  	AvailabilityZone pulumi.StringPtrInput
   420  	// The required duration for the Spot instances, in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360).
   421  	// The duration period starts as soon as your Spot instance receives its instance ID. At the end of the duration period, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates.
   422  	// Note that you can't specify an Availability Zone group or a launch group if you specify a duration.
   423  	BlockDurationMinutes pulumi.IntPtrInput
   424  	// Describes an instance's Capacity Reservation targeting option. See Capacity Reservation Specification below for more details.
   425  	//
   426  	// > **NOTE:** Changing `cpuCoreCount` and/or `cpuThreadsPerCore` will cause the resource to be destroyed and re-created.
   427  	CapacityReservationSpecification SpotInstanceRequestCapacityReservationSpecificationPtrInput
   428  	// Sets the number of CPU cores for an instance. This option is only supported on creation of instance type that support CPU Options [CPU Cores and Threads Per CPU Core Per Instance Type](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html#cpu-options-supported-instances-values) - specifying this option for unsupported instance types will return an error from the EC2 API.
   429  	//
   430  	// Deprecated: use 'cpu_options' argument instead
   431  	CpuCoreCount pulumi.IntPtrInput
   432  	// The CPU options for the instance. See CPU Options below for more details.
   433  	CpuOptions SpotInstanceRequestCpuOptionsPtrInput
   434  	// If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See [Optimizing CPU Options](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html) for more information.
   435  	//
   436  	// Deprecated: use 'cpu_options' argument instead
   437  	CpuThreadsPerCore pulumi.IntPtrInput
   438  	// Configuration block for customizing the credit specification of the instance. See Credit Specification below for more details. This provider will only perform drift detection of its value when present in a configuration. Removing this configuration on existing instances will only stop managing it. It will not change the configuration back to the default for the instance type.
   439  	CreditSpecification SpotInstanceRequestCreditSpecificationPtrInput
   440  	// If true, enables [EC2 Instance Stop Protection](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Stop_Start.html#Using_StopProtection).
   441  	DisableApiStop pulumi.BoolPtrInput
   442  	// If true, enables [EC2 Instance Termination Protection](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/terminating-instances.html#Using_ChangingDisableAPITermination).
   443  	DisableApiTermination pulumi.BoolPtrInput
   444  	// One or more configuration blocks with additional EBS block devices to attach to the instance. Block device configurations only apply on resource creation. See Block Devices below for details on attributes and drift detection. When accessing this as an attribute reference, it is a set of objects.
   445  	EbsBlockDevices SpotInstanceRequestEbsBlockDeviceArrayInput
   446  	// If true, the launched EC2 instance will be EBS-optimized. Note that if this is not set on an instance type that is optimized by default then this will show as disabled but if the instance type is optimized by default then there is no need to set this and there is no effect to disabling it. See the [EBS Optimized section](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html) of the AWS User Guide for more information.
   447  	EbsOptimized pulumi.BoolPtrInput
   448  	// Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
   449  	EnclaveOptions SpotInstanceRequestEnclaveOptionsPtrInput
   450  	// One or more configuration blocks to customize Ephemeral (also known as "Instance Store") volumes on the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a set of objects.
   451  	EphemeralBlockDevices SpotInstanceRequestEphemeralBlockDeviceArrayInput
   452  	// If true, wait for password data to become available and retrieve it. Useful for getting the administrator password for instances running Microsoft Windows. The password data is exported to the `passwordData` attribute. See [GetPasswordData](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetPasswordData.html) for more information.
   453  	GetPasswordData pulumi.BoolPtrInput
   454  	// If true, the launched EC2 instance will support hibernation.
   455  	Hibernation pulumi.BoolPtrInput
   456  	// ID of a dedicated host that the instance will be assigned to. Use when an instance is to be launched on a specific dedicated host.
   457  	HostId pulumi.StringPtrInput
   458  	// ARN of the host resource group in which to launch the instances. If you specify an ARN, omit the `tenancy` parameter or set it to `host`.
   459  	HostResourceGroupArn pulumi.StringPtrInput
   460  	// IAM Instance Profile to launch the instance with. Specified as the name of the Instance Profile. Ensure your credentials have the correct permission to assign the instance profile according to the [EC2 documentation](http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2.html#roles-usingrole-ec2instance-permissions), notably `iam:PassRole`.
   461  	IamInstanceProfile pulumi.StringPtrInput
   462  	// Shutdown behavior for the instance. Amazon defaults this to `stop` for EBS-backed instances and `terminate` for instance-store instances. Cannot be set on instance-store instances. See [Shutdown Behavior](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/terminating-instances.html#Using_ChangingInstanceInitiatedShutdownBehavior) for more information.
   463  	InstanceInitiatedShutdownBehavior pulumi.StringPtrInput
   464  	// Indicates Spot instance behavior when it is interrupted. Valid values are `terminate`, `stop`, or `hibernate`. Default value is `terminate`.
   465  	InstanceInterruptionBehavior pulumi.StringPtrInput
   466  	InstanceState                pulumi.StringPtrInput
   467  	// Instance type to use for the instance. Required unless `launchTemplate` is specified and the Launch Template specifies an instance type. If an instance type is specified in the Launch Template, setting `instanceType` will override the instance type specified in the Launch Template. Updates to this field will trigger a stop/start of the EC2 instance.
   468  	InstanceType pulumi.StringPtrInput
   469  	// Number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet.
   470  	Ipv6AddressCount pulumi.IntPtrInput
   471  	// Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface
   472  	Ipv6Addresses pulumi.StringArrayInput
   473  	// Key name of the Key Pair to use for the instance; which can be managed using the `ec2.KeyPair` resource.
   474  	KeyName pulumi.StringPtrInput
   475  	// A launch group is a group of spot instances that launch together and terminate together.
   476  	// If left empty instances are launched and terminated individually.
   477  	LaunchGroup pulumi.StringPtrInput
   478  	// Specifies a Launch Template to configure the instance. Parameters configured on this resource will override the corresponding parameters in the Launch Template. See Launch Template Specification below for more details.
   479  	LaunchTemplate SpotInstanceRequestLaunchTemplatePtrInput
   480  	// Maintenance and recovery options for the instance. See Maintenance Options below for more details.
   481  	MaintenanceOptions SpotInstanceRequestMaintenanceOptionsPtrInput
   482  	// Customize the metadata options of the instance. See Metadata Options below for more details.
   483  	MetadataOptions SpotInstanceRequestMetadataOptionsPtrInput
   484  	// If true, the launched EC2 instance will have detailed monitoring enabled. (Available since v0.6.0)
   485  	Monitoring pulumi.BoolPtrInput
   486  	// Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
   487  	NetworkInterfaces SpotInstanceRequestNetworkInterfaceArrayInput
   488  	OutpostArn        pulumi.StringPtrInput
   489  	PasswordData      pulumi.StringPtrInput
   490  	// Placement Group to start the instance in.
   491  	PlacementGroup pulumi.StringPtrInput
   492  	// Number of the partition the instance is in. Valid only if the `ec2.PlacementGroup` resource's `strategy` argument is set to `"partition"`.
   493  	PlacementPartitionNumber  pulumi.IntPtrInput
   494  	PrimaryNetworkInterfaceId pulumi.StringPtrInput
   495  	// The private DNS name assigned to the instance. Can only be
   496  	// used inside the Amazon EC2, and only available if you've enabled DNS hostnames
   497  	// for your VPC
   498  	PrivateDns pulumi.StringPtrInput
   499  	// Options for the instance hostname. The default values are inherited from the subnet. See Private DNS Name Options below for more details.
   500  	PrivateDnsNameOptions SpotInstanceRequestPrivateDnsNameOptionsPtrInput
   501  	// Private IP address to associate with the instance in a VPC.
   502  	PrivateIp pulumi.StringPtrInput
   503  	// The public DNS name assigned to the instance. For EC2-VPC, this
   504  	// is only available if you've enabled DNS hostnames for your VPC
   505  	PublicDns pulumi.StringPtrInput
   506  	// The public IP address assigned to the instance, if applicable.
   507  	PublicIp pulumi.StringPtrInput
   508  	// Configuration block to customize details about the root block device of the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a list containing one object.
   509  	RootBlockDevice SpotInstanceRequestRootBlockDevicePtrInput
   510  	// List of secondary private IPv4 addresses to assign to the instance's primary network interface (eth0) in a VPC. Can only be assigned to the primary network interface (eth0) attached at instance creation, not a pre-existing network interface i.e., referenced in a `networkInterface` block. Refer to the [Elastic network interfaces documentation](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html#AvailableIpPerENI) to see the maximum number of private IP addresses allowed per instance type.
   511  	SecondaryPrivateIps pulumi.StringArrayInput
   512  	// List of security group names to associate with.
   513  	//
   514  	// > **NOTE:** If you are creating Instances in a VPC, use `vpcSecurityGroupIds` instead.
   515  	SecurityGroups pulumi.StringArrayInput
   516  	// Controls if traffic is routed to the instance when the destination address does not match the instance. Used for NAT or VPNs. Defaults true.
   517  	SourceDestCheck pulumi.BoolPtrInput
   518  	// The current [bid
   519  	// status](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html)
   520  	// of the Spot Instance Request.
   521  	SpotBidStatus pulumi.StringPtrInput
   522  	// The Instance ID (if any) that is currently fulfilling
   523  	// the Spot Instance request.
   524  	SpotInstanceId pulumi.StringPtrInput
   525  	// The maximum price to request on the spot market.
   526  	SpotPrice pulumi.StringPtrInput
   527  	// The current [request
   528  	// state](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-requests.html#creating-spot-request-status)
   529  	// of the Spot Instance Request.
   530  	SpotRequestState pulumi.StringPtrInput
   531  	// If set to `one-time`, after
   532  	// the instance is terminated, the spot request will be closed.
   533  	SpotType pulumi.StringPtrInput
   534  	// VPC Subnet ID to launch in.
   535  	SubnetId pulumi.StringPtrInput
   536  	// Map of tags to assign to the resource. Note that these tags apply to the instance and not block storage devices. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   537  	Tags pulumi.StringMapInput
   538  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   539  	//
   540  	// Deprecated: Please use `tags` instead.
   541  	TagsAll pulumi.StringMapInput
   542  	// Tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of `dedicated` runs on single-tenant hardware. The `host` tenancy is not supported for the import-instance command. Valid values are `default`, `dedicated`, and `host`.
   543  	Tenancy pulumi.StringPtrInput
   544  	// User data to provide when launching the instance. Do not pass gzip-compressed data via this argument; see `userDataBase64` instead. Updates to this field will trigger a stop/start of the EC2 instance by default. If the `userDataReplaceOnChange` is set then updates to this field will trigger a destroy and recreate.
   545  	UserData pulumi.StringPtrInput
   546  	// Can be used instead of `userData` to pass base64-encoded binary data directly. Use this instead of `userData` whenever the value is not a valid UTF-8 string. For example, gzip-encoded user data must be base64-encoded and passed via this argument to avoid corruption. Updates to this field will trigger a stop/start of the EC2 instance by default. If the `userDataReplaceOnChange` is set then updates to this field will trigger a destroy and recreate.
   547  	UserDataBase64 pulumi.StringPtrInput
   548  	// When used in combination with `userData` or `userDataBase64` will trigger a destroy and recreate when set to `true`. Defaults to `false` if not set.
   549  	UserDataReplaceOnChange pulumi.BoolPtrInput
   550  	// The start date and time of the request, in UTC [RFC3339](https://tools.ietf.org/html/rfc3339#section-5.8) format(for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.
   551  	ValidFrom pulumi.StringPtrInput
   552  	// The end date and time of the request, in UTC [RFC3339](https://tools.ietf.org/html/rfc3339#section-5.8) format(for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new Spot instance requests are placed or enabled to fulfill the request. The default end date is 7 days from the current date.
   553  	ValidUntil pulumi.StringPtrInput
   554  	// Map of tags to assign, at instance-creation time, to root and EBS volumes.
   555  	//
   556  	// > **NOTE:** Do not use `volumeTags` if you plan to manage block device tags outside the `ec2.Instance` configuration, such as using `tags` in an `ebs.Volume` resource attached via `ec2.VolumeAttachment`. Doing so will result in resource cycling and inconsistent behavior.
   557  	VolumeTags pulumi.StringMapInput
   558  	// List of security group IDs to associate with.
   559  	VpcSecurityGroupIds pulumi.StringArrayInput
   560  	// If set, this provider will
   561  	// wait for the Spot Request to be fulfilled, and will throw an error if the
   562  	// timeout of 10m is reached.
   563  	WaitForFulfillment pulumi.BoolPtrInput
   564  }
   565  
   566  func (SpotInstanceRequestState) ElementType() reflect.Type {
   567  	return reflect.TypeOf((*spotInstanceRequestState)(nil)).Elem()
   568  }
   569  
   570  type spotInstanceRequestArgs struct {
   571  	// AMI to use for the instance. Required unless `launchTemplate` is specified and the Launch Template specifes an AMI. If an AMI is specified in the Launch Template, setting `ami` will override the AMI specified in the Launch Template.
   572  	Ami *string `pulumi:"ami"`
   573  	// Whether to associate a public IP address with an instance in a VPC.
   574  	AssociatePublicIpAddress *bool `pulumi:"associatePublicIpAddress"`
   575  	// AZ to start the instance in.
   576  	AvailabilityZone *string `pulumi:"availabilityZone"`
   577  	// The required duration for the Spot instances, in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360).
   578  	// The duration period starts as soon as your Spot instance receives its instance ID. At the end of the duration period, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates.
   579  	// Note that you can't specify an Availability Zone group or a launch group if you specify a duration.
   580  	BlockDurationMinutes *int `pulumi:"blockDurationMinutes"`
   581  	// Describes an instance's Capacity Reservation targeting option. See Capacity Reservation Specification below for more details.
   582  	//
   583  	// > **NOTE:** Changing `cpuCoreCount` and/or `cpuThreadsPerCore` will cause the resource to be destroyed and re-created.
   584  	CapacityReservationSpecification *SpotInstanceRequestCapacityReservationSpecification `pulumi:"capacityReservationSpecification"`
   585  	// Sets the number of CPU cores for an instance. This option is only supported on creation of instance type that support CPU Options [CPU Cores and Threads Per CPU Core Per Instance Type](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html#cpu-options-supported-instances-values) - specifying this option for unsupported instance types will return an error from the EC2 API.
   586  	//
   587  	// Deprecated: use 'cpu_options' argument instead
   588  	CpuCoreCount *int `pulumi:"cpuCoreCount"`
   589  	// The CPU options for the instance. See CPU Options below for more details.
   590  	CpuOptions *SpotInstanceRequestCpuOptions `pulumi:"cpuOptions"`
   591  	// If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See [Optimizing CPU Options](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html) for more information.
   592  	//
   593  	// Deprecated: use 'cpu_options' argument instead
   594  	CpuThreadsPerCore *int `pulumi:"cpuThreadsPerCore"`
   595  	// Configuration block for customizing the credit specification of the instance. See Credit Specification below for more details. This provider will only perform drift detection of its value when present in a configuration. Removing this configuration on existing instances will only stop managing it. It will not change the configuration back to the default for the instance type.
   596  	CreditSpecification *SpotInstanceRequestCreditSpecification `pulumi:"creditSpecification"`
   597  	// If true, enables [EC2 Instance Stop Protection](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Stop_Start.html#Using_StopProtection).
   598  	DisableApiStop *bool `pulumi:"disableApiStop"`
   599  	// If true, enables [EC2 Instance Termination Protection](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/terminating-instances.html#Using_ChangingDisableAPITermination).
   600  	DisableApiTermination *bool `pulumi:"disableApiTermination"`
   601  	// One or more configuration blocks with additional EBS block devices to attach to the instance. Block device configurations only apply on resource creation. See Block Devices below for details on attributes and drift detection. When accessing this as an attribute reference, it is a set of objects.
   602  	EbsBlockDevices []SpotInstanceRequestEbsBlockDevice `pulumi:"ebsBlockDevices"`
   603  	// If true, the launched EC2 instance will be EBS-optimized. Note that if this is not set on an instance type that is optimized by default then this will show as disabled but if the instance type is optimized by default then there is no need to set this and there is no effect to disabling it. See the [EBS Optimized section](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html) of the AWS User Guide for more information.
   604  	EbsOptimized *bool `pulumi:"ebsOptimized"`
   605  	// Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
   606  	EnclaveOptions *SpotInstanceRequestEnclaveOptions `pulumi:"enclaveOptions"`
   607  	// One or more configuration blocks to customize Ephemeral (also known as "Instance Store") volumes on the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a set of objects.
   608  	EphemeralBlockDevices []SpotInstanceRequestEphemeralBlockDevice `pulumi:"ephemeralBlockDevices"`
   609  	// If true, wait for password data to become available and retrieve it. Useful for getting the administrator password for instances running Microsoft Windows. The password data is exported to the `passwordData` attribute. See [GetPasswordData](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetPasswordData.html) for more information.
   610  	GetPasswordData *bool `pulumi:"getPasswordData"`
   611  	// If true, the launched EC2 instance will support hibernation.
   612  	Hibernation *bool `pulumi:"hibernation"`
   613  	// ID of a dedicated host that the instance will be assigned to. Use when an instance is to be launched on a specific dedicated host.
   614  	HostId *string `pulumi:"hostId"`
   615  	// ARN of the host resource group in which to launch the instances. If you specify an ARN, omit the `tenancy` parameter or set it to `host`.
   616  	HostResourceGroupArn *string `pulumi:"hostResourceGroupArn"`
   617  	// IAM Instance Profile to launch the instance with. Specified as the name of the Instance Profile. Ensure your credentials have the correct permission to assign the instance profile according to the [EC2 documentation](http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2.html#roles-usingrole-ec2instance-permissions), notably `iam:PassRole`.
   618  	IamInstanceProfile *string `pulumi:"iamInstanceProfile"`
   619  	// Shutdown behavior for the instance. Amazon defaults this to `stop` for EBS-backed instances and `terminate` for instance-store instances. Cannot be set on instance-store instances. See [Shutdown Behavior](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/terminating-instances.html#Using_ChangingInstanceInitiatedShutdownBehavior) for more information.
   620  	InstanceInitiatedShutdownBehavior *string `pulumi:"instanceInitiatedShutdownBehavior"`
   621  	// Indicates Spot instance behavior when it is interrupted. Valid values are `terminate`, `stop`, or `hibernate`. Default value is `terminate`.
   622  	InstanceInterruptionBehavior *string `pulumi:"instanceInterruptionBehavior"`
   623  	// Instance type to use for the instance. Required unless `launchTemplate` is specified and the Launch Template specifies an instance type. If an instance type is specified in the Launch Template, setting `instanceType` will override the instance type specified in the Launch Template. Updates to this field will trigger a stop/start of the EC2 instance.
   624  	InstanceType *string `pulumi:"instanceType"`
   625  	// Number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet.
   626  	Ipv6AddressCount *int `pulumi:"ipv6AddressCount"`
   627  	// Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface
   628  	Ipv6Addresses []string `pulumi:"ipv6Addresses"`
   629  	// Key name of the Key Pair to use for the instance; which can be managed using the `ec2.KeyPair` resource.
   630  	KeyName *string `pulumi:"keyName"`
   631  	// A launch group is a group of spot instances that launch together and terminate together.
   632  	// If left empty instances are launched and terminated individually.
   633  	LaunchGroup *string `pulumi:"launchGroup"`
   634  	// Specifies a Launch Template to configure the instance. Parameters configured on this resource will override the corresponding parameters in the Launch Template. See Launch Template Specification below for more details.
   635  	LaunchTemplate *SpotInstanceRequestLaunchTemplate `pulumi:"launchTemplate"`
   636  	// Maintenance and recovery options for the instance. See Maintenance Options below for more details.
   637  	MaintenanceOptions *SpotInstanceRequestMaintenanceOptions `pulumi:"maintenanceOptions"`
   638  	// Customize the metadata options of the instance. See Metadata Options below for more details.
   639  	MetadataOptions *SpotInstanceRequestMetadataOptions `pulumi:"metadataOptions"`
   640  	// If true, the launched EC2 instance will have detailed monitoring enabled. (Available since v0.6.0)
   641  	Monitoring *bool `pulumi:"monitoring"`
   642  	// Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
   643  	NetworkInterfaces []SpotInstanceRequestNetworkInterface `pulumi:"networkInterfaces"`
   644  	// Placement Group to start the instance in.
   645  	PlacementGroup *string `pulumi:"placementGroup"`
   646  	// Number of the partition the instance is in. Valid only if the `ec2.PlacementGroup` resource's `strategy` argument is set to `"partition"`.
   647  	PlacementPartitionNumber *int `pulumi:"placementPartitionNumber"`
   648  	// Options for the instance hostname. The default values are inherited from the subnet. See Private DNS Name Options below for more details.
   649  	PrivateDnsNameOptions *SpotInstanceRequestPrivateDnsNameOptions `pulumi:"privateDnsNameOptions"`
   650  	// Private IP address to associate with the instance in a VPC.
   651  	PrivateIp *string `pulumi:"privateIp"`
   652  	// Configuration block to customize details about the root block device of the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a list containing one object.
   653  	RootBlockDevice *SpotInstanceRequestRootBlockDevice `pulumi:"rootBlockDevice"`
   654  	// List of secondary private IPv4 addresses to assign to the instance's primary network interface (eth0) in a VPC. Can only be assigned to the primary network interface (eth0) attached at instance creation, not a pre-existing network interface i.e., referenced in a `networkInterface` block. Refer to the [Elastic network interfaces documentation](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html#AvailableIpPerENI) to see the maximum number of private IP addresses allowed per instance type.
   655  	SecondaryPrivateIps []string `pulumi:"secondaryPrivateIps"`
   656  	// List of security group names to associate with.
   657  	//
   658  	// > **NOTE:** If you are creating Instances in a VPC, use `vpcSecurityGroupIds` instead.
   659  	SecurityGroups []string `pulumi:"securityGroups"`
   660  	// Controls if traffic is routed to the instance when the destination address does not match the instance. Used for NAT or VPNs. Defaults true.
   661  	SourceDestCheck *bool `pulumi:"sourceDestCheck"`
   662  	// The maximum price to request on the spot market.
   663  	SpotPrice *string `pulumi:"spotPrice"`
   664  	// If set to `one-time`, after
   665  	// the instance is terminated, the spot request will be closed.
   666  	SpotType *string `pulumi:"spotType"`
   667  	// VPC Subnet ID to launch in.
   668  	SubnetId *string `pulumi:"subnetId"`
   669  	// Map of tags to assign to the resource. Note that these tags apply to the instance and not block storage devices. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   670  	Tags map[string]string `pulumi:"tags"`
   671  	// Tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of `dedicated` runs on single-tenant hardware. The `host` tenancy is not supported for the import-instance command. Valid values are `default`, `dedicated`, and `host`.
   672  	Tenancy *string `pulumi:"tenancy"`
   673  	// User data to provide when launching the instance. Do not pass gzip-compressed data via this argument; see `userDataBase64` instead. Updates to this field will trigger a stop/start of the EC2 instance by default. If the `userDataReplaceOnChange` is set then updates to this field will trigger a destroy and recreate.
   674  	UserData *string `pulumi:"userData"`
   675  	// Can be used instead of `userData` to pass base64-encoded binary data directly. Use this instead of `userData` whenever the value is not a valid UTF-8 string. For example, gzip-encoded user data must be base64-encoded and passed via this argument to avoid corruption. Updates to this field will trigger a stop/start of the EC2 instance by default. If the `userDataReplaceOnChange` is set then updates to this field will trigger a destroy and recreate.
   676  	UserDataBase64 *string `pulumi:"userDataBase64"`
   677  	// When used in combination with `userData` or `userDataBase64` will trigger a destroy and recreate when set to `true`. Defaults to `false` if not set.
   678  	UserDataReplaceOnChange *bool `pulumi:"userDataReplaceOnChange"`
   679  	// The start date and time of the request, in UTC [RFC3339](https://tools.ietf.org/html/rfc3339#section-5.8) format(for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.
   680  	ValidFrom *string `pulumi:"validFrom"`
   681  	// The end date and time of the request, in UTC [RFC3339](https://tools.ietf.org/html/rfc3339#section-5.8) format(for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new Spot instance requests are placed or enabled to fulfill the request. The default end date is 7 days from the current date.
   682  	ValidUntil *string `pulumi:"validUntil"`
   683  	// Map of tags to assign, at instance-creation time, to root and EBS volumes.
   684  	//
   685  	// > **NOTE:** Do not use `volumeTags` if you plan to manage block device tags outside the `ec2.Instance` configuration, such as using `tags` in an `ebs.Volume` resource attached via `ec2.VolumeAttachment`. Doing so will result in resource cycling and inconsistent behavior.
   686  	VolumeTags map[string]string `pulumi:"volumeTags"`
   687  	// List of security group IDs to associate with.
   688  	VpcSecurityGroupIds []string `pulumi:"vpcSecurityGroupIds"`
   689  	// If set, this provider will
   690  	// wait for the Spot Request to be fulfilled, and will throw an error if the
   691  	// timeout of 10m is reached.
   692  	WaitForFulfillment *bool `pulumi:"waitForFulfillment"`
   693  }
   694  
   695  // The set of arguments for constructing a SpotInstanceRequest resource.
   696  type SpotInstanceRequestArgs struct {
   697  	// AMI to use for the instance. Required unless `launchTemplate` is specified and the Launch Template specifes an AMI. If an AMI is specified in the Launch Template, setting `ami` will override the AMI specified in the Launch Template.
   698  	Ami pulumi.StringPtrInput
   699  	// Whether to associate a public IP address with an instance in a VPC.
   700  	AssociatePublicIpAddress pulumi.BoolPtrInput
   701  	// AZ to start the instance in.
   702  	AvailabilityZone pulumi.StringPtrInput
   703  	// The required duration for the Spot instances, in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360).
   704  	// The duration period starts as soon as your Spot instance receives its instance ID. At the end of the duration period, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates.
   705  	// Note that you can't specify an Availability Zone group or a launch group if you specify a duration.
   706  	BlockDurationMinutes pulumi.IntPtrInput
   707  	// Describes an instance's Capacity Reservation targeting option. See Capacity Reservation Specification below for more details.
   708  	//
   709  	// > **NOTE:** Changing `cpuCoreCount` and/or `cpuThreadsPerCore` will cause the resource to be destroyed and re-created.
   710  	CapacityReservationSpecification SpotInstanceRequestCapacityReservationSpecificationPtrInput
   711  	// Sets the number of CPU cores for an instance. This option is only supported on creation of instance type that support CPU Options [CPU Cores and Threads Per CPU Core Per Instance Type](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html#cpu-options-supported-instances-values) - specifying this option for unsupported instance types will return an error from the EC2 API.
   712  	//
   713  	// Deprecated: use 'cpu_options' argument instead
   714  	CpuCoreCount pulumi.IntPtrInput
   715  	// The CPU options for the instance. See CPU Options below for more details.
   716  	CpuOptions SpotInstanceRequestCpuOptionsPtrInput
   717  	// If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See [Optimizing CPU Options](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html) for more information.
   718  	//
   719  	// Deprecated: use 'cpu_options' argument instead
   720  	CpuThreadsPerCore pulumi.IntPtrInput
   721  	// Configuration block for customizing the credit specification of the instance. See Credit Specification below for more details. This provider will only perform drift detection of its value when present in a configuration. Removing this configuration on existing instances will only stop managing it. It will not change the configuration back to the default for the instance type.
   722  	CreditSpecification SpotInstanceRequestCreditSpecificationPtrInput
   723  	// If true, enables [EC2 Instance Stop Protection](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Stop_Start.html#Using_StopProtection).
   724  	DisableApiStop pulumi.BoolPtrInput
   725  	// If true, enables [EC2 Instance Termination Protection](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/terminating-instances.html#Using_ChangingDisableAPITermination).
   726  	DisableApiTermination pulumi.BoolPtrInput
   727  	// One or more configuration blocks with additional EBS block devices to attach to the instance. Block device configurations only apply on resource creation. See Block Devices below for details on attributes and drift detection. When accessing this as an attribute reference, it is a set of objects.
   728  	EbsBlockDevices SpotInstanceRequestEbsBlockDeviceArrayInput
   729  	// If true, the launched EC2 instance will be EBS-optimized. Note that if this is not set on an instance type that is optimized by default then this will show as disabled but if the instance type is optimized by default then there is no need to set this and there is no effect to disabling it. See the [EBS Optimized section](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html) of the AWS User Guide for more information.
   730  	EbsOptimized pulumi.BoolPtrInput
   731  	// Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
   732  	EnclaveOptions SpotInstanceRequestEnclaveOptionsPtrInput
   733  	// One or more configuration blocks to customize Ephemeral (also known as "Instance Store") volumes on the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a set of objects.
   734  	EphemeralBlockDevices SpotInstanceRequestEphemeralBlockDeviceArrayInput
   735  	// If true, wait for password data to become available and retrieve it. Useful for getting the administrator password for instances running Microsoft Windows. The password data is exported to the `passwordData` attribute. See [GetPasswordData](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetPasswordData.html) for more information.
   736  	GetPasswordData pulumi.BoolPtrInput
   737  	// If true, the launched EC2 instance will support hibernation.
   738  	Hibernation pulumi.BoolPtrInput
   739  	// ID of a dedicated host that the instance will be assigned to. Use when an instance is to be launched on a specific dedicated host.
   740  	HostId pulumi.StringPtrInput
   741  	// ARN of the host resource group in which to launch the instances. If you specify an ARN, omit the `tenancy` parameter or set it to `host`.
   742  	HostResourceGroupArn pulumi.StringPtrInput
   743  	// IAM Instance Profile to launch the instance with. Specified as the name of the Instance Profile. Ensure your credentials have the correct permission to assign the instance profile according to the [EC2 documentation](http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2.html#roles-usingrole-ec2instance-permissions), notably `iam:PassRole`.
   744  	IamInstanceProfile pulumi.StringPtrInput
   745  	// Shutdown behavior for the instance. Amazon defaults this to `stop` for EBS-backed instances and `terminate` for instance-store instances. Cannot be set on instance-store instances. See [Shutdown Behavior](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/terminating-instances.html#Using_ChangingInstanceInitiatedShutdownBehavior) for more information.
   746  	InstanceInitiatedShutdownBehavior pulumi.StringPtrInput
   747  	// Indicates Spot instance behavior when it is interrupted. Valid values are `terminate`, `stop`, or `hibernate`. Default value is `terminate`.
   748  	InstanceInterruptionBehavior pulumi.StringPtrInput
   749  	// Instance type to use for the instance. Required unless `launchTemplate` is specified and the Launch Template specifies an instance type. If an instance type is specified in the Launch Template, setting `instanceType` will override the instance type specified in the Launch Template. Updates to this field will trigger a stop/start of the EC2 instance.
   750  	InstanceType pulumi.StringPtrInput
   751  	// Number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet.
   752  	Ipv6AddressCount pulumi.IntPtrInput
   753  	// Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface
   754  	Ipv6Addresses pulumi.StringArrayInput
   755  	// Key name of the Key Pair to use for the instance; which can be managed using the `ec2.KeyPair` resource.
   756  	KeyName pulumi.StringPtrInput
   757  	// A launch group is a group of spot instances that launch together and terminate together.
   758  	// If left empty instances are launched and terminated individually.
   759  	LaunchGroup pulumi.StringPtrInput
   760  	// Specifies a Launch Template to configure the instance. Parameters configured on this resource will override the corresponding parameters in the Launch Template. See Launch Template Specification below for more details.
   761  	LaunchTemplate SpotInstanceRequestLaunchTemplatePtrInput
   762  	// Maintenance and recovery options for the instance. See Maintenance Options below for more details.
   763  	MaintenanceOptions SpotInstanceRequestMaintenanceOptionsPtrInput
   764  	// Customize the metadata options of the instance. See Metadata Options below for more details.
   765  	MetadataOptions SpotInstanceRequestMetadataOptionsPtrInput
   766  	// If true, the launched EC2 instance will have detailed monitoring enabled. (Available since v0.6.0)
   767  	Monitoring pulumi.BoolPtrInput
   768  	// Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
   769  	NetworkInterfaces SpotInstanceRequestNetworkInterfaceArrayInput
   770  	// Placement Group to start the instance in.
   771  	PlacementGroup pulumi.StringPtrInput
   772  	// Number of the partition the instance is in. Valid only if the `ec2.PlacementGroup` resource's `strategy` argument is set to `"partition"`.
   773  	PlacementPartitionNumber pulumi.IntPtrInput
   774  	// Options for the instance hostname. The default values are inherited from the subnet. See Private DNS Name Options below for more details.
   775  	PrivateDnsNameOptions SpotInstanceRequestPrivateDnsNameOptionsPtrInput
   776  	// Private IP address to associate with the instance in a VPC.
   777  	PrivateIp pulumi.StringPtrInput
   778  	// Configuration block to customize details about the root block device of the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a list containing one object.
   779  	RootBlockDevice SpotInstanceRequestRootBlockDevicePtrInput
   780  	// List of secondary private IPv4 addresses to assign to the instance's primary network interface (eth0) in a VPC. Can only be assigned to the primary network interface (eth0) attached at instance creation, not a pre-existing network interface i.e., referenced in a `networkInterface` block. Refer to the [Elastic network interfaces documentation](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html#AvailableIpPerENI) to see the maximum number of private IP addresses allowed per instance type.
   781  	SecondaryPrivateIps pulumi.StringArrayInput
   782  	// List of security group names to associate with.
   783  	//
   784  	// > **NOTE:** If you are creating Instances in a VPC, use `vpcSecurityGroupIds` instead.
   785  	SecurityGroups pulumi.StringArrayInput
   786  	// Controls if traffic is routed to the instance when the destination address does not match the instance. Used for NAT or VPNs. Defaults true.
   787  	SourceDestCheck pulumi.BoolPtrInput
   788  	// The maximum price to request on the spot market.
   789  	SpotPrice pulumi.StringPtrInput
   790  	// If set to `one-time`, after
   791  	// the instance is terminated, the spot request will be closed.
   792  	SpotType pulumi.StringPtrInput
   793  	// VPC Subnet ID to launch in.
   794  	SubnetId pulumi.StringPtrInput
   795  	// Map of tags to assign to the resource. Note that these tags apply to the instance and not block storage devices. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   796  	Tags pulumi.StringMapInput
   797  	// Tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of `dedicated` runs on single-tenant hardware. The `host` tenancy is not supported for the import-instance command. Valid values are `default`, `dedicated`, and `host`.
   798  	Tenancy pulumi.StringPtrInput
   799  	// User data to provide when launching the instance. Do not pass gzip-compressed data via this argument; see `userDataBase64` instead. Updates to this field will trigger a stop/start of the EC2 instance by default. If the `userDataReplaceOnChange` is set then updates to this field will trigger a destroy and recreate.
   800  	UserData pulumi.StringPtrInput
   801  	// Can be used instead of `userData` to pass base64-encoded binary data directly. Use this instead of `userData` whenever the value is not a valid UTF-8 string. For example, gzip-encoded user data must be base64-encoded and passed via this argument to avoid corruption. Updates to this field will trigger a stop/start of the EC2 instance by default. If the `userDataReplaceOnChange` is set then updates to this field will trigger a destroy and recreate.
   802  	UserDataBase64 pulumi.StringPtrInput
   803  	// When used in combination with `userData` or `userDataBase64` will trigger a destroy and recreate when set to `true`. Defaults to `false` if not set.
   804  	UserDataReplaceOnChange pulumi.BoolPtrInput
   805  	// The start date and time of the request, in UTC [RFC3339](https://tools.ietf.org/html/rfc3339#section-5.8) format(for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.
   806  	ValidFrom pulumi.StringPtrInput
   807  	// The end date and time of the request, in UTC [RFC3339](https://tools.ietf.org/html/rfc3339#section-5.8) format(for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new Spot instance requests are placed or enabled to fulfill the request. The default end date is 7 days from the current date.
   808  	ValidUntil pulumi.StringPtrInput
   809  	// Map of tags to assign, at instance-creation time, to root and EBS volumes.
   810  	//
   811  	// > **NOTE:** Do not use `volumeTags` if you plan to manage block device tags outside the `ec2.Instance` configuration, such as using `tags` in an `ebs.Volume` resource attached via `ec2.VolumeAttachment`. Doing so will result in resource cycling and inconsistent behavior.
   812  	VolumeTags pulumi.StringMapInput
   813  	// List of security group IDs to associate with.
   814  	VpcSecurityGroupIds pulumi.StringArrayInput
   815  	// If set, this provider will
   816  	// wait for the Spot Request to be fulfilled, and will throw an error if the
   817  	// timeout of 10m is reached.
   818  	WaitForFulfillment pulumi.BoolPtrInput
   819  }
   820  
   821  func (SpotInstanceRequestArgs) ElementType() reflect.Type {
   822  	return reflect.TypeOf((*spotInstanceRequestArgs)(nil)).Elem()
   823  }
   824  
   825  type SpotInstanceRequestInput interface {
   826  	pulumi.Input
   827  
   828  	ToSpotInstanceRequestOutput() SpotInstanceRequestOutput
   829  	ToSpotInstanceRequestOutputWithContext(ctx context.Context) SpotInstanceRequestOutput
   830  }
   831  
   832  func (*SpotInstanceRequest) ElementType() reflect.Type {
   833  	return reflect.TypeOf((**SpotInstanceRequest)(nil)).Elem()
   834  }
   835  
   836  func (i *SpotInstanceRequest) ToSpotInstanceRequestOutput() SpotInstanceRequestOutput {
   837  	return i.ToSpotInstanceRequestOutputWithContext(context.Background())
   838  }
   839  
   840  func (i *SpotInstanceRequest) ToSpotInstanceRequestOutputWithContext(ctx context.Context) SpotInstanceRequestOutput {
   841  	return pulumi.ToOutputWithContext(ctx, i).(SpotInstanceRequestOutput)
   842  }
   843  
   844  // SpotInstanceRequestArrayInput is an input type that accepts SpotInstanceRequestArray and SpotInstanceRequestArrayOutput values.
   845  // You can construct a concrete instance of `SpotInstanceRequestArrayInput` via:
   846  //
   847  //	SpotInstanceRequestArray{ SpotInstanceRequestArgs{...} }
   848  type SpotInstanceRequestArrayInput interface {
   849  	pulumi.Input
   850  
   851  	ToSpotInstanceRequestArrayOutput() SpotInstanceRequestArrayOutput
   852  	ToSpotInstanceRequestArrayOutputWithContext(context.Context) SpotInstanceRequestArrayOutput
   853  }
   854  
   855  type SpotInstanceRequestArray []SpotInstanceRequestInput
   856  
   857  func (SpotInstanceRequestArray) ElementType() reflect.Type {
   858  	return reflect.TypeOf((*[]*SpotInstanceRequest)(nil)).Elem()
   859  }
   860  
   861  func (i SpotInstanceRequestArray) ToSpotInstanceRequestArrayOutput() SpotInstanceRequestArrayOutput {
   862  	return i.ToSpotInstanceRequestArrayOutputWithContext(context.Background())
   863  }
   864  
   865  func (i SpotInstanceRequestArray) ToSpotInstanceRequestArrayOutputWithContext(ctx context.Context) SpotInstanceRequestArrayOutput {
   866  	return pulumi.ToOutputWithContext(ctx, i).(SpotInstanceRequestArrayOutput)
   867  }
   868  
   869  // SpotInstanceRequestMapInput is an input type that accepts SpotInstanceRequestMap and SpotInstanceRequestMapOutput values.
   870  // You can construct a concrete instance of `SpotInstanceRequestMapInput` via:
   871  //
   872  //	SpotInstanceRequestMap{ "key": SpotInstanceRequestArgs{...} }
   873  type SpotInstanceRequestMapInput interface {
   874  	pulumi.Input
   875  
   876  	ToSpotInstanceRequestMapOutput() SpotInstanceRequestMapOutput
   877  	ToSpotInstanceRequestMapOutputWithContext(context.Context) SpotInstanceRequestMapOutput
   878  }
   879  
   880  type SpotInstanceRequestMap map[string]SpotInstanceRequestInput
   881  
   882  func (SpotInstanceRequestMap) ElementType() reflect.Type {
   883  	return reflect.TypeOf((*map[string]*SpotInstanceRequest)(nil)).Elem()
   884  }
   885  
   886  func (i SpotInstanceRequestMap) ToSpotInstanceRequestMapOutput() SpotInstanceRequestMapOutput {
   887  	return i.ToSpotInstanceRequestMapOutputWithContext(context.Background())
   888  }
   889  
   890  func (i SpotInstanceRequestMap) ToSpotInstanceRequestMapOutputWithContext(ctx context.Context) SpotInstanceRequestMapOutput {
   891  	return pulumi.ToOutputWithContext(ctx, i).(SpotInstanceRequestMapOutput)
   892  }
   893  
   894  type SpotInstanceRequestOutput struct{ *pulumi.OutputState }
   895  
   896  func (SpotInstanceRequestOutput) ElementType() reflect.Type {
   897  	return reflect.TypeOf((**SpotInstanceRequest)(nil)).Elem()
   898  }
   899  
   900  func (o SpotInstanceRequestOutput) ToSpotInstanceRequestOutput() SpotInstanceRequestOutput {
   901  	return o
   902  }
   903  
   904  func (o SpotInstanceRequestOutput) ToSpotInstanceRequestOutputWithContext(ctx context.Context) SpotInstanceRequestOutput {
   905  	return o
   906  }
   907  
   908  // AMI to use for the instance. Required unless `launchTemplate` is specified and the Launch Template specifes an AMI. If an AMI is specified in the Launch Template, setting `ami` will override the AMI specified in the Launch Template.
   909  func (o SpotInstanceRequestOutput) Ami() pulumi.StringOutput {
   910  	return o.ApplyT(func(v *SpotInstanceRequest) pulumi.StringOutput { return v.Ami }).(pulumi.StringOutput)
   911  }
   912  
   913  func (o SpotInstanceRequestOutput) Arn() pulumi.StringOutput {
   914  	return o.ApplyT(func(v *SpotInstanceRequest) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   915  }
   916  
   917  // Whether to associate a public IP address with an instance in a VPC.
   918  func (o SpotInstanceRequestOutput) AssociatePublicIpAddress() pulumi.BoolOutput {
   919  	return o.ApplyT(func(v *SpotInstanceRequest) pulumi.BoolOutput { return v.AssociatePublicIpAddress }).(pulumi.BoolOutput)
   920  }
   921  
   922  // AZ to start the instance in.
   923  func (o SpotInstanceRequestOutput) AvailabilityZone() pulumi.StringOutput {
   924  	return o.ApplyT(func(v *SpotInstanceRequest) pulumi.StringOutput { return v.AvailabilityZone }).(pulumi.StringOutput)
   925  }
   926  
   927  // The required duration for the Spot instances, in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360).
   928  // The duration period starts as soon as your Spot instance receives its instance ID. At the end of the duration period, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates.
   929  // Note that you can't specify an Availability Zone group or a launch group if you specify a duration.
   930  func (o SpotInstanceRequestOutput) BlockDurationMinutes() pulumi.IntPtrOutput {
   931  	return o.ApplyT(func(v *SpotInstanceRequest) pulumi.IntPtrOutput { return v.BlockDurationMinutes }).(pulumi.IntPtrOutput)
   932  }
   933  
   934  // Describes an instance's Capacity Reservation targeting option. See Capacity Reservation Specification below for more details.
   935  //
   936  // > **NOTE:** Changing `cpuCoreCount` and/or `cpuThreadsPerCore` will cause the resource to be destroyed and re-created.
   937  func (o SpotInstanceRequestOutput) CapacityReservationSpecification() SpotInstanceRequestCapacityReservationSpecificationOutput {
   938  	return o.ApplyT(func(v *SpotInstanceRequest) SpotInstanceRequestCapacityReservationSpecificationOutput {
   939  		return v.CapacityReservationSpecification
   940  	}).(SpotInstanceRequestCapacityReservationSpecificationOutput)
   941  }
   942  
   943  // Sets the number of CPU cores for an instance. This option is only supported on creation of instance type that support CPU Options [CPU Cores and Threads Per CPU Core Per Instance Type](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html#cpu-options-supported-instances-values) - specifying this option for unsupported instance types will return an error from the EC2 API.
   944  //
   945  // Deprecated: use 'cpu_options' argument instead
   946  func (o SpotInstanceRequestOutput) CpuCoreCount() pulumi.IntOutput {
   947  	return o.ApplyT(func(v *SpotInstanceRequest) pulumi.IntOutput { return v.CpuCoreCount }).(pulumi.IntOutput)
   948  }
   949  
   950  // The CPU options for the instance. See CPU Options below for more details.
   951  func (o SpotInstanceRequestOutput) CpuOptions() SpotInstanceRequestCpuOptionsOutput {
   952  	return o.ApplyT(func(v *SpotInstanceRequest) SpotInstanceRequestCpuOptionsOutput { return v.CpuOptions }).(SpotInstanceRequestCpuOptionsOutput)
   953  }
   954  
   955  // If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See [Optimizing CPU Options](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html) for more information.
   956  //
   957  // Deprecated: use 'cpu_options' argument instead
   958  func (o SpotInstanceRequestOutput) CpuThreadsPerCore() pulumi.IntOutput {
   959  	return o.ApplyT(func(v *SpotInstanceRequest) pulumi.IntOutput { return v.CpuThreadsPerCore }).(pulumi.IntOutput)
   960  }
   961  
   962  // Configuration block for customizing the credit specification of the instance. See Credit Specification below for more details. This provider will only perform drift detection of its value when present in a configuration. Removing this configuration on existing instances will only stop managing it. It will not change the configuration back to the default for the instance type.
   963  func (o SpotInstanceRequestOutput) CreditSpecification() SpotInstanceRequestCreditSpecificationPtrOutput {
   964  	return o.ApplyT(func(v *SpotInstanceRequest) SpotInstanceRequestCreditSpecificationPtrOutput {
   965  		return v.CreditSpecification
   966  	}).(SpotInstanceRequestCreditSpecificationPtrOutput)
   967  }
   968  
   969  // If true, enables [EC2 Instance Stop Protection](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Stop_Start.html#Using_StopProtection).
   970  func (o SpotInstanceRequestOutput) DisableApiStop() pulumi.BoolOutput {
   971  	return o.ApplyT(func(v *SpotInstanceRequest) pulumi.BoolOutput { return v.DisableApiStop }).(pulumi.BoolOutput)
   972  }
   973  
   974  // If true, enables [EC2 Instance Termination Protection](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/terminating-instances.html#Using_ChangingDisableAPITermination).
   975  func (o SpotInstanceRequestOutput) DisableApiTermination() pulumi.BoolOutput {
   976  	return o.ApplyT(func(v *SpotInstanceRequest) pulumi.BoolOutput { return v.DisableApiTermination }).(pulumi.BoolOutput)
   977  }
   978  
   979  // One or more configuration blocks with additional EBS block devices to attach to the instance. Block device configurations only apply on resource creation. See Block Devices below for details on attributes and drift detection. When accessing this as an attribute reference, it is a set of objects.
   980  func (o SpotInstanceRequestOutput) EbsBlockDevices() SpotInstanceRequestEbsBlockDeviceArrayOutput {
   981  	return o.ApplyT(func(v *SpotInstanceRequest) SpotInstanceRequestEbsBlockDeviceArrayOutput { return v.EbsBlockDevices }).(SpotInstanceRequestEbsBlockDeviceArrayOutput)
   982  }
   983  
   984  // If true, the launched EC2 instance will be EBS-optimized. Note that if this is not set on an instance type that is optimized by default then this will show as disabled but if the instance type is optimized by default then there is no need to set this and there is no effect to disabling it. See the [EBS Optimized section](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html) of the AWS User Guide for more information.
   985  func (o SpotInstanceRequestOutput) EbsOptimized() pulumi.BoolOutput {
   986  	return o.ApplyT(func(v *SpotInstanceRequest) pulumi.BoolOutput { return v.EbsOptimized }).(pulumi.BoolOutput)
   987  }
   988  
   989  // Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
   990  func (o SpotInstanceRequestOutput) EnclaveOptions() SpotInstanceRequestEnclaveOptionsOutput {
   991  	return o.ApplyT(func(v *SpotInstanceRequest) SpotInstanceRequestEnclaveOptionsOutput { return v.EnclaveOptions }).(SpotInstanceRequestEnclaveOptionsOutput)
   992  }
   993  
   994  // One or more configuration blocks to customize Ephemeral (also known as "Instance Store") volumes on the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a set of objects.
   995  func (o SpotInstanceRequestOutput) EphemeralBlockDevices() SpotInstanceRequestEphemeralBlockDeviceArrayOutput {
   996  	return o.ApplyT(func(v *SpotInstanceRequest) SpotInstanceRequestEphemeralBlockDeviceArrayOutput {
   997  		return v.EphemeralBlockDevices
   998  	}).(SpotInstanceRequestEphemeralBlockDeviceArrayOutput)
   999  }
  1000  
  1001  // If true, wait for password data to become available and retrieve it. Useful for getting the administrator password for instances running Microsoft Windows. The password data is exported to the `passwordData` attribute. See [GetPasswordData](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetPasswordData.html) for more information.
  1002  func (o SpotInstanceRequestOutput) GetPasswordData() pulumi.BoolPtrOutput {
  1003  	return o.ApplyT(func(v *SpotInstanceRequest) pulumi.BoolPtrOutput { return v.GetPasswordData }).(pulumi.BoolPtrOutput)
  1004  }
  1005  
  1006  // If true, the launched EC2 instance will support hibernation.
  1007  func (o SpotInstanceRequestOutput) Hibernation() pulumi.BoolPtrOutput {
  1008  	return o.ApplyT(func(v *SpotInstanceRequest) pulumi.BoolPtrOutput { return v.Hibernation }).(pulumi.BoolPtrOutput)
  1009  }
  1010  
  1011  // ID of a dedicated host that the instance will be assigned to. Use when an instance is to be launched on a specific dedicated host.
  1012  func (o SpotInstanceRequestOutput) HostId() pulumi.StringOutput {
  1013  	return o.ApplyT(func(v *SpotInstanceRequest) pulumi.StringOutput { return v.HostId }).(pulumi.StringOutput)
  1014  }
  1015  
  1016  // ARN of the host resource group in which to launch the instances. If you specify an ARN, omit the `tenancy` parameter or set it to `host`.
  1017  func (o SpotInstanceRequestOutput) HostResourceGroupArn() pulumi.StringOutput {
  1018  	return o.ApplyT(func(v *SpotInstanceRequest) pulumi.StringOutput { return v.HostResourceGroupArn }).(pulumi.StringOutput)
  1019  }
  1020  
  1021  // IAM Instance Profile to launch the instance with. Specified as the name of the Instance Profile. Ensure your credentials have the correct permission to assign the instance profile according to the [EC2 documentation](http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2.html#roles-usingrole-ec2instance-permissions), notably `iam:PassRole`.
  1022  func (o SpotInstanceRequestOutput) IamInstanceProfile() pulumi.StringOutput {
  1023  	return o.ApplyT(func(v *SpotInstanceRequest) pulumi.StringOutput { return v.IamInstanceProfile }).(pulumi.StringOutput)
  1024  }
  1025  
  1026  // Shutdown behavior for the instance. Amazon defaults this to `stop` for EBS-backed instances and `terminate` for instance-store instances. Cannot be set on instance-store instances. See [Shutdown Behavior](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/terminating-instances.html#Using_ChangingInstanceInitiatedShutdownBehavior) for more information.
  1027  func (o SpotInstanceRequestOutput) InstanceInitiatedShutdownBehavior() pulumi.StringOutput {
  1028  	return o.ApplyT(func(v *SpotInstanceRequest) pulumi.StringOutput { return v.InstanceInitiatedShutdownBehavior }).(pulumi.StringOutput)
  1029  }
  1030  
  1031  // Indicates Spot instance behavior when it is interrupted. Valid values are `terminate`, `stop`, or `hibernate`. Default value is `terminate`.
  1032  func (o SpotInstanceRequestOutput) InstanceInterruptionBehavior() pulumi.StringPtrOutput {
  1033  	return o.ApplyT(func(v *SpotInstanceRequest) pulumi.StringPtrOutput { return v.InstanceInterruptionBehavior }).(pulumi.StringPtrOutput)
  1034  }
  1035  
  1036  func (o SpotInstanceRequestOutput) InstanceState() pulumi.StringOutput {
  1037  	return o.ApplyT(func(v *SpotInstanceRequest) pulumi.StringOutput { return v.InstanceState }).(pulumi.StringOutput)
  1038  }
  1039  
  1040  // Instance type to use for the instance. Required unless `launchTemplate` is specified and the Launch Template specifies an instance type. If an instance type is specified in the Launch Template, setting `instanceType` will override the instance type specified in the Launch Template. Updates to this field will trigger a stop/start of the EC2 instance.
  1041  func (o SpotInstanceRequestOutput) InstanceType() pulumi.StringOutput {
  1042  	return o.ApplyT(func(v *SpotInstanceRequest) pulumi.StringOutput { return v.InstanceType }).(pulumi.StringOutput)
  1043  }
  1044  
  1045  // Number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet.
  1046  func (o SpotInstanceRequestOutput) Ipv6AddressCount() pulumi.IntOutput {
  1047  	return o.ApplyT(func(v *SpotInstanceRequest) pulumi.IntOutput { return v.Ipv6AddressCount }).(pulumi.IntOutput)
  1048  }
  1049  
  1050  // Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface
  1051  func (o SpotInstanceRequestOutput) Ipv6Addresses() pulumi.StringArrayOutput {
  1052  	return o.ApplyT(func(v *SpotInstanceRequest) pulumi.StringArrayOutput { return v.Ipv6Addresses }).(pulumi.StringArrayOutput)
  1053  }
  1054  
  1055  // Key name of the Key Pair to use for the instance; which can be managed using the `ec2.KeyPair` resource.
  1056  func (o SpotInstanceRequestOutput) KeyName() pulumi.StringOutput {
  1057  	return o.ApplyT(func(v *SpotInstanceRequest) pulumi.StringOutput { return v.KeyName }).(pulumi.StringOutput)
  1058  }
  1059  
  1060  // A launch group is a group of spot instances that launch together and terminate together.
  1061  // If left empty instances are launched and terminated individually.
  1062  func (o SpotInstanceRequestOutput) LaunchGroup() pulumi.StringPtrOutput {
  1063  	return o.ApplyT(func(v *SpotInstanceRequest) pulumi.StringPtrOutput { return v.LaunchGroup }).(pulumi.StringPtrOutput)
  1064  }
  1065  
  1066  // Specifies a Launch Template to configure the instance. Parameters configured on this resource will override the corresponding parameters in the Launch Template. See Launch Template Specification below for more details.
  1067  func (o SpotInstanceRequestOutput) LaunchTemplate() SpotInstanceRequestLaunchTemplatePtrOutput {
  1068  	return o.ApplyT(func(v *SpotInstanceRequest) SpotInstanceRequestLaunchTemplatePtrOutput { return v.LaunchTemplate }).(SpotInstanceRequestLaunchTemplatePtrOutput)
  1069  }
  1070  
  1071  // Maintenance and recovery options for the instance. See Maintenance Options below for more details.
  1072  func (o SpotInstanceRequestOutput) MaintenanceOptions() SpotInstanceRequestMaintenanceOptionsOutput {
  1073  	return o.ApplyT(func(v *SpotInstanceRequest) SpotInstanceRequestMaintenanceOptionsOutput { return v.MaintenanceOptions }).(SpotInstanceRequestMaintenanceOptionsOutput)
  1074  }
  1075  
  1076  // Customize the metadata options of the instance. See Metadata Options below for more details.
  1077  func (o SpotInstanceRequestOutput) MetadataOptions() SpotInstanceRequestMetadataOptionsOutput {
  1078  	return o.ApplyT(func(v *SpotInstanceRequest) SpotInstanceRequestMetadataOptionsOutput { return v.MetadataOptions }).(SpotInstanceRequestMetadataOptionsOutput)
  1079  }
  1080  
  1081  // If true, the launched EC2 instance will have detailed monitoring enabled. (Available since v0.6.0)
  1082  func (o SpotInstanceRequestOutput) Monitoring() pulumi.BoolOutput {
  1083  	return o.ApplyT(func(v *SpotInstanceRequest) pulumi.BoolOutput { return v.Monitoring }).(pulumi.BoolOutput)
  1084  }
  1085  
  1086  // Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
  1087  func (o SpotInstanceRequestOutput) NetworkInterfaces() SpotInstanceRequestNetworkInterfaceArrayOutput {
  1088  	return o.ApplyT(func(v *SpotInstanceRequest) SpotInstanceRequestNetworkInterfaceArrayOutput {
  1089  		return v.NetworkInterfaces
  1090  	}).(SpotInstanceRequestNetworkInterfaceArrayOutput)
  1091  }
  1092  
  1093  func (o SpotInstanceRequestOutput) OutpostArn() pulumi.StringOutput {
  1094  	return o.ApplyT(func(v *SpotInstanceRequest) pulumi.StringOutput { return v.OutpostArn }).(pulumi.StringOutput)
  1095  }
  1096  
  1097  func (o SpotInstanceRequestOutput) PasswordData() pulumi.StringOutput {
  1098  	return o.ApplyT(func(v *SpotInstanceRequest) pulumi.StringOutput { return v.PasswordData }).(pulumi.StringOutput)
  1099  }
  1100  
  1101  // Placement Group to start the instance in.
  1102  func (o SpotInstanceRequestOutput) PlacementGroup() pulumi.StringOutput {
  1103  	return o.ApplyT(func(v *SpotInstanceRequest) pulumi.StringOutput { return v.PlacementGroup }).(pulumi.StringOutput)
  1104  }
  1105  
  1106  // Number of the partition the instance is in. Valid only if the `ec2.PlacementGroup` resource's `strategy` argument is set to `"partition"`.
  1107  func (o SpotInstanceRequestOutput) PlacementPartitionNumber() pulumi.IntOutput {
  1108  	return o.ApplyT(func(v *SpotInstanceRequest) pulumi.IntOutput { return v.PlacementPartitionNumber }).(pulumi.IntOutput)
  1109  }
  1110  
  1111  func (o SpotInstanceRequestOutput) PrimaryNetworkInterfaceId() pulumi.StringOutput {
  1112  	return o.ApplyT(func(v *SpotInstanceRequest) pulumi.StringOutput { return v.PrimaryNetworkInterfaceId }).(pulumi.StringOutput)
  1113  }
  1114  
  1115  // The private DNS name assigned to the instance. Can only be
  1116  // used inside the Amazon EC2, and only available if you've enabled DNS hostnames
  1117  // for your VPC
  1118  func (o SpotInstanceRequestOutput) PrivateDns() pulumi.StringOutput {
  1119  	return o.ApplyT(func(v *SpotInstanceRequest) pulumi.StringOutput { return v.PrivateDns }).(pulumi.StringOutput)
  1120  }
  1121  
  1122  // Options for the instance hostname. The default values are inherited from the subnet. See Private DNS Name Options below for more details.
  1123  func (o SpotInstanceRequestOutput) PrivateDnsNameOptions() SpotInstanceRequestPrivateDnsNameOptionsOutput {
  1124  	return o.ApplyT(func(v *SpotInstanceRequest) SpotInstanceRequestPrivateDnsNameOptionsOutput {
  1125  		return v.PrivateDnsNameOptions
  1126  	}).(SpotInstanceRequestPrivateDnsNameOptionsOutput)
  1127  }
  1128  
  1129  // Private IP address to associate with the instance in a VPC.
  1130  func (o SpotInstanceRequestOutput) PrivateIp() pulumi.StringOutput {
  1131  	return o.ApplyT(func(v *SpotInstanceRequest) pulumi.StringOutput { return v.PrivateIp }).(pulumi.StringOutput)
  1132  }
  1133  
  1134  // The public DNS name assigned to the instance. For EC2-VPC, this
  1135  // is only available if you've enabled DNS hostnames for your VPC
  1136  func (o SpotInstanceRequestOutput) PublicDns() pulumi.StringOutput {
  1137  	return o.ApplyT(func(v *SpotInstanceRequest) pulumi.StringOutput { return v.PublicDns }).(pulumi.StringOutput)
  1138  }
  1139  
  1140  // The public IP address assigned to the instance, if applicable.
  1141  func (o SpotInstanceRequestOutput) PublicIp() pulumi.StringOutput {
  1142  	return o.ApplyT(func(v *SpotInstanceRequest) pulumi.StringOutput { return v.PublicIp }).(pulumi.StringOutput)
  1143  }
  1144  
  1145  // Configuration block to customize details about the root block device of the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a list containing one object.
  1146  func (o SpotInstanceRequestOutput) RootBlockDevice() SpotInstanceRequestRootBlockDeviceOutput {
  1147  	return o.ApplyT(func(v *SpotInstanceRequest) SpotInstanceRequestRootBlockDeviceOutput { return v.RootBlockDevice }).(SpotInstanceRequestRootBlockDeviceOutput)
  1148  }
  1149  
  1150  // List of secondary private IPv4 addresses to assign to the instance's primary network interface (eth0) in a VPC. Can only be assigned to the primary network interface (eth0) attached at instance creation, not a pre-existing network interface i.e., referenced in a `networkInterface` block. Refer to the [Elastic network interfaces documentation](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html#AvailableIpPerENI) to see the maximum number of private IP addresses allowed per instance type.
  1151  func (o SpotInstanceRequestOutput) SecondaryPrivateIps() pulumi.StringArrayOutput {
  1152  	return o.ApplyT(func(v *SpotInstanceRequest) pulumi.StringArrayOutput { return v.SecondaryPrivateIps }).(pulumi.StringArrayOutput)
  1153  }
  1154  
  1155  // List of security group names to associate with.
  1156  //
  1157  // > **NOTE:** If you are creating Instances in a VPC, use `vpcSecurityGroupIds` instead.
  1158  func (o SpotInstanceRequestOutput) SecurityGroups() pulumi.StringArrayOutput {
  1159  	return o.ApplyT(func(v *SpotInstanceRequest) pulumi.StringArrayOutput { return v.SecurityGroups }).(pulumi.StringArrayOutput)
  1160  }
  1161  
  1162  // Controls if traffic is routed to the instance when the destination address does not match the instance. Used for NAT or VPNs. Defaults true.
  1163  func (o SpotInstanceRequestOutput) SourceDestCheck() pulumi.BoolPtrOutput {
  1164  	return o.ApplyT(func(v *SpotInstanceRequest) pulumi.BoolPtrOutput { return v.SourceDestCheck }).(pulumi.BoolPtrOutput)
  1165  }
  1166  
  1167  // The current [bid
  1168  // status](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html)
  1169  // of the Spot Instance Request.
  1170  func (o SpotInstanceRequestOutput) SpotBidStatus() pulumi.StringOutput {
  1171  	return o.ApplyT(func(v *SpotInstanceRequest) pulumi.StringOutput { return v.SpotBidStatus }).(pulumi.StringOutput)
  1172  }
  1173  
  1174  // The Instance ID (if any) that is currently fulfilling
  1175  // the Spot Instance request.
  1176  func (o SpotInstanceRequestOutput) SpotInstanceId() pulumi.StringOutput {
  1177  	return o.ApplyT(func(v *SpotInstanceRequest) pulumi.StringOutput { return v.SpotInstanceId }).(pulumi.StringOutput)
  1178  }
  1179  
  1180  // The maximum price to request on the spot market.
  1181  func (o SpotInstanceRequestOutput) SpotPrice() pulumi.StringOutput {
  1182  	return o.ApplyT(func(v *SpotInstanceRequest) pulumi.StringOutput { return v.SpotPrice }).(pulumi.StringOutput)
  1183  }
  1184  
  1185  // The current [request
  1186  // state](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-requests.html#creating-spot-request-status)
  1187  // of the Spot Instance Request.
  1188  func (o SpotInstanceRequestOutput) SpotRequestState() pulumi.StringOutput {
  1189  	return o.ApplyT(func(v *SpotInstanceRequest) pulumi.StringOutput { return v.SpotRequestState }).(pulumi.StringOutput)
  1190  }
  1191  
  1192  // If set to `one-time`, after
  1193  // the instance is terminated, the spot request will be closed.
  1194  func (o SpotInstanceRequestOutput) SpotType() pulumi.StringPtrOutput {
  1195  	return o.ApplyT(func(v *SpotInstanceRequest) pulumi.StringPtrOutput { return v.SpotType }).(pulumi.StringPtrOutput)
  1196  }
  1197  
  1198  // VPC Subnet ID to launch in.
  1199  func (o SpotInstanceRequestOutput) SubnetId() pulumi.StringOutput {
  1200  	return o.ApplyT(func(v *SpotInstanceRequest) pulumi.StringOutput { return v.SubnetId }).(pulumi.StringOutput)
  1201  }
  1202  
  1203  // Map of tags to assign to the resource. Note that these tags apply to the instance and not block storage devices. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
  1204  func (o SpotInstanceRequestOutput) Tags() pulumi.StringMapOutput {
  1205  	return o.ApplyT(func(v *SpotInstanceRequest) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
  1206  }
  1207  
  1208  // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
  1209  //
  1210  // Deprecated: Please use `tags` instead.
  1211  func (o SpotInstanceRequestOutput) TagsAll() pulumi.StringMapOutput {
  1212  	return o.ApplyT(func(v *SpotInstanceRequest) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
  1213  }
  1214  
  1215  // Tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of `dedicated` runs on single-tenant hardware. The `host` tenancy is not supported for the import-instance command. Valid values are `default`, `dedicated`, and `host`.
  1216  func (o SpotInstanceRequestOutput) Tenancy() pulumi.StringOutput {
  1217  	return o.ApplyT(func(v *SpotInstanceRequest) pulumi.StringOutput { return v.Tenancy }).(pulumi.StringOutput)
  1218  }
  1219  
  1220  // User data to provide when launching the instance. Do not pass gzip-compressed data via this argument; see `userDataBase64` instead. Updates to this field will trigger a stop/start of the EC2 instance by default. If the `userDataReplaceOnChange` is set then updates to this field will trigger a destroy and recreate.
  1221  func (o SpotInstanceRequestOutput) UserData() pulumi.StringOutput {
  1222  	return o.ApplyT(func(v *SpotInstanceRequest) pulumi.StringOutput { return v.UserData }).(pulumi.StringOutput)
  1223  }
  1224  
  1225  // Can be used instead of `userData` to pass base64-encoded binary data directly. Use this instead of `userData` whenever the value is not a valid UTF-8 string. For example, gzip-encoded user data must be base64-encoded and passed via this argument to avoid corruption. Updates to this field will trigger a stop/start of the EC2 instance by default. If the `userDataReplaceOnChange` is set then updates to this field will trigger a destroy and recreate.
  1226  func (o SpotInstanceRequestOutput) UserDataBase64() pulumi.StringOutput {
  1227  	return o.ApplyT(func(v *SpotInstanceRequest) pulumi.StringOutput { return v.UserDataBase64 }).(pulumi.StringOutput)
  1228  }
  1229  
  1230  // When used in combination with `userData` or `userDataBase64` will trigger a destroy and recreate when set to `true`. Defaults to `false` if not set.
  1231  func (o SpotInstanceRequestOutput) UserDataReplaceOnChange() pulumi.BoolPtrOutput {
  1232  	return o.ApplyT(func(v *SpotInstanceRequest) pulumi.BoolPtrOutput { return v.UserDataReplaceOnChange }).(pulumi.BoolPtrOutput)
  1233  }
  1234  
  1235  // The start date and time of the request, in UTC [RFC3339](https://tools.ietf.org/html/rfc3339#section-5.8) format(for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.
  1236  func (o SpotInstanceRequestOutput) ValidFrom() pulumi.StringOutput {
  1237  	return o.ApplyT(func(v *SpotInstanceRequest) pulumi.StringOutput { return v.ValidFrom }).(pulumi.StringOutput)
  1238  }
  1239  
  1240  // The end date and time of the request, in UTC [RFC3339](https://tools.ietf.org/html/rfc3339#section-5.8) format(for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new Spot instance requests are placed or enabled to fulfill the request. The default end date is 7 days from the current date.
  1241  func (o SpotInstanceRequestOutput) ValidUntil() pulumi.StringOutput {
  1242  	return o.ApplyT(func(v *SpotInstanceRequest) pulumi.StringOutput { return v.ValidUntil }).(pulumi.StringOutput)
  1243  }
  1244  
  1245  // Map of tags to assign, at instance-creation time, to root and EBS volumes.
  1246  //
  1247  // > **NOTE:** Do not use `volumeTags` if you plan to manage block device tags outside the `ec2.Instance` configuration, such as using `tags` in an `ebs.Volume` resource attached via `ec2.VolumeAttachment`. Doing so will result in resource cycling and inconsistent behavior.
  1248  func (o SpotInstanceRequestOutput) VolumeTags() pulumi.StringMapOutput {
  1249  	return o.ApplyT(func(v *SpotInstanceRequest) pulumi.StringMapOutput { return v.VolumeTags }).(pulumi.StringMapOutput)
  1250  }
  1251  
  1252  // List of security group IDs to associate with.
  1253  func (o SpotInstanceRequestOutput) VpcSecurityGroupIds() pulumi.StringArrayOutput {
  1254  	return o.ApplyT(func(v *SpotInstanceRequest) pulumi.StringArrayOutput { return v.VpcSecurityGroupIds }).(pulumi.StringArrayOutput)
  1255  }
  1256  
  1257  // If set, this provider will
  1258  // wait for the Spot Request to be fulfilled, and will throw an error if the
  1259  // timeout of 10m is reached.
  1260  func (o SpotInstanceRequestOutput) WaitForFulfillment() pulumi.BoolPtrOutput {
  1261  	return o.ApplyT(func(v *SpotInstanceRequest) pulumi.BoolPtrOutput { return v.WaitForFulfillment }).(pulumi.BoolPtrOutput)
  1262  }
  1263  
  1264  type SpotInstanceRequestArrayOutput struct{ *pulumi.OutputState }
  1265  
  1266  func (SpotInstanceRequestArrayOutput) ElementType() reflect.Type {
  1267  	return reflect.TypeOf((*[]*SpotInstanceRequest)(nil)).Elem()
  1268  }
  1269  
  1270  func (o SpotInstanceRequestArrayOutput) ToSpotInstanceRequestArrayOutput() SpotInstanceRequestArrayOutput {
  1271  	return o
  1272  }
  1273  
  1274  func (o SpotInstanceRequestArrayOutput) ToSpotInstanceRequestArrayOutputWithContext(ctx context.Context) SpotInstanceRequestArrayOutput {
  1275  	return o
  1276  }
  1277  
  1278  func (o SpotInstanceRequestArrayOutput) Index(i pulumi.IntInput) SpotInstanceRequestOutput {
  1279  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SpotInstanceRequest {
  1280  		return vs[0].([]*SpotInstanceRequest)[vs[1].(int)]
  1281  	}).(SpotInstanceRequestOutput)
  1282  }
  1283  
  1284  type SpotInstanceRequestMapOutput struct{ *pulumi.OutputState }
  1285  
  1286  func (SpotInstanceRequestMapOutput) ElementType() reflect.Type {
  1287  	return reflect.TypeOf((*map[string]*SpotInstanceRequest)(nil)).Elem()
  1288  }
  1289  
  1290  func (o SpotInstanceRequestMapOutput) ToSpotInstanceRequestMapOutput() SpotInstanceRequestMapOutput {
  1291  	return o
  1292  }
  1293  
  1294  func (o SpotInstanceRequestMapOutput) ToSpotInstanceRequestMapOutputWithContext(ctx context.Context) SpotInstanceRequestMapOutput {
  1295  	return o
  1296  }
  1297  
  1298  func (o SpotInstanceRequestMapOutput) MapIndex(k pulumi.StringInput) SpotInstanceRequestOutput {
  1299  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SpotInstanceRequest {
  1300  		return vs[0].(map[string]*SpotInstanceRequest)[vs[1].(string)]
  1301  	}).(SpotInstanceRequestOutput)
  1302  }
  1303  
  1304  func init() {
  1305  	pulumi.RegisterInputType(reflect.TypeOf((*SpotInstanceRequestInput)(nil)).Elem(), &SpotInstanceRequest{})
  1306  	pulumi.RegisterInputType(reflect.TypeOf((*SpotInstanceRequestArrayInput)(nil)).Elem(), SpotInstanceRequestArray{})
  1307  	pulumi.RegisterInputType(reflect.TypeOf((*SpotInstanceRequestMapInput)(nil)).Elem(), SpotInstanceRequestMap{})
  1308  	pulumi.RegisterOutputType(SpotInstanceRequestOutput{})
  1309  	pulumi.RegisterOutputType(SpotInstanceRequestArrayOutput{})
  1310  	pulumi.RegisterOutputType(SpotInstanceRequestMapOutput{})
  1311  }