为什么AZ CLI不返回PowerShell Get-Azapimanagementsubscription查询中的主键?有办法吗?
为什么AZ CLI在PowerShell Get-azapimanagementsubscription查询中不返回primarykey?有办法吗?请参阅下面,主要私钥和次要私钥都是空的。我可能需要特别的许可吗?
PS /Users/me> Get-AzApiManagementSubscription -Context $apimContext
SubscriptionId : {obfuscated}
UserId : 1
OwnerId : /subscriptions/{obfuscated}/resourceGroups/my-test/providers/Microsoft.ApiManagement/service/my-apim-test/users/1
ProductId : starter
Scope : /subscriptions/{obfuscated}/resourceGroups/my-test/providers/Microsoft.ApiManagement/service/my-apim-test/products/starter
Name :
State : Active
CreatedDate : 4/23/2022 12:28:31 AM
StartDate :
ExpirationDate :
EndDate :
NotificationDate :
PrimaryKey :
SecondaryKey :
StateComment :
AllowTracing : True
Id : /subscriptions/{obfuscated}/resourceGroups/my-test/providers/Microsoft.ApiManagement/service/my-apim-test/subscriptions/{obfuscated}
ResourceGroupName : my-test
ServiceName : my-apim-test
Why does az cli not return PrimaryKey in the powershell Get-AzApiManagementSubscription query? Is there a way? See below, both the Primary and Secondary private keys are empty. Is it a special permission I require perhaps?
PS /Users/me> Get-AzApiManagementSubscription -Context $apimContext
SubscriptionId : {obfuscated}
UserId : 1
OwnerId : /subscriptions/{obfuscated}/resourceGroups/my-test/providers/Microsoft.ApiManagement/service/my-apim-test/users/1
ProductId : starter
Scope : /subscriptions/{obfuscated}/resourceGroups/my-test/providers/Microsoft.ApiManagement/service/my-apim-test/products/starter
Name :
State : Active
CreatedDate : 4/23/2022 12:28:31 AM
StartDate :
ExpirationDate :
EndDate :
NotificationDate :
PrimaryKey :
SecondaryKey :
StateComment :
AllowTracing : True
Id : /subscriptions/{obfuscated}/resourceGroups/my-test/providers/Microsoft.ApiManagement/service/my-apim-test/subscriptions/{obfuscated}
ResourceGroupName : my-test
ServiceName : my-apim-test
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要使用cmdlet在Azure APIM实例中获得订阅的主要键和次要键,请:
img src =“ https://i.sstatic.net/pwffe.png”
< :
在上面的cmdlet中,订阅ID是APIM订阅的ID,如启动器,无限,无限和内置 -在所有访问中。
To get the Primary key and secondary key of subscriptions available in the Azure APIM Instance using the cmdlet is:
Result:
In the above cmdlet, Subscription Id is the Id of APIM Subscription like Starter, Unlimited, and Built-in all access.