@Generated(value="software.amazon.awssdk:codegen") @ThreadSafe public interface ConnectParticipantAsyncClient extends SdkClient
builder() method.
Amazon Connect is a cloud-based contact center solution that makes it easy to set up and manage a customer contact center and provide reliable customer engagement at any scale.
Amazon Connect enables customer contacts through voice or chat.
The APIs described here are used by chat participants, such as agents and customers.
| Modifier and Type | Field and Description |
|---|---|
static String |
SERVICE_METADATA_ID
Value for looking up the service's metadata from the
ServiceMetadataProvider. |
static String |
SERVICE_NAME |
| Modifier and Type | Method and Description |
|---|---|
static ConnectParticipantAsyncClientBuilder |
builder()
Create a builder that can be used to configure and create a
ConnectParticipantAsyncClient. |
default CompletableFuture<CompleteAttachmentUploadResponse> |
completeAttachmentUpload(CompleteAttachmentUploadRequest completeAttachmentUploadRequest)
Allows you to confirm that the attachment has been uploaded using the pre-signed URL provided in
StartAttachmentUpload API.
|
default CompletableFuture<CompleteAttachmentUploadResponse> |
completeAttachmentUpload(Consumer<CompleteAttachmentUploadRequest.Builder> completeAttachmentUploadRequest)
Allows you to confirm that the attachment has been uploaded using the pre-signed URL provided in
StartAttachmentUpload API.
|
static ConnectParticipantAsyncClient |
create()
Create a
ConnectParticipantAsyncClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from the
DefaultCredentialsProvider. |
default CompletableFuture<CreateParticipantConnectionResponse> |
createParticipantConnection(Consumer<CreateParticipantConnectionRequest.Builder> createParticipantConnectionRequest)
Creates the participant's connection.
|
default CompletableFuture<CreateParticipantConnectionResponse> |
createParticipantConnection(CreateParticipantConnectionRequest createParticipantConnectionRequest)
Creates the participant's connection.
|
default CompletableFuture<DisconnectParticipantResponse> |
disconnectParticipant(Consumer<DisconnectParticipantRequest.Builder> disconnectParticipantRequest)
Disconnects a participant.
|
default CompletableFuture<DisconnectParticipantResponse> |
disconnectParticipant(DisconnectParticipantRequest disconnectParticipantRequest)
Disconnects a participant.
|
default CompletableFuture<GetAttachmentResponse> |
getAttachment(Consumer<GetAttachmentRequest.Builder> getAttachmentRequest)
Provides a pre-signed URL for download of a completed attachment.
|
default CompletableFuture<GetAttachmentResponse> |
getAttachment(GetAttachmentRequest getAttachmentRequest)
Provides a pre-signed URL for download of a completed attachment.
|
default CompletableFuture<GetTranscriptResponse> |
getTranscript(Consumer<GetTranscriptRequest.Builder> getTranscriptRequest)
Retrieves a transcript of the session, including details about any attachments.
|
default CompletableFuture<GetTranscriptResponse> |
getTranscript(GetTranscriptRequest getTranscriptRequest)
Retrieves a transcript of the session, including details about any attachments.
|
default GetTranscriptPublisher |
getTranscriptPaginator(Consumer<GetTranscriptRequest.Builder> getTranscriptRequest)
Retrieves a transcript of the session, including details about any attachments.
|
default GetTranscriptPublisher |
getTranscriptPaginator(GetTranscriptRequest getTranscriptRequest)
Retrieves a transcript of the session, including details about any attachments.
|
default CompletableFuture<SendEventResponse> |
sendEvent(Consumer<SendEventRequest.Builder> sendEventRequest)
Sends an event.
|
default CompletableFuture<SendEventResponse> |
sendEvent(SendEventRequest sendEventRequest)
Sends an event.
|
default CompletableFuture<SendMessageResponse> |
sendMessage(Consumer<SendMessageRequest.Builder> sendMessageRequest)
Sends a message.
|
default CompletableFuture<SendMessageResponse> |
sendMessage(SendMessageRequest sendMessageRequest)
Sends a message.
|
default CompletableFuture<StartAttachmentUploadResponse> |
startAttachmentUpload(Consumer<StartAttachmentUploadRequest.Builder> startAttachmentUploadRequest)
Provides a pre-signed Amazon S3 URL in response for uploading the file directly to S3.
|
default CompletableFuture<StartAttachmentUploadResponse> |
startAttachmentUpload(StartAttachmentUploadRequest startAttachmentUploadRequest)
Provides a pre-signed Amazon S3 URL in response for uploading the file directly to S3.
|
serviceNameclosestatic final String SERVICE_NAME
static final String SERVICE_METADATA_ID
ServiceMetadataProvider.static ConnectParticipantAsyncClient create()
ConnectParticipantAsyncClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from the
DefaultCredentialsProvider.static ConnectParticipantAsyncClientBuilder builder()
ConnectParticipantAsyncClient.default CompletableFuture<CompleteAttachmentUploadResponse> completeAttachmentUpload(CompleteAttachmentUploadRequest completeAttachmentUploadRequest)
Allows you to confirm that the attachment has been uploaded using the pre-signed URL provided in StartAttachmentUpload API.
completeAttachmentUploadRequest - default CompletableFuture<CompleteAttachmentUploadResponse> completeAttachmentUpload(Consumer<CompleteAttachmentUploadRequest.Builder> completeAttachmentUploadRequest)
Allows you to confirm that the attachment has been uploaded using the pre-signed URL provided in StartAttachmentUpload API.
This is a convenience which creates an instance of the CompleteAttachmentUploadRequest.Builder avoiding
the need to create one manually via CompleteAttachmentUploadRequest.builder()
completeAttachmentUploadRequest - A Consumer that will call methods on CompleteAttachmentUploadRequest.Builder to create a
request.default CompletableFuture<CreateParticipantConnectionResponse> createParticipantConnection(CreateParticipantConnectionRequest createParticipantConnectionRequest)
Creates the participant's connection. Note that ParticipantToken is used for invoking this API instead of ConnectionToken.
The participant token is valid for the lifetime of the participant – until they are part of a contact.
The response URL for WEBSOCKET Type has a connect expiry timeout of 100s. Clients must manually
connect to the returned websocket URL and subscribe to the desired topic.
For chat, you need to publish the following on the established websocket connection:
{"topic":"aws/subscribe","content":{"topics":["aws/chat"]}}
Upon websocket URL expiry, as specified in the response ConnectionExpiry parameter, clients need to call this API again to obtain a new websocket URL and perform the same steps as before.
The Amazon Connect Participant Service APIs do not use Signature Version 4 authentication.
createParticipantConnectionRequest - default CompletableFuture<CreateParticipantConnectionResponse> createParticipantConnection(Consumer<CreateParticipantConnectionRequest.Builder> createParticipantConnectionRequest)
Creates the participant's connection. Note that ParticipantToken is used for invoking this API instead of ConnectionToken.
The participant token is valid for the lifetime of the participant – until they are part of a contact.
The response URL for WEBSOCKET Type has a connect expiry timeout of 100s. Clients must manually
connect to the returned websocket URL and subscribe to the desired topic.
For chat, you need to publish the following on the established websocket connection:
{"topic":"aws/subscribe","content":{"topics":["aws/chat"]}}
Upon websocket URL expiry, as specified in the response ConnectionExpiry parameter, clients need to call this API again to obtain a new websocket URL and perform the same steps as before.
The Amazon Connect Participant Service APIs do not use Signature Version 4 authentication.
This is a convenience which creates an instance of the CreateParticipantConnectionRequest.Builder
avoiding the need to create one manually via CreateParticipantConnectionRequest.builder()
createParticipantConnectionRequest - A Consumer that will call methods on CreateParticipantConnectionRequest.Builder to create
a request.default CompletableFuture<DisconnectParticipantResponse> disconnectParticipant(DisconnectParticipantRequest disconnectParticipantRequest)
Disconnects a participant. Note that ConnectionToken is used for invoking this API instead of ParticipantToken.
The Amazon Connect Participant Service APIs do not use Signature Version 4 authentication.
disconnectParticipantRequest - default CompletableFuture<DisconnectParticipantResponse> disconnectParticipant(Consumer<DisconnectParticipantRequest.Builder> disconnectParticipantRequest)
Disconnects a participant. Note that ConnectionToken is used for invoking this API instead of ParticipantToken.
The Amazon Connect Participant Service APIs do not use Signature Version 4 authentication.
This is a convenience which creates an instance of the DisconnectParticipantRequest.Builder avoiding the
need to create one manually via DisconnectParticipantRequest.builder()
disconnectParticipantRequest - A Consumer that will call methods on DisconnectParticipantRequest.Builder to create a
request.default CompletableFuture<GetAttachmentResponse> getAttachment(GetAttachmentRequest getAttachmentRequest)
Provides a pre-signed URL for download of a completed attachment. This is an asynchronous API for use with active contacts.
getAttachmentRequest - default CompletableFuture<GetAttachmentResponse> getAttachment(Consumer<GetAttachmentRequest.Builder> getAttachmentRequest)
Provides a pre-signed URL for download of a completed attachment. This is an asynchronous API for use with active contacts.
This is a convenience which creates an instance of the GetAttachmentRequest.Builder avoiding the need to
create one manually via GetAttachmentRequest.builder()
getAttachmentRequest - A Consumer that will call methods on GetAttachmentRequest.Builder to create a request.default CompletableFuture<GetTranscriptResponse> getTranscript(GetTranscriptRequest getTranscriptRequest)
Retrieves a transcript of the session, including details about any attachments. Note that ConnectionToken is used for invoking this API instead of ParticipantToken.
The Amazon Connect Participant Service APIs do not use Signature Version 4 authentication.
getTranscriptRequest - default CompletableFuture<GetTranscriptResponse> getTranscript(Consumer<GetTranscriptRequest.Builder> getTranscriptRequest)
Retrieves a transcript of the session, including details about any attachments. Note that ConnectionToken is used for invoking this API instead of ParticipantToken.
The Amazon Connect Participant Service APIs do not use Signature Version 4 authentication.
This is a convenience which creates an instance of the GetTranscriptRequest.Builder avoiding the need to
create one manually via GetTranscriptRequest.builder()
getTranscriptRequest - A Consumer that will call methods on GetTranscriptRequest.Builder to create a request.default GetTranscriptPublisher getTranscriptPaginator(GetTranscriptRequest getTranscriptRequest)
Retrieves a transcript of the session, including details about any attachments. Note that ConnectionToken is used for invoking this API instead of ParticipantToken.
The Amazon Connect Participant Service APIs do not use Signature Version 4 authentication.
This is a variant of
getTranscript(software.amazon.awssdk.services.connectparticipant.model.GetTranscriptRequest) operation.
The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will
internally handle making service calls for you.
When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
failures only after you start streaming the data. The subscribe method should be called as a request to start
streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe
method will result in a new Subscription i.e., a new contract to stream data from the
starting request.
The following are few ways to use the response class:
1) Using the subscribe helper method
software.amazon.awssdk.services.connectparticipant.paginators.GetTranscriptPublisher publisher = client.getTranscriptPaginator(request);
CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.connectparticipant.paginators.GetTranscriptPublisher publisher = client.getTranscriptPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.connectparticipant.model.GetTranscriptResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.connectparticipant.model.GetTranscriptResponse response) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
getTranscript(software.amazon.awssdk.services.connectparticipant.model.GetTranscriptRequest)
operation.
getTranscriptRequest - default GetTranscriptPublisher getTranscriptPaginator(Consumer<GetTranscriptRequest.Builder> getTranscriptRequest)
Retrieves a transcript of the session, including details about any attachments. Note that ConnectionToken is used for invoking this API instead of ParticipantToken.
The Amazon Connect Participant Service APIs do not use Signature Version 4 authentication.
This is a variant of
getTranscript(software.amazon.awssdk.services.connectparticipant.model.GetTranscriptRequest) operation.
The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will
internally handle making service calls for you.
When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
failures only after you start streaming the data. The subscribe method should be called as a request to start
streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe
method will result in a new Subscription i.e., a new contract to stream data from the
starting request.
The following are few ways to use the response class:
1) Using the subscribe helper method
software.amazon.awssdk.services.connectparticipant.paginators.GetTranscriptPublisher publisher = client.getTranscriptPaginator(request);
CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.connectparticipant.paginators.GetTranscriptPublisher publisher = client.getTranscriptPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.connectparticipant.model.GetTranscriptResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.connectparticipant.model.GetTranscriptResponse response) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
getTranscript(software.amazon.awssdk.services.connectparticipant.model.GetTranscriptRequest)
operation.
This is a convenience which creates an instance of the GetTranscriptRequest.Builder avoiding the need to
create one manually via GetTranscriptRequest.builder()
getTranscriptRequest - A Consumer that will call methods on GetTranscriptRequest.Builder to create a request.default CompletableFuture<SendEventResponse> sendEvent(SendEventRequest sendEventRequest)
Sends an event. Note that ConnectionToken is used for invoking this API instead of ParticipantToken.
The Amazon Connect Participant Service APIs do not use Signature Version 4 authentication.
sendEventRequest - default CompletableFuture<SendEventResponse> sendEvent(Consumer<SendEventRequest.Builder> sendEventRequest)
Sends an event. Note that ConnectionToken is used for invoking this API instead of ParticipantToken.
The Amazon Connect Participant Service APIs do not use Signature Version 4 authentication.
This is a convenience which creates an instance of the SendEventRequest.Builder avoiding the need to
create one manually via SendEventRequest.builder()
sendEventRequest - A Consumer that will call methods on SendEventRequest.Builder to create a request.default CompletableFuture<SendMessageResponse> sendMessage(SendMessageRequest sendMessageRequest)
Sends a message. Note that ConnectionToken is used for invoking this API instead of ParticipantToken.
The Amazon Connect Participant Service APIs do not use Signature Version 4 authentication.
sendMessageRequest - default CompletableFuture<SendMessageResponse> sendMessage(Consumer<SendMessageRequest.Builder> sendMessageRequest)
Sends a message. Note that ConnectionToken is used for invoking this API instead of ParticipantToken.
The Amazon Connect Participant Service APIs do not use Signature Version 4 authentication.
This is a convenience which creates an instance of the SendMessageRequest.Builder avoiding the need to
create one manually via SendMessageRequest.builder()
sendMessageRequest - A Consumer that will call methods on SendMessageRequest.Builder to create a request.default CompletableFuture<StartAttachmentUploadResponse> startAttachmentUpload(StartAttachmentUploadRequest startAttachmentUploadRequest)
Provides a pre-signed Amazon S3 URL in response for uploading the file directly to S3.
startAttachmentUploadRequest - default CompletableFuture<StartAttachmentUploadResponse> startAttachmentUpload(Consumer<StartAttachmentUploadRequest.Builder> startAttachmentUploadRequest)
Provides a pre-signed Amazon S3 URL in response for uploading the file directly to S3.
This is a convenience which creates an instance of the StartAttachmentUploadRequest.Builder avoiding the
need to create one manually via StartAttachmentUploadRequest.builder()
startAttachmentUploadRequest - A Consumer that will call methods on StartAttachmentUploadRequest.Builder to create a
request.Copyright © 2021. All rights reserved.