您目前查看的是 Apigee 和 Apigee Hybrid 說明文件。
查看
Apigee Edge 說明文件。
InvalidQuotaInterval
錯誤訊息
透過 Apigee 使用者介面或 API 部署 API Proxy 時失敗,並顯示以下錯誤訊息:
Error Saving Revision [revision_number] Invalid quota interval [interval] in quota policy [policy_name].
錯誤訊息範例
Error Saving Revision 1
Invalid quota interval 0.1 in quota policy Quota-1.
螢幕截圖範例

原因
如果配額政策 <Interval> 元素中指定的配額間隔不是整數,API Proxy 的部署作業就會失敗。
舉例來說,如果配額政策的 <Interval> 元素中指定的配額間隔為 0.1,API Proxy 的部署作業就會失敗。
診斷
找出發生錯誤的配額政策和無效的配額間隔。這項資訊會顯示在錯誤訊息中。舉例來說,在下列錯誤中,政策名稱為
Quota-1,無效配額間隔為0.1:Error Saving Revision 1 Invalid quota interval 0.1 in quota policy Quota-1.
確認失敗的配額政策中指定的配額間隔值,與錯誤訊息中識別的值 (上述步驟 1) 相符。舉例來說,下列政策將配額間隔的值指定為
0.1,與錯誤訊息中的值相符:<Quota async="false" continueOnError="false" enabled="true" name="Quota-1"> <DisplayName>Quota-1</DisplayName> <Properties /> <Allow count="3" /> <Interval>0.1</Interval> <TimeUnit>minute</TimeUnit> </Quota>
如果指定的配額間隔不是整數,就會導致錯誤。
在上述配額政策範例中,配額間隔的值為 0.1,不是整數。因此,API Proxy 部署作業會失敗,並顯示下列錯誤:
Invalid quota interval 0.1 in quota policy Quota-1.
解析度
請確認配額政策 <Interval> 元素中指定的配額間隔值為整數。例如:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Quota async="false" continueOnError="false" enabled="true" name="Quota-1">
<DisplayName>Quota-1</DisplayName>
<Properties/>
<Allow count="3"/>
<Interval>1</Interval>
<TimeUnit>minute</TimeUnit>
</Quota>
InvalidQuotaTimeUnit
錯誤訊息
透過 Apigee 使用者介面或 API 部署 API Proxy 時失敗,並顯示以下錯誤訊息:
Error Saving Revision [revision_number] Invalid quota interval time unit [time_unit] in quota policy [policy_name] in Revision [revision_number] of application [proxy_name], in organization [org_name].
錯誤訊息範例
Error Saving Revision 1
Invalid quota interval time unit year in quota policy Quota-1 in Revision 1 of application Quota_test, in organization aprabhashankar-eval.
螢幕截圖範例

原因
如果配額政策 <TimeUnit> 元素中指定的時間單位不受支援,API Proxy 的部署作業就會失敗。
支援的時間單位為 minute、hour、day、week 和 month。
舉例來說,如果配額政策的 <TimeUnit> 元素中指定的時間單位為 year,API Proxy 的部署作業就會失敗。
診斷
找出發生錯誤的配額政策和無效的時間單位。這項資訊會顯示在錯誤訊息中。舉例來說,在下列錯誤中,政策名稱為
Quota-1,無效的時間單位為year:Invalid quota interval time unit year in quota policy Quota-1 in Revision 1 of application Quota_test, in organization aprabhashankar-eval.
確認配額政策
<TimeUnit>元素中指定的時間單位,與錯誤訊息中識別的時間單位 (上述步驟 1) 相符。舉例來說,下列政策將配額間隔的值指定為year,與錯誤訊息中的值相符:<Quota async="false" continueOnError="false" enabled="true" name="Quota-1"> <DisplayName>Quota-1</DisplayName> <Properties /> <Allow count="3" /> <Interval>1</Interval> <TimeUnit>year</TimeUnit> </Quota>
如果配額政策中指定的時間單位不受支援,就會導致錯誤。
在上述配額政策範例中,指定的時間單位為
year,但系統不支援這個單位。因此,API Proxy 部署作業會失敗,並顯示下列錯誤:Invalid quota interval time unit year in quota policy Quota-1 in Revision 1 of application Quota_test, in organization aprabhashankar-eval.
解析度
確認配額政策的 <TimeUnit> 元素中指定的時間單位受到支援。例如:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Quota async="false" continueOnError="false" enabled="true" name="Quota-1">
<DisplayName>Quota-1</DisplayName>
<Properties/>
<Allow count="3"/>
<Interval>1</Interval>
<TimeUnit>month</TimeUnit>
</Quota>
InvalidQuotaType
錯誤訊息
透過 Apigee 使用者介面或 API 部署 API Proxy 時失敗,並顯示以下錯誤訊息:
Error Saving Revision [revision_number] No enum constant com.apigee.quota.types.QuotaType.[type].
錯誤訊息範例
Error Saving Revision 1
No enum constant com.apigee.quota.types.QuotaType.window.
螢幕截圖範例

