如何在 Azure API 管理中向产品添加策略

How to add policy to Product in Azure API Management

我需要有关在 Azure APIM 中向 PRODUCT 添加策略的帮助。 你能告诉我我们如何使用 PowerShell/Azure Cli/Azure DevOps 实现吗?

我想你正在寻找 Set a product-scope policy

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
PS C:\>Set-AzApiManagementPolicy -Context $apimContext -ProductId "0123456789" -Policy $PolicyString