getExport method

Future<GetExportResponse> getExport({
  1. required ExportType exportType,
  2. required String name,
  3. required ResourceType resourceType,
  4. required String version,
})

Exports the contents of a Amazon Lex resource in a specified format.

May throw NotFoundException. May throw LimitExceededException. May throw InternalFailureException. May throw BadRequestException.

Parameter exportType : The format of the exported data.

Parameter name : The name of the bot to export.

Parameter resourceType : The type of resource to export.

Parameter version : The version of the bot to export.

Implementation

Future<GetExportResponse> getExport({
  required ExportType exportType,
  required String name,
  required ResourceType resourceType,
  required String version,
}) async {
  ArgumentError.checkNotNull(exportType, 'exportType');
  ArgumentError.checkNotNull(name, 'name');
  _s.validateStringLength(
    'name',
    name,
    1,
    100,
    isRequired: true,
  );
  ArgumentError.checkNotNull(resourceType, 'resourceType');
  ArgumentError.checkNotNull(version, 'version');
  _s.validateStringLength(
    'version',
    version,
    1,
    64,
    isRequired: true,
  );
  final $query = <String, List<String>>{
    'exportType': [exportType.toValue()],
    'name': [name],
    'resourceType': [resourceType.toValue()],
    'version': [version],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/exports/',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return GetExportResponse.fromJson(response);
}