create_prompt
async
¶
create_prompt(
name: PromptName,
*,
config_overrides: Optional[AsyncBedrockAgentClientConfig] = None,
description: Optional[PromptDescription] = None,
customer_encryption_key_arn: Optional[KmsKeyArn] = None,
default_variant: Optional[PromptVariantName] = None,
variants: Optional[PromptVariantList] = None,
client_token: Optional[ClientToken] = None,
tags: Optional[TagsMap] = None,
) -> CreatePromptResponse
Creates a prompt in your prompt library that you can add to a flow. For more information, see Prompt management in Amazon Bedrock, Create a prompt using Prompt management and Prompt flows in Amazon Bedrock in the Amazon Bedrock User Guide.
Parameters:
-
name(PromptName) –A name for the prompt.
-
description(Optional[PromptDescription], default:None) –A description for the prompt.
-
customer_encryption_key_arn(Optional[KmsKeyArn], default:None) –The Amazon Resource Name (ARN) of the KMS key to encrypt the prompt.
-
default_variant(Optional[PromptVariantName], default:None) –The name of the default variant for the prompt. This value must match the
namefield in the relevant PromptVariant object. -
variants(Optional[PromptVariantList], default:None) –A list of objects, each containing details about a variant of the prompt.
-
client_token(Optional[ClientToken], default: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.
-
tags(Optional[TagsMap], default:None) –Any tags that you want to attach to the prompt. For more information, see Tagging resources in Amazon Bedrock.
Raises:
-
AccessDeniedException–The request is denied because of missing access permissions.
-
ConflictException–There was a conflict performing an operation.
-
InternalServerException–An internal server error occurred. Retry your request.
-
ServiceQuotaExceededException–The number of requests exceeds the service quota. Resubmit your request later.
-
ThrottlingException–The number of requests exceeds the limit. Resubmit your request later.
-
ValidationException–Input validation failed. Check your request parameters and retry the request.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_bedrock_agent/_services/async_bedrock_agent.py
5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 | |