Skip to content
v2.274.0

CodeBuildStartBuild Class ​

Use an AWS CodeBuild as a target for AWS EventBridge Scheduler.

Example ​

ts
import * as codebuild from 'aws-cdk-lib/aws-codebuild';

declare const project: codebuild.Project;

new Schedule(this, 'Schedule', {
  schedule: ScheduleExpression.rate(Duration.minutes(60)),
  target: new targets.CodeBuildStartBuild(project),
});
python
import aws_cdk.aws_codebuild as codebuild

# project: codebuild.Project


Schedule(self, "Schedule",
    schedule=ScheduleExpression.rate(Duration.minutes(60)),
    target=targets.CodeBuildStartBuild(project)
)
java
import software.amazon.awscdk.services.codebuild.*;

Project project;


Schedule.Builder.create(this, "Schedule")
        .schedule(ScheduleExpression.rate(Duration.minutes(60)))
        .target(new CodeBuildStartBuild(project))
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
using Amazon.CDK.AWS.CodeBuild;

Project project;


new Schedule(this, "Schedule", new ScheduleProps {
    Schedule = ScheduleExpression.Rate(Duration.Minutes(60)),
    Target = new CodeBuildStartBuild(project)
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
import codebuild "github.com/aws/aws-cdk-go/awscdk"

var project Project


awscdk.NewSchedule(this, jsii.String("Schedule"), &ScheduleProps{
	Schedule: awscdk.ScheduleExpression_Rate(awscdk.Duration_Minutes(jsii.Number(60))),
	Target: targets.NewCodeBuildStartBuild(project),
})

Initializer ​

ts
new CodeBuildStartBuild(project: IProjectRef, props?: ScheduleTargetBaseProps)
python
CodeBuildStartBuild(project: IProjectRef, props: typing.Optional[ScheduleTargetBaseProps] = None)
java
new CodeBuildStartBuild(IProjectRef project, ScheduleTargetBaseProps props)
csharp
new CodeBuildStartBuild(IProjectRef project, ScheduleTargetBaseProps? props = null)
go
NewCodeBuildStartBuild(Project IProjectRef, Props ScheduleTargetBaseProps)

Methods ​

bind(schedule: ISchedule): ScheduleTargetConfigdef bind(self, schedule: ISchedule) -> ScheduleTargetConfigpublic ScheduleTargetConfig bind(ISchedule schedule)public ScheduleTargetConfig Bind(ISchedule schedule)func Bind(Schedule ISchedule) ScheduleTargetConfig#
Create a return a Schedule Target Configuration for the given schedule.
returns

Returns: a Schedule Target Configuration