[APIM] az apim api import throws a LinkedInvalidPropertyId error
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
### Describe the bug
I am running a script which initially runs
**az apim api versionset create** --> This command is successfully creating a version set in the required resource group
Then I am running a loop which iteratively runs
**az apim api import** --> Here along with many other arguments I also specify --api-version-set-id
The behavior of this is very erratic, upon running it sometimes either successfully runs for all versions or it fails for a few or all versions.
Example: For a first few versions from v1 to v4 the api is successfully imported from a swagger json file but from v5 onwards it throws the following error
**ERROR: (LinkedInvalidPropertyId) Property id 'mypropertyid' at path 'properties.apiVersionSetId' is invalid. Expect fully qualified resource Id that start with '/subscriptions/{subscriptionId}' or '/providers/{resourceProviderNamespace}/'.
Code: LinkedInvalidPropertyId**
I have verified all the required paths and resources on their availability, and everything is correct.
Kindly assist me in resolving this issue ASAP.
### Related command
**az apim api import**
### Errors
**ERROR: (LinkedInvalidPropertyId) Property id 'redmaniacVersionset-dev' at path 'properties.apiVersionSetId' is invalid. Expect fully qualified resource Id that start with '/subscriptions/{subscriptionId}' or '/providers/{resourceProviderNamespace}/'.
Code: LinkedInvalidPropertyId**
### Issue script & Debug output
ERROR: (LinkedInvalidPropertyId) Property id '/apiVersionSets/redmaniacVersionset-dev' at path 'properties.apiVersionSetId' is invalid. Expect fully qualified resource Id that start with '/subscriptions/{subscriptionId}' or '/providers/{resourceProviderNamespace}/'.
2024-02-12T02:03:31.5830869Z Code: LinkedInvalidPropertyId
2024-02-12T02:03:31.5831326Z Message: Property id '/apiVersionSets/redmaniacVersionset-dev' at path 'properties.apiVersionSetId' is invalid. Expect fully qualified resource Id that start with '/subscriptions/{subscriptionId}' or '/providers/{resourceProviderNamespace}/'.
2024-02-12T02:03:31.5831599Z "redmaniac-api-"dev"-v6-id"
2024-02-12T02:03:33.7762796Z ERROR: (LinkedInvalidPropertyId) Property id '/apiVersionSets/redmaniacVersionset-dev' at path 'properties.apiVersionSetId' is invalid. Expect fully qualified resource Id that start with '/subscriptions/{subscriptionId}' or '/providers/{resourceProviderNamespace}/'.
2024-02-12T02:03:33.7764597Z Code: LinkedInvalidPropertyId
2024-02-12T02:03:33.7765368Z Message: Property id '/apiVersionSets/redmaniacVersionset-dev' at path 'properties.apiVersionSetId' is invalid. Expect fully qualified resource Id that start with '/subscriptions/{subscriptionId}' or '/providers/{resourceProviderNamespace}/'.
2024-02-12T02:03:33.9638160Z "redmaniac-api-"dev"-v7-id"
2024-02-12T02:03:35.4886748Z ERROR: (LinkedInvalidPropertyId) Property id '/apiVersionSets/redmaniacVersionset-dev' at path 'properties.apiVersionSetId' is invalid. Expect fully qualified resource Id that start with '/subscriptions/{subscriptionId}' or '/providers/{resourceProviderNamespace}/'.
2024-02-12T02:03:35.4887274Z Code: LinkedInvalidPropertyId
2024-02-12T02:03:35.4888039Z Message: Property id '/apiVersionSets/redmaniacVersionset-dev' at path 'properties.apiVersionSetId' is invalid. Expect fully qualified resource Id that start with '/subscriptions/{subscriptionId}' or '/providers/{resourceProviderNamespace}/'.
### Expected behavior
It should succesfully create an api version in the specified apim and must return its details..
### Environment Summary
azure-cli 2.55.0 *
core 2.55.0 *
telemetry 1.1.0
Dependencies:
msal 1.24.0b2
azure-mgmt-resource 23.1.0b2
### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.