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

The instance types. We recommend that you specify at least three instance * types. If you specify one or two instance types, or specify variations of a * single instance type (for example, an m3.xlarge with and without * instance storage), the returned placement score will always be low.

If * you specify InstanceTypes, you can't specify * InstanceRequirementsWithMetadata.

*/ inline const Aws::Vector& GetInstanceTypes() const{ return m_instanceTypes; } /** *

The instance types. We recommend that you specify at least three instance * types. If you specify one or two instance types, or specify variations of a * single instance type (for example, an m3.xlarge with and without * instance storage), the returned placement score will always be low.

If * you specify InstanceTypes, you can't specify * InstanceRequirementsWithMetadata.

*/ inline bool InstanceTypesHasBeenSet() const { return m_instanceTypesHasBeenSet; } /** *

The instance types. We recommend that you specify at least three instance * types. If you specify one or two instance types, or specify variations of a * single instance type (for example, an m3.xlarge with and without * instance storage), the returned placement score will always be low.

If * you specify InstanceTypes, you can't specify * InstanceRequirementsWithMetadata.

*/ inline void SetInstanceTypes(const Aws::Vector& value) { m_instanceTypesHasBeenSet = true; m_instanceTypes = value; } /** *

The instance types. We recommend that you specify at least three instance * types. If you specify one or two instance types, or specify variations of a * single instance type (for example, an m3.xlarge with and without * instance storage), the returned placement score will always be low.

If * you specify InstanceTypes, you can't specify * InstanceRequirementsWithMetadata.

*/ inline void SetInstanceTypes(Aws::Vector&& value) { m_instanceTypesHasBeenSet = true; m_instanceTypes = std::move(value); } /** *

The instance types. We recommend that you specify at least three instance * types. If you specify one or two instance types, or specify variations of a * single instance type (for example, an m3.xlarge with and without * instance storage), the returned placement score will always be low.

If * you specify InstanceTypes, you can't specify * InstanceRequirementsWithMetadata.

*/ inline GetSpotPlacementScoresRequest& WithInstanceTypes(const Aws::Vector& value) { SetInstanceTypes(value); return *this;} /** *

The instance types. We recommend that you specify at least three instance * types. If you specify one or two instance types, or specify variations of a * single instance type (for example, an m3.xlarge with and without * instance storage), the returned placement score will always be low.

If * you specify InstanceTypes, you can't specify * InstanceRequirementsWithMetadata.

*/ inline GetSpotPlacementScoresRequest& WithInstanceTypes(Aws::Vector&& value) { SetInstanceTypes(std::move(value)); return *this;} /** *

The instance types. We recommend that you specify at least three instance * types. If you specify one or two instance types, or specify variations of a * single instance type (for example, an m3.xlarge with and without * instance storage), the returned placement score will always be low.

If * you specify InstanceTypes, you can't specify * InstanceRequirementsWithMetadata.

*/ inline GetSpotPlacementScoresRequest& AddInstanceTypes(const Aws::String& value) { m_instanceTypesHasBeenSet = true; m_instanceTypes.push_back(value); return *this; } /** *

The instance types. We recommend that you specify at least three instance * types. If you specify one or two instance types, or specify variations of a * single instance type (for example, an m3.xlarge with and without * instance storage), the returned placement score will always be low.

If * you specify InstanceTypes, you can't specify * InstanceRequirementsWithMetadata.

*/ inline GetSpotPlacementScoresRequest& AddInstanceTypes(Aws::String&& value) { m_instanceTypesHasBeenSet = true; m_instanceTypes.push_back(std::move(value)); return *this; } /** *

The instance types. We recommend that you specify at least three instance * types. If you specify one or two instance types, or specify variations of a * single instance type (for example, an m3.xlarge with and without * instance storage), the returned placement score will always be low.

If * you specify InstanceTypes, you can't specify * InstanceRequirementsWithMetadata.

*/ inline GetSpotPlacementScoresRequest& AddInstanceTypes(const char* value) { m_instanceTypesHasBeenSet = true; m_instanceTypes.push_back(value); return *this; } /** *

The target capacity.

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

The target capacity.

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

The target capacity.

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

The target capacity.

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

The unit for the target capacity.

Default: units * (translates to number of instances)

*/ inline const TargetCapacityUnitType& GetTargetCapacityUnitType() const{ return m_targetCapacityUnitType; } /** *

The unit for the target capacity.

Default: units * (translates to number of instances)

*/ inline bool TargetCapacityUnitTypeHasBeenSet() const { return m_targetCapacityUnitTypeHasBeenSet; } /** *

The unit for the target capacity.

Default: units * (translates to number of instances)

*/ inline void SetTargetCapacityUnitType(const TargetCapacityUnitType& value) { m_targetCapacityUnitTypeHasBeenSet = true; m_targetCapacityUnitType = value; } /** *

The unit for the target capacity.

Default: units * (translates to number of instances)

*/ inline void SetTargetCapacityUnitType(TargetCapacityUnitType&& value) { m_targetCapacityUnitTypeHasBeenSet = true; m_targetCapacityUnitType = std::move(value); } /** *

The unit for the target capacity.

Default: units * (translates to number of instances)

*/ inline GetSpotPlacementScoresRequest& WithTargetCapacityUnitType(const TargetCapacityUnitType& value) { SetTargetCapacityUnitType(value); return *this;} /** *

The unit for the target capacity.

Default: units * (translates to number of instances)

*/ inline GetSpotPlacementScoresRequest& WithTargetCapacityUnitType(TargetCapacityUnitType&& value) { SetTargetCapacityUnitType(std::move(value)); return *this;} /** *

Specify true so that the response returns a list of scored * Availability Zones. Otherwise, the response returns a list of scored * Regions.

A list of scored Availability Zones is useful if you want to * launch all of your Spot capacity into a single Availability Zone.

*/ inline bool GetSingleAvailabilityZone() const{ return m_singleAvailabilityZone; } /** *

Specify true so that the response returns a list of scored * Availability Zones. Otherwise, the response returns a list of scored * Regions.

A list of scored Availability Zones is useful if you want to * launch all of your Spot capacity into a single Availability Zone.

*/ inline bool SingleAvailabilityZoneHasBeenSet() const { return m_singleAvailabilityZoneHasBeenSet; } /** *

Specify true so that the response returns a list of scored * Availability Zones. Otherwise, the response returns a list of scored * Regions.

A list of scored Availability Zones is useful if you want to * launch all of your Spot capacity into a single Availability Zone.

*/ inline void SetSingleAvailabilityZone(bool value) { m_singleAvailabilityZoneHasBeenSet = true; m_singleAvailabilityZone = value; } /** *

Specify true so that the response returns a list of scored * Availability Zones. Otherwise, the response returns a list of scored * Regions.

A list of scored Availability Zones is useful if you want to * launch all of your Spot capacity into a single Availability Zone.

*/ inline GetSpotPlacementScoresRequest& WithSingleAvailabilityZone(bool value) { SetSingleAvailabilityZone(value); return *this;} /** *

The Regions used to narrow down the list of Regions to be scored. Enter the * Region code, for example, us-east-1.

*/ inline const Aws::Vector& GetRegionNames() const{ return m_regionNames; } /** *

The Regions used to narrow down the list of Regions to be scored. Enter the * Region code, for example, us-east-1.

*/ inline bool RegionNamesHasBeenSet() const { return m_regionNamesHasBeenSet; } /** *

The Regions used to narrow down the list of Regions to be scored. Enter the * Region code, for example, us-east-1.

*/ inline void SetRegionNames(const Aws::Vector& value) { m_regionNamesHasBeenSet = true; m_regionNames = value; } /** *

The Regions used to narrow down the list of Regions to be scored. Enter the * Region code, for example, us-east-1.

*/ inline void SetRegionNames(Aws::Vector&& value) { m_regionNamesHasBeenSet = true; m_regionNames = std::move(value); } /** *

The Regions used to narrow down the list of Regions to be scored. Enter the * Region code, for example, us-east-1.

*/ inline GetSpotPlacementScoresRequest& WithRegionNames(const Aws::Vector& value) { SetRegionNames(value); return *this;} /** *

The Regions used to narrow down the list of Regions to be scored. Enter the * Region code, for example, us-east-1.

*/ inline GetSpotPlacementScoresRequest& WithRegionNames(Aws::Vector&& value) { SetRegionNames(std::move(value)); return *this;} /** *

The Regions used to narrow down the list of Regions to be scored. Enter the * Region code, for example, us-east-1.

*/ inline GetSpotPlacementScoresRequest& AddRegionNames(const Aws::String& value) { m_regionNamesHasBeenSet = true; m_regionNames.push_back(value); return *this; } /** *

The Regions used to narrow down the list of Regions to be scored. Enter the * Region code, for example, us-east-1.

*/ inline GetSpotPlacementScoresRequest& AddRegionNames(Aws::String&& value) { m_regionNamesHasBeenSet = true; m_regionNames.push_back(std::move(value)); return *this; } /** *

The Regions used to narrow down the list of Regions to be scored. Enter the * Region code, for example, us-east-1.

*/ inline GetSpotPlacementScoresRequest& AddRegionNames(const char* value) { m_regionNamesHasBeenSet = true; m_regionNames.push_back(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 InstanceRequirementsWithMetadata, you can't specify * InstanceTypes.

*/ inline const InstanceRequirementsWithMetadataRequest& GetInstanceRequirementsWithMetadata() const{ return m_instanceRequirementsWithMetadata; } /** *

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

If you * specify InstanceRequirementsWithMetadata, you can't specify * InstanceTypes.

*/ inline bool InstanceRequirementsWithMetadataHasBeenSet() const { return m_instanceRequirementsWithMetadataHasBeenSet; } /** *

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

If you * specify InstanceRequirementsWithMetadata, you can't specify * InstanceTypes.

*/ inline void SetInstanceRequirementsWithMetadata(const InstanceRequirementsWithMetadataRequest& value) { m_instanceRequirementsWithMetadataHasBeenSet = true; m_instanceRequirementsWithMetadata = value; } /** *

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

If you * specify InstanceRequirementsWithMetadata, you can't specify * InstanceTypes.

*/ inline void SetInstanceRequirementsWithMetadata(InstanceRequirementsWithMetadataRequest&& value) { m_instanceRequirementsWithMetadataHasBeenSet = true; m_instanceRequirementsWithMetadata = 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 InstanceRequirementsWithMetadata, you can't specify * InstanceTypes.

*/ inline GetSpotPlacementScoresRequest& WithInstanceRequirementsWithMetadata(const InstanceRequirementsWithMetadataRequest& value) { SetInstanceRequirementsWithMetadata(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 InstanceRequirementsWithMetadata, you can't specify * InstanceTypes.

*/ inline GetSpotPlacementScoresRequest& WithInstanceRequirementsWithMetadata(InstanceRequirementsWithMetadataRequest&& value) { SetInstanceRequirementsWithMetadata(std::move(value)); return *this;} /** *

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 GetSpotPlacementScoresRequest& WithDryRun(bool value) { SetDryRun(value); return *this;} /** *

The maximum number of items to return for this request. To get the next page * of items, make another request with the token returned in the output. For more * information, see Pagination.

*/ inline int GetMaxResults() const{ return m_maxResults; } /** *

The maximum number of items to return for this request. To get the next page * of items, make another request with the token returned in the output. For more * information, see Pagination.

*/ inline bool MaxResultsHasBeenSet() const { return m_maxResultsHasBeenSet; } /** *

The maximum number of items to return for this request. To get the next page * of items, make another request with the token returned in the output. For more * information, see Pagination.

*/ inline void SetMaxResults(int value) { m_maxResultsHasBeenSet = true; m_maxResults = value; } /** *

The maximum number of items to return for this request. To get the next page * of items, make another request with the token returned in the output. For more * information, see Pagination.

*/ inline GetSpotPlacementScoresRequest& WithMaxResults(int value) { SetMaxResults(value); return *this;} /** *

The token returned from a previous paginated request. Pagination continues * from the end of the items returned by the previous request.

*/ inline const Aws::String& GetNextToken() const{ return m_nextToken; } /** *

The token returned from a previous paginated request. Pagination continues * from the end of the items returned by the previous request.

*/ inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; } /** *

The token returned from a previous paginated request. Pagination continues * from the end of the items returned by the previous request.

*/ inline void SetNextToken(const Aws::String& value) { m_nextTokenHasBeenSet = true; m_nextToken = value; } /** *

The token returned from a previous paginated request. Pagination continues * from the end of the items returned by the previous request.

*/ inline void SetNextToken(Aws::String&& value) { m_nextTokenHasBeenSet = true; m_nextToken = std::move(value); } /** *

The token returned from a previous paginated request. Pagination continues * from the end of the items returned by the previous request.

*/ inline void SetNextToken(const char* value) { m_nextTokenHasBeenSet = true; m_nextToken.assign(value); } /** *

The token returned from a previous paginated request. Pagination continues * from the end of the items returned by the previous request.

*/ inline GetSpotPlacementScoresRequest& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;} /** *

The token returned from a previous paginated request. Pagination continues * from the end of the items returned by the previous request.

*/ inline GetSpotPlacementScoresRequest& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;} /** *

The token returned from a previous paginated request. Pagination continues * from the end of the items returned by the previous request.

*/ inline GetSpotPlacementScoresRequest& WithNextToken(const char* value) { SetNextToken(value); return *this;} private: Aws::Vector m_instanceTypes; bool m_instanceTypesHasBeenSet = false; int m_targetCapacity; bool m_targetCapacityHasBeenSet = false; TargetCapacityUnitType m_targetCapacityUnitType; bool m_targetCapacityUnitTypeHasBeenSet = false; bool m_singleAvailabilityZone; bool m_singleAvailabilityZoneHasBeenSet = false; Aws::Vector m_regionNames; bool m_regionNamesHasBeenSet = false; InstanceRequirementsWithMetadataRequest m_instanceRequirementsWithMetadata; bool m_instanceRequirementsWithMetadataHasBeenSet = false; bool m_dryRun; bool m_dryRunHasBeenSet = false; int m_maxResults; bool m_maxResultsHasBeenSet = false; Aws::String m_nextToken; bool m_nextTokenHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws