Description
openedon Jun 21, 2019
Description of the new feature
I would like to see a new feature in Az.ApiManagement to get a list of products by providing an ApiId. Currently the only way to find APIs that are associated to a product is by calling Get-AzApiManagementApi -Context $ApimContext -ProductId $ProductId. This assumes I already know the Product I'm trying to search against. However, if I only have the ApiId, there is no way to search the other direction to find products that API is associated to. This functionality is available in the REST API for APIM (https://docs.microsoft.com/en-us/rest/api/apimanagement/2018-01-01/apiproduct/listbyapis), but not in the Powershell Az module.
Proposed implementation details (optional)
I believe the easiest fix for this would be to add a new parameter of ApiId to the existing Get-AzApiManagementProduct cmdlet. No need to create a new cmdlet for this.
The powershell command would look like similar...
Get-AzApiManagementProduct -Context $ApimContext -ApiId $ApiId