Skip to content

Creates an attached file for a completed voice contact by copying a recording from a source S3 URI into Connect Customer managed storage

Description

Creates an attached file for a completed voice contact by copying a recording from a source S3 URI into Connect Customer managed storage. Use this API to attach voice recordings to contacts for downstream processing such as conversational analytics.

The AssociatedResourceArn must be the ARN of a completed voice contact, FileUseCaseType must be set to VOICE_RECORDING, and FileSourceUri must be a valid S3 URI.

For example, you can call create_contact, then create_attached_file, then start_contact_conversational_analytics_job to create a contact, attach a recording, and run post-call analytics.

Usage

connect_create_attached_file(ClientToken, InstanceId, FileUseCaseType,
  FileSourceUri, AssociatedResourceArn, Tags)

Arguments

  • ClientToken

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.

  • InstanceId

[required] The identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

  • FileUseCaseType

[required] The use case for the file.

Only VOICE_RECORDING is supported.

  • FileSourceUri

[required] The S3 URI of the file to be attached. Only S3 source URIs are supported.

  • AssociatedResourceArn

[required] The ARN of the completed voice contact to attach the file to. Only voice contacts with Telephony subtype are supported.

This value must be a valid ARN.

  • Tags

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

Value

A list with the following syntax:

list(
  FileArn = "string",
  FileId = "string",
  CreationTime = "string",
  FileStatus = "APPROVED"|"REJECTED"|"PROCESSING"|"FAILED"
)

Request syntax

svc$create_attached_file(
  ClientToken = "string",
  InstanceId = "string",
  FileUseCaseType = "CONTACT_ANALYSIS"|"EMAIL_MESSAGE"|"EMAIL_MESSAGE_PLAIN_TEXT"|"EMAIL_MESSAGE_REDACTED"|"EMAIL_MESSAGE_PLAIN_TEXT_REDACTED"|"ATTACHMENT"|"VOICE_RECORDING",
  FileSourceUri = "string",
  AssociatedResourceArn = "string",
  Tags = list(
    "string"
  )
)