Class CodeBuildProject
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.events.targets.CodeBuildProject
- All Implemented Interfaces:
IRuleTarget
,software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)",
date="2024-10-04T00:39:32.635Z")
@Stability(Stable)
public class CodeBuildProject
extends software.amazon.jsii.JsiiObject
implements IRuleTarget
Start a CodeBuild build when an Amazon EventBridge rule is triggered.
Example:
import software.amazon.awscdk.services.sns.*; import software.amazon.awscdk.services.events.targets.*; Repository repo; PipelineProject project; Topic myTopic; // starts a CodeBuild project when a commit is pushed to the "main" branch of the repo repo.onCommit("CommitToMain", OnCommitOptions.builder() .target(new CodeBuildProject(project)) .branches(List.of("main")) .build()); // publishes a message to an Amazon SNS topic when a comment is made on a pull request Rule rule = repo.onCommentOnPullRequest("CommentOnPullRequest", OnEventOptions.builder() .target(new SnsTopic(myTopic)) .build());
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.events.IRuleTarget
IRuleTarget.Jsii$Default, IRuleTarget.Jsii$Proxy
-
Constructor Summary
ModifierConstructorDescriptionCodeBuildProject
(IProject project) CodeBuildProject
(IProject project, CodeBuildProjectProps props) protected
CodeBuildProject
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CodeBuildProject
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionAllows using build projects as event rule targets.Allows using build projects as event rule targets.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
CodeBuildProject
protected CodeBuildProject(software.amazon.jsii.JsiiObjectRef objRef) -
CodeBuildProject
protected CodeBuildProject(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CodeBuildProject
@Stability(Stable) public CodeBuildProject(@NotNull IProject project, @Nullable CodeBuildProjectProps props) - Parameters:
project
- This parameter is required.props
-
-
CodeBuildProject
- Parameters:
project
- This parameter is required.
-
-
Method Details
-
bind
@Stability(Stable) @NotNull public RuleTargetConfig bind(@NotNull IRule _rule, @Nullable String _id) Allows using build projects as event rule targets.- Specified by:
bind
in interfaceIRuleTarget
- Parameters:
_rule
- This parameter is required._id
-
-
bind
Allows using build projects as event rule targets.- Specified by:
bind
in interfaceIRuleTarget
- Parameters:
_rule
- This parameter is required.
-