CreateBulkImportJob - Amazon IoT SiteWise
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China.

CreateBulkImportJob

Defines a job to ingest data to Amazon IoT SiteWise from Amazon S3. For more information, see Create a bulk import job (Amazon CLI) in the Amazon Simple Storage Service User Guide.

Important

You must enable Amazon IoT SiteWise to export data to Amazon S3 before you create a bulk import job. For more information about how to configure storage settings, see PutStorageConfiguration.

Request Syntax

POST /jobs HTTP/1.1 Content-type: application/json { "errorReportLocation": { "bucket": "string", "prefix": "string" }, "files": [ { "bucket": "string", "key": "string", "versionId": "string" } ], "jobConfiguration": { "fileFormat": { "csv": { "columnNames": [ "string" ] } } }, "jobName": "string", "jobRoleArn": "string" }

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request accepts the following data in JSON format.

errorReportLocation

The Amazon S3 destination where errors associated with the job creation request are saved.

Type: ErrorReportLocation object

Required: Yes

files

The files in the specified Amazon S3 bucket that contain your data.

Type: Array of File objects

Required: Yes

jobConfiguration

Contains the configuration information of a job, such as the file format used to save data in Amazon S3.

Type: JobConfiguration object

Required: Yes

jobName

The unique name that helps identify the job request.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 256.

Pattern: [^\u0000-\u001F\u007F]+

Required: Yes

jobRoleArn

The ARN of the IAM role that allows Amazon IoT SiteWise to read Amazon S3 data.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1600.

Pattern: .*

Required: Yes

Response Syntax

HTTP/1.1 202 Content-type: application/json { "jobId": "string", "jobName": "string", "jobStatus": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 202 response.

The following data is returned in JSON format by the service.

jobId

The ID of the job.

Type: String

Length Constraints: Fixed length of 36.

Pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$

jobName

The unique name that helps identify the job request.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 256.

Pattern: [^\u0000-\u001F\u007F]+

jobStatus

The status of the bulk import job can be one of following values.

  • PENDING – Amazon IoT SiteWise is waiting for the current bulk import job to finish.

  • CANCELLED – The bulk import job has been canceled.

  • RUNNING – Amazon IoT SiteWise is processing your request to import your data from Amazon S3.

  • COMPLETED – Amazon IoT SiteWise successfully completed your request to import data from Amazon S3.

  • FAILED – Amazon IoT SiteWise couldn't process your request to import data from Amazon S3. You can use logs saved in the specified error report location in Amazon S3 to troubleshoot issues.

  • COMPLETED_WITH_FAILURES – Amazon IoT SiteWise completed your request to import data from Amazon S3 with errors. You can use logs saved in the specified error report location in Amazon S3 to troubleshoot issues.

Type: String

Valid Values: PENDING | CANCELLED | RUNNING | COMPLETED | FAILED | COMPLETED_WITH_FAILURES

Errors

For information about the errors that are common to all actions, see Common Errors.

ConflictingOperationException

Your request has conflicting operations. This can occur if you're trying to perform more than one operation on the same resource at the same time.

HTTP Status Code: 409

InternalFailureException

Amazon IoT SiteWise can't process your request right now. Try again later.

HTTP Status Code: 500

InvalidRequestException

The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters. Check your request and try again.

HTTP Status Code: 400

LimitExceededException

You've reached the limit for a resource. For example, this can occur if you're trying to associate more than the allowed number of child assets or attempting to create more than the allowed number of properties for an asset model.

For more information, see Quotas in the Amazon IoT SiteWise User Guide.

HTTP Status Code: 410

ResourceAlreadyExistsException

The resource already exists.

HTTP Status Code: 409

ResourceNotFoundException

The requested resource can't be found.

HTTP Status Code: 404

ThrottlingException

Your request exceeded a rate limit. For example, you might have exceeded the number of Amazon IoT SiteWise assets that can be created per second, the allowed number of messages per second, and so on.

For more information, see Quotas in the Amazon IoT SiteWise User Guide.

HTTP Status Code: 429

See Also

For more information about using this API in one of the language-specific Amazon SDKs, see the following: