Interface CfnProject.IWebhookFilterProperty
WebhookFilter
is a structure of the FilterGroups
property on the AWS CodeBuild Project ProjectTriggers property type that specifies which webhooks trigger an AWS CodeBuild build.
Namespace: Amazon.CDK.AWS.CodeBuild
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IWebhookFilterProperty
Syntax (vb)
Public Interface IWebhookFilterProperty
Remarks
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.
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.CodeBuild;
var webhookFilterProperty = new WebhookFilterProperty {
Pattern = "pattern",
Type = "type",
// the properties below are optional
ExcludeMatchedPattern = false
};
Synopsis
Properties
ExcludeMatchedPattern | Used to indicate that the |
Pattern | For a |
Type | The type of webhook filter. |
Properties
ExcludeMatchedPattern
Used to indicate that the pattern
determines which webhook events do not trigger a build.
virtual object ExcludeMatchedPattern { get; }
Property Value
System.Object
Remarks
If true, then a webhook event that does not match the pattern
triggers a build. If false, then a webhook event that matches the pattern
triggers a build.
Pattern
For a WebHookFilter
that uses EVENT
type, a comma-separated string that specifies one or more events.
string Pattern { get; }
Property Value
System.String
Remarks
For example, the webhook filter PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED
allows all push, pull request created, and pull request updated events to trigger a build.
For a WebHookFilter
that uses any of the other filter types, a regular expression pattern. For example, a WebHookFilter
that uses HEAD_REF
for its type
and the pattern ^refs/heads/
triggers a build when the head reference is a branch with a reference name refs/heads/branch-name
.
Type
The type of webhook filter.
string Type { get; }
Property Value
System.String
Remarks
There are nine webhook filter types: EVENT
, ACTOR_ACCOUNT_ID
, HEAD_REF
, BASE_REF
, FILE_PATH
, COMMIT_MESSAGE
, TAG_NAME
, RELEASE_NAME
, and WORKFLOW_NAME
.
The <code>PULL_REQUEST_REOPENED</code> works with GitHub and GitHub Enterprise only. The <code>RELEASED</code> , <code>PRERELEASED</code> , and <code>WORKFLOW_JOB_QUEUED</code> work with GitHub only.
Works with GitHub and GitHub Enterprise push, GitHub and GitHub Enterprise pull request, Bitbucket push, and Bitbucket pull request events.
Works with pull request events only.
Works with GitHub and Bitbucket events push and pull requests events. Also works with GitHub Enterprise push events, but does not work with GitHub Enterprise pull request events.
Works with GitHub and Bitbucket events push and pull requests events. Also works with GitHub Enterprise push events, but does not work with GitHub Enterprise pull request events.
Works with <code>RELEASED</code> and <code>PRERELEASED</code> events only.
Works with <code>RELEASED</code> and <code>PRERELEASED</code> events only.
Works with <code>WORKFLOW_JOB_QUEUED</code> events only.