Skip to content

Bedrock Agent  >  Operations  >  get_prompt

get_prompt

Operation

get_prompt async

get_prompt(input: GetPromptInput, plugins: list[Plugin] | None = None) -> GetPromptOutput

Retrieves information about the working draft (DRAFT version) of a prompt or a version of it, depending on whether you include the promptVersion field or not. For more information, see View information about prompts using Prompt management and View information about a version of your prompt in the Amazon Bedrock User Guide.

Parameters:

Name Type Description Default
input GetPromptInput

An instance of GetPromptInput.

required
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
GetPromptOutput

An instance of GetPromptOutput.

Input

GetPromptInput dataclass

Dataclass for GetPromptInput structure.

Attributes

included_data class-attribute instance-attribute
included_data: IncludedData | None = None

Controls the scope of data returned. Set to METADATA_ONLY to return only resource metadata. Set to ALL_DATA or omit this field to return the full response.

prompt_identifier class-attribute instance-attribute
prompt_identifier: str | None = None

The unique identifier of the prompt.

prompt_version class-attribute instance-attribute
prompt_version: str | None = None

The version of the prompt about which you want to retrieve information. Omit this field to return information about the working draft of the prompt.

Output

GetPromptOutput dataclass

Dataclass for GetPromptOutput structure.

Attributes

arn instance-attribute
arn: str

The Amazon Resource Name (ARN) of the prompt or the prompt version (if you specified a version in the request).

created_at instance-attribute
created_at: datetime

The time at which the prompt was created.

customer_encryption_key_arn class-attribute instance-attribute
customer_encryption_key_arn: str | None = None

The Amazon Resource Name (ARN) of the KMS key that the prompt is encrypted with.

default_variant class-attribute instance-attribute
default_variant: str | None = None

The name of the default variant for the prompt. This value must match the name field in the relevant PromptVariant object.

description class-attribute instance-attribute
description: str | None = None

The descriptino of the prompt.

id instance-attribute
id: str

The unique identifier of the prompt.

name instance-attribute
name: str

The name of the prompt.

updated_at instance-attribute
updated_at: datetime

The time at which the prompt was last updated.

variants class-attribute instance-attribute
variants: list[PromptVariant] | None = field(repr=False, default=None)

A list of objects, each containing details about a variant of the prompt.

version instance-attribute
version: str

The version of the prompt.