create_prompt
¶
create_prompt(
name: PromptName,
*,
config_overrides: Optional[BedrockAgentClientConfig] = 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/bedrock_agent.py
5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 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 | |