QConnect / Client / create_session
create_session#
- QConnect.Client.create_session(**kwargs)#
Creates a session. A session is a contextual container used for generating recommendations. Amazon Connect creates a new Amazon Q in Connect session for each contact on which Amazon Q in Connect is enabled.
See also: AWS API Documentation
Request Syntax
response = client.create_session( aiAgentConfiguration={ 'string': { 'aiAgentId': 'string' } }, assistantId='string', clientToken='string', description='string', name='string', tagFilter={ 'andConditions': [ { 'key': 'string', 'value': 'string' }, ], 'orConditions': [ { 'andConditions': [ { 'key': 'string', 'value': 'string' }, ], 'tagCondition': { 'key': 'string', 'value': 'string' } }, ], 'tagCondition': { 'key': 'string', 'value': 'string' } }, tags={ 'string': 'string' } )
- Parameters:
aiAgentConfiguration (dict) –
The configuration of the AI Agents (mapped by AI Agent Type to AI Agent version) that should be used by Amazon Q in Connect for this Session.
(string) –
(dict) –
A type that specifies the AI Agent ID configuration data when mapping an AI Agents to be used for an AI Agent type on a session or assistant.
aiAgentId (string) – [REQUIRED]
The ID of the AI Agent to be configured.
assistantId (string) –
[REQUIRED]
The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.
clientToken (string) –
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs.
This field is autopopulated if not provided.
description (string) – The description.
name (string) –
[REQUIRED]
The name of the session.
tagFilter (dict) –
An object that can be used to specify Tag conditions.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
andConditions
,orConditions
,tagCondition
.andConditions (list) –
A list of conditions which would be applied together with an
AND
condition.(dict) –
A leaf node condition which can be used to specify a tag condition.
key (string) – [REQUIRED]
The tag key in the tag condition.
value (string) –
The tag value in the tag condition.
orConditions (list) –
A list of conditions which would be applied together with an
OR
condition.(dict) –
A list of conditions which would be applied together with an
OR
condition.Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
andConditions
,tagCondition
.andConditions (list) –
A list of conditions which would be applied together with an
AND
condition.(dict) –
A leaf node condition which can be used to specify a tag condition.
key (string) – [REQUIRED]
The tag key in the tag condition.
value (string) –
The tag value in the tag condition.
tagCondition (dict) –
A leaf node condition which can be used to specify a tag condition.
key (string) – [REQUIRED]
The tag key in the tag condition.
value (string) –
The tag value in the tag condition.
tagCondition (dict) –
A leaf node condition which can be used to specify a tag condition.
key (string) – [REQUIRED]
The tag key in the tag condition.
value (string) –
The tag value in the tag condition.
tags (dict) –
The tags used to organize, track, or control access for this resource.
(string) –
(string) –
- Return type:
dict
- Returns:
Response Syntax
{ 'session': { 'aiAgentConfiguration': { 'string': { 'aiAgentId': 'string' } }, 'description': 'string', 'integrationConfiguration': { 'topicIntegrationArn': 'string' }, 'name': 'string', 'sessionArn': 'string', 'sessionId': 'string', 'tagFilter': { 'andConditions': [ { 'key': 'string', 'value': 'string' }, ], 'orConditions': [ { 'andConditions': [ { 'key': 'string', 'value': 'string' }, ], 'tagCondition': { 'key': 'string', 'value': 'string' } }, ], 'tagCondition': { 'key': 'string', 'value': 'string' } }, 'tags': { 'string': 'string' } } }
Response Structure
(dict) –
session (dict) –
The session.
aiAgentConfiguration (dict) –
The configuration of the AI Agents (mapped by AI Agent Type to AI Agent version) that should be used by Amazon Q in Connect for this Session.
(string) –
(dict) –
A type that specifies the AI Agent ID configuration data when mapping an AI Agents to be used for an AI Agent type on a session or assistant.
aiAgentId (string) –
The ID of the AI Agent to be configured.
description (string) –
The description of the session.
integrationConfiguration (dict) –
The configuration information for the session integration.
topicIntegrationArn (string) –
The Amazon Resource Name (ARN) of the integrated Amazon SNS topic used for streaming chat messages.
name (string) –
The name of the session.
sessionArn (string) –
The Amazon Resource Name (ARN) of the session.
sessionId (string) –
The identifier of the session.
tagFilter (dict) –
An object that can be used to specify Tag conditions.
Note
This is a Tagged Union structure. Only one of the following top level keys will be set:
andConditions
,orConditions
,tagCondition
. If a client receives an unknown member it will setSDK_UNKNOWN_MEMBER
as the top level key, which maps to the name or tag of the unknown member. The structure ofSDK_UNKNOWN_MEMBER
is as follows:'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
andConditions (list) –
A list of conditions which would be applied together with an
AND
condition.(dict) –
A leaf node condition which can be used to specify a tag condition.
key (string) –
The tag key in the tag condition.
value (string) –
The tag value in the tag condition.
orConditions (list) –
A list of conditions which would be applied together with an
OR
condition.(dict) –
A list of conditions which would be applied together with an
OR
condition.Note
This is a Tagged Union structure. Only one of the following top level keys will be set:
andConditions
,tagCondition
. If a client receives an unknown member it will setSDK_UNKNOWN_MEMBER
as the top level key, which maps to the name or tag of the unknown member. The structure ofSDK_UNKNOWN_MEMBER
is as follows:'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
andConditions (list) –
A list of conditions which would be applied together with an
AND
condition.(dict) –
A leaf node condition which can be used to specify a tag condition.
key (string) –
The tag key in the tag condition.
value (string) –
The tag value in the tag condition.
tagCondition (dict) –
A leaf node condition which can be used to specify a tag condition.
key (string) –
The tag key in the tag condition.
value (string) –
The tag value in the tag condition.
tagCondition (dict) –
A leaf node condition which can be used to specify a tag condition.
key (string) –
The tag key in the tag condition.
value (string) –
The tag value in the tag condition.
tags (dict) –
The tags used to organize, track, or control access for this resource.
(string) –
(string) –
Exceptions
QConnect.Client.exceptions.ConflictException
QConnect.Client.exceptions.ValidationException
QConnect.Client.exceptions.AccessDeniedException
QConnect.Client.exceptions.ResourceNotFoundException