您目前查看的是 Apigee 和 Apigee Hybrid 說明文件。
查看
Apigee Edge 說明文件。
InvalidCount
錯誤訊息
透過 Apigee 使用者介面或 API 部署 API Proxy 時失敗,並顯示以下錯誤訊息:
Error Saving Revision revision_number Invalid count value interval for identifier identifier_name in policy_name.
錯誤訊息示例
Error Saving Revision 1
Invalid count value 10.0 for identifier identifierName in Reset_Quota_Demo.
螢幕截圖範例

原因
如果「重設配額政策」的 <Allow> 元素中指定的計數值不是整數,API Proxy 的部署作業就會失敗。
舉例來說,如果在 <Allow> 元素中指定的配額間隔為 10.0,則 API Proxy 的部署作業會失敗。
診斷
找出發生錯誤的「重設配額」政策,以及無效的允許計數。這項資訊會顯示在錯誤訊息中。舉例來說,在下列錯誤中,政策名稱為
Reset_Quota_Demo,無效的允許計數為10.0:Error Saving Revision 1 Invalid count value 10.0 for identifier identifierName in Reset_Quota_Demo.確認失敗政策中指定的允許計數值,與錯誤訊息中識別的值 (如上方的步驟 1) 相符。舉例來說,下列政策將允許計數值指定為
10.0,這與錯誤訊息中的值相符:<ResetQuota async="false" continueOnError="false" enabled="true" name="Reset_Quota_Demo"> <DisplayName>Reset_Quota_Demo</DisplayName> <Properties/> <Quota> <Identifier name="identifierName" ref="request.header.identifier"> <Allow>10.0</Allow> </Identifier> </Quota> </ResetQuota>在上述「重設配額政策」範例中,允許計數的值為
10.0,這不是整數。因此,API Proxy 部署作業會失敗,並顯示下列錯誤:Invalid count value 10.0 for identifier identifierName in Reset_Quota_Demo.
解析度
請確認「重設配額政策」的 <Allow> 元素中指定的允許計數值為整數。如要修正上述 ResetQuota 政策範例,您可以將
<ResetQuota async="false" continueOnError="false" enabled="true" name="Reset_Quota_Demo">
<DisplayName>Reset_Quota_Demo</DisplayName>
<Properties/>
<Quota>
<Identifier name="identifierName" ref="request.header.identifier">
<Allow>10</Allow>
</Identifier>
</Quota>
</ResetQuota>