Skip to content
v2.277.0

RepositoryTriggerProperty Struct ​

Information about a trigger for a repository.

If you want to receive notifications about repository events, consider using notifications instead of triggers. For more information, see Configuring notifications for repository events .

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_codecommit as codecommit } from 'aws-cdk-lib';
const repositoryTriggerProperty: codecommit.CfnRepository.RepositoryTriggerProperty = {
  destinationArn: 'destinationArn',
  events: ['events'],
  name: 'name',

  // the properties below are optional
  branches: ['branches'],
  customData: 'customData',
};
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_codecommit as codecommit

repository_trigger_property = codecommit.CfnRepository.RepositoryTriggerProperty(
    destination_arn="destinationArn",
    events=["events"],
    name="name",

    # the properties below are optional
    branches=["branches"],
    custom_data="customData"
)
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.codecommit.*;

RepositoryTriggerProperty repositoryTriggerProperty = RepositoryTriggerProperty.builder()
        .destinationArn("destinationArn")
        .events(List.of("events"))
        .name("name")

        // the properties below are optional
        .branches(List.of("branches"))
        .customData("customData")
        .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.CodeCommit;

var repositoryTriggerProperty = new RepositoryTriggerProperty {
    DestinationArn = "destinationArn",
    Events = new [] { "events" },
    Name = "name",

    // the properties below are optional
    Branches = new [] { "branches" },
    CustomData = "customData"
};
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"

repositoryTriggerProperty := &RepositoryTriggerProperty{
	DestinationArn: jsii.String("destinationArn"),
	Events: []*string{
		jsii.String("events"),
	},
	Name: jsii.String("name"),

	// the properties below are optional
	Branches: []*string{
		jsii.String("branches"),
	},
	CustomData: jsii.String("customData"),
}

Properties ​

branchesoptionalstring[]branchesoptionaltyping.List[str]branchesoptionalList<String>Branchesoptionalstring[]Branchesoptional*[]*string #
The branches to be included in the trigger configuration.

If you specify an empty array, the trigger applies to all branches.

Although no content is required in the array, you must include the array itself.

customDataoptionalstringcustom_dataoptionalstrcustomDataoptionalStringCustomDataoptionalstringCustomDataoptional*string #
Any custom data associated with the trigger to be included in the information sent to the target of the trigger.
destinationArnstringdestination_arnstrdestinationArnStringDestinationArnstringDestinationArn*string required #
The ARN of the resource that is the target for a trigger (for example, the ARN of a topic in Amazon SNS).
eventsstring[]eventstyping.List[str]eventsList<String>Eventsstring[]Events*[]*string required #
The repository events that cause the trigger to run actions in another service, such as sending a notification through Amazon SNS.

The valid value "all" cannot be used with any other values.

namestringnamestrnameStringNamestringName*string required #
The name of the trigger.