batchDisassociateApprovalRuleTemplateFromRepositories method

Future<BatchDisassociateApprovalRuleTemplateFromRepositoriesOutput> batchDisassociateApprovalRuleTemplateFromRepositories({
  1. required String approvalRuleTemplateName,
  2. required List<String> repositoryNames,
})

Removes the association between an approval rule template and one or more specified repositories.

May throw ApprovalRuleTemplateNameRequiredException. May throw InvalidApprovalRuleTemplateNameException. May throw ApprovalRuleTemplateDoesNotExistException. May throw RepositoryNamesRequiredException. May throw MaximumRepositoryNamesExceededException. May throw EncryptionIntegrityChecksFailedException. May throw EncryptionKeyAccessDeniedException. May throw EncryptionKeyDisabledException. May throw EncryptionKeyNotFoundException. May throw EncryptionKeyUnavailableException.

Parameter approvalRuleTemplateName : The name of the template that you want to disassociate from one or more repositories.

Parameter repositoryNames : The repository names that you want to disassociate from the approval rule template.

Implementation

Future<BatchDisassociateApprovalRuleTemplateFromRepositoriesOutput>
    batchDisassociateApprovalRuleTemplateFromRepositories({
  required String approvalRuleTemplateName,
  required List<String> repositoryNames,
}) async {
  ArgumentError.checkNotNull(
      approvalRuleTemplateName, 'approvalRuleTemplateName');
  _s.validateStringLength(
    'approvalRuleTemplateName',
    approvalRuleTemplateName,
    1,
    100,
    isRequired: true,
  );
  ArgumentError.checkNotNull(repositoryNames, 'repositoryNames');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target':
        'CodeCommit_20150413.BatchDisassociateApprovalRuleTemplateFromRepositories'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'approvalRuleTemplateName': approvalRuleTemplateName,
      'repositoryNames': repositoryNames,
    },
  );

  return BatchDisassociateApprovalRuleTemplateFromRepositoriesOutput.fromJson(
      jsonResponse.body);
}