ai_prompt_versions
Creates, updates, deletes or gets an ai_prompt_version resource or lists ai_prompt_versions in a region
Overview
| Name | ai_prompt_versions |
| Type | Resource |
| Description | Definition of AWS::Wisdom::AIPromptVersion Resource Type |
| Id | awscc.wisdom.ai_prompt_versions |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
a_iprompt_arn | string | |
assistant_arn | string | |
a_iprompt_id | string | |
assistant_id | string | |
a_iprompt_version_id | string | |
version_number | number | |
modified_time_seconds | number | |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
a_iprompt_id | string | |
assistant_id | string | |
version_number | number | |
region | string | AWS region. |
For more information, see AWS::Wisdom::AIPromptVersion.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | ai_prompt_versions | INSERT | AssistantId, AIPromptId, region |
delete_resource | ai_prompt_versions | DELETE | Identifier, region |
update_resource | ai_prompt_versions | UPDATE | Identifier, PatchDocument, region |
list_resources | ai_prompt_versions_list_only | SELECT | region |
get_resource | ai_prompt_versions | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual ai_prompt_version.
SELECT
region,
a_iprompt_arn,
assistant_arn,
a_iprompt_id,
assistant_id,
a_iprompt_version_id,
version_number,
modified_time_seconds
FROM awscc.wisdom.ai_prompt_versions
WHERE
region = '{{ region }}' AND
Identifier = '{{ assistant_id }}|{{ a_iprompt_id }}|{{ version_number }}';
Lists all ai_prompt_versions in a region.
SELECT
region,
assistant_id,
a_iprompt_id,
version_number
FROM awscc.wisdom.ai_prompt_versions_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new ai_prompt_version resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.wisdom.ai_prompt_versions (
AIPromptId,
AssistantId,
region
)
SELECT
'{{ a_iprompt_id }}',
'{{ assistant_id }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.wisdom.ai_prompt_versions (
AIPromptId,
AssistantId,
ModifiedTimeSeconds,
region
)
SELECT
'{{ a_iprompt_id }}',
'{{ assistant_id }}',
'{{ modified_time_seconds }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: ai_prompt_version
props:
- name: a_iprompt_id
value: '{{ a_iprompt_id }}'
- name: assistant_id
value: '{{ assistant_id }}'
- name: modified_time_seconds
value: null
DELETE example
/*+ delete */
DELETE FROM awscc.wisdom.ai_prompt_versions
WHERE
Identifier = '{{ assistant_id }}|{{ a_iprompt_id }}|{{ version_number }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
Permissions
To operate on the ai_prompt_versions resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
wisdom:CreateAIPromptVersion
wisdom:GetAIPrompt,
wisdom:GetAIPromptVersion
wisdom:GetAIPrompt,
wisdom:GetAIPromptVersion
wisdom:DeleteAIPromptVersion
wisdom:ListAIPromptVersions