updateLayout method

Future<void> updateLayout({
  1. required String domainId,
  2. required String layoutId,
  3. LayoutContent? content,
  4. String? name,
})

Updates the attributes of an existing layout.

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

A ValidationException is returned when you add non-existent fieldIds to a layout.

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

Parameter domainId : The unique identifier of the Cases domain.

Parameter layoutId : The unique identifier of the layout.

Parameter content : Information about which fields will be present in the layout, the order of the fields.

Parameter name : The name of the layout. It must be unique per domain.

Implementation

Future<void> updateLayout({
  required String domainId,
  required String layoutId,
  LayoutContent? content,
  String? name,
}) async {
  final $payload = <String, dynamic>{
    if (content != null) 'content': content,
    if (name != null) 'name': name,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/domains/${Uri.encodeComponent(domainId)}/layouts/${Uri.encodeComponent(layoutId)}',
    exceptionFnMap: _exceptionFns,
  );
}