/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace AppRunner { namespace Model { /** *

Describes an App Runner automatic scaling configuration resource.

A * higher MinSize increases the spread of your App Runner service over * more Availability Zones in the Amazon Web Services Region. The tradeoff is a * higher minimal cost.

A lower MaxSize controls your cost. The * tradeoff is lower responsiveness during peak demand.

Multiple revisions * of a configuration might have the same AutoScalingConfigurationName * and different AutoScalingConfigurationRevision * values.

See Also:

AWS * API Reference

*/ class AutoScalingConfiguration { public: AWS_APPRUNNER_API AutoScalingConfiguration(); AWS_APPRUNNER_API AutoScalingConfiguration(Aws::Utils::Json::JsonView jsonValue); AWS_APPRUNNER_API AutoScalingConfiguration& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_APPRUNNER_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The Amazon Resource Name (ARN) of this auto scaling configuration.

*/ inline const Aws::String& GetAutoScalingConfigurationArn() const{ return m_autoScalingConfigurationArn; } /** *

The Amazon Resource Name (ARN) of this auto scaling configuration.

*/ inline bool AutoScalingConfigurationArnHasBeenSet() const { return m_autoScalingConfigurationArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of this auto scaling configuration.

*/ inline void SetAutoScalingConfigurationArn(const Aws::String& value) { m_autoScalingConfigurationArnHasBeenSet = true; m_autoScalingConfigurationArn = value; } /** *

The Amazon Resource Name (ARN) of this auto scaling configuration.

*/ inline void SetAutoScalingConfigurationArn(Aws::String&& value) { m_autoScalingConfigurationArnHasBeenSet = true; m_autoScalingConfigurationArn = std::move(value); } /** *

The Amazon Resource Name (ARN) of this auto scaling configuration.

*/ inline void SetAutoScalingConfigurationArn(const char* value) { m_autoScalingConfigurationArnHasBeenSet = true; m_autoScalingConfigurationArn.assign(value); } /** *

The Amazon Resource Name (ARN) of this auto scaling configuration.

*/ inline AutoScalingConfiguration& WithAutoScalingConfigurationArn(const Aws::String& value) { SetAutoScalingConfigurationArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of this auto scaling configuration.

*/ inline AutoScalingConfiguration& WithAutoScalingConfigurationArn(Aws::String&& value) { SetAutoScalingConfigurationArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of this auto scaling configuration.

*/ inline AutoScalingConfiguration& WithAutoScalingConfigurationArn(const char* value) { SetAutoScalingConfigurationArn(value); return *this;} /** *

The customer-provided auto scaling configuration name. It can be used in * multiple revisions of a configuration.

*/ inline const Aws::String& GetAutoScalingConfigurationName() const{ return m_autoScalingConfigurationName; } /** *

The customer-provided auto scaling configuration name. It can be used in * multiple revisions of a configuration.

*/ inline bool AutoScalingConfigurationNameHasBeenSet() const { return m_autoScalingConfigurationNameHasBeenSet; } /** *

The customer-provided auto scaling configuration name. It can be used in * multiple revisions of a configuration.

*/ inline void SetAutoScalingConfigurationName(const Aws::String& value) { m_autoScalingConfigurationNameHasBeenSet = true; m_autoScalingConfigurationName = value; } /** *

The customer-provided auto scaling configuration name. It can be used in * multiple revisions of a configuration.

*/ inline void SetAutoScalingConfigurationName(Aws::String&& value) { m_autoScalingConfigurationNameHasBeenSet = true; m_autoScalingConfigurationName = std::move(value); } /** *

The customer-provided auto scaling configuration name. It can be used in * multiple revisions of a configuration.

*/ inline void SetAutoScalingConfigurationName(const char* value) { m_autoScalingConfigurationNameHasBeenSet = true; m_autoScalingConfigurationName.assign(value); } /** *

The customer-provided auto scaling configuration name. It can be used in * multiple revisions of a configuration.

*/ inline AutoScalingConfiguration& WithAutoScalingConfigurationName(const Aws::String& value) { SetAutoScalingConfigurationName(value); return *this;} /** *

The customer-provided auto scaling configuration name. It can be used in * multiple revisions of a configuration.

*/ inline AutoScalingConfiguration& WithAutoScalingConfigurationName(Aws::String&& value) { SetAutoScalingConfigurationName(std::move(value)); return *this;} /** *

The customer-provided auto scaling configuration name. It can be used in * multiple revisions of a configuration.

*/ inline AutoScalingConfiguration& WithAutoScalingConfigurationName(const char* value) { SetAutoScalingConfigurationName(value); return *this;} /** *

The revision of this auto scaling configuration. It's unique among all the * active configurations ("Status": "ACTIVE") that share the same * AutoScalingConfigurationName.

*/ inline int GetAutoScalingConfigurationRevision() const{ return m_autoScalingConfigurationRevision; } /** *

The revision of this auto scaling configuration. It's unique among all the * active configurations ("Status": "ACTIVE") that share the same * AutoScalingConfigurationName.

*/ inline bool AutoScalingConfigurationRevisionHasBeenSet() const { return m_autoScalingConfigurationRevisionHasBeenSet; } /** *

The revision of this auto scaling configuration. It's unique among all the * active configurations ("Status": "ACTIVE") that share the same * AutoScalingConfigurationName.

*/ inline void SetAutoScalingConfigurationRevision(int value) { m_autoScalingConfigurationRevisionHasBeenSet = true; m_autoScalingConfigurationRevision = value; } /** *

The revision of this auto scaling configuration. It's unique among all the * active configurations ("Status": "ACTIVE") that share the same * AutoScalingConfigurationName.

*/ inline AutoScalingConfiguration& WithAutoScalingConfigurationRevision(int value) { SetAutoScalingConfigurationRevision(value); return *this;} /** *

It's set to true for the configuration with the highest * Revision among all configurations that share the same * AutoScalingConfigurationName. It's set to false * otherwise.

*/ inline bool GetLatest() const{ return m_latest; } /** *

It's set to true for the configuration with the highest * Revision among all configurations that share the same * AutoScalingConfigurationName. It's set to false * otherwise.

*/ inline bool LatestHasBeenSet() const { return m_latestHasBeenSet; } /** *

It's set to true for the configuration with the highest * Revision among all configurations that share the same * AutoScalingConfigurationName. It's set to false * otherwise.

*/ inline void SetLatest(bool value) { m_latestHasBeenSet = true; m_latest = value; } /** *

It's set to true for the configuration with the highest * Revision among all configurations that share the same * AutoScalingConfigurationName. It's set to false * otherwise.

*/ inline AutoScalingConfiguration& WithLatest(bool value) { SetLatest(value); return *this;} /** *

The current state of the auto scaling configuration. If the status of a * configuration revision is INACTIVE, it was deleted and can't be * used. Inactive configuration revisions are permanently removed some time after * they are deleted.

*/ inline const AutoScalingConfigurationStatus& GetStatus() const{ return m_status; } /** *

The current state of the auto scaling configuration. If the status of a * configuration revision is INACTIVE, it was deleted and can't be * used. Inactive configuration revisions are permanently removed some time after * they are deleted.

*/ inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; } /** *

The current state of the auto scaling configuration. If the status of a * configuration revision is INACTIVE, it was deleted and can't be * used. Inactive configuration revisions are permanently removed some time after * they are deleted.

*/ inline void SetStatus(const AutoScalingConfigurationStatus& value) { m_statusHasBeenSet = true; m_status = value; } /** *

The current state of the auto scaling configuration. If the status of a * configuration revision is INACTIVE, it was deleted and can't be * used. Inactive configuration revisions are permanently removed some time after * they are deleted.

*/ inline void SetStatus(AutoScalingConfigurationStatus&& value) { m_statusHasBeenSet = true; m_status = std::move(value); } /** *

The current state of the auto scaling configuration. If the status of a * configuration revision is INACTIVE, it was deleted and can't be * used. Inactive configuration revisions are permanently removed some time after * they are deleted.

*/ inline AutoScalingConfiguration& WithStatus(const AutoScalingConfigurationStatus& value) { SetStatus(value); return *this;} /** *

The current state of the auto scaling configuration. If the status of a * configuration revision is INACTIVE, it was deleted and can't be * used. Inactive configuration revisions are permanently removed some time after * they are deleted.

*/ inline AutoScalingConfiguration& WithStatus(AutoScalingConfigurationStatus&& value) { SetStatus(std::move(value)); return *this;} /** *

The maximum number of concurrent requests that an instance processes. If the * number of concurrent requests exceeds this limit, App Runner scales the service * up.

*/ inline int GetMaxConcurrency() const{ return m_maxConcurrency; } /** *

The maximum number of concurrent requests that an instance processes. If the * number of concurrent requests exceeds this limit, App Runner scales the service * up.

*/ inline bool MaxConcurrencyHasBeenSet() const { return m_maxConcurrencyHasBeenSet; } /** *

The maximum number of concurrent requests that an instance processes. If the * number of concurrent requests exceeds this limit, App Runner scales the service * up.

*/ inline void SetMaxConcurrency(int value) { m_maxConcurrencyHasBeenSet = true; m_maxConcurrency = value; } /** *

The maximum number of concurrent requests that an instance processes. If the * number of concurrent requests exceeds this limit, App Runner scales the service * up.

*/ inline AutoScalingConfiguration& WithMaxConcurrency(int value) { SetMaxConcurrency(value); return *this;} /** *

The minimum number of instances that App Runner provisions for a service. The * service always has at least MinSize provisioned instances. Some of * them actively serve traffic. The rest of them (provisioned and inactive * instances) are a cost-effective compute capacity reserve and are ready to be * quickly activated. You pay for memory usage of all the provisioned instances. * You pay for CPU usage of only the active subset.

App Runner temporarily * doubles the number of provisioned instances during deployments, to maintain the * same capacity for both old and new code.

*/ inline int GetMinSize() const{ return m_minSize; } /** *

The minimum number of instances that App Runner provisions for a service. The * service always has at least MinSize provisioned instances. Some of * them actively serve traffic. The rest of them (provisioned and inactive * instances) are a cost-effective compute capacity reserve and are ready to be * quickly activated. You pay for memory usage of all the provisioned instances. * You pay for CPU usage of only the active subset.

App Runner temporarily * doubles the number of provisioned instances during deployments, to maintain the * same capacity for both old and new code.

*/ inline bool MinSizeHasBeenSet() const { return m_minSizeHasBeenSet; } /** *

The minimum number of instances that App Runner provisions for a service. The * service always has at least MinSize provisioned instances. Some of * them actively serve traffic. The rest of them (provisioned and inactive * instances) are a cost-effective compute capacity reserve and are ready to be * quickly activated. You pay for memory usage of all the provisioned instances. * You pay for CPU usage of only the active subset.

App Runner temporarily * doubles the number of provisioned instances during deployments, to maintain the * same capacity for both old and new code.

*/ inline void SetMinSize(int value) { m_minSizeHasBeenSet = true; m_minSize = value; } /** *

The minimum number of instances that App Runner provisions for a service. The * service always has at least MinSize provisioned instances. Some of * them actively serve traffic. The rest of them (provisioned and inactive * instances) are a cost-effective compute capacity reserve and are ready to be * quickly activated. You pay for memory usage of all the provisioned instances. * You pay for CPU usage of only the active subset.

App Runner temporarily * doubles the number of provisioned instances during deployments, to maintain the * same capacity for both old and new code.

*/ inline AutoScalingConfiguration& WithMinSize(int value) { SetMinSize(value); return *this;} /** *

The maximum number of instances that a service scales up to. At most * MaxSize instances actively serve traffic for your service.

*/ inline int GetMaxSize() const{ return m_maxSize; } /** *

The maximum number of instances that a service scales up to. At most * MaxSize instances actively serve traffic for your service.

*/ inline bool MaxSizeHasBeenSet() const { return m_maxSizeHasBeenSet; } /** *

The maximum number of instances that a service scales up to. At most * MaxSize instances actively serve traffic for your service.

*/ inline void SetMaxSize(int value) { m_maxSizeHasBeenSet = true; m_maxSize = value; } /** *

The maximum number of instances that a service scales up to. At most * MaxSize instances actively serve traffic for your service.

*/ inline AutoScalingConfiguration& WithMaxSize(int value) { SetMaxSize(value); return *this;} /** *

The time when the auto scaling configuration was created. It's in Unix time * stamp format.

*/ inline const Aws::Utils::DateTime& GetCreatedAt() const{ return m_createdAt; } /** *

The time when the auto scaling configuration was created. It's in Unix time * stamp format.

*/ inline bool CreatedAtHasBeenSet() const { return m_createdAtHasBeenSet; } /** *

The time when the auto scaling configuration was created. It's in Unix time * stamp format.

*/ inline void SetCreatedAt(const Aws::Utils::DateTime& value) { m_createdAtHasBeenSet = true; m_createdAt = value; } /** *

The time when the auto scaling configuration was created. It's in Unix time * stamp format.

*/ inline void SetCreatedAt(Aws::Utils::DateTime&& value) { m_createdAtHasBeenSet = true; m_createdAt = std::move(value); } /** *

The time when the auto scaling configuration was created. It's in Unix time * stamp format.

*/ inline AutoScalingConfiguration& WithCreatedAt(const Aws::Utils::DateTime& value) { SetCreatedAt(value); return *this;} /** *

The time when the auto scaling configuration was created. It's in Unix time * stamp format.

*/ inline AutoScalingConfiguration& WithCreatedAt(Aws::Utils::DateTime&& value) { SetCreatedAt(std::move(value)); return *this;} /** *

The time when the auto scaling configuration was deleted. It's in Unix time * stamp format.

*/ inline const Aws::Utils::DateTime& GetDeletedAt() const{ return m_deletedAt; } /** *

The time when the auto scaling configuration was deleted. It's in Unix time * stamp format.

*/ inline bool DeletedAtHasBeenSet() const { return m_deletedAtHasBeenSet; } /** *

The time when the auto scaling configuration was deleted. It's in Unix time * stamp format.

*/ inline void SetDeletedAt(const Aws::Utils::DateTime& value) { m_deletedAtHasBeenSet = true; m_deletedAt = value; } /** *

The time when the auto scaling configuration was deleted. It's in Unix time * stamp format.

*/ inline void SetDeletedAt(Aws::Utils::DateTime&& value) { m_deletedAtHasBeenSet = true; m_deletedAt = std::move(value); } /** *

The time when the auto scaling configuration was deleted. It's in Unix time * stamp format.

*/ inline AutoScalingConfiguration& WithDeletedAt(const Aws::Utils::DateTime& value) { SetDeletedAt(value); return *this;} /** *

The time when the auto scaling configuration was deleted. It's in Unix time * stamp format.

*/ inline AutoScalingConfiguration& WithDeletedAt(Aws::Utils::DateTime&& value) { SetDeletedAt(std::move(value)); return *this;} private: Aws::String m_autoScalingConfigurationArn; bool m_autoScalingConfigurationArnHasBeenSet = false; Aws::String m_autoScalingConfigurationName; bool m_autoScalingConfigurationNameHasBeenSet = false; int m_autoScalingConfigurationRevision; bool m_autoScalingConfigurationRevisionHasBeenSet = false; bool m_latest; bool m_latestHasBeenSet = false; AutoScalingConfigurationStatus m_status; bool m_statusHasBeenSet = false; int m_maxConcurrency; bool m_maxConcurrencyHasBeenSet = false; int m_minSize; bool m_minSizeHasBeenSet = false; int m_maxSize; bool m_maxSizeHasBeenSet = false; Aws::Utils::DateTime m_createdAt; bool m_createdAtHasBeenSet = false; Aws::Utils::DateTime m_deletedAt; bool m_deletedAtHasBeenSet = false; }; } // namespace Model } // namespace AppRunner } // namespace Aws