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/apprunner/AppRunner_EXPORTS.h> 8 #include <aws/core/utils/memory/stl/AWSString.h> 9 #include <aws/apprunner/model/AutoScalingConfigurationStatus.h> 10 #include <aws/core/utils/DateTime.h> 11 #include <utility> 12 13 namespace Aws 14 { 15 namespace Utils 16 { 17 namespace Json 18 { 19 class JsonValue; 20 class JsonView; 21 } // namespace Json 22 } // namespace Utils 23 namespace AppRunner 24 { 25 namespace Model 26 { 27 28 /** 29 * <p>Describes an App Runner automatic scaling configuration resource. Multiple 30 * revisions of a configuration have the same 31 * <code>AutoScalingConfigurationName</code> and different 32 * <code>AutoScalingConfigurationRevision</code> values.</p> <p>A higher 33 * <code>MinSize</code> increases the spread of your App Runner service over more 34 * Availability Zones in the Amazon Web Services Region. The tradeoff is a higher 35 * minimal cost.</p> <p>A lower <code>MaxSize</code> controls your cost. The 36 * tradeoff is lower responsiveness during peak demand.</p><p><h3>See Also:</h3> 37 * <a 38 * href="http://docs.aws.amazon.com/goto/WebAPI/apprunner-2020-05-15/AutoScalingConfiguration">AWS 39 * API Reference</a></p> 40 */ 41 class AWS_APPRUNNER_API AutoScalingConfiguration 42 { 43 public: 44 AutoScalingConfiguration(); 45 AutoScalingConfiguration(Aws::Utils::Json::JsonView jsonValue); 46 AutoScalingConfiguration& operator=(Aws::Utils::Json::JsonView jsonValue); 47 Aws::Utils::Json::JsonValue Jsonize() const; 48 49 50 /** 51 * <p>The Amazon Resource Name (ARN) of this auto scaling configuration.</p> 52 */ GetAutoScalingConfigurationArn()53 inline const Aws::String& GetAutoScalingConfigurationArn() const{ return m_autoScalingConfigurationArn; } 54 55 /** 56 * <p>The Amazon Resource Name (ARN) of this auto scaling configuration.</p> 57 */ AutoScalingConfigurationArnHasBeenSet()58 inline bool AutoScalingConfigurationArnHasBeenSet() const { return m_autoScalingConfigurationArnHasBeenSet; } 59 60 /** 61 * <p>The Amazon Resource Name (ARN) of this auto scaling configuration.</p> 62 */ SetAutoScalingConfigurationArn(const Aws::String & value)63 inline void SetAutoScalingConfigurationArn(const Aws::String& value) { m_autoScalingConfigurationArnHasBeenSet = true; m_autoScalingConfigurationArn = value; } 64 65 /** 66 * <p>The Amazon Resource Name (ARN) of this auto scaling configuration.</p> 67 */ SetAutoScalingConfigurationArn(Aws::String && value)68 inline void SetAutoScalingConfigurationArn(Aws::String&& value) { m_autoScalingConfigurationArnHasBeenSet = true; m_autoScalingConfigurationArn = std::move(value); } 69 70 /** 71 * <p>The Amazon Resource Name (ARN) of this auto scaling configuration.</p> 72 */ SetAutoScalingConfigurationArn(const char * value)73 inline void SetAutoScalingConfigurationArn(const char* value) { m_autoScalingConfigurationArnHasBeenSet = true; m_autoScalingConfigurationArn.assign(value); } 74 75 /** 76 * <p>The Amazon Resource Name (ARN) of this auto scaling configuration.</p> 77 */ WithAutoScalingConfigurationArn(const Aws::String & value)78 inline AutoScalingConfiguration& WithAutoScalingConfigurationArn(const Aws::String& value) { SetAutoScalingConfigurationArn(value); return *this;} 79 80 /** 81 * <p>The Amazon Resource Name (ARN) of this auto scaling configuration.</p> 82 */ WithAutoScalingConfigurationArn(Aws::String && value)83 inline AutoScalingConfiguration& WithAutoScalingConfigurationArn(Aws::String&& value) { SetAutoScalingConfigurationArn(std::move(value)); return *this;} 84 85 /** 86 * <p>The Amazon Resource Name (ARN) of this auto scaling configuration.</p> 87 */ WithAutoScalingConfigurationArn(const char * value)88 inline AutoScalingConfiguration& WithAutoScalingConfigurationArn(const char* value) { SetAutoScalingConfigurationArn(value); return *this;} 89 90 91 /** 92 * <p>The customer-provided auto scaling configuration name. It can be used in 93 * multiple revisions of a configuration.</p> 94 */ GetAutoScalingConfigurationName()95 inline const Aws::String& GetAutoScalingConfigurationName() const{ return m_autoScalingConfigurationName; } 96 97 /** 98 * <p>The customer-provided auto scaling configuration name. It can be used in 99 * multiple revisions of a configuration.</p> 100 */ AutoScalingConfigurationNameHasBeenSet()101 inline bool AutoScalingConfigurationNameHasBeenSet() const { return m_autoScalingConfigurationNameHasBeenSet; } 102 103 /** 104 * <p>The customer-provided auto scaling configuration name. It can be used in 105 * multiple revisions of a configuration.</p> 106 */ SetAutoScalingConfigurationName(const Aws::String & value)107 inline void SetAutoScalingConfigurationName(const Aws::String& value) { m_autoScalingConfigurationNameHasBeenSet = true; m_autoScalingConfigurationName = value; } 108 109 /** 110 * <p>The customer-provided auto scaling configuration name. It can be used in 111 * multiple revisions of a configuration.</p> 112 */ SetAutoScalingConfigurationName(Aws::String && value)113 inline void SetAutoScalingConfigurationName(Aws::String&& value) { m_autoScalingConfigurationNameHasBeenSet = true; m_autoScalingConfigurationName = std::move(value); } 114 115 /** 116 * <p>The customer-provided auto scaling configuration name. It can be used in 117 * multiple revisions of a configuration.</p> 118 */ SetAutoScalingConfigurationName(const char * value)119 inline void SetAutoScalingConfigurationName(const char* value) { m_autoScalingConfigurationNameHasBeenSet = true; m_autoScalingConfigurationName.assign(value); } 120 121 /** 122 * <p>The customer-provided auto scaling configuration name. It can be used in 123 * multiple revisions of a configuration.</p> 124 */ WithAutoScalingConfigurationName(const Aws::String & value)125 inline AutoScalingConfiguration& WithAutoScalingConfigurationName(const Aws::String& value) { SetAutoScalingConfigurationName(value); return *this;} 126 127 /** 128 * <p>The customer-provided auto scaling configuration name. It can be used in 129 * multiple revisions of a configuration.</p> 130 */ WithAutoScalingConfigurationName(Aws::String && value)131 inline AutoScalingConfiguration& WithAutoScalingConfigurationName(Aws::String&& value) { SetAutoScalingConfigurationName(std::move(value)); return *this;} 132 133 /** 134 * <p>The customer-provided auto scaling configuration name. It can be used in 135 * multiple revisions of a configuration.</p> 136 */ WithAutoScalingConfigurationName(const char * value)137 inline AutoScalingConfiguration& WithAutoScalingConfigurationName(const char* value) { SetAutoScalingConfigurationName(value); return *this;} 138 139 140 /** 141 * <p>The revision of this auto scaling configuration. It's unique among all the 142 * active configurations (<code>"Status": "ACTIVE"</code>) that share the same 143 * <code>AutoScalingConfigurationName</code>.</p> 144 */ GetAutoScalingConfigurationRevision()145 inline int GetAutoScalingConfigurationRevision() const{ return m_autoScalingConfigurationRevision; } 146 147 /** 148 * <p>The revision of this auto scaling configuration. It's unique among all the 149 * active configurations (<code>"Status": "ACTIVE"</code>) that share the same 150 * <code>AutoScalingConfigurationName</code>.</p> 151 */ AutoScalingConfigurationRevisionHasBeenSet()152 inline bool AutoScalingConfigurationRevisionHasBeenSet() const { return m_autoScalingConfigurationRevisionHasBeenSet; } 153 154 /** 155 * <p>The revision of this auto scaling configuration. It's unique among all the 156 * active configurations (<code>"Status": "ACTIVE"</code>) that share the same 157 * <code>AutoScalingConfigurationName</code>.</p> 158 */ SetAutoScalingConfigurationRevision(int value)159 inline void SetAutoScalingConfigurationRevision(int value) { m_autoScalingConfigurationRevisionHasBeenSet = true; m_autoScalingConfigurationRevision = value; } 160 161 /** 162 * <p>The revision of this auto scaling configuration. It's unique among all the 163 * active configurations (<code>"Status": "ACTIVE"</code>) that share the same 164 * <code>AutoScalingConfigurationName</code>.</p> 165 */ WithAutoScalingConfigurationRevision(int value)166 inline AutoScalingConfiguration& WithAutoScalingConfigurationRevision(int value) { SetAutoScalingConfigurationRevision(value); return *this;} 167 168 169 /** 170 * <p>It's set to <code>true</code> for the configuration with the highest 171 * <code>Revision</code> among all configurations that share the same 172 * <code>Name</code>. It's set to <code>false</code> otherwise.</p> 173 */ GetLatest()174 inline bool GetLatest() const{ return m_latest; } 175 176 /** 177 * <p>It's set to <code>true</code> for the configuration with the highest 178 * <code>Revision</code> among all configurations that share the same 179 * <code>Name</code>. It's set to <code>false</code> otherwise.</p> 180 */ LatestHasBeenSet()181 inline bool LatestHasBeenSet() const { return m_latestHasBeenSet; } 182 183 /** 184 * <p>It's set to <code>true</code> for the configuration with the highest 185 * <code>Revision</code> among all configurations that share the same 186 * <code>Name</code>. It's set to <code>false</code> otherwise.</p> 187 */ SetLatest(bool value)188 inline void SetLatest(bool value) { m_latestHasBeenSet = true; m_latest = value; } 189 190 /** 191 * <p>It's set to <code>true</code> for the configuration with the highest 192 * <code>Revision</code> among all configurations that share the same 193 * <code>Name</code>. It's set to <code>false</code> otherwise.</p> 194 */ WithLatest(bool value)195 inline AutoScalingConfiguration& WithLatest(bool value) { SetLatest(value); return *this;} 196 197 198 /** 199 * <p>The current state of the auto scaling configuration. If the status of a 200 * configuration revision is <code>INACTIVE</code>, it was deleted and can't be 201 * used. Inactive configuration revisions are permanently removed some time after 202 * they are deleted.</p> 203 */ GetStatus()204 inline const AutoScalingConfigurationStatus& GetStatus() const{ return m_status; } 205 206 /** 207 * <p>The current state of the auto scaling configuration. If the status of a 208 * configuration revision is <code>INACTIVE</code>, it was deleted and can't be 209 * used. Inactive configuration revisions are permanently removed some time after 210 * they are deleted.</p> 211 */ StatusHasBeenSet()212 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; } 213 214 /** 215 * <p>The current state of the auto scaling configuration. If the status of a 216 * configuration revision is <code>INACTIVE</code>, it was deleted and can't be 217 * used. Inactive configuration revisions are permanently removed some time after 218 * they are deleted.</p> 219 */ SetStatus(const AutoScalingConfigurationStatus & value)220 inline void SetStatus(const AutoScalingConfigurationStatus& value) { m_statusHasBeenSet = true; m_status = value; } 221 222 /** 223 * <p>The current state of the auto scaling configuration. If the status of a 224 * configuration revision is <code>INACTIVE</code>, it was deleted and can't be 225 * used. Inactive configuration revisions are permanently removed some time after 226 * they are deleted.</p> 227 */ SetStatus(AutoScalingConfigurationStatus && value)228 inline void SetStatus(AutoScalingConfigurationStatus&& value) { m_statusHasBeenSet = true; m_status = std::move(value); } 229 230 /** 231 * <p>The current state of the auto scaling configuration. If the status of a 232 * configuration revision is <code>INACTIVE</code>, it was deleted and can't be 233 * used. Inactive configuration revisions are permanently removed some time after 234 * they are deleted.</p> 235 */ WithStatus(const AutoScalingConfigurationStatus & value)236 inline AutoScalingConfiguration& WithStatus(const AutoScalingConfigurationStatus& value) { SetStatus(value); return *this;} 237 238 /** 239 * <p>The current state of the auto scaling configuration. If the status of a 240 * configuration revision is <code>INACTIVE</code>, it was deleted and can't be 241 * used. Inactive configuration revisions are permanently removed some time after 242 * they are deleted.</p> 243 */ WithStatus(AutoScalingConfigurationStatus && value)244 inline AutoScalingConfiguration& WithStatus(AutoScalingConfigurationStatus&& value) { SetStatus(std::move(value)); return *this;} 245 246 247 /** 248 * <p>The maximum number of concurrent requests that an instance processes. If the 249 * number of concurrent requests exceeds this limit, App Runner scales the service 250 * up.</p> 251 */ GetMaxConcurrency()252 inline int GetMaxConcurrency() const{ return m_maxConcurrency; } 253 254 /** 255 * <p>The maximum number of concurrent requests that an instance processes. If the 256 * number of concurrent requests exceeds this limit, App Runner scales the service 257 * up.</p> 258 */ MaxConcurrencyHasBeenSet()259 inline bool MaxConcurrencyHasBeenSet() const { return m_maxConcurrencyHasBeenSet; } 260 261 /** 262 * <p>The maximum number of concurrent requests that an instance processes. If the 263 * number of concurrent requests exceeds this limit, App Runner scales the service 264 * up.</p> 265 */ SetMaxConcurrency(int value)266 inline void SetMaxConcurrency(int value) { m_maxConcurrencyHasBeenSet = true; m_maxConcurrency = value; } 267 268 /** 269 * <p>The maximum number of concurrent requests that an instance processes. If the 270 * number of concurrent requests exceeds this limit, App Runner scales the service 271 * up.</p> 272 */ WithMaxConcurrency(int value)273 inline AutoScalingConfiguration& WithMaxConcurrency(int value) { SetMaxConcurrency(value); return *this;} 274 275 276 /** 277 * <p>The minimum number of instances that App Runner provisions for a service. The 278 * service always has at least <code>MinSize</code> provisioned instances. Some of 279 * them actively serve traffic. The rest of them (provisioned and inactive 280 * instances) are a cost-effective compute capacity reserve and are ready to be 281 * quickly activated. You pay for memory usage of all the provisioned instances. 282 * You pay for CPU usage of only the active subset.</p> <p>App Runner temporarily 283 * doubles the number of provisioned instances during deployments, to maintain the 284 * same capacity for both old and new code.</p> 285 */ GetMinSize()286 inline int GetMinSize() const{ return m_minSize; } 287 288 /** 289 * <p>The minimum number of instances that App Runner provisions for a service. The 290 * service always has at least <code>MinSize</code> provisioned instances. Some of 291 * them actively serve traffic. The rest of them (provisioned and inactive 292 * instances) are a cost-effective compute capacity reserve and are ready to be 293 * quickly activated. You pay for memory usage of all the provisioned instances. 294 * You pay for CPU usage of only the active subset.</p> <p>App Runner temporarily 295 * doubles the number of provisioned instances during deployments, to maintain the 296 * same capacity for both old and new code.</p> 297 */ MinSizeHasBeenSet()298 inline bool MinSizeHasBeenSet() const { return m_minSizeHasBeenSet; } 299 300 /** 301 * <p>The minimum number of instances that App Runner provisions for a service. The 302 * service always has at least <code>MinSize</code> provisioned instances. Some of 303 * them actively serve traffic. The rest of them (provisioned and inactive 304 * instances) are a cost-effective compute capacity reserve and are ready to be 305 * quickly activated. You pay for memory usage of all the provisioned instances. 306 * You pay for CPU usage of only the active subset.</p> <p>App Runner temporarily 307 * doubles the number of provisioned instances during deployments, to maintain the 308 * same capacity for both old and new code.</p> 309 */ SetMinSize(int value)310 inline void SetMinSize(int value) { m_minSizeHasBeenSet = true; m_minSize = value; } 311 312 /** 313 * <p>The minimum number of instances that App Runner provisions for a service. The 314 * service always has at least <code>MinSize</code> provisioned instances. Some of 315 * them actively serve traffic. The rest of them (provisioned and inactive 316 * instances) are a cost-effective compute capacity reserve and are ready to be 317 * quickly activated. You pay for memory usage of all the provisioned instances. 318 * You pay for CPU usage of only the active subset.</p> <p>App Runner temporarily 319 * doubles the number of provisioned instances during deployments, to maintain the 320 * same capacity for both old and new code.</p> 321 */ WithMinSize(int value)322 inline AutoScalingConfiguration& WithMinSize(int value) { SetMinSize(value); return *this;} 323 324 325 /** 326 * <p>The maximum number of instances that a service scales up to. At most 327 * <code>MaxSize</code> instances actively serve traffic for your service.</p> 328 */ GetMaxSize()329 inline int GetMaxSize() const{ return m_maxSize; } 330 331 /** 332 * <p>The maximum number of instances that a service scales up to. At most 333 * <code>MaxSize</code> instances actively serve traffic for your service.</p> 334 */ MaxSizeHasBeenSet()335 inline bool MaxSizeHasBeenSet() const { return m_maxSizeHasBeenSet; } 336 337 /** 338 * <p>The maximum number of instances that a service scales up to. At most 339 * <code>MaxSize</code> instances actively serve traffic for your service.</p> 340 */ SetMaxSize(int value)341 inline void SetMaxSize(int value) { m_maxSizeHasBeenSet = true; m_maxSize = value; } 342 343 /** 344 * <p>The maximum number of instances that a service scales up to. At most 345 * <code>MaxSize</code> instances actively serve traffic for your service.</p> 346 */ WithMaxSize(int value)347 inline AutoScalingConfiguration& WithMaxSize(int value) { SetMaxSize(value); return *this;} 348 349 350 /** 351 * <p>The time when the auto scaling configuration was created. It's in Unix time 352 * stamp format.</p> 353 */ GetCreatedAt()354 inline const Aws::Utils::DateTime& GetCreatedAt() const{ return m_createdAt; } 355 356 /** 357 * <p>The time when the auto scaling configuration was created. It's in Unix time 358 * stamp format.</p> 359 */ CreatedAtHasBeenSet()360 inline bool CreatedAtHasBeenSet() const { return m_createdAtHasBeenSet; } 361 362 /** 363 * <p>The time when the auto scaling configuration was created. It's in Unix time 364 * stamp format.</p> 365 */ SetCreatedAt(const Aws::Utils::DateTime & value)366 inline void SetCreatedAt(const Aws::Utils::DateTime& value) { m_createdAtHasBeenSet = true; m_createdAt = value; } 367 368 /** 369 * <p>The time when the auto scaling configuration was created. It's in Unix time 370 * stamp format.</p> 371 */ SetCreatedAt(Aws::Utils::DateTime && value)372 inline void SetCreatedAt(Aws::Utils::DateTime&& value) { m_createdAtHasBeenSet = true; m_createdAt = std::move(value); } 373 374 /** 375 * <p>The time when the auto scaling configuration was created. It's in Unix time 376 * stamp format.</p> 377 */ WithCreatedAt(const Aws::Utils::DateTime & value)378 inline AutoScalingConfiguration& WithCreatedAt(const Aws::Utils::DateTime& value) { SetCreatedAt(value); return *this;} 379 380 /** 381 * <p>The time when the auto scaling configuration was created. It's in Unix time 382 * stamp format.</p> 383 */ WithCreatedAt(Aws::Utils::DateTime && value)384 inline AutoScalingConfiguration& WithCreatedAt(Aws::Utils::DateTime&& value) { SetCreatedAt(std::move(value)); return *this;} 385 386 387 /** 388 * <p>The time when the auto scaling configuration was deleted. It's in Unix time 389 * stamp format.</p> 390 */ GetDeletedAt()391 inline const Aws::Utils::DateTime& GetDeletedAt() const{ return m_deletedAt; } 392 393 /** 394 * <p>The time when the auto scaling configuration was deleted. It's in Unix time 395 * stamp format.</p> 396 */ DeletedAtHasBeenSet()397 inline bool DeletedAtHasBeenSet() const { return m_deletedAtHasBeenSet; } 398 399 /** 400 * <p>The time when the auto scaling configuration was deleted. It's in Unix time 401 * stamp format.</p> 402 */ SetDeletedAt(const Aws::Utils::DateTime & value)403 inline void SetDeletedAt(const Aws::Utils::DateTime& value) { m_deletedAtHasBeenSet = true; m_deletedAt = value; } 404 405 /** 406 * <p>The time when the auto scaling configuration was deleted. It's in Unix time 407 * stamp format.</p> 408 */ SetDeletedAt(Aws::Utils::DateTime && value)409 inline void SetDeletedAt(Aws::Utils::DateTime&& value) { m_deletedAtHasBeenSet = true; m_deletedAt = std::move(value); } 410 411 /** 412 * <p>The time when the auto scaling configuration was deleted. It's in Unix time 413 * stamp format.</p> 414 */ WithDeletedAt(const Aws::Utils::DateTime & value)415 inline AutoScalingConfiguration& WithDeletedAt(const Aws::Utils::DateTime& value) { SetDeletedAt(value); return *this;} 416 417 /** 418 * <p>The time when the auto scaling configuration was deleted. It's in Unix time 419 * stamp format.</p> 420 */ WithDeletedAt(Aws::Utils::DateTime && value)421 inline AutoScalingConfiguration& WithDeletedAt(Aws::Utils::DateTime&& value) { SetDeletedAt(std::move(value)); return *this;} 422 423 private: 424 425 Aws::String m_autoScalingConfigurationArn; 426 bool m_autoScalingConfigurationArnHasBeenSet; 427 428 Aws::String m_autoScalingConfigurationName; 429 bool m_autoScalingConfigurationNameHasBeenSet; 430 431 int m_autoScalingConfigurationRevision; 432 bool m_autoScalingConfigurationRevisionHasBeenSet; 433 434 bool m_latest; 435 bool m_latestHasBeenSet; 436 437 AutoScalingConfigurationStatus m_status; 438 bool m_statusHasBeenSet; 439 440 int m_maxConcurrency; 441 bool m_maxConcurrencyHasBeenSet; 442 443 int m_minSize; 444 bool m_minSizeHasBeenSet; 445 446 int m_maxSize; 447 bool m_maxSizeHasBeenSet; 448 449 Aws::Utils::DateTime m_createdAt; 450 bool m_createdAtHasBeenSet; 451 452 Aws::Utils::DateTime m_deletedAt; 453 bool m_deletedAtHasBeenSet; 454 }; 455 456 } // namespace Model 457 } // namespace AppRunner 458 } // namespace Aws 459