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
2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 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 | |