原因
如果配額政策 <Quota> 元素的 type 屬性所指定的配額 type 無效,API Proxy 部署作業就會失敗。
支援的配額類型為 default、calendar、flexi 和 rollingwindow。
舉例來說,如果配額政策的 <Quota> 元素中指定的政策類型為 window,API Proxy 的部署作業就會失敗。
診斷
找出配額政策中使用的無效配額類型。您可以在錯誤訊息中找到這項資訊。舉例來說,在下列錯誤中,無效的政策類型為
window:Error Saving Revision 1 No enum constant com.apigee.quota.types.QuotaType.window.
檢查發生失敗的特定 API Proxy 中的所有配額政策。如果配額政策中
<Quota>元素指定的配額類型,與上述步驟 1 中識別的不支援類型相符,就是造成錯誤的原因。舉例來說,下列政策將類型指定為
window,與錯誤訊息中的內容相符:<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Quota async="false" continueOnError="false" enabled="true" name="Quota-1" type="window"> <DisplayName>Quota-1</DisplayName> <Properties/> <Allow count="3"/> <Interval>1</Interval> <TimeUnit>minute</TimeUnit> <StartTime>2017-7-16 12:00:00</StartTime> <MessageWeight ref="messageWeight"/> </Quota>由於類型屬性設為不支援的
window,API Proxy 部署作業會失敗,並顯示下列錯誤:No enum constant com.apigee.quota.types.QuotaType.window.
解析度
請確認配額政策的 <Quota> 元素中 type 屬性指定的配額類型是否受支援。例如:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Quota async="false" continueOnError="false" enabled="true" name="Quota-1" type="rollingwindow">
<DisplayName>Quota-1</DisplayName>
<Properties/>
<Allow count="3"/>
<Interval>1</Interval>
<TimeUnit>minute</TimeUnit>
<StartTime>2017-7-16 12:00:00</StartTime>
<MessageWeight ref="messageWeight"/>
</Quota>
InvalidStartTime
錯誤訊息
透過 Apigee 使用者介面或 API 部署 API Proxy 時失敗,並顯示以下錯誤訊息:
Error Saving Revision [revision_number] Invalid Starttime:[start_time]; Start Time should be of the format yyyy-MM-dd HH:mm:ss.
錯誤訊息範例
Error Saving Revision 1
Invalid Starttime:7-16-2017 12:00:00; Start Time should be of the format yyyy-MM-dd HH:mm:ss.
螢幕截圖範例

原因
如果配額政策 <StartTime> 元素中指定的時間格式無效,API Proxy 部署作業就會失敗。
有效格式為 yyyy-MM-dd HH:mm:ss,即 ISO 8601 日期和時間格式。
舉例來說,如果配額政策的 <StartTime> 元素中指定的時間是 7-16-2017 12:00:00,API Proxy 的部署作業就會失敗。
診斷
找出配額政策中指定的無效開始時間。這項資訊會顯示在錯誤訊息中。舉例來說,在下列錯誤中,無效的開始時間為
7-16-2017 12:00:00Invalid Starttime:7-16-2017 12:00:00; Start Time should be of the format yyyy-MM-dd HH:mm:ss.
檢查發生失敗的特定 API Proxy 中的所有配額政策。如果配額政策的
<StartTime>元素指定的值,與上述步驟 1 中識別的無效開始時間相符,就是造成錯誤的原因。舉例來說,下列政策將類型指定為
7-16-2017 12:00:00,與錯誤訊息中的內容相符:<?xml version="1.0" encoding="UTF-8"?> <Quota async="false" continueOnError="false" enabled="true" name="Quota-1" type="calendar"> <DisplayName>Quota-1</DisplayName> <Properties /> <Allow count="3" /> <Interval>1</Interval> <TimeUnit>minute</TimeUnit> <StartTime>7-16-2017 12:00:00</StartTime> </Quota>
由於為
<StartTime>設定的值為7-16-2017 12:00:00,不符合必要的日期/時間格式,因此 API Proxy 部署作業會失敗,並顯示下列錯誤:Invalid Starttime:7-16-2017 12:00:00; Start Time should be of the format yyyy-MM-dd HH:mm:ss.
解析度
確認配額政策 <StartTime> 元素中指定的開始時間格式有效,符合必要格式 yyyy-MM-dd HH:mm:ss。例如:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Quota async="false" continueOnError="false" enabled="true" name="Quota-1" type="calendar">
<DisplayName>Quota-1</DisplayName>
<Properties/>
<Allow count="3"/>
<Interval>1</Interval>
<TimeUnit>minute</TimeUnit>
<StartTime>2017-7-16 12:00:00</StartTime>
</Quota>
StartTimeNotSupported
錯誤訊息
透過 Apigee 使用者介面或 API 部署 API Proxy 時失敗,並顯示以下錯誤訊息:
Error Saving Revision [revision_number] Starttime is not supported for quotatype [quota_type]. Starttime is supported only for calendar based type.
錯誤訊息範例
Error Saving Revision 1
Starttime is not supported for quotatype flexi. Starttime is supported only for calendar based type.
螢幕截圖範例

原因
如果配額類型不是日曆類型,則在配額政策中指定 <StartTime> 元素會導致 API Proxy 部署失敗。
<StartTime> 元素僅支援 calendar 配額類型。
舉例來說,如果配額政策的 <Quota> 元素中,type 屬性設為 flexi 或 rolling window,API Proxy 的部署作業就會失敗。
診斷
找出失敗配額政策中指定的配額類型。這項資訊會顯示在錯誤訊息中。舉例來說,在下列錯誤中,無效的開始時間為
flexiStarttime is not supported for quotatype flexi. Starttime is supported only for calendar based type.
檢查發生失敗的特定 API Proxy 中的所有配額政策。如果配額政策中指定的類型屬性與上述步驟 1 中識別的配額類型相符,且指定了
<StartTime>元素,這就是造成錯誤的原因。舉例來說,下列政策將配額類型指定為
flexi,這與錯誤訊息中的內容相符,且政策也指定了<StartTime>元素:<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Quota async="false" continueOnError="false" enabled="true" name="Quota-1" type="flexi"> <DisplayName>Quota-1</DisplayName> <Properties/> <Allow count="3"/> <Interval>1</Interval> <TimeUnit>minute</TimeUnit> <StartTime>2017-7-16 12:00:00</StartTime> </Quota>由於
<StartTime>元素是在配額政策中指定,而配額政策的配額類型指定為flexi,因此 API Proxy 的部署作業會失敗,並顯示下列錯誤:Starttime is not supported for quotatype flexi. Starttime is supported only for calendar based type.
解析度
如果 <Quota> 元素中 type 屬性所指出的配額類型為 flexi 或 rolling window,請確保未指定 <StartTime> 元素。例如:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Quota async="false" continueOnError="false" enabled="true" name="Quota-1" type="flexi">
<DisplayName>Quota-1</DisplayName>
<Properties/>
<Allow count="3"/>
<Interval>1</Interval>
<TimeUnit>minute</TimeUnit>
</Quota>
InvalidTimeUnitForDistributedQuota
錯誤訊息
透過 Apigee 使用者介面或 API 部署 API Proxy 時失敗,並顯示以下錯誤訊息:
Error Saving Revision [revision number] Invalid timeunit second for distributed quota.
錯誤訊息範例
Error Saving Revision 1
Invalid timeunit second for distributed quota.
螢幕截圖範例

原因
如果 <Distributed> 元素設為 true,且 <TimeUnit> 元素設為 second,API Proxy 部署作業就會失敗。時間單位 second 無效,無法用於分配配額。
如果 Distributed 元素設為 true,政策應維護中央計數器,並持續在所有訊息處理器之間同步。因此,在短時間間隔 (例如幾秒) 內,很難同步處理並驗證要求數量是否未超過指定配額。因此,時間單位 second 會被視為分散式配額的無效單位。
診斷
檢查發生失敗的特定 API Proxy 中的所有配額政策。如果配額政策的 <TimeUnit> 元素設為 second,且 <Distributed> 元素設為 true,就會導致錯誤。
舉例來說,下列政策的 <TimeUnit> 元素設為 second,而 <Distributed> 元素則設為 true。
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Quota async="false" continueOnError="false" enabled="true" name="CheckQuota" type="calendar"> <DisplayName>CheckQuota</DisplayName> <Properties/> <Allow count="30"/> <Interval>1</Interval> <TimeUnit>second</TimeUnit> <StartTime>2018-8-05 12:00:00</StartTime> <Distributed>true</Distributed> <Synchronous>false</Synchronous> </Quota>
解析度
請確保 <Distributed> 元素設為 true 時,<TimeUnit> 元素一律不會設為 second。<TimeUnit> 元素可以設為其他允許的值,例如 minute, hour, day, week, 或 month。舉例來說:
<Quota async="false" continueOnError="false" enabled="true" name="CheckQuota" type="calendar"> <DisplayName>CheckQuota</DisplayName> <Properties/> <Allow count="30"/> <Interval>1</Interval> <TimeUnit>hour</TimeUnit> <StartTime>2018-8-05 12:00:00</StartTime> <Distributed>true</Distributed> <Synchronous>false</Synchronous> </Quota>
InvalidSynchronizeIntervalForAsyncConfiguration
錯誤訊息
透過 Apigee 使用者介面或 API 部署 API Proxy 時失敗,並顯示以下錯誤訊息:
Error Saving Revision [revision number] SyncIntervalInSeconds should be a value greater than zero.
錯誤訊息範例
Error Saving Revision 1
SyncIntervalInSeconds should be a value greater than zero.
螢幕截圖範例

