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/ec2/EC2Request.h> 9 #include <aws/core/utils/memory/stl/AWSVector.h> 10 #include <aws/core/utils/memory/stl/AWSString.h> 11 #include <aws/ec2/model/InstanceType.h> 12 #include <aws/ec2/model/RunInstancesMonitoringEnabled.h> 13 #include <aws/ec2/model/Placement.h> 14 #include <aws/ec2/model/IamInstanceProfileSpecification.h> 15 #include <aws/ec2/model/ShutdownBehavior.h> 16 #include <aws/ec2/model/LaunchTemplateSpecification.h> 17 #include <aws/ec2/model/InstanceMarketOptionsRequest.h> 18 #include <aws/ec2/model/CreditSpecificationRequest.h> 19 #include <aws/ec2/model/CpuOptionsRequest.h> 20 #include <aws/ec2/model/CapacityReservationSpecification.h> 21 #include <aws/ec2/model/HibernationOptionsRequest.h> 22 #include <aws/ec2/model/InstanceMetadataOptionsRequest.h> 23 #include <aws/ec2/model/EnclaveOptionsRequest.h> 24 #include <aws/ec2/model/BlockDeviceMapping.h> 25 #include <aws/ec2/model/InstanceIpv6Address.h> 26 #include <aws/ec2/model/InstanceNetworkInterfaceSpecification.h> 27 #include <aws/ec2/model/ElasticGpuSpecification.h> 28 #include <aws/ec2/model/ElasticInferenceAccelerator.h> 29 #include <aws/ec2/model/TagSpecification.h> 30 #include <aws/ec2/model/LicenseConfigurationRequest.h> 31 #include <utility> 32 #include <aws/core/utils/UUID.h> 33 34 namespace Aws 35 { 36 namespace EC2 37 { 38 namespace Model 39 { 40 41 /** 42 */ 43 class AWS_EC2_API RunInstancesRequest : public EC2Request 44 { 45 public: 46 RunInstancesRequest(); 47 48 // Service request name is the Operation name which will send this request out, 49 // each operation should has unique request name, so that we can get operation's name from this request. 50 // Note: this is not true for response, multiple operations may have the same response name, 51 // so we can not get operation's name from response. GetServiceRequestName()52 inline virtual const char* GetServiceRequestName() const override { return "RunInstances"; } 53 54 Aws::String SerializePayload() const override; 55 56 protected: 57 void DumpBodyToUrl(Aws::Http::URI& uri ) const override; 58 59 public: 60 61 /** 62 * <p>The block device mapping, which defines the EBS volumes and instance store 63 * volumes to attach to the instance at launch. For more information, see <a 64 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html">Block 65 * device mappings</a> in the <i>Amazon EC2 User Guide</i>.</p> 66 */ GetBlockDeviceMappings()67 inline const Aws::Vector<BlockDeviceMapping>& GetBlockDeviceMappings() const{ return m_blockDeviceMappings; } 68 69 /** 70 * <p>The block device mapping, which defines the EBS volumes and instance store 71 * volumes to attach to the instance at launch. For more information, see <a 72 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html">Block 73 * device mappings</a> in the <i>Amazon EC2 User Guide</i>.</p> 74 */ BlockDeviceMappingsHasBeenSet()75 inline bool BlockDeviceMappingsHasBeenSet() const { return m_blockDeviceMappingsHasBeenSet; } 76 77 /** 78 * <p>The block device mapping, which defines the EBS volumes and instance store 79 * volumes to attach to the instance at launch. For more information, see <a 80 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html">Block 81 * device mappings</a> in the <i>Amazon EC2 User Guide</i>.</p> 82 */ SetBlockDeviceMappings(const Aws::Vector<BlockDeviceMapping> & value)83 inline void SetBlockDeviceMappings(const Aws::Vector<BlockDeviceMapping>& value) { m_blockDeviceMappingsHasBeenSet = true; m_blockDeviceMappings = value; } 84 85 /** 86 * <p>The block device mapping, which defines the EBS volumes and instance store 87 * volumes to attach to the instance at launch. For more information, see <a 88 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html">Block 89 * device mappings</a> in the <i>Amazon EC2 User Guide</i>.</p> 90 */ SetBlockDeviceMappings(Aws::Vector<BlockDeviceMapping> && value)91 inline void SetBlockDeviceMappings(Aws::Vector<BlockDeviceMapping>&& value) { m_blockDeviceMappingsHasBeenSet = true; m_blockDeviceMappings = std::move(value); } 92 93 /** 94 * <p>The block device mapping, which defines the EBS volumes and instance store 95 * volumes to attach to the instance at launch. For more information, see <a 96 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html">Block 97 * device mappings</a> in the <i>Amazon EC2 User Guide</i>.</p> 98 */ WithBlockDeviceMappings(const Aws::Vector<BlockDeviceMapping> & value)99 inline RunInstancesRequest& WithBlockDeviceMappings(const Aws::Vector<BlockDeviceMapping>& value) { SetBlockDeviceMappings(value); return *this;} 100 101 /** 102 * <p>The block device mapping, which defines the EBS volumes and instance store 103 * volumes to attach to the instance at launch. For more information, see <a 104 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html">Block 105 * device mappings</a> in the <i>Amazon EC2 User Guide</i>.</p> 106 */ WithBlockDeviceMappings(Aws::Vector<BlockDeviceMapping> && value)107 inline RunInstancesRequest& WithBlockDeviceMappings(Aws::Vector<BlockDeviceMapping>&& value) { SetBlockDeviceMappings(std::move(value)); return *this;} 108 109 /** 110 * <p>The block device mapping, which defines the EBS volumes and instance store 111 * volumes to attach to the instance at launch. For more information, see <a 112 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html">Block 113 * device mappings</a> in the <i>Amazon EC2 User Guide</i>.</p> 114 */ AddBlockDeviceMappings(const BlockDeviceMapping & value)115 inline RunInstancesRequest& AddBlockDeviceMappings(const BlockDeviceMapping& value) { m_blockDeviceMappingsHasBeenSet = true; m_blockDeviceMappings.push_back(value); return *this; } 116 117 /** 118 * <p>The block device mapping, which defines the EBS volumes and instance store 119 * volumes to attach to the instance at launch. For more information, see <a 120 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html">Block 121 * device mappings</a> in the <i>Amazon EC2 User Guide</i>.</p> 122 */ AddBlockDeviceMappings(BlockDeviceMapping && value)123 inline RunInstancesRequest& AddBlockDeviceMappings(BlockDeviceMapping&& value) { m_blockDeviceMappingsHasBeenSet = true; m_blockDeviceMappings.push_back(std::move(value)); return *this; } 124 125 126 /** 127 * <p>The ID of the AMI. An AMI ID is required to launch an instance and must be 128 * specified here or in a launch template.</p> 129 */ GetImageId()130 inline const Aws::String& GetImageId() const{ return m_imageId; } 131 132 /** 133 * <p>The ID of the AMI. An AMI ID is required to launch an instance and must be 134 * specified here or in a launch template.</p> 135 */ ImageIdHasBeenSet()136 inline bool ImageIdHasBeenSet() const { return m_imageIdHasBeenSet; } 137 138 /** 139 * <p>The ID of the AMI. An AMI ID is required to launch an instance and must be 140 * specified here or in a launch template.</p> 141 */ SetImageId(const Aws::String & value)142 inline void SetImageId(const Aws::String& value) { m_imageIdHasBeenSet = true; m_imageId = value; } 143 144 /** 145 * <p>The ID of the AMI. An AMI ID is required to launch an instance and must be 146 * specified here or in a launch template.</p> 147 */ SetImageId(Aws::String && value)148 inline void SetImageId(Aws::String&& value) { m_imageIdHasBeenSet = true; m_imageId = std::move(value); } 149 150 /** 151 * <p>The ID of the AMI. An AMI ID is required to launch an instance and must be 152 * specified here or in a launch template.</p> 153 */ SetImageId(const char * value)154 inline void SetImageId(const char* value) { m_imageIdHasBeenSet = true; m_imageId.assign(value); } 155 156 /** 157 * <p>The ID of the AMI. An AMI ID is required to launch an instance and must be 158 * specified here or in a launch template.</p> 159 */ WithImageId(const Aws::String & value)160 inline RunInstancesRequest& WithImageId(const Aws::String& value) { SetImageId(value); return *this;} 161 162 /** 163 * <p>The ID of the AMI. An AMI ID is required to launch an instance and must be 164 * specified here or in a launch template.</p> 165 */ WithImageId(Aws::String && value)166 inline RunInstancesRequest& WithImageId(Aws::String&& value) { SetImageId(std::move(value)); return *this;} 167 168 /** 169 * <p>The ID of the AMI. An AMI ID is required to launch an instance and must be 170 * specified here or in a launch template.</p> 171 */ WithImageId(const char * value)172 inline RunInstancesRequest& WithImageId(const char* value) { SetImageId(value); return *this;} 173 174 175 /** 176 * <p>The instance type. For more information, see <a 177 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance 178 * types</a> in the <i>Amazon EC2 User Guide</i>.</p> <p>Default: 179 * <code>m1.small</code> </p> 180 */ GetInstanceType()181 inline const InstanceType& GetInstanceType() const{ return m_instanceType; } 182 183 /** 184 * <p>The instance type. For more information, see <a 185 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance 186 * types</a> in the <i>Amazon EC2 User Guide</i>.</p> <p>Default: 187 * <code>m1.small</code> </p> 188 */ InstanceTypeHasBeenSet()189 inline bool InstanceTypeHasBeenSet() const { return m_instanceTypeHasBeenSet; } 190 191 /** 192 * <p>The instance type. For more information, see <a 193 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance 194 * types</a> in the <i>Amazon EC2 User Guide</i>.</p> <p>Default: 195 * <code>m1.small</code> </p> 196 */ SetInstanceType(const InstanceType & value)197 inline void SetInstanceType(const InstanceType& value) { m_instanceTypeHasBeenSet = true; m_instanceType = value; } 198 199 /** 200 * <p>The instance type. For more information, see <a 201 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance 202 * types</a> in the <i>Amazon EC2 User Guide</i>.</p> <p>Default: 203 * <code>m1.small</code> </p> 204 */ SetInstanceType(InstanceType && value)205 inline void SetInstanceType(InstanceType&& value) { m_instanceTypeHasBeenSet = true; m_instanceType = std::move(value); } 206 207 /** 208 * <p>The instance type. For more information, see <a 209 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance 210 * types</a> in the <i>Amazon EC2 User Guide</i>.</p> <p>Default: 211 * <code>m1.small</code> </p> 212 */ WithInstanceType(const InstanceType & value)213 inline RunInstancesRequest& WithInstanceType(const InstanceType& value) { SetInstanceType(value); return *this;} 214 215 /** 216 * <p>The instance type. For more information, see <a 217 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance 218 * types</a> in the <i>Amazon EC2 User Guide</i>.</p> <p>Default: 219 * <code>m1.small</code> </p> 220 */ WithInstanceType(InstanceType && value)221 inline RunInstancesRequest& WithInstanceType(InstanceType&& value) { SetInstanceType(std::move(value)); return *this;} 222 223 224 /** 225 * <p>[EC2-VPC] The number of IPv6 addresses to associate with the primary network 226 * interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet. 227 * You cannot specify this option and the option to assign specific IPv6 addresses 228 * in the same request. You can specify this option if you've specified a minimum 229 * number of instances to launch.</p> <p>You cannot specify this option and the 230 * network interfaces option in the same request.</p> 231 */ GetIpv6AddressCount()232 inline int GetIpv6AddressCount() const{ return m_ipv6AddressCount; } 233 234 /** 235 * <p>[EC2-VPC] The number of IPv6 addresses to associate with the primary network 236 * interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet. 237 * You cannot specify this option and the option to assign specific IPv6 addresses 238 * in the same request. You can specify this option if you've specified a minimum 239 * number of instances to launch.</p> <p>You cannot specify this option and the 240 * network interfaces option in the same request.</p> 241 */ Ipv6AddressCountHasBeenSet()242 inline bool Ipv6AddressCountHasBeenSet() const { return m_ipv6AddressCountHasBeenSet; } 243 244 /** 245 * <p>[EC2-VPC] The number of IPv6 addresses to associate with the primary network 246 * interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet. 247 * You cannot specify this option and the option to assign specific IPv6 addresses 248 * in the same request. You can specify this option if you've specified a minimum 249 * number of instances to launch.</p> <p>You cannot specify this option and the 250 * network interfaces option in the same request.</p> 251 */ SetIpv6AddressCount(int value)252 inline void SetIpv6AddressCount(int value) { m_ipv6AddressCountHasBeenSet = true; m_ipv6AddressCount = value; } 253 254 /** 255 * <p>[EC2-VPC] The number of IPv6 addresses to associate with the primary network 256 * interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet. 257 * You cannot specify this option and the option to assign specific IPv6 addresses 258 * in the same request. You can specify this option if you've specified a minimum 259 * number of instances to launch.</p> <p>You cannot specify this option and the 260 * network interfaces option in the same request.</p> 261 */ WithIpv6AddressCount(int value)262 inline RunInstancesRequest& WithIpv6AddressCount(int value) { SetIpv6AddressCount(value); return *this;} 263 264 265 /** 266 * <p>[EC2-VPC] The IPv6 addresses from the range of the subnet to associate with 267 * the primary network interface. You cannot specify this option and the option to 268 * assign a number of IPv6 addresses in the same request. You cannot specify this 269 * option if you've specified a minimum number of instances to launch.</p> <p>You 270 * cannot specify this option and the network interfaces option in the same 271 * request.</p> 272 */ GetIpv6Addresses()273 inline const Aws::Vector<InstanceIpv6Address>& GetIpv6Addresses() const{ return m_ipv6Addresses; } 274 275 /** 276 * <p>[EC2-VPC] The IPv6 addresses from the range of the subnet to associate with 277 * the primary network interface. You cannot specify this option and the option to 278 * assign a number of IPv6 addresses in the same request. You cannot specify this 279 * option if you've specified a minimum number of instances to launch.</p> <p>You 280 * cannot specify this option and the network interfaces option in the same 281 * request.</p> 282 */ Ipv6AddressesHasBeenSet()283 inline bool Ipv6AddressesHasBeenSet() const { return m_ipv6AddressesHasBeenSet; } 284 285 /** 286 * <p>[EC2-VPC] The IPv6 addresses from the range of the subnet to associate with 287 * the primary network interface. You cannot specify this option and the option to 288 * assign a number of IPv6 addresses in the same request. You cannot specify this 289 * option if you've specified a minimum number of instances to launch.</p> <p>You 290 * cannot specify this option and the network interfaces option in the same 291 * request.</p> 292 */ SetIpv6Addresses(const Aws::Vector<InstanceIpv6Address> & value)293 inline void SetIpv6Addresses(const Aws::Vector<InstanceIpv6Address>& value) { m_ipv6AddressesHasBeenSet = true; m_ipv6Addresses = value; } 294 295 /** 296 * <p>[EC2-VPC] The IPv6 addresses from the range of the subnet to associate with 297 * the primary network interface. You cannot specify this option and the option to 298 * assign a number of IPv6 addresses in the same request. You cannot specify this 299 * option if you've specified a minimum number of instances to launch.</p> <p>You 300 * cannot specify this option and the network interfaces option in the same 301 * request.</p> 302 */ SetIpv6Addresses(Aws::Vector<InstanceIpv6Address> && value)303 inline void SetIpv6Addresses(Aws::Vector<InstanceIpv6Address>&& value) { m_ipv6AddressesHasBeenSet = true; m_ipv6Addresses = std::move(value); } 304 305 /** 306 * <p>[EC2-VPC] The IPv6 addresses from the range of the subnet to associate with 307 * the primary network interface. You cannot specify this option and the option to 308 * assign a number of IPv6 addresses in the same request. You cannot specify this 309 * option if you've specified a minimum number of instances to launch.</p> <p>You 310 * cannot specify this option and the network interfaces option in the same 311 * request.</p> 312 */ WithIpv6Addresses(const Aws::Vector<InstanceIpv6Address> & value)313 inline RunInstancesRequest& WithIpv6Addresses(const Aws::Vector<InstanceIpv6Address>& value) { SetIpv6Addresses(value); return *this;} 314 315 /** 316 * <p>[EC2-VPC] The IPv6 addresses from the range of the subnet to associate with 317 * the primary network interface. You cannot specify this option and the option to 318 * assign a number of IPv6 addresses in the same request. You cannot specify this 319 * option if you've specified a minimum number of instances to launch.</p> <p>You 320 * cannot specify this option and the network interfaces option in the same 321 * request.</p> 322 */ WithIpv6Addresses(Aws::Vector<InstanceIpv6Address> && value)323 inline RunInstancesRequest& WithIpv6Addresses(Aws::Vector<InstanceIpv6Address>&& value) { SetIpv6Addresses(std::move(value)); return *this;} 324 325 /** 326 * <p>[EC2-VPC] The IPv6 addresses from the range of the subnet to associate with 327 * the primary network interface. You cannot specify this option and the option to 328 * assign a number of IPv6 addresses in the same request. You cannot specify this 329 * option if you've specified a minimum number of instances to launch.</p> <p>You 330 * cannot specify this option and the network interfaces option in the same 331 * request.</p> 332 */ AddIpv6Addresses(const InstanceIpv6Address & value)333 inline RunInstancesRequest& AddIpv6Addresses(const InstanceIpv6Address& value) { m_ipv6AddressesHasBeenSet = true; m_ipv6Addresses.push_back(value); return *this; } 334 335 /** 336 * <p>[EC2-VPC] The IPv6 addresses from the range of the subnet to associate with 337 * the primary network interface. You cannot specify this option and the option to 338 * assign a number of IPv6 addresses in the same request. You cannot specify this 339 * option if you've specified a minimum number of instances to launch.</p> <p>You 340 * cannot specify this option and the network interfaces option in the same 341 * request.</p> 342 */ AddIpv6Addresses(InstanceIpv6Address && value)343 inline RunInstancesRequest& AddIpv6Addresses(InstanceIpv6Address&& value) { m_ipv6AddressesHasBeenSet = true; m_ipv6Addresses.push_back(std::move(value)); return *this; } 344 345 346 /** 347 * <p>The ID of the kernel.</p> <p>We recommend that you use PV-GRUB 348 * instead of kernels and RAM disks. For more information, see <a 349 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html">PV-GRUB</a> 350 * in the <i>Amazon EC2 User Guide</i>.</p> 351 */ GetKernelId()352 inline const Aws::String& GetKernelId() const{ return m_kernelId; } 353 354 /** 355 * <p>The ID of the kernel.</p> <p>We recommend that you use PV-GRUB 356 * instead of kernels and RAM disks. For more information, see <a 357 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html">PV-GRUB</a> 358 * in the <i>Amazon EC2 User Guide</i>.</p> 359 */ KernelIdHasBeenSet()360 inline bool KernelIdHasBeenSet() const { return m_kernelIdHasBeenSet; } 361 362 /** 363 * <p>The ID of the kernel.</p> <p>We recommend that you use PV-GRUB 364 * instead of kernels and RAM disks. For more information, see <a 365 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html">PV-GRUB</a> 366 * in the <i>Amazon EC2 User Guide</i>.</p> 367 */ SetKernelId(const Aws::String & value)368 inline void SetKernelId(const Aws::String& value) { m_kernelIdHasBeenSet = true; m_kernelId = value; } 369 370 /** 371 * <p>The ID of the kernel.</p> <p>We recommend that you use PV-GRUB 372 * instead of kernels and RAM disks. For more information, see <a 373 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html">PV-GRUB</a> 374 * in the <i>Amazon EC2 User Guide</i>.</p> 375 */ SetKernelId(Aws::String && value)376 inline void SetKernelId(Aws::String&& value) { m_kernelIdHasBeenSet = true; m_kernelId = std::move(value); } 377 378 /** 379 * <p>The ID of the kernel.</p> <p>We recommend that you use PV-GRUB 380 * instead of kernels and RAM disks. For more information, see <a 381 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html">PV-GRUB</a> 382 * in the <i>Amazon EC2 User Guide</i>.</p> 383 */ SetKernelId(const char * value)384 inline void SetKernelId(const char* value) { m_kernelIdHasBeenSet = true; m_kernelId.assign(value); } 385 386 /** 387 * <p>The ID of the kernel.</p> <p>We recommend that you use PV-GRUB 388 * instead of kernels and RAM disks. For more information, see <a 389 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html">PV-GRUB</a> 390 * in the <i>Amazon EC2 User Guide</i>.</p> 391 */ WithKernelId(const Aws::String & value)392 inline RunInstancesRequest& WithKernelId(const Aws::String& value) { SetKernelId(value); return *this;} 393 394 /** 395 * <p>The ID of the kernel.</p> <p>We recommend that you use PV-GRUB 396 * instead of kernels and RAM disks. For more information, see <a 397 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html">PV-GRUB</a> 398 * in the <i>Amazon EC2 User Guide</i>.</p> 399 */ WithKernelId(Aws::String && value)400 inline RunInstancesRequest& WithKernelId(Aws::String&& value) { SetKernelId(std::move(value)); return *this;} 401 402 /** 403 * <p>The ID of the kernel.</p> <p>We recommend that you use PV-GRUB 404 * instead of kernels and RAM disks. For more information, see <a 405 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html">PV-GRUB</a> 406 * in the <i>Amazon EC2 User Guide</i>.</p> 407 */ WithKernelId(const char * value)408 inline RunInstancesRequest& WithKernelId(const char* value) { SetKernelId(value); return *this;} 409 410 411 /** 412 * <p>The name of the key pair. You can create a key pair using <a 413 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateKeyPair.html">CreateKeyPair</a> 414 * or <a 415 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportKeyPair.html">ImportKeyPair</a>.</p> 416 * <p>If you do not specify a key pair, you can't connect to the 417 * instance unless you choose an AMI that is configured to allow users another way 418 * to log in.</p> 419 */ GetKeyName()420 inline const Aws::String& GetKeyName() const{ return m_keyName; } 421 422 /** 423 * <p>The name of the key pair. You can create a key pair using <a 424 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateKeyPair.html">CreateKeyPair</a> 425 * or <a 426 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportKeyPair.html">ImportKeyPair</a>.</p> 427 * <p>If you do not specify a key pair, you can't connect to the 428 * instance unless you choose an AMI that is configured to allow users another way 429 * to log in.</p> 430 */ KeyNameHasBeenSet()431 inline bool KeyNameHasBeenSet() const { return m_keyNameHasBeenSet; } 432 433 /** 434 * <p>The name of the key pair. You can create a key pair using <a 435 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateKeyPair.html">CreateKeyPair</a> 436 * or <a 437 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportKeyPair.html">ImportKeyPair</a>.</p> 438 * <p>If you do not specify a key pair, you can't connect to the 439 * instance unless you choose an AMI that is configured to allow users another way 440 * to log in.</p> 441 */ SetKeyName(const Aws::String & value)442 inline void SetKeyName(const Aws::String& value) { m_keyNameHasBeenSet = true; m_keyName = value; } 443 444 /** 445 * <p>The name of the key pair. You can create a key pair using <a 446 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateKeyPair.html">CreateKeyPair</a> 447 * or <a 448 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportKeyPair.html">ImportKeyPair</a>.</p> 449 * <p>If you do not specify a key pair, you can't connect to the 450 * instance unless you choose an AMI that is configured to allow users another way 451 * to log in.</p> 452 */ SetKeyName(Aws::String && value)453 inline void SetKeyName(Aws::String&& value) { m_keyNameHasBeenSet = true; m_keyName = std::move(value); } 454 455 /** 456 * <p>The name of the key pair. You can create a key pair using <a 457 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateKeyPair.html">CreateKeyPair</a> 458 * or <a 459 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportKeyPair.html">ImportKeyPair</a>.</p> 460 * <p>If you do not specify a key pair, you can't connect to the 461 * instance unless you choose an AMI that is configured to allow users another way 462 * to log in.</p> 463 */ SetKeyName(const char * value)464 inline void SetKeyName(const char* value) { m_keyNameHasBeenSet = true; m_keyName.assign(value); } 465 466 /** 467 * <p>The name of the key pair. You can create a key pair using <a 468 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateKeyPair.html">CreateKeyPair</a> 469 * or <a 470 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportKeyPair.html">ImportKeyPair</a>.</p> 471 * <p>If you do not specify a key pair, you can't connect to the 472 * instance unless you choose an AMI that is configured to allow users another way 473 * to log in.</p> 474 */ WithKeyName(const Aws::String & value)475 inline RunInstancesRequest& WithKeyName(const Aws::String& value) { SetKeyName(value); return *this;} 476 477 /** 478 * <p>The name of the key pair. You can create a key pair using <a 479 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateKeyPair.html">CreateKeyPair</a> 480 * or <a 481 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportKeyPair.html">ImportKeyPair</a>.</p> 482 * <p>If you do not specify a key pair, you can't connect to the 483 * instance unless you choose an AMI that is configured to allow users another way 484 * to log in.</p> 485 */ WithKeyName(Aws::String && value)486 inline RunInstancesRequest& WithKeyName(Aws::String&& value) { SetKeyName(std::move(value)); return *this;} 487 488 /** 489 * <p>The name of the key pair. You can create a key pair using <a 490 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateKeyPair.html">CreateKeyPair</a> 491 * or <a 492 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportKeyPair.html">ImportKeyPair</a>.</p> 493 * <p>If you do not specify a key pair, you can't connect to the 494 * instance unless you choose an AMI that is configured to allow users another way 495 * to log in.</p> 496 */ WithKeyName(const char * value)497 inline RunInstancesRequest& WithKeyName(const char* value) { SetKeyName(value); return *this;} 498 499 500 /** 501 * <p>The maximum number of instances to launch. If you specify more instances than 502 * Amazon EC2 can launch in the target Availability Zone, Amazon EC2 launches the 503 * largest possible number of instances above <code>MinCount</code>.</p> 504 * <p>Constraints: Between 1 and the maximum number you're allowed for the 505 * specified instance type. For more information about the default limits, and how 506 * to request an increase, see <a 507 * href="http://aws.amazon.com/ec2/faqs/#How_many_instances_can_I_run_in_Amazon_EC2">How 508 * many instances can I run in Amazon EC2</a> in the Amazon EC2 FAQ.</p> 509 */ GetMaxCount()510 inline int GetMaxCount() const{ return m_maxCount; } 511 512 /** 513 * <p>The maximum number of instances to launch. If you specify more instances than 514 * Amazon EC2 can launch in the target Availability Zone, Amazon EC2 launches the 515 * largest possible number of instances above <code>MinCount</code>.</p> 516 * <p>Constraints: Between 1 and the maximum number you're allowed for the 517 * specified instance type. For more information about the default limits, and how 518 * to request an increase, see <a 519 * href="http://aws.amazon.com/ec2/faqs/#How_many_instances_can_I_run_in_Amazon_EC2">How 520 * many instances can I run in Amazon EC2</a> in the Amazon EC2 FAQ.</p> 521 */ MaxCountHasBeenSet()522 inline bool MaxCountHasBeenSet() const { return m_maxCountHasBeenSet; } 523 524 /** 525 * <p>The maximum number of instances to launch. If you specify more instances than 526 * Amazon EC2 can launch in the target Availability Zone, Amazon EC2 launches the 527 * largest possible number of instances above <code>MinCount</code>.</p> 528 * <p>Constraints: Between 1 and the maximum number you're allowed for the 529 * specified instance type. For more information about the default limits, and how 530 * to request an increase, see <a 531 * href="http://aws.amazon.com/ec2/faqs/#How_many_instances_can_I_run_in_Amazon_EC2">How 532 * many instances can I run in Amazon EC2</a> in the Amazon EC2 FAQ.</p> 533 */ SetMaxCount(int value)534 inline void SetMaxCount(int value) { m_maxCountHasBeenSet = true; m_maxCount = value; } 535 536 /** 537 * <p>The maximum number of instances to launch. If you specify more instances than 538 * Amazon EC2 can launch in the target Availability Zone, Amazon EC2 launches the 539 * largest possible number of instances above <code>MinCount</code>.</p> 540 * <p>Constraints: Between 1 and the maximum number you're allowed for the 541 * specified instance type. For more information about the default limits, and how 542 * to request an increase, see <a 543 * href="http://aws.amazon.com/ec2/faqs/#How_many_instances_can_I_run_in_Amazon_EC2">How 544 * many instances can I run in Amazon EC2</a> in the Amazon EC2 FAQ.</p> 545 */ WithMaxCount(int value)546 inline RunInstancesRequest& WithMaxCount(int value) { SetMaxCount(value); return *this;} 547 548 549 /** 550 * <p>The minimum number of instances to launch. If you specify a minimum that is 551 * more instances than Amazon EC2 can launch in the target Availability Zone, 552 * Amazon EC2 launches no instances.</p> <p>Constraints: Between 1 and the maximum 553 * number you're allowed for the specified instance type. For more information 554 * about the default limits, and how to request an increase, see <a 555 * href="http://aws.amazon.com/ec2/faqs/#How_many_instances_can_I_run_in_Amazon_EC2">How 556 * many instances can I run in Amazon EC2</a> in the Amazon EC2 General FAQ.</p> 557 */ GetMinCount()558 inline int GetMinCount() const{ return m_minCount; } 559 560 /** 561 * <p>The minimum number of instances to launch. If you specify a minimum that is 562 * more instances than Amazon EC2 can launch in the target Availability Zone, 563 * Amazon EC2 launches no instances.</p> <p>Constraints: Between 1 and the maximum 564 * number you're allowed for the specified instance type. For more information 565 * about the default limits, and how to request an increase, see <a 566 * href="http://aws.amazon.com/ec2/faqs/#How_many_instances_can_I_run_in_Amazon_EC2">How 567 * many instances can I run in Amazon EC2</a> in the Amazon EC2 General FAQ.</p> 568 */ MinCountHasBeenSet()569 inline bool MinCountHasBeenSet() const { return m_minCountHasBeenSet; } 570 571 /** 572 * <p>The minimum number of instances to launch. If you specify a minimum that is 573 * more instances than Amazon EC2 can launch in the target Availability Zone, 574 * Amazon EC2 launches no instances.</p> <p>Constraints: Between 1 and the maximum 575 * number you're allowed for the specified instance type. For more information 576 * about the default limits, and how to request an increase, see <a 577 * href="http://aws.amazon.com/ec2/faqs/#How_many_instances_can_I_run_in_Amazon_EC2">How 578 * many instances can I run in Amazon EC2</a> in the Amazon EC2 General FAQ.</p> 579 */ SetMinCount(int value)580 inline void SetMinCount(int value) { m_minCountHasBeenSet = true; m_minCount = value; } 581 582 /** 583 * <p>The minimum number of instances to launch. If you specify a minimum that is 584 * more instances than Amazon EC2 can launch in the target Availability Zone, 585 * Amazon EC2 launches no instances.</p> <p>Constraints: Between 1 and the maximum 586 * number you're allowed for the specified instance type. For more information 587 * about the default limits, and how to request an increase, see <a 588 * href="http://aws.amazon.com/ec2/faqs/#How_many_instances_can_I_run_in_Amazon_EC2">How 589 * many instances can I run in Amazon EC2</a> in the Amazon EC2 General FAQ.</p> 590 */ WithMinCount(int value)591 inline RunInstancesRequest& WithMinCount(int value) { SetMinCount(value); return *this;} 592 593 594 /** 595 * <p>Specifies whether detailed monitoring is enabled for the instance.</p> 596 */ GetMonitoring()597 inline const RunInstancesMonitoringEnabled& GetMonitoring() const{ return m_monitoring; } 598 599 /** 600 * <p>Specifies whether detailed monitoring is enabled for the instance.</p> 601 */ MonitoringHasBeenSet()602 inline bool MonitoringHasBeenSet() const { return m_monitoringHasBeenSet; } 603 604 /** 605 * <p>Specifies whether detailed monitoring is enabled for the instance.</p> 606 */ SetMonitoring(const RunInstancesMonitoringEnabled & value)607 inline void SetMonitoring(const RunInstancesMonitoringEnabled& value) { m_monitoringHasBeenSet = true; m_monitoring = value; } 608 609 /** 610 * <p>Specifies whether detailed monitoring is enabled for the instance.</p> 611 */ SetMonitoring(RunInstancesMonitoringEnabled && value)612 inline void SetMonitoring(RunInstancesMonitoringEnabled&& value) { m_monitoringHasBeenSet = true; m_monitoring = std::move(value); } 613 614 /** 615 * <p>Specifies whether detailed monitoring is enabled for the instance.</p> 616 */ WithMonitoring(const RunInstancesMonitoringEnabled & value)617 inline RunInstancesRequest& WithMonitoring(const RunInstancesMonitoringEnabled& value) { SetMonitoring(value); return *this;} 618 619 /** 620 * <p>Specifies whether detailed monitoring is enabled for the instance.</p> 621 */ WithMonitoring(RunInstancesMonitoringEnabled && value)622 inline RunInstancesRequest& WithMonitoring(RunInstancesMonitoringEnabled&& value) { SetMonitoring(std::move(value)); return *this;} 623 624 625 /** 626 * <p>The placement for the instance.</p> 627 */ GetPlacement()628 inline const Placement& GetPlacement() const{ return m_placement; } 629 630 /** 631 * <p>The placement for the instance.</p> 632 */ PlacementHasBeenSet()633 inline bool PlacementHasBeenSet() const { return m_placementHasBeenSet; } 634 635 /** 636 * <p>The placement for the instance.</p> 637 */ SetPlacement(const Placement & value)638 inline void SetPlacement(const Placement& value) { m_placementHasBeenSet = true; m_placement = value; } 639 640 /** 641 * <p>The placement for the instance.</p> 642 */ SetPlacement(Placement && value)643 inline void SetPlacement(Placement&& value) { m_placementHasBeenSet = true; m_placement = std::move(value); } 644 645 /** 646 * <p>The placement for the instance.</p> 647 */ WithPlacement(const Placement & value)648 inline RunInstancesRequest& WithPlacement(const Placement& value) { SetPlacement(value); return *this;} 649 650 /** 651 * <p>The placement for the instance.</p> 652 */ WithPlacement(Placement && value)653 inline RunInstancesRequest& WithPlacement(Placement&& value) { SetPlacement(std::move(value)); return *this;} 654 655 656 /** 657 * <p>The ID of the RAM disk to select. Some kernels require additional drivers at 658 * launch. Check the kernel requirements for information about whether you need to 659 * specify a RAM disk. To find kernel requirements, go to the Amazon Web Services 660 * Resource Center and search for the kernel ID.</p> <p>We recommend 661 * that you use PV-GRUB instead of kernels and RAM disks. For more information, see 662 * <a 663 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html">PV-GRUB</a> 664 * in the <i>Amazon EC2 User Guide</i>.</p> 665 */ GetRamdiskId()666 inline const Aws::String& GetRamdiskId() const{ return m_ramdiskId; } 667 668 /** 669 * <p>The ID of the RAM disk to select. Some kernels require additional drivers at 670 * launch. Check the kernel requirements for information about whether you need to 671 * specify a RAM disk. To find kernel requirements, go to the Amazon Web Services 672 * Resource Center and search for the kernel ID.</p> <p>We recommend 673 * that you use PV-GRUB instead of kernels and RAM disks. For more information, see 674 * <a 675 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html">PV-GRUB</a> 676 * in the <i>Amazon EC2 User Guide</i>.</p> 677 */ RamdiskIdHasBeenSet()678 inline bool RamdiskIdHasBeenSet() const { return m_ramdiskIdHasBeenSet; } 679 680 /** 681 * <p>The ID of the RAM disk to select. Some kernels require additional drivers at 682 * launch. Check the kernel requirements for information about whether you need to 683 * specify a RAM disk. To find kernel requirements, go to the Amazon Web Services 684 * Resource Center and search for the kernel ID.</p> <p>We recommend 685 * that you use PV-GRUB instead of kernels and RAM disks. For more information, see 686 * <a 687 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html">PV-GRUB</a> 688 * in the <i>Amazon EC2 User Guide</i>.</p> 689 */ SetRamdiskId(const Aws::String & value)690 inline void SetRamdiskId(const Aws::String& value) { m_ramdiskIdHasBeenSet = true; m_ramdiskId = value; } 691 692 /** 693 * <p>The ID of the RAM disk to select. Some kernels require additional drivers at 694 * launch. Check the kernel requirements for information about whether you need to 695 * specify a RAM disk. To find kernel requirements, go to the Amazon Web Services 696 * Resource Center and search for the kernel ID.</p> <p>We recommend 697 * that you use PV-GRUB instead of kernels and RAM disks. For more information, see 698 * <a 699 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html">PV-GRUB</a> 700 * in the <i>Amazon EC2 User Guide</i>.</p> 701 */ SetRamdiskId(Aws::String && value)702 inline void SetRamdiskId(Aws::String&& value) { m_ramdiskIdHasBeenSet = true; m_ramdiskId = std::move(value); } 703 704 /** 705 * <p>The ID of the RAM disk to select. Some kernels require additional drivers at 706 * launch. Check the kernel requirements for information about whether you need to 707 * specify a RAM disk. To find kernel requirements, go to the Amazon Web Services 708 * Resource Center and search for the kernel ID.</p> <p>We recommend 709 * that you use PV-GRUB instead of kernels and RAM disks. For more information, see 710 * <a 711 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html">PV-GRUB</a> 712 * in the <i>Amazon EC2 User Guide</i>.</p> 713 */ SetRamdiskId(const char * value)714 inline void SetRamdiskId(const char* value) { m_ramdiskIdHasBeenSet = true; m_ramdiskId.assign(value); } 715 716 /** 717 * <p>The ID of the RAM disk to select. Some kernels require additional drivers at 718 * launch. Check the kernel requirements for information about whether you need to 719 * specify a RAM disk. To find kernel requirements, go to the Amazon Web Services 720 * Resource Center and search for the kernel ID.</p> <p>We recommend 721 * that you use PV-GRUB instead of kernels and RAM disks. For more information, see 722 * <a 723 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html">PV-GRUB</a> 724 * in the <i>Amazon EC2 User Guide</i>.</p> 725 */ WithRamdiskId(const Aws::String & value)726 inline RunInstancesRequest& WithRamdiskId(const Aws::String& value) { SetRamdiskId(value); return *this;} 727 728 /** 729 * <p>The ID of the RAM disk to select. Some kernels require additional drivers at 730 * launch. Check the kernel requirements for information about whether you need to 731 * specify a RAM disk. To find kernel requirements, go to the Amazon Web Services 732 * Resource Center and search for the kernel ID.</p> <p>We recommend 733 * that you use PV-GRUB instead of kernels and RAM disks. For more information, see 734 * <a 735 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html">PV-GRUB</a> 736 * in the <i>Amazon EC2 User Guide</i>.</p> 737 */ WithRamdiskId(Aws::String && value)738 inline RunInstancesRequest& WithRamdiskId(Aws::String&& value) { SetRamdiskId(std::move(value)); return *this;} 739 740 /** 741 * <p>The ID of the RAM disk to select. Some kernels require additional drivers at 742 * launch. Check the kernel requirements for information about whether you need to 743 * specify a RAM disk. To find kernel requirements, go to the Amazon Web Services 744 * Resource Center and search for the kernel ID.</p> <p>We recommend 745 * that you use PV-GRUB instead of kernels and RAM disks. For more information, see 746 * <a 747 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html">PV-GRUB</a> 748 * in the <i>Amazon EC2 User Guide</i>.</p> 749 */ WithRamdiskId(const char * value)750 inline RunInstancesRequest& WithRamdiskId(const char* value) { SetRamdiskId(value); return *this;} 751 752 753 /** 754 * <p>The IDs of the security groups. You can create a security group using <a 755 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateSecurityGroup.html">CreateSecurityGroup</a>.</p> 756 * <p>If you specify a network interface, you must specify any security groups as 757 * part of the network interface.</p> 758 */ GetSecurityGroupIds()759 inline const Aws::Vector<Aws::String>& GetSecurityGroupIds() const{ return m_securityGroupIds; } 760 761 /** 762 * <p>The IDs of the security groups. You can create a security group using <a 763 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateSecurityGroup.html">CreateSecurityGroup</a>.</p> 764 * <p>If you specify a network interface, you must specify any security groups as 765 * part of the network interface.</p> 766 */ SecurityGroupIdsHasBeenSet()767 inline bool SecurityGroupIdsHasBeenSet() const { return m_securityGroupIdsHasBeenSet; } 768 769 /** 770 * <p>The IDs of the security groups. You can create a security group using <a 771 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateSecurityGroup.html">CreateSecurityGroup</a>.</p> 772 * <p>If you specify a network interface, you must specify any security groups as 773 * part of the network interface.</p> 774 */ SetSecurityGroupIds(const Aws::Vector<Aws::String> & value)775 inline void SetSecurityGroupIds(const Aws::Vector<Aws::String>& value) { m_securityGroupIdsHasBeenSet = true; m_securityGroupIds = value; } 776 777 /** 778 * <p>The IDs of the security groups. You can create a security group using <a 779 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateSecurityGroup.html">CreateSecurityGroup</a>.</p> 780 * <p>If you specify a network interface, you must specify any security groups as 781 * part of the network interface.</p> 782 */ SetSecurityGroupIds(Aws::Vector<Aws::String> && value)783 inline void SetSecurityGroupIds(Aws::Vector<Aws::String>&& value) { m_securityGroupIdsHasBeenSet = true; m_securityGroupIds = std::move(value); } 784 785 /** 786 * <p>The IDs of the security groups. You can create a security group using <a 787 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateSecurityGroup.html">CreateSecurityGroup</a>.</p> 788 * <p>If you specify a network interface, you must specify any security groups as 789 * part of the network interface.</p> 790 */ WithSecurityGroupIds(const Aws::Vector<Aws::String> & value)791 inline RunInstancesRequest& WithSecurityGroupIds(const Aws::Vector<Aws::String>& value) { SetSecurityGroupIds(value); return *this;} 792 793 /** 794 * <p>The IDs of the security groups. You can create a security group using <a 795 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateSecurityGroup.html">CreateSecurityGroup</a>.</p> 796 * <p>If you specify a network interface, you must specify any security groups as 797 * part of the network interface.</p> 798 */ WithSecurityGroupIds(Aws::Vector<Aws::String> && value)799 inline RunInstancesRequest& WithSecurityGroupIds(Aws::Vector<Aws::String>&& value) { SetSecurityGroupIds(std::move(value)); return *this;} 800 801 /** 802 * <p>The IDs of the security groups. You can create a security group using <a 803 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateSecurityGroup.html">CreateSecurityGroup</a>.</p> 804 * <p>If you specify a network interface, you must specify any security groups as 805 * part of the network interface.</p> 806 */ AddSecurityGroupIds(const Aws::String & value)807 inline RunInstancesRequest& AddSecurityGroupIds(const Aws::String& value) { m_securityGroupIdsHasBeenSet = true; m_securityGroupIds.push_back(value); return *this; } 808 809 /** 810 * <p>The IDs of the security groups. You can create a security group using <a 811 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateSecurityGroup.html">CreateSecurityGroup</a>.</p> 812 * <p>If you specify a network interface, you must specify any security groups as 813 * part of the network interface.</p> 814 */ AddSecurityGroupIds(Aws::String && value)815 inline RunInstancesRequest& AddSecurityGroupIds(Aws::String&& value) { m_securityGroupIdsHasBeenSet = true; m_securityGroupIds.push_back(std::move(value)); return *this; } 816 817 /** 818 * <p>The IDs of the security groups. You can create a security group using <a 819 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateSecurityGroup.html">CreateSecurityGroup</a>.</p> 820 * <p>If you specify a network interface, you must specify any security groups as 821 * part of the network interface.</p> 822 */ AddSecurityGroupIds(const char * value)823 inline RunInstancesRequest& AddSecurityGroupIds(const char* value) { m_securityGroupIdsHasBeenSet = true; m_securityGroupIds.push_back(value); return *this; } 824 825 826 /** 827 * <p>[EC2-Classic, default VPC] The names of the security groups. For a nondefault 828 * VPC, you must use security group IDs instead.</p> <p>If you specify a network 829 * interface, you must specify any security groups as part of the network 830 * interface.</p> <p>Default: Amazon EC2 uses the default security group.</p> 831 */ GetSecurityGroups()832 inline const Aws::Vector<Aws::String>& GetSecurityGroups() const{ return m_securityGroups; } 833 834 /** 835 * <p>[EC2-Classic, default VPC] The names of the security groups. For a nondefault 836 * VPC, you must use security group IDs instead.</p> <p>If you specify a network 837 * interface, you must specify any security groups as part of the network 838 * interface.</p> <p>Default: Amazon EC2 uses the default security group.</p> 839 */ SecurityGroupsHasBeenSet()840 inline bool SecurityGroupsHasBeenSet() const { return m_securityGroupsHasBeenSet; } 841 842 /** 843 * <p>[EC2-Classic, default VPC] The names of the security groups. For a nondefault 844 * VPC, you must use security group IDs instead.</p> <p>If you specify a network 845 * interface, you must specify any security groups as part of the network 846 * interface.</p> <p>Default: Amazon EC2 uses the default security group.</p> 847 */ SetSecurityGroups(const Aws::Vector<Aws::String> & value)848 inline void SetSecurityGroups(const Aws::Vector<Aws::String>& value) { m_securityGroupsHasBeenSet = true; m_securityGroups = value; } 849 850 /** 851 * <p>[EC2-Classic, default VPC] The names of the security groups. For a nondefault 852 * VPC, you must use security group IDs instead.</p> <p>If you specify a network 853 * interface, you must specify any security groups as part of the network 854 * interface.</p> <p>Default: Amazon EC2 uses the default security group.</p> 855 */ SetSecurityGroups(Aws::Vector<Aws::String> && value)856 inline void SetSecurityGroups(Aws::Vector<Aws::String>&& value) { m_securityGroupsHasBeenSet = true; m_securityGroups = std::move(value); } 857 858 /** 859 * <p>[EC2-Classic, default VPC] The names of the security groups. For a nondefault 860 * VPC, you must use security group IDs instead.</p> <p>If you specify a network 861 * interface, you must specify any security groups as part of the network 862 * interface.</p> <p>Default: Amazon EC2 uses the default security group.</p> 863 */ WithSecurityGroups(const Aws::Vector<Aws::String> & value)864 inline RunInstancesRequest& WithSecurityGroups(const Aws::Vector<Aws::String>& value) { SetSecurityGroups(value); return *this;} 865 866 /** 867 * <p>[EC2-Classic, default VPC] The names of the security groups. For a nondefault 868 * VPC, you must use security group IDs instead.</p> <p>If you specify a network 869 * interface, you must specify any security groups as part of the network 870 * interface.</p> <p>Default: Amazon EC2 uses the default security group.</p> 871 */ WithSecurityGroups(Aws::Vector<Aws::String> && value)872 inline RunInstancesRequest& WithSecurityGroups(Aws::Vector<Aws::String>&& value) { SetSecurityGroups(std::move(value)); return *this;} 873 874 /** 875 * <p>[EC2-Classic, default VPC] The names of the security groups. For a nondefault 876 * VPC, you must use security group IDs instead.</p> <p>If you specify a network 877 * interface, you must specify any security groups as part of the network 878 * interface.</p> <p>Default: Amazon EC2 uses the default security group.</p> 879 */ AddSecurityGroups(const Aws::String & value)880 inline RunInstancesRequest& AddSecurityGroups(const Aws::String& value) { m_securityGroupsHasBeenSet = true; m_securityGroups.push_back(value); return *this; } 881 882 /** 883 * <p>[EC2-Classic, default VPC] The names of the security groups. For a nondefault 884 * VPC, you must use security group IDs instead.</p> <p>If you specify a network 885 * interface, you must specify any security groups as part of the network 886 * interface.</p> <p>Default: Amazon EC2 uses the default security group.</p> 887 */ AddSecurityGroups(Aws::String && value)888 inline RunInstancesRequest& AddSecurityGroups(Aws::String&& value) { m_securityGroupsHasBeenSet = true; m_securityGroups.push_back(std::move(value)); return *this; } 889 890 /** 891 * <p>[EC2-Classic, default VPC] The names of the security groups. For a nondefault 892 * VPC, you must use security group IDs instead.</p> <p>If you specify a network 893 * interface, you must specify any security groups as part of the network 894 * interface.</p> <p>Default: Amazon EC2 uses the default security group.</p> 895 */ AddSecurityGroups(const char * value)896 inline RunInstancesRequest& AddSecurityGroups(const char* value) { m_securityGroupsHasBeenSet = true; m_securityGroups.push_back(value); return *this; } 897 898 899 /** 900 * <p>[EC2-VPC] The ID of the subnet to launch the instance into.</p> <p>If you 901 * specify a network interface, you must specify any subnets as part of the network 902 * interface.</p> 903 */ GetSubnetId()904 inline const Aws::String& GetSubnetId() const{ return m_subnetId; } 905 906 /** 907 * <p>[EC2-VPC] The ID of the subnet to launch the instance into.</p> <p>If you 908 * specify a network interface, you must specify any subnets as part of the network 909 * interface.</p> 910 */ SubnetIdHasBeenSet()911 inline bool SubnetIdHasBeenSet() const { return m_subnetIdHasBeenSet; } 912 913 /** 914 * <p>[EC2-VPC] The ID of the subnet to launch the instance into.</p> <p>If you 915 * specify a network interface, you must specify any subnets as part of the network 916 * interface.</p> 917 */ SetSubnetId(const Aws::String & value)918 inline void SetSubnetId(const Aws::String& value) { m_subnetIdHasBeenSet = true; m_subnetId = value; } 919 920 /** 921 * <p>[EC2-VPC] The ID of the subnet to launch the instance into.</p> <p>If you 922 * specify a network interface, you must specify any subnets as part of the network 923 * interface.</p> 924 */ SetSubnetId(Aws::String && value)925 inline void SetSubnetId(Aws::String&& value) { m_subnetIdHasBeenSet = true; m_subnetId = std::move(value); } 926 927 /** 928 * <p>[EC2-VPC] The ID of the subnet to launch the instance into.</p> <p>If you 929 * specify a network interface, you must specify any subnets as part of the network 930 * interface.</p> 931 */ SetSubnetId(const char * value)932 inline void SetSubnetId(const char* value) { m_subnetIdHasBeenSet = true; m_subnetId.assign(value); } 933 934 /** 935 * <p>[EC2-VPC] The ID of the subnet to launch the instance into.</p> <p>If you 936 * specify a network interface, you must specify any subnets as part of the network 937 * interface.</p> 938 */ WithSubnetId(const Aws::String & value)939 inline RunInstancesRequest& WithSubnetId(const Aws::String& value) { SetSubnetId(value); return *this;} 940 941 /** 942 * <p>[EC2-VPC] The ID of the subnet to launch the instance into.</p> <p>If you 943 * specify a network interface, you must specify any subnets as part of the network 944 * interface.</p> 945 */ WithSubnetId(Aws::String && value)946 inline RunInstancesRequest& WithSubnetId(Aws::String&& value) { SetSubnetId(std::move(value)); return *this;} 947 948 /** 949 * <p>[EC2-VPC] The ID of the subnet to launch the instance into.</p> <p>If you 950 * specify a network interface, you must specify any subnets as part of the network 951 * interface.</p> 952 */ WithSubnetId(const char * value)953 inline RunInstancesRequest& WithSubnetId(const char* value) { SetSubnetId(value); return *this;} 954 955 956 /** 957 * <p>The user data to make available to the instance. For more information, see <a 958 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html">Running 959 * commands on your Linux instance at launch</a> (Linux) and <a 960 * href="https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-instance-metadata.html#instancedata-add-user-data">Adding 961 * User Data</a> (Windows). If you are using a command line tool, base64-encoding 962 * is performed for you, and you can load the text from a file. Otherwise, you must 963 * provide base64-encoded text. User data is limited to 16 KB.</p> 964 */ GetUserData()965 inline const Aws::String& GetUserData() const{ return m_userData; } 966 967 /** 968 * <p>The user data to make available to the instance. For more information, see <a 969 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html">Running 970 * commands on your Linux instance at launch</a> (Linux) and <a 971 * href="https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-instance-metadata.html#instancedata-add-user-data">Adding 972 * User Data</a> (Windows). If you are using a command line tool, base64-encoding 973 * is performed for you, and you can load the text from a file. Otherwise, you must 974 * provide base64-encoded text. User data is limited to 16 KB.</p> 975 */ UserDataHasBeenSet()976 inline bool UserDataHasBeenSet() const { return m_userDataHasBeenSet; } 977 978 /** 979 * <p>The user data to make available to the instance. For more information, see <a 980 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html">Running 981 * commands on your Linux instance at launch</a> (Linux) and <a 982 * href="https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-instance-metadata.html#instancedata-add-user-data">Adding 983 * User Data</a> (Windows). If you are using a command line tool, base64-encoding 984 * is performed for you, and you can load the text from a file. Otherwise, you must 985 * provide base64-encoded text. User data is limited to 16 KB.</p> 986 */ SetUserData(const Aws::String & value)987 inline void SetUserData(const Aws::String& value) { m_userDataHasBeenSet = true; m_userData = value; } 988 989 /** 990 * <p>The user data to make available to the instance. For more information, see <a 991 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html">Running 992 * commands on your Linux instance at launch</a> (Linux) and <a 993 * href="https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-instance-metadata.html#instancedata-add-user-data">Adding 994 * User Data</a> (Windows). If you are using a command line tool, base64-encoding 995 * is performed for you, and you can load the text from a file. Otherwise, you must 996 * provide base64-encoded text. User data is limited to 16 KB.</p> 997 */ SetUserData(Aws::String && value)998 inline void SetUserData(Aws::String&& value) { m_userDataHasBeenSet = true; m_userData = std::move(value); } 999 1000 /** 1001 * <p>The user data to make available to the instance. For more information, see <a 1002 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html">Running 1003 * commands on your Linux instance at launch</a> (Linux) and <a 1004 * href="https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-instance-metadata.html#instancedata-add-user-data">Adding 1005 * User Data</a> (Windows). If you are using a command line tool, base64-encoding 1006 * is performed for you, and you can load the text from a file. Otherwise, you must 1007 * provide base64-encoded text. User data is limited to 16 KB.</p> 1008 */ SetUserData(const char * value)1009 inline void SetUserData(const char* value) { m_userDataHasBeenSet = true; m_userData.assign(value); } 1010 1011 /** 1012 * <p>The user data to make available to the instance. For more information, see <a 1013 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html">Running 1014 * commands on your Linux instance at launch</a> (Linux) and <a 1015 * href="https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-instance-metadata.html#instancedata-add-user-data">Adding 1016 * User Data</a> (Windows). If you are using a command line tool, base64-encoding 1017 * is performed for you, and you can load the text from a file. Otherwise, you must 1018 * provide base64-encoded text. User data is limited to 16 KB.</p> 1019 */ WithUserData(const Aws::String & value)1020 inline RunInstancesRequest& WithUserData(const Aws::String& value) { SetUserData(value); return *this;} 1021 1022 /** 1023 * <p>The user data to make available to the instance. For more information, see <a 1024 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html">Running 1025 * commands on your Linux instance at launch</a> (Linux) and <a 1026 * href="https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-instance-metadata.html#instancedata-add-user-data">Adding 1027 * User Data</a> (Windows). If you are using a command line tool, base64-encoding 1028 * is performed for you, and you can load the text from a file. Otherwise, you must 1029 * provide base64-encoded text. User data is limited to 16 KB.</p> 1030 */ WithUserData(Aws::String && value)1031 inline RunInstancesRequest& WithUserData(Aws::String&& value) { SetUserData(std::move(value)); return *this;} 1032 1033 /** 1034 * <p>The user data to make available to the instance. For more information, see <a 1035 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html">Running 1036 * commands on your Linux instance at launch</a> (Linux) and <a 1037 * href="https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-instance-metadata.html#instancedata-add-user-data">Adding 1038 * User Data</a> (Windows). If you are using a command line tool, base64-encoding 1039 * is performed for you, and you can load the text from a file. Otherwise, you must 1040 * provide base64-encoded text. User data is limited to 16 KB.</p> 1041 */ WithUserData(const char * value)1042 inline RunInstancesRequest& WithUserData(const char* value) { SetUserData(value); return *this;} 1043 1044 1045 /** 1046 * <p>Reserved.</p> 1047 */ GetAdditionalInfo()1048 inline const Aws::String& GetAdditionalInfo() const{ return m_additionalInfo; } 1049 1050 /** 1051 * <p>Reserved.</p> 1052 */ AdditionalInfoHasBeenSet()1053 inline bool AdditionalInfoHasBeenSet() const { return m_additionalInfoHasBeenSet; } 1054 1055 /** 1056 * <p>Reserved.</p> 1057 */ SetAdditionalInfo(const Aws::String & value)1058 inline void SetAdditionalInfo(const Aws::String& value) { m_additionalInfoHasBeenSet = true; m_additionalInfo = value; } 1059 1060 /** 1061 * <p>Reserved.</p> 1062 */ SetAdditionalInfo(Aws::String && value)1063 inline void SetAdditionalInfo(Aws::String&& value) { m_additionalInfoHasBeenSet = true; m_additionalInfo = std::move(value); } 1064 1065 /** 1066 * <p>Reserved.</p> 1067 */ SetAdditionalInfo(const char * value)1068 inline void SetAdditionalInfo(const char* value) { m_additionalInfoHasBeenSet = true; m_additionalInfo.assign(value); } 1069 1070 /** 1071 * <p>Reserved.</p> 1072 */ WithAdditionalInfo(const Aws::String & value)1073 inline RunInstancesRequest& WithAdditionalInfo(const Aws::String& value) { SetAdditionalInfo(value); return *this;} 1074 1075 /** 1076 * <p>Reserved.</p> 1077 */ WithAdditionalInfo(Aws::String && value)1078 inline RunInstancesRequest& WithAdditionalInfo(Aws::String&& value) { SetAdditionalInfo(std::move(value)); return *this;} 1079 1080 /** 1081 * <p>Reserved.</p> 1082 */ WithAdditionalInfo(const char * value)1083 inline RunInstancesRequest& WithAdditionalInfo(const char* value) { SetAdditionalInfo(value); return *this;} 1084 1085 1086 /** 1087 * <p>Unique, case-sensitive identifier you provide to ensure the idempotency of 1088 * the request. If you do not specify a client token, a randomly generated token is 1089 * used for the request to ensure idempotency.</p> <p>For more information, see <a 1090 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring 1091 * Idempotency</a>.</p> <p>Constraints: Maximum 64 ASCII characters</p> 1092 */ GetClientToken()1093 inline const Aws::String& GetClientToken() const{ return m_clientToken; } 1094 1095 /** 1096 * <p>Unique, case-sensitive identifier you provide to ensure the idempotency of 1097 * the request. If you do not specify a client token, a randomly generated token is 1098 * used for the request to ensure idempotency.</p> <p>For more information, see <a 1099 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring 1100 * Idempotency</a>.</p> <p>Constraints: Maximum 64 ASCII characters</p> 1101 */ ClientTokenHasBeenSet()1102 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; } 1103 1104 /** 1105 * <p>Unique, case-sensitive identifier you provide to ensure the idempotency of 1106 * the request. If you do not specify a client token, a randomly generated token is 1107 * used for the request to ensure idempotency.</p> <p>For more information, see <a 1108 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring 1109 * Idempotency</a>.</p> <p>Constraints: Maximum 64 ASCII characters</p> 1110 */ SetClientToken(const Aws::String & value)1111 inline void SetClientToken(const Aws::String& value) { m_clientTokenHasBeenSet = true; m_clientToken = value; } 1112 1113 /** 1114 * <p>Unique, case-sensitive identifier you provide to ensure the idempotency of 1115 * the request. If you do not specify a client token, a randomly generated token is 1116 * used for the request to ensure idempotency.</p> <p>For more information, see <a 1117 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring 1118 * Idempotency</a>.</p> <p>Constraints: Maximum 64 ASCII characters</p> 1119 */ SetClientToken(Aws::String && value)1120 inline void SetClientToken(Aws::String&& value) { m_clientTokenHasBeenSet = true; m_clientToken = std::move(value); } 1121 1122 /** 1123 * <p>Unique, case-sensitive identifier you provide to ensure the idempotency of 1124 * the request. If you do not specify a client token, a randomly generated token is 1125 * used for the request to ensure idempotency.</p> <p>For more information, see <a 1126 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring 1127 * Idempotency</a>.</p> <p>Constraints: Maximum 64 ASCII characters</p> 1128 */ SetClientToken(const char * value)1129 inline void SetClientToken(const char* value) { m_clientTokenHasBeenSet = true; m_clientToken.assign(value); } 1130 1131 /** 1132 * <p>Unique, case-sensitive identifier you provide to ensure the idempotency of 1133 * the request. If you do not specify a client token, a randomly generated token is 1134 * used for the request to ensure idempotency.</p> <p>For more information, see <a 1135 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring 1136 * Idempotency</a>.</p> <p>Constraints: Maximum 64 ASCII characters</p> 1137 */ WithClientToken(const Aws::String & value)1138 inline RunInstancesRequest& WithClientToken(const Aws::String& value) { SetClientToken(value); return *this;} 1139 1140 /** 1141 * <p>Unique, case-sensitive identifier you provide to ensure the idempotency of 1142 * the request. If you do not specify a client token, a randomly generated token is 1143 * used for the request to ensure idempotency.</p> <p>For more information, see <a 1144 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring 1145 * Idempotency</a>.</p> <p>Constraints: Maximum 64 ASCII characters</p> 1146 */ WithClientToken(Aws::String && value)1147 inline RunInstancesRequest& WithClientToken(Aws::String&& value) { SetClientToken(std::move(value)); return *this;} 1148 1149 /** 1150 * <p>Unique, case-sensitive identifier you provide to ensure the idempotency of 1151 * the request. If you do not specify a client token, a randomly generated token is 1152 * used for the request to ensure idempotency.</p> <p>For more information, see <a 1153 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring 1154 * Idempotency</a>.</p> <p>Constraints: Maximum 64 ASCII characters</p> 1155 */ WithClientToken(const char * value)1156 inline RunInstancesRequest& WithClientToken(const char* value) { SetClientToken(value); return *this;} 1157 1158 1159 /** 1160 * <p>If you set this parameter to <code>true</code>, you can't terminate the 1161 * instance using the Amazon EC2 console, CLI, or API; otherwise, you can. To 1162 * change this attribute after launch, use <a 1163 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyInstanceAttribute.html">ModifyInstanceAttribute</a>. 1164 * Alternatively, if you set <code>InstanceInitiatedShutdownBehavior</code> to 1165 * <code>terminate</code>, you can terminate the instance by running the shutdown 1166 * command from the instance.</p> <p>Default: <code>false</code> </p> 1167 */ GetDisableApiTermination()1168 inline bool GetDisableApiTermination() const{ return m_disableApiTermination; } 1169 1170 /** 1171 * <p>If you set this parameter to <code>true</code>, you can't terminate the 1172 * instance using the Amazon EC2 console, CLI, or API; otherwise, you can. To 1173 * change this attribute after launch, use <a 1174 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyInstanceAttribute.html">ModifyInstanceAttribute</a>. 1175 * Alternatively, if you set <code>InstanceInitiatedShutdownBehavior</code> to 1176 * <code>terminate</code>, you can terminate the instance by running the shutdown 1177 * command from the instance.</p> <p>Default: <code>false</code> </p> 1178 */ DisableApiTerminationHasBeenSet()1179 inline bool DisableApiTerminationHasBeenSet() const { return m_disableApiTerminationHasBeenSet; } 1180 1181 /** 1182 * <p>If you set this parameter to <code>true</code>, you can't terminate the 1183 * instance using the Amazon EC2 console, CLI, or API; otherwise, you can. To 1184 * change this attribute after launch, use <a 1185 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyInstanceAttribute.html">ModifyInstanceAttribute</a>. 1186 * Alternatively, if you set <code>InstanceInitiatedShutdownBehavior</code> to 1187 * <code>terminate</code>, you can terminate the instance by running the shutdown 1188 * command from the instance.</p> <p>Default: <code>false</code> </p> 1189 */ SetDisableApiTermination(bool value)1190 inline void SetDisableApiTermination(bool value) { m_disableApiTerminationHasBeenSet = true; m_disableApiTermination = value; } 1191 1192 /** 1193 * <p>If you set this parameter to <code>true</code>, you can't terminate the 1194 * instance using the Amazon EC2 console, CLI, or API; otherwise, you can. To 1195 * change this attribute after launch, use <a 1196 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyInstanceAttribute.html">ModifyInstanceAttribute</a>. 1197 * Alternatively, if you set <code>InstanceInitiatedShutdownBehavior</code> to 1198 * <code>terminate</code>, you can terminate the instance by running the shutdown 1199 * command from the instance.</p> <p>Default: <code>false</code> </p> 1200 */ WithDisableApiTermination(bool value)1201 inline RunInstancesRequest& WithDisableApiTermination(bool value) { SetDisableApiTermination(value); return *this;} 1202 1203 1204 /** 1205 * <p>Checks whether you have the required permissions for the action, without 1206 * actually making the request, and provides an error response. If you have the 1207 * required permissions, the error response is <code>DryRunOperation</code>. 1208 * Otherwise, it is <code>UnauthorizedOperation</code>.</p> 1209 */ GetDryRun()1210 inline bool GetDryRun() const{ return m_dryRun; } 1211 1212 /** 1213 * <p>Checks whether you have the required permissions for the action, without 1214 * actually making the request, and provides an error response. If you have the 1215 * required permissions, the error response is <code>DryRunOperation</code>. 1216 * Otherwise, it is <code>UnauthorizedOperation</code>.</p> 1217 */ DryRunHasBeenSet()1218 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; } 1219 1220 /** 1221 * <p>Checks whether you have the required permissions for the action, without 1222 * actually making the request, and provides an error response. If you have the 1223 * required permissions, the error response is <code>DryRunOperation</code>. 1224 * Otherwise, it is <code>UnauthorizedOperation</code>.</p> 1225 */ SetDryRun(bool value)1226 inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; } 1227 1228 /** 1229 * <p>Checks whether you have the required permissions for the action, without 1230 * actually making the request, and provides an error response. If you have the 1231 * required permissions, the error response is <code>DryRunOperation</code>. 1232 * Otherwise, it is <code>UnauthorizedOperation</code>.</p> 1233 */ WithDryRun(bool value)1234 inline RunInstancesRequest& WithDryRun(bool value) { SetDryRun(value); return *this;} 1235 1236 1237 /** 1238 * <p>Indicates whether the instance is optimized for Amazon EBS I/O. This 1239 * optimization provides dedicated throughput to Amazon EBS and an optimized 1240 * configuration stack to provide optimal Amazon EBS I/O performance. This 1241 * optimization isn't available with all instance types. Additional usage charges 1242 * apply when using an EBS-optimized instance.</p> <p>Default: <code>false</code> 1243 * </p> 1244 */ GetEbsOptimized()1245 inline bool GetEbsOptimized() const{ return m_ebsOptimized; } 1246 1247 /** 1248 * <p>Indicates whether the instance is optimized for Amazon EBS I/O. This 1249 * optimization provides dedicated throughput to Amazon EBS and an optimized 1250 * configuration stack to provide optimal Amazon EBS I/O performance. This 1251 * optimization isn't available with all instance types. Additional usage charges 1252 * apply when using an EBS-optimized instance.</p> <p>Default: <code>false</code> 1253 * </p> 1254 */ EbsOptimizedHasBeenSet()1255 inline bool EbsOptimizedHasBeenSet() const { return m_ebsOptimizedHasBeenSet; } 1256 1257 /** 1258 * <p>Indicates whether the instance is optimized for Amazon EBS I/O. This 1259 * optimization provides dedicated throughput to Amazon EBS and an optimized 1260 * configuration stack to provide optimal Amazon EBS I/O performance. This 1261 * optimization isn't available with all instance types. Additional usage charges 1262 * apply when using an EBS-optimized instance.</p> <p>Default: <code>false</code> 1263 * </p> 1264 */ SetEbsOptimized(bool value)1265 inline void SetEbsOptimized(bool value) { m_ebsOptimizedHasBeenSet = true; m_ebsOptimized = value; } 1266 1267 /** 1268 * <p>Indicates whether the instance is optimized for Amazon EBS I/O. This 1269 * optimization provides dedicated throughput to Amazon EBS and an optimized 1270 * configuration stack to provide optimal Amazon EBS I/O performance. This 1271 * optimization isn't available with all instance types. Additional usage charges 1272 * apply when using an EBS-optimized instance.</p> <p>Default: <code>false</code> 1273 * </p> 1274 */ WithEbsOptimized(bool value)1275 inline RunInstancesRequest& WithEbsOptimized(bool value) { SetEbsOptimized(value); return *this;} 1276 1277 1278 /** 1279 * <p>The name or Amazon Resource Name (ARN) of an IAM instance profile.</p> 1280 */ GetIamInstanceProfile()1281 inline const IamInstanceProfileSpecification& GetIamInstanceProfile() const{ return m_iamInstanceProfile; } 1282 1283 /** 1284 * <p>The name or Amazon Resource Name (ARN) of an IAM instance profile.</p> 1285 */ IamInstanceProfileHasBeenSet()1286 inline bool IamInstanceProfileHasBeenSet() const { return m_iamInstanceProfileHasBeenSet; } 1287 1288 /** 1289 * <p>The name or Amazon Resource Name (ARN) of an IAM instance profile.</p> 1290 */ SetIamInstanceProfile(const IamInstanceProfileSpecification & value)1291 inline void SetIamInstanceProfile(const IamInstanceProfileSpecification& value) { m_iamInstanceProfileHasBeenSet = true; m_iamInstanceProfile = value; } 1292 1293 /** 1294 * <p>The name or Amazon Resource Name (ARN) of an IAM instance profile.</p> 1295 */ SetIamInstanceProfile(IamInstanceProfileSpecification && value)1296 inline void SetIamInstanceProfile(IamInstanceProfileSpecification&& value) { m_iamInstanceProfileHasBeenSet = true; m_iamInstanceProfile = std::move(value); } 1297 1298 /** 1299 * <p>The name or Amazon Resource Name (ARN) of an IAM instance profile.</p> 1300 */ WithIamInstanceProfile(const IamInstanceProfileSpecification & value)1301 inline RunInstancesRequest& WithIamInstanceProfile(const IamInstanceProfileSpecification& value) { SetIamInstanceProfile(value); return *this;} 1302 1303 /** 1304 * <p>The name or Amazon Resource Name (ARN) of an IAM instance profile.</p> 1305 */ WithIamInstanceProfile(IamInstanceProfileSpecification && value)1306 inline RunInstancesRequest& WithIamInstanceProfile(IamInstanceProfileSpecification&& value) { SetIamInstanceProfile(std::move(value)); return *this;} 1307 1308 1309 /** 1310 * <p>Indicates whether an instance stops or terminates when you initiate shutdown 1311 * from the instance (using the operating system command for system shutdown).</p> 1312 * <p>Default: <code>stop</code> </p> 1313 */ GetInstanceInitiatedShutdownBehavior()1314 inline const ShutdownBehavior& GetInstanceInitiatedShutdownBehavior() const{ return m_instanceInitiatedShutdownBehavior; } 1315 1316 /** 1317 * <p>Indicates whether an instance stops or terminates when you initiate shutdown 1318 * from the instance (using the operating system command for system shutdown).</p> 1319 * <p>Default: <code>stop</code> </p> 1320 */ InstanceInitiatedShutdownBehaviorHasBeenSet()1321 inline bool InstanceInitiatedShutdownBehaviorHasBeenSet() const { return m_instanceInitiatedShutdownBehaviorHasBeenSet; } 1322 1323 /** 1324 * <p>Indicates whether an instance stops or terminates when you initiate shutdown 1325 * from the instance (using the operating system command for system shutdown).</p> 1326 * <p>Default: <code>stop</code> </p> 1327 */ SetInstanceInitiatedShutdownBehavior(const ShutdownBehavior & value)1328 inline void SetInstanceInitiatedShutdownBehavior(const ShutdownBehavior& value) { m_instanceInitiatedShutdownBehaviorHasBeenSet = true; m_instanceInitiatedShutdownBehavior = value; } 1329 1330 /** 1331 * <p>Indicates whether an instance stops or terminates when you initiate shutdown 1332 * from the instance (using the operating system command for system shutdown).</p> 1333 * <p>Default: <code>stop</code> </p> 1334 */ SetInstanceInitiatedShutdownBehavior(ShutdownBehavior && value)1335 inline void SetInstanceInitiatedShutdownBehavior(ShutdownBehavior&& value) { m_instanceInitiatedShutdownBehaviorHasBeenSet = true; m_instanceInitiatedShutdownBehavior = std::move(value); } 1336 1337 /** 1338 * <p>Indicates whether an instance stops or terminates when you initiate shutdown 1339 * from the instance (using the operating system command for system shutdown).</p> 1340 * <p>Default: <code>stop</code> </p> 1341 */ WithInstanceInitiatedShutdownBehavior(const ShutdownBehavior & value)1342 inline RunInstancesRequest& WithInstanceInitiatedShutdownBehavior(const ShutdownBehavior& value) { SetInstanceInitiatedShutdownBehavior(value); return *this;} 1343 1344 /** 1345 * <p>Indicates whether an instance stops or terminates when you initiate shutdown 1346 * from the instance (using the operating system command for system shutdown).</p> 1347 * <p>Default: <code>stop</code> </p> 1348 */ WithInstanceInitiatedShutdownBehavior(ShutdownBehavior && value)1349 inline RunInstancesRequest& WithInstanceInitiatedShutdownBehavior(ShutdownBehavior&& value) { SetInstanceInitiatedShutdownBehavior(std::move(value)); return *this;} 1350 1351 1352 /** 1353 * <p>The network interfaces to associate with the instance. If you specify a 1354 * network interface, you must specify any security groups and subnets as part of 1355 * the network interface.</p> 1356 */ GetNetworkInterfaces()1357 inline const Aws::Vector<InstanceNetworkInterfaceSpecification>& GetNetworkInterfaces() const{ return m_networkInterfaces; } 1358 1359 /** 1360 * <p>The network interfaces to associate with the instance. If you specify a 1361 * network interface, you must specify any security groups and subnets as part of 1362 * the network interface.</p> 1363 */ NetworkInterfacesHasBeenSet()1364 inline bool NetworkInterfacesHasBeenSet() const { return m_networkInterfacesHasBeenSet; } 1365 1366 /** 1367 * <p>The network interfaces to associate with the instance. If you specify a 1368 * network interface, you must specify any security groups and subnets as part of 1369 * the network interface.</p> 1370 */ SetNetworkInterfaces(const Aws::Vector<InstanceNetworkInterfaceSpecification> & value)1371 inline void SetNetworkInterfaces(const Aws::Vector<InstanceNetworkInterfaceSpecification>& value) { m_networkInterfacesHasBeenSet = true; m_networkInterfaces = value; } 1372 1373 /** 1374 * <p>The network interfaces to associate with the instance. If you specify a 1375 * network interface, you must specify any security groups and subnets as part of 1376 * the network interface.</p> 1377 */ SetNetworkInterfaces(Aws::Vector<InstanceNetworkInterfaceSpecification> && value)1378 inline void SetNetworkInterfaces(Aws::Vector<InstanceNetworkInterfaceSpecification>&& value) { m_networkInterfacesHasBeenSet = true; m_networkInterfaces = std::move(value); } 1379 1380 /** 1381 * <p>The network interfaces to associate with the instance. If you specify a 1382 * network interface, you must specify any security groups and subnets as part of 1383 * the network interface.</p> 1384 */ WithNetworkInterfaces(const Aws::Vector<InstanceNetworkInterfaceSpecification> & value)1385 inline RunInstancesRequest& WithNetworkInterfaces(const Aws::Vector<InstanceNetworkInterfaceSpecification>& value) { SetNetworkInterfaces(value); return *this;} 1386 1387 /** 1388 * <p>The network interfaces to associate with the instance. If you specify a 1389 * network interface, you must specify any security groups and subnets as part of 1390 * the network interface.</p> 1391 */ WithNetworkInterfaces(Aws::Vector<InstanceNetworkInterfaceSpecification> && value)1392 inline RunInstancesRequest& WithNetworkInterfaces(Aws::Vector<InstanceNetworkInterfaceSpecification>&& value) { SetNetworkInterfaces(std::move(value)); return *this;} 1393 1394 /** 1395 * <p>The network interfaces to associate with the instance. If you specify a 1396 * network interface, you must specify any security groups and subnets as part of 1397 * the network interface.</p> 1398 */ AddNetworkInterfaces(const InstanceNetworkInterfaceSpecification & value)1399 inline RunInstancesRequest& AddNetworkInterfaces(const InstanceNetworkInterfaceSpecification& value) { m_networkInterfacesHasBeenSet = true; m_networkInterfaces.push_back(value); return *this; } 1400 1401 /** 1402 * <p>The network interfaces to associate with the instance. If you specify a 1403 * network interface, you must specify any security groups and subnets as part of 1404 * the network interface.</p> 1405 */ AddNetworkInterfaces(InstanceNetworkInterfaceSpecification && value)1406 inline RunInstancesRequest& AddNetworkInterfaces(InstanceNetworkInterfaceSpecification&& value) { m_networkInterfacesHasBeenSet = true; m_networkInterfaces.push_back(std::move(value)); return *this; } 1407 1408 1409 /** 1410 * <p>[EC2-VPC] The primary IPv4 address. You must specify a value from the IPv4 1411 * address range of the subnet.</p> <p>Only one private IP address can be 1412 * designated as primary. You can't specify this option if you've specified the 1413 * option to designate a private IP address as the primary IP address in a network 1414 * interface specification. You cannot specify this option if you're launching more 1415 * than one instance in the request.</p> <p>You cannot specify this option and the 1416 * network interfaces option in the same request.</p> 1417 */ GetPrivateIpAddress()1418 inline const Aws::String& GetPrivateIpAddress() const{ return m_privateIpAddress; } 1419 1420 /** 1421 * <p>[EC2-VPC] The primary IPv4 address. You must specify a value from the IPv4 1422 * address range of the subnet.</p> <p>Only one private IP address can be 1423 * designated as primary. You can't specify this option if you've specified the 1424 * option to designate a private IP address as the primary IP address in a network 1425 * interface specification. You cannot specify this option if you're launching more 1426 * than one instance in the request.</p> <p>You cannot specify this option and the 1427 * network interfaces option in the same request.</p> 1428 */ PrivateIpAddressHasBeenSet()1429 inline bool PrivateIpAddressHasBeenSet() const { return m_privateIpAddressHasBeenSet; } 1430 1431 /** 1432 * <p>[EC2-VPC] The primary IPv4 address. You must specify a value from the IPv4 1433 * address range of the subnet.</p> <p>Only one private IP address can be 1434 * designated as primary. You can't specify this option if you've specified the 1435 * option to designate a private IP address as the primary IP address in a network 1436 * interface specification. You cannot specify this option if you're launching more 1437 * than one instance in the request.</p> <p>You cannot specify this option and the 1438 * network interfaces option in the same request.</p> 1439 */ SetPrivateIpAddress(const Aws::String & value)1440 inline void SetPrivateIpAddress(const Aws::String& value) { m_privateIpAddressHasBeenSet = true; m_privateIpAddress = value; } 1441 1442 /** 1443 * <p>[EC2-VPC] The primary IPv4 address. You must specify a value from the IPv4 1444 * address range of the subnet.</p> <p>Only one private IP address can be 1445 * designated as primary. You can't specify this option if you've specified the 1446 * option to designate a private IP address as the primary IP address in a network 1447 * interface specification. You cannot specify this option if you're launching more 1448 * than one instance in the request.</p> <p>You cannot specify this option and the 1449 * network interfaces option in the same request.</p> 1450 */ SetPrivateIpAddress(Aws::String && value)1451 inline void SetPrivateIpAddress(Aws::String&& value) { m_privateIpAddressHasBeenSet = true; m_privateIpAddress = std::move(value); } 1452 1453 /** 1454 * <p>[EC2-VPC] The primary IPv4 address. You must specify a value from the IPv4 1455 * address range of the subnet.</p> <p>Only one private IP address can be 1456 * designated as primary. You can't specify this option if you've specified the 1457 * option to designate a private IP address as the primary IP address in a network 1458 * interface specification. You cannot specify this option if you're launching more 1459 * than one instance in the request.</p> <p>You cannot specify this option and the 1460 * network interfaces option in the same request.</p> 1461 */ SetPrivateIpAddress(const char * value)1462 inline void SetPrivateIpAddress(const char* value) { m_privateIpAddressHasBeenSet = true; m_privateIpAddress.assign(value); } 1463 1464 /** 1465 * <p>[EC2-VPC] The primary IPv4 address. You must specify a value from the IPv4 1466 * address range of the subnet.</p> <p>Only one private IP address can be 1467 * designated as primary. You can't specify this option if you've specified the 1468 * option to designate a private IP address as the primary IP address in a network 1469 * interface specification. You cannot specify this option if you're launching more 1470 * than one instance in the request.</p> <p>You cannot specify this option and the 1471 * network interfaces option in the same request.</p> 1472 */ WithPrivateIpAddress(const Aws::String & value)1473 inline RunInstancesRequest& WithPrivateIpAddress(const Aws::String& value) { SetPrivateIpAddress(value); return *this;} 1474 1475 /** 1476 * <p>[EC2-VPC] The primary IPv4 address. You must specify a value from the IPv4 1477 * address range of the subnet.</p> <p>Only one private IP address can be 1478 * designated as primary. You can't specify this option if you've specified the 1479 * option to designate a private IP address as the primary IP address in a network 1480 * interface specification. You cannot specify this option if you're launching more 1481 * than one instance in the request.</p> <p>You cannot specify this option and the 1482 * network interfaces option in the same request.</p> 1483 */ WithPrivateIpAddress(Aws::String && value)1484 inline RunInstancesRequest& WithPrivateIpAddress(Aws::String&& value) { SetPrivateIpAddress(std::move(value)); return *this;} 1485 1486 /** 1487 * <p>[EC2-VPC] The primary IPv4 address. You must specify a value from the IPv4 1488 * address range of the subnet.</p> <p>Only one private IP address can be 1489 * designated as primary. You can't specify this option if you've specified the 1490 * option to designate a private IP address as the primary IP address in a network 1491 * interface specification. You cannot specify this option if you're launching more 1492 * than one instance in the request.</p> <p>You cannot specify this option and the 1493 * network interfaces option in the same request.</p> 1494 */ WithPrivateIpAddress(const char * value)1495 inline RunInstancesRequest& WithPrivateIpAddress(const char* value) { SetPrivateIpAddress(value); return *this;} 1496 1497 1498 /** 1499 * <p>An elastic GPU to associate with the instance. An Elastic GPU is a GPU 1500 * resource that you can attach to your Windows instance to accelerate the graphics 1501 * performance of your applications. For more information, see <a 1502 * href="https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/elastic-graphics.html">Amazon 1503 * EC2 Elastic GPUs</a> in the <i>Amazon EC2 User Guide</i>.</p> 1504 */ GetElasticGpuSpecification()1505 inline const Aws::Vector<ElasticGpuSpecification>& GetElasticGpuSpecification() const{ return m_elasticGpuSpecification; } 1506 1507 /** 1508 * <p>An elastic GPU to associate with the instance. An Elastic GPU is a GPU 1509 * resource that you can attach to your Windows instance to accelerate the graphics 1510 * performance of your applications. For more information, see <a 1511 * href="https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/elastic-graphics.html">Amazon 1512 * EC2 Elastic GPUs</a> in the <i>Amazon EC2 User Guide</i>.</p> 1513 */ ElasticGpuSpecificationHasBeenSet()1514 inline bool ElasticGpuSpecificationHasBeenSet() const { return m_elasticGpuSpecificationHasBeenSet; } 1515 1516 /** 1517 * <p>An elastic GPU to associate with the instance. An Elastic GPU is a GPU 1518 * resource that you can attach to your Windows instance to accelerate the graphics 1519 * performance of your applications. For more information, see <a 1520 * href="https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/elastic-graphics.html">Amazon 1521 * EC2 Elastic GPUs</a> in the <i>Amazon EC2 User Guide</i>.</p> 1522 */ SetElasticGpuSpecification(const Aws::Vector<ElasticGpuSpecification> & value)1523 inline void SetElasticGpuSpecification(const Aws::Vector<ElasticGpuSpecification>& value) { m_elasticGpuSpecificationHasBeenSet = true; m_elasticGpuSpecification = value; } 1524 1525 /** 1526 * <p>An elastic GPU to associate with the instance. An Elastic GPU is a GPU 1527 * resource that you can attach to your Windows instance to accelerate the graphics 1528 * performance of your applications. For more information, see <a 1529 * href="https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/elastic-graphics.html">Amazon 1530 * EC2 Elastic GPUs</a> in the <i>Amazon EC2 User Guide</i>.</p> 1531 */ SetElasticGpuSpecification(Aws::Vector<ElasticGpuSpecification> && value)1532 inline void SetElasticGpuSpecification(Aws::Vector<ElasticGpuSpecification>&& value) { m_elasticGpuSpecificationHasBeenSet = true; m_elasticGpuSpecification = std::move(value); } 1533 1534 /** 1535 * <p>An elastic GPU to associate with the instance. An Elastic GPU is a GPU 1536 * resource that you can attach to your Windows instance to accelerate the graphics 1537 * performance of your applications. For more information, see <a 1538 * href="https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/elastic-graphics.html">Amazon 1539 * EC2 Elastic GPUs</a> in the <i>Amazon EC2 User Guide</i>.</p> 1540 */ WithElasticGpuSpecification(const Aws::Vector<ElasticGpuSpecification> & value)1541 inline RunInstancesRequest& WithElasticGpuSpecification(const Aws::Vector<ElasticGpuSpecification>& value) { SetElasticGpuSpecification(value); return *this;} 1542 1543 /** 1544 * <p>An elastic GPU to associate with the instance. An Elastic GPU is a GPU 1545 * resource that you can attach to your Windows instance to accelerate the graphics 1546 * performance of your applications. For more information, see <a 1547 * href="https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/elastic-graphics.html">Amazon 1548 * EC2 Elastic GPUs</a> in the <i>Amazon EC2 User Guide</i>.</p> 1549 */ WithElasticGpuSpecification(Aws::Vector<ElasticGpuSpecification> && value)1550 inline RunInstancesRequest& WithElasticGpuSpecification(Aws::Vector<ElasticGpuSpecification>&& value) { SetElasticGpuSpecification(std::move(value)); return *this;} 1551 1552 /** 1553 * <p>An elastic GPU to associate with the instance. An Elastic GPU is a GPU 1554 * resource that you can attach to your Windows instance to accelerate the graphics 1555 * performance of your applications. For more information, see <a 1556 * href="https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/elastic-graphics.html">Amazon 1557 * EC2 Elastic GPUs</a> in the <i>Amazon EC2 User Guide</i>.</p> 1558 */ AddElasticGpuSpecification(const ElasticGpuSpecification & value)1559 inline RunInstancesRequest& AddElasticGpuSpecification(const ElasticGpuSpecification& value) { m_elasticGpuSpecificationHasBeenSet = true; m_elasticGpuSpecification.push_back(value); return *this; } 1560 1561 /** 1562 * <p>An elastic GPU to associate with the instance. An Elastic GPU is a GPU 1563 * resource that you can attach to your Windows instance to accelerate the graphics 1564 * performance of your applications. For more information, see <a 1565 * href="https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/elastic-graphics.html">Amazon 1566 * EC2 Elastic GPUs</a> in the <i>Amazon EC2 User Guide</i>.</p> 1567 */ AddElasticGpuSpecification(ElasticGpuSpecification && value)1568 inline RunInstancesRequest& AddElasticGpuSpecification(ElasticGpuSpecification&& value) { m_elasticGpuSpecificationHasBeenSet = true; m_elasticGpuSpecification.push_back(std::move(value)); return *this; } 1569 1570 1571 /** 1572 * <p>An elastic inference accelerator to associate with the instance. Elastic 1573 * inference accelerators are a resource you can attach to your Amazon EC2 1574 * instances to accelerate your Deep Learning (DL) inference workloads.</p> <p>You 1575 * cannot specify accelerators from different generations in the same request.</p> 1576 */ GetElasticInferenceAccelerators()1577 inline const Aws::Vector<ElasticInferenceAccelerator>& GetElasticInferenceAccelerators() const{ return m_elasticInferenceAccelerators; } 1578 1579 /** 1580 * <p>An elastic inference accelerator to associate with the instance. Elastic 1581 * inference accelerators are a resource you can attach to your Amazon EC2 1582 * instances to accelerate your Deep Learning (DL) inference workloads.</p> <p>You 1583 * cannot specify accelerators from different generations in the same request.</p> 1584 */ ElasticInferenceAcceleratorsHasBeenSet()1585 inline bool ElasticInferenceAcceleratorsHasBeenSet() const { return m_elasticInferenceAcceleratorsHasBeenSet; } 1586 1587 /** 1588 * <p>An elastic inference accelerator to associate with the instance. Elastic 1589 * inference accelerators are a resource you can attach to your Amazon EC2 1590 * instances to accelerate your Deep Learning (DL) inference workloads.</p> <p>You 1591 * cannot specify accelerators from different generations in the same request.</p> 1592 */ SetElasticInferenceAccelerators(const Aws::Vector<ElasticInferenceAccelerator> & value)1593 inline void SetElasticInferenceAccelerators(const Aws::Vector<ElasticInferenceAccelerator>& value) { m_elasticInferenceAcceleratorsHasBeenSet = true; m_elasticInferenceAccelerators = value; } 1594 1595 /** 1596 * <p>An elastic inference accelerator to associate with the instance. Elastic 1597 * inference accelerators are a resource you can attach to your Amazon EC2 1598 * instances to accelerate your Deep Learning (DL) inference workloads.</p> <p>You 1599 * cannot specify accelerators from different generations in the same request.</p> 1600 */ SetElasticInferenceAccelerators(Aws::Vector<ElasticInferenceAccelerator> && value)1601 inline void SetElasticInferenceAccelerators(Aws::Vector<ElasticInferenceAccelerator>&& value) { m_elasticInferenceAcceleratorsHasBeenSet = true; m_elasticInferenceAccelerators = std::move(value); } 1602 1603 /** 1604 * <p>An elastic inference accelerator to associate with the instance. Elastic 1605 * inference accelerators are a resource you can attach to your Amazon EC2 1606 * instances to accelerate your Deep Learning (DL) inference workloads.</p> <p>You 1607 * cannot specify accelerators from different generations in the same request.</p> 1608 */ WithElasticInferenceAccelerators(const Aws::Vector<ElasticInferenceAccelerator> & value)1609 inline RunInstancesRequest& WithElasticInferenceAccelerators(const Aws::Vector<ElasticInferenceAccelerator>& value) { SetElasticInferenceAccelerators(value); return *this;} 1610 1611 /** 1612 * <p>An elastic inference accelerator to associate with the instance. Elastic 1613 * inference accelerators are a resource you can attach to your Amazon EC2 1614 * instances to accelerate your Deep Learning (DL) inference workloads.</p> <p>You 1615 * cannot specify accelerators from different generations in the same request.</p> 1616 */ WithElasticInferenceAccelerators(Aws::Vector<ElasticInferenceAccelerator> && value)1617 inline RunInstancesRequest& WithElasticInferenceAccelerators(Aws::Vector<ElasticInferenceAccelerator>&& value) { SetElasticInferenceAccelerators(std::move(value)); return *this;} 1618 1619 /** 1620 * <p>An elastic inference accelerator to associate with the instance. Elastic 1621 * inference accelerators are a resource you can attach to your Amazon EC2 1622 * instances to accelerate your Deep Learning (DL) inference workloads.</p> <p>You 1623 * cannot specify accelerators from different generations in the same request.</p> 1624 */ AddElasticInferenceAccelerators(const ElasticInferenceAccelerator & value)1625 inline RunInstancesRequest& AddElasticInferenceAccelerators(const ElasticInferenceAccelerator& value) { m_elasticInferenceAcceleratorsHasBeenSet = true; m_elasticInferenceAccelerators.push_back(value); return *this; } 1626 1627 /** 1628 * <p>An elastic inference accelerator to associate with the instance. Elastic 1629 * inference accelerators are a resource you can attach to your Amazon EC2 1630 * instances to accelerate your Deep Learning (DL) inference workloads.</p> <p>You 1631 * cannot specify accelerators from different generations in the same request.</p> 1632 */ AddElasticInferenceAccelerators(ElasticInferenceAccelerator && value)1633 inline RunInstancesRequest& AddElasticInferenceAccelerators(ElasticInferenceAccelerator&& value) { m_elasticInferenceAcceleratorsHasBeenSet = true; m_elasticInferenceAccelerators.push_back(std::move(value)); return *this; } 1634 1635 1636 /** 1637 * <p>The tags to apply to the resources during launch. You can only tag instances 1638 * and volumes on launch. The specified tags are applied to all instances or 1639 * volumes that are created during launch. To tag a resource after it has been 1640 * created, see <a 1641 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html">CreateTags</a>.</p> 1642 */ GetTagSpecifications()1643 inline const Aws::Vector<TagSpecification>& GetTagSpecifications() const{ return m_tagSpecifications; } 1644 1645 /** 1646 * <p>The tags to apply to the resources during launch. You can only tag instances 1647 * and volumes on launch. The specified tags are applied to all instances or 1648 * volumes that are created during launch. To tag a resource after it has been 1649 * created, see <a 1650 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html">CreateTags</a>.</p> 1651 */ TagSpecificationsHasBeenSet()1652 inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; } 1653 1654 /** 1655 * <p>The tags to apply to the resources during launch. You can only tag instances 1656 * and volumes on launch. The specified tags are applied to all instances or 1657 * volumes that are created during launch. To tag a resource after it has been 1658 * created, see <a 1659 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html">CreateTags</a>.</p> 1660 */ SetTagSpecifications(const Aws::Vector<TagSpecification> & value)1661 inline void SetTagSpecifications(const Aws::Vector<TagSpecification>& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = value; } 1662 1663 /** 1664 * <p>The tags to apply to the resources during launch. You can only tag instances 1665 * and volumes on launch. The specified tags are applied to all instances or 1666 * volumes that are created during launch. To tag a resource after it has been 1667 * created, see <a 1668 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html">CreateTags</a>.</p> 1669 */ SetTagSpecifications(Aws::Vector<TagSpecification> && value)1670 inline void SetTagSpecifications(Aws::Vector<TagSpecification>&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = std::move(value); } 1671 1672 /** 1673 * <p>The tags to apply to the resources during launch. You can only tag instances 1674 * and volumes on launch. The specified tags are applied to all instances or 1675 * volumes that are created during launch. To tag a resource after it has been 1676 * created, see <a 1677 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html">CreateTags</a>.</p> 1678 */ WithTagSpecifications(const Aws::Vector<TagSpecification> & value)1679 inline RunInstancesRequest& WithTagSpecifications(const Aws::Vector<TagSpecification>& value) { SetTagSpecifications(value); return *this;} 1680 1681 /** 1682 * <p>The tags to apply to the resources during launch. You can only tag instances 1683 * and volumes on launch. The specified tags are applied to all instances or 1684 * volumes that are created during launch. To tag a resource after it has been 1685 * created, see <a 1686 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html">CreateTags</a>.</p> 1687 */ WithTagSpecifications(Aws::Vector<TagSpecification> && value)1688 inline RunInstancesRequest& WithTagSpecifications(Aws::Vector<TagSpecification>&& value) { SetTagSpecifications(std::move(value)); return *this;} 1689 1690 /** 1691 * <p>The tags to apply to the resources during launch. You can only tag instances 1692 * and volumes on launch. The specified tags are applied to all instances or 1693 * volumes that are created during launch. To tag a resource after it has been 1694 * created, see <a 1695 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html">CreateTags</a>.</p> 1696 */ AddTagSpecifications(const TagSpecification & value)1697 inline RunInstancesRequest& AddTagSpecifications(const TagSpecification& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.push_back(value); return *this; } 1698 1699 /** 1700 * <p>The tags to apply to the resources during launch. You can only tag instances 1701 * and volumes on launch. The specified tags are applied to all instances or 1702 * volumes that are created during launch. To tag a resource after it has been 1703 * created, see <a 1704 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html">CreateTags</a>.</p> 1705 */ AddTagSpecifications(TagSpecification && value)1706 inline RunInstancesRequest& AddTagSpecifications(TagSpecification&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.push_back(std::move(value)); return *this; } 1707 1708 1709 /** 1710 * <p>The launch template to use to launch the instances. Any parameters that you 1711 * specify in <a>RunInstances</a> override the same parameters in the launch 1712 * template. You can specify either the name or ID of a launch template, but not 1713 * both.</p> 1714 */ GetLaunchTemplate()1715 inline const LaunchTemplateSpecification& GetLaunchTemplate() const{ return m_launchTemplate; } 1716 1717 /** 1718 * <p>The launch template to use to launch the instances. Any parameters that you 1719 * specify in <a>RunInstances</a> override the same parameters in the launch 1720 * template. You can specify either the name or ID of a launch template, but not 1721 * both.</p> 1722 */ LaunchTemplateHasBeenSet()1723 inline bool LaunchTemplateHasBeenSet() const { return m_launchTemplateHasBeenSet; } 1724 1725 /** 1726 * <p>The launch template to use to launch the instances. Any parameters that you 1727 * specify in <a>RunInstances</a> override the same parameters in the launch 1728 * template. You can specify either the name or ID of a launch template, but not 1729 * both.</p> 1730 */ SetLaunchTemplate(const LaunchTemplateSpecification & value)1731 inline void SetLaunchTemplate(const LaunchTemplateSpecification& value) { m_launchTemplateHasBeenSet = true; m_launchTemplate = value; } 1732 1733 /** 1734 * <p>The launch template to use to launch the instances. Any parameters that you 1735 * specify in <a>RunInstances</a> override the same parameters in the launch 1736 * template. You can specify either the name or ID of a launch template, but not 1737 * both.</p> 1738 */ SetLaunchTemplate(LaunchTemplateSpecification && value)1739 inline void SetLaunchTemplate(LaunchTemplateSpecification&& value) { m_launchTemplateHasBeenSet = true; m_launchTemplate = std::move(value); } 1740 1741 /** 1742 * <p>The launch template to use to launch the instances. Any parameters that you 1743 * specify in <a>RunInstances</a> override the same parameters in the launch 1744 * template. You can specify either the name or ID of a launch template, but not 1745 * both.</p> 1746 */ WithLaunchTemplate(const LaunchTemplateSpecification & value)1747 inline RunInstancesRequest& WithLaunchTemplate(const LaunchTemplateSpecification& value) { SetLaunchTemplate(value); return *this;} 1748 1749 /** 1750 * <p>The launch template to use to launch the instances. Any parameters that you 1751 * specify in <a>RunInstances</a> override the same parameters in the launch 1752 * template. You can specify either the name or ID of a launch template, but not 1753 * both.</p> 1754 */ WithLaunchTemplate(LaunchTemplateSpecification && value)1755 inline RunInstancesRequest& WithLaunchTemplate(LaunchTemplateSpecification&& value) { SetLaunchTemplate(std::move(value)); return *this;} 1756 1757 1758 /** 1759 * <p>The market (purchasing) option for the instances.</p> <p>For 1760 * <a>RunInstances</a>, persistent Spot Instance requests are only supported when 1761 * <b>InstanceInterruptionBehavior</b> is set to either <code>hibernate</code> or 1762 * <code>stop</code>.</p> 1763 */ GetInstanceMarketOptions()1764 inline const InstanceMarketOptionsRequest& GetInstanceMarketOptions() const{ return m_instanceMarketOptions; } 1765 1766 /** 1767 * <p>The market (purchasing) option for the instances.</p> <p>For 1768 * <a>RunInstances</a>, persistent Spot Instance requests are only supported when 1769 * <b>InstanceInterruptionBehavior</b> is set to either <code>hibernate</code> or 1770 * <code>stop</code>.</p> 1771 */ InstanceMarketOptionsHasBeenSet()1772 inline bool InstanceMarketOptionsHasBeenSet() const { return m_instanceMarketOptionsHasBeenSet; } 1773 1774 /** 1775 * <p>The market (purchasing) option for the instances.</p> <p>For 1776 * <a>RunInstances</a>, persistent Spot Instance requests are only supported when 1777 * <b>InstanceInterruptionBehavior</b> is set to either <code>hibernate</code> or 1778 * <code>stop</code>.</p> 1779 */ SetInstanceMarketOptions(const InstanceMarketOptionsRequest & value)1780 inline void SetInstanceMarketOptions(const InstanceMarketOptionsRequest& value) { m_instanceMarketOptionsHasBeenSet = true; m_instanceMarketOptions = value; } 1781 1782 /** 1783 * <p>The market (purchasing) option for the instances.</p> <p>For 1784 * <a>RunInstances</a>, persistent Spot Instance requests are only supported when 1785 * <b>InstanceInterruptionBehavior</b> is set to either <code>hibernate</code> or 1786 * <code>stop</code>.</p> 1787 */ SetInstanceMarketOptions(InstanceMarketOptionsRequest && value)1788 inline void SetInstanceMarketOptions(InstanceMarketOptionsRequest&& value) { m_instanceMarketOptionsHasBeenSet = true; m_instanceMarketOptions = std::move(value); } 1789 1790 /** 1791 * <p>The market (purchasing) option for the instances.</p> <p>For 1792 * <a>RunInstances</a>, persistent Spot Instance requests are only supported when 1793 * <b>InstanceInterruptionBehavior</b> is set to either <code>hibernate</code> or 1794 * <code>stop</code>.</p> 1795 */ WithInstanceMarketOptions(const InstanceMarketOptionsRequest & value)1796 inline RunInstancesRequest& WithInstanceMarketOptions(const InstanceMarketOptionsRequest& value) { SetInstanceMarketOptions(value); return *this;} 1797 1798 /** 1799 * <p>The market (purchasing) option for the instances.</p> <p>For 1800 * <a>RunInstances</a>, persistent Spot Instance requests are only supported when 1801 * <b>InstanceInterruptionBehavior</b> is set to either <code>hibernate</code> or 1802 * <code>stop</code>.</p> 1803 */ WithInstanceMarketOptions(InstanceMarketOptionsRequest && value)1804 inline RunInstancesRequest& WithInstanceMarketOptions(InstanceMarketOptionsRequest&& value) { SetInstanceMarketOptions(std::move(value)); return *this;} 1805 1806 1807 /** 1808 * <p>The credit option for CPU usage of the burstable performance instance. Valid 1809 * values are <code>standard</code> and <code>unlimited</code>. To change this 1810 * attribute after launch, use <a 1811 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyInstanceCreditSpecification.html"> 1812 * ModifyInstanceCreditSpecification</a>. For more information, see <a 1813 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html">Burstable 1814 * performance instances</a> in the <i>Amazon EC2 User Guide</i>.</p> <p>Default: 1815 * <code>standard</code> (T2 instances) or <code>unlimited</code> (T3/T3a 1816 * instances)</p> <p>For T3 instances with <code>host</code> tenancy, only 1817 * <code>standard</code> is supported.</p> 1818 */ GetCreditSpecification()1819 inline const CreditSpecificationRequest& GetCreditSpecification() const{ return m_creditSpecification; } 1820 1821 /** 1822 * <p>The credit option for CPU usage of the burstable performance instance. Valid 1823 * values are <code>standard</code> and <code>unlimited</code>. To change this 1824 * attribute after launch, use <a 1825 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyInstanceCreditSpecification.html"> 1826 * ModifyInstanceCreditSpecification</a>. For more information, see <a 1827 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html">Burstable 1828 * performance instances</a> in the <i>Amazon EC2 User Guide</i>.</p> <p>Default: 1829 * <code>standard</code> (T2 instances) or <code>unlimited</code> (T3/T3a 1830 * instances)</p> <p>For T3 instances with <code>host</code> tenancy, only 1831 * <code>standard</code> is supported.</p> 1832 */ CreditSpecificationHasBeenSet()1833 inline bool CreditSpecificationHasBeenSet() const { return m_creditSpecificationHasBeenSet; } 1834 1835 /** 1836 * <p>The credit option for CPU usage of the burstable performance instance. Valid 1837 * values are <code>standard</code> and <code>unlimited</code>. To change this 1838 * attribute after launch, use <a 1839 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyInstanceCreditSpecification.html"> 1840 * ModifyInstanceCreditSpecification</a>. For more information, see <a 1841 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html">Burstable 1842 * performance instances</a> in the <i>Amazon EC2 User Guide</i>.</p> <p>Default: 1843 * <code>standard</code> (T2 instances) or <code>unlimited</code> (T3/T3a 1844 * instances)</p> <p>For T3 instances with <code>host</code> tenancy, only 1845 * <code>standard</code> is supported.</p> 1846 */ SetCreditSpecification(const CreditSpecificationRequest & value)1847 inline void SetCreditSpecification(const CreditSpecificationRequest& value) { m_creditSpecificationHasBeenSet = true; m_creditSpecification = value; } 1848 1849 /** 1850 * <p>The credit option for CPU usage of the burstable performance instance. Valid 1851 * values are <code>standard</code> and <code>unlimited</code>. To change this 1852 * attribute after launch, use <a 1853 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyInstanceCreditSpecification.html"> 1854 * ModifyInstanceCreditSpecification</a>. For more information, see <a 1855 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html">Burstable 1856 * performance instances</a> in the <i>Amazon EC2 User Guide</i>.</p> <p>Default: 1857 * <code>standard</code> (T2 instances) or <code>unlimited</code> (T3/T3a 1858 * instances)</p> <p>For T3 instances with <code>host</code> tenancy, only 1859 * <code>standard</code> is supported.</p> 1860 */ SetCreditSpecification(CreditSpecificationRequest && value)1861 inline void SetCreditSpecification(CreditSpecificationRequest&& value) { m_creditSpecificationHasBeenSet = true; m_creditSpecification = std::move(value); } 1862 1863 /** 1864 * <p>The credit option for CPU usage of the burstable performance instance. Valid 1865 * values are <code>standard</code> and <code>unlimited</code>. To change this 1866 * attribute after launch, use <a 1867 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyInstanceCreditSpecification.html"> 1868 * ModifyInstanceCreditSpecification</a>. For more information, see <a 1869 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html">Burstable 1870 * performance instances</a> in the <i>Amazon EC2 User Guide</i>.</p> <p>Default: 1871 * <code>standard</code> (T2 instances) or <code>unlimited</code> (T3/T3a 1872 * instances)</p> <p>For T3 instances with <code>host</code> tenancy, only 1873 * <code>standard</code> is supported.</p> 1874 */ WithCreditSpecification(const CreditSpecificationRequest & value)1875 inline RunInstancesRequest& WithCreditSpecification(const CreditSpecificationRequest& value) { SetCreditSpecification(value); return *this;} 1876 1877 /** 1878 * <p>The credit option for CPU usage of the burstable performance instance. Valid 1879 * values are <code>standard</code> and <code>unlimited</code>. To change this 1880 * attribute after launch, use <a 1881 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyInstanceCreditSpecification.html"> 1882 * ModifyInstanceCreditSpecification</a>. For more information, see <a 1883 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html">Burstable 1884 * performance instances</a> in the <i>Amazon EC2 User Guide</i>.</p> <p>Default: 1885 * <code>standard</code> (T2 instances) or <code>unlimited</code> (T3/T3a 1886 * instances)</p> <p>For T3 instances with <code>host</code> tenancy, only 1887 * <code>standard</code> is supported.</p> 1888 */ WithCreditSpecification(CreditSpecificationRequest && value)1889 inline RunInstancesRequest& WithCreditSpecification(CreditSpecificationRequest&& value) { SetCreditSpecification(std::move(value)); return *this;} 1890 1891 1892 /** 1893 * <p>The CPU options for the instance. For more information, see <a 1894 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html">Optimizing 1895 * CPU options</a> in the <i>Amazon EC2 User Guide</i>.</p> 1896 */ GetCpuOptions()1897 inline const CpuOptionsRequest& GetCpuOptions() const{ return m_cpuOptions; } 1898 1899 /** 1900 * <p>The CPU options for the instance. For more information, see <a 1901 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html">Optimizing 1902 * CPU options</a> in the <i>Amazon EC2 User Guide</i>.</p> 1903 */ CpuOptionsHasBeenSet()1904 inline bool CpuOptionsHasBeenSet() const { return m_cpuOptionsHasBeenSet; } 1905 1906 /** 1907 * <p>The CPU options for the instance. For more information, see <a 1908 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html">Optimizing 1909 * CPU options</a> in the <i>Amazon EC2 User Guide</i>.</p> 1910 */ SetCpuOptions(const CpuOptionsRequest & value)1911 inline void SetCpuOptions(const CpuOptionsRequest& value) { m_cpuOptionsHasBeenSet = true; m_cpuOptions = value; } 1912 1913 /** 1914 * <p>The CPU options for the instance. For more information, see <a 1915 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html">Optimizing 1916 * CPU options</a> in the <i>Amazon EC2 User Guide</i>.</p> 1917 */ SetCpuOptions(CpuOptionsRequest && value)1918 inline void SetCpuOptions(CpuOptionsRequest&& value) { m_cpuOptionsHasBeenSet = true; m_cpuOptions = std::move(value); } 1919 1920 /** 1921 * <p>The CPU options for the instance. For more information, see <a 1922 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html">Optimizing 1923 * CPU options</a> in the <i>Amazon EC2 User Guide</i>.</p> 1924 */ WithCpuOptions(const CpuOptionsRequest & value)1925 inline RunInstancesRequest& WithCpuOptions(const CpuOptionsRequest& value) { SetCpuOptions(value); return *this;} 1926 1927 /** 1928 * <p>The CPU options for the instance. For more information, see <a 1929 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html">Optimizing 1930 * CPU options</a> in the <i>Amazon EC2 User Guide</i>.</p> 1931 */ WithCpuOptions(CpuOptionsRequest && value)1932 inline RunInstancesRequest& WithCpuOptions(CpuOptionsRequest&& value) { SetCpuOptions(std::move(value)); return *this;} 1933 1934 1935 /** 1936 * <p>Information about the Capacity Reservation targeting option. If you do not 1937 * specify this parameter, the instance's Capacity Reservation preference defaults 1938 * to <code>open</code>, which enables it to run in any open Capacity Reservation 1939 * that has matching attributes (instance type, platform, Availability Zone).</p> 1940 */ GetCapacityReservationSpecification()1941 inline const CapacityReservationSpecification& GetCapacityReservationSpecification() const{ return m_capacityReservationSpecification; } 1942 1943 /** 1944 * <p>Information about the Capacity Reservation targeting option. If you do not 1945 * specify this parameter, the instance's Capacity Reservation preference defaults 1946 * to <code>open</code>, which enables it to run in any open Capacity Reservation 1947 * that has matching attributes (instance type, platform, Availability Zone).</p> 1948 */ CapacityReservationSpecificationHasBeenSet()1949 inline bool CapacityReservationSpecificationHasBeenSet() const { return m_capacityReservationSpecificationHasBeenSet; } 1950 1951 /** 1952 * <p>Information about the Capacity Reservation targeting option. If you do not 1953 * specify this parameter, the instance's Capacity Reservation preference defaults 1954 * to <code>open</code>, which enables it to run in any open Capacity Reservation 1955 * that has matching attributes (instance type, platform, Availability Zone).</p> 1956 */ SetCapacityReservationSpecification(const CapacityReservationSpecification & value)1957 inline void SetCapacityReservationSpecification(const CapacityReservationSpecification& value) { m_capacityReservationSpecificationHasBeenSet = true; m_capacityReservationSpecification = value; } 1958 1959 /** 1960 * <p>Information about the Capacity Reservation targeting option. If you do not 1961 * specify this parameter, the instance's Capacity Reservation preference defaults 1962 * to <code>open</code>, which enables it to run in any open Capacity Reservation 1963 * that has matching attributes (instance type, platform, Availability Zone).</p> 1964 */ SetCapacityReservationSpecification(CapacityReservationSpecification && value)1965 inline void SetCapacityReservationSpecification(CapacityReservationSpecification&& value) { m_capacityReservationSpecificationHasBeenSet = true; m_capacityReservationSpecification = std::move(value); } 1966 1967 /** 1968 * <p>Information about the Capacity Reservation targeting option. If you do not 1969 * specify this parameter, the instance's Capacity Reservation preference defaults 1970 * to <code>open</code>, which enables it to run in any open Capacity Reservation 1971 * that has matching attributes (instance type, platform, Availability Zone).</p> 1972 */ WithCapacityReservationSpecification(const CapacityReservationSpecification & value)1973 inline RunInstancesRequest& WithCapacityReservationSpecification(const CapacityReservationSpecification& value) { SetCapacityReservationSpecification(value); return *this;} 1974 1975 /** 1976 * <p>Information about the Capacity Reservation targeting option. If you do not 1977 * specify this parameter, the instance's Capacity Reservation preference defaults 1978 * to <code>open</code>, which enables it to run in any open Capacity Reservation 1979 * that has matching attributes (instance type, platform, Availability Zone).</p> 1980 */ WithCapacityReservationSpecification(CapacityReservationSpecification && value)1981 inline RunInstancesRequest& WithCapacityReservationSpecification(CapacityReservationSpecification&& value) { SetCapacityReservationSpecification(std::move(value)); return *this;} 1982 1983 1984 /** 1985 * <p>Indicates whether an instance is enabled for hibernation. For more 1986 * information, see <a 1987 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html">Hibernate 1988 * your instance</a> in the <i>Amazon EC2 User Guide</i>.</p> <p>You can't enable 1989 * hibernation and Amazon Web Services Nitro Enclaves on the same instance.</p> 1990 */ GetHibernationOptions()1991 inline const HibernationOptionsRequest& GetHibernationOptions() const{ return m_hibernationOptions; } 1992 1993 /** 1994 * <p>Indicates whether an instance is enabled for hibernation. For more 1995 * information, see <a 1996 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html">Hibernate 1997 * your instance</a> in the <i>Amazon EC2 User Guide</i>.</p> <p>You can't enable 1998 * hibernation and Amazon Web Services Nitro Enclaves on the same instance.</p> 1999 */ HibernationOptionsHasBeenSet()2000 inline bool HibernationOptionsHasBeenSet() const { return m_hibernationOptionsHasBeenSet; } 2001 2002 /** 2003 * <p>Indicates whether an instance is enabled for hibernation. For more 2004 * information, see <a 2005 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html">Hibernate 2006 * your instance</a> in the <i>Amazon EC2 User Guide</i>.</p> <p>You can't enable 2007 * hibernation and Amazon Web Services Nitro Enclaves on the same instance.</p> 2008 */ SetHibernationOptions(const HibernationOptionsRequest & value)2009 inline void SetHibernationOptions(const HibernationOptionsRequest& value) { m_hibernationOptionsHasBeenSet = true; m_hibernationOptions = value; } 2010 2011 /** 2012 * <p>Indicates whether an instance is enabled for hibernation. For more 2013 * information, see <a 2014 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html">Hibernate 2015 * your instance</a> in the <i>Amazon EC2 User Guide</i>.</p> <p>You can't enable 2016 * hibernation and Amazon Web Services Nitro Enclaves on the same instance.</p> 2017 */ SetHibernationOptions(HibernationOptionsRequest && value)2018 inline void SetHibernationOptions(HibernationOptionsRequest&& value) { m_hibernationOptionsHasBeenSet = true; m_hibernationOptions = std::move(value); } 2019 2020 /** 2021 * <p>Indicates whether an instance is enabled for hibernation. For more 2022 * information, see <a 2023 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html">Hibernate 2024 * your instance</a> in the <i>Amazon EC2 User Guide</i>.</p> <p>You can't enable 2025 * hibernation and Amazon Web Services Nitro Enclaves on the same instance.</p> 2026 */ WithHibernationOptions(const HibernationOptionsRequest & value)2027 inline RunInstancesRequest& WithHibernationOptions(const HibernationOptionsRequest& value) { SetHibernationOptions(value); return *this;} 2028 2029 /** 2030 * <p>Indicates whether an instance is enabled for hibernation. For more 2031 * information, see <a 2032 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html">Hibernate 2033 * your instance</a> in the <i>Amazon EC2 User Guide</i>.</p> <p>You can't enable 2034 * hibernation and Amazon Web Services Nitro Enclaves on the same instance.</p> 2035 */ WithHibernationOptions(HibernationOptionsRequest && value)2036 inline RunInstancesRequest& WithHibernationOptions(HibernationOptionsRequest&& value) { SetHibernationOptions(std::move(value)); return *this;} 2037 2038 2039 /** 2040 * <p>The license configurations.</p> 2041 */ GetLicenseSpecifications()2042 inline const Aws::Vector<LicenseConfigurationRequest>& GetLicenseSpecifications() const{ return m_licenseSpecifications; } 2043 2044 /** 2045 * <p>The license configurations.</p> 2046 */ LicenseSpecificationsHasBeenSet()2047 inline bool LicenseSpecificationsHasBeenSet() const { return m_licenseSpecificationsHasBeenSet; } 2048 2049 /** 2050 * <p>The license configurations.</p> 2051 */ SetLicenseSpecifications(const Aws::Vector<LicenseConfigurationRequest> & value)2052 inline void SetLicenseSpecifications(const Aws::Vector<LicenseConfigurationRequest>& value) { m_licenseSpecificationsHasBeenSet = true; m_licenseSpecifications = value; } 2053 2054 /** 2055 * <p>The license configurations.</p> 2056 */ SetLicenseSpecifications(Aws::Vector<LicenseConfigurationRequest> && value)2057 inline void SetLicenseSpecifications(Aws::Vector<LicenseConfigurationRequest>&& value) { m_licenseSpecificationsHasBeenSet = true; m_licenseSpecifications = std::move(value); } 2058 2059 /** 2060 * <p>The license configurations.</p> 2061 */ WithLicenseSpecifications(const Aws::Vector<LicenseConfigurationRequest> & value)2062 inline RunInstancesRequest& WithLicenseSpecifications(const Aws::Vector<LicenseConfigurationRequest>& value) { SetLicenseSpecifications(value); return *this;} 2063 2064 /** 2065 * <p>The license configurations.</p> 2066 */ WithLicenseSpecifications(Aws::Vector<LicenseConfigurationRequest> && value)2067 inline RunInstancesRequest& WithLicenseSpecifications(Aws::Vector<LicenseConfigurationRequest>&& value) { SetLicenseSpecifications(std::move(value)); return *this;} 2068 2069 /** 2070 * <p>The license configurations.</p> 2071 */ AddLicenseSpecifications(const LicenseConfigurationRequest & value)2072 inline RunInstancesRequest& AddLicenseSpecifications(const LicenseConfigurationRequest& value) { m_licenseSpecificationsHasBeenSet = true; m_licenseSpecifications.push_back(value); return *this; } 2073 2074 /** 2075 * <p>The license configurations.</p> 2076 */ AddLicenseSpecifications(LicenseConfigurationRequest && value)2077 inline RunInstancesRequest& AddLicenseSpecifications(LicenseConfigurationRequest&& value) { m_licenseSpecificationsHasBeenSet = true; m_licenseSpecifications.push_back(std::move(value)); return *this; } 2078 2079 2080 /** 2081 * <p>The metadata options for the instance. For more information, see <a 2082 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html">Instance 2083 * metadata and user data</a>.</p> 2084 */ GetMetadataOptions()2085 inline const InstanceMetadataOptionsRequest& GetMetadataOptions() const{ return m_metadataOptions; } 2086 2087 /** 2088 * <p>The metadata options for the instance. For more information, see <a 2089 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html">Instance 2090 * metadata and user data</a>.</p> 2091 */ MetadataOptionsHasBeenSet()2092 inline bool MetadataOptionsHasBeenSet() const { return m_metadataOptionsHasBeenSet; } 2093 2094 /** 2095 * <p>The metadata options for the instance. For more information, see <a 2096 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html">Instance 2097 * metadata and user data</a>.</p> 2098 */ SetMetadataOptions(const InstanceMetadataOptionsRequest & value)2099 inline void SetMetadataOptions(const InstanceMetadataOptionsRequest& value) { m_metadataOptionsHasBeenSet = true; m_metadataOptions = value; } 2100 2101 /** 2102 * <p>The metadata options for the instance. For more information, see <a 2103 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html">Instance 2104 * metadata and user data</a>.</p> 2105 */ SetMetadataOptions(InstanceMetadataOptionsRequest && value)2106 inline void SetMetadataOptions(InstanceMetadataOptionsRequest&& value) { m_metadataOptionsHasBeenSet = true; m_metadataOptions = std::move(value); } 2107 2108 /** 2109 * <p>The metadata options for the instance. For more information, see <a 2110 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html">Instance 2111 * metadata and user data</a>.</p> 2112 */ WithMetadataOptions(const InstanceMetadataOptionsRequest & value)2113 inline RunInstancesRequest& WithMetadataOptions(const InstanceMetadataOptionsRequest& value) { SetMetadataOptions(value); return *this;} 2114 2115 /** 2116 * <p>The metadata options for the instance. For more information, see <a 2117 * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html">Instance 2118 * metadata and user data</a>.</p> 2119 */ WithMetadataOptions(InstanceMetadataOptionsRequest && value)2120 inline RunInstancesRequest& WithMetadataOptions(InstanceMetadataOptionsRequest&& value) { SetMetadataOptions(std::move(value)); return *this;} 2121 2122 2123 /** 2124 * <p>Indicates whether the instance is enabled for Amazon Web Services Nitro 2125 * Enclaves. For more information, see <a 2126 * href="https://docs.aws.amazon.com/enclaves/latest/user/nitro-enclave.html"> What 2127 * is Amazon Web Services Nitro Enclaves?</a> in the <i>Amazon Web Services Nitro 2128 * Enclaves User Guide</i>.</p> <p>You can't enable Amazon Web Services Nitro 2129 * Enclaves and hibernation on the same instance.</p> 2130 */ GetEnclaveOptions()2131 inline const EnclaveOptionsRequest& GetEnclaveOptions() const{ return m_enclaveOptions; } 2132 2133 /** 2134 * <p>Indicates whether the instance is enabled for Amazon Web Services Nitro 2135 * Enclaves. For more information, see <a 2136 * href="https://docs.aws.amazon.com/enclaves/latest/user/nitro-enclave.html"> What 2137 * is Amazon Web Services Nitro Enclaves?</a> in the <i>Amazon Web Services Nitro 2138 * Enclaves User Guide</i>.</p> <p>You can't enable Amazon Web Services Nitro 2139 * Enclaves and hibernation on the same instance.</p> 2140 */ EnclaveOptionsHasBeenSet()2141 inline bool EnclaveOptionsHasBeenSet() const { return m_enclaveOptionsHasBeenSet; } 2142 2143 /** 2144 * <p>Indicates whether the instance is enabled for Amazon Web Services Nitro 2145 * Enclaves. For more information, see <a 2146 * href="https://docs.aws.amazon.com/enclaves/latest/user/nitro-enclave.html"> What 2147 * is Amazon Web Services Nitro Enclaves?</a> in the <i>Amazon Web Services Nitro 2148 * Enclaves User Guide</i>.</p> <p>You can't enable Amazon Web Services Nitro 2149 * Enclaves and hibernation on the same instance.</p> 2150 */ SetEnclaveOptions(const EnclaveOptionsRequest & value)2151 inline void SetEnclaveOptions(const EnclaveOptionsRequest& value) { m_enclaveOptionsHasBeenSet = true; m_enclaveOptions = value; } 2152 2153 /** 2154 * <p>Indicates whether the instance is enabled for Amazon Web Services Nitro 2155 * Enclaves. For more information, see <a 2156 * href="https://docs.aws.amazon.com/enclaves/latest/user/nitro-enclave.html"> What 2157 * is Amazon Web Services Nitro Enclaves?</a> in the <i>Amazon Web Services Nitro 2158 * Enclaves User Guide</i>.</p> <p>You can't enable Amazon Web Services Nitro 2159 * Enclaves and hibernation on the same instance.</p> 2160 */ SetEnclaveOptions(EnclaveOptionsRequest && value)2161 inline void SetEnclaveOptions(EnclaveOptionsRequest&& value) { m_enclaveOptionsHasBeenSet = true; m_enclaveOptions = std::move(value); } 2162 2163 /** 2164 * <p>Indicates whether the instance is enabled for Amazon Web Services Nitro 2165 * Enclaves. For more information, see <a 2166 * href="https://docs.aws.amazon.com/enclaves/latest/user/nitro-enclave.html"> What 2167 * is Amazon Web Services Nitro Enclaves?</a> in the <i>Amazon Web Services Nitro 2168 * Enclaves User Guide</i>.</p> <p>You can't enable Amazon Web Services Nitro 2169 * Enclaves and hibernation on the same instance.</p> 2170 */ WithEnclaveOptions(const EnclaveOptionsRequest & value)2171 inline RunInstancesRequest& WithEnclaveOptions(const EnclaveOptionsRequest& value) { SetEnclaveOptions(value); return *this;} 2172 2173 /** 2174 * <p>Indicates whether the instance is enabled for Amazon Web Services Nitro 2175 * Enclaves. For more information, see <a 2176 * href="https://docs.aws.amazon.com/enclaves/latest/user/nitro-enclave.html"> What 2177 * is Amazon Web Services Nitro Enclaves?</a> in the <i>Amazon Web Services Nitro 2178 * Enclaves User Guide</i>.</p> <p>You can't enable Amazon Web Services Nitro 2179 * Enclaves and hibernation on the same instance.</p> 2180 */ WithEnclaveOptions(EnclaveOptionsRequest && value)2181 inline RunInstancesRequest& WithEnclaveOptions(EnclaveOptionsRequest&& value) { SetEnclaveOptions(std::move(value)); return *this;} 2182 2183 private: 2184 2185 Aws::Vector<BlockDeviceMapping> m_blockDeviceMappings; 2186 bool m_blockDeviceMappingsHasBeenSet; 2187 2188 Aws::String m_imageId; 2189 bool m_imageIdHasBeenSet; 2190 2191 InstanceType m_instanceType; 2192 bool m_instanceTypeHasBeenSet; 2193 2194 int m_ipv6AddressCount; 2195 bool m_ipv6AddressCountHasBeenSet; 2196 2197 Aws::Vector<InstanceIpv6Address> m_ipv6Addresses; 2198 bool m_ipv6AddressesHasBeenSet; 2199 2200 Aws::String m_kernelId; 2201 bool m_kernelIdHasBeenSet; 2202 2203 Aws::String m_keyName; 2204 bool m_keyNameHasBeenSet; 2205 2206 int m_maxCount; 2207 bool m_maxCountHasBeenSet; 2208 2209 int m_minCount; 2210 bool m_minCountHasBeenSet; 2211 2212 RunInstancesMonitoringEnabled m_monitoring; 2213 bool m_monitoringHasBeenSet; 2214 2215 Placement m_placement; 2216 bool m_placementHasBeenSet; 2217 2218 Aws::String m_ramdiskId; 2219 bool m_ramdiskIdHasBeenSet; 2220 2221 Aws::Vector<Aws::String> m_securityGroupIds; 2222 bool m_securityGroupIdsHasBeenSet; 2223 2224 Aws::Vector<Aws::String> m_securityGroups; 2225 bool m_securityGroupsHasBeenSet; 2226 2227 Aws::String m_subnetId; 2228 bool m_subnetIdHasBeenSet; 2229 2230 Aws::String m_userData; 2231 bool m_userDataHasBeenSet; 2232 2233 Aws::String m_additionalInfo; 2234 bool m_additionalInfoHasBeenSet; 2235 2236 Aws::String m_clientToken; 2237 bool m_clientTokenHasBeenSet; 2238 2239 bool m_disableApiTermination; 2240 bool m_disableApiTerminationHasBeenSet; 2241 2242 bool m_dryRun; 2243 bool m_dryRunHasBeenSet; 2244 2245 bool m_ebsOptimized; 2246 bool m_ebsOptimizedHasBeenSet; 2247 2248 IamInstanceProfileSpecification m_iamInstanceProfile; 2249 bool m_iamInstanceProfileHasBeenSet; 2250 2251 ShutdownBehavior m_instanceInitiatedShutdownBehavior; 2252 bool m_instanceInitiatedShutdownBehaviorHasBeenSet; 2253 2254 Aws::Vector<InstanceNetworkInterfaceSpecification> m_networkInterfaces; 2255 bool m_networkInterfacesHasBeenSet; 2256 2257 Aws::String m_privateIpAddress; 2258 bool m_privateIpAddressHasBeenSet; 2259 2260 Aws::Vector<ElasticGpuSpecification> m_elasticGpuSpecification; 2261 bool m_elasticGpuSpecificationHasBeenSet; 2262 2263 Aws::Vector<ElasticInferenceAccelerator> m_elasticInferenceAccelerators; 2264 bool m_elasticInferenceAcceleratorsHasBeenSet; 2265 2266 Aws::Vector<TagSpecification> m_tagSpecifications; 2267 bool m_tagSpecificationsHasBeenSet; 2268 2269 LaunchTemplateSpecification m_launchTemplate; 2270 bool m_launchTemplateHasBeenSet; 2271 2272 InstanceMarketOptionsRequest m_instanceMarketOptions; 2273 bool m_instanceMarketOptionsHasBeenSet; 2274 2275 CreditSpecificationRequest m_creditSpecification; 2276 bool m_creditSpecificationHasBeenSet; 2277 2278 CpuOptionsRequest m_cpuOptions; 2279 bool m_cpuOptionsHasBeenSet; 2280 2281 CapacityReservationSpecification m_capacityReservationSpecification; 2282 bool m_capacityReservationSpecificationHasBeenSet; 2283 2284 HibernationOptionsRequest m_hibernationOptions; 2285 bool m_hibernationOptionsHasBeenSet; 2286 2287 Aws::Vector<LicenseConfigurationRequest> m_licenseSpecifications; 2288 bool m_licenseSpecificationsHasBeenSet; 2289 2290 InstanceMetadataOptionsRequest m_metadataOptions; 2291 bool m_metadataOptionsHasBeenSet; 2292 2293 EnclaveOptionsRequest m_enclaveOptions; 2294 bool m_enclaveOptionsHasBeenSet; 2295 }; 2296 2297 } // namespace Model 2298 } // namespace EC2 2299 } // namespace Aws 2300