Interface CodeBuildProjectProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
,TargetBaseProps
- All Known Implementing Classes:
CodeBuildProjectProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)",
date="2024-10-11T15:55:59.253Z")
@Stability(Stable)
public interface CodeBuildProjectProps
extends software.amazon.jsii.JsiiSerializable, TargetBaseProps
Customize the CodeBuild Event Target.
Example:
import software.amazon.awscdk.services.codebuild.*; import software.amazon.awscdk.services.codecommit.*; Repository repo = Repository.Builder.create(this, "MyRepo") .repositoryName("aws-cdk-codebuild-events") .build(); Project project = Project.Builder.create(this, "MyProject") .source(Source.codeCommit(CodeCommitSourceProps.builder().repository(repo).build())) .build(); Queue deadLetterQueue = new Queue(this, "DeadLetterQueue"); // trigger a build when a commit is pushed to the repo Rule onCommitRule = repo.onCommit("OnCommit", OnCommitOptions.builder() .target(CodeBuildProject.Builder.create(project) .deadLetterQueue(deadLetterQueue) .build()) .branches(List.of("master")) .build());
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forCodeBuildProjectProps
static final class
An implementation forCodeBuildProjectProps
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
default RuleTargetInput
getEvent()
The event to send to CodeBuild.default IRole
The role to assume before invoking the target (i.e., the codebuild) when the given rule is triggered.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
Methods inherited from interface software.amazon.awscdk.services.events.targets.TargetBaseProps
getDeadLetterQueue, getMaxEventAge, getRetryAttempts
-
Method Details
-
getEvent
The event to send to CodeBuild.This will be the payload for the StartBuild API.
Default: - the entire EventBridge event
-
getEventRole
The role to assume before invoking the target (i.e., the codebuild) when the given rule is triggered.Default: - a new role will be created
-
builder
- Returns:
- a
CodeBuildProjectProps.Builder
ofCodeBuildProjectProps
-