2024/05/03 - Amazon Connect Service - 5 new api methods
Changes This release adds 5 new APIs for managing attachments: StartAttachedFileUpload, CompleteAttachedFileUpload, GetAttachedFile, BatchGetAttachedFileMetadata, DeleteAttachedFile. These APIs can be used to programmatically upload and download attachments to Connect resources, like cases.
Provides a pre-signed Amazon S3 URL in response for uploading your content.
See also: AWS API Documentation
Request Syntax
client.start_attached_file_upload( ClientToken='string', InstanceId='string', FileName='string', FileSizeInBytes=123, UrlExpiryInSeconds=123, FileUseCaseType='ATTACHMENT', AssociatedResourceArn='string', CreatedBy={ 'ConnectUserArn': 'string', 'AWSIdentityArn': 'string' }, Tags={ 'string': 'string' } )
string
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.
This field is autopopulated if not provided.
string
[REQUIRED]
The unique identifier of the Connect instance.
string
[REQUIRED]
A case-sensitive name of the attached file being uploaded.
integer
[REQUIRED]
The size of the attached file in bytes.
integer
Optional override for the expiry of the pre-signed S3 URL in seconds.
string
[REQUIRED]
The use case for the file.
string
[REQUIRED]
The resource to which the attached file is (being) uploaded to. Cases are the only current supported resource.
dict
Represents the identity that created the file.
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.
dict
The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.
(string) --
(string) --
dict
Response Syntax
{ 'FileArn': 'string', 'FileId': 'string', 'CreationTime': 'string', 'FileStatus': 'APPROVED'|'REJECTED'|'PROCESSING'|'FAILED', 'CreatedBy': { 'ConnectUserArn': 'string', 'AWSIdentityArn': 'string' }, 'UploadUrlMetadata': { 'Url': 'string', 'UrlExpiry': 'string', 'HeadersToInclude': { 'string': 'string' } } }
Response Structure
(dict) -- Response from StartAttachedFileUpload 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.
CreatedBy (dict) --
Represents the identity that created the file.
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.
UploadUrlMetadata (dict) --
Information to be used while uploading the attached file.
Url (string) --
A pre-signed S3 URL that should be used for uploading 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.
HeadersToInclude (dict) --
A map of headers that should be provided when uploading the attached file.
(string) --
(string) --
Allows you to confirm that the attached file has been uploaded using the pre-signed URL provided in the StartAttachedFileUpload API.
See also: AWS API Documentation
Request Syntax
client.complete_attached_file_upload( InstanceId='string', FileId='string', AssociatedResourceArn='string' )
string
[REQUIRED]
The unique identifier of the Connect instance.
string
[REQUIRED]
The unique identifier of the attached file resource.
string
[REQUIRED]
The resource to which the attached file is (being) uploaded to. Cases are the only current supported resource.
dict
Response Syntax
{}
Response Structure
(dict) -- Response from CompleteAttachedFileUpload API
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
client.get_attached_file( InstanceId='string', FileId='string', UrlExpiryInSeconds=123, AssociatedResourceArn='string' )
string
[REQUIRED]
The unique identifier of the Connect instance.
string
[REQUIRED]
The unique identifier of the attached file resource.
integer
Optional override for the expiry of the pre-signed S3 URL in seconds.
string
[REQUIRED]
The resource to which the attached file is (being) uploaded to. Cases are the only current supported resource.
dict
Response Syntax
{ 'FileArn': 'string', 'FileId': 'string', 'CreationTime': 'string', 'FileStatus': 'APPROVED'|'REJECTED'|'PROCESSING'|'FAILED', 'FileName': 'string', 'FileSizeInBytes': 123, 'AssociatedResourceArn': 'string', 'FileUseCaseType': '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.
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) --
Allows you to retrieve metadata about multiple attached files on an associated resource. Each attached file provided in the input list must be associated with the input AssociatedResourceArn.
See also: AWS API Documentation
Request Syntax
client.batch_get_attached_file_metadata( FileIds=[ 'string', ], InstanceId='string', AssociatedResourceArn='string' )
list
[REQUIRED]
The unique identifiers of the attached file resource.
(string) --
string
[REQUIRED]
The unique identifier of the Connect instance.
string
[REQUIRED]
The resource to which the attached file is (being) uploaded to. Cases are the only current supported resource.
dict
Response Syntax
{ 'Files': [ { 'CreationTime': 'string', 'FileArn': 'string', 'FileId': 'string', 'FileName': 'string', 'FileSizeInBytes': 123, 'FileStatus': 'APPROVED'|'REJECTED'|'PROCESSING'|'FAILED', 'CreatedBy': { 'ConnectUserArn': 'string', 'AWSIdentityArn': 'string' }, 'FileUseCaseType': 'ATTACHMENT', 'AssociatedResourceArn': 'string', 'Tags': { 'string': 'string' } }, ], 'Errors': [ { 'ErrorCode': 'string', 'ErrorMessage': 'string', 'FileId': 'string' }, ] }
Response Structure
(dict) --
Files (list) --
List of attached files that were successfully retrieved.
(dict) --
Information about the attached file.
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.
FileArn (string) --
The unique identifier of the attached file resource (ARN).
FileId (string) --
The unique identifier of the attached file resource.
FileName (string) --
A case-sensitive name of the attached file being uploaded.
FileSizeInBytes (integer) --
The size of the attached file in bytes.
FileStatus (string) --
The current status of the attached file.
CreatedBy (dict) --
Represents the identity that created the file.
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.
FileUseCaseType (string) --
The use case for the file.
AssociatedResourceArn (string) --
The resource to which the attached file is (being) uploaded to. Cases are the only current supported resource.
Tags (dict) --
The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.
(string) --
(string) --
Errors (list) --
List of errors of attached files that could not be retrieved.
(dict) --
Error describing a failure to retrieve attached file metadata through BatchGetAttachedFileMetadata action.
ErrorCode (string) --
Status code describing the failure.
ErrorMessage (string) --
Why the attached file couldn't be retrieved.
FileId (string) --
The unique identifier of the attached file resource.
Deletes an attached file along with the underlying S3 Object.
See also: AWS API Documentation
Request Syntax
client.delete_attached_file( InstanceId='string', FileId='string', AssociatedResourceArn='string' )
string
[REQUIRED]
The unique identifier of the Connect instance.
string
[REQUIRED]
The unique identifier of the attached file resource.
string
[REQUIRED]
The resource to which the attached file is (being) uploaded to. Cases are the only current supported resource.
dict
Response Syntax
{}
Response Structure
(dict) -- Response from DeleteAttachedFile API