CodeBuildStartBuild Class
Use an AWS CodeBuild as a target for AWS EventBridge Scheduler.
Example
python
import aws_cdk.aws_codebuild as codebuild
# project: codebuild.Project
Schedule(self, "Schedule",
schedule=ScheduleExpression.rate(Duration.minutes(60)),
target=targets.CodeBuildStartBuild(project)
)
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