Skip to main content

ai_prompt_versions

Creates, updates, deletes, gets or lists an ai_prompt_versions resource.

Overview

Nameai_prompt_versions
TypeResource
Idaws.qconnect.ai_prompt_versions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
ai_prompt_summaryobjectThe summary of the AI Prompt.
version_numberinteger (int64)The version number for this AI Prompt version.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_ai_prompt_versionsselectassistant_id, ai_prompt_id, regionnextToken, maxResults, originLists AI Prompt versions.
create_ai_prompt_versioninsertassistant_id, ai_prompt_id, regionCreates an Amazon Q in Connect AI Prompt version.
delete_ai_prompt_versiondeleteassistant_id, ai_prompt_id, version_number, regionDelete and Amazon Q in Connect AI Prompt version.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
ai_prompt_idstringThe identifier of the Amazon Q in Connect AI prompt.
assistant_idstringThe identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.
regionstringAWS region (default: us-east-1)
version_numberinteger (int64)The version number of the AI Prompt version to be deleted.
maxResultsintegerThe maximum number of results to return per page.
nextTokenstringThe 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.
originstringThe origin of the AI Prompt versions to be listed. SYSTEM for a default AI Agent created by Q in Connect or CUSTOMER for an AI Agent created by calling AI Agent creation APIs.

SELECT examples

Lists AI Prompt versions.

SELECT
ai_prompt_summary,
version_number
FROM aws.qconnect.ai_prompt_versions
WHERE assistant_id = '{{ assistant_id }}' -- required
AND ai_prompt_id = '{{ ai_prompt_id }}' -- required
AND region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
AND origin = '{{ origin }}'
;

INSERT examples

Creates an Amazon Q in Connect AI Prompt version.

INSERT INTO aws.qconnect.ai_prompt_versions (
modifiedTime,
clientToken,
assistant_id,
ai_prompt_id,
region
)
SELECT
'{{ modifiedTime }}',
'{{ clientToken }}',
'{{ assistant_id }}',
'{{ ai_prompt_id }}',
'{{ region }}'
RETURNING
ai_prompt,
version_number
;

DELETE examples

Delete and Amazon Q in Connect AI Prompt version.

DELETE FROM aws.qconnect.ai_prompt_versions
WHERE assistant_id = '{{ assistant_id }}' --required
AND ai_prompt_id = '{{ ai_prompt_id }}' --required
AND version_number = '{{ version_number }}' --required
AND region = '{{ region }}' --required
;