create_prompt_version¶
Operation¶
create_prompt_version
async
¶
create_prompt_version(input: CreatePromptVersionInput, plugins: list[Plugin] | None = None) -> CreatePromptVersionOutput
Creates a static snapshot of your prompt that can be deployed to production. For more information, see Deploy prompts using Prompt management by creating versions in the Amazon Bedrock User Guide.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input
|
CreatePromptVersionInput
|
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 |
|---|---|
CreatePromptVersionOutput
|
An instance of |
Input¶
CreatePromptVersionInput
dataclass
¶
Dataclass for CreatePromptVersionInput structure.
Attributes¶
client_token
class-attribute
instance-attribute
¶
client_token: str | None = None
A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency.
description
class-attribute
instance-attribute
¶
description: str | None = None
A description for the version of the prompt.
prompt_identifier
class-attribute
instance-attribute
¶
prompt_identifier: str | None = None
The unique identifier of the prompt that you want to create a version of.
tags
class-attribute
instance-attribute
¶
tags: dict[str, str] | None = None
Any tags that you want to attach to the version of the prompt. For more information, see Tagging resources in Amazon Bedrock.
Output¶
CreatePromptVersionOutput
dataclass
¶
Dataclass for CreatePromptVersionOutput 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 version of 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 version.
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 that was created. Versions are numbered incrementally, starting from 1.