deleteTemplate method

Future<void> deleteTemplate({
  1. required String domainId,
  2. required String templateId,
})

Deletes a cases template. You can delete up to 100 templates per domain.

After a cases template is deleted:

  • You can still retrieve the template by calling GetTemplate.
  • You cannot update the template.
  • You cannot create a case by using the deleted template.
  • Deleted templates are not included in the ListTemplates response.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter domainId : The unique identifier of the Cases domain.

Parameter templateId : A unique identifier of a template.

Implementation

Future<void> deleteTemplate({
  required String domainId,
  required String templateId,
}) async {
  final response = await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri:
        '/domains/${Uri.encodeComponent(domainId)}/templates/${Uri.encodeComponent(templateId)}',
    exceptionFnMap: _exceptionFns,
  );
}