createBatchImportJob method

Future<void> createBatchImportJob({
  1. required String eventTypeName,
  2. required String iamRoleArn,
  3. required String inputPath,
  4. required String jobId,
  5. required String outputPath,
  6. List<Tag>? tags,
})

Creates a batch import job.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter eventTypeName : The name of the event type.

Parameter iamRoleArn : The ARN of the IAM role created for Amazon S3 bucket that holds your data file.

The IAM role must have read permissions to your input S3 bucket and write permissions to your output S3 bucket. For more information about bucket permissions, see User policy examples in the Amazon S3 User Guide.

Parameter inputPath : The URI that points to the Amazon S3 location of your data file.

Parameter jobId : The ID of the batch import job. The ID cannot be of a past job, unless the job exists in CREATE_FAILED state.

Parameter outputPath : The URI that points to the Amazon S3 location for storing your results.

Parameter tags : A collection of key-value pairs associated with this request.

Implementation

Future<void> createBatchImportJob({
  required String eventTypeName,
  required String iamRoleArn,
  required String inputPath,
  required String jobId,
  required String outputPath,
  List<Tag>? tags,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSHawksNestServiceFacade.CreateBatchImportJob'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'eventTypeName': eventTypeName,
      'iamRoleArn': iamRoleArn,
      'inputPath': inputPath,
      'jobId': jobId,
      'outputPath': outputPath,
      if (tags != null) 'tags': tags,
    },
  );
}