@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:39.322Z") @Stability(value=Stable) public class CodeBuildProject extends software.amazon.jsii.JsiiObject implements IRuleTarget
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());
| Modifier and Type | Class and Description |
|---|---|
static class |
CodeBuildProject.Builder
A fluent builder for
CodeBuildProject. |
software.amazon.jsii.JsiiObject.InitializationModeIRuleTarget.Jsii$Default, IRuleTarget.Jsii$Proxy| Modifier | Constructor and Description |
|---|---|
|
CodeBuildProject(IProject project) |
|
CodeBuildProject(IProject project,
CodeBuildProjectProps props) |
protected |
CodeBuildProject(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CodeBuildProject(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
RuleTargetConfig |
bind(IRule _rule)
Allows using build projects as event rule targets.
|
RuleTargetConfig |
bind(IRule _rule,
String _id)
Allows using build projects as event rule targets.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected CodeBuildProject(software.amazon.jsii.JsiiObjectRef objRef)
protected CodeBuildProject(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CodeBuildProject(@NotNull
IProject project,
@Nullable
CodeBuildProjectProps props)
project - This parameter is required.props - @Stability(value=Stable)
public CodeBuildProject(@NotNull
IProject project)
project - This parameter is required.@Stability(value=Stable) @NotNull public RuleTargetConfig bind(@NotNull IRule _rule, @Nullable String _id)
bind in interface IRuleTarget_rule - This parameter is required._id - @Stability(value=Stable) @NotNull public RuleTargetConfig bind(@NotNull IRule _rule)
bind in interface IRuleTarget_rule - This parameter is required.Copyright © 2022. All rights reserved.