delete_slot_type
¶
delete_slot_type(
slot_type_id: Id,
bot_id: Id,
bot_version: DraftBotVersion,
locale_id: LocaleId,
*,
config_overrides: Optional[LexModelsV2ClientConfig] = None,
skip_resource_in_use_check: Optional[SkipResourceInUseCheck] = None,
) -> None
Deletes a slot type from a bot locale.
If a slot is using the slot type, Amazon Lex throws a ResourceInUseException exception. To avoid the exception, set the skipResourceInUseCheck parameter to true.
Parameters:
-
slot_type_id(Id) –The identifier of the slot type to delete.
-
bot_id(Id) –The identifier of the bot associated with the slot type.
-
bot_version(DraftBotVersion) –The version of the bot associated with the slot type.
-
locale_id(LocaleId) –The identifier of the language and locale that the slot type will be deleted from. The string must match one of the supported locales. For more information, see Supported languages.
-
skip_resource_in_use_check(Optional[SkipResourceInUseCheck], default:None) –By default, the
DeleteSlotTypeoperations throws aResourceInUseExceptionexception if you try to delete a slot type used by a slot. Set theskipResourceInUseCheckparameter totrueto skip this check and remove the slot type even if a slot uses it.
Raises:
-
ConflictException–The action that you tried to perform couldn't be completed because the resource is in a conflicting state. For example, deleting a bot that is in the CREATING state. Try your request again.
-
InternalServerException–The service encountered an unexpected condition. Try your request again.
-
PreconditionFailedException–Your request couldn't be completed because one or more request fields aren't valid. Check the fields in your request and try again.
-
ServiceQuotaExceededException–You have reached a quota for your bot.
-
ThrottlingException–Your request rate is too high. Reduce the frequency of requests.
-
ValidationException–One of the input parameters in your request isn't valid. Check the parameters and try your request again.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_lex_models_v2/_services/lex_models_v2.py
2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 | |