update_prompt¶
Operation¶
update_prompt
¶
update_prompt(request: UpdatePromptInput | UpdatePromptInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[UpdatePromptInputDict]) -> 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 |
|---|---|---|---|
request
|
UpdatePromptInput | UpdatePromptInputDict | None
|
The input as a model or dictionary. Pass this or keyword arguments, not both. |
None
|
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
|
**kwargs
|
Unpack[UpdatePromptInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
UpdatePromptOutput
|
An instance of |
update_prompt
async
¶
update_prompt(request: UpdatePromptInput | UpdatePromptInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[UpdatePromptInputDict]) -> 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 |
|---|---|---|---|
request
|
UpdatePromptInput | UpdatePromptInputDict | None
|
The input as a model or dictionary. Pass this or keyword arguments, not both. |
None
|
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
|
**kwargs
|
Unpack[UpdatePromptInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
UpdatePromptOutput
|
An instance of |
Input¶
Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.
UpdatePromptInputDict
¶
Bases: TypedDict
Dictionary form of UpdatePromptInput.
Attributes¶
customer_encryption_key_arn
instance-attribute
¶
customer_encryption_key_arn: str | None
The Amazon Resource Name (ARN) of the KMS key to encrypt the prompt.
default_variant
instance-attribute
¶
default_variant: str | None
The name of the default variant for the prompt. This value must match
the name field in the relevant
PromptVariant
object.
prompt_identifier
instance-attribute
¶
The unique identifier of the prompt.
variants
instance-attribute
¶
variants: Sequence[PromptVariant | PromptVariantDict] | None
A list of objects, each containing details about a variant of the prompt.
UpdatePromptInput
dataclass
¶
Bases: _SerdeShape
Dataclass for UpdatePromptInput structure.
Attributes¶
customer_encryption_key_arn
class-attribute
instance-attribute
¶
customer_encryption_key_arn: str | None = ...
The Amazon Resource Name (ARN) of the KMS key to encrypt the prompt.
default_variant
class-attribute
instance-attribute
¶
default_variant: str | 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 = ...
A description for the prompt.
prompt_identifier
class-attribute
instance-attribute
¶
prompt_identifier: str | None = ...
The unique identifier of the prompt.
variants
class-attribute
instance-attribute
¶
variants: list[PromptVariant] | None = ...
A list of objects, each containing details about a variant of the prompt.
Output¶
UpdatePromptOutput
dataclass
¶
Bases: _SerdeShape
Dataclass for UpdatePromptOutput structure.
Attributes¶
customer_encryption_key_arn
class-attribute
instance-attribute
¶
customer_encryption_key_arn: str | None = ...
The Amazon Resource Name (ARN) of the KMS key to encrypt the prompt.
default_variant
class-attribute
instance-attribute
¶
default_variant: str | 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 = ...
The description of the prompt.
response_metadata
class-attribute
instance-attribute
¶
Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.
variants
class-attribute
instance-attribute
¶
variants: list[PromptVariant] | None = ...
A list of objects, each containing details about a variant of the prompt.