Skip to main content

repository_triggers

Creates, updates, deletes, gets or lists a repository_triggers resource.

Overview

Namerepository_triggers
TypeResource
Idaws.codecommit.repository_triggers

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
configuration_idstringThe system-generated unique ID for the trigger.
triggersarrayThe JSON block of configuration information for each trigger.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_repository_triggersselectregionGets information about triggers configured for a repository.
put_repository_triggersreplaceregion, repositoryName, triggersReplaces all triggers for a repository. Used to create or delete triggers.
test_repository_triggersexecregion, repositoryName, triggersTests the functionality of repository triggers by sending information to the trigger target. If real data is available in the repository, the test sends data from the last commit. If no data is available, sample data is generated.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Gets information about triggers configured for a repository.

SELECT
configuration_id,
triggers
FROM aws.codecommit.repository_triggers
WHERE region = '{{ region }}' -- required
;

REPLACE examples

Replaces all triggers for a repository. Used to create or delete triggers.

REPLACE aws.codecommit.repository_triggers
SET
repositoryName = '{{ repositoryName }}',
triggers = '{{ triggers }}'
WHERE
region = '{{ region }}' --required
AND repositoryName = '{{ repositoryName }}' --required
AND triggers = '{{ triggers }}' --required
RETURNING
configuration_id;

Lifecycle Methods

Tests the functionality of repository triggers by sending information to the trigger target. If real data is available in the repository, the test sends data from the last commit. If no data is available, sample data is generated.

EXEC aws.codecommit.repository_triggers.test_repository_triggers
@region='{{ region }}' --required
@@json=
'{
"repositoryName": "{{ repositoryName }}",
"triggers": "{{ triggers }}"
}'
;