Package 

Class AWSClient


  • 
    public class AWSClient
    
                        

    AWSClient is an open class that provides default implementations for all Amazon Connect Participant Service (ACPS) API calls. Customers can subclass this to override specific methods for custom routing (e.g., through a backend proxy with certificate pinning).

    Usage patterns:

    • Partial override: Subclass and override only specific methods for logging/monitoring

    • Complete override: Subclass and override all methods for full backend proxy routing

    Example:

    class MyCustomClient : AWSClient() {
        override suspend fun sendMessage(...): Result<SendMessageResult> {
            Log.d("MyClient", "Intercepting sendMessage")
            return super.sendMessage(...) // or route to your backend
        }
    }
    
    val config = GlobalConfig(
        region = Regions.US_WEST_2,
        customAWSClient = MyCustomClient()
    )
    chatSession.configure(config)
    • Constructor Detail

      • AWSClient

        AWSClient()
    • Method Detail

      • configure

         Unit configure(GlobalConfig config)

        Configures the AWS client with the given global configuration.

        Parameters:
        config - The global configuration containing region and other settings.
      • disconnectParticipantConnection

         Result<DisconnectParticipantResult> disconnectParticipantConnection(String connectionToken)

        Disconnects the participant connection for the given connection token.

        Parameters:
        connectionToken - The connection token.
      • sendMessage

         Result<SendMessageResult> sendMessage(String connectionToken, ContentType contentType, String message)

        Sends a message using a connection token.

        Parameters:
        connectionToken - The connection token.
        contentType - The content type of the message.
        message - The message content.
      • sendEvent

         Result<SendEventResult> sendEvent(String connectionToken, ContentType contentType, String content)

        Sends an event using a connection token.

        Parameters:
        connectionToken - The connection token.
        contentType - The content type of the event.
        content - The event content.
      • startAttachmentUpload

         Result<StartAttachmentUploadResult> startAttachmentUpload(String connectionToken, StartAttachmentUploadRequest request)

        Starts an attachment upload using a connection token.

        Parameters:
        connectionToken - The connection token.
        request - The start attachment upload request.
      • completeAttachmentUpload

         Result<CompleteAttachmentUploadResult> completeAttachmentUpload(String connectionToken, CompleteAttachmentUploadRequest request)

        Completes an attachment upload using a connection token.

        Parameters:
        connectionToken - The connection token.
        request - The complete attachment upload request.
      • getAttachment

         Result<GetAttachmentResult> getAttachment(String connectionToken, String attachmentId)

        Retrieves an attachment using a connection token and attachment ID.

        Parameters:
        connectionToken - The connection token.
        attachmentId - The attachment ID.
      • getTranscript

         Result<GetTranscriptResult> getTranscript(GetTranscriptRequest request)

        Retrieves a transcript using a get transcript request.

        Parameters:
        request - The get transcript request.
      • describeView

         Result<View> describeView(String connectionToken, String viewToken)

        Retrieves the view for the specified view token.

        Parameters:
        connectionToken - The connection token.
        viewToken - The view token from an interactive message.