Skip to main content

prompts

Creates, updates, deletes or gets a prompt resource or lists prompts in a region

Overview

Nameprompts
TypeResource
DescriptionDefinition of AWS::Bedrock::Prompt Resource Type
Idaws.bedrock.prompts

Fields

NameDatatypeDescription
arnstringARN of a prompt resource possibly with a version
created_atstringTime Stamp.
default_variantstringName for a variant.
descriptionstringName for a prompt resource.
idstringIdentifier for a Prompt
namestringName for a prompt resource.
updated_atstringTime Stamp.
variantsarrayList of prompt variants
tagsobjectA map of tag keys and values
customer_encryption_key_arnstringA KMS key ARN
versionstringDraft Version.
regionstringAWS region.

For more information, see AWS::Bedrock::Prompt.

Methods

NameAccessible byRequired Params
create_resourceINSERTName, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__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.

/*+ create */
INSERT INTO aws.bedrock.prompts (
Name,
region
)
SELECT
'{{ Name }}',
'{{ region }}';

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