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

     1  // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
     2  // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
     3  
     4  package ec2
     5  
     6  import (
     7  	"context"
     8  	"reflect"
     9  
    10  	"errors"
    11  	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
    12  	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    13  )
    14  
    15  // Provides an EC2 Spot Fleet Request resource. This allows a fleet of Spot
    16  // instances to be requested on the Spot market.
    17  //
    18  // > **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.
    19  // We recommend using the EC2 Fleet or Auto Scaling Group resources instead.
    20  //
    21  // ## Example Usage
    22  //
    23  // ### Using launch specifications
    24  //
    25  // <!--Start PulumiCodeChooser -->
    26  // ```go
    27  // package main
    28  //
    29  // import (
    30  //
    31  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
    32  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    33  //
    34  // )
    35  //
    36  //	func main() {
    37  //		pulumi.Run(func(ctx *pulumi.Context) error {
    38  //			// Request a Spot fleet
    39  //			_, err := ec2.NewSpotFleetRequest(ctx, "cheap_compute", &ec2.SpotFleetRequestArgs{
    40  //				IamFleetRole:       pulumi.String("arn:aws:iam::12345678:role/spot-fleet"),
    41  //				SpotPrice:          pulumi.String("0.03"),
    42  //				AllocationStrategy: pulumi.String("diversified"),
    43  //				TargetCapacity:     pulumi.Int(6),
    44  //				ValidUntil:         pulumi.String("2019-11-04T20:44:20Z"),
    45  //				LaunchSpecifications: ec2.SpotFleetRequestLaunchSpecificationArray{
    46  //					&ec2.SpotFleetRequestLaunchSpecificationArgs{
    47  //						InstanceType:          pulumi.String("m4.10xlarge"),
    48  //						Ami:                   pulumi.String("ami-1234"),
    49  //						SpotPrice:             pulumi.String("2.793"),
    50  //						PlacementTenancy:      pulumi.String("dedicated"),
    51  //						IamInstanceProfileArn: pulumi.Any(example.Arn),
    52  //					},
    53  //					&ec2.SpotFleetRequestLaunchSpecificationArgs{
    54  //						InstanceType:          pulumi.String("m4.4xlarge"),
    55  //						Ami:                   pulumi.String("ami-5678"),
    56  //						KeyName:               pulumi.String("my-key"),
    57  //						SpotPrice:             pulumi.String("1.117"),
    58  //						IamInstanceProfileArn: pulumi.Any(example.Arn),
    59  //						AvailabilityZone:      pulumi.String("us-west-1a"),
    60  //						SubnetId:              pulumi.String("subnet-1234"),
    61  //						WeightedCapacity:      pulumi.String("35"),
    62  //						RootBlockDevices: ec2.SpotFleetRequestLaunchSpecificationRootBlockDeviceArray{
    63  //							&ec2.SpotFleetRequestLaunchSpecificationRootBlockDeviceArgs{
    64  //								VolumeSize: pulumi.Int(300),
    65  //								VolumeType: pulumi.String("gp2"),
    66  //							},
    67  //						},
    68  //						Tags: pulumi.StringMap{
    69  //							"Name": pulumi.String("spot-fleet-example"),
    70  //						},
    71  //					},
    72  //				},
    73  //			})
    74  //			if err != nil {
    75  //				return err
    76  //			}
    77  //			return nil
    78  //		})
    79  //	}
    80  //
    81  // ```
    82  // <!--End PulumiCodeChooser -->
    83  //
    84  // ### Using launch templates
    85  //
    86  // <!--Start PulumiCodeChooser -->
    87  // ```go
    88  // package main
    89  //
    90  // import (
    91  //
    92  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
    93  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    94  //
    95  // )
    96  //
    97  //	func main() {
    98  //		pulumi.Run(func(ctx *pulumi.Context) error {
    99  //			foo, err := ec2.NewLaunchTemplate(ctx, "foo", &ec2.LaunchTemplateArgs{
   100  //				Name:         pulumi.String("launch-template"),
   101  //				ImageId:      pulumi.String("ami-516b9131"),
   102  //				InstanceType: pulumi.String("m1.small"),
   103  //				KeyName:      pulumi.String("some-key"),
   104  //			})
   105  //			if err != nil {
   106  //				return err
   107  //			}
   108  //			_, err = ec2.NewSpotFleetRequest(ctx, "foo", &ec2.SpotFleetRequestArgs{
   109  //				IamFleetRole:   pulumi.String("arn:aws:iam::12345678:role/spot-fleet"),
   110  //				SpotPrice:      pulumi.String("0.005"),
   111  //				TargetCapacity: pulumi.Int(2),
   112  //				ValidUntil:     pulumi.String("2019-11-04T20:44:20Z"),
   113  //				LaunchTemplateConfigs: ec2.SpotFleetRequestLaunchTemplateConfigArray{
   114  //					&ec2.SpotFleetRequestLaunchTemplateConfigArgs{
   115  //						LaunchTemplateSpecification: &ec2.SpotFleetRequestLaunchTemplateConfigLaunchTemplateSpecificationArgs{
   116  //							Id:      foo.ID(),
   117  //							Version: foo.LatestVersion,
   118  //						},
   119  //					},
   120  //				},
   121  //			}, pulumi.DependsOn([]pulumi.Resource{
   122  //				test_attach,
   123  //			}))
   124  //			if err != nil {
   125  //				return err
   126  //			}
   127  //			return nil
   128  //		})
   129  //	}
   130  //
   131  // ```
   132  // <!--End PulumiCodeChooser -->
   133  //
   134  // > **NOTE:** This provider does not support the functionality where multiple `subnetId` or `availabilityZone` parameters can be specified in the same
   135  // launch configuration block. If you want to specify multiple values, then separate launch configuration blocks should be used or launch template overrides should be configured, one per subnet:
   136  //
   137  // ### Using multiple launch specifications
   138  //
   139  // <!--Start PulumiCodeChooser -->
   140  // ```go
   141  // package main
   142  //
   143  // import (
   144  //
   145  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
   146  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   147  //
   148  // )
   149  //
   150  //	func main() {
   151  //		pulumi.Run(func(ctx *pulumi.Context) error {
   152  //			_, err := ec2.NewSpotFleetRequest(ctx, "foo", &ec2.SpotFleetRequestArgs{
   153  //				IamFleetRole:   pulumi.String("arn:aws:iam::12345678:role/spot-fleet"),
   154  //				SpotPrice:      pulumi.String("0.005"),
   155  //				TargetCapacity: pulumi.Int(2),
   156  //				ValidUntil:     pulumi.String("2019-11-04T20:44:20Z"),
   157  //				LaunchSpecifications: ec2.SpotFleetRequestLaunchSpecificationArray{
   158  //					&ec2.SpotFleetRequestLaunchSpecificationArgs{
   159  //						InstanceType:     pulumi.String("m1.small"),
   160  //						Ami:              pulumi.String("ami-d06a90b0"),
   161  //						KeyName:          pulumi.String("my-key"),
   162  //						AvailabilityZone: pulumi.String("us-west-2a"),
   163  //					},
   164  //					&ec2.SpotFleetRequestLaunchSpecificationArgs{
   165  //						InstanceType:     pulumi.String("m5.large"),
   166  //						Ami:              pulumi.String("ami-d06a90b0"),
   167  //						KeyName:          pulumi.String("my-key"),
   168  //						AvailabilityZone: pulumi.String("us-west-2a"),
   169  //					},
   170  //				},
   171  //			})
   172  //			if err != nil {
   173  //				return err
   174  //			}
   175  //			return nil
   176  //		})
   177  //	}
   178  //
   179  // ```
   180  // <!--End PulumiCodeChooser -->
   181  //
   182  // > In this example, we use a `dynamic` block to define zero or more `launchSpecification` blocks, producing one for each element in the list of subnet ids.
   183  //
   184  // ### Using multiple launch configurations
   185  //
   186  // <!--Start PulumiCodeChooser -->
   187  // ```go
   188  // package main
   189  //
   190  // import (
   191  //
   192  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
   193  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   194  //
   195  // )
   196  // func main() {
   197  // pulumi.Run(func(ctx *pulumi.Context) error {
   198  // example, err := ec2.GetSubnets(ctx, &ec2.GetSubnetsArgs{
   199  // Filters: []ec2.GetSubnetsFilter{
   200  // {
   201  // Name: "vpc-id",
   202  // Values: interface{}{
   203  // vpcId,
   204  // },
   205  // },
   206  // },
   207  // }, nil);
   208  // if err != nil {
   209  // return err
   210  // }
   211  // foo, err := ec2.NewLaunchTemplate(ctx, "foo", &ec2.LaunchTemplateArgs{
   212  // Name: pulumi.String("launch-template"),
   213  // ImageId: pulumi.String("ami-516b9131"),
   214  // InstanceType: pulumi.String("m1.small"),
   215  // KeyName: pulumi.String("some-key"),
   216  // })
   217  // if err != nil {
   218  // return err
   219  // }
   220  // _, err = ec2.NewSpotFleetRequest(ctx, "foo", &ec2.SpotFleetRequestArgs{
   221  // IamFleetRole: pulumi.String("arn:aws:iam::12345678:role/spot-fleet"),
   222  // SpotPrice: pulumi.String("0.005"),
   223  // TargetCapacity: pulumi.Int(2),
   224  // ValidUntil: pulumi.String("2019-11-04T20:44:20Z"),
   225  // LaunchTemplateConfigs: ec2.SpotFleetRequestLaunchTemplateConfigArray{
   226  // &ec2.SpotFleetRequestLaunchTemplateConfigArgs{
   227  // LaunchTemplateSpecification: &ec2.SpotFleetRequestLaunchTemplateConfigLaunchTemplateSpecificationArgs{
   228  // Id: foo.ID(),
   229  // Version: foo.LatestVersion,
   230  // },
   231  // Overrides: ec2.SpotFleetRequestLaunchTemplateConfigOverrideArray{
   232  // &ec2.SpotFleetRequestLaunchTemplateConfigOverrideArgs{
   233  // SubnetId: pulumi.String(example.Ids[0]),
   234  // },
   235  // &ec2.SpotFleetRequestLaunchTemplateConfigOverrideArgs{
   236  // SubnetId: pulumi.String(example.Ids[1]),
   237  // },
   238  // &ec2.SpotFleetRequestLaunchTemplateConfigOverrideArgs{
   239  // SubnetId: pulumi.String(example.Ids[2]),
   240  // },
   241  // },
   242  // },
   243  // },
   244  // }, pulumi.DependsOn([]pulumi.Resource{
   245  // test_attach,
   246  // }))
   247  // if err != nil {
   248  // return err
   249  // }
   250  // return nil
   251  // })
   252  // }
   253  // ```
   254  // <!--End PulumiCodeChooser -->
   255  //
   256  // ## Import
   257  //
   258  // Using `pulumi import`, import Spot Fleet Requests using `id`. For example:
   259  //
   260  // ```sh
   261  // $ pulumi import aws:ec2/spotFleetRequest:SpotFleetRequest fleet sfr-005e9ec8-5546-4c31-b317-31a62325411e
   262  // ```
   263  type SpotFleetRequest struct {
   264  	pulumi.CustomResourceState
   265  
   266  	// Indicates how to allocate the target capacity across
   267  	// the Spot pools specified by the Spot fleet request. Valid values: `lowestPrice`, `diversified`, `capacityOptimized`, `capacityOptimizedPrioritized`, and `priceCapacityOptimized`. The default is
   268  	// `lowestPrice`.
   269  	AllocationStrategy pulumi.StringPtrOutput `pulumi:"allocationStrategy"`
   270  	ClientToken        pulumi.StringOutput    `pulumi:"clientToken"`
   271  	// Reserved.
   272  	Context pulumi.StringPtrOutput `pulumi:"context"`
   273  	// Indicates whether running Spot
   274  	// instances should be terminated if the target capacity of the Spot fleet
   275  	// request is decreased below the current size of the Spot fleet.
   276  	ExcessCapacityTerminationPolicy pulumi.StringPtrOutput `pulumi:"excessCapacityTerminationPolicy"`
   277  	// The type of fleet request. Indicates whether the Spot Fleet only requests the target
   278  	// capacity or also attempts to maintain it. Default is `maintain`.
   279  	FleetType pulumi.StringPtrOutput `pulumi:"fleetType"`
   280  	// Grants the Spot fleet permission to terminate
   281  	// Spot instances on your behalf when you cancel its Spot fleet request using
   282  	// CancelSpotFleetRequests or when the Spot fleet request expires, if you set
   283  	// terminateInstancesWithExpiration.
   284  	IamFleetRole pulumi.StringOutput `pulumi:"iamFleetRole"`
   285  	// Indicates whether a Spot
   286  	// instance stops or terminates when it is interrupted. Default is
   287  	// `terminate`.
   288  	InstanceInterruptionBehaviour pulumi.StringPtrOutput `pulumi:"instanceInterruptionBehaviour"`
   289  	// The number of Spot pools across which to allocate your target Spot capacity.
   290  	// Valid only when `allocationStrategy` is set to `lowestPrice`. Spot Fleet selects
   291  	// the cheapest Spot pools and evenly allocates your target Spot capacity across
   292  	// the number of Spot pools that you specify.
   293  	InstancePoolsToUseCount pulumi.IntPtrOutput `pulumi:"instancePoolsToUseCount"`
   294  	// Used to define the launch configuration of the
   295  	// spot-fleet request. Can be specified multiple times to define different bids
   296  	// across different markets and instance types. Conflicts with `launchTemplateConfig`. At least one of `launchSpecification` or `launchTemplateConfig` is required.
   297  	//
   298  	// **Note**: This takes in similar but not
   299  	// identical inputs as `ec2.Instance`.  There are limitations on
   300  	// what you can specify. See the list of officially supported inputs in the
   301  	// [reference documentation](http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotFleetLaunchSpecification.html). Any normal `ec2.Instance` parameter that corresponds to those inputs may be used and it have
   302  	// a additional parameter `iamInstanceProfileArn` takes `iam.InstanceProfile` attribute `arn` as input.
   303  	LaunchSpecifications SpotFleetRequestLaunchSpecificationArrayOutput `pulumi:"launchSpecifications"`
   304  	// Launch template configuration block. See Launch Template Configs below for more details. Conflicts with `launchSpecification`. At least one of `launchSpecification` or `launchTemplateConfig` is required.
   305  	LaunchTemplateConfigs SpotFleetRequestLaunchTemplateConfigArrayOutput `pulumi:"launchTemplateConfigs"`
   306  	// A list of elastic load balancer names to add to the Spot fleet.
   307  	LoadBalancers pulumi.StringArrayOutput `pulumi:"loadBalancers"`
   308  	// The order of the launch template overrides to use in fulfilling On-Demand capacity. the possible values are: `lowestPrice` and `prioritized`. the default is `lowestPrice`.
   309  	OnDemandAllocationStrategy pulumi.StringPtrOutput `pulumi:"onDemandAllocationStrategy"`
   310  	// The maximum amount per hour for On-Demand Instances that you're willing to pay. When the maximum amount you're willing to pay is reached, the fleet stops launching instances even if it hasn’t met the target capacity.
   311  	OnDemandMaxTotalPrice pulumi.StringPtrOutput `pulumi:"onDemandMaxTotalPrice"`
   312  	// The number of On-Demand units to request. If the request type is `maintain`, you can specify a target capacity of 0 and add capacity later.
   313  	OnDemandTargetCapacity pulumi.IntPtrOutput `pulumi:"onDemandTargetCapacity"`
   314  	// Indicates whether Spot fleet should replace unhealthy instances. Default `false`.
   315  	ReplaceUnhealthyInstances pulumi.BoolPtrOutput `pulumi:"replaceUnhealthyInstances"`
   316  	// Nested argument containing maintenance strategies for managing your Spot Instances that are at an elevated risk of being interrupted. Defined below.
   317  	SpotMaintenanceStrategies SpotFleetRequestSpotMaintenanceStrategiesPtrOutput `pulumi:"spotMaintenanceStrategies"`
   318  	// The maximum bid price per unit hour.
   319  	SpotPrice pulumi.StringPtrOutput `pulumi:"spotPrice"`
   320  	// The state of the Spot fleet request.
   321  	SpotRequestState pulumi.StringOutput `pulumi:"spotRequestState"`
   322  	// A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   323  	Tags pulumi.StringMapOutput `pulumi:"tags"`
   324  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   325  	//
   326  	// Deprecated: Please use `tags` instead.
   327  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
   328  	// The number of units to request. You can choose to set the
   329  	// target capacity in terms of instances or a performance characteristic that is
   330  	// important to your application workload, such as vCPUs, memory, or I/O.
   331  	TargetCapacity pulumi.IntOutput `pulumi:"targetCapacity"`
   332  	// The unit for the target capacity. This can only be done with `instanceRequirements` defined
   333  	TargetCapacityUnitType pulumi.StringPtrOutput `pulumi:"targetCapacityUnitType"`
   334  	// A list of `alb.TargetGroup` ARNs, for use with Application Load Balancing.
   335  	TargetGroupArns pulumi.StringArrayOutput `pulumi:"targetGroupArns"`
   336  	// Indicates whether running Spot
   337  	// instances should be terminated when the resource is deleted (and the Spot fleet request cancelled).
   338  	// If no value is specified, the value of the `terminateInstancesWithExpiration` argument is used.
   339  	TerminateInstancesOnDelete pulumi.StringPtrOutput `pulumi:"terminateInstancesOnDelete"`
   340  	// Indicates whether running Spot
   341  	// instances should be terminated when the Spot fleet request expires.
   342  	TerminateInstancesWithExpiration pulumi.BoolPtrOutput `pulumi:"terminateInstancesWithExpiration"`
   343  	// 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.
   344  	ValidFrom pulumi.StringPtrOutput `pulumi:"validFrom"`
   345  	// 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.
   346  	ValidUntil pulumi.StringPtrOutput `pulumi:"validUntil"`
   347  	// If set, this provider will
   348  	// wait for the Spot Request to be fulfilled, and will throw an error if the
   349  	// timeout of 10m is reached.
   350  	WaitForFulfillment pulumi.BoolPtrOutput `pulumi:"waitForFulfillment"`
   351  }
   352  
   353  // NewSpotFleetRequest registers a new resource with the given unique name, arguments, and options.
   354  func NewSpotFleetRequest(ctx *pulumi.Context,
   355  	name string, args *SpotFleetRequestArgs, opts ...pulumi.ResourceOption) (*SpotFleetRequest, error) {
   356  	if args == nil {
   357  		return nil, errors.New("missing one or more required arguments")
   358  	}
   359  
   360  	if args.IamFleetRole == nil {
   361  		return nil, errors.New("invalid value for required argument 'IamFleetRole'")
   362  	}
   363  	if args.TargetCapacity == nil {
   364  		return nil, errors.New("invalid value for required argument 'TargetCapacity'")
   365  	}
   366  	opts = internal.PkgResourceDefaultOpts(opts)
   367  	var resource SpotFleetRequest
   368  	err := ctx.RegisterResource("aws:ec2/spotFleetRequest:SpotFleetRequest", name, args, &resource, opts...)
   369  	if err != nil {
   370  		return nil, err
   371  	}
   372  	return &resource, nil
   373  }
   374  
   375  // GetSpotFleetRequest gets an existing SpotFleetRequest resource's state with the given name, ID, and optional
   376  // state properties that are used to uniquely qualify the lookup (nil if not required).
   377  func GetSpotFleetRequest(ctx *pulumi.Context,
   378  	name string, id pulumi.IDInput, state *SpotFleetRequestState, opts ...pulumi.ResourceOption) (*SpotFleetRequest, error) {
   379  	var resource SpotFleetRequest
   380  	err := ctx.ReadResource("aws:ec2/spotFleetRequest:SpotFleetRequest", name, id, state, &resource, opts...)
   381  	if err != nil {
   382  		return nil, err
   383  	}
   384  	return &resource, nil
   385  }
   386  
   387  // Input properties used for looking up and filtering SpotFleetRequest resources.
   388  type spotFleetRequestState struct {
   389  	// Indicates how to allocate the target capacity across
   390  	// the Spot pools specified by the Spot fleet request. Valid values: `lowestPrice`, `diversified`, `capacityOptimized`, `capacityOptimizedPrioritized`, and `priceCapacityOptimized`. The default is
   391  	// `lowestPrice`.
   392  	AllocationStrategy *string `pulumi:"allocationStrategy"`
   393  	ClientToken        *string `pulumi:"clientToken"`
   394  	// Reserved.
   395  	Context *string `pulumi:"context"`
   396  	// Indicates whether running Spot
   397  	// instances should be terminated if the target capacity of the Spot fleet
   398  	// request is decreased below the current size of the Spot fleet.
   399  	ExcessCapacityTerminationPolicy *string `pulumi:"excessCapacityTerminationPolicy"`
   400  	// The type of fleet request. Indicates whether the Spot Fleet only requests the target
   401  	// capacity or also attempts to maintain it. Default is `maintain`.
   402  	FleetType *string `pulumi:"fleetType"`
   403  	// Grants the Spot fleet permission to terminate
   404  	// Spot instances on your behalf when you cancel its Spot fleet request using
   405  	// CancelSpotFleetRequests or when the Spot fleet request expires, if you set
   406  	// terminateInstancesWithExpiration.
   407  	IamFleetRole *string `pulumi:"iamFleetRole"`
   408  	// Indicates whether a Spot
   409  	// instance stops or terminates when it is interrupted. Default is
   410  	// `terminate`.
   411  	InstanceInterruptionBehaviour *string `pulumi:"instanceInterruptionBehaviour"`
   412  	// The number of Spot pools across which to allocate your target Spot capacity.
   413  	// Valid only when `allocationStrategy` is set to `lowestPrice`. Spot Fleet selects
   414  	// the cheapest Spot pools and evenly allocates your target Spot capacity across
   415  	// the number of Spot pools that you specify.
   416  	InstancePoolsToUseCount *int `pulumi:"instancePoolsToUseCount"`
   417  	// Used to define the launch configuration of the
   418  	// spot-fleet request. Can be specified multiple times to define different bids
   419  	// across different markets and instance types. Conflicts with `launchTemplateConfig`. At least one of `launchSpecification` or `launchTemplateConfig` is required.
   420  	//
   421  	// **Note**: This takes in similar but not
   422  	// identical inputs as `ec2.Instance`.  There are limitations on
   423  	// what you can specify. See the list of officially supported inputs in the
   424  	// [reference documentation](http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotFleetLaunchSpecification.html). Any normal `ec2.Instance` parameter that corresponds to those inputs may be used and it have
   425  	// a additional parameter `iamInstanceProfileArn` takes `iam.InstanceProfile` attribute `arn` as input.
   426  	LaunchSpecifications []SpotFleetRequestLaunchSpecification `pulumi:"launchSpecifications"`
   427  	// Launch template configuration block. See Launch Template Configs below for more details. Conflicts with `launchSpecification`. At least one of `launchSpecification` or `launchTemplateConfig` is required.
   428  	LaunchTemplateConfigs []SpotFleetRequestLaunchTemplateConfig `pulumi:"launchTemplateConfigs"`
   429  	// A list of elastic load balancer names to add to the Spot fleet.
   430  	LoadBalancers []string `pulumi:"loadBalancers"`
   431  	// The order of the launch template overrides to use in fulfilling On-Demand capacity. the possible values are: `lowestPrice` and `prioritized`. the default is `lowestPrice`.
   432  	OnDemandAllocationStrategy *string `pulumi:"onDemandAllocationStrategy"`
   433  	// The maximum amount per hour for On-Demand Instances that you're willing to pay. When the maximum amount you're willing to pay is reached, the fleet stops launching instances even if it hasn’t met the target capacity.
   434  	OnDemandMaxTotalPrice *string `pulumi:"onDemandMaxTotalPrice"`
   435  	// The number of On-Demand units to request. If the request type is `maintain`, you can specify a target capacity of 0 and add capacity later.
   436  	OnDemandTargetCapacity *int `pulumi:"onDemandTargetCapacity"`
   437  	// Indicates whether Spot fleet should replace unhealthy instances. Default `false`.
   438  	ReplaceUnhealthyInstances *bool `pulumi:"replaceUnhealthyInstances"`
   439  	// Nested argument containing maintenance strategies for managing your Spot Instances that are at an elevated risk of being interrupted. Defined below.
   440  	SpotMaintenanceStrategies *SpotFleetRequestSpotMaintenanceStrategies `pulumi:"spotMaintenanceStrategies"`
   441  	// The maximum bid price per unit hour.
   442  	SpotPrice *string `pulumi:"spotPrice"`
   443  	// The state of the Spot fleet request.
   444  	SpotRequestState *string `pulumi:"spotRequestState"`
   445  	// A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   446  	Tags map[string]string `pulumi:"tags"`
   447  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   448  	//
   449  	// Deprecated: Please use `tags` instead.
   450  	TagsAll map[string]string `pulumi:"tagsAll"`
   451  	// The number of units to request. You can choose to set the
   452  	// target capacity in terms of instances or a performance characteristic that is
   453  	// important to your application workload, such as vCPUs, memory, or I/O.
   454  	TargetCapacity *int `pulumi:"targetCapacity"`
   455  	// The unit for the target capacity. This can only be done with `instanceRequirements` defined
   456  	TargetCapacityUnitType *string `pulumi:"targetCapacityUnitType"`
   457  	// A list of `alb.TargetGroup` ARNs, for use with Application Load Balancing.
   458  	TargetGroupArns []string `pulumi:"targetGroupArns"`
   459  	// Indicates whether running Spot
   460  	// instances should be terminated when the resource is deleted (and the Spot fleet request cancelled).
   461  	// If no value is specified, the value of the `terminateInstancesWithExpiration` argument is used.
   462  	TerminateInstancesOnDelete *string `pulumi:"terminateInstancesOnDelete"`
   463  	// Indicates whether running Spot
   464  	// instances should be terminated when the Spot fleet request expires.
   465  	TerminateInstancesWithExpiration *bool `pulumi:"terminateInstancesWithExpiration"`
   466  	// 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.
   467  	ValidFrom *string `pulumi:"validFrom"`
   468  	// 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.
   469  	ValidUntil *string `pulumi:"validUntil"`
   470  	// If set, this provider will
   471  	// wait for the Spot Request to be fulfilled, and will throw an error if the
   472  	// timeout of 10m is reached.
   473  	WaitForFulfillment *bool `pulumi:"waitForFulfillment"`
   474  }
   475  
   476  type SpotFleetRequestState struct {
   477  	// Indicates how to allocate the target capacity across
   478  	// the Spot pools specified by the Spot fleet request. Valid values: `lowestPrice`, `diversified`, `capacityOptimized`, `capacityOptimizedPrioritized`, and `priceCapacityOptimized`. The default is
   479  	// `lowestPrice`.
   480  	AllocationStrategy pulumi.StringPtrInput
   481  	ClientToken        pulumi.StringPtrInput
   482  	// Reserved.
   483  	Context pulumi.StringPtrInput
   484  	// Indicates whether running Spot
   485  	// instances should be terminated if the target capacity of the Spot fleet
   486  	// request is decreased below the current size of the Spot fleet.
   487  	ExcessCapacityTerminationPolicy pulumi.StringPtrInput
   488  	// The type of fleet request. Indicates whether the Spot Fleet only requests the target
   489  	// capacity or also attempts to maintain it. Default is `maintain`.
   490  	FleetType pulumi.StringPtrInput
   491  	// Grants the Spot fleet permission to terminate
   492  	// Spot instances on your behalf when you cancel its Spot fleet request using
   493  	// CancelSpotFleetRequests or when the Spot fleet request expires, if you set
   494  	// terminateInstancesWithExpiration.
   495  	IamFleetRole pulumi.StringPtrInput
   496  	// Indicates whether a Spot
   497  	// instance stops or terminates when it is interrupted. Default is
   498  	// `terminate`.
   499  	InstanceInterruptionBehaviour pulumi.StringPtrInput
   500  	// The number of Spot pools across which to allocate your target Spot capacity.
   501  	// Valid only when `allocationStrategy` is set to `lowestPrice`. Spot Fleet selects
   502  	// the cheapest Spot pools and evenly allocates your target Spot capacity across
   503  	// the number of Spot pools that you specify.
   504  	InstancePoolsToUseCount pulumi.IntPtrInput
   505  	// Used to define the launch configuration of the
   506  	// spot-fleet request. Can be specified multiple times to define different bids
   507  	// across different markets and instance types. Conflicts with `launchTemplateConfig`. At least one of `launchSpecification` or `launchTemplateConfig` is required.
   508  	//
   509  	// **Note**: This takes in similar but not
   510  	// identical inputs as `ec2.Instance`.  There are limitations on
   511  	// what you can specify. See the list of officially supported inputs in the
   512  	// [reference documentation](http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotFleetLaunchSpecification.html). Any normal `ec2.Instance` parameter that corresponds to those inputs may be used and it have
   513  	// a additional parameter `iamInstanceProfileArn` takes `iam.InstanceProfile` attribute `arn` as input.
   514  	LaunchSpecifications SpotFleetRequestLaunchSpecificationArrayInput
   515  	// Launch template configuration block. See Launch Template Configs below for more details. Conflicts with `launchSpecification`. At least one of `launchSpecification` or `launchTemplateConfig` is required.
   516  	LaunchTemplateConfigs SpotFleetRequestLaunchTemplateConfigArrayInput
   517  	// A list of elastic load balancer names to add to the Spot fleet.
   518  	LoadBalancers pulumi.StringArrayInput
   519  	// The order of the launch template overrides to use in fulfilling On-Demand capacity. the possible values are: `lowestPrice` and `prioritized`. the default is `lowestPrice`.
   520  	OnDemandAllocationStrategy pulumi.StringPtrInput
   521  	// The maximum amount per hour for On-Demand Instances that you're willing to pay. When the maximum amount you're willing to pay is reached, the fleet stops launching instances even if it hasn’t met the target capacity.
   522  	OnDemandMaxTotalPrice pulumi.StringPtrInput
   523  	// The number of On-Demand units to request. If the request type is `maintain`, you can specify a target capacity of 0 and add capacity later.
   524  	OnDemandTargetCapacity pulumi.IntPtrInput
   525  	// Indicates whether Spot fleet should replace unhealthy instances. Default `false`.
   526  	ReplaceUnhealthyInstances pulumi.BoolPtrInput
   527  	// Nested argument containing maintenance strategies for managing your Spot Instances that are at an elevated risk of being interrupted. Defined below.
   528  	SpotMaintenanceStrategies SpotFleetRequestSpotMaintenanceStrategiesPtrInput
   529  	// The maximum bid price per unit hour.
   530  	SpotPrice pulumi.StringPtrInput
   531  	// The state of the Spot fleet request.
   532  	SpotRequestState pulumi.StringPtrInput
   533  	// A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   534  	Tags pulumi.StringMapInput
   535  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   536  	//
   537  	// Deprecated: Please use `tags` instead.
   538  	TagsAll pulumi.StringMapInput
   539  	// The number of units to request. You can choose to set the
   540  	// target capacity in terms of instances or a performance characteristic that is
   541  	// important to your application workload, such as vCPUs, memory, or I/O.
   542  	TargetCapacity pulumi.IntPtrInput
   543  	// The unit for the target capacity. This can only be done with `instanceRequirements` defined
   544  	TargetCapacityUnitType pulumi.StringPtrInput
   545  	// A list of `alb.TargetGroup` ARNs, for use with Application Load Balancing.
   546  	TargetGroupArns pulumi.StringArrayInput
   547  	// Indicates whether running Spot
   548  	// instances should be terminated when the resource is deleted (and the Spot fleet request cancelled).
   549  	// If no value is specified, the value of the `terminateInstancesWithExpiration` argument is used.
   550  	TerminateInstancesOnDelete pulumi.StringPtrInput
   551  	// Indicates whether running Spot
   552  	// instances should be terminated when the Spot fleet request expires.
   553  	TerminateInstancesWithExpiration pulumi.BoolPtrInput
   554  	// 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.
   555  	ValidFrom pulumi.StringPtrInput
   556  	// 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.
   557  	ValidUntil pulumi.StringPtrInput
   558  	// If set, this provider will
   559  	// wait for the Spot Request to be fulfilled, and will throw an error if the
   560  	// timeout of 10m is reached.
   561  	WaitForFulfillment pulumi.BoolPtrInput
   562  }
   563  
   564  func (SpotFleetRequestState) ElementType() reflect.Type {
   565  	return reflect.TypeOf((*spotFleetRequestState)(nil)).Elem()
   566  }
   567  
   568  type spotFleetRequestArgs struct {
   569  	// Indicates how to allocate the target capacity across
   570  	// the Spot pools specified by the Spot fleet request. Valid values: `lowestPrice`, `diversified`, `capacityOptimized`, `capacityOptimizedPrioritized`, and `priceCapacityOptimized`. The default is
   571  	// `lowestPrice`.
   572  	AllocationStrategy *string `pulumi:"allocationStrategy"`
   573  	// Reserved.
   574  	Context *string `pulumi:"context"`
   575  	// Indicates whether running Spot
   576  	// instances should be terminated if the target capacity of the Spot fleet
   577  	// request is decreased below the current size of the Spot fleet.
   578  	ExcessCapacityTerminationPolicy *string `pulumi:"excessCapacityTerminationPolicy"`
   579  	// The type of fleet request. Indicates whether the Spot Fleet only requests the target
   580  	// capacity or also attempts to maintain it. Default is `maintain`.
   581  	FleetType *string `pulumi:"fleetType"`
   582  	// Grants the Spot fleet permission to terminate
   583  	// Spot instances on your behalf when you cancel its Spot fleet request using
   584  	// CancelSpotFleetRequests or when the Spot fleet request expires, if you set
   585  	// terminateInstancesWithExpiration.
   586  	IamFleetRole string `pulumi:"iamFleetRole"`
   587  	// Indicates whether a Spot
   588  	// instance stops or terminates when it is interrupted. Default is
   589  	// `terminate`.
   590  	InstanceInterruptionBehaviour *string `pulumi:"instanceInterruptionBehaviour"`
   591  	// The number of Spot pools across which to allocate your target Spot capacity.
   592  	// Valid only when `allocationStrategy` is set to `lowestPrice`. Spot Fleet selects
   593  	// the cheapest Spot pools and evenly allocates your target Spot capacity across
   594  	// the number of Spot pools that you specify.
   595  	InstancePoolsToUseCount *int `pulumi:"instancePoolsToUseCount"`
   596  	// Used to define the launch configuration of the
   597  	// spot-fleet request. Can be specified multiple times to define different bids
   598  	// across different markets and instance types. Conflicts with `launchTemplateConfig`. At least one of `launchSpecification` or `launchTemplateConfig` is required.
   599  	//
   600  	// **Note**: This takes in similar but not
   601  	// identical inputs as `ec2.Instance`.  There are limitations on
   602  	// what you can specify. See the list of officially supported inputs in the
   603  	// [reference documentation](http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotFleetLaunchSpecification.html). Any normal `ec2.Instance` parameter that corresponds to those inputs may be used and it have
   604  	// a additional parameter `iamInstanceProfileArn` takes `iam.InstanceProfile` attribute `arn` as input.
   605  	LaunchSpecifications []SpotFleetRequestLaunchSpecification `pulumi:"launchSpecifications"`
   606  	// Launch template configuration block. See Launch Template Configs below for more details. Conflicts with `launchSpecification`. At least one of `launchSpecification` or `launchTemplateConfig` is required.
   607  	LaunchTemplateConfigs []SpotFleetRequestLaunchTemplateConfig `pulumi:"launchTemplateConfigs"`
   608  	// A list of elastic load balancer names to add to the Spot fleet.
   609  	LoadBalancers []string `pulumi:"loadBalancers"`
   610  	// The order of the launch template overrides to use in fulfilling On-Demand capacity. the possible values are: `lowestPrice` and `prioritized`. the default is `lowestPrice`.
   611  	OnDemandAllocationStrategy *string `pulumi:"onDemandAllocationStrategy"`
   612  	// The maximum amount per hour for On-Demand Instances that you're willing to pay. When the maximum amount you're willing to pay is reached, the fleet stops launching instances even if it hasn’t met the target capacity.
   613  	OnDemandMaxTotalPrice *string `pulumi:"onDemandMaxTotalPrice"`
   614  	// The number of On-Demand units to request. If the request type is `maintain`, you can specify a target capacity of 0 and add capacity later.
   615  	OnDemandTargetCapacity *int `pulumi:"onDemandTargetCapacity"`
   616  	// Indicates whether Spot fleet should replace unhealthy instances. Default `false`.
   617  	ReplaceUnhealthyInstances *bool `pulumi:"replaceUnhealthyInstances"`
   618  	// Nested argument containing maintenance strategies for managing your Spot Instances that are at an elevated risk of being interrupted. Defined below.
   619  	SpotMaintenanceStrategies *SpotFleetRequestSpotMaintenanceStrategies `pulumi:"spotMaintenanceStrategies"`
   620  	// The maximum bid price per unit hour.
   621  	SpotPrice *string `pulumi:"spotPrice"`
   622  	// A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   623  	Tags map[string]string `pulumi:"tags"`
   624  	// The number of units to request. You can choose to set the
   625  	// target capacity in terms of instances or a performance characteristic that is
   626  	// important to your application workload, such as vCPUs, memory, or I/O.
   627  	TargetCapacity int `pulumi:"targetCapacity"`
   628  	// The unit for the target capacity. This can only be done with `instanceRequirements` defined
   629  	TargetCapacityUnitType *string `pulumi:"targetCapacityUnitType"`
   630  	// A list of `alb.TargetGroup` ARNs, for use with Application Load Balancing.
   631  	TargetGroupArns []string `pulumi:"targetGroupArns"`
   632  	// Indicates whether running Spot
   633  	// instances should be terminated when the resource is deleted (and the Spot fleet request cancelled).
   634  	// If no value is specified, the value of the `terminateInstancesWithExpiration` argument is used.
   635  	TerminateInstancesOnDelete *string `pulumi:"terminateInstancesOnDelete"`
   636  	// Indicates whether running Spot
   637  	// instances should be terminated when the Spot fleet request expires.
   638  	TerminateInstancesWithExpiration *bool `pulumi:"terminateInstancesWithExpiration"`
   639  	// 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.
   640  	ValidFrom *string `pulumi:"validFrom"`
   641  	// 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.
   642  	ValidUntil *string `pulumi:"validUntil"`
   643  	// If set, this provider will
   644  	// wait for the Spot Request to be fulfilled, and will throw an error if the
   645  	// timeout of 10m is reached.
   646  	WaitForFulfillment *bool `pulumi:"waitForFulfillment"`
   647  }
   648  
   649  // The set of arguments for constructing a SpotFleetRequest resource.
   650  type SpotFleetRequestArgs struct {
   651  	// Indicates how to allocate the target capacity across
   652  	// the Spot pools specified by the Spot fleet request. Valid values: `lowestPrice`, `diversified`, `capacityOptimized`, `capacityOptimizedPrioritized`, and `priceCapacityOptimized`. The default is
   653  	// `lowestPrice`.
   654  	AllocationStrategy pulumi.StringPtrInput
   655  	// Reserved.
   656  	Context pulumi.StringPtrInput
   657  	// Indicates whether running Spot
   658  	// instances should be terminated if the target capacity of the Spot fleet
   659  	// request is decreased below the current size of the Spot fleet.
   660  	ExcessCapacityTerminationPolicy pulumi.StringPtrInput
   661  	// The type of fleet request. Indicates whether the Spot Fleet only requests the target
   662  	// capacity or also attempts to maintain it. Default is `maintain`.
   663  	FleetType pulumi.StringPtrInput
   664  	// Grants the Spot fleet permission to terminate
   665  	// Spot instances on your behalf when you cancel its Spot fleet request using
   666  	// CancelSpotFleetRequests or when the Spot fleet request expires, if you set
   667  	// terminateInstancesWithExpiration.
   668  	IamFleetRole pulumi.StringInput
   669  	// Indicates whether a Spot
   670  	// instance stops or terminates when it is interrupted. Default is
   671  	// `terminate`.
   672  	InstanceInterruptionBehaviour pulumi.StringPtrInput
   673  	// The number of Spot pools across which to allocate your target Spot capacity.
   674  	// Valid only when `allocationStrategy` is set to `lowestPrice`. Spot Fleet selects
   675  	// the cheapest Spot pools and evenly allocates your target Spot capacity across
   676  	// the number of Spot pools that you specify.
   677  	InstancePoolsToUseCount pulumi.IntPtrInput
   678  	// Used to define the launch configuration of the
   679  	// spot-fleet request. Can be specified multiple times to define different bids
   680  	// across different markets and instance types. Conflicts with `launchTemplateConfig`. At least one of `launchSpecification` or `launchTemplateConfig` is required.
   681  	//
   682  	// **Note**: This takes in similar but not
   683  	// identical inputs as `ec2.Instance`.  There are limitations on
   684  	// what you can specify. See the list of officially supported inputs in the
   685  	// [reference documentation](http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotFleetLaunchSpecification.html). Any normal `ec2.Instance` parameter that corresponds to those inputs may be used and it have
   686  	// a additional parameter `iamInstanceProfileArn` takes `iam.InstanceProfile` attribute `arn` as input.
   687  	LaunchSpecifications SpotFleetRequestLaunchSpecificationArrayInput
   688  	// Launch template configuration block. See Launch Template Configs below for more details. Conflicts with `launchSpecification`. At least one of `launchSpecification` or `launchTemplateConfig` is required.
   689  	LaunchTemplateConfigs SpotFleetRequestLaunchTemplateConfigArrayInput
   690  	// A list of elastic load balancer names to add to the Spot fleet.
   691  	LoadBalancers pulumi.StringArrayInput
   692  	// The order of the launch template overrides to use in fulfilling On-Demand capacity. the possible values are: `lowestPrice` and `prioritized`. the default is `lowestPrice`.
   693  	OnDemandAllocationStrategy pulumi.StringPtrInput
   694  	// The maximum amount per hour for On-Demand Instances that you're willing to pay. When the maximum amount you're willing to pay is reached, the fleet stops launching instances even if it hasn’t met the target capacity.
   695  	OnDemandMaxTotalPrice pulumi.StringPtrInput
   696  	// The number of On-Demand units to request. If the request type is `maintain`, you can specify a target capacity of 0 and add capacity later.
   697  	OnDemandTargetCapacity pulumi.IntPtrInput
   698  	// Indicates whether Spot fleet should replace unhealthy instances. Default `false`.
   699  	ReplaceUnhealthyInstances pulumi.BoolPtrInput
   700  	// Nested argument containing maintenance strategies for managing your Spot Instances that are at an elevated risk of being interrupted. Defined below.
   701  	SpotMaintenanceStrategies SpotFleetRequestSpotMaintenanceStrategiesPtrInput
   702  	// The maximum bid price per unit hour.
   703  	SpotPrice pulumi.StringPtrInput
   704  	// A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   705  	Tags pulumi.StringMapInput
   706  	// The number of units to request. You can choose to set the
   707  	// target capacity in terms of instances or a performance characteristic that is
   708  	// important to your application workload, such as vCPUs, memory, or I/O.
   709  	TargetCapacity pulumi.IntInput
   710  	// The unit for the target capacity. This can only be done with `instanceRequirements` defined
   711  	TargetCapacityUnitType pulumi.StringPtrInput
   712  	// A list of `alb.TargetGroup` ARNs, for use with Application Load Balancing.
   713  	TargetGroupArns pulumi.StringArrayInput
   714  	// Indicates whether running Spot
   715  	// instances should be terminated when the resource is deleted (and the Spot fleet request cancelled).
   716  	// If no value is specified, the value of the `terminateInstancesWithExpiration` argument is used.
   717  	TerminateInstancesOnDelete pulumi.StringPtrInput
   718  	// Indicates whether running Spot
   719  	// instances should be terminated when the Spot fleet request expires.
   720  	TerminateInstancesWithExpiration pulumi.BoolPtrInput
   721  	// 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.
   722  	ValidFrom pulumi.StringPtrInput
   723  	// 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.
   724  	ValidUntil pulumi.StringPtrInput
   725  	// If set, this provider will
   726  	// wait for the Spot Request to be fulfilled, and will throw an error if the
   727  	// timeout of 10m is reached.
   728  	WaitForFulfillment pulumi.BoolPtrInput
   729  }
   730  
   731  func (SpotFleetRequestArgs) ElementType() reflect.Type {
   732  	return reflect.TypeOf((*spotFleetRequestArgs)(nil)).Elem()
   733  }
   734  
   735  type SpotFleetRequestInput interface {
   736  	pulumi.Input
   737  
   738  	ToSpotFleetRequestOutput() SpotFleetRequestOutput
   739  	ToSpotFleetRequestOutputWithContext(ctx context.Context) SpotFleetRequestOutput
   740  }
   741  
   742  func (*SpotFleetRequest) ElementType() reflect.Type {
   743  	return reflect.TypeOf((**SpotFleetRequest)(nil)).Elem()
   744  }
   745  
   746  func (i *SpotFleetRequest) ToSpotFleetRequestOutput() SpotFleetRequestOutput {
   747  	return i.ToSpotFleetRequestOutputWithContext(context.Background())
   748  }
   749  
   750  func (i *SpotFleetRequest) ToSpotFleetRequestOutputWithContext(ctx context.Context) SpotFleetRequestOutput {
   751  	return pulumi.ToOutputWithContext(ctx, i).(SpotFleetRequestOutput)
   752  }
   753  
   754  // SpotFleetRequestArrayInput is an input type that accepts SpotFleetRequestArray and SpotFleetRequestArrayOutput values.
   755  // You can construct a concrete instance of `SpotFleetRequestArrayInput` via:
   756  //
   757  //	SpotFleetRequestArray{ SpotFleetRequestArgs{...} }
   758  type SpotFleetRequestArrayInput interface {
   759  	pulumi.Input
   760  
   761  	ToSpotFleetRequestArrayOutput() SpotFleetRequestArrayOutput
   762  	ToSpotFleetRequestArrayOutputWithContext(context.Context) SpotFleetRequestArrayOutput
   763  }
   764  
   765  type SpotFleetRequestArray []SpotFleetRequestInput
   766  
   767  func (SpotFleetRequestArray) ElementType() reflect.Type {
   768  	return reflect.TypeOf((*[]*SpotFleetRequest)(nil)).Elem()
   769  }
   770  
   771  func (i SpotFleetRequestArray) ToSpotFleetRequestArrayOutput() SpotFleetRequestArrayOutput {
   772  	return i.ToSpotFleetRequestArrayOutputWithContext(context.Background())
   773  }
   774  
   775  func (i SpotFleetRequestArray) ToSpotFleetRequestArrayOutputWithContext(ctx context.Context) SpotFleetRequestArrayOutput {
   776  	return pulumi.ToOutputWithContext(ctx, i).(SpotFleetRequestArrayOutput)
   777  }
   778  
   779  // SpotFleetRequestMapInput is an input type that accepts SpotFleetRequestMap and SpotFleetRequestMapOutput values.
   780  // You can construct a concrete instance of `SpotFleetRequestMapInput` via:
   781  //
   782  //	SpotFleetRequestMap{ "key": SpotFleetRequestArgs{...} }
   783  type SpotFleetRequestMapInput interface {
   784  	pulumi.Input
   785  
   786  	ToSpotFleetRequestMapOutput() SpotFleetRequestMapOutput
   787  	ToSpotFleetRequestMapOutputWithContext(context.Context) SpotFleetRequestMapOutput
   788  }
   789  
   790  type SpotFleetRequestMap map[string]SpotFleetRequestInput
   791  
   792  func (SpotFleetRequestMap) ElementType() reflect.Type {
   793  	return reflect.TypeOf((*map[string]*SpotFleetRequest)(nil)).Elem()
   794  }
   795  
   796  func (i SpotFleetRequestMap) ToSpotFleetRequestMapOutput() SpotFleetRequestMapOutput {
   797  	return i.ToSpotFleetRequestMapOutputWithContext(context.Background())
   798  }
   799  
   800  func (i SpotFleetRequestMap) ToSpotFleetRequestMapOutputWithContext(ctx context.Context) SpotFleetRequestMapOutput {
   801  	return pulumi.ToOutputWithContext(ctx, i).(SpotFleetRequestMapOutput)
   802  }
   803  
   804  type SpotFleetRequestOutput struct{ *pulumi.OutputState }
   805  
   806  func (SpotFleetRequestOutput) ElementType() reflect.Type {
   807  	return reflect.TypeOf((**SpotFleetRequest)(nil)).Elem()
   808  }
   809  
   810  func (o SpotFleetRequestOutput) ToSpotFleetRequestOutput() SpotFleetRequestOutput {
   811  	return o
   812  }
   813  
   814  func (o SpotFleetRequestOutput) ToSpotFleetRequestOutputWithContext(ctx context.Context) SpotFleetRequestOutput {
   815  	return o
   816  }
   817  
   818  // Indicates how to allocate the target capacity across
   819  // the Spot pools specified by the Spot fleet request. Valid values: `lowestPrice`, `diversified`, `capacityOptimized`, `capacityOptimizedPrioritized`, and `priceCapacityOptimized`. The default is
   820  // `lowestPrice`.
   821  func (o SpotFleetRequestOutput) AllocationStrategy() pulumi.StringPtrOutput {
   822  	return o.ApplyT(func(v *SpotFleetRequest) pulumi.StringPtrOutput { return v.AllocationStrategy }).(pulumi.StringPtrOutput)
   823  }
   824  
   825  func (o SpotFleetRequestOutput) ClientToken() pulumi.StringOutput {
   826  	return o.ApplyT(func(v *SpotFleetRequest) pulumi.StringOutput { return v.ClientToken }).(pulumi.StringOutput)
   827  }
   828  
   829  // Reserved.
   830  func (o SpotFleetRequestOutput) Context() pulumi.StringPtrOutput {
   831  	return o.ApplyT(func(v *SpotFleetRequest) pulumi.StringPtrOutput { return v.Context }).(pulumi.StringPtrOutput)
   832  }
   833  
   834  // Indicates whether running Spot
   835  // instances should be terminated if the target capacity of the Spot fleet
   836  // request is decreased below the current size of the Spot fleet.
   837  func (o SpotFleetRequestOutput) ExcessCapacityTerminationPolicy() pulumi.StringPtrOutput {
   838  	return o.ApplyT(func(v *SpotFleetRequest) pulumi.StringPtrOutput { return v.ExcessCapacityTerminationPolicy }).(pulumi.StringPtrOutput)
   839  }
   840  
   841  // The type of fleet request. Indicates whether the Spot Fleet only requests the target
   842  // capacity or also attempts to maintain it. Default is `maintain`.
   843  func (o SpotFleetRequestOutput) FleetType() pulumi.StringPtrOutput {
   844  	return o.ApplyT(func(v *SpotFleetRequest) pulumi.StringPtrOutput { return v.FleetType }).(pulumi.StringPtrOutput)
   845  }
   846  
   847  // Grants the Spot fleet permission to terminate
   848  // Spot instances on your behalf when you cancel its Spot fleet request using
   849  // CancelSpotFleetRequests or when the Spot fleet request expires, if you set
   850  // terminateInstancesWithExpiration.
   851  func (o SpotFleetRequestOutput) IamFleetRole() pulumi.StringOutput {
   852  	return o.ApplyT(func(v *SpotFleetRequest) pulumi.StringOutput { return v.IamFleetRole }).(pulumi.StringOutput)
   853  }
   854  
   855  // Indicates whether a Spot
   856  // instance stops or terminates when it is interrupted. Default is
   857  // `terminate`.
   858  func (o SpotFleetRequestOutput) InstanceInterruptionBehaviour() pulumi.StringPtrOutput {
   859  	return o.ApplyT(func(v *SpotFleetRequest) pulumi.StringPtrOutput { return v.InstanceInterruptionBehaviour }).(pulumi.StringPtrOutput)
   860  }
   861  
   862  // The number of Spot pools across which to allocate your target Spot capacity.
   863  // Valid only when `allocationStrategy` is set to `lowestPrice`. Spot Fleet selects
   864  // the cheapest Spot pools and evenly allocates your target Spot capacity across
   865  // the number of Spot pools that you specify.
   866  func (o SpotFleetRequestOutput) InstancePoolsToUseCount() pulumi.IntPtrOutput {
   867  	return o.ApplyT(func(v *SpotFleetRequest) pulumi.IntPtrOutput { return v.InstancePoolsToUseCount }).(pulumi.IntPtrOutput)
   868  }
   869  
   870  // Used to define the launch configuration of the
   871  // spot-fleet request. Can be specified multiple times to define different bids
   872  // across different markets and instance types. Conflicts with `launchTemplateConfig`. At least one of `launchSpecification` or `launchTemplateConfig` is required.
   873  //
   874  // **Note**: This takes in similar but not
   875  // identical inputs as `ec2.Instance`.  There are limitations on
   876  // what you can specify. See the list of officially supported inputs in the
   877  // [reference documentation](http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotFleetLaunchSpecification.html). Any normal `ec2.Instance` parameter that corresponds to those inputs may be used and it have
   878  // a additional parameter `iamInstanceProfileArn` takes `iam.InstanceProfile` attribute `arn` as input.
   879  func (o SpotFleetRequestOutput) LaunchSpecifications() SpotFleetRequestLaunchSpecificationArrayOutput {
   880  	return o.ApplyT(func(v *SpotFleetRequest) SpotFleetRequestLaunchSpecificationArrayOutput {
   881  		return v.LaunchSpecifications
   882  	}).(SpotFleetRequestLaunchSpecificationArrayOutput)
   883  }
   884  
   885  // Launch template configuration block. See Launch Template Configs below for more details. Conflicts with `launchSpecification`. At least one of `launchSpecification` or `launchTemplateConfig` is required.
   886  func (o SpotFleetRequestOutput) LaunchTemplateConfigs() SpotFleetRequestLaunchTemplateConfigArrayOutput {
   887  	return o.ApplyT(func(v *SpotFleetRequest) SpotFleetRequestLaunchTemplateConfigArrayOutput {
   888  		return v.LaunchTemplateConfigs
   889  	}).(SpotFleetRequestLaunchTemplateConfigArrayOutput)
   890  }
   891  
   892  // A list of elastic load balancer names to add to the Spot fleet.
   893  func (o SpotFleetRequestOutput) LoadBalancers() pulumi.StringArrayOutput {
   894  	return o.ApplyT(func(v *SpotFleetRequest) pulumi.StringArrayOutput { return v.LoadBalancers }).(pulumi.StringArrayOutput)
   895  }
   896  
   897  // The order of the launch template overrides to use in fulfilling On-Demand capacity. the possible values are: `lowestPrice` and `prioritized`. the default is `lowestPrice`.
   898  func (o SpotFleetRequestOutput) OnDemandAllocationStrategy() pulumi.StringPtrOutput {
   899  	return o.ApplyT(func(v *SpotFleetRequest) pulumi.StringPtrOutput { return v.OnDemandAllocationStrategy }).(pulumi.StringPtrOutput)
   900  }
   901  
   902  // The maximum amount per hour for On-Demand Instances that you're willing to pay. When the maximum amount you're willing to pay is reached, the fleet stops launching instances even if it hasn’t met the target capacity.
   903  func (o SpotFleetRequestOutput) OnDemandMaxTotalPrice() pulumi.StringPtrOutput {
   904  	return o.ApplyT(func(v *SpotFleetRequest) pulumi.StringPtrOutput { return v.OnDemandMaxTotalPrice }).(pulumi.StringPtrOutput)
   905  }
   906  
   907  // The number of On-Demand units to request. If the request type is `maintain`, you can specify a target capacity of 0 and add capacity later.
   908  func (o SpotFleetRequestOutput) OnDemandTargetCapacity() pulumi.IntPtrOutput {
   909  	return o.ApplyT(func(v *SpotFleetRequest) pulumi.IntPtrOutput { return v.OnDemandTargetCapacity }).(pulumi.IntPtrOutput)
   910  }
   911  
   912  // Indicates whether Spot fleet should replace unhealthy instances. Default `false`.
   913  func (o SpotFleetRequestOutput) ReplaceUnhealthyInstances() pulumi.BoolPtrOutput {
   914  	return o.ApplyT(func(v *SpotFleetRequest) pulumi.BoolPtrOutput { return v.ReplaceUnhealthyInstances }).(pulumi.BoolPtrOutput)
   915  }
   916  
   917  // Nested argument containing maintenance strategies for managing your Spot Instances that are at an elevated risk of being interrupted. Defined below.
   918  func (o SpotFleetRequestOutput) SpotMaintenanceStrategies() SpotFleetRequestSpotMaintenanceStrategiesPtrOutput {
   919  	return o.ApplyT(func(v *SpotFleetRequest) SpotFleetRequestSpotMaintenanceStrategiesPtrOutput {
   920  		return v.SpotMaintenanceStrategies
   921  	}).(SpotFleetRequestSpotMaintenanceStrategiesPtrOutput)
   922  }
   923  
   924  // The maximum bid price per unit hour.
   925  func (o SpotFleetRequestOutput) SpotPrice() pulumi.StringPtrOutput {
   926  	return o.ApplyT(func(v *SpotFleetRequest) pulumi.StringPtrOutput { return v.SpotPrice }).(pulumi.StringPtrOutput)
   927  }
   928  
   929  // The state of the Spot fleet request.
   930  func (o SpotFleetRequestOutput) SpotRequestState() pulumi.StringOutput {
   931  	return o.ApplyT(func(v *SpotFleetRequest) pulumi.StringOutput { return v.SpotRequestState }).(pulumi.StringOutput)
   932  }
   933  
   934  // A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   935  func (o SpotFleetRequestOutput) Tags() pulumi.StringMapOutput {
   936  	return o.ApplyT(func(v *SpotFleetRequest) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
   937  }
   938  
   939  // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   940  //
   941  // Deprecated: Please use `tags` instead.
   942  func (o SpotFleetRequestOutput) TagsAll() pulumi.StringMapOutput {
   943  	return o.ApplyT(func(v *SpotFleetRequest) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
   944  }
   945  
   946  // The number of units to request. You can choose to set the
   947  // target capacity in terms of instances or a performance characteristic that is
   948  // important to your application workload, such as vCPUs, memory, or I/O.
   949  func (o SpotFleetRequestOutput) TargetCapacity() pulumi.IntOutput {
   950  	return o.ApplyT(func(v *SpotFleetRequest) pulumi.IntOutput { return v.TargetCapacity }).(pulumi.IntOutput)
   951  }
   952  
   953  // The unit for the target capacity. This can only be done with `instanceRequirements` defined
   954  func (o SpotFleetRequestOutput) TargetCapacityUnitType() pulumi.StringPtrOutput {
   955  	return o.ApplyT(func(v *SpotFleetRequest) pulumi.StringPtrOutput { return v.TargetCapacityUnitType }).(pulumi.StringPtrOutput)
   956  }
   957  
   958  // A list of `alb.TargetGroup` ARNs, for use with Application Load Balancing.
   959  func (o SpotFleetRequestOutput) TargetGroupArns() pulumi.StringArrayOutput {
   960  	return o.ApplyT(func(v *SpotFleetRequest) pulumi.StringArrayOutput { return v.TargetGroupArns }).(pulumi.StringArrayOutput)
   961  }
   962  
   963  // Indicates whether running Spot
   964  // instances should be terminated when the resource is deleted (and the Spot fleet request cancelled).
   965  // If no value is specified, the value of the `terminateInstancesWithExpiration` argument is used.
   966  func (o SpotFleetRequestOutput) TerminateInstancesOnDelete() pulumi.StringPtrOutput {
   967  	return o.ApplyT(func(v *SpotFleetRequest) pulumi.StringPtrOutput { return v.TerminateInstancesOnDelete }).(pulumi.StringPtrOutput)
   968  }
   969  
   970  // Indicates whether running Spot
   971  // instances should be terminated when the Spot fleet request expires.
   972  func (o SpotFleetRequestOutput) TerminateInstancesWithExpiration() pulumi.BoolPtrOutput {
   973  	return o.ApplyT(func(v *SpotFleetRequest) pulumi.BoolPtrOutput { return v.TerminateInstancesWithExpiration }).(pulumi.BoolPtrOutput)
   974  }
   975  
   976  // 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.
   977  func (o SpotFleetRequestOutput) ValidFrom() pulumi.StringPtrOutput {
   978  	return o.ApplyT(func(v *SpotFleetRequest) pulumi.StringPtrOutput { return v.ValidFrom }).(pulumi.StringPtrOutput)
   979  }
   980  
   981  // 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.
   982  func (o SpotFleetRequestOutput) ValidUntil() pulumi.StringPtrOutput {
   983  	return o.ApplyT(func(v *SpotFleetRequest) pulumi.StringPtrOutput { return v.ValidUntil }).(pulumi.StringPtrOutput)
   984  }
   985  
   986  // If set, this provider will
   987  // wait for the Spot Request to be fulfilled, and will throw an error if the
   988  // timeout of 10m is reached.
   989  func (o SpotFleetRequestOutput) WaitForFulfillment() pulumi.BoolPtrOutput {
   990  	return o.ApplyT(func(v *SpotFleetRequest) pulumi.BoolPtrOutput { return v.WaitForFulfillment }).(pulumi.BoolPtrOutput)
   991  }
   992  
   993  type SpotFleetRequestArrayOutput struct{ *pulumi.OutputState }
   994  
   995  func (SpotFleetRequestArrayOutput) ElementType() reflect.Type {
   996  	return reflect.TypeOf((*[]*SpotFleetRequest)(nil)).Elem()
   997  }
   998  
   999  func (o SpotFleetRequestArrayOutput) ToSpotFleetRequestArrayOutput() SpotFleetRequestArrayOutput {
  1000  	return o
  1001  }
  1002  
  1003  func (o SpotFleetRequestArrayOutput) ToSpotFleetRequestArrayOutputWithContext(ctx context.Context) SpotFleetRequestArrayOutput {
  1004  	return o
  1005  }
  1006  
  1007  func (o SpotFleetRequestArrayOutput) Index(i pulumi.IntInput) SpotFleetRequestOutput {
  1008  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SpotFleetRequest {
  1009  		return vs[0].([]*SpotFleetRequest)[vs[1].(int)]
  1010  	}).(SpotFleetRequestOutput)
  1011  }
  1012  
  1013  type SpotFleetRequestMapOutput struct{ *pulumi.OutputState }
  1014  
  1015  func (SpotFleetRequestMapOutput) ElementType() reflect.Type {
  1016  	return reflect.TypeOf((*map[string]*SpotFleetRequest)(nil)).Elem()
  1017  }
  1018  
  1019  func (o SpotFleetRequestMapOutput) ToSpotFleetRequestMapOutput() SpotFleetRequestMapOutput {
  1020  	return o
  1021  }
  1022  
  1023  func (o SpotFleetRequestMapOutput) ToSpotFleetRequestMapOutputWithContext(ctx context.Context) SpotFleetRequestMapOutput {
  1024  	return o
  1025  }
  1026  
  1027  func (o SpotFleetRequestMapOutput) MapIndex(k pulumi.StringInput) SpotFleetRequestOutput {
  1028  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SpotFleetRequest {
  1029  		return vs[0].(map[string]*SpotFleetRequest)[vs[1].(string)]
  1030  	}).(SpotFleetRequestOutput)
  1031  }
  1032  
  1033  func init() {
  1034  	pulumi.RegisterInputType(reflect.TypeOf((*SpotFleetRequestInput)(nil)).Elem(), &SpotFleetRequest{})
  1035  	pulumi.RegisterInputType(reflect.TypeOf((*SpotFleetRequestArrayInput)(nil)).Elem(), SpotFleetRequestArray{})
  1036  	pulumi.RegisterInputType(reflect.TypeOf((*SpotFleetRequestMapInput)(nil)).Elem(), SpotFleetRequestMap{})
  1037  	pulumi.RegisterOutputType(SpotFleetRequestOutput{})
  1038  	pulumi.RegisterOutputType(SpotFleetRequestArrayOutput{})
  1039  	pulumi.RegisterOutputType(SpotFleetRequestMapOutput{})
  1040  }