RepositoryTriggerOptions

class aws_cdk.aws_codecommit.RepositoryTriggerOptions(*, branches=None, custom_data=None, events=None, name=None)

Bases: object

Creates for a repository trigger to an SNS topic or Lambda function.

Parameters:
  • branches (Optional[Sequence[str]]) – The names of the branches in the AWS CodeCommit repository that contain events that you want to include in the trigger. If you don’t specify at least one branch, the trigger applies to all branches.

  • custom_data (Optional[str]) – When an event is triggered, additional information that AWS CodeCommit includes when it sends information to the target.

  • events (Optional[Sequence[RepositoryEventTrigger]]) – The repository events for which AWS CodeCommit sends information to the target, which you specified in the DestinationArn property.If you don’t specify events, the trigger runs for all repository events.

  • name (Optional[str]) – A name for the trigger.Triggers on a repository must have unique names.

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_codecommit as codecommit

repository_trigger_options = codecommit.RepositoryTriggerOptions(
    branches=["branches"],
    custom_data="customData",
    events=[codecommit.RepositoryEventTrigger.ALL],
    name="name"
)

Attributes

branches

The names of the branches in the AWS CodeCommit repository that contain events that you want to include in the trigger.

If you don’t specify at least one branch, the trigger applies to all branches.

custom_data

When an event is triggered, additional information that AWS CodeCommit includes when it sends information to the target.

events

The repository events for which AWS CodeCommit sends information to the target, which you specified in the DestinationArn property.If you don’t specify events, the trigger runs for all repository events.

name

A name for the trigger.Triggers on a repository must have unique names.