1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #pragma once 7 #include <aws/ec2/EC2_EXPORTS.h> 8 #include <aws/core/utils/memory/stl/AWSStreamFwd.h> 9 #include <aws/core/utils/memory/stl/AWSString.h> 10 #include <aws/ec2/model/Tenancy.h> 11 #include <utility> 12 13 namespace Aws 14 { 15 namespace Utils 16 { 17 namespace Xml 18 { 19 class XmlNode; 20 } // namespace Xml 21 } // namespace Utils 22 namespace EC2 23 { 24 namespace Model 25 { 26 27 /** 28 * <p>Describes Spot Instance placement.</p><p><h3>See Also:</h3> <a 29 * href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SpotPlacement">AWS 30 * API Reference</a></p> 31 */ 32 class AWS_EC2_API SpotPlacement 33 { 34 public: 35 SpotPlacement(); 36 SpotPlacement(const Aws::Utils::Xml::XmlNode& xmlNode); 37 SpotPlacement& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); 38 39 void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; 40 void OutputToStream(Aws::OStream& oStream, const char* location) const; 41 42 43 /** 44 * <p>The Availability Zone.</p> <p>[Spot Fleet only] To specify multiple 45 * Availability Zones, separate them using commas; for example, "us-west-2a, 46 * us-west-2b".</p> 47 */ GetAvailabilityZone()48 inline const Aws::String& GetAvailabilityZone() const{ return m_availabilityZone; } 49 50 /** 51 * <p>The Availability Zone.</p> <p>[Spot Fleet only] To specify multiple 52 * Availability Zones, separate them using commas; for example, "us-west-2a, 53 * us-west-2b".</p> 54 */ AvailabilityZoneHasBeenSet()55 inline bool AvailabilityZoneHasBeenSet() const { return m_availabilityZoneHasBeenSet; } 56 57 /** 58 * <p>The Availability Zone.</p> <p>[Spot Fleet only] To specify multiple 59 * Availability Zones, separate them using commas; for example, "us-west-2a, 60 * us-west-2b".</p> 61 */ SetAvailabilityZone(const Aws::String & value)62 inline void SetAvailabilityZone(const Aws::String& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = value; } 63 64 /** 65 * <p>The Availability Zone.</p> <p>[Spot Fleet only] To specify multiple 66 * Availability Zones, separate them using commas; for example, "us-west-2a, 67 * us-west-2b".</p> 68 */ SetAvailabilityZone(Aws::String && value)69 inline void SetAvailabilityZone(Aws::String&& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = std::move(value); } 70 71 /** 72 * <p>The Availability Zone.</p> <p>[Spot Fleet only] To specify multiple 73 * Availability Zones, separate them using commas; for example, "us-west-2a, 74 * us-west-2b".</p> 75 */ SetAvailabilityZone(const char * value)76 inline void SetAvailabilityZone(const char* value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone.assign(value); } 77 78 /** 79 * <p>The Availability Zone.</p> <p>[Spot Fleet only] To specify multiple 80 * Availability Zones, separate them using commas; for example, "us-west-2a, 81 * us-west-2b".</p> 82 */ WithAvailabilityZone(const Aws::String & value)83 inline SpotPlacement& WithAvailabilityZone(const Aws::String& value) { SetAvailabilityZone(value); return *this;} 84 85 /** 86 * <p>The Availability Zone.</p> <p>[Spot Fleet only] To specify multiple 87 * Availability Zones, separate them using commas; for example, "us-west-2a, 88 * us-west-2b".</p> 89 */ WithAvailabilityZone(Aws::String && value)90 inline SpotPlacement& WithAvailabilityZone(Aws::String&& value) { SetAvailabilityZone(std::move(value)); return *this;} 91 92 /** 93 * <p>The Availability Zone.</p> <p>[Spot Fleet only] To specify multiple 94 * Availability Zones, separate them using commas; for example, "us-west-2a, 95 * us-west-2b".</p> 96 */ WithAvailabilityZone(const char * value)97 inline SpotPlacement& WithAvailabilityZone(const char* value) { SetAvailabilityZone(value); return *this;} 98 99 100 /** 101 * <p>The name of the placement group.</p> 102 */ GetGroupName()103 inline const Aws::String& GetGroupName() const{ return m_groupName; } 104 105 /** 106 * <p>The name of the placement group.</p> 107 */ GroupNameHasBeenSet()108 inline bool GroupNameHasBeenSet() const { return m_groupNameHasBeenSet; } 109 110 /** 111 * <p>The name of the placement group.</p> 112 */ SetGroupName(const Aws::String & value)113 inline void SetGroupName(const Aws::String& value) { m_groupNameHasBeenSet = true; m_groupName = value; } 114 115 /** 116 * <p>The name of the placement group.</p> 117 */ SetGroupName(Aws::String && value)118 inline void SetGroupName(Aws::String&& value) { m_groupNameHasBeenSet = true; m_groupName = std::move(value); } 119 120 /** 121 * <p>The name of the placement group.</p> 122 */ SetGroupName(const char * value)123 inline void SetGroupName(const char* value) { m_groupNameHasBeenSet = true; m_groupName.assign(value); } 124 125 /** 126 * <p>The name of the placement group.</p> 127 */ WithGroupName(const Aws::String & value)128 inline SpotPlacement& WithGroupName(const Aws::String& value) { SetGroupName(value); return *this;} 129 130 /** 131 * <p>The name of the placement group.</p> 132 */ WithGroupName(Aws::String && value)133 inline SpotPlacement& WithGroupName(Aws::String&& value) { SetGroupName(std::move(value)); return *this;} 134 135 /** 136 * <p>The name of the placement group.</p> 137 */ WithGroupName(const char * value)138 inline SpotPlacement& WithGroupName(const char* value) { SetGroupName(value); return *this;} 139 140 141 /** 142 * <p>The tenancy of the instance (if the instance is running in a VPC). An 143 * instance with a tenancy of <code>dedicated</code> runs on single-tenant 144 * hardware. The <code>host</code> tenancy is not supported for Spot Instances.</p> 145 */ GetTenancy()146 inline const Tenancy& GetTenancy() const{ return m_tenancy; } 147 148 /** 149 * <p>The tenancy of the instance (if the instance is running in a VPC). An 150 * instance with a tenancy of <code>dedicated</code> runs on single-tenant 151 * hardware. The <code>host</code> tenancy is not supported for Spot Instances.</p> 152 */ TenancyHasBeenSet()153 inline bool TenancyHasBeenSet() const { return m_tenancyHasBeenSet; } 154 155 /** 156 * <p>The tenancy of the instance (if the instance is running in a VPC). An 157 * instance with a tenancy of <code>dedicated</code> runs on single-tenant 158 * hardware. The <code>host</code> tenancy is not supported for Spot Instances.</p> 159 */ SetTenancy(const Tenancy & value)160 inline void SetTenancy(const Tenancy& value) { m_tenancyHasBeenSet = true; m_tenancy = value; } 161 162 /** 163 * <p>The tenancy of the instance (if the instance is running in a VPC). An 164 * instance with a tenancy of <code>dedicated</code> runs on single-tenant 165 * hardware. The <code>host</code> tenancy is not supported for Spot Instances.</p> 166 */ SetTenancy(Tenancy && value)167 inline void SetTenancy(Tenancy&& value) { m_tenancyHasBeenSet = true; m_tenancy = std::move(value); } 168 169 /** 170 * <p>The tenancy of the instance (if the instance is running in a VPC). An 171 * instance with a tenancy of <code>dedicated</code> runs on single-tenant 172 * hardware. The <code>host</code> tenancy is not supported for Spot Instances.</p> 173 */ WithTenancy(const Tenancy & value)174 inline SpotPlacement& WithTenancy(const Tenancy& value) { SetTenancy(value); return *this;} 175 176 /** 177 * <p>The tenancy of the instance (if the instance is running in a VPC). An 178 * instance with a tenancy of <code>dedicated</code> runs on single-tenant 179 * hardware. The <code>host</code> tenancy is not supported for Spot Instances.</p> 180 */ WithTenancy(Tenancy && value)181 inline SpotPlacement& WithTenancy(Tenancy&& value) { SetTenancy(std::move(value)); return *this;} 182 183 private: 184 185 Aws::String m_availabilityZone; 186 bool m_availabilityZoneHasBeenSet; 187 188 Aws::String m_groupName; 189 bool m_groupNameHasBeenSet; 190 191 Tenancy m_tenancy; 192 bool m_tenancyHasBeenSet; 193 }; 194 195 } // namespace Model 196 } // namespace EC2 197 } // namespace Aws 198