CreateBulkImportJob
Defines a job to ingest data to AWS IoT SiteWise from Amazon S3. For more information, see Create a bulk import job (AWS CLI) in the Amazon Simple Storage Service User Guide.
Important
Before you create a bulk import job, you must enable AWS IoT SiteWise warm tier or AWS IoT SiteWise cold tier. For more information about how to configure storage settings, see PutStorageConfiguration.
Bulk import is designed to store historical data to AWS IoT SiteWise. It does not trigger computations or notifications on AWS IoT SiteWise warm or cold tier storage.
Request Syntax
POST /jobs HTTP/1.1
Content-type: application/json
{
"adaptiveIngestion": boolean
,
"deleteFilesAfterImport": boolean
,
"errorReportLocation": {
"bucket": "string
",
"prefix": "string
"
},
"files": [
{
"bucket": "string
",
"key": "string
",
"versionId": "string
"
}
],
"jobConfiguration": {
"fileFormat": {
"csv": {
"columnNames": [ "string
" ]
},
"parquet": {
}
}
},
"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.
- adaptiveIngestion
-
If set to true, ingest new data into AWS IoT SiteWise storage. Measurements with notifications, metrics and transforms are computed. If set to false, historical data is ingested into AWS IoT SiteWise as is.
Type: Boolean
Required: No
- deleteFilesAfterImport
-
If set to true, your data files is deleted from S3, after ingestion into AWS IoT SiteWise storage.
Type: Boolean
Required: No
- 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 AWS IoT SiteWise to read Amazon S3 data.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 1600.
Pattern:
^arn:aws(-cn|-us-gov)?:[a-zA-Z0-9-:\/_\.]+$
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
– AWS IoT SiteWise is waiting for the current bulk import job to finish. -
CANCELLED
– The bulk import job has been canceled. -
RUNNING
– AWS IoT SiteWise is processing your request to import your data from Amazon S3. -
COMPLETED
– AWS IoT SiteWise successfully completed your request to import data from Amazon S3. -
FAILED
– AWS 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
– AWS 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
-
AWS 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 AWS 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 AWS 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 AWS IoT SiteWise User Guide.
HTTP Status Code: 429
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: