/** * 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 #include namespace Aws { namespace EC2 { namespace Model { /** */ class ModifyFleetRequest : public EC2Request { public: AWS_EC2_API ModifyFleetRequest(); // 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 "ModifyFleet"; } AWS_EC2_API Aws::String SerializePayload() const override; protected: AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline bool GetDryRun() const{ return m_dryRun; } /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; } /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; } /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline ModifyFleetRequest& WithDryRun(bool value) { SetDryRun(value); return *this;} /** *

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

Supported only for fleets of type maintain.

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

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

Supported only for fleets of type maintain.

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

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

Supported only for fleets of type maintain.

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

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

Supported only for fleets of type maintain.

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

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

Supported only for fleets of type maintain.

*/ inline ModifyFleetRequest& WithExcessCapacityTerminationPolicy(const FleetExcessCapacityTerminationPolicy& value) { SetExcessCapacityTerminationPolicy(value); return *this;} /** *

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

Supported only for fleets of type maintain.

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

The launch template and overrides.

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

The launch template and overrides.

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

The launch template and overrides.

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

The launch template and overrides.

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

The launch template and overrides.

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

The launch template and overrides.

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

The launch template and overrides.

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

The launch template and overrides.

*/ inline ModifyFleetRequest& AddLaunchTemplateConfigs(FleetLaunchTemplateConfigRequest&& value) { m_launchTemplateConfigsHasBeenSet = true; m_launchTemplateConfigs.push_back(std::move(value)); return *this; } /** *

The ID of the EC2 Fleet.

*/ inline const Aws::String& GetFleetId() const{ return m_fleetId; } /** *

The ID of the EC2 Fleet.

*/ inline bool FleetIdHasBeenSet() const { return m_fleetIdHasBeenSet; } /** *

The ID of the EC2 Fleet.

*/ inline void SetFleetId(const Aws::String& value) { m_fleetIdHasBeenSet = true; m_fleetId = value; } /** *

The ID of the EC2 Fleet.

*/ inline void SetFleetId(Aws::String&& value) { m_fleetIdHasBeenSet = true; m_fleetId = std::move(value); } /** *

The ID of the EC2 Fleet.

*/ inline void SetFleetId(const char* value) { m_fleetIdHasBeenSet = true; m_fleetId.assign(value); } /** *

The ID of the EC2 Fleet.

*/ inline ModifyFleetRequest& WithFleetId(const Aws::String& value) { SetFleetId(value); return *this;} /** *

The ID of the EC2 Fleet.

*/ inline ModifyFleetRequest& WithFleetId(Aws::String&& value) { SetFleetId(std::move(value)); return *this;} /** *

The ID of the EC2 Fleet.

*/ inline ModifyFleetRequest& WithFleetId(const char* value) { SetFleetId(value); return *this;} /** *

The size of the EC2 Fleet.

*/ inline const TargetCapacitySpecificationRequest& GetTargetCapacitySpecification() const{ return m_targetCapacitySpecification; } /** *

The size of the EC2 Fleet.

*/ inline bool TargetCapacitySpecificationHasBeenSet() const { return m_targetCapacitySpecificationHasBeenSet; } /** *

The size of the EC2 Fleet.

*/ inline void SetTargetCapacitySpecification(const TargetCapacitySpecificationRequest& value) { m_targetCapacitySpecificationHasBeenSet = true; m_targetCapacitySpecification = value; } /** *

The size of the EC2 Fleet.

*/ inline void SetTargetCapacitySpecification(TargetCapacitySpecificationRequest&& value) { m_targetCapacitySpecificationHasBeenSet = true; m_targetCapacitySpecification = std::move(value); } /** *

The size of the EC2 Fleet.

*/ inline ModifyFleetRequest& WithTargetCapacitySpecification(const TargetCapacitySpecificationRequest& value) { SetTargetCapacitySpecification(value); return *this;} /** *

The size of the EC2 Fleet.

*/ inline ModifyFleetRequest& WithTargetCapacitySpecification(TargetCapacitySpecificationRequest&& value) { SetTargetCapacitySpecification(std::move(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 ModifyFleetRequest& WithContext(const Aws::String& value) { SetContext(value); return *this;} /** *

Reserved.

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

Reserved.

*/ inline ModifyFleetRequest& WithContext(const char* value) { SetContext(value); return *this;} private: bool m_dryRun; bool m_dryRunHasBeenSet = false; FleetExcessCapacityTerminationPolicy m_excessCapacityTerminationPolicy; bool m_excessCapacityTerminationPolicyHasBeenSet = false; Aws::Vector m_launchTemplateConfigs; bool m_launchTemplateConfigsHasBeenSet = false; Aws::String m_fleetId; bool m_fleetIdHasBeenSet = false; TargetCapacitySpecificationRequest m_targetCapacitySpecification; bool m_targetCapacitySpecificationHasBeenSet = false; Aws::String m_context; bool m_contextHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws