UNPKG

1.17 kBTypeScriptView Raw
1import * as codebuild from '@aws-cdk/aws-codebuild';
2import * as events from '@aws-cdk/aws-events';
3import * as iam from '@aws-cdk/aws-iam';
4import { TargetBaseProps } from './util';
5/**
6 * Customize the CodeBuild Event Target
7 */
8export interface CodeBuildProjectProps extends TargetBaseProps {
9 /**
10 * The role to assume before invoking the target
11 * (i.e., the codebuild) when the given rule is triggered.
12 *
13 * @default - a new role will be created
14 */
15 readonly eventRole?: iam.IRole;
16 /**
17 * The event to send to CodeBuild
18 *
19 * This will be the payload for the StartBuild API.
20 *
21 * @default - the entire EventBridge event
22 */
23 readonly event?: events.RuleTargetInput;
24}
25/**
26 * Start a CodeBuild build when an Amazon EventBridge rule is triggered.
27 */
28export declare class CodeBuildProject implements events.IRuleTarget {
29 private readonly project;
30 private readonly props;
31 constructor(project: codebuild.IProject, props?: CodeBuildProjectProps);
32 /**
33 * Allows using build projects as event rule targets.
34 */
35 bind(_rule: events.IRule, _id?: string): events.RuleTargetConfig;
36}