Package org.cdk8s.plus25.k8s
Class EnvVar.Builder
- java.lang.Object
-
- org.cdk8s.plus25.k8s.EnvVar.Builder
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EnvVarbuild()Builds the configured instance.EnvVar.Buildername(String name)Sets the value ofEnvVar.getName()EnvVar.Buildervalue(String value)Sets the value ofEnvVar.getValue()EnvVar.BuildervalueFrom(EnvVarSource valueFrom)Sets the value ofEnvVar.getValueFrom()
-
-
-
Method Detail
-
name
@Stability(Stable) public EnvVar.Builder name(String name)
Sets the value ofEnvVar.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 ofEnvVar.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 ofEnvVar.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:
buildin interfacesoftware.amazon.jsii.Builder<EnvVar>- Returns:
- a new instance of
EnvVar - Throws:
NullPointerException- if any required attribute was not provided
-
-