--subscription-required parameter of az apim product create not working
az feedbackauto-generates most of the information requested below, as of CLI version 2.0.62
Describe the bug The "az apim product create" is used to create a new product in APIM. Products can have subscriptionRequired set to true or false. There is an Azure CLI argument "--subscription-required" to allow this. However, in all circumstances, the subscriptionRequired value is set to true.
To Reproduce
- Create a new API Management
- Create a new Product
- Run this: az apim product create --resource-group "<my RG>" --service-name "<My APIM>" --product-id "<My Product>" --product-name "<My Product>" --state "published" --subscription-required "false" Or az apim product create --resource-group "<my RG>" --service-name "<My APIM>" --product-id "<My Product>" --product-name "<My Product>" --state "published" --subscription-required false Or az apim product create --resource-group "<my RG>" --service-name "<My APIM>" --product-id "<My Product>" --product-name "<My Product>" --state "published" --subscription-required $false All result in subscriptionRequired : true
Expected behavior The value of subscriptionRequired should be set to false if "false" is used on the CLI argument.
Environment summary Azure CLI either in a cloud shell or locally.
Additional context N/A
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @miaojiang.
Issue Details
az feedbackauto-generates most of the information requested below, as of CLI version 2.0.62
Describe the bug The "az apim product create" is used to create a new product in APIM. Products can have subscriptionRequired set to true or false. There is an Azure CLI argument "--subscription-required" to allow this. However, in all circumstances, the subscriptionRequired value is set to true.
To Reproduce
- Create a new API Management
- Create a new Product
- Run this: az apim product create --resource-group "<my RG>" --service-name "<My APIM>" --product-id "<My Product>" --product-name "<My Product>" --state "published" --subscription-required "false" Or az apim product create --resource-group "<my RG>" --service-name "<My APIM>" --product-id "<My Product>" --product-name "<My Product>" --state "published" --subscription-required false Or az apim product create --resource-group "<my RG>" --service-name "<My APIM>" --product-id "<My Product>" --product-name "<My Product>" --state "published" --subscription-required $false All result in subscriptionRequired : true
Expected behavior The value of subscriptionRequired should be set to false if "false" is used on the CLI argument.
Environment summary Azure CLI either in a cloud shell or locally.
Additional context N/A
| Author: | mossywell |
|---|---|
| Assignees: | - |
| Labels: |
|
| Milestone: | - |
route to service team
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @miaojiang.
Issue Details
az feedbackauto-generates most of the information requested below, as of CLI version 2.0.62
Describe the bug The "az apim product create" is used to create a new product in APIM. Products can have subscriptionRequired set to true or false. There is an Azure CLI argument "--subscription-required" to allow this. However, in all circumstances, the subscriptionRequired value is set to true.
To Reproduce
- Create a new API Management
- Create a new Product
- Run this: az apim product create --resource-group "<my RG>" --service-name "<My APIM>" --product-id "<My Product>" --product-name "<My Product>" --state "published" --subscription-required "false" Or az apim product create --resource-group "<my RG>" --service-name "<My APIM>" --product-id "<My Product>" --product-name "<My Product>" --state "published" --subscription-required false Or az apim product create --resource-group "<my RG>" --service-name "<My APIM>" --product-id "<My Product>" --product-name "<My Product>" --state "published" --subscription-required $false All result in subscriptionRequired : true
Expected behavior The value of subscriptionRequired should be set to false if "false" is used on the CLI argument.
Environment summary Azure CLI either in a cloud shell or locally.
Additional context N/A
| Author: | mossywell |
|---|---|
| Assignees: | - |
| Labels: |
|
| Milestone: | - |
@mossywell Apologies for the late reply. I was able to reproduce this issue. We will update this thread once we have more details on the fix.
@adrianhall Could you please look into this and provide an update on you get a chance ? Awaiting your reply.
@mossywell Apologies for the late reply. I was able to reproduce this issue. We will update this thread once we have more details on the fix.
@adrianhall Could you please look into this and provide an update on you get a chance ? Awaiting your reply.
Thank you
Thanks for the report. I've included this in our backlog so that a fix will be available in the next APIM release of the CLI. I'll update when then release happens.
Excellent - thanks for the update.
i have this problem too, please fix it soon!!
@mossywell Apologies for the late reply. I was able to reproduce this issue. We will update this thread once we have more details on the fix. @adrianhall Could you please look into this and provide an update on you get a chance ? Awaiting your reply.
Thank you
bro, do you have any solution for this?
It can be done in PowerShell as follows:
$context = New-AzApiManagementContext -ResourceGroupName "my-rg" -ServiceName "my-apim" $product = Get-AzApiManagementProduct -Context $context -ProductId "my-product" $product.SubscriptionRequired = $false $product | Set-AzApiManagementProduct -Context $context
Hi, we're sending this friendly reminder because we haven't heard back from you in a while. We need more information about this issue to help address it. Please be sure to give us your input within the next 7 days. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!