# RepositoryTriggerProperty

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](https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-repository-email.html) .

- Source: Generated code
- Type last changed: v2.93.0 · 23 Aug 2023

## 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',
};
```

## Properties

- `branches`: 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.

- `customData`: string — Any custom data associated with the trigger to be included in the information sent to the target of the trigger.

- `destinationArn`: string (required) — The ARN of the resource that is the target for a trigger (for example, the ARN of a topic in Amazon SNS).

- `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.

- `name`: string (required) — The name of the trigger.
