create_prompt_version¶
Operation¶
create_prompt_version
¶
create_prompt_version(request: CreatePromptVersionInput | CreatePromptVersionInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[CreatePromptVersionInputDict]) -> 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 |
|---|---|---|---|
request
|
CreatePromptVersionInput | CreatePromptVersionInputDict | 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[CreatePromptVersionInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
CreatePromptVersionOutput
|
An instance of |
create_prompt_version
async
¶
create_prompt_version(request: CreatePromptVersionInput | CreatePromptVersionInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[CreatePromptVersionInputDict]) -> 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 |
|---|---|---|---|
request
|
CreatePromptVersionInput | CreatePromptVersionInputDict | 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[CreatePromptVersionInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
CreatePromptVersionOutput
|
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.
CreatePromptVersionInputDict
¶
Bases: TypedDict
Dictionary form of CreatePromptVersionInput.
Attributes¶
client_token
instance-attribute
¶
client_token: str | 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.
This field is autopopulated if not provided.
description
instance-attribute
¶
description: str | None
A description for the version of the prompt.
prompt_identifier
instance-attribute
¶
The unique identifier of the prompt that you want to create a version of.
tags
instance-attribute
¶
Any tags that you want to attach to the version of the prompt. For more information, see Tagging resources in Amazon Bedrock.
CreatePromptVersionInput
dataclass
¶
Bases: _SerdeShape
Dataclass for CreatePromptVersionInput structure.
Attributes¶
client_token
class-attribute
instance-attribute
¶
client_token: str | 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.
This field is autopopulated if not provided.
description
class-attribute
instance-attribute
¶
description: str | None = ...
A description for the version of the prompt.
prompt_identifier
class-attribute
instance-attribute
¶
prompt_identifier: str | None = ...
The unique identifier of the prompt that you want to create a version of.
tags
class-attribute
instance-attribute
¶
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
¶
Bases: _SerdeShape
Dataclass for CreatePromptVersionOutput 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 version of 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 version.
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.