import_jobs
Creates, updates, deletes, gets or lists an import_jobs resource.
Overview
| Name | import_jobs |
| Type | Resource |
| Id | azure.digital_twins_core.import_jobs |
Fields
The following fields are returned by SELECT queries:
- get_by_id
- list
| Name | Datatype | Description |
|---|---|---|
id | string | The identifier of the import job. |
createdDateTime | string (date-time) | Start time of the job. The timestamp is in RFC3339 format: yyyy-MM-ddTHH:mm:ssZ. |
error | object | Details of the error(s) that occurred executing the import job. |
finishedDateTime | string (date-time) | End time of the job. The timestamp is in RFC3339 format: yyyy-MM-ddTHH:mm:ssZ. |
inputBlobUri | string | The path to the input Azure storage blob that contains file(s) describing the operations to perform in the job. Required. |
lastActionDateTime | string (date-time) | Last time service performed any action from the job. The timestamp is in RFC3339 format: yyyy-MM-ddTHH:mm:ssZ. |
outputBlobUri | string | The path to the output Azure storage blob that will contain the errors and progress logs of import job. Required. |
purgeDateTime | string (date-time) | Time at which job will be purged by the service from the system. The timestamp is in RFC3339 format: yyyy-MM-ddTHH:mm:ssZ. |
status | string | Status of the job. Known values are: "notstarted", "running", "failed", "succeeded", "cancelling", and "cancelled". |
| Name | Datatype | Description |
|---|---|---|
id | string | The identifier of the import job. |
createdDateTime | string (date-time) | Start time of the job. The timestamp is in RFC3339 format: yyyy-MM-ddTHH:mm:ssZ. |
error | object | Details of the error(s) that occurred executing the import job. |
finishedDateTime | string (date-time) | End time of the job. The timestamp is in RFC3339 format: yyyy-MM-ddTHH:mm:ssZ. |
inputBlobUri | string | The path to the input Azure storage blob that contains file(s) describing the operations to perform in the job. Required. |
lastActionDateTime | string (date-time) | Last time service performed any action from the job. The timestamp is in RFC3339 format: yyyy-MM-ddTHH:mm:ssZ. |
outputBlobUri | string | The path to the output Azure storage blob that will contain the errors and progress logs of import job. Required. |
purgeDateTime | string (date-time) | Time at which job will be purged by the service from the system. The timestamp is in RFC3339 format: yyyy-MM-ddTHH:mm:ssZ. |
status | string | Status of the job. Known values are: "notstarted", "running", "failed", "succeeded", "cancelling", and "cancelled". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_by_id | select | id, endpoint | traceparent, tracestate | Retrieves an import job. Status codes: * 200 OK * 404 Not Found * ImportJobNotFound - The import job was not found. |
list | select | endpoint | traceparent, tracestate, max-items-per-page | Retrieves all import jobs. Status codes: * 200 OK. |
delete | delete | id, endpoint | traceparent, tracestate | Deletes an import job. This is simply used to remove a job id, so it may be reused later. It can not be used to stop entities from being imported. Status codes: * 204 No Content * 400 Bad Request * ValidationFailed - The import job request is not valid. |
add | exec | id, endpoint, inputBlobUri, outputBlobUri | traceparent, tracestate | Creates an import job. Status codes: * 201 Created * 400 Bad Request * JobLimitReached - The maximum number of import jobs allowed has been reached. * ValidationFailed - The import job request is not valid. |
cancel | exec | id, endpoint | traceparent, tracestate | Cancels an import job that is currently running. Service will stop any import operations triggered by the current import job that are in progress, and go to a cancelled state. Please note that this will leave your instance in an unknown state as there won't be any rollback operation. Status codes: * 200 Request Accepted * 400 Bad Request * ValidationFailed - The import job request is not valid. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
endpoint | string | The service endpoint host (no scheme). (default: ) |
id | string | The id for the import job. The id is unique within the service and case sensitive. Required. |
max-items-per-page | integer | |
traceparent | string | |
tracestate | string |
SELECT examples
- get_by_id
- list
Retrieves an import job. Status codes: * 200 OK * 404 Not Found * ImportJobNotFound - The import job was not found.
SELECT
id,
createdDateTime,
error,
finishedDateTime,
inputBlobUri,
lastActionDateTime,
outputBlobUri,
purgeDateTime,
status
FROM azure.digital_twins_core.import_jobs
WHERE id = '{{ id }}' -- required
AND endpoint = '{{ endpoint }}' -- required
AND traceparent = '{{ traceparent }}'
AND tracestate = '{{ tracestate }}'
;
Retrieves all import jobs. Status codes: * 200 OK.
SELECT
id,
createdDateTime,
error,
finishedDateTime,
inputBlobUri,
lastActionDateTime,
outputBlobUri,
purgeDateTime,
status
FROM azure.digital_twins_core.import_jobs
WHERE endpoint = '{{ endpoint }}' -- required
AND traceparent = '{{ traceparent }}'
AND tracestate = '{{ tracestate }}'
AND max-items-per-page = '{{ max-items-per-page }}'
;
DELETE examples
- delete
Deletes an import job. This is simply used to remove a job id, so it may be reused later. It can not be used to stop entities from being imported. Status codes: * 204 No Content * 400 Bad Request * ValidationFailed - The import job request is not valid.
DELETE FROM azure.digital_twins_core.import_jobs
WHERE id = '{{ id }}' --required
AND endpoint = '{{ endpoint }}' --required
AND traceparent = '{{ traceparent }}'
AND tracestate = '{{ tracestate }}'
;
Lifecycle Methods
- add
- cancel
Creates an import job. Status codes: * 201 Created * 400 Bad Request * JobLimitReached - The maximum number of import jobs allowed has been reached. * ValidationFailed - The import job request is not valid.
EXEC azure.digital_twins_core.import_jobs.add
@id='{{ id }}' --required,
@endpoint='{{ endpoint }}' --required,
@traceparent='{{ traceparent }}',
@tracestate='{{ tracestate }}'
@@json=
'{
"inputBlobUri": "{{ inputBlobUri }}",
"outputBlobUri": "{{ outputBlobUri }}",
"error": "{{ error }}"
}'
;
Cancels an import job that is currently running. Service will stop any import operations triggered by the current import job that are in progress, and go to a cancelled state. Please note that this will leave your instance in an unknown state as there won't be any rollback operation. Status codes: * 200 Request Accepted * 400 Bad Request * ValidationFailed - The import job request is not valid.
EXEC azure.digital_twins_core.import_jobs.cancel
@id='{{ id }}' --required,
@endpoint='{{ endpoint }}' --required,
@traceparent='{{ traceparent }}',
@tracestate='{{ tracestate }}'
@@json=
'{
"traceparent": "{{ traceparent }}",
"tracestate": "{{ tracestate }}"
}'
;