Package software.amazon.awscdk.pipelines
Interface CodeBuildOptions
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CodeBuildOptions.Jsii$Proxy
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:49.781Z")
@Stability(Stable)
public interface CodeBuildOptions
extends software.amazon.jsii.JsiiSerializable
Options for customizing a single CodeBuild project.
Example:
Vpc vpc; SecurityGroup mySecurityGroup; CodePipeline.Builder.create(this, "Pipeline") // Standard CodePipeline properties .synth(ShellStep.Builder.create("Synth") .input(CodePipelineSource.connection("my-org/my-app", "main", ConnectionSourceOptions.builder() .connectionArn("arn:aws:codestar-connections:us-east-1:222222222222:connection/7d2469ff-514a-4e4f-9003-5ca4a43cdc41") .build())) .commands(List.of("npm ci", "npm run build", "npx cdk synth")) .build()) // Defaults for all CodeBuild projects .codeBuildDefaults(CodeBuildOptions.builder() // Prepend commands and configuration to all projects .partialBuildSpec(BuildSpec.fromObject(Map.of( "version", "0.2"))) // Control the build environment .buildEnvironment(BuildEnvironment.builder() .computeType(ComputeType.LARGE) .build()) // Control Elastic Network Interface creation .vpc(vpc) .subnetSelection(SubnetSelection.builder().subnetType(SubnetType.PRIVATE_WITH_NAT).build()) .securityGroups(List.of(mySecurityGroup)) // Additional policy statements for the execution role .rolePolicy(List.of( PolicyStatement.Builder.create().build())) .build()) .synthCodeBuildDefaults(CodeBuildOptions.builder().build()) .assetPublishingCodeBuildDefaults(CodeBuildOptions.builder().build()) .selfMutationCodeBuildDefaults(CodeBuildOptions.builder().build()) .build();
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forCodeBuildOptions
static final class
An implementation forCodeBuildOptions
-
Method Summary
Modifier and TypeMethodDescriptionstatic CodeBuildOptions.Builder
builder()
default BuildEnvironment
Partial build environment, will be combined with other build environments that apply.default BuildSpec
Partial buildspec, will be combined with other buildspecs that apply.default List<PolicyStatement>
Policy statements to add to role.default List<ISecurityGroup>
Which security group(s) to associate with the project network interfaces.default SubnetSelection
Which subnets to use.default Duration
The number of minutes after which AWS CodeBuild stops the build if it's not complete.default IVpc
getVpc()
The VPC where to create the CodeBuild network interfaces in.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getBuildEnvironment
Partial build environment, will be combined with other build environments that apply.Default: - Non-privileged build, SMALL instance, LinuxBuildImage.STANDARD_5_0
-
getPartialBuildSpec
Partial buildspec, will be combined with other buildspecs that apply.The BuildSpec must be available inline--it cannot reference a file on disk.
Default: - No initial BuildSpec
-
getRolePolicy
Policy statements to add to role.Default: - No policy statements added to CodeBuild Project Role
-
getSecurityGroups
Which security group(s) to associate with the project network interfaces.Only used if 'vpc' is supplied.
Default: - Security group will be automatically created.
-
getSubnetSelection
Which subnets to use.Only used if 'vpc' is supplied.
Default: - All private subnets.
-
getTimeout
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.
Default: Duration.hours(1)
-
getVpc
The VPC where to create the CodeBuild network interfaces in.Default: - No VPC
-
builder
- Returns:
- a
CodeBuildOptions.Builder
ofCodeBuildOptions
-