Interface ICodeBuildProjectProps
Customize the CodeBuild Event Target.
Inherited Members
Namespace: Amazon.CDK.AWS.Events.Targets
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface ICodeBuildProjectProps : ITargetBaseProps
Syntax (vb)
Public Interface ICodeBuildProjectProps
Inherits ITargetBaseProps
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.CodeBuild;
using Amazon.CDK.AWS.CodeCommit;
var repo = new Repository(this, "MyRepo", new RepositoryProps {
RepositoryName = "aws-cdk-codebuild-events"
});
var project = new Project(this, "MyProject", new ProjectProps {
Source = Source.CodeCommit(new CodeCommitSourceProps { Repository = repo })
});
var deadLetterQueue = new Queue(this, "DeadLetterQueue");
// trigger a build when a commit is pushed to the repo
var onCommitRule = repo.OnCommit("OnCommit", new OnCommitOptions {
Target = new CodeBuildProject(project, new CodeBuildProjectProps {
DeadLetterQueue = deadLetterQueue
}),
Branches = new [] { "master" }
});
Synopsis
Properties
Event | The event to send to CodeBuild. |
EventRole | The role to assume before invoking the target (i.e., the codebuild) when the given rule is triggered. |
Properties
Event
The event to send to CodeBuild.
virtual RuleTargetInput Event { get; }
Property Value
Remarks
This will be the payload for the StartBuild API.
Default: - the entire EventBridge event
EventRole
The role to assume before invoking the target (i.e., the codebuild) when the given rule is triggered.
virtual IRole EventRole { get; }
Property Value
Remarks
Default: - a new role will be created