AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Information about an environment variable for a build project or a build.

Inheritance Hierarchy

System.Object
  Amazon.CodeBuild.Model.EnvironmentVariable

Namespace: Amazon.CodeBuild.Model
Assembly: AWSSDK.CodeBuild.dll
Version: 3.x.y.z

Syntax

C#
public class EnvironmentVariable

The EnvironmentVariable type exposes the following members

Constructors

NameDescription
Public Method EnvironmentVariable()

Properties

NameTypeDescription
Public Property Name System.String

Gets and sets the property Name.

The name or key of the environment variable.

Public Property Type Amazon.CodeBuild.EnvironmentVariableType

Gets and sets the property Type.

The type of environment variable. Valid values include:

  • PARAMETER_STORE: An environment variable stored in Systems Manager Parameter Store. For environment variables of this type, specify the name of the parameter as the value of the EnvironmentVariable. The parameter value will be substituted for the name at runtime. You can also define Parameter Store environment variables in the buildspec. To learn how to do so, see env/parameter-store in the CodeBuild User Guide.

  • PLAINTEXT: An environment variable in plain text format. This is the default value.

  • SECRETS_MANAGER: An environment variable stored in Secrets Manager. For environment variables of this type, specify the name of the secret as the value of the EnvironmentVariable. The secret value will be substituted for the name at runtime. You can also define Secrets Manager environment variables in the buildspec. To learn how to do so, see env/secrets-manager in the CodeBuild User Guide.

Public Property Value System.String

Gets and sets the property Value.

The value of the environment variable.

We strongly discourage the use of PLAINTEXT environment variables to store sensitive values, especially Amazon Web Services secret key IDs. PLAINTEXT environment variables can be displayed in plain text using the CodeBuild console and the CLI. For sensitive values, we recommend you use an environment variable of type PARAMETER_STORE or SECRETS_MANAGER.

Version Information

.NET Core App:
Supported in: 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.5, 4.0, 3.5