What does az apim api import --no-wait exactly do?
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**:**
- Why does the duration of importing the same configuration differ?
- 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.
- CLI - az apim api update https://learn.microsoft.com/en-us/cli/azure/apim/api?view=azure-cli-latest#az-apim-api-update
- REST - update gateway https://learn.microsoft.com/en-us/rest/api/apimanagement/gateway/create-or-update?view=rest-apimanagement-2022-08-01&tabs=HTTP
- REST update API policy https://learn.microsoft.com/en-us/rest/api/apimanagement/api-policy/create-or-update?view=rest-apimanagement-2022-08-01&tabs=HTTP
- REST update API operation policy https://learn.microsoft.com/en-us/rest/api/apimanagement/api-operation-policy/create-or-update?view=rest-apimanagement-2022-08-01&tabs=HTTP
- REST update API diagnostic https://learn.microsoft.com/en-us/rest/api/apimanagement/api-diagnostic/create-or-update?view=rest-apimanagement-2022-08-01&tabs=HTTP