Connect / Client / get_attached_file
get_attached_file#
- Connect.Client.get_attached_file(**kwargs)#
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
.See also: AWS API Documentation
Request Syntax
response = client.get_attached_file( InstanceId='string', FileId='string', UrlExpiryInSeconds=123, AssociatedResourceArn='string' )
- Parameters:
InstanceId (string) –
[REQUIRED]
The unique identifier of the Amazon Connect instance.
FileId (string) –
[REQUIRED]
The unique identifier of the attached file resource.
UrlExpiryInSeconds (integer) – Optional override for the expiry of the pre-signed S3 URL in seconds. The default value is 300.
AssociatedResourceArn (string) –
[REQUIRED]
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.
- Return type:
dict
- Returns:
Response Syntax
{ 'FileArn': 'string', 'FileId': 'string', 'CreationTime': 'string', 'FileStatus': 'APPROVED'|'REJECTED'|'PROCESSING'|'FAILED', 'FileName': 'string', 'FileSizeInBytes': 123, 'AssociatedResourceArn': 'string', 'FileUseCaseType': 'EMAIL_MESSAGE'|'ATTACHMENT', 'CreatedBy': { 'ConnectUserArn': 'string', 'AWSIdentityArn': 'string' }, 'DownloadUrlMetadata': { 'Url': 'string', 'UrlExpiry': 'string' }, 'Tags': { 'string': 'string' } }
Response Structure
(dict) – Response from GetAttachedFile API.
FileArn (string) –
The unique identifier of the attached file resource (ARN).
FileId (string) –
The unique identifier of the attached file resource.
CreationTime (string) –
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
.FileStatus (string) –
The current status of the attached file.
FileName (string) –
A case-sensitive name of the attached file being uploaded.
FileSizeInBytes (integer) –
The size of the attached file in bytes.
AssociatedResourceArn (string) –
The resource to which the attached file is (being) uploaded to. Cases are the only current supported resource.
FileUseCaseType (string) –
The use case for the file.
CreatedBy (dict) –
Represents the identity that created the file.
Note
This is a Tagged Union structure. Only one of the following top level keys will be set:
ConnectUserArn
,AWSIdentityArn
. If a client receives an unknown member it will setSDK_UNKNOWN_MEMBER
as the top level key, which maps to the name or tag of the unknown member. The structure ofSDK_UNKNOWN_MEMBER
is as follows:'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
ConnectUserArn (string) –
An agent ARN representing a connect user.
AWSIdentityArn (string) –
STS or IAM ARN representing the identity of API Caller. SDK users cannot populate this and this value is calculated automatically if
ConnectUserArn
is not provided.
DownloadUrlMetadata (dict) –
URL and expiry to be used when downloading the attached file.
Url (string) –
A pre-signed URL that should be used to download the attached file.
UrlExpiry (string) –
The expiration time of the URL in ISO timestamp. It’s specified in ISO 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 2019-11-08T02:41:28.172Z.
Tags (dict) –
The tags used to organize, track, or control access for this resource. For example,
{ "Tags": {"key1":"value1", "key2":"value2"} }
.(string) –
(string) –
Exceptions
Connect.Client.exceptions.AccessDeniedException
Connect.Client.exceptions.InvalidRequestException
Connect.Client.exceptions.InternalServiceException
Connect.Client.exceptions.ResourceNotFoundException
Connect.Client.exceptions.ThrottlingException