Skip to main content

delete_jobs

Creates, updates, deletes, gets or lists a delete_jobs resource.

Overview

Namedelete_jobs
TypeResource
Idazure.digital_twins_core.delete_jobs

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe identifier of the delete job.
createdDateTimestring (date-time)Start time of the job. The timestamp is in RFC3339 format: yyyy-MM-ddTHH:mm:ssZ.
errorobjectDetails of the error(s) that occurred executing the import job.
finishedDateTimestring (date-time)End time of the job. The timestamp is in RFC3339 format: yyyy-MM-ddTHH:mm:ssZ.
purgeDateTimestring (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.
statusstringStatus of the job. Known values are: "notstarted", "running", "failed", and "succeeded".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_by_idselectid, endpointtraceparent, tracestateRetrieves a delete job. Status codes: * 200 OK * 404 Not Found * DeleteJobNotFound - The delete job was not found.
listselectendpointtraceparent, tracestate, max-items-per-pageRetrieves all deletion jobs. This may be useful to find a delete job that was previously requested, or to view a history of delete jobs that have run or are currently running on the instance. Status codes: * 200 OK.
addexecendpointtraceparent, tracestate, operation-id, timeoutInMinutesInitiates a job which deletes all models, twins, and relationships on the instance. Does not delete any other types of entities. Status codes: * 202 Created * 400 Bad Request * JobLimitReached - The maximum number of delete jobs allowed has been reached. * ValidationFailed - Operation-Id already exists.

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.

NameDatatypeDescription
endpointstringThe service endpoint host (no scheme). (default: )
idstringThe id for the delete job. The id is unique within the service and case sensitive. Required.
max-items-per-pageinteger
operation-idstring
timeoutInMinutesinteger
traceparentstring
tracestatestring

SELECT examples

Retrieves a delete job. Status codes: * 200 OK * 404 Not Found * DeleteJobNotFound - The delete job was not found.

SELECT
id,
createdDateTime,
error,
finishedDateTime,
purgeDateTime,
status
FROM azure.digital_twins_core.delete_jobs
WHERE id = '{{ id }}' -- required
AND endpoint = '{{ endpoint }}' -- required
AND traceparent = '{{ traceparent }}'
AND tracestate = '{{ tracestate }}'
;

Lifecycle Methods

Initiates a job which deletes all models, twins, and relationships on the instance. Does not delete any other types of entities. Status codes: * 202 Created * 400 Bad Request * JobLimitReached - The maximum number of delete jobs allowed has been reached. * ValidationFailed - Operation-Id already exists.

EXEC azure.digital_twins_core.delete_jobs.add 
@endpoint='{{ endpoint }}' --required,
@traceparent='{{ traceparent }}',
@tracestate='{{ tracestate }}',
@operation-id='{{ operation-id }}',
@timeoutInMinutes='{{ timeoutInMinutes }}'
@@json=
'{
"traceparent": "{{ traceparent }}",
"tracestate": "{{ tracestate }}"
}'
;