Class EnvVar.Builder

  • All Implemented Interfaces:
    software.amazon.jsii.Builder<EnvVar>
    Enclosing interface:
    EnvVar

    @Stability(Stable)
    public static final class EnvVar.Builder
    extends Object
    implements software.amazon.jsii.Builder<EnvVar>
    A builder for EnvVar
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • name

        @Stability(Stable)
        public EnvVar.Builder name​(String name)
        Sets the value of EnvVar.getName()
        Parameters:
        name - Name of the environment variable. This parameter is required. Must be a C_IDENTIFIER.
        Returns:
        this
      • value

        @Stability(Stable)
        public EnvVar.Builder value​(String value)
        Sets the value of EnvVar.getValue()
        Parameters:
        value - Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".
        Returns:
        this
      • valueFrom

        @Stability(Stable)
        public EnvVar.Builder valueFrom​(EnvVarSource valueFrom)
        Sets the value of EnvVar.getValueFrom()
        Parameters:
        valueFrom - Source for the environment variable's value. Cannot be used if value is not empty.
        Returns:
        this
      • build

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