ai_prompts
Creates, updates, deletes or gets an ai_prompt resource or lists ai_prompts in a region
Overview
| Name | ai_prompts |
| Type | Resource |
| Description | Definition of AWS::Wisdom::AIPrompt Resource Type |
| Id | awscc.wisdom.ai_prompts |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
a_iprompt_id | string | |
a_iprompt_arn | string | |
api_format | string | |
assistant_id | string | |
assistant_arn | string | |
description | string | |
model_id | string | |
name | string | |
tags | object | |
template_configuration | object | |
template_type | string | |
type | string | |
modified_time_seconds | number | |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
a_iprompt_id | string | |
assistant_id | string | |
region | string | AWS region. |
For more information, see AWS::Wisdom::AIPrompt.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | ai_prompts | INSERT | ApiFormat, ModelId, TemplateConfiguration, TemplateType, Type, region |
delete_resource | ai_prompts | DELETE | Identifier, region |
update_resource | ai_prompts | UPDATE | Identifier, PatchDocument, region |
list_resources | ai_prompts_list_only | SELECT | region |
get_resource | ai_prompts | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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 }}';
Lists all ai_prompts in a region.
SELECT
region,
a_iprompt_id,
assistant_id
FROM awscc.wisdom.ai_prompts_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new ai_prompt resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.wisdom.ai_prompts (
ApiFormat,
ModelId,
TemplateConfiguration,
TemplateType,
Type,
region
)
SELECT
'{{ api_format }}',
'{{ model_id }}',
'{{ template_configuration }}',
'{{ template_type }}',
'{{ type }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.wisdom.ai_prompts (
ApiFormat,
AssistantId,
Description,
ModelId,
Name,
Tags,
TemplateConfiguration,
TemplateType,
Type,
region
)
SELECT
'{{ api_format }}',
'{{ assistant_id }}',
'{{ description }}',
'{{ model_id }}',
'{{ name }}',
'{{ tags }}',
'{{ template_configuration }}',
'{{ template_type }}',
'{{ type }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: ai_prompt
props:
- name: api_format
value: '{{ api_format }}'
- name: assistant_id
value: '{{ assistant_id }}'
- name: description
value: '{{ description }}'
- name: model_id
value: '{{ model_id }}'
- name: name
value: '{{ name }}'
- name: tags
value: {}
- name: template_configuration
value: {}
- name: template_type
value: '{{ template_type }}'
- name: type
value: '{{ type }}'
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:
- Create
- Read
- Update
- Delete
- List
wisdom:CreateAIPrompt,
wisdom:TagResource
wisdom:GetAIPrompt
wisdom:UpdateAIPrompt
wisdom:DeleteAIPrompt
wisdom:ListAIPrompts