Skip to content
v2.274.0

ProjectTriggersProperty Struct ​

ProjectTriggers is a property of the AWS CodeBuild Project resource that specifies webhooks that trigger an AWS CodeBuild build.

The Webhook feature isn't available in AWS CloudFormation for GitHub Enterprise projects. Use the AWS CLI or AWS CodeBuild console to create the webhook.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_codebuild as codebuild } from 'aws-cdk-lib';
const projectTriggersProperty: codebuild.CfnProject.ProjectTriggersProperty = {
  buildType: 'buildType',
  filterGroups: [[{
    pattern: 'pattern',
    type: 'type',

    // the properties below are optional
    excludeMatchedPattern: false,
  }]],
  pullRequestBuildPolicy: {
    requiresCommentApproval: 'requiresCommentApproval',

    // the properties below are optional
    approverRoles: ['approverRoles'],
  },
  scopeConfiguration: {
    name: 'name',

    // the properties below are optional
    domain: 'domain',
    scope: 'scope',
  },
  webhook: false,
};

Properties ​

buildTypeoptionalstringbuild_typeoptionalstrbuildTypeoptionalStringBuildTypeoptionalstringBuildTypeoptional*string#
Specifies the type of build this webhook will trigger. Allowed values are:.
  • BUILD - A single build
  • BUILD_BATCH - A batch build
filterGroupsoptionalIResolvable | IResolvable | IResolvable | CfnProject.WebhookFilterProperty[][]filter_groupsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, typing.List[typing.Union[IResolvable, WebhookFilterProperty]]]]]filterGroupsoptionalIResolvableFilterGroupsoptionalIResolvableFilterGroupsoptionalinterface{}#
A list of lists of `WebhookFilter` objects used to determine which webhook events are triggered.

At least one WebhookFilter in the array must specify EVENT as its type.

pullRequestBuildPolicyoptionalIResolvable | CfnProject.PullRequestBuildPolicyPropertypull_request_build_policyoptionaltyping.Union[IResolvable, PullRequestBuildPolicyProperty]pullRequestBuildPolicyoptionalIResolvablePullRequestBuildPolicyoptionalIResolvablePullRequestBuildPolicyoptionalinterface{}#
scopeConfigurationoptionalIResolvable | CfnProject.ScopeConfigurationPropertyscope_configurationoptionaltyping.Union[IResolvable, ScopeConfigurationProperty]scopeConfigurationoptionalIResolvableScopeConfigurationoptionalIResolvableScopeConfigurationoptionalinterface{}#
Contains configuration information about the scope for a webhook.
webhookoptionalboolean | IResolvablewebhookoptionaltyping.Union[bool, IResolvable]webhookoptionalBooleanWebhookoptionalboolWebhookoptionalinterface{}#
Specifies whether or not to begin automatically rebuilding the source code every time a code change is pushed to the repository.