How to cancel after delete Custom Model

윤 도호(Do-Ho Yoon) 96 Reputation points
2020-12-16T08:22:22.803+00:00

Greeting.

I've been look about delete model.

The API written, "Model artifacts will be permanently removed within 48 hours."

Is there possible to cancel the process?

Or,

Do i use the Copy of API with Generate before delete Completely?

The Link at Below:
DeleteCustomModel

Thank you.

Azure AI Document Intelligence
Azure AI Document Intelligence
An Azure service that turns documents into usable data. Previously known as Azure Form Recognizer.
1,533 questions
0 comments No comments
{count} votes

Accepted answer
  1. romungi-MSFT 43,696 Reputation points Microsoft Employee
    2020-12-16T12:23:42.673+00:00

    @윤 도호(Do-Ho Yoon) The cancellation of the delete model operation is not possible if the response code from the delete operation is 204. You can however use the copy model operation to copy the model to a different resource before the delete operation. The steps to perform this are:

    • Generate authorization request on the resource to which you will copy the custom model. This operation will provide you the placeholder modelId and access token which will be used in the copy operation.

    Output:

    {  
      "modelId": "<model_id>",  
      "accessToken": "<token>",  
      "expirationDateTimeTicks": <ticks>  
    }  
    
    • Run the copy model API by passing the following in the body of the request along with the source model id in the request parameter: {
      "targetResourceId": "<resource_id_of_the_resource_to_which_the_model_needs_to_be_copied>",
      "targetResourceRegion": "<target_resource_region>",
      "copyAuthorization": {
      "modelId": "<modelid_from_above_operation>",
      "accessToken": "<token_from_above_operation>",
      "expirationDateTimeTicks": <ticks>
      }
      }

    Output:

    Note the result id from the response and check the status in the next step

    • Use getCopyModelResult and use the subscription key, result id and source model id from the source resource as the above step.

    If the copy is successful you can list the model id from the first step using getCustomModel and see if the copy model is successful.

    Please, note that the copy model will work only if the source model is valid i.e the model status should be "ready" to be copied to a different resource.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful