Interface CodeBuildProjectProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable, TargetBaseProps
All Known Implementing Classes:
CodeBuildProjectProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-18T17:54:17.382Z") @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());
 
  • Method Details

    • getEvent

      @Stability(Stable) @Nullable default RuleTargetInput getEvent()
      The event to send to CodeBuild.

      This will be the payload for the StartBuild API.

      Default: - the entire EventBridge event

    • getEventRole

      @Stability(Stable) @Nullable default IRole 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

      @Stability(Stable) static CodeBuildProjectProps.Builder builder()
      Returns:
      a CodeBuildProjectProps.Builder of CodeBuildProjectProps