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

A list of files containing the environment variables to pass to a container. * You can specify up to ten environment files. The file must have a * .env file extension. Each line in an environment file should * contain an environment variable in VARIABLE=VALUE format. Lines * beginning with # are treated as comments and are ignored. For more * information about the environment variable file syntax, see Declare default environment * variables in file.

If there are environment variables specified using * the environment parameter in a container definition, they take * precedence over the variables contained within an environment file. If multiple * environment files are specified that contain the same variable, they're * processed from the top down. We recommend that you use unique variable names. * For more information, see Specifying * environment variables in the Amazon Elastic Container Service Developer * Guide.

This parameter is only supported for tasks hosted on Fargate * using the following platform versions:

  • Linux platform version * 1.4.0 or later.

  • Windows platform version * 1.0.0 or later.

See Also:

AWS * API Reference

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

The Amazon Resource Name (ARN) of the Amazon S3 object containing the * environment variable file.

*/ inline const Aws::String& GetValue() const{ return m_value; } /** *

The Amazon Resource Name (ARN) of the Amazon S3 object containing the * environment variable file.

*/ inline bool ValueHasBeenSet() const { return m_valueHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the Amazon S3 object containing the * environment variable file.

*/ inline void SetValue(const Aws::String& value) { m_valueHasBeenSet = true; m_value = value; } /** *

The Amazon Resource Name (ARN) of the Amazon S3 object containing the * environment variable file.

*/ inline void SetValue(Aws::String&& value) { m_valueHasBeenSet = true; m_value = std::move(value); } /** *

The Amazon Resource Name (ARN) of the Amazon S3 object containing the * environment variable file.

*/ inline void SetValue(const char* value) { m_valueHasBeenSet = true; m_value.assign(value); } /** *

The Amazon Resource Name (ARN) of the Amazon S3 object containing the * environment variable file.

*/ inline EnvironmentFile& WithValue(const Aws::String& value) { SetValue(value); return *this;} /** *

The Amazon Resource Name (ARN) of the Amazon S3 object containing the * environment variable file.

*/ inline EnvironmentFile& WithValue(Aws::String&& value) { SetValue(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the Amazon S3 object containing the * environment variable file.

*/ inline EnvironmentFile& WithValue(const char* value) { SetValue(value); return *this;} /** *

The file type to use. The only supported value is s3.

*/ inline const EnvironmentFileType& GetType() const{ return m_type; } /** *

The file type to use. The only supported value is s3.

*/ inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; } /** *

The file type to use. The only supported value is s3.

*/ inline void SetType(const EnvironmentFileType& value) { m_typeHasBeenSet = true; m_type = value; } /** *

The file type to use. The only supported value is s3.

*/ inline void SetType(EnvironmentFileType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); } /** *

The file type to use. The only supported value is s3.

*/ inline EnvironmentFile& WithType(const EnvironmentFileType& value) { SetType(value); return *this;} /** *

The file type to use. The only supported value is s3.

*/ inline EnvironmentFile& WithType(EnvironmentFileType&& value) { SetType(std::move(value)); return *this;} private: Aws::String m_value; bool m_valueHasBeenSet = false; EnvironmentFileType m_type; bool m_typeHasBeenSet = false; }; } // namespace Model } // namespace ECS } // namespace Aws