create_automated_reasoning_policy
async
¶
create_automated_reasoning_policy(
name: AutomatedReasoningPolicyName,
*,
config_overrides: Optional[AsyncBedrockClientConfig] = None,
description: Optional[AutomatedReasoningPolicyDescription] = None,
client_request_token: Optional[IdempotencyToken] = None,
policy_definition: Optional[AutomatedReasoningPolicyDefinition] = None,
kms_key_id: Optional[KmsKeyId] = None,
tags: Optional[TagList] = None,
) -> CreateAutomatedReasoningPolicyResponse
Creates an Automated Reasoning policy for Amazon Bedrock Guardrails. Automated Reasoning policies use mathematical techniques to detect hallucinations, suggest corrections, and highlight unstated assumptions in the responses of your GenAI application.
To create a policy, you upload a source document that describes the rules that you're encoding. Automated Reasoning extracts important concepts from the source document that will become variables in the policy and infers policy rules.
Parameters:
-
name(AutomatedReasoningPolicyName) –A unique name for the Automated Reasoning policy. The name must be between 1 and 63 characters and can contain letters, numbers, hyphens, and underscores.
-
description(Optional[AutomatedReasoningPolicyDescription], default:None) –A description of the Automated Reasoning policy. Use this to provide context about the policy's purpose and the types of validations it performs.
-
client_request_token(Optional[IdempotencyToken], default:None) –A unique, case-sensitive identifier to ensure that the operation completes no more than once. If this token matches a previous request, Amazon Bedrock ignores the request but doesn't return an error.
-
policy_definition(Optional[AutomatedReasoningPolicyDefinition], default:None) –The policy definition that contains the formal logic rules, variables, and custom variable types used to validate foundation model responses in your application.
-
kms_key_id(Optional[KmsKeyId], default:None) –The identifier of the KMS key to use for encrypting the automated reasoning policy and its associated artifacts. If you don't specify a KMS key, Amazon Bedrock uses an KMS managed key for encryption. For enhanced security and control, you can specify a customer managed KMS key.
-
tags(Optional[TagList], default:None) –A list of tags to associate with the Automated Reasoning policy. Tags help you organize and manage your policies.
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
1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 | |