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

The ulimit settings to pass to the container.

Amazon ECS * tasks hosted on Fargate use the default resource limit values set by the * operating system with the exception of the nofile resource limit * parameter which Fargate overrides. The nofile resource limit sets a * restriction on the number of open files that a container can use. The default * nofile soft limit is 1024 and the default hard limit * is 4096.

You can specify the ulimit settings * for a container in a task definition.

See Also:

AWS API * Reference

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

The type of the ulimit.

*/ inline const UlimitName& GetName() const{ return m_name; } /** *

The type of the ulimit.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The type of the ulimit.

*/ inline void SetName(const UlimitName& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The type of the ulimit.

*/ inline void SetName(UlimitName&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The type of the ulimit.

*/ inline Ulimit& WithName(const UlimitName& value) { SetName(value); return *this;} /** *

The type of the ulimit.

*/ inline Ulimit& WithName(UlimitName&& value) { SetName(std::move(value)); return *this;} /** *

The soft limit for the ulimit type.

*/ inline int GetSoftLimit() const{ return m_softLimit; } /** *

The soft limit for the ulimit type.

*/ inline bool SoftLimitHasBeenSet() const { return m_softLimitHasBeenSet; } /** *

The soft limit for the ulimit type.

*/ inline void SetSoftLimit(int value) { m_softLimitHasBeenSet = true; m_softLimit = value; } /** *

The soft limit for the ulimit type.

*/ inline Ulimit& WithSoftLimit(int value) { SetSoftLimit(value); return *this;} /** *

The hard limit for the ulimit type.

*/ inline int GetHardLimit() const{ return m_hardLimit; } /** *

The hard limit for the ulimit type.

*/ inline bool HardLimitHasBeenSet() const { return m_hardLimitHasBeenSet; } /** *

The hard limit for the ulimit type.

*/ inline void SetHardLimit(int value) { m_hardLimitHasBeenSet = true; m_hardLimit = value; } /** *

The hard limit for the ulimit type.

*/ inline Ulimit& WithHardLimit(int value) { SetHardLimit(value); return *this;} private: UlimitName m_name; bool m_nameHasBeenSet = false; int m_softLimit; bool m_softLimitHasBeenSet = false; int m_hardLimit; bool m_hardLimitHasBeenSet = false; }; } // namespace Model } // namespace ECS } // namespace Aws