import * as core from "@terrascript/core"; export interface CapacityRebalanceArgs extends core.SchemaArgs { replacementStrategy?: string | core.StringOut; } export class CapacityRebalance extends core.Schema { @core.attr(String) public replacementStrategy?: string | core.StringOut; } export interface SpotMaintenanceStrategiesArgs extends core.SchemaArgs { capacityRebalance?: CapacityRebalance; } export class SpotMaintenanceStrategies extends core.Schema { @core.attr(CapacityRebalance) public capacityRebalance?: CapacityRebalance; } export interface RootBlockDeviceArgs extends core.SchemaArgs { deleteOnTermination?: boolean | core.BooleanOut; encrypted?: boolean | core.BooleanOut; iops?: number | core.NumberOut; kmsKeyId?: string | core.StringOut; throughput?: number | core.NumberOut; volumeSize?: number | core.NumberOut; volumeType?: string | core.StringOut; } export class RootBlockDevice extends core.Schema { @core.attr(Boolean) public deleteOnTermination?: boolean | core.BooleanOut; @core.attr(Boolean, { computed: true }) public encrypted?: boolean | core.BooleanOut; @core.attr(Number, { computed: true }) public iops?: number | core.NumberOut; @core.attr(String, { computed: true }) public kmsKeyId?: string | core.StringOut; @core.attr(Number, { computed: true }) public throughput?: number | core.NumberOut; @core.attr(Number, { computed: true }) public volumeSize?: number | core.NumberOut; @core.attr(String, { computed: true }) public volumeType?: string | core.StringOut; } export interface EbsBlockDeviceArgs extends core.SchemaArgs { deleteOnTermination?: boolean | core.BooleanOut; deviceName: string | core.StringOut; encrypted?: boolean | core.BooleanOut; iops?: number | core.NumberOut; kmsKeyId?: string | core.StringOut; snapshotId?: string | core.StringOut; throughput?: number | core.NumberOut; volumeSize?: number | core.NumberOut; volumeType?: string | core.StringOut; } export class EbsBlockDevice extends core.Schema { @core.attr(Boolean) public deleteOnTermination?: boolean | core.BooleanOut; @core.attr(String) public deviceName!: string | core.StringOut; @core.attr(Boolean, { computed: true }) public encrypted?: boolean | core.BooleanOut; @core.attr(Number, { computed: true }) public iops?: number | core.NumberOut; @core.attr(String, { computed: true }) public kmsKeyId?: string | core.StringOut; @core.attr(String, { computed: true }) public snapshotId?: string | core.StringOut; @core.attr(Number, { computed: true }) public throughput?: number | core.NumberOut; @core.attr(Number, { computed: true }) public volumeSize?: number | core.NumberOut; @core.attr(String, { computed: true }) public volumeType?: string | core.StringOut; } export interface EphemeralBlockDeviceArgs extends core.SchemaArgs { deviceName: string | core.StringOut; virtualName: string | core.StringOut; } export class EphemeralBlockDevice extends core.Schema { @core.attr(String) public deviceName!: string | core.StringOut; @core.attr(String) public virtualName!: string | core.StringOut; } export interface LaunchSpecificationArgs extends core.SchemaArgs { ami: string | core.StringOut; associatePublicIpAddress?: boolean | core.BooleanOut; availabilityZone?: string | core.StringOut; ebsBlockDevice?: core.Array | core.ArrayOut; ebsOptimized?: boolean | core.BooleanOut; ephemeralBlockDevice?: | core.Array | core.ArrayOut; iamInstanceProfile?: string | core.StringOut; iamInstanceProfileArn?: string | core.StringOut; instanceType: string | core.StringOut; keyName?: string | core.StringOut; monitoring?: boolean | core.BooleanOut; placementGroup?: string | core.StringOut; placementTenancy?: string | core.StringOut; rootBlockDevice?: | core.Array | core.ArrayOut; spotPrice?: string | core.StringOut; subnetId?: string | core.StringOut; tags?: core.Map | core.MapOut; userData?: string | core.StringOut; vpcSecurityGroupIds?: core.Array | core.ArrayOut; weightedCapacity?: string | core.StringOut; } export class LaunchSpecification extends core.Schema { @core.attr(String) public ami!: string | core.StringOut; @core.attr(Boolean) public associatePublicIpAddress?: boolean | core.BooleanOut; @core.attr(String, { computed: true }) public availabilityZone?: string | core.StringOut; @core.attr(EbsBlockDevice, { computed: true, kind: "array" }) public ebsBlockDevice?: | core.Array | core.ArrayOut; @core.attr(Boolean) public ebsOptimized?: boolean | core.BooleanOut; @core.attr(EphemeralBlockDevice, { computed: true, kind: "array" }) public ephemeralBlockDevice?: | core.Array | core.ArrayOut; @core.attr(String) public iamInstanceProfile?: string | core.StringOut; @core.attr(String) public iamInstanceProfileArn?: string | core.StringOut; @core.attr(String) public instanceType!: string | core.StringOut; @core.attr(String, { computed: true }) public keyName?: string | core.StringOut; @core.attr(Boolean) public monitoring?: boolean | core.BooleanOut; @core.attr(String, { computed: true }) public placementGroup?: string | core.StringOut; @core.attr(String) public placementTenancy?: string | core.StringOut; @core.attr(RootBlockDevice, { computed: true, kind: "array" }) public rootBlockDevice?: | core.Array | core.ArrayOut; @core.attr(String) public spotPrice?: string | core.StringOut; @core.attr(String, { computed: true }) public subnetId?: string | core.StringOut; @core.attr(String, { kind: "map" }) public tags?: core.Map | core.MapOut; @core.attr(String) public userData?: string | core.StringOut; @core.attr(String, { computed: true, kind: "array" }) public vpcSecurityGroupIds?: | core.Array | core.ArrayOut; @core.attr(String) public weightedCapacity?: string | core.StringOut; } export interface LaunchTemplateSpecificationArgs extends core.SchemaArgs { id?: string | core.StringOut; name?: string | core.StringOut; version?: string | core.StringOut; } export class LaunchTemplateSpecification extends core.Schema { @core.attr(String) public id?: string | core.StringOut; @core.attr(String) public name?: string | core.StringOut; @core.attr(String) public version?: string | core.StringOut; } export interface VcpuCountArgs extends core.SchemaArgs { max?: number | core.NumberOut; min?: number | core.NumberOut; } export class VcpuCount extends core.Schema { @core.attr(Number) public max?: number | core.NumberOut; @core.attr(Number) public min?: number | core.NumberOut; } export interface MemoryMibArgs extends core.SchemaArgs { max?: number | core.NumberOut; min?: number | core.NumberOut; } export class MemoryMib extends core.Schema { @core.attr(Number) public max?: number | core.NumberOut; @core.attr(Number) public min?: number | core.NumberOut; } export interface MemoryGibPerVcpuArgs extends core.SchemaArgs { max?: number | core.NumberOut; min?: number | core.NumberOut; } export class MemoryGibPerVcpu extends core.Schema { @core.attr(Number) public max?: number | core.NumberOut; @core.attr(Number) public min?: number | core.NumberOut; } export interface AcceleratorTotalMemoryMibArgs extends core.SchemaArgs { max?: number | core.NumberOut; min?: number | core.NumberOut; } export class AcceleratorTotalMemoryMib extends core.Schema { @core.attr(Number) public max?: number | core.NumberOut; @core.attr(Number) public min?: number | core.NumberOut; } export interface NetworkInterfaceCountArgs extends core.SchemaArgs { max?: number | core.NumberOut; min?: number | core.NumberOut; } export class NetworkInterfaceCount extends core.Schema { @core.attr(Number) public max?: number | core.NumberOut; @core.attr(Number) public min?: number | core.NumberOut; } export interface AcceleratorCountArgs extends core.SchemaArgs { max?: number | core.NumberOut; min?: number | core.NumberOut; } export class AcceleratorCount extends core.Schema { @core.attr(Number) public max?: number | core.NumberOut; @core.attr(Number) public min?: number | core.NumberOut; } export interface BaselineEbsBandwidthMbpsArgs extends core.SchemaArgs { max?: number | core.NumberOut; min?: number | core.NumberOut; } export class BaselineEbsBandwidthMbps extends core.Schema { @core.attr(Number) public max?: number | core.NumberOut; @core.attr(Number) public min?: number | core.NumberOut; } export interface TotalLocalStorageGbArgs extends core.SchemaArgs { max?: number | core.NumberOut; min?: number | core.NumberOut; } export class TotalLocalStorageGb extends core.Schema { @core.attr(Number) public max?: number | core.NumberOut; @core.attr(Number) public min?: number | core.NumberOut; } export interface InstanceRequirementsArgs extends core.SchemaArgs { acceleratorCount?: AcceleratorCount; acceleratorManufacturers?: core.Array | core.ArrayOut; acceleratorNames?: core.Array | core.ArrayOut; acceleratorTotalMemoryMib?: AcceleratorTotalMemoryMib; acceleratorTypes?: core.Array | core.ArrayOut; bareMetal?: string | core.StringOut; baselineEbsBandwidthMbps?: BaselineEbsBandwidthMbps; burstablePerformance?: string | core.StringOut; cpuManufacturers?: core.Array | core.ArrayOut; excludedInstanceTypes?: core.Array | core.ArrayOut; instanceGenerations?: core.Array | core.ArrayOut; localStorage?: string | core.StringOut; localStorageTypes?: core.Array | core.ArrayOut; memoryGibPerVcpu?: MemoryGibPerVcpu; memoryMib?: MemoryMib; networkInterfaceCount?: NetworkInterfaceCount; onDemandMaxPricePercentageOverLowestPrice?: number | core.NumberOut; requireHibernateSupport?: boolean | core.BooleanOut; spotMaxPricePercentageOverLowestPrice?: number | core.NumberOut; totalLocalStorageGb?: TotalLocalStorageGb; vcpuCount?: VcpuCount; } export class InstanceRequirements extends core.Schema { @core.attr(AcceleratorCount) public acceleratorCount?: AcceleratorCount; @core.attr(String, { kind: "array" }) public acceleratorManufacturers?: | core.Array | core.ArrayOut; @core.attr(String, { kind: "array" }) public acceleratorNames?: core.Array | core.ArrayOut; @core.attr(AcceleratorTotalMemoryMib) public acceleratorTotalMemoryMib?: AcceleratorTotalMemoryMib; @core.attr(String, { kind: "array" }) public acceleratorTypes?: core.Array | core.ArrayOut; @core.attr(String) public bareMetal?: string | core.StringOut; @core.attr(BaselineEbsBandwidthMbps) public baselineEbsBandwidthMbps?: BaselineEbsBandwidthMbps; @core.attr(String) public burstablePerformance?: string | core.StringOut; @core.attr(String, { kind: "array" }) public cpuManufacturers?: core.Array | core.ArrayOut; @core.attr(String, { kind: "array" }) public excludedInstanceTypes?: | core.Array | core.ArrayOut; @core.attr(String, { kind: "array" }) public instanceGenerations?: | core.Array | core.ArrayOut; @core.attr(String) public localStorage?: string | core.StringOut; @core.attr(String, { kind: "array" }) public localStorageTypes?: core.Array | core.ArrayOut; @core.attr(MemoryGibPerVcpu) public memoryGibPerVcpu?: MemoryGibPerVcpu; @core.attr(MemoryMib) public memoryMib?: MemoryMib; @core.attr(NetworkInterfaceCount) public networkInterfaceCount?: NetworkInterfaceCount; @core.attr(Number) public onDemandMaxPricePercentageOverLowestPrice?: number | core.NumberOut; @core.attr(Boolean) public requireHibernateSupport?: boolean | core.BooleanOut; @core.attr(Number) public spotMaxPricePercentageOverLowestPrice?: number | core.NumberOut; @core.attr(TotalLocalStorageGb) public totalLocalStorageGb?: TotalLocalStorageGb; @core.attr(VcpuCount) public vcpuCount?: VcpuCount; } export interface OverridesArgs extends core.SchemaArgs { availabilityZone?: string | core.StringOut; instanceRequirements?: InstanceRequirements; instanceType?: string | core.StringOut; priority?: number | core.NumberOut; spotPrice?: string | core.StringOut; subnetId?: string | core.StringOut; weightedCapacity?: number | core.NumberOut; } export class Overrides extends core.Schema { @core.attr(String) public availabilityZone?: string | core.StringOut; @core.attr(InstanceRequirements) public instanceRequirements?: InstanceRequirements; @core.attr(String) public instanceType?: string | core.StringOut; @core.attr(Number, { computed: true }) public priority?: number | core.NumberOut; @core.attr(String, { computed: true }) public spotPrice?: string | core.StringOut; @core.attr(String, { computed: true }) public subnetId?: string | core.StringOut; @core.attr(Number, { computed: true }) public weightedCapacity?: number | core.NumberOut; } export interface LaunchTemplateConfigArgs extends core.SchemaArgs { launchTemplateSpecification: LaunchTemplateSpecification; overrides?: core.Array | core.ArrayOut; } export class LaunchTemplateConfig extends core.Schema { @core.attr(LaunchTemplateSpecification) public launchTemplateSpecification!: LaunchTemplateSpecification; @core.attr(Overrides, { kind: "array" }) public overrides?: core.Array | core.ArrayOut; } export interface SpotFleetRequestArgs extends core.ResourceArgs { /** * Indicates how to allocate the target capacity across */ allocationStrategy?: string | core.StringOut; /** * Indicates whether running Spot */ excessCapacityTerminationPolicy?: string | core.StringOut; /** * (Optional) The type of fleet request. Indicates whether the Spot Fleet only requests the target */ fleetType?: string | core.StringOut; /** * (Required) Grants the Spot fleet permission to terminate */ iamFleetRole: string | core.StringOut; /** * (Optional) Indicates whether a Spot */ instanceInterruptionBehaviour?: string | core.StringOut; /** * (Optional; Default: 1) */ instancePoolsToUseCount?: number | core.NumberOut; /** * (Optional) Used to define the launch configuration of the */ launchSpecification?: | core.Array | core.ArrayOut; /** * (Optional) Launch template configuration block. See [Launch Template Configs](#launch-template-confi * gs) below for more details. Conflicts with `launch_specification`. At least one of `launch_specifica * tion` or `launch_template_config` is required. */ launchTemplateConfig?: | core.Array | core.ArrayOut; loadBalancers?: core.Array | core.ArrayOut; /** * The order of the launch template overrides to use in fulfilling On-Demand capacity. the possible val * ues are: `lowestPrice` and `prioritized`. the default is `lowestPrice`. */ onDemandAllocationStrategy?: string | core.StringOut; /** * The maximum amount per hour for On-Demand Instances that you're willing to pay. When the maximum amo * unt you're willing to pay is reached, the fleet stops launching instances even if it hasn’t met the * target capacity. */ onDemandMaxTotalPrice?: string | core.StringOut; /** * The number of On-Demand units to request. If the request type is `maintain`, you can specify a targe * t capacity of 0 and add capacity later. */ onDemandTargetCapacity?: number | core.NumberOut; /** * (Optional) Indicates whether Spot fleet should replace unhealthy instances. Default `false`. */ replaceUnhealthyInstances?: boolean | core.BooleanOut; /** * (Optional) Nested argument containing maintenance strategies for managing your Spot Instances that a * re at an elevated risk of being interrupted. Defined below. */ spotMaintenanceStrategies?: SpotMaintenanceStrategies; /** * (Optional; Default: On-demand price) The maximum bid price per unit hour. */ spotPrice?: string | core.StringOut; /** * (Optional) A map of tags to assign to the resource. If configured with a provider [`default_tags` co * nfiguration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-co * nfiguration-block) present, tags with matching keys will overwrite those defined at the provider-lev * el. */ tags?: core.Map | core.MapOut; /** * A map of tags assigned to the resource, including those inherited from the provider [`default_tags` * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags- * configuration-block). */ tagsAll?: core.Map | core.MapOut; /** * The number of units to request. You can choose to set the */ targetCapacity: number | core.NumberOut; targetGroupArns?: core.Array | core.ArrayOut; /** * (Optional) Indicates whether running Spot */ terminateInstancesOnDelete?: string | core.StringOut; /** * (Optional) Indicates whether running Spot */ terminateInstancesWithExpiration?: boolean | core.BooleanOut; /** * (Optional) The start date and time of the request, in UTC [RFC3339](https://tools.ietf.org/html/rfc3 * 339#section-5.8) format(for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the r * equest immediately. */ validFrom?: string | core.StringOut; /** * (Optional) The end date and time of the request, in UTC [RFC3339](https://tools.ietf.org/html/rfc333 * 9#section-5.8) format(for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new Spot instance reques * ts are placed or enabled to fulfill the request. */ validUntil?: string | core.StringOut; /** * (Optional; Default: false) If set, Terraform will */ waitForFulfillment?: boolean | core.BooleanOut; } export class SpotFleetRequest extends core.Resource { /** * Indicates how to allocate the target capacity across */ @core.attr(String) public allocationStrategy?: string | core.StringOut; @core.attr(String, { computed: true }) public clientToken!: string | core.StringOut; /** * Indicates whether running Spot */ @core.attr(String) public excessCapacityTerminationPolicy?: string | core.StringOut; /** * (Optional) The type of fleet request. Indicates whether the Spot Fleet only requests the target */ @core.attr(String) public fleetType?: string | core.StringOut; /** * (Required) Grants the Spot fleet permission to terminate */ @core.attr(String) public iamFleetRole!: string | core.StringOut; /** * The ID of the launch template. Conflicts with `name`. */ @core.attr(String, { computed: true }) public id!: string | core.StringOut; /** * (Optional) Indicates whether a Spot */ @core.attr(String) public instanceInterruptionBehaviour?: string | core.StringOut; /** * (Optional; Default: 1) */ @core.attr(Number) public instancePoolsToUseCount?: number | core.NumberOut; /** * (Optional) Used to define the launch configuration of the */ @core.attr(LaunchSpecification, { kind: "array" }) public launchSpecification?: | core.Array | core.ArrayOut; /** * (Optional) Launch template configuration block. See [Launch Template Configs](#launch-template-confi * gs) below for more details. Conflicts with `launch_specification`. At least one of `launch_specifica * tion` or `launch_template_config` is required. */ @core.attr(LaunchTemplateConfig, { kind: "array" }) public launchTemplateConfig?: | core.Array | core.ArrayOut; @core.attr(String, { computed: true, kind: "array" }) public loadBalancers?: core.Array | core.ArrayOut; /** * The order of the launch template overrides to use in fulfilling On-Demand capacity. the possible val * ues are: `lowestPrice` and `prioritized`. the default is `lowestPrice`. */ @core.attr(String) public onDemandAllocationStrategy?: string | core.StringOut; /** * The maximum amount per hour for On-Demand Instances that you're willing to pay. When the maximum amo * unt you're willing to pay is reached, the fleet stops launching instances even if it hasn’t met the * target capacity. */ @core.attr(String) public onDemandMaxTotalPrice?: string | core.StringOut; /** * The number of On-Demand units to request. If the request type is `maintain`, you can specify a targe * t capacity of 0 and add capacity later. */ @core.attr(Number) public onDemandTargetCapacity?: number | core.NumberOut; /** * (Optional) Indicates whether Spot fleet should replace unhealthy instances. Default `false`. */ @core.attr(Boolean) public replaceUnhealthyInstances?: boolean | core.BooleanOut; /** * (Optional) Nested argument containing maintenance strategies for managing your Spot Instances that a * re at an elevated risk of being interrupted. Defined below. */ @core.attr(SpotMaintenanceStrategies) public spotMaintenanceStrategies?: SpotMaintenanceStrategies; /** * (Optional; Default: On-demand price) The maximum bid price per unit hour. */ @core.attr(String) public spotPrice?: string | core.StringOut; /** * The state of the Spot fleet request. */ @core.attr(String, { computed: true }) public spotRequestState!: string | core.StringOut; /** * (Optional) A map of tags to assign to the resource. If configured with a provider [`default_tags` co * nfiguration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-co * nfiguration-block) present, tags with matching keys will overwrite those defined at the provider-lev * el. */ @core.attr(String, { kind: "map" }) public tags?: core.Map | core.MapOut; /** * A map of tags assigned to the resource, including those inherited from the provider [`default_tags` * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags- * configuration-block). */ @core.attr(String, { computed: true, kind: "map" }) public tagsAll?: core.Map | core.MapOut; /** * The number of units to request. You can choose to set the */ @core.attr(Number) public targetCapacity!: number | core.NumberOut; @core.attr(String, { computed: true, kind: "array" }) public targetGroupArns?: core.Array | core.ArrayOut; /** * (Optional) Indicates whether running Spot */ @core.attr(String) public terminateInstancesOnDelete?: string | core.StringOut; /** * (Optional) Indicates whether running Spot */ @core.attr(Boolean) public terminateInstancesWithExpiration?: boolean | core.BooleanOut; /** * (Optional) The start date and time of the request, in UTC [RFC3339](https://tools.ietf.org/html/rfc3 * 339#section-5.8) format(for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the r * equest immediately. */ @core.attr(String) public validFrom?: string | core.StringOut; /** * (Optional) The end date and time of the request, in UTC [RFC3339](https://tools.ietf.org/html/rfc333 * 9#section-5.8) format(for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new Spot instance reques * ts are placed or enabled to fulfill the request. */ @core.attr(String) public validUntil?: string | core.StringOut; /** * (Optional; Default: false) If set, Terraform will */ @core.attr(Boolean) public waitForFulfillment?: boolean | core.BooleanOut; constructor(name: string, args?: SpotFleetRequestArgs) { super(name, "aws_spot_fleet_request", args); } public override getNamespace(): string { return "aws_ec2"; } }