Skip to content
v2.278.0

GitConfigurationProperty Struct ​

A type of trigger configuration for Git-based source actions.

You can specify the Git configuration trigger type for all third-party Git-based source actions that are supported by the CodeStarSourceConnection action type.

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 gitConfigurationProperty: codepipeline.CfnPipeline.GitConfigurationProperty = {
  sourceActionName: 'sourceActionName',

  // the properties below are optional
  pullRequest: [{
    branches: {
      excludes: ['excludes'],
      includes: ['includes'],
    },
    events: ['events'],
    filePaths: {
      excludes: ['excludes'],
      includes: ['includes'],
    },
  }],
  push: [{
    branches: {
      excludes: ['excludes'],
      includes: ['includes'],
    },
    filePaths: {
      excludes: ['excludes'],
      includes: ['includes'],
    },
    tags: {
      excludes: ['excludes'],
      includes: ['includes'],
    },
  }],
};
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_configuration_property = codepipeline.CfnPipeline.GitConfigurationProperty(
    source_action_name="sourceActionName",

    # the properties below are optional
    pull_request=[codepipeline.CfnPipeline.GitPullRequestFilterProperty(
        branches=codepipeline.CfnPipeline.GitBranchFilterCriteriaProperty(
            excludes=["excludes"],
            includes=["includes"]
        ),
        events=["events"],
        file_paths=codepipeline.CfnPipeline.GitFilePathFilterCriteriaProperty(
            excludes=["excludes"],
            includes=["includes"]
        )
    )],
    push=[codepipeline.CfnPipeline.GitPushFilterProperty(
        branches=codepipeline.CfnPipeline.GitBranchFilterCriteriaProperty(
            excludes=["excludes"],
            includes=["includes"]
        ),
        file_paths=codepipeline.CfnPipeline.GitFilePathFilterCriteriaProperty(
            excludes=["excludes"],
            includes=["includes"]
        ),
        tags=codepipeline.CfnPipeline.GitTagFilterCriteriaProperty(
            excludes=["excludes"],
            includes=["includes"]
        )
    )]
)
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.*;

GitConfigurationProperty gitConfigurationProperty = GitConfigurationProperty.builder()
        .sourceActionName("sourceActionName")

        // the properties below are optional
        .pullRequest(List.of(GitPullRequestFilterProperty.builder()
                .branches(GitBranchFilterCriteriaProperty.builder()
                        .excludes(List.of("excludes"))
                        .includes(List.of("includes"))
                        .build())
                .events(List.of("events"))
                .filePaths(GitFilePathFilterCriteriaProperty.builder()
                        .excludes(List.of("excludes"))
                        .includes(List.of("includes"))
                        .build())
                .build()))
        .push(List.of(GitPushFilterProperty.builder()
                .branches(GitBranchFilterCriteriaProperty.builder()
                        .excludes(List.of("excludes"))
                        .includes(List.of("includes"))
                        .build())
                .filePaths(GitFilePathFilterCriteriaProperty.builder()
                        .excludes(List.of("excludes"))
                        .includes(List.of("includes"))
                        .build())
                .tags(GitTagFilterCriteriaProperty.builder()
                        .excludes(List.of("excludes"))
                        .includes(List.of("includes"))
                        .build())
                .build()))
        .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 gitConfigurationProperty = new GitConfigurationProperty {
    SourceActionName = "sourceActionName",

    // the properties below are optional
    PullRequest = new [] { new GitPullRequestFilterProperty {
        Branches = new GitBranchFilterCriteriaProperty {
            Excludes = new [] { "excludes" },
            Includes = new [] { "includes" }
        },
        Events = new [] { "events" },
        FilePaths = new GitFilePathFilterCriteriaProperty {
            Excludes = new [] { "excludes" },
            Includes = new [] { "includes" }
        }
    } },
    Push = new [] { new GitPushFilterProperty {
        Branches = new GitBranchFilterCriteriaProperty {
            Excludes = new [] { "excludes" },
            Includes = new [] { "includes" }
        },
        FilePaths = new GitFilePathFilterCriteriaProperty {
            Excludes = new [] { "excludes" },
            Includes = new [] { "includes" }
        },
        Tags = new GitTagFilterCriteriaProperty {
            Excludes = new [] { "excludes" },
            Includes = new [] { "includes" }
        }
    } }
};
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"

gitConfigurationProperty := &GitConfigurationProperty{
	SourceActionName: jsii.String("sourceActionName"),

	// the properties below are optional
	PullRequest: []interface{}{
		&GitPullRequestFilterProperty{
			Branches: &GitBranchFilterCriteriaProperty{
				Excludes: []*string{
					jsii.String("excludes"),
				},
				Includes: []*string{
					jsii.String("includes"),
				},
			},
			Events: []*string{
				jsii.String("events"),
			},
			FilePaths: &GitFilePathFilterCriteriaProperty{
				Excludes: []*string{
					jsii.String("excludes"),
				},
				Includes: []*string{
					jsii.String("includes"),
				},
			},
		},
	},
	Push: []interface{}{
		&GitPushFilterProperty{
			Branches: &GitBranchFilterCriteriaProperty{
				Excludes: []*string{
					jsii.String("excludes"),
				},
				Includes: []*string{
					jsii.String("includes"),
				},
			},
			FilePaths: &GitFilePathFilterCriteriaProperty{
				Excludes: []*string{
					jsii.String("excludes"),
				},
				Includes: []*string{
					jsii.String("includes"),
				},
			},
			Tags: &GitTagFilterCriteriaProperty{
				Excludes: []*string{
					jsii.String("excludes"),
				},
				Includes: []*string{
					jsii.String("includes"),
				},
			},
		},
	},
}

Properties ​

pullRequestoptionalIResolvable | IResolvable | CfnPipeline.GitPullRequestFilterProperty[]pull_requestoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, GitPullRequestFilterProperty]]]pullRequestoptionalIResolvablePullRequestoptionalIResolvablePullRequestoptionalinterface{} #
The field where the repository event that will start the pipeline is specified as pull requests.
pushoptionalIResolvable | IResolvable | CfnPipeline.GitPushFilterProperty[]pushoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, GitPushFilterProperty]]]pushoptionalIResolvablePushoptionalIResolvablePushoptionalinterface{} #
The field where the repository event that will start the pipeline, such as pushing Git tags, is specified with details.
sourceActionNamestringsource_action_namestrsourceActionNameStringSourceActionNamestringSourceActionName*string required #
The name of the pipeline source action where the trigger configuration, such as Git tags, is specified.

The trigger configuration will start the pipeline upon the specified change only.

You can only specify one trigger configuration per source action.