次の方法で共有


Jobs - ImportJobs Cancel

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.
POST https://digitaltwins-hostname/jobs/imports/{id}/cancel?api-version=2023-10-31

URI Parameters

Name In Required Type Description
id
path True

string

The id for the import job. The id is unique within the service and case sensitive.

api-version
query True

string

The requested API version.

Request Header

Name Required Type Description
traceparent

string

Identifies the request in a distributed tracing system.

tracestate

string

Provides vendor-specific trace identification information and is a companion to traceparent.

Responses

Name Type Description
200 OK

ImportJob

Success

Other Status Codes

ErrorResponse

Default response.

Headers

x-ms-error-code: string

Security

oauth2

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize?resource=0b07f429-9f4b-4714-9392-cc5e8e80c8b0

Examples

Cancel a job

Sample request

POST https://digitaltwins-hostname/jobs/imports/importjob1/cancel?api-version=2023-10-31

Sample response

{
  "id": "importjob1",
  "inputBlobUri": "path to input blob",
  "outputBlobUri": "path to output blob",
  "createdDateTime": "2022-01-01T00:00:00.0000000+00:00",
  "lastActionDateTime": "2022-01-01T00:01:00.0000000+00:00",
  "purgeDateTime": "2022-01-31T00:01:00.0000000+00:00",
  "status": "cancelling"
}

Definitions

Name Description
Error

Error definition.

ErrorResponse

Error response.

ImportJob

A job which contains a reference to the operations to perform, results, and execution metadata.

InnerError

A more specific error description than was provided by the containing error.

status

Status of the job.

Error

Error definition.

Name Type Description
code

string

Service specific error code which serves as the substatus for the HTTP error code.

details

Error[]

Internal error details.

innererror

InnerError

An object containing more specific information than the current object about the error.

message

string

A human-readable representation of the error.

ErrorResponse

Error response.

Name Type Description
error

Error

The error details.

ImportJob

A job which contains a reference to the operations to perform, results, and execution metadata.

Name Type Description
createdDateTime

string

Start time of the job. The timestamp is in RFC3339 format: yyyy-MM-ddTHH:mm:ssZ.

error

Error

Details of the error(s) that occurred executing the import job.

finishedDateTime

string

End time of the job. The timestamp is in RFC3339 format: yyyy-MM-ddTHH:mm:ssZ.

id

string

The identifier of the import job.

inputBlobUri

string

The path to the input Azure storage blob that contains file(s) describing the operations to perform in the job.

lastActionDateTime

string

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.

purgeDateTime

string

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

status

Status of the job.

InnerError

A more specific error description than was provided by the containing error.

Name Type Description
code

string

A more specific error code than was provided by the containing error.

innererror

InnerError

An object containing more specific information than the current object about the error.

status

Status of the job.

Name Type Description
cancelled

string

cancelling

string

failed

string

notstarted

string

running

string

succeeded

string