createImportJob method

Future<CreateImportJobResponse> createImportJob({
  1. required String applicationId,
  2. required ImportJobRequest importJobRequest,
})

Creates an import job for an application.

May throw BadRequestException. May throw InternalServerErrorException. May throw PayloadTooLargeException. May throw ForbiddenException. May throw NotFoundException. May throw MethodNotAllowedException. May throw TooManyRequestsException.

Parameter applicationId : The unique identifier for the application. This identifier is displayed as the Project ID on the Amazon Pinpoint console.

Implementation

Future<CreateImportJobResponse> createImportJob({
  required String applicationId,
  required ImportJobRequest importJobRequest,
}) async {
  ArgumentError.checkNotNull(applicationId, 'applicationId');
  ArgumentError.checkNotNull(importJobRequest, 'importJobRequest');
  final response = await _protocol.sendRaw(
    payload: importJobRequest,
    method: 'POST',
    requestUri: '/v1/apps/${Uri.encodeComponent(applicationId)}/jobs/import',
    exceptionFnMap: _exceptionFns,
  );
  final $json = await _s.jsonFromResponse(response);
  return CreateImportJobResponse(
    importJobResponse: ImportJobResponse.fromJson($json),
  );
}