What does az apim api import --no-wait exactly do?

Michal Cermak 0 Reputation points
2024-08-15T13:43:23.5566667+00:00

Hello,

we use az apim api import in our GitHub workflow for updating API configurations in our API management instances.

https://learn.microsoft.com/en-us/cli/azure/apim/api?view=azure-cli-latest#az-apim-api-update

az apim api import \
  --api-id $API_ID \
  --display-name $API_ID \
  --specification-path $OPEN_API_SPECIFICATION_PATH \
  --resource-group ${{ env.AZURE_RESOURCE_GROUP }} \
  --service-name ${{ env.APIM_SERVICE_NAME }} \
  --specification-format OpenApi \
  --path $PUBLISH_URL \
  --description $DESCRIPTION \
  --subscription-required true

The problem is that sometimes the command takes more than 30 seconds. At the same time, even if we call the command several times with the same parameter values (including the same Open Api specification), the duration of the command varies ... sometimes 2 seconds, sometimes 30 seconds.

In the documentation it is stated that it is possible to use the --no-wait parameter, but it is not clear from the parameter description what the impact of this usage is, in the sense of whether it is possible to call other configuration commands immediately afterwards (API/endpoint policy configuration, API application Insights configuration, Web service url attribute update, etc.).

So the questions are**:**

  1. Why does the duration of importing the same configuration differ?
  2. When using the --no-wait parameter, is it possible (is it safe) to immediately call other configuration commands (Azure AZ cli or REST API)? e.g.
Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
2,105 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.