createDomainLayout method

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

Creates the layout 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 description : The description of the layout

Parameter displayName : The display name of the layout

Parameter domainName : The unique name of the domain.

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

Parameter layoutDefinitionName : The unique name of the layout.

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

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 tags : The tags used to organize, track, or control access for this resource.

Implementation

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