Webhook - AWS CodeBuild
Services or capabilities described in AWS documentation might vary by Region. To see the differences applicable to the AWS European Sovereign Cloud Region, see the AWS European Sovereign Cloud User Guide.

Webhook

Information about a webhook that connects repository events to a build project in AWS CodeBuild.

Contents

Note

In the following list, the required parameters are described first.

branchFilter

A regular expression used to determine which repository branches are built when a webhook is triggered. If the name of a branch matches the regular expression, then it is built. If branchFilter is empty, then all branches are built.

Note

It is recommended that you use filterGroups instead of branchFilter.

Type: String

Required: No

buildType

Specifies the type of build this webhook will trigger.

Note

RUNNER_BUILDKITE_BUILD is only available for NO_SOURCE source type projects configured for Buildkite runner builds. For more information about CodeBuild-hosted Buildkite runner builds, see Tutorial: Configure a CodeBuild-hosted Buildkite runner in the AWS CodeBuild user guide.

Type: String

Valid Values: BUILD | BUILD_BATCH | RUNNER_BUILDKITE_BUILD

Required: No

filterGroups

An array of arrays of WebhookFilter objects used to determine which webhooks are triggered. At least one WebhookFilter in the array must specify EVENT as its type.

For a build to be triggered, at least one filter group in the filterGroups array must pass. For a filter group to pass, each of its filters must pass.

Type: Array of arrays of WebhookFilter objects

Required: No

lastModifiedSecret

A timestamp that indicates the last time a repository's secret token was modified.

Type: Timestamp

Required: No

manualCreation

If manualCreation is true, CodeBuild doesn't create a webhook in GitHub and instead returns payloadUrl and secret values for the webhook. The payloadUrl and secret values in the output can be used to manually create a webhook within GitHub.

Note

manualCreation is only available for GitHub webhooks.

Type: Boolean

Required: No

payloadUrl

The AWS CodeBuild endpoint where webhook events are sent.

Type: String

Length Constraints: Minimum length of 1.

Required: No

pullRequestBuildPolicy

A PullRequestBuildPolicy object that defines comment-based approval requirements for triggering builds on pull requests. This policy helps control when automated builds are executed based on contributor permissions and approval workflows.

Type: PullRequestBuildPolicy object

Required: No

scopeConfiguration

The scope configuration for global or organization webhooks.

Note

Global or organization webhooks are only available for GitHub and Github Enterprise webhooks.

Type: ScopeConfiguration object

Required: No

secret

The secret token of the associated repository.

Note

A Bitbucket webhook does not support secret.

Type: String

Length Constraints: Minimum length of 1.

Required: No

status

The status of the webhook. Valid values include:

  • CREATING: The webhook is being created.

  • CREATE_FAILED: The webhook has failed to create.

  • ACTIVE: The webhook has succeeded and is active.

  • DELETING: The webhook is being deleted.

Type: String

Valid Values: CREATING | CREATE_FAILED | ACTIVE | DELETING

Required: No

statusMessage

A message associated with the status of a webhook.

Type: String

Required: No

url

The URL to the webhook.

Type: String

Length Constraints: Minimum length of 1.

Required: No

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: