disassociateApprovalRuleTemplateFromRepository method
Removes the association between a template and a repository so that approval rules based on the template are not automatically created when pull requests are created in the specified repository. This does not delete any approval rules previously created for pull requests through the template association.
May throw ApprovalRuleTemplateNameRequiredException. May throw InvalidApprovalRuleTemplateNameException. May throw ApprovalRuleTemplateDoesNotExistException. May throw RepositoryNameRequiredException. May throw InvalidRepositoryNameException. May throw RepositoryDoesNotExistException. May throw EncryptionIntegrityChecksFailedException. May throw EncryptionKeyAccessDeniedException. May throw EncryptionKeyDisabledException. May throw EncryptionKeyNotFoundException. May throw EncryptionKeyUnavailableException.
Parameter approvalRuleTemplateName
:
The name of the approval rule template to disassociate from a specified
repository.
Parameter repositoryName
:
The name of the repository you want to disassociate from the template.
Implementation
Future<void> disassociateApprovalRuleTemplateFromRepository({
required String approvalRuleTemplateName,
required String repositoryName,
}) async {
ArgumentError.checkNotNull(
approvalRuleTemplateName, 'approvalRuleTemplateName');
_s.validateStringLength(
'approvalRuleTemplateName',
approvalRuleTemplateName,
1,
100,
isRequired: true,
);
ArgumentError.checkNotNull(repositoryName, 'repositoryName');
_s.validateStringLength(
'repositoryName',
repositoryName,
1,
100,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target':
'CodeCommit_20150413.DisassociateApprovalRuleTemplateFromRepository'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'approvalRuleTemplateName': approvalRuleTemplateName,
'repositoryName': repositoryName,
},
);
}