update_prompt¶
Operation¶
update_prompt
async
¶
update_prompt(input: UpdatePromptInput, plugins: list[Plugin] | None = None) -> UpdatePromptOutput
Modifies a prompt in your prompt library. Include both fields that you want to keep and fields that you want to replace. For more information, see Prompt management in Amazon Bedrock and Edit prompts in your prompt library in the Amazon Bedrock User Guide.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input
|
UpdatePromptInput
|
An instance of |
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 |
|---|---|
UpdatePromptOutput
|
An instance of |
Input¶
UpdatePromptInput
dataclass
¶
Dataclass for UpdatePromptInput structure.
Attributes¶
customer_encryption_key_arn
class-attribute
instance-attribute
¶
customer_encryption_key_arn: str | None = None
The Amazon Resource Name (ARN) of the KMS key to encrypt the prompt.
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
A description for the prompt.
prompt_identifier
class-attribute
instance-attribute
¶
prompt_identifier: str | None = None
The unique identifier of the prompt.
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.
Output¶
UpdatePromptOutput
dataclass
¶
Dataclass for UpdatePromptOutput structure.
Attributes¶
customer_encryption_key_arn
class-attribute
instance-attribute
¶
customer_encryption_key_arn: str | None = None
The Amazon Resource Name (ARN) of the KMS key to encrypt the prompt.
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 description of the prompt.
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. When you update a prompt, the version updated
is the DRAFT version.