create_ai_guardrail
¶
create_ai_guardrail(
assistant_id: UuidOrArn,
name: Name,
blocked_input_messaging: AIGuardrailBlockedMessaging,
blocked_outputs_messaging: AIGuardrailBlockedMessaging,
visibility_status: VisibilityStatus,
*,
config_overrides: Optional[QConnectClientConfig] = None,
client_token: Optional[ClientToken] = None,
description: Optional[AIGuardrailDescription] = None,
topic_policy_config: Optional[AIGuardrailTopicPolicyConfig] = None,
content_policy_config: Optional[AIGuardrailContentPolicyConfig] = None,
word_policy_config: Optional[AIGuardrailWordPolicyConfig] = None,
sensitive_information_policy_config: Optional[
AIGuardrailSensitiveInformationPolicyConfig
] = None,
contextual_grounding_policy_config: Optional[
AIGuardrailContextualGroundingPolicyConfig
] = None,
tags: Optional[Tags] = None,
) -> CreateAIGuardrailResponse
Creates an Amazon Q in Connect AI Guardrail.
Parameters:
-
client_token(Optional[ClientToken], default:None) –A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs..
-
assistant_id(UuidOrArn) –The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.
-
name(Name) –The name of the AI Guardrail.
-
blocked_input_messaging(AIGuardrailBlockedMessaging) –The message to return when the AI Guardrail blocks a prompt.
-
blocked_outputs_messaging(AIGuardrailBlockedMessaging) –The message to return when the AI Guardrail blocks a model response.
-
visibility_status(VisibilityStatus) –The visibility status of the AI Guardrail.
-
description(Optional[AIGuardrailDescription], default:None) –A description of the AI Guardrail.
-
topic_policy_config(Optional[AIGuardrailTopicPolicyConfig], default:None) –The topic policies to configure for the AI Guardrail.
-
content_policy_config(Optional[AIGuardrailContentPolicyConfig], default:None) –The content filter policies to configure for the AI Guardrail.
-
word_policy_config(Optional[AIGuardrailWordPolicyConfig], default:None) –The word policy you configure for the AI Guardrail.
-
sensitive_information_policy_config(Optional[AIGuardrailSensitiveInformationPolicyConfig], default:None) –The sensitive information policy to configure for the AI Guardrail.
-
contextual_grounding_policy_config(Optional[AIGuardrailContextualGroundingPolicyConfig], default:None) –The contextual grounding policy configuration used to create an AI Guardrail.
-
tags(Optional[Tags], default:None) –The tags used to organize, track, or control access for this resource.
Raises:
-
AccessDeniedException–You do not have sufficient access to perform this action.
-
ConflictException–The request could not be processed because of conflict in the current state of the resource. For example, if you're using a
CreateAPI (such asCreateAssistant) that accepts name, a conflicting resource (usually with the same name) is being created or mutated. -
ResourceNotFoundException–The specified resource does not exist.
-
ServiceQuotaExceededException–You've exceeded your service quota. To perform the requested action, remove some of the relevant resources, or use service quotas to request a service quota increase.
-
ThrottlingException–The throttling limit has been exceeded.
-
UnauthorizedException–You do not have permission to perform this action.
-
ValidationException–The input fails to satisfy the constraints specified by a service.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_qconnect/_services/q_connect.py
2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 | |