putRepositoryTriggers method
- required String repositoryName,
- required List<
RepositoryTrigger> triggers,
Replaces all triggers for a repository. Used to create or delete triggers.
May throw RepositoryDoesNotExistException. May throw RepositoryNameRequiredException. May throw InvalidRepositoryNameException. May throw RepositoryTriggersListRequiredException. May throw MaximumRepositoryTriggersExceededException. May throw InvalidRepositoryTriggerNameException. May throw InvalidRepositoryTriggerDestinationArnException. May throw InvalidRepositoryTriggerRegionException. May throw InvalidRepositoryTriggerCustomDataException. May throw MaximumBranchesExceededException. May throw InvalidRepositoryTriggerBranchNameException. May throw InvalidRepositoryTriggerEventsException. May throw RepositoryTriggerNameRequiredException. May throw RepositoryTriggerDestinationArnRequiredException. May throw RepositoryTriggerBranchNameListRequiredException. May throw RepositoryTriggerEventsListRequiredException. May throw EncryptionIntegrityChecksFailedException. May throw EncryptionKeyAccessDeniedException. May throw EncryptionKeyDisabledException. May throw EncryptionKeyNotFoundException. May throw EncryptionKeyUnavailableException.
Parameter repositoryName
:
The name of the repository where you want to create or update the trigger.
Parameter triggers
:
The JSON block of configuration information for each trigger.
Implementation
Future<PutRepositoryTriggersOutput> putRepositoryTriggers({
required String repositoryName,
required List<RepositoryTrigger> triggers,
}) async {
ArgumentError.checkNotNull(repositoryName, 'repositoryName');
_s.validateStringLength(
'repositoryName',
repositoryName,
1,
100,
isRequired: true,
);
ArgumentError.checkNotNull(triggers, 'triggers');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'CodeCommit_20150413.PutRepositoryTriggers'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'repositoryName': repositoryName,
'triggers': triggers,
},
);
return PutRepositoryTriggersOutput.fromJson(jsonResponse.body);
}