/** * 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 CancelSpotFleetRequests.

See Also:

* AWS * API Reference

*/ class CancelSpotFleetRequestsRequest : public EC2Request { public: AWS_EC2_API CancelSpotFleetRequestsRequest(); // 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 "CancelSpotFleetRequests"; } 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 CancelSpotFleetRequestsRequest& WithDryRun(bool value) { SetDryRun(value); return *this;} /** *

The IDs of the Spot Fleet requests.

*/ inline const Aws::Vector& GetSpotFleetRequestIds() const{ return m_spotFleetRequestIds; } /** *

The IDs of the Spot Fleet requests.

*/ inline bool SpotFleetRequestIdsHasBeenSet() const { return m_spotFleetRequestIdsHasBeenSet; } /** *

The IDs of the Spot Fleet requests.

*/ inline void SetSpotFleetRequestIds(const Aws::Vector& value) { m_spotFleetRequestIdsHasBeenSet = true; m_spotFleetRequestIds = value; } /** *

The IDs of the Spot Fleet requests.

*/ inline void SetSpotFleetRequestIds(Aws::Vector&& value) { m_spotFleetRequestIdsHasBeenSet = true; m_spotFleetRequestIds = std::move(value); } /** *

The IDs of the Spot Fleet requests.

*/ inline CancelSpotFleetRequestsRequest& WithSpotFleetRequestIds(const Aws::Vector& value) { SetSpotFleetRequestIds(value); return *this;} /** *

The IDs of the Spot Fleet requests.

*/ inline CancelSpotFleetRequestsRequest& WithSpotFleetRequestIds(Aws::Vector&& value) { SetSpotFleetRequestIds(std::move(value)); return *this;} /** *

The IDs of the Spot Fleet requests.

*/ inline CancelSpotFleetRequestsRequest& AddSpotFleetRequestIds(const Aws::String& value) { m_spotFleetRequestIdsHasBeenSet = true; m_spotFleetRequestIds.push_back(value); return *this; } /** *

The IDs of the Spot Fleet requests.

*/ inline CancelSpotFleetRequestsRequest& AddSpotFleetRequestIds(Aws::String&& value) { m_spotFleetRequestIdsHasBeenSet = true; m_spotFleetRequestIds.push_back(std::move(value)); return *this; } /** *

The IDs of the Spot Fleet requests.

*/ inline CancelSpotFleetRequestsRequest& AddSpotFleetRequestIds(const char* value) { m_spotFleetRequestIdsHasBeenSet = true; m_spotFleetRequestIds.push_back(value); return *this; } /** *

Indicates whether to terminate the associated instances when the Spot Fleet * request is canceled. The default is to terminate the instances.

To let * the instances continue to run after the Spot Fleet request is canceled, specify * no-terminate-instances.

*/ inline bool GetTerminateInstances() const{ return m_terminateInstances; } /** *

Indicates whether to terminate the associated instances when the Spot Fleet * request is canceled. The default is to terminate the instances.

To let * the instances continue to run after the Spot Fleet request is canceled, specify * no-terminate-instances.

*/ inline bool TerminateInstancesHasBeenSet() const { return m_terminateInstancesHasBeenSet; } /** *

Indicates whether to terminate the associated instances when the Spot Fleet * request is canceled. The default is to terminate the instances.

To let * the instances continue to run after the Spot Fleet request is canceled, specify * no-terminate-instances.

*/ inline void SetTerminateInstances(bool value) { m_terminateInstancesHasBeenSet = true; m_terminateInstances = value; } /** *

Indicates whether to terminate the associated instances when the Spot Fleet * request is canceled. The default is to terminate the instances.

To let * the instances continue to run after the Spot Fleet request is canceled, specify * no-terminate-instances.

*/ inline CancelSpotFleetRequestsRequest& WithTerminateInstances(bool value) { SetTerminateInstances(value); return *this;} private: bool m_dryRun; bool m_dryRunHasBeenSet = false; Aws::Vector m_spotFleetRequestIds; bool m_spotFleetRequestIdsHasBeenSet = false; bool m_terminateInstances; bool m_terminateInstancesHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws