/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Xml { class XmlNode; } // namespace Xml } // namespace Utils namespace EC2 { namespace Model { /** *

Describes overrides for a launch template.

See Also:

AWS * API Reference

*/ class FleetLaunchTemplateOverridesRequest { public: AWS_EC2_API FleetLaunchTemplateOverridesRequest(); AWS_EC2_API FleetLaunchTemplateOverridesRequest(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_EC2_API FleetLaunchTemplateOverridesRequest& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const; /** *

The instance type.

mac1.metal is not supported as a * launch template override.

If you specify * InstanceType, you can't specify * InstanceRequirements.

*/ inline const InstanceType& GetInstanceType() const{ return m_instanceType; } /** *

The instance type.

mac1.metal is not supported as a * launch template override.

If you specify * InstanceType, you can't specify * InstanceRequirements.

*/ inline bool InstanceTypeHasBeenSet() const { return m_instanceTypeHasBeenSet; } /** *

The instance type.

mac1.metal is not supported as a * launch template override.

If you specify * InstanceType, you can't specify * InstanceRequirements.

*/ inline void SetInstanceType(const InstanceType& value) { m_instanceTypeHasBeenSet = true; m_instanceType = value; } /** *

The instance type.

mac1.metal is not supported as a * launch template override.

If you specify * InstanceType, you can't specify * InstanceRequirements.

*/ inline void SetInstanceType(InstanceType&& value) { m_instanceTypeHasBeenSet = true; m_instanceType = std::move(value); } /** *

The instance type.

mac1.metal is not supported as a * launch template override.

If you specify * InstanceType, you can't specify * InstanceRequirements.

*/ inline FleetLaunchTemplateOverridesRequest& WithInstanceType(const InstanceType& value) { SetInstanceType(value); return *this;} /** *

The instance type.

mac1.metal is not supported as a * launch template override.

If you specify * InstanceType, you can't specify * InstanceRequirements.

*/ inline FleetLaunchTemplateOverridesRequest& WithInstanceType(InstanceType&& value) { SetInstanceType(std::move(value)); return *this;} /** *

The maximum price per unit hour that you are willing to pay for a Spot * Instance. We do not recommend using this parameter because it can lead to * increased interruptions. If you do not specify this parameter, you will pay the * current Spot price.

If you specify a maximum price, your * instances will be interrupted more frequently than if you do not specify this * parameter.

*/ inline const Aws::String& GetMaxPrice() const{ return m_maxPrice; } /** *

The maximum price per unit hour that you are willing to pay for a Spot * Instance. We do not recommend using this parameter because it can lead to * increased interruptions. If you do not specify this parameter, you will pay the * current Spot price.

If you specify a maximum price, your * instances will be interrupted more frequently than if you do not specify this * parameter.

*/ inline bool MaxPriceHasBeenSet() const { return m_maxPriceHasBeenSet; } /** *

The maximum price per unit hour that you are willing to pay for a Spot * Instance. We do not recommend using this parameter because it can lead to * increased interruptions. If you do not specify this parameter, you will pay the * current Spot price.

If you specify a maximum price, your * instances will be interrupted more frequently than if you do not specify this * parameter.

*/ inline void SetMaxPrice(const Aws::String& value) { m_maxPriceHasBeenSet = true; m_maxPrice = value; } /** *

The maximum price per unit hour that you are willing to pay for a Spot * Instance. We do not recommend using this parameter because it can lead to * increased interruptions. If you do not specify this parameter, you will pay the * current Spot price.

If you specify a maximum price, your * instances will be interrupted more frequently than if you do not specify this * parameter.

*/ inline void SetMaxPrice(Aws::String&& value) { m_maxPriceHasBeenSet = true; m_maxPrice = std::move(value); } /** *

The maximum price per unit hour that you are willing to pay for a Spot * Instance. We do not recommend using this parameter because it can lead to * increased interruptions. If you do not specify this parameter, you will pay the * current Spot price.

If you specify a maximum price, your * instances will be interrupted more frequently than if you do not specify this * parameter.

*/ inline void SetMaxPrice(const char* value) { m_maxPriceHasBeenSet = true; m_maxPrice.assign(value); } /** *

The maximum price per unit hour that you are willing to pay for a Spot * Instance. We do not recommend using this parameter because it can lead to * increased interruptions. If you do not specify this parameter, you will pay the * current Spot price.

If you specify a maximum price, your * instances will be interrupted more frequently than if you do not specify this * parameter.

*/ inline FleetLaunchTemplateOverridesRequest& WithMaxPrice(const Aws::String& value) { SetMaxPrice(value); return *this;} /** *

The maximum price per unit hour that you are willing to pay for a Spot * Instance. We do not recommend using this parameter because it can lead to * increased interruptions. If you do not specify this parameter, you will pay the * current Spot price.

If you specify a maximum price, your * instances will be interrupted more frequently than if you do not specify this * parameter.

*/ inline FleetLaunchTemplateOverridesRequest& WithMaxPrice(Aws::String&& value) { SetMaxPrice(std::move(value)); return *this;} /** *

The maximum price per unit hour that you are willing to pay for a Spot * Instance. We do not recommend using this parameter because it can lead to * increased interruptions. If you do not specify this parameter, you will pay the * current Spot price.

If you specify a maximum price, your * instances will be interrupted more frequently than if you do not specify this * parameter.

*/ inline FleetLaunchTemplateOverridesRequest& WithMaxPrice(const char* value) { SetMaxPrice(value); return *this;} /** *

The IDs of the subnets in which to launch the instances. Separate multiple * subnet IDs using commas (for example, subnet-1234abcdeexample1, * subnet-0987cdef6example2). A request of type instant can * have only one subnet ID.

*/ inline const Aws::String& GetSubnetId() const{ return m_subnetId; } /** *

The IDs of the subnets in which to launch the instances. Separate multiple * subnet IDs using commas (for example, subnet-1234abcdeexample1, * subnet-0987cdef6example2). A request of type instant can * have only one subnet ID.

*/ inline bool SubnetIdHasBeenSet() const { return m_subnetIdHasBeenSet; } /** *

The IDs of the subnets in which to launch the instances. Separate multiple * subnet IDs using commas (for example, subnet-1234abcdeexample1, * subnet-0987cdef6example2). A request of type instant can * have only one subnet ID.

*/ inline void SetSubnetId(const Aws::String& value) { m_subnetIdHasBeenSet = true; m_subnetId = value; } /** *

The IDs of the subnets in which to launch the instances. Separate multiple * subnet IDs using commas (for example, subnet-1234abcdeexample1, * subnet-0987cdef6example2). A request of type instant can * have only one subnet ID.

*/ inline void SetSubnetId(Aws::String&& value) { m_subnetIdHasBeenSet = true; m_subnetId = std::move(value); } /** *

The IDs of the subnets in which to launch the instances. Separate multiple * subnet IDs using commas (for example, subnet-1234abcdeexample1, * subnet-0987cdef6example2). A request of type instant can * have only one subnet ID.

*/ inline void SetSubnetId(const char* value) { m_subnetIdHasBeenSet = true; m_subnetId.assign(value); } /** *

The IDs of the subnets in which to launch the instances. Separate multiple * subnet IDs using commas (for example, subnet-1234abcdeexample1, * subnet-0987cdef6example2). A request of type instant can * have only one subnet ID.

*/ inline FleetLaunchTemplateOverridesRequest& WithSubnetId(const Aws::String& value) { SetSubnetId(value); return *this;} /** *

The IDs of the subnets in which to launch the instances. Separate multiple * subnet IDs using commas (for example, subnet-1234abcdeexample1, * subnet-0987cdef6example2). A request of type instant can * have only one subnet ID.

*/ inline FleetLaunchTemplateOverridesRequest& WithSubnetId(Aws::String&& value) { SetSubnetId(std::move(value)); return *this;} /** *

The IDs of the subnets in which to launch the instances. Separate multiple * subnet IDs using commas (for example, subnet-1234abcdeexample1, * subnet-0987cdef6example2). A request of type instant can * have only one subnet ID.

*/ inline FleetLaunchTemplateOverridesRequest& WithSubnetId(const char* value) { SetSubnetId(value); return *this;} /** *

The Availability Zone in which to launch the instances.

*/ inline const Aws::String& GetAvailabilityZone() const{ return m_availabilityZone; } /** *

The Availability Zone in which to launch the instances.

*/ inline bool AvailabilityZoneHasBeenSet() const { return m_availabilityZoneHasBeenSet; } /** *

The Availability Zone in which to launch the instances.

*/ inline void SetAvailabilityZone(const Aws::String& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = value; } /** *

The Availability Zone in which to launch the instances.

*/ inline void SetAvailabilityZone(Aws::String&& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = std::move(value); } /** *

The Availability Zone in which to launch the instances.

*/ inline void SetAvailabilityZone(const char* value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone.assign(value); } /** *

The Availability Zone in which to launch the instances.

*/ inline FleetLaunchTemplateOverridesRequest& WithAvailabilityZone(const Aws::String& value) { SetAvailabilityZone(value); return *this;} /** *

The Availability Zone in which to launch the instances.

*/ inline FleetLaunchTemplateOverridesRequest& WithAvailabilityZone(Aws::String&& value) { SetAvailabilityZone(std::move(value)); return *this;} /** *

The Availability Zone in which to launch the instances.

*/ inline FleetLaunchTemplateOverridesRequest& WithAvailabilityZone(const char* value) { SetAvailabilityZone(value); return *this;} /** *

The number of units provided by the specified instance type.

*/ inline double GetWeightedCapacity() const{ return m_weightedCapacity; } /** *

The number of units provided by the specified instance type.

*/ inline bool WeightedCapacityHasBeenSet() const { return m_weightedCapacityHasBeenSet; } /** *

The number of units provided by the specified instance type.

*/ inline void SetWeightedCapacity(double value) { m_weightedCapacityHasBeenSet = true; m_weightedCapacity = value; } /** *

The number of units provided by the specified instance type.

*/ inline FleetLaunchTemplateOverridesRequest& WithWeightedCapacity(double value) { SetWeightedCapacity(value); return *this;} /** *

The priority for the launch template override. The highest priority is * launched first.

If the On-Demand AllocationStrategy is set * to prioritized, EC2 Fleet uses priority to determine which launch * template override to use first in fulfilling On-Demand capacity.

If the * Spot AllocationStrategy is set to * capacity-optimized-prioritized, EC2 Fleet uses priority on a * best-effort basis to determine which launch template override to use in * fulfilling Spot capacity, but optimizes for capacity first.

Valid values * are whole numbers starting at 0. The lower the number, the higher * the priority. If no number is set, the launch template override has the lowest * priority. You can set the same priority for different launch template * overrides.

*/ inline double GetPriority() const{ return m_priority; } /** *

The priority for the launch template override. The highest priority is * launched first.

If the On-Demand AllocationStrategy is set * to prioritized, EC2 Fleet uses priority to determine which launch * template override to use first in fulfilling On-Demand capacity.

If the * Spot AllocationStrategy is set to * capacity-optimized-prioritized, EC2 Fleet uses priority on a * best-effort basis to determine which launch template override to use in * fulfilling Spot capacity, but optimizes for capacity first.

Valid values * are whole numbers starting at 0. The lower the number, the higher * the priority. If no number is set, the launch template override has the lowest * priority. You can set the same priority for different launch template * overrides.

*/ inline bool PriorityHasBeenSet() const { return m_priorityHasBeenSet; } /** *

The priority for the launch template override. The highest priority is * launched first.

If the On-Demand AllocationStrategy is set * to prioritized, EC2 Fleet uses priority to determine which launch * template override to use first in fulfilling On-Demand capacity.

If the * Spot AllocationStrategy is set to * capacity-optimized-prioritized, EC2 Fleet uses priority on a * best-effort basis to determine which launch template override to use in * fulfilling Spot capacity, but optimizes for capacity first.

Valid values * are whole numbers starting at 0. The lower the number, the higher * the priority. If no number is set, the launch template override has the lowest * priority. You can set the same priority for different launch template * overrides.

*/ inline void SetPriority(double value) { m_priorityHasBeenSet = true; m_priority = value; } /** *

The priority for the launch template override. The highest priority is * launched first.

If the On-Demand AllocationStrategy is set * to prioritized, EC2 Fleet uses priority to determine which launch * template override to use first in fulfilling On-Demand capacity.

If the * Spot AllocationStrategy is set to * capacity-optimized-prioritized, EC2 Fleet uses priority on a * best-effort basis to determine which launch template override to use in * fulfilling Spot capacity, but optimizes for capacity first.

Valid values * are whole numbers starting at 0. The lower the number, the higher * the priority. If no number is set, the launch template override has the lowest * priority. You can set the same priority for different launch template * overrides.

*/ inline FleetLaunchTemplateOverridesRequest& WithPriority(double value) { SetPriority(value); return *this;} /** *

The location where the instance launched, if applicable.

*/ inline const Placement& GetPlacement() const{ return m_placement; } /** *

The location where the instance launched, if applicable.

*/ inline bool PlacementHasBeenSet() const { return m_placementHasBeenSet; } /** *

The location where the instance launched, if applicable.

*/ inline void SetPlacement(const Placement& value) { m_placementHasBeenSet = true; m_placement = value; } /** *

The location where the instance launched, if applicable.

*/ inline void SetPlacement(Placement&& value) { m_placementHasBeenSet = true; m_placement = std::move(value); } /** *

The location where the instance launched, if applicable.

*/ inline FleetLaunchTemplateOverridesRequest& WithPlacement(const Placement& value) { SetPlacement(value); return *this;} /** *

The location where the instance launched, if applicable.

*/ inline FleetLaunchTemplateOverridesRequest& WithPlacement(Placement&& value) { SetPlacement(std::move(value)); return *this;} /** *

The attributes for the instance types. When you specify instance attributes, * Amazon EC2 will identify instance types with those attributes.

If * you specify InstanceRequirements, you can't specify * InstanceType.

*/ inline const InstanceRequirementsRequest& GetInstanceRequirements() const{ return m_instanceRequirements; } /** *

The attributes for the instance types. When you specify instance attributes, * Amazon EC2 will identify instance types with those attributes.

If * you specify InstanceRequirements, you can't specify * InstanceType.

*/ inline bool InstanceRequirementsHasBeenSet() const { return m_instanceRequirementsHasBeenSet; } /** *

The attributes for the instance types. When you specify instance attributes, * Amazon EC2 will identify instance types with those attributes.

If * you specify InstanceRequirements, you can't specify * InstanceType.

*/ inline void SetInstanceRequirements(const InstanceRequirementsRequest& value) { m_instanceRequirementsHasBeenSet = true; m_instanceRequirements = value; } /** *

The attributes for the instance types. When you specify instance attributes, * Amazon EC2 will identify instance types with those attributes.

If * you specify InstanceRequirements, you can't specify * InstanceType.

*/ inline void SetInstanceRequirements(InstanceRequirementsRequest&& value) { m_instanceRequirementsHasBeenSet = true; m_instanceRequirements = std::move(value); } /** *

The attributes for the instance types. When you specify instance attributes, * Amazon EC2 will identify instance types with those attributes.

If * you specify InstanceRequirements, you can't specify * InstanceType.

*/ inline FleetLaunchTemplateOverridesRequest& WithInstanceRequirements(const InstanceRequirementsRequest& value) { SetInstanceRequirements(value); return *this;} /** *

The attributes for the instance types. When you specify instance attributes, * Amazon EC2 will identify instance types with those attributes.

If * you specify InstanceRequirements, you can't specify * InstanceType.

*/ inline FleetLaunchTemplateOverridesRequest& WithInstanceRequirements(InstanceRequirementsRequest&& value) { SetInstanceRequirements(std::move(value)); return *this;} /** *

The ID of the AMI. An AMI is required to launch an instance. This parameter * is only available for fleets of type instant. For fleets of type * maintain and request, you must specify the AMI ID in * the launch template.

*/ inline const Aws::String& GetImageId() const{ return m_imageId; } /** *

The ID of the AMI. An AMI is required to launch an instance. This parameter * is only available for fleets of type instant. For fleets of type * maintain and request, you must specify the AMI ID in * the launch template.

*/ inline bool ImageIdHasBeenSet() const { return m_imageIdHasBeenSet; } /** *

The ID of the AMI. An AMI is required to launch an instance. This parameter * is only available for fleets of type instant. For fleets of type * maintain and request, you must specify the AMI ID in * the launch template.

*/ inline void SetImageId(const Aws::String& value) { m_imageIdHasBeenSet = true; m_imageId = value; } /** *

The ID of the AMI. An AMI is required to launch an instance. This parameter * is only available for fleets of type instant. For fleets of type * maintain and request, you must specify the AMI ID in * the launch template.

*/ inline void SetImageId(Aws::String&& value) { m_imageIdHasBeenSet = true; m_imageId = std::move(value); } /** *

The ID of the AMI. An AMI is required to launch an instance. This parameter * is only available for fleets of type instant. For fleets of type * maintain and request, you must specify the AMI ID in * the launch template.

*/ inline void SetImageId(const char* value) { m_imageIdHasBeenSet = true; m_imageId.assign(value); } /** *

The ID of the AMI. An AMI is required to launch an instance. This parameter * is only available for fleets of type instant. For fleets of type * maintain and request, you must specify the AMI ID in * the launch template.

*/ inline FleetLaunchTemplateOverridesRequest& WithImageId(const Aws::String& value) { SetImageId(value); return *this;} /** *

The ID of the AMI. An AMI is required to launch an instance. This parameter * is only available for fleets of type instant. For fleets of type * maintain and request, you must specify the AMI ID in * the launch template.

*/ inline FleetLaunchTemplateOverridesRequest& WithImageId(Aws::String&& value) { SetImageId(std::move(value)); return *this;} /** *

The ID of the AMI. An AMI is required to launch an instance. This parameter * is only available for fleets of type instant. For fleets of type * maintain and request, you must specify the AMI ID in * the launch template.

*/ inline FleetLaunchTemplateOverridesRequest& WithImageId(const char* value) { SetImageId(value); return *this;} private: InstanceType m_instanceType; bool m_instanceTypeHasBeenSet = false; Aws::String m_maxPrice; bool m_maxPriceHasBeenSet = false; Aws::String m_subnetId; bool m_subnetIdHasBeenSet = false; Aws::String m_availabilityZone; bool m_availabilityZoneHasBeenSet = false; double m_weightedCapacity; bool m_weightedCapacityHasBeenSet = false; double m_priority; bool m_priorityHasBeenSet = false; Placement m_placement; bool m_placementHasBeenSet = false; InstanceRequirementsRequest m_instanceRequirements; bool m_instanceRequirementsHasBeenSet = false; Aws::String m_imageId; bool m_imageIdHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws