LexModelsV2 / Client / create_export

create_export#

LexModelsV2.Client.create_export(**kwargs)#

Creates a zip archive containing the contents of a bot or a bot locale. The archive contains a directory structure that contains JSON files that define the bot.

You can create an archive that contains the complete definition of a bot, or you can specify that the archive contain only the definition of a single bot locale.

For more information about exporting bots, and about the structure of the export archive, see Importing and exporting bots

See also: AWS API Documentation

Request Syntax

response = client.create_export(
    resourceSpecification={
        'botExportSpecification': {
            'botId': 'string',
            'botVersion': 'string'
        },
        'botLocaleExportSpecification': {
            'botId': 'string',
            'botVersion': 'string',
            'localeId': 'string'
        },
        'customVocabularyExportSpecification': {
            'botId': 'string',
            'botVersion': 'string',
            'localeId': 'string'
        },
        'testSetExportSpecification': {
            'testSetId': 'string'
        }
    },
    fileFormat='LexJson'|'TSV'|'CSV',
    filePassword='string'
)
Parameters:
  • resourceSpecification (dict) –

    [REQUIRED]

    Specifies the type of resource to export, either a bot or a bot locale. You can only specify one type of resource to export.

    • botExportSpecification (dict) –

      Parameters for exporting a bot.

      • botId (string) – [REQUIRED]

        The identifier of the bot assigned by Amazon Lex.

      • botVersion (string) – [REQUIRED]

        The version of the bot that was exported. This will be either DRAFT or the version number.

    • botLocaleExportSpecification (dict) –

      Parameters for exporting a bot locale.

      • botId (string) – [REQUIRED]

        The identifier of the bot to create the locale for.

      • botVersion (string) – [REQUIRED]

        The version of the bot to export.

      • localeId (string) – [REQUIRED]

        The identifier of the language and locale to export. The string must match one of the locales in the bot.

    • customVocabularyExportSpecification (dict) –

      The parameters required to export a custom vocabulary.

      • botId (string) – [REQUIRED]

        The identifier of the bot that contains the custom vocabulary to export.

      • botVersion (string) – [REQUIRED]

        The version of the bot that contains the custom vocabulary to export.

      • localeId (string) – [REQUIRED]

        The locale of the bot that contains the custom vocabulary to export.

    • testSetExportSpecification (dict) –

      Specifications for the test set that is exported as a resource.

      • testSetId (string) – [REQUIRED]

        The unique identifier of the test set.

  • fileFormat (string) –

    [REQUIRED]

    The file format of the bot or bot locale definition files.

  • filePassword (string) – An password to use to encrypt the exported archive. Using a password is optional, but you should encrypt the archive to protect the data in transit between Amazon Lex and your local computer.

Return type:

dict

Returns:

Response Syntax

{
    'exportId': 'string',
    'resourceSpecification': {
        'botExportSpecification': {
            'botId': 'string',
            'botVersion': 'string'
        },
        'botLocaleExportSpecification': {
            'botId': 'string',
            'botVersion': 'string',
            'localeId': 'string'
        },
        'customVocabularyExportSpecification': {
            'botId': 'string',
            'botVersion': 'string',
            'localeId': 'string'
        },
        'testSetExportSpecification': {
            'testSetId': 'string'
        }
    },
    'fileFormat': 'LexJson'|'TSV'|'CSV',
    'exportStatus': 'InProgress'|'Completed'|'Failed'|'Deleting',
    'creationDateTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) –

    • exportId (string) –

      An identifier for a specific request to create an export.

    • resourceSpecification (dict) –

      A description of the type of resource that was exported, either a bot or a bot locale.

      • botExportSpecification (dict) –

        Parameters for exporting a bot.

        • botId (string) –

          The identifier of the bot assigned by Amazon Lex.

        • botVersion (string) –

          The version of the bot that was exported. This will be either DRAFT or the version number.

      • botLocaleExportSpecification (dict) –

        Parameters for exporting a bot locale.

        • botId (string) –

          The identifier of the bot to create the locale for.

        • botVersion (string) –

          The version of the bot to export.

        • localeId (string) –

          The identifier of the language and locale to export. The string must match one of the locales in the bot.

      • customVocabularyExportSpecification (dict) –

        The parameters required to export a custom vocabulary.

        • botId (string) –

          The identifier of the bot that contains the custom vocabulary to export.

        • botVersion (string) –

          The version of the bot that contains the custom vocabulary to export.

        • localeId (string) –

          The locale of the bot that contains the custom vocabulary to export.

      • testSetExportSpecification (dict) –

        Specifications for the test set that is exported as a resource.

        • testSetId (string) –

          The unique identifier of the test set.

    • fileFormat (string) –

      The file format used for the bot or bot locale definition files.

    • exportStatus (string) –

      The status of the export. When the status is Completed, you can use the DescribeExport operation to get the pre-signed S3 URL link to your exported bot or bot locale.

    • creationDateTime (datetime) –

      The date and time that the request to export a bot was created.

Exceptions

  • LexModelsV2.Client.exceptions.ThrottlingException

  • LexModelsV2.Client.exceptions.ServiceQuotaExceededException

  • LexModelsV2.Client.exceptions.ValidationException

  • LexModelsV2.Client.exceptions.ResourceNotFoundException

  • LexModelsV2.Client.exceptions.ConflictException

  • LexModelsV2.Client.exceptions.InternalServerException