updateAttachedFilesConfiguration method

Future<UpdateAttachedFilesConfigurationResponse> updateAttachedFilesConfiguration({
  1. required AttachmentScope attachmentScope,
  2. required String instanceId,
  3. ExtensionConfiguration? extensionConfiguration,
  4. int? maximumSizeLimitInBytes,
})

Updates the attached files configuration for the specified Connect Customer instance and attachment scope.

If no instance-specific configuration exists, this operation creates one. Partial updates are supported—only specified fields are updated, while unspecified fields retain their current values.

May throw AccessDeniedException. May throw InternalServiceException. May throw InvalidParameterException. May throw ResourceNotFoundException. May throw ThrottlingException.

Parameter attachmentScope : The scope of the attachment. Valid values are EMAIL, CHAT, CASE, and TASK.

Parameter instanceId : The identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

Parameter extensionConfiguration : The configuration for allowed file extensions.

Parameter maximumSizeLimitInBytes : The maximum size limit for attached files in bytes. The minimum value is 1 and the maximum value is 104857600 (100 MB).

Implementation

Future<UpdateAttachedFilesConfigurationResponse>
    updateAttachedFilesConfiguration({
  required AttachmentScope attachmentScope,
  required String instanceId,
  ExtensionConfiguration? extensionConfiguration,
  int? maximumSizeLimitInBytes,
}) async {
  _s.validateNumRange(
    'maximumSizeLimitInBytes',
    maximumSizeLimitInBytes,
    1,
    104857600,
  );
  final $payload = <String, dynamic>{
    if (extensionConfiguration != null)
      'ExtensionConfiguration': extensionConfiguration,
    if (maximumSizeLimitInBytes != null)
      'MaximumSizeLimitInBytes': maximumSizeLimitInBytes,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/attached-files-configurations/${Uri.encodeComponent(instanceId)}/${Uri.encodeComponent(attachmentScope.value)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateAttachedFilesConfigurationResponse.fromJson(response);
}