Class: AWSCDK::Codepipeline::CfnWebhook::WebhookFilterRuleProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
codepipeline/cfn_webhook.rb

Overview

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json_path:, match_equals: nil) ⇒ WebhookFilterRuleProperty

Returns a new instance of WebhookFilterRuleProperty.

Parameters:

  • json_path (String)

    A JsonPath expression that is applied to the body/payload of the webhook.

  • match_equals (String, nil) (defaults to: nil)

    The value selected by the JsonPath expression must match what is supplied in the MatchEquals field.



697
698
699
700
701
702
# File 'codepipeline/cfn_webhook.rb', line 697

def initialize(json_path:, match_equals: nil)
  @json_path = json_path
  Jsii::Type.check_type(@json_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "jsonPath")
  @match_equals = match_equals
  Jsii::Type.check_type(@match_equals, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "matchEquals") unless @match_equals.nil?
end

Instance Attribute Details

#json_pathString (readonly)

A JsonPath expression that is applied to the body/payload of the webhook.

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.



710
711
712
# File 'codepipeline/cfn_webhook.rb', line 710

def json_path
  @json_path
end

#match_equalsString? (readonly)

The value selected by the JsonPath expression must match what is supplied in the MatchEquals field.

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 .



717
718
719
# File 'codepipeline/cfn_webhook.rb', line 717

def match_equals
  @match_equals
end

Class Method Details

.jsii_propertiesObject



719
720
721
722
723
724
# File 'codepipeline/cfn_webhook.rb', line 719

def self.jsii_properties
  {
    :json_path => "jsonPath",
    :match_equals => "matchEquals",
  }
end

Instance Method Details

#to_jsiiObject



726
727
728
729
730
731
732
733
# File 'codepipeline/cfn_webhook.rb', line 726

def to_jsii
  result = {}
  result.merge!({
    "jsonPath" => @json_path,
    "matchEquals" => @match_equals,
  })
  result.compact
end