Amazon Connect Service

2026/06/30 - Amazon Connect Service - 2 new3 updated api methods

Changes  Amazon Connect - Added CreateAttachedFile and StartContactConversationalAnalyticsJob APIs to import call recordings and run conversational analytics.

CreateAttachedFile (new) Link ¶

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.

See also: AWS API Documentation

Request Syntax

client.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={
        'string': 'string'
    }
)
type ClientToken:

string

param 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.

This field is autopopulated if not provided.

type InstanceId:

string

param InstanceId:

[REQUIRED]

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

type FileUseCaseType:

string

param FileUseCaseType:

[REQUIRED]

The use case for the file.

type FileSourceUri:

string

param FileSourceUri:

[REQUIRED]

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

type AssociatedResourceArn:

string

param AssociatedResourceArn:

[REQUIRED]

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

type Tags:

dict

param Tags:

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

  • (string) --

    • (string) --

rtype:

dict

returns:

Response Syntax

{
    'FileArn': 'string',
    'FileId': 'string',
    'CreationTime': 'string',
    'FileStatus': 'APPROVED'|'REJECTED'|'PROCESSING'|'FAILED'
}

Response Structure

  • (dict) -- Response from CreateAttachedFile 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. Valid values: PROCESSING | APPROVED | REJECTED | FAILED.

StartContactConversationalAnalyticsJob (new) Link ¶

Starts a Contact Lens post-call analytics job for the specified contact. This API runs Conversational Analytics post-contact analysis on a voice recording that is already attached to the contact, generating transcription, sentiment analysis, redaction, and summarization results based on the provided configuration.

See also: AWS API Documentation

Request Syntax

client.start_contact_conversational_analytics_job(
    InstanceId='string',
    ContactId='string',
    AnalyticsModes=[
        'PostContact'|'RealTime'|'ContactLens'|'AutomatedInteraction',
    ],
    AnalyticsConfiguration={
        'LanguageConfiguration': {
            'LanguageLocale': 'string'
        },
        'RedactionConfiguration': {
            'Behavior': 'Enable'|'Disable',
            'Policy': 'None'|'RedactedOnly'|'RedactedAndOriginal',
            'Entities': [
                'string',
            ],
            'MaskMode': 'PII'|'EntityType'
        },
        'SentimentConfiguration': {
            'Behavior': 'Enable'|'Disable'
        },
        'SummaryConfiguration': {
            'SummaryModes': [
                'PostContact'|'AutomatedInteraction'|'ContactChain',
            ]
        },
        'RulesConfiguration': {
            'Behavior': 'Enable'|'Disable'
        }
    },
    ClientToken='string'
)
type InstanceId:

string

param InstanceId:

[REQUIRED]

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

type ContactId:

string

param ContactId:

[REQUIRED]

The identifier of the contact in this instance of Connect Customer.

type AnalyticsModes:

list

param AnalyticsModes:

[REQUIRED]

The analytics modes to run for the contact. Valid values: PostContact.

  • (string) --

type AnalyticsConfiguration:

dict

param AnalyticsConfiguration:

[REQUIRED]

The configuration for the conversational analytics job.

  • LanguageConfiguration (dict) -- [REQUIRED]

    The language configuration for conversational analytics.

    • LanguageLocale (string) --

      The language locale setting for conversational analytics.

  • RedactionConfiguration (dict) -- [REQUIRED]

    The redaction configuration for conversational analytics.

    • Behavior (string) -- [REQUIRED]

      Controls whether redaction is applied to the analytics output. Valid values: Enable | Disable.

    • Policy (string) -- [REQUIRED]

      The redaction output policy that determines which versions of the transcript are stored. Valid values: None | RedactedOnly | RedactedAndOriginal.

    • Entities (list) --

      The list of PII entity types to redact from the transcript (for example, NAME, ADDRESS, CREDIT_DEBIT_NUMBER).

      • (string) --

    • MaskMode (string) --

      The masking mode that determines how redacted content is replaced in the output. Valid values: PII (replaces with the literal string [PII]) | EntityType (replaces with the entity type name, for example [NAME]).

  • SentimentConfiguration (dict) -- [REQUIRED]

    The sentiment configuration for conversational analytics.

    • Behavior (string) -- [REQUIRED]

      Controls whether sentiment analysis is applied to the analytics output. Valid values: Enable | Disable.

  • SummaryConfiguration (dict) -- [REQUIRED]

    The summary configuration for conversational analytics.

    • SummaryModes (list) -- [REQUIRED]

      The summary modes that determine what type of summarization is generated. Valid values: PostContact | AutomatedInteraction | ContactChain.

      • (string) --

  • RulesConfiguration (dict) -- [REQUIRED]

    The rules configuration for conversational analytics.

    • Behavior (string) --

      Controls whether Contact Lens rules are evaluated for the contact. Valid values: Enable | Disable.

type ClientToken:

string

param 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.

rtype:

dict

returns:

Response Syntax

{
    'InstanceId': 'string',
    'ContactId': 'string'
}

Response Structure

  • (dict) --

    • InstanceId (string) --

      The identifier of the Connect Customer instance.

    • ContactId (string) --

      The identifier of the contact.

BatchGetAttachedFileMetadata (updated) Link ¶
Changes (response)
{'Files': {'FileUseCaseType': {'VOICE_RECORDING'}}}

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'
)
type FileIds:

list

param FileIds:

[REQUIRED]

The unique identifiers of the attached file resource.

  • (string) --

type InstanceId:

string

param InstanceId:

[REQUIRED]

The unique identifier of the Connect instance.

type AssociatedResourceArn:

string

param AssociatedResourceArn:

[REQUIRED]

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

rtype:

dict

returns:

Response Syntax

{
    'Files': [
        {
            'CreationTime': 'string',
            'FileArn': 'string',
            'FileId': 'string',
            'FileName': 'string',
            'FileSizeInBytes': 123,
            'FileStatus': 'APPROVED'|'REJECTED'|'PROCESSING'|'FAILED',
            'CreatedBy': {
                'ConnectUserArn': 'string',
                'AWSIdentityArn': 'string'
            },
            'FileUseCaseType': 'CONTACT_ANALYSIS'|'EMAIL_MESSAGE'|'EMAIL_MESSAGE_PLAIN_TEXT'|'EMAIL_MESSAGE_REDACTED'|'EMAIL_MESSAGE_PLAIN_TEXT_REDACTED'|'ATTACHMENT'|'VOICE_RECORDING',
            '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.

GetAttachedFile (updated) Link ¶
Changes (response)
{'FileUseCaseType': {'VOICE_RECORDING'}}

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'
)
type InstanceId:

string

param InstanceId:

[REQUIRED]

The unique identifier of the Connect Customer instance.

type FileId:

string

param FileId:

[REQUIRED]

The unique identifier of the attached file resource.

type UrlExpiryInSeconds:

integer

param UrlExpiryInSeconds:

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

type AssociatedResourceArn:

string

param AssociatedResourceArn:

[REQUIRED]

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

rtype:

dict

returns:

Response Syntax

{
    'FileArn': 'string',
    'FileId': 'string',
    'CreationTime': 'string',
    'FileStatus': 'APPROVED'|'REJECTED'|'PROCESSING'|'FAILED',
    'FileName': 'string',
    'FileSizeInBytes': 123,
    'AssociatedResourceArn': 'string',
    'FileUseCaseType': 'CONTACT_ANALYSIS'|'EMAIL_MESSAGE'|'EMAIL_MESSAGE_PLAIN_TEXT'|'EMAIL_MESSAGE_REDACTED'|'EMAIL_MESSAGE_PLAIN_TEXT_REDACTED'|'ATTACHMENT'|'VOICE_RECORDING',
    '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) --

StartAttachedFileUpload (updated) Link ¶
Changes (request)
{'FileUseCaseType': {'VOICE_RECORDING'}}

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='CONTACT_ANALYSIS'|'EMAIL_MESSAGE'|'EMAIL_MESSAGE_PLAIN_TEXT'|'EMAIL_MESSAGE_REDACTED'|'EMAIL_MESSAGE_PLAIN_TEXT_REDACTED'|'ATTACHMENT'|'VOICE_RECORDING',
    AssociatedResourceArn='string',
    CreatedBy={
        'ConnectUserArn': 'string',
        'AWSIdentityArn': 'string'
    },
    Tags={
        'string': 'string'
    }
)
type ClientToken:

string

param 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.

This field is autopopulated if not provided.

type InstanceId:

string

param InstanceId:

[REQUIRED]

The unique identifier of the Connect Customer instance.

type FileName:

string

param FileName:

[REQUIRED]

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

type FileSizeInBytes:

integer

param FileSizeInBytes:

[REQUIRED]

The size of the attached file in bytes.

type UrlExpiryInSeconds:

integer

param UrlExpiryInSeconds:

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

type FileUseCaseType:

string

param FileUseCaseType:

[REQUIRED]

The use case for the file.

type AssociatedResourceArn:

string

param AssociatedResourceArn:

[REQUIRED]

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

type CreatedBy:

dict

param CreatedBy:

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.

type Tags:

dict

param Tags:

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

  • (string) --

    • (string) --

rtype:

dict

returns:

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) --

      The headers to be provided while uploading the file to the URL.

      • 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) --