Class FilterGroup
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
Every condition in a given FilterGroup must be true in order for the whole group to be true.
You construct instances of it by calling the inEventOf(software.amazon.awscdk.services.codebuild.EventAction...)
static factory method,
and then calling various `andXyz` instance methods to create modified instances of it
(this class is immutable).
You pass instances of this class to the `webhookFilters` property when constructing a source.
Example:
ISource gitHubSource = Source.gitHub(GitHubSourceProps.builder() .owner("awslabs") .repo("aws-cdk") .webhook(true) // optional, default: true if `webhookFilters` were provided, false otherwise .webhookTriggersBatchBuild(true) // optional, default is false .webhookFilters(List.of(FilterGroup.inEventOf(EventAction.PUSH).andBranchIs("master").andCommitMessageIs("the commit message"))) .build());
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
-
Constructor Summary
ModifierConstructorDescriptionprotected
FilterGroup
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
FilterGroup
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionandActorAccountIs
(String pattern) Create a new FilterGroup with an added condition: the account ID of the actor initiating the event must match the given pattern.andActorAccountIsNot
(String pattern) Create a new FilterGroup with an added condition: the account ID of the actor initiating the event must not match the given pattern.andBaseBranchIs
(String branchName) Create a new FilterGroup with an added condition: the Pull Request that is the source of the event must target the given base branch.andBaseBranchIsNot
(String branchName) Create a new FilterGroup with an added condition: the Pull Request that is the source of the event must not target the given base branch.andBaseRefIs
(String pattern) Create a new FilterGroup with an added condition: the Pull Request that is the source of the event must target the given Git reference.andBaseRefIsNot
(String pattern) Create a new FilterGroup with an added condition: the Pull Request that is the source of the event must not target the given Git reference.andBranchIs
(String branchName) Create a new FilterGroup with an added condition: the event must affect the given branch.andBranchIsNot
(String branchName) Create a new FilterGroup with an added condition: the event must not affect the given branch.andCommitMessageIs
(String commitMessage) Create a new FilterGroup with an added condition: the event must affect a head commit with the given message.andCommitMessageIsNot
(String commitMessage) Create a new FilterGroup with an added condition: the event must not affect a head commit with the given message.andFilePathIs
(String pattern) Create a new FilterGroup with an added condition: the push that is the source of the event must affect a file that matches the given pattern.andFilePathIsNot
(String pattern) Create a new FilterGroup with an added condition: the push that is the source of the event must not affect a file that matches the given pattern.andHeadRefIs
(String pattern) Create a new FilterGroup with an added condition: the event must affect a Git reference (ie., a branch or a tag) that matches the given pattern.andHeadRefIsNot
(String pattern) Create a new FilterGroup with an added condition: the event must not affect a Git reference (ie., a branch or a tag) that matches the given pattern.Create a new FilterGroup with an added condition: the event must affect the given tag.andTagIsNot
(String tagName) Create a new FilterGroup with an added condition: the event must not affect the given tag.static FilterGroup
inEventOf
(@NotNull EventAction... actions) Creates a new event FilterGroup that triggers on any of the provided actions.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
FilterGroup
protected FilterGroup(software.amazon.jsii.JsiiObjectRef objRef) -
FilterGroup
protected FilterGroup(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
-
-
Method Details
-
inEventOf
@Stability(Stable) @NotNull public static FilterGroup inEventOf(@NotNull @NotNull EventAction... actions) Creates a new event FilterGroup that triggers on any of the provided actions.- Parameters:
actions
- the actions to trigger the webhook on. This parameter is required.
-
andActorAccountIs
Create a new FilterGroup with an added condition: the account ID of the actor initiating the event must match the given pattern.- Parameters:
pattern
- a regular expression. This parameter is required.
-
andActorAccountIsNot
Create a new FilterGroup with an added condition: the account ID of the actor initiating the event must not match the given pattern.- Parameters:
pattern
- a regular expression. This parameter is required.
-
andBaseBranchIs
Create a new FilterGroup with an added condition: the Pull Request that is the source of the event must target the given base branch.Note that you cannot use this method if this Group contains the
PUSH
event action.- Parameters:
branchName
- the name of the branch (can be a regular expression). This parameter is required.
-
andBaseBranchIsNot
Create a new FilterGroup with an added condition: the Pull Request that is the source of the event must not target the given base branch.Note that you cannot use this method if this Group contains the
PUSH
event action.- Parameters:
branchName
- the name of the branch (can be a regular expression). This parameter is required.
-
andBaseRefIs
Create a new FilterGroup with an added condition: the Pull Request that is the source of the event must target the given Git reference.Note that you cannot use this method if this Group contains the
PUSH
event action.- Parameters:
pattern
- a regular expression. This parameter is required.
-
andBaseRefIsNot
Create a new FilterGroup with an added condition: the Pull Request that is the source of the event must not target the given Git reference.Note that you cannot use this method if this Group contains the
PUSH
event action.- Parameters:
pattern
- a regular expression. This parameter is required.
-
andBranchIs
Create a new FilterGroup with an added condition: the event must affect the given branch.- Parameters:
branchName
- the name of the branch (can be a regular expression). This parameter is required.
-
andBranchIsNot
Create a new FilterGroup with an added condition: the event must not affect the given branch.- Parameters:
branchName
- the name of the branch (can be a regular expression). This parameter is required.
-
andCommitMessageIs
Create a new FilterGroup with an added condition: the event must affect a head commit with the given message.- Parameters:
commitMessage
- the commit message (can be a regular expression). This parameter is required.
-
andCommitMessageIsNot
Create a new FilterGroup with an added condition: the event must not affect a head commit with the given message.- Parameters:
commitMessage
- the commit message (can be a regular expression). This parameter is required.
-
andFilePathIs
Create a new FilterGroup with an added condition: the push that is the source of the event must affect a file that matches the given pattern.Note that you can only use this method if this Group contains only the
PUSH
event action, and only for GitHub, Bitbucket and GitHubEnterprise sources.- Parameters:
pattern
- a regular expression. This parameter is required.
-
andFilePathIsNot
Create a new FilterGroup with an added condition: the push that is the source of the event must not affect a file that matches the given pattern.Note that you can only use this method if this Group contains only the
PUSH
event action, and only for GitHub, Bitbucket and GitHubEnterprise sources.- Parameters:
pattern
- a regular expression. This parameter is required.
-
andHeadRefIs
Create a new FilterGroup with an added condition: the event must affect a Git reference (ie., a branch or a tag) that matches the given pattern.- Parameters:
pattern
- a regular expression. This parameter is required.
-
andHeadRefIsNot
Create a new FilterGroup with an added condition: the event must not affect a Git reference (ie., a branch or a tag) that matches the given pattern.- Parameters:
pattern
- a regular expression. This parameter is required.
-
andTagIs
Create a new FilterGroup with an added condition: the event must affect the given tag.- Parameters:
tagName
- the name of the tag (can be a regular expression). This parameter is required.
-
andTagIsNot
Create a new FilterGroup with an added condition: the event must not affect the given tag.- Parameters:
tagName
- the name of the tag (can be a regular expression). This parameter is required.
-