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
1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 | |