get_attached_file
¶
get_attached_file(
instance_id: InstanceId,
file_id: FileId,
associated_resource_arn: ARN,
*,
config_overrides: Optional[ConnectClientConfig] = None,
url_expiry_in_seconds: Optional[URLExpiryInSeconds] = None,
url_content_disposition: Optional[ContentDisposition] = None,
) -> GetAttachedFileResponse
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.
Parameters:
-
instance_id(InstanceId) –The unique identifier of the Connect Customer instance.
-
file_id(FileId) –The unique identifier of the attached file resource.
-
url_expiry_in_seconds(Optional[URLExpiryInSeconds], default:None) –Optional override for the expiry of the pre-signed S3 URL in seconds. The default value is 300.
-
associated_resource_arn(ARN) – -
url_content_disposition(Optional[ContentDisposition], default:None) –Specifies how a browser handles the file at the pre-signed URL. The valid values are the following:
- INLINE
-
Displays the file in the browser.
- ATTACHMENT
-
Downloads the file. This is the default.
Raises:
-
AccessDeniedException–You do not have sufficient permissions to perform this action.
-
InternalServiceException–Request processing failed because of an error or failure with the service.
-
InvalidRequestException–The request is not valid.
-
ResourceNotFoundException–The specified resource was not found.
-
ThrottlingException–The throttling limit has been exceeded.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_connect/_services/connect.py
12123 12124 12125 12126 12127 12128 12129 12130 12131 12132 12133 12134 12135 12136 12137 12138 12139 12140 12141 12142 12143 12144 12145 12146 12147 12148 12149 12150 12151 12152 12153 12154 12155 12156 12157 12158 12159 12160 12161 12162 12163 12164 12165 12166 12167 12168 12169 12170 12171 12172 12173 12174 12175 12176 12177 12178 12179 12180 12181 12182 12183 12184 12185 12186 12187 12188 | |