Compartir a través de

Bicep 错误/警告代码 - BCP077

引用只写属性时,将发生此错误/警告。

错误/警告说明

The property <property-name> on type <type-name> is write-only. Write-only properties cannot be accessed.

示例

以下示例会引发警告,因为 customHeaders 是只写属性。

resource webhook 'Microsoft.ContainerRegistry/registries/webhooks@2023-07-01' existing = {
  name: 'registry/webhook'
}

output customerHeaders object = webhook.properties.customHeaders

后续步骤

有关 Bicep 错误和警告代码的详细信息,请参阅 Bicep 警告和错误