Allows you to confirm that the attachment has been uploaded using the pre-signed URL provided in StartAttachmentUpload API. A conflict exception is thrown when an attachment with that identifier is already being uploaded.
For security recommendations, see Connect Customer Chat security best practices.
ConnectionToken is used for invoking this API instead of ParticipantToken.
The Amazon Connect Participant Service APIs do not use Signature Version 4 authentication.
Parameters:
-
attachment_ids
(AttachmentIdList)
–
A list of unique identifiers for the attachments.
-
client_token
(NonEmptyClientToken)
–
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs.
-
connection_token
(ParticipantToken)
–
The authentication token associated with the participant's connection.
Raises:
Source code in docs_src/capo_connectparticipant/_services/connect_participant.py
| def complete_attachment_upload(
self,
attachment_ids: "capo_connectparticipant.types.attachment_id_list.AttachmentIdList",
client_token: "capo_connectparticipant.types.non_empty_client_token.NonEmptyClientToken",
connection_token: "capo_connectparticipant.types.participant_token.ParticipantToken",
*,
config_overrides: Optional[ConnectParticipantClientConfig] = None,
) -> "capo_connectparticipant.types.complete_attachment_upload_response.CompleteAttachmentUploadResponse":
"""<p>Allows you to confirm that the attachment has been uploaded using the pre-signed URL provided in StartAttachmentUpload API. A conflict exception is thrown when an attachment with that identifier is already being uploaded.</p> <p>For security recommendations, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/security-best-practices.html#bp-security-chat">Connect Customer Chat security best practices</a>. </p> <note> <p> <code>ConnectionToken</code> is used for invoking this API instead of <code>ParticipantToken</code>.</p> </note> <p>The Amazon Connect Participant Service APIs do not use <a href="https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html">Signature Version 4 authentication</a>.</p>
Args:
attachment_ids: <p>A list of unique identifiers for the attachments.</p>
client_token: <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see <a href="https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.</p>
connection_token: <p>The authentication token associated with the participant's connection.</p>
Raises:
capo_connectparticipant.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
capo_connectparticipant.errors.conflict_exception.ConflictException: <p>The requested operation conflicts with the current state of a service resource associated with the request. </p>
capo_connectparticipant.errors.internal_server_exception.InternalServerException: <p>This exception occurs when there is an internal failure in the Amazon Connect service.</p>
capo_connectparticipant.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The number of attachments per contact exceeds the quota.</p>
capo_connectparticipant.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
capo_connectparticipant.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by Amazon Connect.</p>
capo_connectparticipant.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_connectparticipant.types.complete_attachment_upload_request.CompleteAttachmentUploadRequest]",
) -> OperationResponse[
"capo_connectparticipant.types.complete_attachment_upload_response.CompleteAttachmentUploadResponse"
]:
import capo_connectparticipant._operations.amazon_connect_participant_service_lambda.complete_attachment_upload
output, http_response = (
capo_connectparticipant._operations.amazon_connect_participant_service_lambda.complete_attachment_upload.complete_attachment_upload(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("CompleteAttachmentUpload")
)
input_: capo_connectparticipant.types.complete_attachment_upload_request.CompleteAttachmentUploadRequest = {
"attachment_ids": attachment_ids,
"client_token": client_token,
"connection_token": connection_token,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|