Amazon CodeBuild · JSON Structure

Amazon Codebuild Environment Variable Structure

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

Type: object Properties: 3 Required: 2
AmazonCI/CDBuildContinuous IntegrationDevOpsTesting

EnvironmentVariable is a JSON Structure definition published by Amazon CodeBuild, describing 3 properties, of which 2 are required. It conforms to the https://json-structure.org/meta/core/v0/# meta-schema.

Properties

name value type

Meta-schema: https://json-structure.org/meta/core/v0/#

JSON Structure

Raw ↑
{
  "$schema": "https://json-structure.org/meta/core/v0/#",
  "$id": "https://raw.githubusercontent.com/api-evangelist/amazon-codebuild/refs/heads/main/json-structure/amazon-codebuild-environment-variable-structure.json",
  "name": "EnvironmentVariable",
  "description": "Information about an environment variable for a build project or a build.",
  "type": "object",
  "properties": {
    "name": {
      "allOf": [
        {
          "$ref": "#/components/schemas/NonEmptyString"
        },
        {
          "description": "The name or key of the environment variable."
        }
      ]
    },
    "value": {
      "allOf": [
        {
          "$ref": "#/components/schemas/String"
        },
        {
          "description": "<p>The value of the environment variable.</p> <important> <p>We strongly discourage the use of <code>PLAINTEXT</code> environment variables to store sensitive values, especially Amazon Web Services secret key IDs and secret access keys. <code>PLAINTEXT</code> 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 <code>PARAMETER_STORE</code> or <code>SECRETS_MANAGER</code>. </p> </important>"
        }
      ]
    },
    "type": {
      "allOf": [
        {
          "$ref": "#/components/schemas/EnvironmentVariableType"
        },
        {
          "description": "<p>The type of environment variable. Valid values include:</p> <ul> <li> <p> <code>PARAMETER_STORE</code>: An environment variable stored in Systems Manager Parameter Store. To learn how to specify a parameter store environment variable, see <a href=\"https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#build-spec.env.parameter-store\">env/parameter-store</a> in the <i>CodeBuild User Guide</i>.</p> </li> <li> <p> <code>PLAINTEXT</code>: An environment variable in plain text format. This is the default value.</p> </li> <li> <p> <code>SECRETS_MANAGER</code>: An environment variable stored in Secrets Manager. To learn how to specify a secrets manager environment variable, see <a href=\"https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#build-spec.env.secrets-manager\">env/secrets-manager</a> in the <i>CodeBuild User Guide</i>.</p> </li> </ul>"
        }
      ]
    }
  },
  "required": [
    "name",
    "value"
  ]
}