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

Contains the parameters for ModifySpotFleetRequest.

See Also:

* AWS * API Reference

*/ class AWS_EC2_API ModifySpotFleetRequestRequest : public EC2Request { public: ModifySpotFleetRequestRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "ModifySpotFleetRequest"; } Aws::String SerializePayload() const override; protected: void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** *

Indicates whether running Spot Instances should be terminated if the target * capacity of the Spot Fleet request is decreased below the current size of the * Spot Fleet.

*/ inline const ExcessCapacityTerminationPolicy& GetExcessCapacityTerminationPolicy() const{ return m_excessCapacityTerminationPolicy; } /** *

Indicates whether running Spot Instances should be terminated if the target * capacity of the Spot Fleet request is decreased below the current size of the * Spot Fleet.

*/ inline bool ExcessCapacityTerminationPolicyHasBeenSet() const { return m_excessCapacityTerminationPolicyHasBeenSet; } /** *

Indicates whether running Spot Instances should be terminated if the target * capacity of the Spot Fleet request is decreased below the current size of the * Spot Fleet.

*/ inline void SetExcessCapacityTerminationPolicy(const ExcessCapacityTerminationPolicy& value) { m_excessCapacityTerminationPolicyHasBeenSet = true; m_excessCapacityTerminationPolicy = value; } /** *

Indicates whether running Spot Instances should be terminated if the target * capacity of the Spot Fleet request is decreased below the current size of the * Spot Fleet.

*/ inline void SetExcessCapacityTerminationPolicy(ExcessCapacityTerminationPolicy&& value) { m_excessCapacityTerminationPolicyHasBeenSet = true; m_excessCapacityTerminationPolicy = std::move(value); } /** *

Indicates whether running Spot Instances should be terminated if the target * capacity of the Spot Fleet request is decreased below the current size of the * Spot Fleet.

*/ inline ModifySpotFleetRequestRequest& WithExcessCapacityTerminationPolicy(const ExcessCapacityTerminationPolicy& value) { SetExcessCapacityTerminationPolicy(value); return *this;} /** *

Indicates whether running Spot Instances should be terminated if the target * capacity of the Spot Fleet request is decreased below the current size of the * Spot Fleet.

*/ inline ModifySpotFleetRequestRequest& WithExcessCapacityTerminationPolicy(ExcessCapacityTerminationPolicy&& value) { SetExcessCapacityTerminationPolicy(std::move(value)); return *this;} /** *

The ID of the Spot Fleet request.

*/ inline const Aws::String& GetSpotFleetRequestId() const{ return m_spotFleetRequestId; } /** *

The ID of the Spot Fleet request.

*/ inline bool SpotFleetRequestIdHasBeenSet() const { return m_spotFleetRequestIdHasBeenSet; } /** *

The ID of the Spot Fleet request.

*/ inline void SetSpotFleetRequestId(const Aws::String& value) { m_spotFleetRequestIdHasBeenSet = true; m_spotFleetRequestId = value; } /** *

The ID of the Spot Fleet request.

*/ inline void SetSpotFleetRequestId(Aws::String&& value) { m_spotFleetRequestIdHasBeenSet = true; m_spotFleetRequestId = std::move(value); } /** *

The ID of the Spot Fleet request.

*/ inline void SetSpotFleetRequestId(const char* value) { m_spotFleetRequestIdHasBeenSet = true; m_spotFleetRequestId.assign(value); } /** *

The ID of the Spot Fleet request.

*/ inline ModifySpotFleetRequestRequest& WithSpotFleetRequestId(const Aws::String& value) { SetSpotFleetRequestId(value); return *this;} /** *

The ID of the Spot Fleet request.

*/ inline ModifySpotFleetRequestRequest& WithSpotFleetRequestId(Aws::String&& value) { SetSpotFleetRequestId(std::move(value)); return *this;} /** *

The ID of the Spot Fleet request.

*/ inline ModifySpotFleetRequestRequest& WithSpotFleetRequestId(const char* value) { SetSpotFleetRequestId(value); return *this;} /** *

The size of the fleet.

*/ inline int GetTargetCapacity() const{ return m_targetCapacity; } /** *

The size of the fleet.

*/ inline bool TargetCapacityHasBeenSet() const { return m_targetCapacityHasBeenSet; } /** *

The size of the fleet.

*/ inline void SetTargetCapacity(int value) { m_targetCapacityHasBeenSet = true; m_targetCapacity = value; } /** *

The size of the fleet.

*/ inline ModifySpotFleetRequestRequest& WithTargetCapacity(int value) { SetTargetCapacity(value); return *this;} /** *

The number of On-Demand Instances in the fleet.

*/ inline int GetOnDemandTargetCapacity() const{ return m_onDemandTargetCapacity; } /** *

The number of On-Demand Instances in the fleet.

*/ inline bool OnDemandTargetCapacityHasBeenSet() const { return m_onDemandTargetCapacityHasBeenSet; } /** *

The number of On-Demand Instances in the fleet.

*/ inline void SetOnDemandTargetCapacity(int value) { m_onDemandTargetCapacityHasBeenSet = true; m_onDemandTargetCapacity = value; } /** *

The number of On-Demand Instances in the fleet.

*/ inline ModifySpotFleetRequestRequest& WithOnDemandTargetCapacity(int value) { SetOnDemandTargetCapacity(value); return *this;} private: ExcessCapacityTerminationPolicy m_excessCapacityTerminationPolicy; bool m_excessCapacityTerminationPolicyHasBeenSet; Aws::String m_spotFleetRequestId; bool m_spotFleetRequestIdHasBeenSet; int m_targetCapacity; bool m_targetCapacityHasBeenSet; int m_onDemandTargetCapacity; bool m_onDemandTargetCapacityHasBeenSet; }; } // namespace Model } // namespace EC2 } // namespace Aws