You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用az apim update命令修改APIM自定义属性失败的问题求助

Fixing Azure APIM Custom Property Update Failure

Problem

When I checked my Azure API Management instance details using:

az apim show -n Namexxx -g RGxxx

The output included this in customProperties:

{
  "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "false",
  "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "false",
  "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "false",
  "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "false",
  "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": "true",
  "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": "false",
  "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "false",
  "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "false"
}

But when I tried to update the TripleDes168 property with this command:

az apim update -n xxNamexx -g xxRGxx --set customProperties.Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168=false

I got the error:

Couldn't find 'Microsoft' in 'customProperties.Microsoft.WindowsAzure.ApiManagement.Gateway.Security'. Available options: ['Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2']

Root Cause

The issue comes down to how the Azure CLI parses nested property paths. Since the custom property keys themselves contain dots (.), using dot notation directly splits the key into unintended hierarchy levels. The CLI tries to look for a sub-property named Microsoft under customProperties.Microsoft.WindowsAzure.ApiManagement.Gateway.Security, which doesn't exist—leading to the error.

Solution

You need to treat the full property key as a single string by wrapping it in quotes. Use either of these two valid syntaxes:

az apim update -n xxNamexx -g xxRGxx --set "customProperties['Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168']=false"

Option 2: Quoted key with dot notation

az apim update -n xxNamexx -g xxRGxx --set customProperties."Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168"=false

Verify the Change

After running the update command, recheck your APIM instance details with az apim show -n Namexxx -g RGxxx to confirm the TripleDes168 property is now set to false.

内容的提问来源于stack exchange,提问作者tester81

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.30 20:47:27