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/AWSString.h> 10 #include <aws/ec2/model/ScheduledInstancesLaunchSpecification.h> 11 #include <utility> 12 #include <aws/core/utils/UUID.h> 13 14 namespace Aws 15 { 16 namespace EC2 17 { 18 namespace Model 19 { 20 21 /** 22 * <p>Contains the parameters for RunScheduledInstances.</p><p><h3>See Also:</h3> 23 * <a 24 * href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RunScheduledInstancesRequest">AWS 25 * API Reference</a></p> 26 */ 27 class AWS_EC2_API RunScheduledInstancesRequest : public EC2Request 28 { 29 public: 30 RunScheduledInstancesRequest(); 31 32 // Service request name is the Operation name which will send this request out, 33 // each operation should has unique request name, so that we can get operation's name from this request. 34 // Note: this is not true for response, multiple operations may have the same response name, 35 // so we can not get operation's name from response. GetServiceRequestName()36 inline virtual const char* GetServiceRequestName() const override { return "RunScheduledInstances"; } 37 38 Aws::String SerializePayload() const override; 39 40 protected: 41 void DumpBodyToUrl(Aws::Http::URI& uri ) const override; 42 43 public: 44 45 /** 46 * <p>Unique, case-sensitive identifier that ensures the idempotency of the 47 * request. For more information, see <a 48 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring 49 * Idempotency</a>.</p> 50 */ GetClientToken()51 inline const Aws::String& GetClientToken() const{ return m_clientToken; } 52 53 /** 54 * <p>Unique, case-sensitive identifier that ensures the idempotency of the 55 * request. For more information, see <a 56 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring 57 * Idempotency</a>.</p> 58 */ ClientTokenHasBeenSet()59 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; } 60 61 /** 62 * <p>Unique, case-sensitive identifier that ensures the idempotency of the 63 * request. For more information, see <a 64 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring 65 * Idempotency</a>.</p> 66 */ SetClientToken(const Aws::String & value)67 inline void SetClientToken(const Aws::String& value) { m_clientTokenHasBeenSet = true; m_clientToken = value; } 68 69 /** 70 * <p>Unique, case-sensitive identifier that ensures the idempotency of the 71 * request. For more information, see <a 72 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring 73 * Idempotency</a>.</p> 74 */ SetClientToken(Aws::String && value)75 inline void SetClientToken(Aws::String&& value) { m_clientTokenHasBeenSet = true; m_clientToken = std::move(value); } 76 77 /** 78 * <p>Unique, case-sensitive identifier that ensures the idempotency of the 79 * request. For more information, see <a 80 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring 81 * Idempotency</a>.</p> 82 */ SetClientToken(const char * value)83 inline void SetClientToken(const char* value) { m_clientTokenHasBeenSet = true; m_clientToken.assign(value); } 84 85 /** 86 * <p>Unique, case-sensitive identifier that ensures the idempotency of the 87 * request. For more information, see <a 88 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring 89 * Idempotency</a>.</p> 90 */ WithClientToken(const Aws::String & value)91 inline RunScheduledInstancesRequest& WithClientToken(const Aws::String& value) { SetClientToken(value); return *this;} 92 93 /** 94 * <p>Unique, case-sensitive identifier that ensures the idempotency of the 95 * request. For more information, see <a 96 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring 97 * Idempotency</a>.</p> 98 */ WithClientToken(Aws::String && value)99 inline RunScheduledInstancesRequest& WithClientToken(Aws::String&& value) { SetClientToken(std::move(value)); return *this;} 100 101 /** 102 * <p>Unique, case-sensitive identifier that ensures the idempotency of the 103 * request. For more information, see <a 104 * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring 105 * Idempotency</a>.</p> 106 */ WithClientToken(const char * value)107 inline RunScheduledInstancesRequest& WithClientToken(const char* value) { SetClientToken(value); return *this;} 108 109 110 /** 111 * <p>Checks whether you have the required permissions for the action, without 112 * actually making the request, and provides an error response. If you have the 113 * required permissions, the error response is <code>DryRunOperation</code>. 114 * Otherwise, it is <code>UnauthorizedOperation</code>.</p> 115 */ GetDryRun()116 inline bool GetDryRun() const{ return m_dryRun; } 117 118 /** 119 * <p>Checks whether you have the required permissions for the action, without 120 * actually making the request, and provides an error response. If you have the 121 * required permissions, the error response is <code>DryRunOperation</code>. 122 * Otherwise, it is <code>UnauthorizedOperation</code>.</p> 123 */ DryRunHasBeenSet()124 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; } 125 126 /** 127 * <p>Checks whether you have the required permissions for the action, without 128 * actually making the request, and provides an error response. If you have the 129 * required permissions, the error response is <code>DryRunOperation</code>. 130 * Otherwise, it is <code>UnauthorizedOperation</code>.</p> 131 */ SetDryRun(bool value)132 inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; } 133 134 /** 135 * <p>Checks whether you have the required permissions for the action, without 136 * actually making the request, and provides an error response. If you have the 137 * required permissions, the error response is <code>DryRunOperation</code>. 138 * Otherwise, it is <code>UnauthorizedOperation</code>.</p> 139 */ WithDryRun(bool value)140 inline RunScheduledInstancesRequest& WithDryRun(bool value) { SetDryRun(value); return *this;} 141 142 143 /** 144 * <p>The number of instances.</p> <p>Default: 1</p> 145 */ GetInstanceCount()146 inline int GetInstanceCount() const{ return m_instanceCount; } 147 148 /** 149 * <p>The number of instances.</p> <p>Default: 1</p> 150 */ InstanceCountHasBeenSet()151 inline bool InstanceCountHasBeenSet() const { return m_instanceCountHasBeenSet; } 152 153 /** 154 * <p>The number of instances.</p> <p>Default: 1</p> 155 */ SetInstanceCount(int value)156 inline void SetInstanceCount(int value) { m_instanceCountHasBeenSet = true; m_instanceCount = value; } 157 158 /** 159 * <p>The number of instances.</p> <p>Default: 1</p> 160 */ WithInstanceCount(int value)161 inline RunScheduledInstancesRequest& WithInstanceCount(int value) { SetInstanceCount(value); return *this;} 162 163 164 /** 165 * <p>The launch specification. You must match the instance type, Availability 166 * Zone, network, and platform of the schedule that you purchased.</p> 167 */ GetLaunchSpecification()168 inline const ScheduledInstancesLaunchSpecification& GetLaunchSpecification() const{ return m_launchSpecification; } 169 170 /** 171 * <p>The launch specification. You must match the instance type, Availability 172 * Zone, network, and platform of the schedule that you purchased.</p> 173 */ LaunchSpecificationHasBeenSet()174 inline bool LaunchSpecificationHasBeenSet() const { return m_launchSpecificationHasBeenSet; } 175 176 /** 177 * <p>The launch specification. You must match the instance type, Availability 178 * Zone, network, and platform of the schedule that you purchased.</p> 179 */ SetLaunchSpecification(const ScheduledInstancesLaunchSpecification & value)180 inline void SetLaunchSpecification(const ScheduledInstancesLaunchSpecification& value) { m_launchSpecificationHasBeenSet = true; m_launchSpecification = value; } 181 182 /** 183 * <p>The launch specification. You must match the instance type, Availability 184 * Zone, network, and platform of the schedule that you purchased.</p> 185 */ SetLaunchSpecification(ScheduledInstancesLaunchSpecification && value)186 inline void SetLaunchSpecification(ScheduledInstancesLaunchSpecification&& value) { m_launchSpecificationHasBeenSet = true; m_launchSpecification = std::move(value); } 187 188 /** 189 * <p>The launch specification. You must match the instance type, Availability 190 * Zone, network, and platform of the schedule that you purchased.</p> 191 */ WithLaunchSpecification(const ScheduledInstancesLaunchSpecification & value)192 inline RunScheduledInstancesRequest& WithLaunchSpecification(const ScheduledInstancesLaunchSpecification& value) { SetLaunchSpecification(value); return *this;} 193 194 /** 195 * <p>The launch specification. You must match the instance type, Availability 196 * Zone, network, and platform of the schedule that you purchased.</p> 197 */ WithLaunchSpecification(ScheduledInstancesLaunchSpecification && value)198 inline RunScheduledInstancesRequest& WithLaunchSpecification(ScheduledInstancesLaunchSpecification&& value) { SetLaunchSpecification(std::move(value)); return *this;} 199 200 201 /** 202 * <p>The Scheduled Instance ID.</p> 203 */ GetScheduledInstanceId()204 inline const Aws::String& GetScheduledInstanceId() const{ return m_scheduledInstanceId; } 205 206 /** 207 * <p>The Scheduled Instance ID.</p> 208 */ ScheduledInstanceIdHasBeenSet()209 inline bool ScheduledInstanceIdHasBeenSet() const { return m_scheduledInstanceIdHasBeenSet; } 210 211 /** 212 * <p>The Scheduled Instance ID.</p> 213 */ SetScheduledInstanceId(const Aws::String & value)214 inline void SetScheduledInstanceId(const Aws::String& value) { m_scheduledInstanceIdHasBeenSet = true; m_scheduledInstanceId = value; } 215 216 /** 217 * <p>The Scheduled Instance ID.</p> 218 */ SetScheduledInstanceId(Aws::String && value)219 inline void SetScheduledInstanceId(Aws::String&& value) { m_scheduledInstanceIdHasBeenSet = true; m_scheduledInstanceId = std::move(value); } 220 221 /** 222 * <p>The Scheduled Instance ID.</p> 223 */ SetScheduledInstanceId(const char * value)224 inline void SetScheduledInstanceId(const char* value) { m_scheduledInstanceIdHasBeenSet = true; m_scheduledInstanceId.assign(value); } 225 226 /** 227 * <p>The Scheduled Instance ID.</p> 228 */ WithScheduledInstanceId(const Aws::String & value)229 inline RunScheduledInstancesRequest& WithScheduledInstanceId(const Aws::String& value) { SetScheduledInstanceId(value); return *this;} 230 231 /** 232 * <p>The Scheduled Instance ID.</p> 233 */ WithScheduledInstanceId(Aws::String && value)234 inline RunScheduledInstancesRequest& WithScheduledInstanceId(Aws::String&& value) { SetScheduledInstanceId(std::move(value)); return *this;} 235 236 /** 237 * <p>The Scheduled Instance ID.</p> 238 */ WithScheduledInstanceId(const char * value)239 inline RunScheduledInstancesRequest& WithScheduledInstanceId(const char* value) { SetScheduledInstanceId(value); return *this;} 240 241 private: 242 243 Aws::String m_clientToken; 244 bool m_clientTokenHasBeenSet; 245 246 bool m_dryRun; 247 bool m_dryRunHasBeenSet; 248 249 int m_instanceCount; 250 bool m_instanceCountHasBeenSet; 251 252 ScheduledInstancesLaunchSpecification m_launchSpecification; 253 bool m_launchSpecificationHasBeenSet; 254 255 Aws::String m_scheduledInstanceId; 256 bool m_scheduledInstanceIdHasBeenSet; 257 }; 258 259 } // namespace Model 260 } // namespace EC2 261 } // namespace Aws 262