deleteLayout method

Future<void> deleteLayout({
  1. required String domainId,
  2. required String layoutId,
})

Deletes a layout from a cases template. You can delete up to 100 layouts per domain.

After a layout is deleted:

  • You can still retrieve the layout by calling GetLayout.
  • You cannot update a deleted layout by calling UpdateLayout; it throws a ValidationException.
  • Deleted layouts are not included in the ListLayouts 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 layoutId : The unique identifier of the layout.

Implementation

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