GetAttachedFile - Amazon Connect

GetAttachedFile

Provides a pre-signed URL for download of an approved attached file. This API also returns metadata about the attached file. It will only return a downloadURL if the status of the attached file is APPROVED.

Request Syntax

GET /attached-files/InstanceId/FileId?associatedResourceArn=AssociatedResourceArn&urlExpiryInSeconds=UrlExpiryInSeconds HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

AssociatedResourceArn

The resource to which the attached file is (being) uploaded to. The supported resources are Cases and Email.

Note

This value must be a valid ARN.

Required: Yes

FileId

The unique identifier of the attached file resource.

Length Constraints: Minimum length of 1. Maximum length of 256.

Required: Yes

InstanceId

The unique identifier of the Amazon Connect instance.

Length Constraints: Minimum length of 1. Maximum length of 100.

Required: Yes

UrlExpiryInSeconds

Optional override for the expiry of the pre-signed S3 URL in seconds. The default value is 300.

Valid Range: Minimum value of 5. Maximum value of 300.

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200 Content-type: application/json { "AssociatedResourceArn": "string", "CreatedBy": { ... }, "CreationTime": "string", "DownloadUrlMetadata": { "Url": "string", "UrlExpiry": "string" }, "FileArn": "string", "FileId": "string", "FileName": "string", "FileSizeInBytes": number, "FileStatus": "string", "FileUseCaseType": "string", "Tags": { "string" : "string" } }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

AssociatedResourceArn

The resource to which the attached file is (being) uploaded to. Cases are the only current supported resource.

Type: String

CreatedBy

Represents the identity that created the file.

Type: CreatedByInfo object

Note: This object is a Union. Only one member of this object can be specified or returned.

CreationTime

The time of Creation of the file resource as an ISO timestamp. It's specified in ISO 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 2024-05-03T02:41:28.172Z.

Type: String

DownloadUrlMetadata

URL and expiry to be used when downloading the attached file.

Type: DownloadUrlMetadata object

FileArn

The unique identifier of the attached file resource (ARN).

Type: String

FileId

The unique identifier of the attached file resource.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 256.

FileName

A case-sensitive name of the attached file being uploaded.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 256.

Pattern: ^\P{C}*$

FileSizeInBytes

The size of the attached file in bytes.

Type: Long

Valid Range: Minimum value of 1.

FileStatus

The current status of the attached file.

Type: String

Valid Values: APPROVED | REJECTED | PROCESSING | FAILED

FileUseCaseType

The use case for the file.

Type: String

Valid Values: EMAIL_MESSAGE | ATTACHMENT

Tags

The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.

Type: String to string map

Map Entries: Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: ^(?!aws:)[\p{L}\p{Z}\p{N}_.:/=+\-@]*$

Value Length Constraints: Maximum length of 256.

Errors

For information about the errors that are common to all actions, see Common Errors.

AccessDeniedException

You do not have sufficient permissions to perform this action.

HTTP Status Code: 403

InternalServiceException

Request processing failed because of an error or failure with the service.

HTTP Status Code: 500

InvalidRequestException

The request is not valid.

HTTP Status Code: 400

ResourceNotFoundException

The specified resource was not found.

HTTP Status Code: 404

ThrottlingException

The throttling limit has been exceeded.

HTTP Status Code: 429

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: