EnvironmentVariable
Information about an environment variable for a build project or a build.
Contents
Note
In the following list, the required parameters are described first.
- name
-
The name or key of the environment variable.
Type: String
Length Constraints: Minimum length of 1.
Required: Yes
- value
-
The value of the environment variable.
Important
We strongly discourage the use of
PLAINTEXTenvironment variables to store sensitive values, especially AWS secret key IDs.PLAINTEXTenvironment variables can be displayed in plain text using the AWS CodeBuild console and the AWS CLI. For sensitive values, we recommend you use an environment variable of typePARAMETER_STOREorSECRETS_MANAGER.Type: String
Required: Yes
- 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 thevalueof 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 AWS CodeBuild User Guide. -
PLAINTEXT: An environment variable in plain text format. This is the default value. -
SECRETS_MANAGER: An environment variable stored in AWS Secrets Manager. For environment variables of this type, specify the name of the secret as thevalueof the EnvironmentVariable. The secret value will be substituted for the name at runtime. You can also define AWS Secrets Manager environment variables in the buildspec. To learn how to do so, see env/secrets-manager in the AWS CodeBuild User Guide.
Type: String
Valid Values:
PLAINTEXT | PARAMETER_STORE | SECRETS_MANAGERRequired: No
-
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: