Amazon Connect Service

2023/11/28 - Amazon Connect Service - 13 new 7 updated api methods

Changes  Added support for following capabilities: Amazon Connect's in-app, web, and video calling. Two-way SMS integrations. Contact Lens real-time chat analytics feature. Amazon Connect Analytics Datalake capability. Capability to configure real time chat rules.

AssociateFlow (new) Link ¶

Associates a connect resource to a flow.

See also: AWS API Documentation

Request Syntax

client.associate_flow(
    InstanceId='string',
    ResourceId='string',
    FlowId='string',
    ResourceType='SMS_PHONE_NUMBER'
)
type InstanceId

string

param InstanceId

[REQUIRED]

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

type ResourceId

string

param ResourceId

[REQUIRED]

The identifier of the resource.

type FlowId

string

param FlowId

[REQUIRED]

The identifier of the flow.

type ResourceType

string

param ResourceType

[REQUIRED]

A valid resource type.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

GetFlowAssociation (new) Link ¶

Retrieves the flow associated for a given resource.

See also: AWS API Documentation

Request Syntax

client.get_flow_association(
    InstanceId='string',
    ResourceId='string',
    ResourceType='SMS_PHONE_NUMBER'
)
type InstanceId

string

param InstanceId

[REQUIRED]

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

type ResourceId

string

param ResourceId

[REQUIRED]

The identifier of the resource.

type ResourceType

string

param ResourceType

[REQUIRED]

A valid resource type.

rtype

dict

returns

Response Syntax

{
    'ResourceId': 'string',
    'FlowId': 'string',
    'ResourceType': 'SMS_PHONE_NUMBER'
}

Response Structure

  • (dict) --

    • ResourceId (string) --

      The identifier of the resource.

    • FlowId (string) --

      The identifier of the flow.

    • ResourceType (string) --

      A valid resource type.

SendChatIntegrationEvent (new) Link ¶

Processes chat integration events from Amazon Web Services or external integrations to Amazon Connect. A chat integration event includes:

  • SourceId, DestinationId, and Subtype: a set of identifiers, uniquely representing a chat

  • ChatEvent: details of the chat action to perform such as sending a message, event, or disconnecting from a chat

When a chat integration event is sent with chat identifiers that do not map to an active chat contact, a new chat contact is also created before handling chat action.

Access to this API is currently restricted to Amazon Pinpoint for supporting SMS integration.

See also: AWS API Documentation

Request Syntax

client.send_chat_integration_event(
    SourceId='string',
    DestinationId='string',
    Subtype='string',
    Event={
        'Type': 'DISCONNECT'|'MESSAGE'|'EVENT',
        'ContentType': 'string',
        'Content': 'string'
    },
    NewSessionDetails={
        'SupportedMessagingContentTypes': [
            'string',
        ],
        'ParticipantDetails': {
            'DisplayName': 'string'
        },
        'Attributes': {
            'string': 'string'
        },
        'StreamingConfiguration': {
            'StreamingEndpointArn': 'string'
        }
    }
)
type SourceId

string

param SourceId

[REQUIRED]

External identifier of chat customer participant, used in part to uniquely identify a chat. For SMS, this is the E164 phone number of the chat customer participant.

type DestinationId

string

param DestinationId

[REQUIRED]

Chat system identifier, used in part to uniquely identify chat. This is associated with the Amazon Connect instance and flow to be used to start chats. For SMS, this is the phone number destination of inbound SMS messages represented by an Amazon Pinpoint phone number ARN.

type Subtype

string

param Subtype

Classification of a channel. This is used in part to uniquely identify chat.

Valid value: ["connect:sms"]

type Event

dict

param Event

[REQUIRED]

Chat integration event payload

  • Type (string) -- [REQUIRED]

    Type of chat integration event.

  • ContentType (string) --

    Type of content. This is required when Type is MESSAGE or EVENT .

    • For allowed message content types, see the ContentType parameter in the SendMessage topic in the Amazon Connect Participant Service API Reference .

    • For allowed event content types, see the ContentType parameter in the SendEvent topic in the Amazon Connect Participant Service API Reference .

  • Content (string) --

    Content of the message or event. This is required when Type is MESSAGE and for certain ContentTypes when Type is EVENT .

    • For allowed message content, see the Content parameter in the SendMessage topic in the Amazon Connect Participant Service API Reference .

    • For allowed event content, see the Content parameter in the SendEvent topic in the Amazon Connect Participant Service API Reference .

type NewSessionDetails

dict

param NewSessionDetails

Contact properties to apply when starting a new chat. If the integration event is handled with an existing chat, this is ignored.

  • SupportedMessagingContentTypes (list) --

    The supported chat message content types. Supported types are text/plain , text/markdown , application/json , application/vnd.amazonaws.connect.message.interactive , and application/vnd.amazonaws.connect.message.interactive.response .

    Content types must always contain text/plain . You can then put any other supported type in the list. For example, all the following lists are valid because they contain text/plain : [text/plain, text/markdown, application/json] , [text/markdown, text/plain] , [text/plain, application/json, application/vnd.amazonaws.connect.message.interactive.response] .

    • (string) --

  • ParticipantDetails (dict) --

    The customer's details.

    • DisplayName (string) -- [REQUIRED]

      Display name of the participant.

  • Attributes (dict) --

    A custom key-value pair using an attribute map. The attributes are standard Amazon Connect attributes. They can be accessed in flows just like any other contact attributes.

    There can be up to 32,768 UTF-8 bytes across all key-value pairs per contact. Attribute keys can include only alphanumeric, dash, and underscore characters.

    • (string) --

      • (string) --

  • StreamingConfiguration (dict) --

    The streaming configuration, such as the Amazon SNS streaming endpoint.

    • StreamingEndpointArn (string) -- [REQUIRED]

      The Amazon Resource Name (ARN) of the standard Amazon SNS topic. The Amazon Resource Name (ARN) of the streaming endpoint that is used to publish real-time message streaming for chat conversations.

rtype

dict

returns

Response Syntax

{
    'InitialContactId': 'string',
    'NewChatCreated': True|False
}

Response Structure

  • (dict) --

    • InitialContactId (string) --

      Identifier of chat contact used to handle integration event. This may be null if the integration event is not valid without an already existing chat contact.

    • NewChatCreated (boolean) --

      Whether handling the integration event resulted in creating a new chat or acting on existing chat.

BatchAssociateAnalyticsDataSet (new) Link ¶

This API is in preview release for Amazon Connect and is subject to change.

Associates a list of analytics datasets for a given Amazon Connect instance to a target account. You can associate multiple datasets in a single call.

See also: AWS API Documentation

Request Syntax

client.batch_associate_analytics_data_set(
    InstanceId='string',
    DataSetIds=[
        'string',
    ],
    TargetAccountId='string'
)
type InstanceId

string

param InstanceId

[REQUIRED]

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

type DataSetIds

list

param DataSetIds

[REQUIRED]

An array of dataset identifiers to associate.

  • (string) --

type TargetAccountId

string

param TargetAccountId

The identifier of the target account. Use to associate a dataset to a different account than the one containing the Amazon Connect instance. If not specified, by default this value is the Amazon Web Services account that has the Amazon Connect instance.

rtype

dict

returns

Response Syntax

{
    'Created': [
        {
            'DataSetId': 'string',
            'TargetAccountId': 'string',
            'ResourceShareId': 'string',
            'ResourceShareArn': 'string'
        },
    ],
    'Errors': [
        {
            'ErrorCode': 'string',
            'ErrorMessage': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • Created (list) --

      Information about associations that are successfully created: DataSetId , TargetAccountId , ResourceShareId , ResourceShareArn .

      • (dict) --

        This API is in preview release for Amazon Connect and is subject to change.

        Information about associations that are successfully created: DataSetId , TargetAccountId , ResourceShareId , ResourceShareArn .

        • DataSetId (string) --

          The identifier of the dataset.

        • TargetAccountId (string) --

          The identifier of the target account.

        • ResourceShareId (string) --

          The Resource Access Manager share ID.

        • ResourceShareArn (string) --

          The Amazon Resource Name (ARN) of the Resource Access Manager share.

    • Errors (list) --

      A list of errors for datasets that aren't successfully associated with the target account.

      • (dict) --

        This API is in preview release for Amazon Connect and is subject to change.

        List of errors for dataset association failures.

        • ErrorCode (string) --

          The error code.

        • ErrorMessage (string) --

          The corresponding error message for the error code.

DisassociateAnalyticsDataSet (new) Link ¶

This API is in preview release for Amazon Connect and is subject to change.

Removes the dataset ID associated with a given Amazon Connect instance.

See also: AWS API Documentation

Request Syntax

client.disassociate_analytics_data_set(
    InstanceId='string',
    DataSetId='string',
    TargetAccountId='string'
)
type InstanceId

string

param InstanceId

[REQUIRED]

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

type DataSetId

string

param DataSetId

[REQUIRED]

The identifier of the dataset to remove.

type TargetAccountId

string

param TargetAccountId

The identifier of the target account. Use to associate a dataset to a different account than the one containing the Amazon Connect instance. If not specified, by default this value is the Amazon Web Services account that has the Amazon Connect instance.

returns

None

ListAnalyticsDataAssociations (new) Link ¶

This API is in preview release for Amazon Connect and is subject to change.

Lists the association status of requested dataset ID for a given Amazon Connect instance.

See also: AWS API Documentation

Request Syntax

client.list_analytics_data_associations(
    InstanceId='string',
    DataSetId='string',
    NextToken='string',
    MaxResults=123
)
type InstanceId

string

param InstanceId

[REQUIRED]

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

type DataSetId

string

param DataSetId

The identifier of the dataset to get the association status.

type NextToken

string

param NextToken

The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

type MaxResults

integer

param MaxResults

The maximum number of results to return per page.

rtype

dict

returns

Response Syntax

{
    'Results': [
        {
            'DataSetId': 'string',
            'TargetAccountId': 'string',
            'ResourceShareId': 'string',
            'ResourceShareArn': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Results (list) --

      An array of successful results: DataSetId , TargetAccountId , ResourceShareId , ResourceShareArn . This is a paginated API, so nextToken is given if there are more results to be returned.

      • (dict) --

        This API is in preview release for Amazon Connect and is subject to change.

        Information about associations that are successfully created: DataSetId , TargetAccountId , ResourceShareId , ResourceShareArn .

        • DataSetId (string) --

          The identifier of the dataset.

        • TargetAccountId (string) --

          The identifier of the target account.

        • ResourceShareId (string) --

          The Resource Access Manager share ID.

        • ResourceShareArn (string) --

          The Amazon Resource Name (ARN) of the Resource Access Manager share.

    • NextToken (string) --

      If there are additional results, this is the token for the next set of results.

ListFlowAssociations (new) Link ¶

List the flow association based on the filters.

See also: AWS API Documentation

Request Syntax

client.list_flow_associations(
    InstanceId='string',
    ResourceType='VOICE_PHONE_NUMBER',
    NextToken='string',
    MaxResults=123
)
type InstanceId

string

param InstanceId

[REQUIRED]

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

type ResourceType

string

param ResourceType

A valid resource type.

type NextToken

string

param NextToken

The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

type MaxResults

integer

param MaxResults

The maximum number of results to return per page.

rtype

dict

returns

Response Syntax

{
    'FlowAssociationSummaryList': [
        {
            'ResourceId': 'string',
            'FlowId': 'string',
            'ResourceType': 'VOICE_PHONE_NUMBER'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • FlowAssociationSummaryList (list) --

      Summary of flow associations.

      • (dict) --

        Information about flow associations.

        • ResourceId (string) --

          The identifier of the resource.

        • FlowId (string) --

          The identifier of the flow.

        • ResourceType (string) --

          The type of resource association.

    • NextToken (string) --

      If there are additional results, this is the token for the next set of results.

BatchDisassociateAnalyticsDataSet (new) Link ¶

This API is in preview release for Amazon Connect and is subject to change.

Removes a list of analytics datasets associated with a given Amazon Connect instance. You can disassociate multiple datasets in a single call.

See also: AWS API Documentation

Request Syntax

client.batch_disassociate_analytics_data_set(
    InstanceId='string',
    DataSetIds=[
        'string',
    ],
    TargetAccountId='string'
)
type InstanceId

string

param InstanceId

[REQUIRED]

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

type DataSetIds

list

param DataSetIds

[REQUIRED]

An array of associated dataset identifiers to remove.

  • (string) --

type TargetAccountId

string

param TargetAccountId

The identifier of the target account. Use to disassociate a dataset from a different account than the one containing the Amazon Connect instance. If not specified, by default this value is the Amazon Web Services account that has the Amazon Connect instance.

rtype

dict

returns

Response Syntax

{
    'Deleted': [
        'string',
    ],
    'Errors': [
        {
            'ErrorCode': 'string',
            'ErrorMessage': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • Deleted (list) --

      An array of successfully disassociated dataset identifiers.

      • (string) --

    • Errors (list) --

      A list of errors for any datasets not successfully removed.

      • (dict) --

        This API is in preview release for Amazon Connect and is subject to change.

        List of errors for dataset association failures.

        • ErrorCode (string) --

          The error code.

        • ErrorMessage (string) --

          The corresponding error message for the error code.

StartWebRTCContact (new) Link ¶

Places an inbound in-app, web, or video call to a contact, and then initiates the flow. It performs the actions in the flow that are specified (in ContactFlowId) and present in the Amazon Connect instance (specified as InstanceId).

See also: AWS API Documentation

Request Syntax

client.start_web_rtc_contact(
    Attributes={
        'string': 'string'
    },
    ClientToken='string',
    ContactFlowId='string',
    InstanceId='string',
    AllowedCapabilities={
        'Customer': {
            'Video': 'SEND'
        },
        'Agent': {
            'Video': 'SEND'
        }
    },
    ParticipantDetails={
        'DisplayName': 'string'
    },
    RelatedContactId='string',
    References={
        'string': {
            'Value': 'string',
            'Type': 'URL'|'ATTACHMENT'|'NUMBER'|'STRING'|'DATE'|'EMAIL'
        }
    },
    Description='string'
)
type Attributes

dict

param Attributes

A custom key-value pair using an attribute map. The attributes are standard Amazon Connect attributes, and can be accessed in flows just like any other contact attributes.

There can be up to 32,768 UTF-8 bytes across all key-value pairs per contact. Attribute keys can include only alphanumeric, -, and _ characters.

  • (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.

The token is valid for 7 days after creation. If a contact is already started, the contact ID is returned.

This field is autopopulated if not provided.

type ContactFlowId

string

param ContactFlowId

[REQUIRED]

The identifier of the flow for the call. To see the ContactFlowId in the Amazon Connect admin website, on the navigation menu go to Routing , Contact Flows . Choose the flow. On the flow page, under the name of the flow, choose Show additional flow information . The ContactFlowId is the last part of the ARN, shown here in bold:

arn:aws:connect:us-west-2:xxxxxxxxxxxx:instance/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/contact-flow/846ec553-a005-41c0-8341-xxxxxxxxxxxx

type InstanceId

string

param InstanceId

[REQUIRED]

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

type AllowedCapabilities

dict

param AllowedCapabilities

Information about the video sharing capabilities of the participants (customer, agent).

  • Customer (dict) --

    Information about the customer's video sharing capabilities.

    • Video (string) --

      The configuration having the video sharing capabilities for participants over the call.

  • Agent (dict) --

    Information about the agent's video sharing capabilities.

    • Video (string) --

      The configuration having the video sharing capabilities for participants over the call.

type ParticipantDetails

dict

param ParticipantDetails

[REQUIRED]

The customer's details.

  • DisplayName (string) -- [REQUIRED]

    Display name of the participant.

type RelatedContactId

string

param RelatedContactId

The unique identifier for an Amazon Connect contact. This identifier is related to the contact starting.

type References

dict

param References

A formatted URL that is shown to an agent in the Contact Control Panel (CCP). Tasks can have the following reference types at the time of creation: URL | NUMBER | STRING | DATE | EMAIL . ATTACHMENT is not a supported reference type during task creation.

  • (string) --

    • (dict) --

      Well-formed data on a contact, used by agents to complete a contact request. You can have up to 4,096 UTF-8 bytes across all references for a contact.

      • Value (string) -- [REQUIRED]

        A valid value for the reference. For example, for a URL reference, a formatted URL that is displayed to an agent in the Contact Control Panel (CCP).

      • Type (string) -- [REQUIRED]

        The type of the reference. DATE must be of type Epoch timestamp.

type Description

string

param Description

A description of the task that is shown to an agent in the Contact Control Panel (CCP).

rtype

dict

returns

Response Syntax

{
    'ConnectionData': {
        'Attendee': {
            'AttendeeId': 'string',
            'JoinToken': 'string'
        },
        'Meeting': {
            'MediaRegion': 'string',
            'MediaPlacement': {
                'AudioHostUrl': 'string',
                'AudioFallbackUrl': 'string',
                'SignalingUrl': 'string',
                'TurnControlUrl': 'string',
                'EventIngestionUrl': 'string'
            },
            'MeetingFeatures': {
                'Audio': {
                    'EchoReduction': 'AVAILABLE'|'UNAVAILABLE'
                }
            },
            'MeetingId': 'string'
        }
    },
    'ContactId': 'string',
    'ParticipantId': 'string',
    'ParticipantToken': 'string'
}

Response Structure

  • (dict) --

    • ConnectionData (dict) --

      Information required for the client application (mobile application or website) to connect to the call.

      • Attendee (dict) --

        The attendee information, including attendee ID and join token.

        • AttendeeId (string) --

          The Amazon Chime SDK attendee ID.

        • JoinToken (string) --

          The join token used by the Amazon Chime SDK attendee.

      • Meeting (dict) --

        A meeting created using the Amazon Chime SDK.

        • MediaRegion (string) --

          The Amazon Web Services Region in which you create the meeting.

        • MediaPlacement (dict) --

          The media placement for the meeting.

          • AudioHostUrl (string) --

            The audio host URL.

          • AudioFallbackUrl (string) --

            The audio fallback URL.

          • SignalingUrl (string) --

            The signaling URL.

          • TurnControlUrl (string) --

            The turn control URL.

          • EventIngestionUrl (string) --

            The event ingestion URL to which you send client meeting events.

        • MeetingFeatures (dict) --

          The configuration settings of the features available to a meeting.

          • Audio (dict) --

            The configuration settings for the audio features available to a meeting.

            • EchoReduction (string) --

              Makes echo reduction available to clients who connect to the meeting.

        • MeetingId (string) --

          The Amazon Chime SDK meeting ID.

    • ContactId (string) --

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

    • ParticipantId (string) --

      The identifier for a contact participant. The ParticipantId for a contact participant is the same throughout the contact lifecycle.

    • ParticipantToken (string) --

      The token used by the contact participant to call the CreateParticipantConnection API. The participant token is valid for the lifetime of a contact participant.

AssociateAnalyticsDataSet (new) Link ¶

This API is in preview release for Amazon Connect and is subject to change.

Associates the specified dataset for a Amazon Connect instance with the target account. You can associate only one dataset in a single call.

See also: AWS API Documentation

Request Syntax

client.associate_analytics_data_set(
    InstanceId='string',
    DataSetId='string',
    TargetAccountId='string'
)
type InstanceId

string

param InstanceId

[REQUIRED]

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

type DataSetId

string

param DataSetId

[REQUIRED]

The identifier of the dataset to associate with the target account.

type TargetAccountId

string

param TargetAccountId

The identifier of the target account. Use to associate a dataset to a different account than the one containing the Amazon Connect instance. If not specified, by default this value is the Amazon Web Services account that has the Amazon Connect instance.

rtype

dict

returns

Response Syntax

{
    'DataSetId': 'string',
    'TargetAccountId': 'string',
    'ResourceShareId': 'string',
    'ResourceShareArn': 'string'
}

Response Structure

  • (dict) --

    • DataSetId (string) --

      The identifier of the dataset that was associated.

    • TargetAccountId (string) --

      The identifier of the target account.

    • ResourceShareId (string) --

      The Resource Access Manager share ID that is generated.

    • ResourceShareArn (string) --

      The Amazon Resource Name (ARN) of the Resource Access Manager share.

DisassociateFlow (new) Link ¶

Disassociates a connect resource from a flow.

See also: AWS API Documentation

Request Syntax

client.disassociate_flow(
    InstanceId='string',
    ResourceId='string',
    ResourceType='SMS_PHONE_NUMBER'
)
type InstanceId

string

param InstanceId

[REQUIRED]

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

type ResourceId

string

param ResourceId

[REQUIRED]

The identifier of the resource.

type ResourceType

string

param ResourceType

[REQUIRED]

A valid resource type.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

ListRealtimeContactAnalysisSegmentsV2 (new) Link ¶

Provides a list of analysis segments for a real-time analysis session.

See also: AWS API Documentation

Request Syntax

client.list_realtime_contact_analysis_segments_v2(
    InstanceId='string',
    ContactId='string',
    MaxResults=123,
    NextToken='string',
    OutputType='Raw'|'Redacted',
    SegmentTypes=[
        'Transcript'|'Categories'|'Issues'|'Event'|'Attachments',
    ]
)
type InstanceId

string

param InstanceId

[REQUIRED]

The identifier of the Amazon Connect 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 Amazon Connect.

type MaxResults

integer

param MaxResults

The maximum number of results to return per page.

type NextToken

string

param NextToken

The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

type OutputType

string

param OutputType

[REQUIRED]

The Contact Lens output type to be returned.

type SegmentTypes

list

param SegmentTypes

[REQUIRED]

Enum with segment types . Each value corresponds to a segment type returned in the segments list of the API. Each segment type has its own structure. Different channels may have different sets of supported segment types.

  • (string) --

rtype

dict

returns

Response Syntax

{
    'Channel': 'VOICE'|'CHAT',
    'Status': 'IN_PROGRESS'|'FAILED'|'COMPLETED',
    'Segments': [
        {
            'Transcript': {
                'Id': 'string',
                'ParticipantId': 'string',
                'ParticipantRole': 'AGENT'|'CUSTOMER'|'SYSTEM'|'CUSTOM_BOT',
                'DisplayName': 'string',
                'Content': 'string',
                'ContentType': 'string',
                'Time': {
                    'AbsoluteTime': datetime(2015, 1, 1)
                },
                'Redaction': {
                    'CharacterOffsets': [
                        {
                            'BeginOffsetChar': 123,
                            'EndOffsetChar': 123
                        },
                    ]
                },
                'Sentiment': 'POSITIVE'|'NEGATIVE'|'NEUTRAL'
            },
            'Categories': {
                'MatchedDetails': {
                    'string': {
                        'PointsOfInterest': [
                            {
                                'TranscriptItems': [
                                    {
                                        'Id': 'string',
                                        'CharacterOffsets': {
                                            'BeginOffsetChar': 123,
                                            'EndOffsetChar': 123
                                        }
                                    },
                                ]
                            },
                        ]
                    }
                }
            },
            'Issues': {
                'IssuesDetected': [
                    {
                        'TranscriptItems': [
                            {
                                'Content': 'string',
                                'Id': 'string',
                                'CharacterOffsets': {
                                    'BeginOffsetChar': 123,
                                    'EndOffsetChar': 123
                                }
                            },
                        ]
                    },
                ]
            },
            'Event': {
                'Id': 'string',
                'ParticipantId': 'string',
                'ParticipantRole': 'AGENT'|'CUSTOMER'|'SYSTEM'|'CUSTOM_BOT',
                'DisplayName': 'string',
                'EventType': 'string',
                'Time': {
                    'AbsoluteTime': datetime(2015, 1, 1)
                }
            },
            'Attachments': {
                'Id': 'string',
                'ParticipantId': 'string',
                'ParticipantRole': 'AGENT'|'CUSTOMER'|'SYSTEM'|'CUSTOM_BOT',
                'DisplayName': 'string',
                'Attachments': [
                    {
                        'AttachmentName': 'string',
                        'ContentType': 'string',
                        'AttachmentId': 'string',
                        'Status': 'APPROVED'|'REJECTED'|'IN_PROGRESS'
                    },
                ],
                'Time': {
                    'AbsoluteTime': datetime(2015, 1, 1)
                }
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Channel (string) --

      The channel of the contact. Voice will not be returned.

    • Status (string) --

      Status of real-time contact analysis.

    • Segments (list) --

      An analyzed transcript or category.

      • (dict) --

        An analyzed segment for a real-time analysis session.

        Note

        This is a Tagged Union structure. Only one of the following top level keys will be set: Transcript, Categories, Issues, Event, Attachments. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

        'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
        • Transcript (dict) --

          The analyzed transcript segment.

          • Id (string) --

            The identifier of the transcript.

          • ParticipantId (string) --

            The identifier of the participant.

          • ParticipantRole (string) --

            The role of the participant. For example, is it a customer, agent, or system.

          • DisplayName (string) --

            The display name of the participant.

          • Content (string) --

            The content of the transcript. Can be redacted.

          • ContentType (string) --

            The type of content of the item. For example, text/plain .

          • Time (dict) --

            Field describing the time of the event. It can have different representations of time.

            Note

            This is a Tagged Union structure. Only one of the following top level keys will be set: AbsoluteTime. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

            'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
            • AbsoluteTime (datetime) --

              Time represented in ISO 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 2019-11-08T02:41:28.172Z.

          • Redaction (dict) --

            Object describing redaction that was applied to the transcript. If transcript has the field it means part of the transcript was redacted.

            • CharacterOffsets (list) --

              List of character intervals each describing a part of the text that was redacted. For OutputType.Raw , part of the original text that contains data that can be redacted. For OutputType.Redacted , part of the string with redaction tag.

              • (dict) --

                Begin and end offsets for a part of text.

                • BeginOffsetChar (integer) --

                  The beginning of the character interval.

                • EndOffsetChar (integer) --

                  The end of the character interval.

          • Sentiment (string) --

            The sentiment detected for this piece of transcript.

        • Categories (dict) --

          The matched category rules.

          • MatchedDetails (dict) --

            Map between the name of the matched rule and RealTimeContactAnalysisCategoryDetails.

            • (string) --

              • (dict) --

                Provides information about the category rule that was matched.

                • PointsOfInterest (list) --

                  List of PointOfInterest - objects describing a single match of a rule.

                  • (dict) --

                    The section of the contact transcript segment that category rule was detected.

                    • TranscriptItems (list) --

                      List of the transcript items (segments) that are associated with a given point of interest.

                      • (dict) --

                        Transcript representation containing Id and list of character intervals that are associated with analysis data. For example, this object within a RealTimeContactAnalysisPointOfInterest in Category.MatchedDetails would have character interval describing part of the text that matched category.

                        • Id (string) --

                          Transcript identifier. Matches the identifier from one of the TranscriptSegments.

                        • CharacterOffsets (dict) --

                          List of character intervals within transcript content/text.

                          • BeginOffsetChar (integer) --

                            The beginning of the character interval.

                          • EndOffsetChar (integer) --

                            The end of the character interval.

        • Issues (dict) --

          Segment type containing a list of detected issues.

          • IssuesDetected (list) --

            List of the issues detected.

            • (dict) --

              Potential issues that are detected based on an artificial intelligence analysis of each turn in the conversation.

              • TranscriptItems (list) --

                List of the transcript items (segments) that are associated with a given issue.

                • (dict) --

                  Transcript representation containing Id, Content and list of character intervals that are associated with analysis data. For example, this object within an issue detected would describe both content that contains identified issue and intervals where that content is taken from.

                  • Content (string) --

                    Part of the transcript content that contains identified issue. Can be redacted

                  • Id (string) --

                    Transcript identifier. Matches the identifier from one of the TranscriptSegments.

                  • CharacterOffsets (dict) --

                    Begin and end offsets for a part of text.

                    • BeginOffsetChar (integer) --

                      The beginning of the character interval.

                    • EndOffsetChar (integer) --

                      The end of the character interval.

        • Event (dict) --

          Segment type describing a contact event.

          • Id (string) --

            The identifier of the contact event.

          • ParticipantId (string) --

            The identifier of the participant.

          • ParticipantRole (string) --

            The role of the participant. For example, is it a customer, agent, or system.

          • DisplayName (string) --

            The display name of the participant. Can be redacted.

          • EventType (string) --

            Type of the event. For example, application/vnd.amazonaws.connect.event.participant.left .

          • Time (dict) --

            Field describing the time of the event. It can have different representations of time.

            Note

            This is a Tagged Union structure. Only one of the following top level keys will be set: AbsoluteTime. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

            'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
            • AbsoluteTime (datetime) --

              Time represented in ISO 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 2019-11-08T02:41:28.172Z.

        • Attachments (dict) --

          The analyzed attachments.

          • Id (string) --

            The identifier of the segment.

          • ParticipantId (string) --

            The identifier of the participant.

          • ParticipantRole (string) --

            The role of the participant. For example, is it a customer, agent, or system.

          • DisplayName (string) --

            The display name of the participant. Can be redacted.

          • Attachments (list) --

            List of objects describing an individual attachment.

            • (dict) --

              Object that describes attached file.

              • AttachmentName (string) --

                A case-sensitive name of the attachment being uploaded. Can be redacted.

              • ContentType (string) --

                Describes the MIME file type of the attachment. For a list of supported file types, see Feature specifications in the Amazon Connect Administrator Guide .

              • AttachmentId (string) --

                A unique identifier for the attachment.

              • Status (string) --

                Status of the attachment.

          • Time (dict) --

            Field describing the time of the event. It can have different representations of time.

            Note

            This is a Tagged Union structure. Only one of the following top level keys will be set: AbsoluteTime. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

            'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
            • AbsoluteTime (datetime) --

              Time represented in ISO 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 2019-11-08T02:41:28.172Z.

    • NextToken (string) --

      If there are additional results, this is the token for the next set of results.

ImportPhoneNumber (new) Link ¶

Imports a claimed phone number from an external service, such as Amazon Pinpoint, into an Amazon Connect instance. You can call this API only in the same Amazon Web Services Region where the Amazon Connect instance was created.

See also: AWS API Documentation

Request Syntax

client.import_phone_number(
    InstanceId='string',
    SourcePhoneNumberArn='string',
    PhoneNumberDescription='string',
    Tags={
        'string': 'string'
    },
    ClientToken='string'
)
type InstanceId

string

param InstanceId

[REQUIRED]

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

type SourcePhoneNumberArn

string

param SourcePhoneNumberArn

[REQUIRED]

The claimed phone number ARN being imported from the external service, such as Amazon Pinpoint. If it is from Amazon Pinpoint, it looks like the ARN of the phone number to import from Amazon Pinpoint.

type PhoneNumberDescription

string

param PhoneNumberDescription

The description of the phone number.

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

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.

rtype

dict

returns

Response Syntax

{
    'PhoneNumberId': 'string',
    'PhoneNumberArn': 'string'
}

Response Structure

  • (dict) --

    • PhoneNumberId (string) --

      A unique identifier for the phone number.

    • PhoneNumberArn (string) --

      The Amazon Resource Name (ARN) of the phone number.

CreateRule (updated) Link ¶
Changes (request)
{'TriggerEventSource': {'EventSourceName': {'OnRealTimeChatAnalysisAvailable'}}}

Creates a rule for the specified Amazon Connect instance.

Use the Rules Function language to code conditions for the rule.

See also: AWS API Documentation

Request Syntax

client.create_rule(
    InstanceId='string',
    Name='string',
    TriggerEventSource={
        'EventSourceName': 'OnPostCallAnalysisAvailable'|'OnRealTimeCallAnalysisAvailable'|'OnRealTimeChatAnalysisAvailable'|'OnPostChatAnalysisAvailable'|'OnZendeskTicketCreate'|'OnZendeskTicketStatusUpdate'|'OnSalesforceCaseCreate'|'OnContactEvaluationSubmit'|'OnMetricDataUpdate',
        'IntegrationAssociationId': 'string'
    },
    Function='string',
    Actions=[
        {
            'ActionType': 'CREATE_TASK'|'ASSIGN_CONTACT_CATEGORY'|'GENERATE_EVENTBRIDGE_EVENT'|'SEND_NOTIFICATION',
            'TaskAction': {
                'Name': 'string',
                'Description': 'string',
                'ContactFlowId': 'string',
                'References': {
                    'string': {
                        'Value': 'string',
                        'Type': 'URL'|'ATTACHMENT'|'NUMBER'|'STRING'|'DATE'|'EMAIL'
                    }
                }
            },
            'EventBridgeAction': {
                'Name': 'string'
            },
            'AssignContactCategoryAction': {}
            ,
            'SendNotificationAction': {
                'DeliveryMethod': 'EMAIL',
                'Subject': 'string',
                'Content': 'string',
                'ContentType': 'PLAIN_TEXT',
                'Recipient': {
                    'UserTags': {
                        'string': 'string'
                    },
                    'UserIds': [
                        'string',
                    ]
                }
            }
        },
    ],
    PublishStatus='DRAFT'|'PUBLISHED',
    ClientToken='string'
)
type InstanceId

string

param InstanceId

[REQUIRED]

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

type Name

string

param Name

[REQUIRED]

A unique name for the rule.

type TriggerEventSource

dict

param TriggerEventSource

[REQUIRED]

The event source to trigger the rule.

  • EventSourceName (string) -- [REQUIRED]

    The name of the event source.

  • IntegrationAssociationId (string) --

    The identifier for the integration association.

type Function

string

param Function

[REQUIRED]

The conditions of the rule.

type Actions

list

param Actions

[REQUIRED]

A list of actions to be run when the rule is triggered.

  • (dict) --

    Information about the action to be performed when a rule is triggered.

    • ActionType (string) -- [REQUIRED]

      The type of action that creates a rule.

    • TaskAction (dict) --

      Information about the task action. This field is required if TriggerEventSource is one of the following values: OnZendeskTicketCreate | OnZendeskTicketStatusUpdate | OnSalesforceCaseCreate

      • Name (string) -- [REQUIRED]

        The name. Supports variable injection. For more information, see JSONPath reference in the Amazon Connect Administrators Guide .

      • Description (string) --

        The description. Supports variable injection. For more information, see JSONPath reference in the Amazon Connect Administrators Guide .

      • ContactFlowId (string) -- [REQUIRED]

        The identifier of the flow.

      • References (dict) --

        Information about the reference when the referenceType is URL . Otherwise, null. (Supports variable injection in the Value field.)

        • (string) --

          • (dict) --

            Well-formed data on a contact, used by agents to complete a contact request. You can have up to 4,096 UTF-8 bytes across all references for a contact.

            • Value (string) -- [REQUIRED]

              A valid value for the reference. For example, for a URL reference, a formatted URL that is displayed to an agent in the Contact Control Panel (CCP).

            • Type (string) -- [REQUIRED]

              The type of the reference. DATE must be of type Epoch timestamp.

    • EventBridgeAction (dict) --

      Information about the EventBridge action.

      Supported only for TriggerEventSource values: OnPostCallAnalysisAvailable | OnRealTimeCallAnalysisAvailable | OnRealTimeChatAnalysisAvailable | OnPostChatAnalysisAvailable | OnContactEvaluationSubmit | OnMetricDataUpdate

      • Name (string) -- [REQUIRED]

        The name.

    • AssignContactCategoryAction (dict) --

      Information about the contact category action.

      Supported only for TriggerEventSource values: OnPostCallAnalysisAvailable | OnRealTimeCallAnalysisAvailable | OnRealTimeChatAnalysisAvailable | OnPostChatAnalysisAvailable | OnZendeskTicketCreate | OnZendeskTicketStatusUpdate | OnSalesforceCaseCreate

    • SendNotificationAction (dict) --

      Information about the send notification action.

      Supported only for TriggerEventSource values: OnPostCallAnalysisAvailable | OnRealTimeCallAnalysisAvailable | OnRealTimeChatAnalysisAvailable | OnPostChatAnalysisAvailable | OnContactEvaluationSubmit | OnMetricDataUpdate

      • DeliveryMethod (string) -- [REQUIRED]

        Notification delivery method.

      • Subject (string) --

        The subject of the email if the delivery method is EMAIL . Supports variable injection. For more information, see JSONPath reference in the Amazon Connect Administrators Guide .

      • Content (string) -- [REQUIRED]

        Notification content. Supports variable injection. For more information, see JSONPath reference in the Amazon Connect Administrators Guide .

      • ContentType (string) -- [REQUIRED]

        Content type format.

      • Recipient (dict) -- [REQUIRED]

        Notification recipient.

        • UserTags (dict) --

          The tags used to organize, track, or control access for this resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }. Amazon Connect users with the specified tags will be notified.

          • (string) --

            • (string) --

        • UserIds (list) --

          A list of user IDs.

          • (string) --

type PublishStatus

string

param PublishStatus

[REQUIRED]

The publish status of the rule.

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.

rtype

dict

returns

Response Syntax

{
    'RuleArn': 'string',
    'RuleId': 'string'
}

Response Structure

  • (dict) --

    • RuleArn (string) --

      The Amazon Resource Name (ARN) of the rule.

    • RuleId (string) --

      A unique identifier for the rule.

DescribePhoneNumber (updated) Link ¶
Changes (response)
{'ClaimedPhoneNumberSummary': {'PhoneNumberType': {'SHORT_CODE'},
                               'SourcePhoneNumberArn': 'string'}}

Gets details and status of a phone number that’s claimed to your Amazon Connect instance or traffic distribution group.

Warning

If the number is claimed to a traffic distribution group, and you are calling in the Amazon Web Services Region where the traffic distribution group was created, you can use either a phone number ARN or UUID value for the PhoneNumberId URI request parameter. However, if the number is claimed to a traffic distribution group and you are calling this API in the alternate Amazon Web Services Region associated with the traffic distribution group, you must provide a full phone number ARN. If a UUID is provided in this scenario, you will receive a ResourceNotFoundException .

See also: AWS API Documentation

Request Syntax

client.describe_phone_number(
    PhoneNumberId='string'
)
type PhoneNumberId

string

param PhoneNumberId

[REQUIRED]

A unique identifier for the phone number.

rtype

dict

returns

Response Syntax

{
    'ClaimedPhoneNumberSummary': {
        'PhoneNumberId': 'string',
        'PhoneNumberArn': 'string',
        'PhoneNumber': 'string',
        'PhoneNumberCountryCode': 'AF'|'AL'|'DZ'|'AS'|'AD'|'AO'|'AI'|'AQ'|'AG'|'AR'|'AM'|'AW'|'AU'|'AT'|'AZ'|'BS'|'BH'|'BD'|'BB'|'BY'|'BE'|'BZ'|'BJ'|'BM'|'BT'|'BO'|'BA'|'BW'|'BR'|'IO'|'VG'|'BN'|'BG'|'BF'|'BI'|'KH'|'CM'|'CA'|'CV'|'KY'|'CF'|'TD'|'CL'|'CN'|'CX'|'CC'|'CO'|'KM'|'CK'|'CR'|'HR'|'CU'|'CW'|'CY'|'CZ'|'CD'|'DK'|'DJ'|'DM'|'DO'|'TL'|'EC'|'EG'|'SV'|'GQ'|'ER'|'EE'|'ET'|'FK'|'FO'|'FJ'|'FI'|'FR'|'PF'|'GA'|'GM'|'GE'|'DE'|'GH'|'GI'|'GR'|'GL'|'GD'|'GU'|'GT'|'GG'|'GN'|'GW'|'GY'|'HT'|'HN'|'HK'|'HU'|'IS'|'IN'|'ID'|'IR'|'IQ'|'IE'|'IM'|'IL'|'IT'|'CI'|'JM'|'JP'|'JE'|'JO'|'KZ'|'KE'|'KI'|'KW'|'KG'|'LA'|'LV'|'LB'|'LS'|'LR'|'LY'|'LI'|'LT'|'LU'|'MO'|'MK'|'MG'|'MW'|'MY'|'MV'|'ML'|'MT'|'MH'|'MR'|'MU'|'YT'|'MX'|'FM'|'MD'|'MC'|'MN'|'ME'|'MS'|'MA'|'MZ'|'MM'|'NA'|'NR'|'NP'|'NL'|'AN'|'NC'|'NZ'|'NI'|'NE'|'NG'|'NU'|'KP'|'MP'|'NO'|'OM'|'PK'|'PW'|'PA'|'PG'|'PY'|'PE'|'PH'|'PN'|'PL'|'PT'|'PR'|'QA'|'CG'|'RE'|'RO'|'RU'|'RW'|'BL'|'SH'|'KN'|'LC'|'MF'|'PM'|'VC'|'WS'|'SM'|'ST'|'SA'|'SN'|'RS'|'SC'|'SL'|'SG'|'SX'|'SK'|'SI'|'SB'|'SO'|'ZA'|'KR'|'ES'|'LK'|'SD'|'SR'|'SJ'|'SZ'|'SE'|'CH'|'SY'|'TW'|'TJ'|'TZ'|'TH'|'TG'|'TK'|'TO'|'TT'|'TN'|'TR'|'TM'|'TC'|'TV'|'VI'|'UG'|'UA'|'AE'|'GB'|'US'|'UY'|'UZ'|'VU'|'VA'|'VE'|'VN'|'WF'|'EH'|'YE'|'ZM'|'ZW',
        'PhoneNumberType': 'TOLL_FREE'|'DID'|'UIFN'|'SHARED'|'THIRD_PARTY_TF'|'THIRD_PARTY_DID'|'SHORT_CODE',
        'PhoneNumberDescription': 'string',
        'TargetArn': 'string',
        'InstanceId': 'string',
        'Tags': {
            'string': 'string'
        },
        'PhoneNumberStatus': {
            'Status': 'CLAIMED'|'IN_PROGRESS'|'FAILED',
            'Message': 'string'
        },
        'SourcePhoneNumberArn': 'string'
    }
}

Response Structure

  • (dict) --

    • ClaimedPhoneNumberSummary (dict) --

      Information about a phone number that's been claimed to your Amazon Connect instance or traffic distribution group.

      • PhoneNumberId (string) --

        A unique identifier for the phone number.

      • PhoneNumberArn (string) --

        The Amazon Resource Name (ARN) of the phone number.

      • PhoneNumber (string) --

        The phone number. Phone numbers are formatted [+] [country code] [subscriber number including area code] .

      • PhoneNumberCountryCode (string) --

        The ISO country code.

      • PhoneNumberType (string) --

        The type of phone number.

      • PhoneNumberDescription (string) --

        The description of the phone number.

      • TargetArn (string) --

        The Amazon Resource Name (ARN) for Amazon Connect instances or traffic distribution groups that phone number inbound traffic is routed through.

      • InstanceId (string) --

        The identifier of the Amazon Connect instance that phone numbers are claimed to. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

      • Tags (dict) --

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

        • (string) --

          • (string) --

      • PhoneNumberStatus (dict) --

        The status of the phone number.

        • CLAIMED means the previous ClaimPhoneNumber or UpdatePhoneNumber operation succeeded.

        • IN_PROGRESS means a ClaimPhoneNumber, UpdatePhoneNumber, or UpdatePhoneNumberMetadata operation is still in progress and has not yet completed. You can call DescribePhoneNumber at a later time to verify if the previous operation has completed.

        • FAILED indicates that the previous ClaimPhoneNumber or UpdatePhoneNumber operation has failed. It will include a message indicating the failure reason. A common reason for a failure may be that the TargetArn value you are claiming or updating a phone number to has reached its limit of total claimed numbers. If you received a FAILED status from a ClaimPhoneNumber API call, you have one day to retry claiming the phone number before the number is released back to the inventory for other customers to claim.

        Note

        You will not be billed for the phone number during the 1-day period if number claiming fails.

        • Status (string) --

          The status.

        • Message (string) --

          The status message.

      • SourcePhoneNumberArn (string) --

        The claimed phone number ARN that was previously imported from the external service, such as Amazon Pinpoint. If it is from Amazon Pinpoint, it looks like the ARN of the phone number that was imported from Amazon Pinpoint.

DescribeRule (updated) Link ¶
Changes (response)
{'Rule': {'TriggerEventSource': {'EventSourceName': {'OnRealTimeChatAnalysisAvailable'}}}}

Describes a rule for the specified Amazon Connect instance.

See also: AWS API Documentation

Request Syntax

client.describe_rule(
    InstanceId='string',
    RuleId='string'
)
type InstanceId

string

param InstanceId

[REQUIRED]

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

type RuleId

string

param RuleId

[REQUIRED]

A unique identifier for the rule.

rtype

dict

returns

Response Syntax

{
    'Rule': {
        'Name': 'string',
        'RuleId': 'string',
        'RuleArn': 'string',
        'TriggerEventSource': {
            'EventSourceName': 'OnPostCallAnalysisAvailable'|'OnRealTimeCallAnalysisAvailable'|'OnRealTimeChatAnalysisAvailable'|'OnPostChatAnalysisAvailable'|'OnZendeskTicketCreate'|'OnZendeskTicketStatusUpdate'|'OnSalesforceCaseCreate'|'OnContactEvaluationSubmit'|'OnMetricDataUpdate',
            'IntegrationAssociationId': 'string'
        },
        'Function': 'string',
        'Actions': [
            {
                'ActionType': 'CREATE_TASK'|'ASSIGN_CONTACT_CATEGORY'|'GENERATE_EVENTBRIDGE_EVENT'|'SEND_NOTIFICATION',
                'TaskAction': {
                    'Name': 'string',
                    'Description': 'string',
                    'ContactFlowId': 'string',
                    'References': {
                        'string': {
                            'Value': 'string',
                            'Type': 'URL'|'ATTACHMENT'|'NUMBER'|'STRING'|'DATE'|'EMAIL'
                        }
                    }
                },
                'EventBridgeAction': {
                    'Name': 'string'
                },
                'AssignContactCategoryAction': {},
                'SendNotificationAction': {
                    'DeliveryMethod': 'EMAIL',
                    'Subject': 'string',
                    'Content': 'string',
                    'ContentType': 'PLAIN_TEXT',
                    'Recipient': {
                        'UserTags': {
                            'string': 'string'
                        },
                        'UserIds': [
                            'string',
                        ]
                    }
                }
            },
        ],
        'PublishStatus': 'DRAFT'|'PUBLISHED',
        'CreatedTime': datetime(2015, 1, 1),
        'LastUpdatedTime': datetime(2015, 1, 1),
        'LastUpdatedBy': 'string',
        'Tags': {
            'string': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • Rule (dict) --

      Information about the rule.

      • Name (string) --

        The name of the rule.

      • RuleId (string) --

        A unique identifier for the rule.

      • RuleArn (string) --

        The Amazon Resource Name (ARN) of the rule.

      • TriggerEventSource (dict) --

        The event source to trigger the rule.

        • EventSourceName (string) --

          The name of the event source.

        • IntegrationAssociationId (string) --

          The identifier for the integration association.

      • Function (string) --

        The conditions of the rule.

      • Actions (list) --

        A list of actions to be run when the rule is triggered.

        • (dict) --

          Information about the action to be performed when a rule is triggered.

          • ActionType (string) --

            The type of action that creates a rule.

          • TaskAction (dict) --

            Information about the task action. This field is required if TriggerEventSource is one of the following values: OnZendeskTicketCreate | OnZendeskTicketStatusUpdate | OnSalesforceCaseCreate

            • Name (string) --

              The name. Supports variable injection. For more information, see JSONPath reference in the Amazon Connect Administrators Guide .

            • Description (string) --

              The description. Supports variable injection. For more information, see JSONPath reference in the Amazon Connect Administrators Guide .

            • ContactFlowId (string) --

              The identifier of the flow.

            • References (dict) --

              Information about the reference when the referenceType is URL . Otherwise, null. (Supports variable injection in the Value field.)

              • (string) --

                • (dict) --

                  Well-formed data on a contact, used by agents to complete a contact request. You can have up to 4,096 UTF-8 bytes across all references for a contact.

                  • Value (string) --

                    A valid value for the reference. For example, for a URL reference, a formatted URL that is displayed to an agent in the Contact Control Panel (CCP).

                  • Type (string) --

                    The type of the reference. DATE must be of type Epoch timestamp.

          • EventBridgeAction (dict) --

            Information about the EventBridge action.

            Supported only for TriggerEventSource values: OnPostCallAnalysisAvailable | OnRealTimeCallAnalysisAvailable | OnRealTimeChatAnalysisAvailable | OnPostChatAnalysisAvailable | OnContactEvaluationSubmit | OnMetricDataUpdate

            • Name (string) --

              The name.

          • AssignContactCategoryAction (dict) --

            Information about the contact category action.

            Supported only for TriggerEventSource values: OnPostCallAnalysisAvailable | OnRealTimeCallAnalysisAvailable | OnRealTimeChatAnalysisAvailable | OnPostChatAnalysisAvailable | OnZendeskTicketCreate | OnZendeskTicketStatusUpdate | OnSalesforceCaseCreate

          • SendNotificationAction (dict) --

            Information about the send notification action.

            Supported only for TriggerEventSource values: OnPostCallAnalysisAvailable | OnRealTimeCallAnalysisAvailable | OnRealTimeChatAnalysisAvailable | OnPostChatAnalysisAvailable | OnContactEvaluationSubmit | OnMetricDataUpdate

            • DeliveryMethod (string) --

              Notification delivery method.

            • Subject (string) --

              The subject of the email if the delivery method is EMAIL . Supports variable injection. For more information, see JSONPath reference in the Amazon Connect Administrators Guide .

            • Content (string) --

              Notification content. Supports variable injection. For more information, see JSONPath reference in the Amazon Connect Administrators Guide .

            • ContentType (string) --

              Content type format.

            • Recipient (dict) --

              Notification recipient.

              • UserTags (dict) --

                The tags used to organize, track, or control access for this resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }. Amazon Connect users with the specified tags will be notified.

                • (string) --

                  • (string) --

              • UserIds (list) --

                A list of user IDs.

                • (string) --

      • PublishStatus (string) --

        The publish status of the rule.

      • CreatedTime (datetime) --

        The timestamp for when the rule was created.

      • LastUpdatedTime (datetime) --

        The timestamp for the when the rule was last updated.

      • LastUpdatedBy (string) --

        The Amazon Resource Name (ARN) of the user who last updated the rule.

      • Tags (dict) --

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

        • (string) --

          • (string) --

ListPhoneNumbers (updated) Link ¶
Changes (request, response)
Request
{'PhoneNumberTypes': {'SHORT_CODE'}}
Response
{'PhoneNumberSummaryList': {'PhoneNumberType': {'SHORT_CODE'}}}

Provides information about the phone numbers for the specified Amazon Connect instance.

For more information about phone numbers, see Set Up Phone Numbers for Your Contact Center in the Amazon Connect Administrator Guide .

Warning

  • We recommend using ListPhoneNumbersV2 to return phone number types. ListPhoneNumbers doesn't support number types UIFN , SHARED , THIRD_PARTY_TF , and THIRD_PARTY_DID . While it returns numbers of those types, it incorrectly lists them as TOLL_FREE or DID .

  • The phone number Arn value that is returned from each of the items in the PhoneNumberSummaryList cannot be used to tag phone number resources. It will fail with a ResourceNotFoundException . Instead, use the ListPhoneNumbersV2 API. It returns the new phone number ARN that can be used to tag phone number resources.

See also: AWS API Documentation

Request Syntax

client.list_phone_numbers(
    InstanceId='string',
    PhoneNumberTypes=[
        'TOLL_FREE'|'DID'|'UIFN'|'SHARED'|'THIRD_PARTY_TF'|'THIRD_PARTY_DID'|'SHORT_CODE',
    ],
    PhoneNumberCountryCodes=[
        'AF'|'AL'|'DZ'|'AS'|'AD'|'AO'|'AI'|'AQ'|'AG'|'AR'|'AM'|'AW'|'AU'|'AT'|'AZ'|'BS'|'BH'|'BD'|'BB'|'BY'|'BE'|'BZ'|'BJ'|'BM'|'BT'|'BO'|'BA'|'BW'|'BR'|'IO'|'VG'|'BN'|'BG'|'BF'|'BI'|'KH'|'CM'|'CA'|'CV'|'KY'|'CF'|'TD'|'CL'|'CN'|'CX'|'CC'|'CO'|'KM'|'CK'|'CR'|'HR'|'CU'|'CW'|'CY'|'CZ'|'CD'|'DK'|'DJ'|'DM'|'DO'|'TL'|'EC'|'EG'|'SV'|'GQ'|'ER'|'EE'|'ET'|'FK'|'FO'|'FJ'|'FI'|'FR'|'PF'|'GA'|'GM'|'GE'|'DE'|'GH'|'GI'|'GR'|'GL'|'GD'|'GU'|'GT'|'GG'|'GN'|'GW'|'GY'|'HT'|'HN'|'HK'|'HU'|'IS'|'IN'|'ID'|'IR'|'IQ'|'IE'|'IM'|'IL'|'IT'|'CI'|'JM'|'JP'|'JE'|'JO'|'KZ'|'KE'|'KI'|'KW'|'KG'|'LA'|'LV'|'LB'|'LS'|'LR'|'LY'|'LI'|'LT'|'LU'|'MO'|'MK'|'MG'|'MW'|'MY'|'MV'|'ML'|'MT'|'MH'|'MR'|'MU'|'YT'|'MX'|'FM'|'MD'|'MC'|'MN'|'ME'|'MS'|'MA'|'MZ'|'MM'|'NA'|'NR'|'NP'|'NL'|'AN'|'NC'|'NZ'|'NI'|'NE'|'NG'|'NU'|'KP'|'MP'|'NO'|'OM'|'PK'|'PW'|'PA'|'PG'|'PY'|'PE'|'PH'|'PN'|'PL'|'PT'|'PR'|'QA'|'CG'|'RE'|'RO'|'RU'|'RW'|'BL'|'SH'|'KN'|'LC'|'MF'|'PM'|'VC'|'WS'|'SM'|'ST'|'SA'|'SN'|'RS'|'SC'|'SL'|'SG'|'SX'|'SK'|'SI'|'SB'|'SO'|'ZA'|'KR'|'ES'|'LK'|'SD'|'SR'|'SJ'|'SZ'|'SE'|'CH'|'SY'|'TW'|'TJ'|'TZ'|'TH'|'TG'|'TK'|'TO'|'TT'|'TN'|'TR'|'TM'|'TC'|'TV'|'VI'|'UG'|'UA'|'AE'|'GB'|'US'|'UY'|'UZ'|'VU'|'VA'|'VE'|'VN'|'WF'|'EH'|'YE'|'ZM'|'ZW',
    ],
    NextToken='string',
    MaxResults=123
)
type InstanceId

string

param InstanceId

[REQUIRED]

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

type PhoneNumberTypes

list

param PhoneNumberTypes

The type of phone number.

Note

We recommend using ListPhoneNumbersV2 to return phone number types. While ListPhoneNumbers returns number types UIFN , SHARED , THIRD_PARTY_TF , and THIRD_PARTY_DID , it incorrectly lists them as TOLL_FREE or DID .

  • (string) --

type PhoneNumberCountryCodes

list

param PhoneNumberCountryCodes

The ISO country code.

  • (string) --

type NextToken

string

param NextToken

The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

type MaxResults

integer

param MaxResults

The maximum number of results to return per page. The default MaxResult size is 100.

rtype

dict

returns

Response Syntax

{
    'PhoneNumberSummaryList': [
        {
            'Id': 'string',
            'Arn': 'string',
            'PhoneNumber': 'string',
            'PhoneNumberType': 'TOLL_FREE'|'DID'|'UIFN'|'SHARED'|'THIRD_PARTY_TF'|'THIRD_PARTY_DID'|'SHORT_CODE',
            'PhoneNumberCountryCode': 'AF'|'AL'|'DZ'|'AS'|'AD'|'AO'|'AI'|'AQ'|'AG'|'AR'|'AM'|'AW'|'AU'|'AT'|'AZ'|'BS'|'BH'|'BD'|'BB'|'BY'|'BE'|'BZ'|'BJ'|'BM'|'BT'|'BO'|'BA'|'BW'|'BR'|'IO'|'VG'|'BN'|'BG'|'BF'|'BI'|'KH'|'CM'|'CA'|'CV'|'KY'|'CF'|'TD'|'CL'|'CN'|'CX'|'CC'|'CO'|'KM'|'CK'|'CR'|'HR'|'CU'|'CW'|'CY'|'CZ'|'CD'|'DK'|'DJ'|'DM'|'DO'|'TL'|'EC'|'EG'|'SV'|'GQ'|'ER'|'EE'|'ET'|'FK'|'FO'|'FJ'|'FI'|'FR'|'PF'|'GA'|'GM'|'GE'|'DE'|'GH'|'GI'|'GR'|'GL'|'GD'|'GU'|'GT'|'GG'|'GN'|'GW'|'GY'|'HT'|'HN'|'HK'|'HU'|'IS'|'IN'|'ID'|'IR'|'IQ'|'IE'|'IM'|'IL'|'IT'|'CI'|'JM'|'JP'|'JE'|'JO'|'KZ'|'KE'|'KI'|'KW'|'KG'|'LA'|'LV'|'LB'|'LS'|'LR'|'LY'|'LI'|'LT'|'LU'|'MO'|'MK'|'MG'|'MW'|'MY'|'MV'|'ML'|'MT'|'MH'|'MR'|'MU'|'YT'|'MX'|'FM'|'MD'|'MC'|'MN'|'ME'|'MS'|'MA'|'MZ'|'MM'|'NA'|'NR'|'NP'|'NL'|'AN'|'NC'|'NZ'|'NI'|'NE'|'NG'|'NU'|'KP'|'MP'|'NO'|'OM'|'PK'|'PW'|'PA'|'PG'|'PY'|'PE'|'PH'|'PN'|'PL'|'PT'|'PR'|'QA'|'CG'|'RE'|'RO'|'RU'|'RW'|'BL'|'SH'|'KN'|'LC'|'MF'|'PM'|'VC'|'WS'|'SM'|'ST'|'SA'|'SN'|'RS'|'SC'|'SL'|'SG'|'SX'|'SK'|'SI'|'SB'|'SO'|'ZA'|'KR'|'ES'|'LK'|'SD'|'SR'|'SJ'|'SZ'|'SE'|'CH'|'SY'|'TW'|'TJ'|'TZ'|'TH'|'TG'|'TK'|'TO'|'TT'|'TN'|'TR'|'TM'|'TC'|'TV'|'VI'|'UG'|'UA'|'AE'|'GB'|'US'|'UY'|'UZ'|'VU'|'VA'|'VE'|'VN'|'WF'|'EH'|'YE'|'ZM'|'ZW'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • PhoneNumberSummaryList (list) --

      Information about the phone numbers.

      • (dict) --

        Contains summary information about a phone number for a contact center.

        • Id (string) --

          The identifier of the phone number.

        • Arn (string) --

          The Amazon Resource Name (ARN) of the phone number.

        • PhoneNumber (string) --

          The phone number.

        • PhoneNumberType (string) --

          The type of phone number.

        • PhoneNumberCountryCode (string) --

          The ISO country code.

    • NextToken (string) --

      If there are additional results, this is the token for the next set of results.

ListPhoneNumbersV2 (updated) Link ¶
Changes (request, response)
Request
{'PhoneNumberTypes': {'SHORT_CODE'}}
Response
{'ListPhoneNumbersSummaryList': {'PhoneNumberDescription': 'string',
                                 'PhoneNumberType': {'SHORT_CODE'},
                                 'SourcePhoneNumberArn': 'string'}}

Lists phone numbers claimed to your Amazon Connect instance or traffic distribution group. If the provided TargetArn is a traffic distribution group, you can call this API in both Amazon Web Services Regions associated with traffic distribution group.

For more information about phone numbers, see Set Up Phone Numbers for Your Contact Center in the Amazon Connect Administrator Guide .

Note

  • When given an instance ARN, ListPhoneNumbersV2 returns only the phone numbers claimed to the instance.

  • When given a traffic distribution group ARN ListPhoneNumbersV2 returns only the phone numbers claimed to the traffic distribution group.

See also: AWS API Documentation

Request Syntax

client.list_phone_numbers_v2(
    TargetArn='string',
    InstanceId='string',
    MaxResults=123,
    NextToken='string',
    PhoneNumberCountryCodes=[
        'AF'|'AL'|'DZ'|'AS'|'AD'|'AO'|'AI'|'AQ'|'AG'|'AR'|'AM'|'AW'|'AU'|'AT'|'AZ'|'BS'|'BH'|'BD'|'BB'|'BY'|'BE'|'BZ'|'BJ'|'BM'|'BT'|'BO'|'BA'|'BW'|'BR'|'IO'|'VG'|'BN'|'BG'|'BF'|'BI'|'KH'|'CM'|'CA'|'CV'|'KY'|'CF'|'TD'|'CL'|'CN'|'CX'|'CC'|'CO'|'KM'|'CK'|'CR'|'HR'|'CU'|'CW'|'CY'|'CZ'|'CD'|'DK'|'DJ'|'DM'|'DO'|'TL'|'EC'|'EG'|'SV'|'GQ'|'ER'|'EE'|'ET'|'FK'|'FO'|'FJ'|'FI'|'FR'|'PF'|'GA'|'GM'|'GE'|'DE'|'GH'|'GI'|'GR'|'GL'|'GD'|'GU'|'GT'|'GG'|'GN'|'GW'|'GY'|'HT'|'HN'|'HK'|'HU'|'IS'|'IN'|'ID'|'IR'|'IQ'|'IE'|'IM'|'IL'|'IT'|'CI'|'JM'|'JP'|'JE'|'JO'|'KZ'|'KE'|'KI'|'KW'|'KG'|'LA'|'LV'|'LB'|'LS'|'LR'|'LY'|'LI'|'LT'|'LU'|'MO'|'MK'|'MG'|'MW'|'MY'|'MV'|'ML'|'MT'|'MH'|'MR'|'MU'|'YT'|'MX'|'FM'|'MD'|'MC'|'MN'|'ME'|'MS'|'MA'|'MZ'|'MM'|'NA'|'NR'|'NP'|'NL'|'AN'|'NC'|'NZ'|'NI'|'NE'|'NG'|'NU'|'KP'|'MP'|'NO'|'OM'|'PK'|'PW'|'PA'|'PG'|'PY'|'PE'|'PH'|'PN'|'PL'|'PT'|'PR'|'QA'|'CG'|'RE'|'RO'|'RU'|'RW'|'BL'|'SH'|'KN'|'LC'|'MF'|'PM'|'VC'|'WS'|'SM'|'ST'|'SA'|'SN'|'RS'|'SC'|'SL'|'SG'|'SX'|'SK'|'SI'|'SB'|'SO'|'ZA'|'KR'|'ES'|'LK'|'SD'|'SR'|'SJ'|'SZ'|'SE'|'CH'|'SY'|'TW'|'TJ'|'TZ'|'TH'|'TG'|'TK'|'TO'|'TT'|'TN'|'TR'|'TM'|'TC'|'TV'|'VI'|'UG'|'UA'|'AE'|'GB'|'US'|'UY'|'UZ'|'VU'|'VA'|'VE'|'VN'|'WF'|'EH'|'YE'|'ZM'|'ZW',
    ],
    PhoneNumberTypes=[
        'TOLL_FREE'|'DID'|'UIFN'|'SHARED'|'THIRD_PARTY_TF'|'THIRD_PARTY_DID'|'SHORT_CODE',
    ],
    PhoneNumberPrefix='string'
)
type TargetArn

string

param TargetArn

The Amazon Resource Name (ARN) for Amazon Connect instances or traffic distribution groups that phone number inbound traffic is routed through. If both TargetArn and InstanceId input are not provided, this API lists numbers claimed to all the Amazon Connect instances belonging to your account in the same Amazon Web Services Region as the request.

type InstanceId

string

param InstanceId

The identifier of the Amazon Connect instance that phone numbers are claimed to. You can find the instance ID in the Amazon Resource Name (ARN) of the instance. If both TargetArn and InstanceId are not provided, this API lists numbers claimed to all the Amazon Connect instances belonging to your account in the same AWS Region as the request.

type MaxResults

integer

param MaxResults

The maximum number of results to return per page.

type NextToken

string

param NextToken

The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

type PhoneNumberCountryCodes

list

param PhoneNumberCountryCodes

The ISO country code.

  • (string) --

type PhoneNumberTypes

list

param PhoneNumberTypes

The type of phone number.

  • (string) --

type PhoneNumberPrefix

string

param PhoneNumberPrefix

The prefix of the phone number. If provided, it must contain + as part of the country code.

rtype

dict

returns

Response Syntax

{
    'NextToken': 'string',
    'ListPhoneNumbersSummaryList': [
        {
            'PhoneNumberId': 'string',
            'PhoneNumberArn': 'string',
            'PhoneNumber': 'string',
            'PhoneNumberCountryCode': 'AF'|'AL'|'DZ'|'AS'|'AD'|'AO'|'AI'|'AQ'|'AG'|'AR'|'AM'|'AW'|'AU'|'AT'|'AZ'|'BS'|'BH'|'BD'|'BB'|'BY'|'BE'|'BZ'|'BJ'|'BM'|'BT'|'BO'|'BA'|'BW'|'BR'|'IO'|'VG'|'BN'|'BG'|'BF'|'BI'|'KH'|'CM'|'CA'|'CV'|'KY'|'CF'|'TD'|'CL'|'CN'|'CX'|'CC'|'CO'|'KM'|'CK'|'CR'|'HR'|'CU'|'CW'|'CY'|'CZ'|'CD'|'DK'|'DJ'|'DM'|'DO'|'TL'|'EC'|'EG'|'SV'|'GQ'|'ER'|'EE'|'ET'|'FK'|'FO'|'FJ'|'FI'|'FR'|'PF'|'GA'|'GM'|'GE'|'DE'|'GH'|'GI'|'GR'|'GL'|'GD'|'GU'|'GT'|'GG'|'GN'|'GW'|'GY'|'HT'|'HN'|'HK'|'HU'|'IS'|'IN'|'ID'|'IR'|'IQ'|'IE'|'IM'|'IL'|'IT'|'CI'|'JM'|'JP'|'JE'|'JO'|'KZ'|'KE'|'KI'|'KW'|'KG'|'LA'|'LV'|'LB'|'LS'|'LR'|'LY'|'LI'|'LT'|'LU'|'MO'|'MK'|'MG'|'MW'|'MY'|'MV'|'ML'|'MT'|'MH'|'MR'|'MU'|'YT'|'MX'|'FM'|'MD'|'MC'|'MN'|'ME'|'MS'|'MA'|'MZ'|'MM'|'NA'|'NR'|'NP'|'NL'|'AN'|'NC'|'NZ'|'NI'|'NE'|'NG'|'NU'|'KP'|'MP'|'NO'|'OM'|'PK'|'PW'|'PA'|'PG'|'PY'|'PE'|'PH'|'PN'|'PL'|'PT'|'PR'|'QA'|'CG'|'RE'|'RO'|'RU'|'RW'|'BL'|'SH'|'KN'|'LC'|'MF'|'PM'|'VC'|'WS'|'SM'|'ST'|'SA'|'SN'|'RS'|'SC'|'SL'|'SG'|'SX'|'SK'|'SI'|'SB'|'SO'|'ZA'|'KR'|'ES'|'LK'|'SD'|'SR'|'SJ'|'SZ'|'SE'|'CH'|'SY'|'TW'|'TJ'|'TZ'|'TH'|'TG'|'TK'|'TO'|'TT'|'TN'|'TR'|'TM'|'TC'|'TV'|'VI'|'UG'|'UA'|'AE'|'GB'|'US'|'UY'|'UZ'|'VU'|'VA'|'VE'|'VN'|'WF'|'EH'|'YE'|'ZM'|'ZW',
            'PhoneNumberType': 'TOLL_FREE'|'DID'|'UIFN'|'SHARED'|'THIRD_PARTY_TF'|'THIRD_PARTY_DID'|'SHORT_CODE',
            'TargetArn': 'string',
            'InstanceId': 'string',
            'PhoneNumberDescription': 'string',
            'SourcePhoneNumberArn': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • NextToken (string) --

      If there are additional results, this is the token for the next set of results.

    • ListPhoneNumbersSummaryList (list) --

      Information about phone numbers that have been claimed to your Amazon Connect instances or traffic distribution groups.

      • (dict) --

        Information about phone numbers that have been claimed to your Amazon Connect instance or traffic distribution group.

        • PhoneNumberId (string) --

          A unique identifier for the phone number.

        • PhoneNumberArn (string) --

          The Amazon Resource Name (ARN) of the phone number.

        • PhoneNumber (string) --

          The phone number. Phone numbers are formatted [+] [country code] [subscriber number including area code] .

        • PhoneNumberCountryCode (string) --

          The ISO country code.

        • PhoneNumberType (string) --

          The type of phone number.

        • TargetArn (string) --

          The Amazon Resource Name (ARN) for Amazon Connect instances or traffic distribution groups that phone number inbound traffic is routed through.

        • InstanceId (string) --

          The identifier of the Amazon Connect instance that phone numbers are claimed to. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

        • PhoneNumberDescription (string) --

          The description of the phone number.

        • SourcePhoneNumberArn (string) --

          The claimed phone number ARN that was previously imported from the external service, such as Amazon Pinpoint. If it is from Amazon Pinpoint, it looks like the ARN of the phone number that was imported from Amazon Pinpoint.

ListRules (updated) Link ¶
Changes (request, response)
Request
{'EventSourceName': {'OnRealTimeChatAnalysisAvailable'}}
Response
{'RuleSummaryList': {'EventSourceName': {'OnRealTimeChatAnalysisAvailable'}}}

List all rules for the specified Amazon Connect instance.

See also: AWS API Documentation

Request Syntax

client.list_rules(
    InstanceId='string',
    PublishStatus='DRAFT'|'PUBLISHED',
    EventSourceName='OnPostCallAnalysisAvailable'|'OnRealTimeCallAnalysisAvailable'|'OnRealTimeChatAnalysisAvailable'|'OnPostChatAnalysisAvailable'|'OnZendeskTicketCreate'|'OnZendeskTicketStatusUpdate'|'OnSalesforceCaseCreate'|'OnContactEvaluationSubmit'|'OnMetricDataUpdate',
    MaxResults=123,
    NextToken='string'
)
type InstanceId

string

param InstanceId

[REQUIRED]

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

type PublishStatus

string

param PublishStatus

The publish status of the rule.

type EventSourceName

string

param EventSourceName

The name of the event source.

type MaxResults

integer

param MaxResults

The maximum number of results to return per page.

type NextToken

string

param NextToken

The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

rtype

dict

returns

Response Syntax

{
    'RuleSummaryList': [
        {
            'Name': 'string',
            'RuleId': 'string',
            'RuleArn': 'string',
            'EventSourceName': 'OnPostCallAnalysisAvailable'|'OnRealTimeCallAnalysisAvailable'|'OnRealTimeChatAnalysisAvailable'|'OnPostChatAnalysisAvailable'|'OnZendeskTicketCreate'|'OnZendeskTicketStatusUpdate'|'OnSalesforceCaseCreate'|'OnContactEvaluationSubmit'|'OnMetricDataUpdate',
            'PublishStatus': 'DRAFT'|'PUBLISHED',
            'ActionSummaries': [
                {
                    'ActionType': 'CREATE_TASK'|'ASSIGN_CONTACT_CATEGORY'|'GENERATE_EVENTBRIDGE_EVENT'|'SEND_NOTIFICATION'
                },
            ],
            'CreatedTime': datetime(2015, 1, 1),
            'LastUpdatedTime': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • RuleSummaryList (list) --

      Summary information about a rule.

      • (dict) --

        A list of ActionTypes associated with a rule.

        • Name (string) --

          The name of the rule.

        • RuleId (string) --

          A unique identifier for the rule.

        • RuleArn (string) --

          The Amazon Resource Name (ARN) of the rule.

        • EventSourceName (string) --

          The name of the event source.

        • PublishStatus (string) --

          The publish status of the rule.

        • ActionSummaries (list) --

          A list of ActionTypes associated with a rule.

          • (dict) --

            Information about an action.

            • ActionType (string) --

              The action type.

        • CreatedTime (datetime) --

          The timestamp for when the rule was created.

        • LastUpdatedTime (datetime) --

          The timestamp for when the rule was last updated.

    • NextToken (string) --

      If there are additional results, this is the token for the next set of results.

SearchAvailablePhoneNumbers (updated) Link ¶
Changes (request, response)
Request
{'PhoneNumberType': {'SHORT_CODE'}}
Response
{'AvailableNumbersList': {'PhoneNumberType': {'SHORT_CODE'}}}

Searches for available phone numbers that you can claim to your Amazon Connect instance or traffic distribution group. If the provided TargetArn is a traffic distribution group, you can call this API in both Amazon Web Services Regions associated with the traffic distribution group.

See also: AWS API Documentation

Request Syntax

client.search_available_phone_numbers(
    TargetArn='string',
    InstanceId='string',
    PhoneNumberCountryCode='AF'|'AL'|'DZ'|'AS'|'AD'|'AO'|'AI'|'AQ'|'AG'|'AR'|'AM'|'AW'|'AU'|'AT'|'AZ'|'BS'|'BH'|'BD'|'BB'|'BY'|'BE'|'BZ'|'BJ'|'BM'|'BT'|'BO'|'BA'|'BW'|'BR'|'IO'|'VG'|'BN'|'BG'|'BF'|'BI'|'KH'|'CM'|'CA'|'CV'|'KY'|'CF'|'TD'|'CL'|'CN'|'CX'|'CC'|'CO'|'KM'|'CK'|'CR'|'HR'|'CU'|'CW'|'CY'|'CZ'|'CD'|'DK'|'DJ'|'DM'|'DO'|'TL'|'EC'|'EG'|'SV'|'GQ'|'ER'|'EE'|'ET'|'FK'|'FO'|'FJ'|'FI'|'FR'|'PF'|'GA'|'GM'|'GE'|'DE'|'GH'|'GI'|'GR'|'GL'|'GD'|'GU'|'GT'|'GG'|'GN'|'GW'|'GY'|'HT'|'HN'|'HK'|'HU'|'IS'|'IN'|'ID'|'IR'|'IQ'|'IE'|'IM'|'IL'|'IT'|'CI'|'JM'|'JP'|'JE'|'JO'|'KZ'|'KE'|'KI'|'KW'|'KG'|'LA'|'LV'|'LB'|'LS'|'LR'|'LY'|'LI'|'LT'|'LU'|'MO'|'MK'|'MG'|'MW'|'MY'|'MV'|'ML'|'MT'|'MH'|'MR'|'MU'|'YT'|'MX'|'FM'|'MD'|'MC'|'MN'|'ME'|'MS'|'MA'|'MZ'|'MM'|'NA'|'NR'|'NP'|'NL'|'AN'|'NC'|'NZ'|'NI'|'NE'|'NG'|'NU'|'KP'|'MP'|'NO'|'OM'|'PK'|'PW'|'PA'|'PG'|'PY'|'PE'|'PH'|'PN'|'PL'|'PT'|'PR'|'QA'|'CG'|'RE'|'RO'|'RU'|'RW'|'BL'|'SH'|'KN'|'LC'|'MF'|'PM'|'VC'|'WS'|'SM'|'ST'|'SA'|'SN'|'RS'|'SC'|'SL'|'SG'|'SX'|'SK'|'SI'|'SB'|'SO'|'ZA'|'KR'|'ES'|'LK'|'SD'|'SR'|'SJ'|'SZ'|'SE'|'CH'|'SY'|'TW'|'TJ'|'TZ'|'TH'|'TG'|'TK'|'TO'|'TT'|'TN'|'TR'|'TM'|'TC'|'TV'|'VI'|'UG'|'UA'|'AE'|'GB'|'US'|'UY'|'UZ'|'VU'|'VA'|'VE'|'VN'|'WF'|'EH'|'YE'|'ZM'|'ZW',
    PhoneNumberType='TOLL_FREE'|'DID'|'UIFN'|'SHARED'|'THIRD_PARTY_TF'|'THIRD_PARTY_DID'|'SHORT_CODE',
    PhoneNumberPrefix='string',
    MaxResults=123,
    NextToken='string'
)
type TargetArn

string

param TargetArn

The Amazon Resource Name (ARN) for Amazon Connect instances or traffic distribution groups that phone number inbound traffic is routed through. You must enter InstanceId or TargetArn .

type InstanceId

string

param InstanceId

The identifier of the Amazon Connect instance that phone numbers are claimed to. You can find the instance ID in the Amazon Resource Name (ARN) of the instance. You must enter InstanceId or TargetArn .

type PhoneNumberCountryCode

string

param PhoneNumberCountryCode

[REQUIRED]

The ISO country code.

type PhoneNumberType

string

param PhoneNumberType

[REQUIRED]

The type of phone number.

type PhoneNumberPrefix

string

param PhoneNumberPrefix

The prefix of the phone number. If provided, it must contain + as part of the country code.

type MaxResults

integer

param MaxResults

The maximum number of results to return per page.

type NextToken

string

param NextToken

The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

rtype

dict

returns

Response Syntax

{
    'NextToken': 'string',
    'AvailableNumbersList': [
        {
            'PhoneNumber': 'string',
            'PhoneNumberCountryCode': 'AF'|'AL'|'DZ'|'AS'|'AD'|'AO'|'AI'|'AQ'|'AG'|'AR'|'AM'|'AW'|'AU'|'AT'|'AZ'|'BS'|'BH'|'BD'|'BB'|'BY'|'BE'|'BZ'|'BJ'|'BM'|'BT'|'BO'|'BA'|'BW'|'BR'|'IO'|'VG'|'BN'|'BG'|'BF'|'BI'|'KH'|'CM'|'CA'|'CV'|'KY'|'CF'|'TD'|'CL'|'CN'|'CX'|'CC'|'CO'|'KM'|'CK'|'CR'|'HR'|'CU'|'CW'|'CY'|'CZ'|'CD'|'DK'|'DJ'|'DM'|'DO'|'TL'|'EC'|'EG'|'SV'|'GQ'|'ER'|'EE'|'ET'|'FK'|'FO'|'FJ'|'FI'|'FR'|'PF'|'GA'|'GM'|'GE'|'DE'|'GH'|'GI'|'GR'|'GL'|'GD'|'GU'|'GT'|'GG'|'GN'|'GW'|'GY'|'HT'|'HN'|'HK'|'HU'|'IS'|'IN'|'ID'|'IR'|'IQ'|'IE'|'IM'|'IL'|'IT'|'CI'|'JM'|'JP'|'JE'|'JO'|'KZ'|'KE'|'KI'|'KW'|'KG'|'LA'|'LV'|'LB'|'LS'|'LR'|'LY'|'LI'|'LT'|'LU'|'MO'|'MK'|'MG'|'MW'|'MY'|'MV'|'ML'|'MT'|'MH'|'MR'|'MU'|'YT'|'MX'|'FM'|'MD'|'MC'|'MN'|'ME'|'MS'|'MA'|'MZ'|'MM'|'NA'|'NR'|'NP'|'NL'|'AN'|'NC'|'NZ'|'NI'|'NE'|'NG'|'NU'|'KP'|'MP'|'NO'|'OM'|'PK'|'PW'|'PA'|'PG'|'PY'|'PE'|'PH'|'PN'|'PL'|'PT'|'PR'|'QA'|'CG'|'RE'|'RO'|'RU'|'RW'|'BL'|'SH'|'KN'|'LC'|'MF'|'PM'|'VC'|'WS'|'SM'|'ST'|'SA'|'SN'|'RS'|'SC'|'SL'|'SG'|'SX'|'SK'|'SI'|'SB'|'SO'|'ZA'|'KR'|'ES'|'LK'|'SD'|'SR'|'SJ'|'SZ'|'SE'|'CH'|'SY'|'TW'|'TJ'|'TZ'|'TH'|'TG'|'TK'|'TO'|'TT'|'TN'|'TR'|'TM'|'TC'|'TV'|'VI'|'UG'|'UA'|'AE'|'GB'|'US'|'UY'|'UZ'|'VU'|'VA'|'VE'|'VN'|'WF'|'EH'|'YE'|'ZM'|'ZW',
            'PhoneNumberType': 'TOLL_FREE'|'DID'|'UIFN'|'SHARED'|'THIRD_PARTY_TF'|'THIRD_PARTY_DID'|'SHORT_CODE'
        },
    ]
}

Response Structure

  • (dict) --

    • NextToken (string) --

      If there are additional results, this is the token for the next set of results.

    • AvailableNumbersList (list) --

      A list of available phone numbers that you can claim to your Amazon Connect instance or traffic distribution group.

      • (dict) --

        Information about available phone numbers.

        • PhoneNumber (string) --

          The phone number. Phone numbers are formatted [+] [country code] [subscriber number including area code] .

        • PhoneNumberCountryCode (string) --

          The ISO country code.

        • PhoneNumberType (string) --

          The type of phone number.