disassociateApprovalRuleTemplateFromRepository method

Future<void> disassociateApprovalRuleTemplateFromRepository({
  1. required String approvalRuleTemplateName,
  2. required String repositoryName,
})

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 ApprovalRuleTemplateDoesNotExistException. May throw ApprovalRuleTemplateNameRequiredException. May throw EncryptionIntegrityChecksFailedException. May throw EncryptionKeyAccessDeniedException. May throw EncryptionKeyDisabledException. May throw EncryptionKeyNotFoundException. May throw EncryptionKeyUnavailableException. May throw InvalidApprovalRuleTemplateNameException. May throw InvalidRepositoryNameException. May throw RepositoryDoesNotExistException. May throw RepositoryNameRequiredException.

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 {
  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,
    },
  );
}