我在哪里可以在 aws cdk 中指定 codebuild 项目属性?

Where can I specify codebuild project properties in aws cdk?

我正在从 cloudformation 迁移到 aws cdk,我在 codebuild 项目中有以下配置。在 CDK 中,如何指定这些属性,如 TriggersBadgeEnabled?

我正在查看此文档 https://docs.aws.amazon.com/cdk/api/latest/docs/aws-codebuild-readme.html 但找不到任何我可以使用的字段。

CodeBuildProjectDeployment:
    Type: AWS::CodeBuild::Project
    ...
    Properties:
      TimeoutInMinutes: 10
      BadgeEnabled: true
      Triggers:
        !If
          - ShouldAddWebHook
          - Webhook: true
            FilterGroups:
              - - Pattern: PUSH,PULL_REQUEST_CREATED,PULL_REQUEST_UPDATED,PULL_REQUEST_MERGED
                  Type: EVENT
          - !Ref "AWS::NoValue"

Triggers 属性 特定于 GitHub。在 CDK 中,您使用 GitHubSourceProps:

进行设置

Construction properties for {@link GitHubSource} and {@link GitHubEnterpriseSource}.