原因
如果配額政策中 <AsynchronousConfiguration> 元素內的 <SyncIntervalInSeconds> 元素指定值小於零,API Proxy 的部署作業就會失敗。
診斷
檢查發生失敗的特定 API Proxy 中的所有配額政策。如果 <AsynchronousConfiguration> 元素中,有任何配額政策的 <SyncIntervalInSeconds> 元素設為小於零的值,就會導致錯誤。
舉例來說,以下政策為 <SyncIntervalInSeconds> 元素指定了負值:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Quota async="false" continueOnError="false" enabled="true" name="Quota_AsyncConfig" type="calendar"> <DisplayName>Quota_AsyncConfig</DisplayName> <Properties/> <Allow count="3"/> <Interval>1</Interval> <TimeUnit>minute</TimeUnit> <StartTime>2017-7-16 12:00:00</StartTime> <Distributed>true</Distributed> <Synchronous>false</Synchronous> <AsynchronousConfiguration> <SyncIntervalInSeconds>-1</SyncIntervalInSeconds> </AsynchronousConfiguration> </Quota>
解析度
請務必在配額政策的 <AsynchronousConfiguration> 元素中,為 <SyncIntervalInSeconds> 元素指定正整數。例如:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Quota async="false" continueOnError="false" enabled="true" name="Quota_AsyncConfig" type="calendar"> <DisplayName>Quota_AsyncConfig</DisplayName> <Properties/> <Allow count="3"/> <Interval>1</Interval> <TimeUnit>minute</TimeUnit> <StartTime>2017-7-16 12:00:00</StartTime> <Distributed>true</Distributed> <Synchronous>false</Synchronous> <AsynchronousConfiguration> <SyncIntervalInSeconds>5</SyncIntervalInSeconds> </AsynchronousConfiguration> </Quota>
InvalidAsynchronizeConfigurationForSynchronousQuota
錯誤訊息
透過 Apigee 使用者介面或 API 部署 API Proxy 時失敗,並顯示以下錯誤訊息:
Error Saving Revision [revision number] AsynchronousConfiguration is not valid for synchronous quota.
錯誤訊息範例
Error Saving Revision 2
AsynchronousConfiguration is not valid for synchronous quota.
螢幕截圖範例

原因
如果配額政策中的 <Synchronous> 元素值設為 true,且該政策也使用 <AsynchronousConfiguration> 元素定義非同步設定,則 API 代理伺服器部署作業會失敗。
診斷
檢查發生失敗的特定 API Proxy 中的所有配額政策。如果任何配額政策的 <Synchronous> 元素設為 true,且也定義了 <AsynchronousConfiguration> 元素,就會導致錯誤。
舉例來說,下列政策含有設為 true 的 <Synchronous> 元素,以及定義的 <AsynchronousConfiguration> 元素:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Quota async="false" continueOnError="false" enabled="true" name="Quota_AsyncConfig" type="calendar"> <DisplayName>Quota_AsyncConfig</DisplayName> <Properties/> <Allow count="3"/> <Interval>1</Interval> <TimeUnit>minute</TimeUnit> <StartTime>2017-7-16 12:00:00</StartTime> <Distributed>true</Distributed> <Synchronous>true</Synchronous> <AsynchronousConfiguration> <SyncIntervalInSeconds>1</SyncIntervalInSeconds> </AsynchronousConfiguration> </Quota>
解析度
如果配額政策中的 <Synchronous> 元素設為 true,請確保沒有使用 <AsynchronousConfiguration> 元素定義非同步設定。
如要修正上述範例,請移除 <AsynchronousConfiguration> 區段,如下所示:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Quota async="false" continueOnError="false" enabled="true" name="Quota_AsyncConfig" type="calendar"> <DisplayName>Quota_AsyncConfig</DisplayName> <Properties/> <Allow count="3"/> <Interval>1</Interval> <TimeUnit>minute</TimeUnit> <StartTime>2017-7-16 12:00:00</StartTime> <Distributed>true</Distributed> <Synchronous>true</Synchronous> </Quota>