Package software.amazon.awscdk.pipelines
Class CodeBuildOptions.Builder
java.lang.Object
software.amazon.awscdk.pipelines.CodeBuildOptions.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CodeBuildOptions>
- Enclosing interface:
CodeBuildOptions
@Stability(Stable)
public static final class CodeBuildOptions.Builder
extends Object
implements software.amazon.jsii.Builder<CodeBuildOptions>
A builder for
CodeBuildOptions-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.buildEnvironment(BuildEnvironment buildEnvironment) Sets the value ofCodeBuildOptions.getBuildEnvironment()Sets the value ofCodeBuildOptions.getCache()fileSystemLocations(List<? extends IFileSystemLocation> fileSystemLocations) Sets the value ofCodeBuildOptions.getFileSystemLocations()logging(LoggingOptions logging) Sets the value ofCodeBuildOptions.getLogging()partialBuildSpec(BuildSpec partialBuildSpec) Sets the value ofCodeBuildOptions.getPartialBuildSpec()rolePolicy(List<? extends PolicyStatement> rolePolicy) Sets the value ofCodeBuildOptions.getRolePolicy()securityGroups(List<? extends ISecurityGroup> securityGroups) Sets the value ofCodeBuildOptions.getSecurityGroups()subnetSelection(SubnetSelection subnetSelection) Sets the value ofCodeBuildOptions.getSubnetSelection()Sets the value ofCodeBuildOptions.getTimeout()Sets the value ofCodeBuildOptions.getVpc()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
buildEnvironment
@Stability(Stable) public CodeBuildOptions.Builder buildEnvironment(BuildEnvironment buildEnvironment) Sets the value ofCodeBuildOptions.getBuildEnvironment()- Parameters:
buildEnvironment- Partial build environment, will be combined with other build environments that apply.- Returns:
this
-
cache
Sets the value ofCodeBuildOptions.getCache()- Parameters:
cache- Caching strategy to use.- Returns:
this
-
fileSystemLocations
@Stability(Stable) public CodeBuildOptions.Builder fileSystemLocations(List<? extends IFileSystemLocation> fileSystemLocations) Sets the value ofCodeBuildOptions.getFileSystemLocations()- Parameters:
fileSystemLocations- ProjectFileSystemLocation objects for CodeBuild build projects. A ProjectFileSystemLocation object specifies the identifier, location, mountOptions, mountPoint, and type of a file system created using Amazon Elastic File System. Requires a vpc to be set and privileged to be set to true.- Returns:
this
-
logging
Sets the value ofCodeBuildOptions.getLogging()- Parameters:
logging- Information about logs for CodeBuild projects. A CodeBuild project can create logs in Amazon CloudWatch Logs, an S3 bucket, or both.- Returns:
this
-
partialBuildSpec
Sets the value ofCodeBuildOptions.getPartialBuildSpec()- Parameters:
partialBuildSpec- Partial buildspec, will be combined with other buildspecs that apply. The BuildSpec must be available inline--it cannot reference a file on disk.- Returns:
this
-
rolePolicy
@Stability(Stable) public CodeBuildOptions.Builder rolePolicy(List<? extends PolicyStatement> rolePolicy) Sets the value ofCodeBuildOptions.getRolePolicy()- Parameters:
rolePolicy- Policy statements to add to role.- Returns:
this
-
securityGroups
@Stability(Stable) public CodeBuildOptions.Builder securityGroups(List<? extends ISecurityGroup> securityGroups) Sets the value ofCodeBuildOptions.getSecurityGroups()- Parameters:
securityGroups- Which security group(s) to associate with the project network interfaces. Only used if 'vpc' is supplied.- Returns:
this
-
subnetSelection
Sets the value ofCodeBuildOptions.getSubnetSelection()- Parameters:
subnetSelection- Which subnets to use. Only used if 'vpc' is supplied.- Returns:
this
-
timeout
Sets the value ofCodeBuildOptions.getTimeout()- Parameters:
timeout- The number of minutes after which AWS CodeBuild stops the build if it's not complete. For valid values, see the timeoutInMinutes field in the AWS CodeBuild User Guide.- Returns:
this
-
vpc
Sets the value ofCodeBuildOptions.getVpc()- Parameters:
vpc- The VPC where to create the CodeBuild network interfaces in.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CodeBuildOptions>- Returns:
- a new instance of
CodeBuildOptions - Throws:
NullPointerException- if any required attribute was not provided
-