create_prompt_router
async
¶
create_prompt_router(
prompt_router_name: PromptRouterName,
models: PromptRouterTargetModels,
routing_criteria: RoutingCriteria,
fallback_model: PromptRouterTargetModel,
*,
config_overrides: Optional[AsyncBedrockClientConfig] = None,
client_request_token: Optional[IdempotencyToken] = None,
description: Optional[PromptRouterDescription] = None,
tags: Optional[TagList] = None,
) -> CreatePromptRouterResponse
Creates a prompt router that manages the routing of requests between multiple foundation models based on the routing criteria.
Parameters:
-
client_request_token(Optional[IdempotencyToken], default:None) –A unique, case-sensitive identifier that you provide to ensure idempotency of your requests. If not specified, the Amazon Web Services SDK automatically generates one for you.
-
prompt_router_name(PromptRouterName) –The name of the prompt router. The name must be unique within your Amazon Web Services account in the current region.
-
models(PromptRouterTargetModels) –A list of foundation models that the prompt router can route requests to. At least one model must be specified.
-
description(Optional[PromptRouterDescription], default:None) –An optional description of the prompt router to help identify its purpose.
-
routing_criteria(RoutingCriteria) –The criteria, which is the response quality difference, used to determine how incoming requests are routed to different models.
-
fallback_model(PromptRouterTargetModel) –The default model to use when the routing criteria is not met.
-
tags(Optional[TagList], default:None) –An array of key-value pairs to apply to this resource as tags. You can use tags to categorize and manage your Amazon Web Services resources.
Raises:
-
AccessDeniedException–The request is denied because of missing access permissions.
-
ConflictException–Error occurred because of a conflict while performing an operation.
-
InternalServerException–An internal server error occurred. Retry your request.
-
ResourceNotFoundException–The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
-
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.
-
TooManyTagsException–The request contains more tags than can be associated with a resource (50 tags per resource). The maximum number of tags includes both existing tags and those included in your current request.
-
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/_services/async_bedrock.py
6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967 6968 6969 6970 6971 6972 | |