QConnect / Client / update_ai_prompt
update_ai_prompt¶
- QConnect.Client.update_ai_prompt(**kwargs)¶
Updates an AI Prompt.
See also: AWS API Documentation
Request Syntax
response = client.update_ai_prompt( clientToken='string', assistantId='string', aiPromptId='string', visibilityStatus='SAVED'|'PUBLISHED', templateConfiguration={ 'textFullAIPromptEditTemplateConfiguration': { 'text': 'string' } }, description='string' )
- Parameters:
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.
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.
aiPromptId (string) –
[REQUIRED]
The identifier of the Amazon Q in Connect AI Prompt.
visibilityStatus (string) –
[REQUIRED]
The visibility status of the Amazon Q in Connect AI prompt.
templateConfiguration (dict) –
The configuration of the prompt template for this AI Prompt.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
textFullAIPromptEditTemplateConfiguration
.textFullAIPromptEditTemplateConfiguration (dict) –
The configuration for a prompt template that supports full textual prompt configuration using a YAML prompt.
text (string) – [REQUIRED]
The YAML text for the AI Prompt template.
description (string) – The description of the Amazon Q in Connect AI Prompt.
- Return type:
dict
- Returns:
Response Syntax
{ 'aiPrompt': { 'assistantId': 'string', 'assistantArn': 'string', 'aiPromptId': 'string', 'aiPromptArn': 'string', 'name': 'string', 'type': 'ANSWER_GENERATION'|'INTENT_LABELING_GENERATION'|'QUERY_REFORMULATION'|'SELF_SERVICE_PRE_PROCESSING'|'SELF_SERVICE_ANSWER_GENERATION', 'templateType': 'TEXT', 'modelId': 'string', 'apiFormat': 'ANTHROPIC_CLAUDE_MESSAGES'|'ANTHROPIC_CLAUDE_TEXT_COMPLETIONS'|'MESSAGES'|'TEXT_COMPLETIONS', 'templateConfiguration': { 'textFullAIPromptEditTemplateConfiguration': { 'text': 'string' } }, 'modifiedTime': datetime(2015, 1, 1), 'description': 'string', 'visibilityStatus': 'SAVED'|'PUBLISHED', 'tags': { 'string': 'string' }, 'origin': 'SYSTEM'|'CUSTOMER', 'status': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'ACTIVE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED' } }
Response Structure
(dict) –
aiPrompt (dict) –
The data of the updated Amazon Q in Connect AI Prompt.
assistantId (string) –
The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.
assistantArn (string) –
The Amazon Resource Name (ARN) of the Amazon Q in Connect assistant.
aiPromptId (string) –
The identifier of the Amazon Q in Connect AI prompt.
aiPromptArn (string) –
The Amazon Resource Name (ARN) of the AI Prompt.
name (string) –
The name of the AI Prompt
type (string) –
The type of this AI Prompt.
templateType (string) –
The type of the prompt template for this AI Prompt.
modelId (string) –
The identifier of the model used for this AI Prompt. The following model Ids are supported:
anthropic.claude-3-haiku--v1:0
apac.amazon.nova-lite-v1:0
apac.amazon.nova-micro-v1:0
apac.amazon.nova-pro-v1:0
apac.anthropic.claude-3-5-sonnet--v2:0
apac.anthropic.claude-3-haiku-20240307-v1:0
eu.amazon.nova-lite-v1:0
eu.amazon.nova-micro-v1:0
eu.amazon.nova-pro-v1:0
eu.anthropic.claude-3-7-sonnet-20250219-v1:0
eu.anthropic.claude-3-haiku-20240307-v1:0
us.amazon.nova-lite-v1:0
us.amazon.nova-micro-v1:0
us.amazon.nova-pro-v1:0
us.anthropic.claude-3-5-haiku-20241022-v1:0
us.anthropic.claude-3-7-sonnet-20250219-v1:0
us.anthropic.claude-3-haiku-20240307-v1:0
apiFormat (string) –
The API format used for this AI Prompt.
templateConfiguration (dict) –
The configuration of the prompt template for this AI Prompt.
Note
This is a Tagged Union structure. Only one of the following top level keys will be set:
textFullAIPromptEditTemplateConfiguration
. 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'}
textFullAIPromptEditTemplateConfiguration (dict) –
The configuration for a prompt template that supports full textual prompt configuration using a YAML prompt.
text (string) –
The YAML text for the AI Prompt template.
modifiedTime (datetime) –
The time the AI Prompt was last modified.
description (string) –
The description of the AI Prompt.
visibilityStatus (string) –
The visibility status of the AI Prompt.
tags (dict) –
The tags used to organize, track, or control access for this resource.
(string) –
(string) –
origin (string) –
The origin of the AI Prompt.
SYSTEM
for a default AI Prompt created by Q in Connect orCUSTOMER
for an AI Prompt created by calling AI Prompt creation APIs.status (string) –
The status of the AI Prompt.
Exceptions