Skip to content
v2.276.0

WebhookFilterRuleProperty Struct ​

The event criteria that specify when a webhook notification is sent to your URL.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_codepipeline as codepipeline } from 'aws-cdk-lib';
const webhookFilterRuleProperty: codepipeline.CfnWebhook.WebhookFilterRuleProperty = {
  jsonPath: 'jsonPath',

  // the properties below are optional
  matchEquals: 'matchEquals',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_codepipeline as codepipeline

webhook_filter_rule_property = codepipeline.CfnWebhook.WebhookFilterRuleProperty(
    json_path="jsonPath",

    # the properties below are optional
    match_equals="matchEquals"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.codepipeline.*;

WebhookFilterRuleProperty webhookFilterRuleProperty = WebhookFilterRuleProperty.builder()
        .jsonPath("jsonPath")

        // the properties below are optional
        .matchEquals("matchEquals")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.CodePipeline;

var webhookFilterRuleProperty = new WebhookFilterRuleProperty {
    JsonPath = "jsonPath",

    // the properties below are optional
    MatchEquals = "matchEquals"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

webhookFilterRuleProperty := &WebhookFilterRuleProperty{
	JsonPath: jsii.String("jsonPath"),

	// the properties below are optional
	MatchEquals: jsii.String("matchEquals"),
}

Properties ​

jsonPathstringjson_pathstrjsonPathStringJsonPathstringJsonPath*stringrequired#
A JsonPath expression that is applied to the body/payload of the webhook.
notes

The value selected by the JsonPath expression must match the value specified in the MatchEquals field. Otherwise, the request is ignored. For more information, see Java JsonPath implementation in GitHub.

matchEqualsoptionalstringmatch_equalsoptionalstrmatchEqualsoptionalStringMatchEqualsoptionalstringMatchEqualsoptional*string#
The value selected by the `JsonPath` expression must match what is supplied in the `MatchEquals` field.
notes

Otherwise, the request is ignored. Properties from the target action configuration can be included as placeholders in this value by surrounding the action configuration key with curly brackets. For example, if the value supplied here is "refs/heads/{Branch}" and the target action has an action configuration property called "Branch" with a value of "main", the MatchEquals value is evaluated as "refs/heads/main". For a list of action configuration properties for built-in action types, see Pipeline Structure Reference Action Requirements .