updateWebAppCustomization method

Future<UpdateWebAppCustomizationResponse> updateWebAppCustomization({
  1. required String webAppId,
  2. Uint8List? faviconFile,
  3. Uint8List? logoFile,
  4. String? title,
})

Assigns new customization properties to a web app. You can modify the icon file, logo file, and title.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServiceError. May throw InvalidRequestException. May throw ResourceNotFoundException. May throw ThrottlingException.

Parameter webAppId : Provide the identifier of the web app that you are updating.

Parameter faviconFile : Specify an icon file data string (in base64 encoding).

Parameter logoFile : Specify logo file data string (in base64 encoding).

Parameter title : Provide an updated title.

Implementation

Future<UpdateWebAppCustomizationResponse> updateWebAppCustomization({
  required String webAppId,
  Uint8List? faviconFile,
  Uint8List? logoFile,
  String? title,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'TransferService.UpdateWebAppCustomization'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'WebAppId': webAppId,
      if (faviconFile != null) 'FaviconFile': base64Encode(faviconFile),
      if (logoFile != null) 'LogoFile': base64Encode(logoFile),
      if (title != null) 'Title': title,
    },
  );

  return UpdateWebAppCustomizationResponse.fromJson(jsonResponse.body);
}