Class BuildEnvironment.Builder
java.lang.Object
software.amazon.awscdk.services.codebuild.BuildEnvironment.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<BuildEnvironment>
- Enclosing interface:
BuildEnvironment
@Stability(Stable)
public static final class BuildEnvironment.Builder
extends Object
implements software.amazon.jsii.Builder<BuildEnvironment>
A builder for
BuildEnvironment
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.buildImage
(IBuildImage buildImage) Sets the value ofBuildEnvironment.getBuildImage()
certificate
(BuildEnvironmentCertificate certificate) Sets the value ofBuildEnvironment.getCertificate()
computeType
(ComputeType computeType) Sets the value ofBuildEnvironment.getComputeType()
environmentVariables
(Map<String, ? extends BuildEnvironmentVariable> environmentVariables) Sets the value ofBuildEnvironment.getEnvironmentVariables()
privileged
(Boolean privileged) Sets the value ofBuildEnvironment.getPrivileged()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
buildImage
Sets the value ofBuildEnvironment.getBuildImage()
- Parameters:
buildImage
- The image used for the builds.- Returns:
this
-
certificate
@Stability(Stable) public BuildEnvironment.Builder certificate(BuildEnvironmentCertificate certificate) Sets the value ofBuildEnvironment.getCertificate()
- Parameters:
certificate
- The location of the PEM-encoded certificate for the build project.- Returns:
this
-
computeType
Sets the value ofBuildEnvironment.getComputeType()
- Parameters:
computeType
- The type of compute to use for this build. See theComputeType
enum for the possible values.- Returns:
this
-
environmentVariables
@Stability(Stable) public BuildEnvironment.Builder environmentVariables(Map<String, ? extends BuildEnvironmentVariable> environmentVariables) Sets the value ofBuildEnvironment.getEnvironmentVariables()
- Parameters:
environmentVariables
- The environment variables that your builds can use.- Returns:
this
-
privileged
Sets the value ofBuildEnvironment.getPrivileged()
- Parameters:
privileged
- Indicates how the project builds Docker images. Specify true to enable running the Docker daemon inside a Docker container. This value must be set to true only if this build project will be used to build Docker images, and the specified build environment image is not one provided by AWS CodeBuild with Docker support. Otherwise, all associated builds that attempt to interact with the Docker daemon will fail.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<BuildEnvironment>
- Returns:
- a new instance of
BuildEnvironment
- Throws:
NullPointerException
- if any required attribute was not provided
-