CompleteAttachmentUploadCommand

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 Amazon Connect 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 .

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { ConnectParticipantClient, CompleteAttachmentUploadCommand } from "@aws-sdk/client-connectparticipant"; // ES Modules import
// const { ConnectParticipantClient, CompleteAttachmentUploadCommand } = require("@aws-sdk/client-connectparticipant"); // CommonJS import
const client = new ConnectParticipantClient(config);
const input = { // CompleteAttachmentUploadRequest
  AttachmentIds: [ // AttachmentIdList // required
    "STRING_VALUE",
  ],
  ClientToken: "STRING_VALUE", // required
  ConnectionToken: "STRING_VALUE", // required
};
const command = new CompleteAttachmentUploadCommand(input);
const response = await client.send(command);
// {};

CompleteAttachmentUploadCommand Input

Parameter
Type
Description
AttachmentIds
Required
string[] | undefined

A list of unique identifiers for the attachments.

ConnectionToken
Required
string | undefined

The authentication token associated with the participant's connection.

ClientToken
string | undefined

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 .

CompleteAttachmentUploadCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.

Throws

Name
Fault
Details
AccessDeniedException
client

You do not have sufficient access to perform this action.

ConflictException
client

The requested operation conflicts with the current state of a service resource associated with the request.

InternalServerException
server

This exception occurs when there is an internal failure in the Amazon Connect service.

ServiceQuotaExceededException
client

The number of attachments per contact exceeds the quota.

ThrottlingException
client

The request was denied due to request throttling.

ValidationException
client

The input fails to satisfy the constraints specified by Amazon Connect.

ConnectParticipantServiceException
Base exception class for all service exceptions from ConnectParticipant service.