Interface BuildEnvironmentVariable
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
BuildEnvironmentVariable.Jsii$Proxy
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-12-27T17:01:58.778Z")
@Stability(Stable)
public interface BuildEnvironmentVariable
extends software.amazon.jsii.JsiiSerializable
Example:
// later: PipelineProject project; Artifact sourceOutput = new Artifact(); CodeBuildAction buildAction = CodeBuildAction.Builder.create() .actionName("Build1") .input(sourceOutput) .project(PipelineProject.Builder.create(this, "Project") .buildSpec(BuildSpec.fromObject(Map.of( "version", "0.2", "env", Map.of( "exported-variables", List.of("MY_VAR")), "phases", Map.of( "build", Map.of( "commands", "export MY_VAR=\"some value\""))))) .build()) .variablesNamespace("MyNamespace") .build(); CodeBuildAction.Builder.create() .actionName("CodeBuild") .project(project) .input(sourceOutput) .environmentVariables(Map.of( "MyVar", BuildEnvironmentVariable.builder() .value(buildAction.variable("MY_VAR")) .build())) .build();
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forBuildEnvironmentVariable
static final class
An implementation forBuildEnvironmentVariable
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
default BuildEnvironmentVariableType
getType()
The type of environment variable.getValue()
The value of the environment variable.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getValue
The value of the environment variable.For plain-text variables (the default), this is the literal value of variable. For SSM parameter variables, pass the name of the parameter here (
parameterName
property ofIParameter
). For SecretsManager variables secrets, pass either the secret name (secretName
property ofISecret
) or the secret ARN (secretArn
property ofISecret
) here, along with optional SecretsManager qualifiers separated by ':', like the JSON key, or the version or stage (see https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#build-spec.env.secrets-manager for details). -
getType
The type of environment variable.Default: PlainText
-
builder
- Returns:
- a
BuildEnvironmentVariable.Builder
ofBuildEnvironmentVariable
-