Skip to content
v2.278.0

GitPushFilter Struct ​

Git push filter for trigger.

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 gitPushFilter: codepipeline.GitPushFilter = {
  branchesExcludes: ['branchesExcludes'],
  branchesIncludes: ['branchesIncludes'],
  filePathsExcludes: ['filePathsExcludes'],
  filePathsIncludes: ['filePathsIncludes'],
  tagsExcludes: ['tagsExcludes'],
  tagsIncludes: ['tagsIncludes'],
};
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

git_push_filter = codepipeline.GitPushFilter(
    branches_excludes=["branchesExcludes"],
    branches_includes=["branchesIncludes"],
    file_paths_excludes=["filePathsExcludes"],
    file_paths_includes=["filePathsIncludes"],
    tags_excludes=["tagsExcludes"],
    tags_includes=["tagsIncludes"]
)
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.*;

GitPushFilter gitPushFilter = GitPushFilter.builder()
        .branchesExcludes(List.of("branchesExcludes"))
        .branchesIncludes(List.of("branchesIncludes"))
        .filePathsExcludes(List.of("filePathsExcludes"))
        .filePathsIncludes(List.of("filePathsIncludes"))
        .tagsExcludes(List.of("tagsExcludes"))
        .tagsIncludes(List.of("tagsIncludes"))
        .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 gitPushFilter = new GitPushFilter {
    BranchesExcludes = new [] { "branchesExcludes" },
    BranchesIncludes = new [] { "branchesIncludes" },
    FilePathsExcludes = new [] { "filePathsExcludes" },
    FilePathsIncludes = new [] { "filePathsIncludes" },
    TagsExcludes = new [] { "tagsExcludes" },
    TagsIncludes = new [] { "tagsIncludes" }
};
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"

gitPushFilter := &GitPushFilter{
	BranchesExcludes: []*string{
		jsii.String("branchesExcludes"),
	},
	BranchesIncludes: []*string{
		jsii.String("branchesIncludes"),
	},
	FilePathsExcludes: []*string{
		jsii.String("filePathsExcludes"),
	},
	FilePathsIncludes: []*string{
		jsii.String("filePathsIncludes"),
	},
	TagsExcludes: []*string{
		jsii.String("tagsExcludes"),
	},
	TagsIncludes: []*string{
		jsii.String("tagsIncludes"),
	},
}

Properties ​

branchesExcludesoptionalstring[]branches_excludesoptionaltyping.List[str]branchesExcludesoptionalList<String>BranchesExcludesoptionalstring[]BranchesExcludesoptional*[]*string #
The list of patterns of Git branches that, when pull request events occurs, are to be excluded from starting the pipeline.

Default: no branches.

You can filter with glob patterns. The branchesExcludes takes priority over the branchesIncludes.

Maximum length of this array is 8.

branchesIncludesoptionalstring[]branches_includesoptionaltyping.List[str]branchesIncludesoptionalList<String>BranchesIncludesoptionalstring[]BranchesIncludesoptional*[]*string #
The list of patterns of Git branches that, when pull request events occurs, are to be included as criteria that starts the pipeline.

Default: no branches.

You can filter with glob patterns. The branchesExcludes takes priority over the branchesIncludes.

Maximum length of this array is 8.

filePathsExcludesoptionalstring[]file_paths_excludesoptionaltyping.List[str]filePathsExcludesoptionalList<String>FilePathsExcludesoptionalstring[]FilePathsExcludesoptional*[]*string #
The list of patterns of Git repository file paths that, when pull request events occurs, are to be excluded from starting the pipeline.

Default: no filePaths.

You can filter with glob patterns. The filePathsExcludes takes priority over the filePathsIncludes.

Maximum length of this array is 8.

filePathsIncludesoptionalstring[]file_paths_includesoptionaltyping.List[str]filePathsIncludesoptionalList<String>FilePathsIncludesoptionalstring[]FilePathsIncludesoptional*[]*string #
The list of patterns of Git repository file paths that, when pull request events occurs, are to be included as criteria that starts the pipeline.

Default: no filePaths.

You can filter with glob patterns. The filePathsExcludes takes priority over the filePathsIncludes.

Maximum length of this array is 8.

tagsExcludesoptionalstring[]tags_excludesoptionaltyping.List[str]tagsExcludesoptionalList<String>TagsExcludesoptionalstring[]TagsExcludesoptional*[]*string #
The list of patterns of Git tags that, when pushed, are to be excluded from starting the pipeline.

Default: no tags.

You can filter with glob patterns. The tagsExcludes takes priority over the tagsIncludes.

Maximum length of this array is 8.

tagsIncludesoptionalstring[]tags_includesoptionaltyping.List[str]tagsIncludesoptionalList<String>TagsIncludesoptionalstring[]TagsIncludesoptional*[]*string #
The list of patterns of Git tags that, when pushed, are to be included as criteria that starts the pipeline.

Default: no tags.

You can filter with glob patterns. The tagsExcludes takes priority over the tagsIncludes.

Maximum length of this array is 8.