Skip to main content

ai_prompts

Creates, updates, deletes or gets an ai_prompt resource or lists ai_prompts in a region

Overview

Nameai_prompts
TypeResource
DescriptionDefinition of AWS::Wisdom::AIPrompt Resource Type
Idawscc.wisdom.ai_prompts

Fields

NameDatatypeDescription
a_iprompt_idstring
a_iprompt_arnstring
api_formatstring
assistant_idstring
assistant_arnstring
descriptionstring
model_idstring
namestring
tagsobject
template_configurationobject
template_typestring
typestring
modified_time_secondsnumber
regionstringAWS region.

For more information, see AWS::Wisdom::AIPrompt.

Methods

NameResourceAccessible byRequired Params
create_resourceai_promptsINSERTApiFormat, ModelId, TemplateConfiguration, TemplateType, Type, region
delete_resourceai_promptsDELETEIdentifier, region
update_resourceai_promptsUPDATEIdentifier, PatchDocument, region
list_resourcesai_prompts_list_onlySELECTregion
get_resourceai_promptsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual ai_prompt.

SELECT
region,
a_iprompt_id,
a_iprompt_arn,
api_format,
assistant_id,
assistant_arn,
description,
model_id,
name,
tags,
template_configuration,
template_type,
type,
modified_time_seconds
FROM awscc.wisdom.ai_prompts
WHERE
region = 'us-east-1' AND
Identifier = '{{ a_iprompt_id }}|{{ assistant_id }}';

INSERT example

Use the following StackQL query and manifest file to create a new ai_prompt resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.wisdom.ai_prompts (
ApiFormat,
ModelId,
TemplateConfiguration,
TemplateType,
Type,
region
)
SELECT
'{{ api_format }}',
'{{ model_id }}',
'{{ template_configuration }}',
'{{ template_type }}',
'{{ type }}',
'{{ region }}';

UPDATE example

Use the following StackQL query and manifest file to update a ai_prompt resource, using stack-deploy.

/*+ update */
UPDATE awscc.wisdom.ai_prompts
SET PatchDocument = string('{{ {
"Description": description,
"ModelId": model_id,
"TemplateConfiguration": template_configuration
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ a_iprompt_id }}|{{ assistant_id }}';

DELETE example

/*+ delete */
DELETE FROM awscc.wisdom.ai_prompts
WHERE
Identifier = '{{ a_iprompt_id }}|{{ assistant_id }}' AND
region = 'us-east-1';

Permissions

To operate on the ai_prompts resource, the following permissions are required:

wisdom:CreateAIPrompt,
wisdom:TagResource