/** * 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 EC2 { namespace Model { /** *

Contains the parameters for ModifySpotFleetRequest.

See Also:

* AWS * API Reference

*/ class ModifySpotFleetRequestRequest : public EC2Request { public: AWS_EC2_API 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_EC2_API Aws::String SerializePayload() const override; protected: AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** *

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

Supported only for fleets of type maintain.

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

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

Supported only for fleets of type maintain.

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

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

Supported only for fleets of type maintain.

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

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

Supported only for fleets of type maintain.

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

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

Supported only for fleets of type maintain.

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

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

Supported only for fleets of type maintain.

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

The launch template and overrides. You can only use this parameter if you * specified a launch template (LaunchTemplateConfigs) in your Spot * Fleet request. If you specified LaunchSpecifications in your Spot * Fleet request, then omit this parameter.

*/ inline const Aws::Vector& GetLaunchTemplateConfigs() const{ return m_launchTemplateConfigs; } /** *

The launch template and overrides. You can only use this parameter if you * specified a launch template (LaunchTemplateConfigs) in your Spot * Fleet request. If you specified LaunchSpecifications in your Spot * Fleet request, then omit this parameter.

*/ inline bool LaunchTemplateConfigsHasBeenSet() const { return m_launchTemplateConfigsHasBeenSet; } /** *

The launch template and overrides. You can only use this parameter if you * specified a launch template (LaunchTemplateConfigs) in your Spot * Fleet request. If you specified LaunchSpecifications in your Spot * Fleet request, then omit this parameter.

*/ inline void SetLaunchTemplateConfigs(const Aws::Vector& value) { m_launchTemplateConfigsHasBeenSet = true; m_launchTemplateConfigs = value; } /** *

The launch template and overrides. You can only use this parameter if you * specified a launch template (LaunchTemplateConfigs) in your Spot * Fleet request. If you specified LaunchSpecifications in your Spot * Fleet request, then omit this parameter.

*/ inline void SetLaunchTemplateConfigs(Aws::Vector&& value) { m_launchTemplateConfigsHasBeenSet = true; m_launchTemplateConfigs = std::move(value); } /** *

The launch template and overrides. You can only use this parameter if you * specified a launch template (LaunchTemplateConfigs) in your Spot * Fleet request. If you specified LaunchSpecifications in your Spot * Fleet request, then omit this parameter.

*/ inline ModifySpotFleetRequestRequest& WithLaunchTemplateConfigs(const Aws::Vector& value) { SetLaunchTemplateConfigs(value); return *this;} /** *

The launch template and overrides. You can only use this parameter if you * specified a launch template (LaunchTemplateConfigs) in your Spot * Fleet request. If you specified LaunchSpecifications in your Spot * Fleet request, then omit this parameter.

*/ inline ModifySpotFleetRequestRequest& WithLaunchTemplateConfigs(Aws::Vector&& value) { SetLaunchTemplateConfigs(std::move(value)); return *this;} /** *

The launch template and overrides. You can only use this parameter if you * specified a launch template (LaunchTemplateConfigs) in your Spot * Fleet request. If you specified LaunchSpecifications in your Spot * Fleet request, then omit this parameter.

*/ inline ModifySpotFleetRequestRequest& AddLaunchTemplateConfigs(const LaunchTemplateConfig& value) { m_launchTemplateConfigsHasBeenSet = true; m_launchTemplateConfigs.push_back(value); return *this; } /** *

The launch template and overrides. You can only use this parameter if you * specified a launch template (LaunchTemplateConfigs) in your Spot * Fleet request. If you specified LaunchSpecifications in your Spot * Fleet request, then omit this parameter.

*/ inline ModifySpotFleetRequestRequest& AddLaunchTemplateConfigs(LaunchTemplateConfig&& value) { m_launchTemplateConfigsHasBeenSet = true; m_launchTemplateConfigs.push_back(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;} /** *

Reserved.

*/ inline const Aws::String& GetContext() const{ return m_context; } /** *

Reserved.

*/ inline bool ContextHasBeenSet() const { return m_contextHasBeenSet; } /** *

Reserved.

*/ inline void SetContext(const Aws::String& value) { m_contextHasBeenSet = true; m_context = value; } /** *

Reserved.

*/ inline void SetContext(Aws::String&& value) { m_contextHasBeenSet = true; m_context = std::move(value); } /** *

Reserved.

*/ inline void SetContext(const char* value) { m_contextHasBeenSet = true; m_context.assign(value); } /** *

Reserved.

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

Reserved.

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

Reserved.

*/ inline ModifySpotFleetRequestRequest& WithContext(const char* value) { SetContext(value); return *this;} private: ExcessCapacityTerminationPolicy m_excessCapacityTerminationPolicy; bool m_excessCapacityTerminationPolicyHasBeenSet = false; Aws::Vector m_launchTemplateConfigs; bool m_launchTemplateConfigsHasBeenSet = false; Aws::String m_spotFleetRequestId; bool m_spotFleetRequestIdHasBeenSet = false; int m_targetCapacity; bool m_targetCapacityHasBeenSet = false; int m_onDemandTargetCapacity; bool m_onDemandTargetCapacityHasBeenSet = false; Aws::String m_context; bool m_contextHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws