prompts
Creates, updates, deletes or gets a prompt
resource or lists prompts
in a region
Overview
Name | prompts |
Type | Resource |
Description | Definition of AWS::Bedrock::Prompt Resource Type |
Id | aws.bedrock.prompts |
Fields
Name | Datatype | Description |
---|---|---|
arn | string | ARN of a prompt resource possibly with a version |
created_at | string | Time Stamp. |
default_variant | string | Name for a variant. |
description | string | Name for a prompt resource. |
id | string | Identifier for a Prompt |
name | string | Name for a prompt resource. |
updated_at | string | Time Stamp. |
variants | array | List of prompt variants |
tags | object | A map of tag keys and values |
customer_encryption_key_arn | string | A KMS key ARN |
version | string | Draft Version. |
region | string | AWS region. |
For more information, see AWS::Bedrock::Prompt
.
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Name, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all prompts
in a region.
SELECT
region,
arn,
created_at,
default_variant,
description,
id,
name,
updated_at,
variants,
tags,
customer_encryption_key_arn,
version
FROM aws.bedrock.prompts
WHERE region = 'us-east-1';
Gets all properties from an individual prompt
.
SELECT
region,
arn,
created_at,
default_variant,
description,
id,
name,
updated_at,
variants,
tags,
customer_encryption_key_arn,
version
FROM aws.bedrock.prompts
WHERE region = 'us-east-1' AND data__Identifier = '<Arn>';
INSERT
example
Use the following StackQL query and manifest file to create a new prompt
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.bedrock.prompts (
Name,
region
)
SELECT
'{{ Name }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.bedrock.prompts (
DefaultVariant,
Description,
Name,
Variants,
Tags,
CustomerEncryptionKeyArn,
region
)
SELECT
'{{ DefaultVariant }}',
'{{ Description }}',
'{{ Name }}',
'{{ Variants }}',
'{{ Tags }}',
'{{ CustomerEncryptionKeyArn }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: prompt
props:
- name: DefaultVariant
value: '{{ DefaultVariant }}'
- name: Description
value: '{{ Description }}'
- name: Name
value: '{{ Name }}'
- name: Variants
value:
- Name: '{{ Name }}'
TemplateType: '{{ TemplateType }}'
TemplateConfiguration: null
ModelId: '{{ ModelId }}'
InferenceConfiguration: null
- name: Tags
value: {}
- name: CustomerEncryptionKeyArn
value: '{{ CustomerEncryptionKeyArn }}'
DELETE
example
/*+ delete */
DELETE FROM aws.bedrock.prompts
WHERE data__Identifier = '<Arn>'
AND region = 'us-east-1';
Permissions
To operate on the prompts
resource, the following permissions are required:
Create
bedrock:CreatePrompt,
bedrock:GetPrompt,
s3:GetObject,
s3:GetObjectVersion,
bedrock:TagResource,
bedrock:ListTagsForResource,
kms:GenerateDataKey,
kms:Decrypt
Read
bedrock:GetPrompt,
bedrock:ListTagsForResource,
kms:Decrypt
Update
bedrock:UpdatePrompt,
bedrock:GetPrompt,
s3:GetObject,
s3:GetObjectVersion,
bedrock:TagResource,
bedrock:UntagResource,
bedrock:ListTagsForResource,
kms:GenerateDataKey,
kms:Decrypt
Delete
bedrock:DeletePrompt,
bedrock:GetPrompt
List
bedrock:ListPrompts