Class CfnProject.EnvironmentVariableProperty.Builder

java.lang.Object
software.amazon.awscdk.services.codebuild.CfnProject.EnvironmentVariableProperty.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<CfnProject.EnvironmentVariableProperty>
Enclosing interface:
CfnProject.EnvironmentVariableProperty

@Stability(Stable) public static final class CfnProject.EnvironmentVariableProperty.Builder extends Object implements software.amazon.jsii.Builder<CfnProject.EnvironmentVariableProperty>
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • name

      @Stability(Stable) public CfnProject.EnvironmentVariableProperty.Builder name(String name)
      Parameters:
      name - The name or key of the environment variable. This parameter is required.
      Returns:
      this
    • value

      @Stability(Stable) public CfnProject.EnvironmentVariableProperty.Builder value(String value)
      Parameters:
      value - The value of the environment variable. This parameter is required.

      We strongly discourage the use of PLAINTEXT environment variables to store sensitive values, especially AWS secret key IDs and secret access keys. PLAINTEXT environment 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 type PARAMETER_STORE or SECRETS_MANAGER .

      Returns:
      this
    • type

      @Stability(Stable) public CfnProject.EnvironmentVariableProperty.Builder type(String type)
      Parameters:
      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 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 the value of 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 .
      Returns:
      this
    • build

      @Stability(Stable) public CfnProject.EnvironmentVariableProperty build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<CfnProject.EnvironmentVariableProperty>
      Returns:
      a new instance of CfnProject.EnvironmentVariableProperty
      Throws:
      NullPointerException - if any required attribute was not provided