CfnPromptProps

class aws_cdk.aws_bedrock.CfnPromptProps(*, name, customer_encryption_key_arn=None, default_variant=None, description=None, tags=None, variants=None)

Bases: object

Properties for defining a CfnPrompt.

Parameters:
  • name (str) – The name of the prompt.

  • customer_encryption_key_arn (Optional[str]) – The Amazon Resource Name (ARN) of the KMS key that the prompt is encrypted with.

  • default_variant (Optional[str]) – The name of the default variant for the prompt. This value must match the name field in the relevant PromptVariant object.

  • description (Optional[str]) – The description of the prompt.

  • tags (Optional[Mapping[str, str]]) – Metadata that you can assign to a resource as key-value pairs. For more information, see the following resources:. - Tag naming limits and requirements - Tagging best practices

  • variants (Union[IResolvable, Sequence[Union[IResolvable, PromptVariantProperty, Dict[str, Any]]], None]) – A list of objects, each containing details about a variant of the prompt.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-prompt.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

# additional_model_request_fields: Any
# any: Any
# auto: Any
# json: Any

cfn_prompt_props = bedrock.CfnPromptProps(
    name="name",

    # the properties below are optional
    customer_encryption_key_arn="customerEncryptionKeyArn",
    default_variant="defaultVariant",
    description="description",
    tags={
        "tags_key": "tags"
    },
    variants=[bedrock.CfnPrompt.PromptVariantProperty(
        name="name",
        template_configuration=bedrock.CfnPrompt.PromptTemplateConfigurationProperty(
            chat=bedrock.CfnPrompt.ChatPromptTemplateConfigurationProperty(
                messages=[bedrock.CfnPrompt.MessageProperty(
                    content=[bedrock.CfnPrompt.ContentBlockProperty(
                        cache_point=bedrock.CfnPrompt.CachePointBlockProperty(
                            type="type"
                        ),
                        text="text"
                    )],
                    role="role"
                )],

                # the properties below are optional
                input_variables=[bedrock.CfnPrompt.PromptInputVariableProperty(
                    name="name"
                )],
                system=[bedrock.CfnPrompt.SystemContentBlockProperty(
                    cache_point=bedrock.CfnPrompt.CachePointBlockProperty(
                        type="type"
                    ),
                    text="text"
                )],
                tool_configuration=bedrock.CfnPrompt.ToolConfigurationProperty(
                    tools=[bedrock.CfnPrompt.ToolProperty(
                        cache_point=bedrock.CfnPrompt.CachePointBlockProperty(
                            type="type"
                        ),
                        tool_spec=bedrock.CfnPrompt.ToolSpecificationProperty(
                            input_schema=bedrock.CfnPrompt.ToolInputSchemaProperty(
                                json=json
                            ),
                            name="name",

                            # the properties below are optional
                            description="description"
                        )
                    )],

                    # the properties below are optional
                    tool_choice=bedrock.CfnPrompt.ToolChoiceProperty(
                        any=any,
                        auto=auto,
                        tool=bedrock.CfnPrompt.SpecificToolChoiceProperty(
                            name="name"
                        )
                    )
                )
            ),
            text=bedrock.CfnPrompt.TextPromptTemplateConfigurationProperty(
                cache_point=bedrock.CfnPrompt.CachePointBlockProperty(
                    type="type"
                ),
                input_variables=[bedrock.CfnPrompt.PromptInputVariableProperty(
                    name="name"
                )],
                text="text",
                text_s3_location=bedrock.CfnPrompt.TextS3LocationProperty(
                    bucket="bucket",
                    key="key",

                    # the properties below are optional
                    version="version"
                )
            )
        ),
        template_type="templateType",

        # the properties below are optional
        additional_model_request_fields=additional_model_request_fields,
        gen_ai_resource=bedrock.CfnPrompt.PromptGenAiResourceProperty(
            agent=bedrock.CfnPrompt.PromptAgentResourceProperty(
                agent_identifier="agentIdentifier"
            )
        ),
        inference_configuration=bedrock.CfnPrompt.PromptInferenceConfigurationProperty(
            text=bedrock.CfnPrompt.PromptModelInferenceConfigurationProperty(
                max_tokens=123,
                stop_sequences=["stopSequences"],
                temperature=123,
                top_p=123
            )
        ),
        metadata=[bedrock.CfnPrompt.PromptMetadataEntryProperty(
            key="key",
            value="value"
        )],
        model_id="modelId"
    )]
)

Attributes

customer_encryption_key_arn

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

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-prompt.html#cfn-bedrock-prompt-customerencryptionkeyarn

default_variant

The name of the default variant for the prompt.

This value must match the name field in the relevant PromptVariant object.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-prompt.html#cfn-bedrock-prompt-defaultvariant

description

The description of the prompt.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-prompt.html#cfn-bedrock-prompt-description

name

The name of the prompt.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-prompt.html#cfn-bedrock-prompt-name

tags

.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-prompt.html#cfn-bedrock-prompt-tags

Type:

Metadata that you can assign to a resource as key-value pairs. For more information, see the following resources

variants

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

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-prompt.html#cfn-bedrock-prompt-variants