create_bot
async
¶
create_bot(
bot_name: Name,
role_arn: RoleArn,
data_privacy: DataPrivacy,
idle_session_ttl_in_seconds: SessionTTL,
*,
config_overrides: Optional[AsyncLexModelsV2ClientConfig] = None,
description: Optional[Description] = None,
bot_tags: Optional[TagMap] = None,
test_bot_alias_tags: Optional[TagMap] = None,
bot_type: Optional[BotType] = None,
bot_members: Optional[BotMembers] = None,
error_log_settings: Optional[ErrorLogSettings] = None,
) -> CreateBotResponse
Creates an Amazon Lex conversational bot.
Parameters:
-
bot_name(Name) –The name of the bot. The bot name must be unique in the account that creates the bot.
-
description(Optional[Description], default:None) –A description of the bot. It appears in lists to help you identify a particular bot.
-
role_arn(RoleArn) –The Amazon Resource Name (ARN) of an IAM role that has permission to access the bot.
-
data_privacy(DataPrivacy) –Provides information on additional privacy protections Amazon Lex should use with the bot's data.
-
idle_session_ttl_in_seconds(SessionTTL) –The time, in seconds, that Amazon Lex should keep information about a user's conversation with the bot.
A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and Amazon Lex deletes any data provided before the timeout.
You can specify between 60 (1 minute) and 86,400 (24 hours) seconds.
-
bot_tags(Optional[TagMap], default:None) –A list of tags to add to the bot. You can only add tags when you create a bot. You can't use the
UpdateBotoperation to update tags. To update tags, use theTagResourceoperation. -
test_bot_alias_tags(Optional[TagMap], default:None) –A list of tags to add to the test alias for a bot. You can only add tags when you create a bot. You can't use the
UpdateAliasoperation to update tags. To update tags on the test alias, use theTagResourceoperation. -
bot_type(Optional[BotType], default:None) –The type of a bot to create.
-
bot_members(Optional[BotMembers], default:None) –The list of bot members in a network to be created.
-
error_log_settings(Optional[ErrorLogSettings], default:None) –Specifies the configuration for error logging during bot creation.
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
722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 | |