delete_jobs
Creates, updates, deletes, gets or lists a delete_jobs resource.
Overview
| Name | delete_jobs |
| Type | Resource |
| Id | azure.digital_twins_core.delete_jobs |
Fields
The following fields are returned by SELECT queries:
- get_by_id
- list
| Name | Datatype | Description |
|---|---|---|
id | string | The identifier of the delete 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. |
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", and "succeeded". |
| Name | Datatype | Description |
|---|---|---|
id | string | The identifier of the delete 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. |
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", and "succeeded". |
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 a delete job. Status codes: * 200 OK * 404 Not Found * DeleteJobNotFound - The delete job was not found. |
list | select | endpoint | traceparent, tracestate, max-items-per-page | Retrieves 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. |
add | exec | endpoint | traceparent, tracestate, operation-id, timeoutInMinutes | 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. |
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 delete job. The id is unique within the service and case sensitive. Required. |
max-items-per-page | integer | |
operation-id | string | |
timeoutInMinutes | integer | |
traceparent | string | |
tracestate | string |
SELECT examples
- get_by_id
- list
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 }}'
;
Retrieves 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.
SELECT
id,
createdDateTime,
error,
finishedDateTime,
purgeDateTime,
status
FROM azure.digital_twins_core.delete_jobs
WHERE endpoint = '{{ endpoint }}' -- required
AND traceparent = '{{ traceparent }}'
AND tracestate = '{{ tracestate }}'
AND max-items-per-page = '{{ max-items-per-page }}'
;
Lifecycle Methods
- add
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 }}"
}'
;