CodeCommit / Client / test_repository_triggers
test_repository_triggers#
- CodeCommit.Client.test_repository_triggers(**kwargs)#
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.
See also: AWS API Documentation
Request Syntax
response = client.test_repository_triggers( repositoryName='string', triggers=[ { 'name': 'string', 'destinationArn': 'string', 'customData': 'string', 'branches': [ 'string', ], 'events': [ 'all'|'updateReference'|'createReference'|'deleteReference', ] }, ] )
- Parameters:
repositoryName (string) –
[REQUIRED]
The name of the repository in which to test the triggers.
triggers (list) –
[REQUIRED]
The list of triggers to test.
(dict) –
Information about a trigger for a repository.
name (string) – [REQUIRED]
The name 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).
customData (string) –
Any custom data associated with the trigger to be included in the information sent to the target of the trigger.
branches (list) –
The branches to be included in the trigger configuration. If you specify an empty array, the trigger applies to all branches.
Note
Although no content is required in the array, you must include the array itself.
(string) –
events (list) – [REQUIRED]
The repository events that cause the trigger to run actions in another service, such as sending a notification through Amazon SNS.
Note
The valid value “all” cannot be used with any other values.
(string) –
- Return type:
dict
- Returns:
Response Syntax
{ 'successfulExecutions': [ 'string', ], 'failedExecutions': [ { 'trigger': 'string', 'failureMessage': 'string' }, ] }
Response Structure
(dict) –
Represents the output of a test repository triggers operation.
successfulExecutions (list) –
The list of triggers that were successfully tested. This list provides the names of the triggers that were successfully tested, separated by commas.
(string) –
failedExecutions (list) –
The list of triggers that were not tested. This list provides the names of the triggers that could not be tested, separated by commas.
(dict) –
A trigger failed to run.
trigger (string) –
The name of the trigger that did not run.
failureMessage (string) –
Message information about the trigger that did not run.
Exceptions
CodeCommit.Client.exceptions.RepositoryDoesNotExistException
CodeCommit.Client.exceptions.RepositoryNameRequiredException
CodeCommit.Client.exceptions.InvalidRepositoryNameException
CodeCommit.Client.exceptions.RepositoryTriggersListRequiredException
CodeCommit.Client.exceptions.MaximumRepositoryTriggersExceededException
CodeCommit.Client.exceptions.InvalidRepositoryTriggerNameException
CodeCommit.Client.exceptions.InvalidRepositoryTriggerDestinationArnException
CodeCommit.Client.exceptions.InvalidRepositoryTriggerRegionException
CodeCommit.Client.exceptions.InvalidRepositoryTriggerCustomDataException
CodeCommit.Client.exceptions.MaximumBranchesExceededException
CodeCommit.Client.exceptions.InvalidRepositoryTriggerBranchNameException
CodeCommit.Client.exceptions.InvalidRepositoryTriggerEventsException
CodeCommit.Client.exceptions.RepositoryTriggerNameRequiredException
CodeCommit.Client.exceptions.RepositoryTriggerDestinationArnRequiredException
CodeCommit.Client.exceptions.RepositoryTriggerBranchNameListRequiredException
CodeCommit.Client.exceptions.RepositoryTriggerEventsListRequiredException
CodeCommit.Client.exceptions.EncryptionIntegrityChecksFailedException
CodeCommit.Client.exceptions.EncryptionKeyAccessDeniedException
CodeCommit.Client.exceptions.EncryptionKeyDisabledException
CodeCommit.Client.exceptions.EncryptionKeyNotFoundException
CodeCommit.Client.exceptions.EncryptionKeyUnavailableException