delete_slot_type
async
¶
delete_slot_type(
slot_type_id: Id,
bot_id: Id,
bot_version: DraftBotVersion,
locale_id: LocaleId,
*,
config_overrides: Optional[AsyncLexModelsV2ClientConfig] = 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/async_lex_models_v2.py
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 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 | |