createExport method

Future<CreateExportResponse> createExport({
  1. required ImportExportFileFormat fileFormat,
  2. required ExportResourceSpecification resourceSpecification,
  3. String? filePassword,
})

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

May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter fileFormat : The file format of the bot or bot locale definition files.

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

Parameter filePassword : 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.

Implementation

Future<CreateExportResponse> createExport({
  required ImportExportFileFormat fileFormat,
  required ExportResourceSpecification resourceSpecification,
  String? filePassword,
}) async {
  final $payload = <String, dynamic>{
    'fileFormat': fileFormat.value,
    'resourceSpecification': resourceSpecification,
    if (filePassword != null) 'filePassword': filePassword,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/exports',
    exceptionFnMap: _exceptionFns,
  );
  return CreateExportResponse.fromJson(response);
}