updateDomainLayout method

Future<UpdateDomainLayoutResponse> updateDomainLayout({
  1. required String domainName,
  2. required String layoutDefinitionName,
  3. String? description,
  4. String? displayName,
  5. bool? isDefault,
  6. String? layout,
  7. LayoutType? layoutType,
})

Updates the layout used to view data for a specific domain. This API can only be invoked from the Amazon Connect admin website.

May throw AccessDeniedException. May throw BadRequestException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException.

Parameter domainName : The unique name of the domain.

Parameter layoutDefinitionName : The unique name of the layout.

Parameter description : The description of the layout

Parameter displayName : The display name of the layout

Parameter isDefault : If set to true for a layout, this layout will be used by default to view data. If set to false, then the layout will not be used by default, but it can be used to view data by explicitly selecting it in the console.

Parameter layout : A customizable layout that can be used to view data under a Customer Profiles domain.

Parameter layoutType : The type of layout that can be used to view data under a Customer Profiles domain.

Implementation

Future<UpdateDomainLayoutResponse> updateDomainLayout({
  required String domainName,
  required String layoutDefinitionName,
  String? description,
  String? displayName,
  bool? isDefault,
  String? layout,
  LayoutType? layoutType,
}) async {
  final $payload = <String, dynamic>{
    if (description != null) 'Description': description,
    if (displayName != null) 'DisplayName': displayName,
    if (isDefault != null) 'IsDefault': isDefault,
    if (layout != null) 'Layout': layout,
    if (layoutType != null) 'LayoutType': layoutType.value,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/domains/${Uri.encodeComponent(domainName)}/layouts/${Uri.encodeComponent(layoutDefinitionName)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateDomainLayoutResponse.fromJson(response);
}