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
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.buildEnvironment
(BuildEnvironment buildEnvironment) Sets the value ofCodeBuildOptions.getBuildEnvironment()
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
-
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:
build
in interfacesoftware.amazon.jsii.Builder<CodeBuildOptions>
- Returns:
- a new instance of
CodeBuildOptions
- Throws:
NullPointerException
- if any required attribute was not provided
-