本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
使用查詢語法指定查詢字串中的查詢。查詢會傳遞至 SearchIndex
API。下表列出部分查詢字串範例。
查詢字串 | 結果 |
---|---|
abc
|
在任何註冊表,影子 (經典未命名的影子和命名的影子) 或 Device Defender 違規欄位中的「abc」查詢。 |
thingName:myThingName
|
查詢名稱為 "myThingName" 的物件。 |
thingName:my*
|
可查詢名稱起始為 "my" 的物件。 |
thingName:ab?
|
可查詢具有「ab」加上一個額外字元的物件名稱 (例如,「aba」、「abb」、「abc」等)。 |
thingTypeName:aa
|
查詢與類型 "aa" 關聯的物件。 |
thingGroupNames:a
|
查詢具有父物件群組或帳單群組名稱 "a" 的物件。 |
thingGroupNames:a*
|
查詢父物件群組或帳單群組名稱符合模式 "a*" 的物件。 |
attributes.myAttribute:75
|
查詢屬性名為 "myAttribute" 且值為 75 的物件。 |
attributes.myAttribute:[75 TO 80]
|
查詢屬性名為 "myAttribute" 的物件,其值落在數值範圍內 (75–80,包含 )。 |
attributes.myAttribute:{75 TO 80]
|
查詢 屬性名為 "myAttribute" 的物件,其值落在數值範圍內 (>75 和 <=80)。 |
attributes.serialNumber:["abcd" TO "abcf"]
|
查詢屬性名為 "serialNumber" 且值在英數字串範圍內的物件。此查詢會傳回值為 "abcdserialNumber"、"abce" 或 "abcf" 的 "" 屬性。 |
attributes.myAttribute:i*t |
查詢 屬性名為 "myAttribute" 的物件,其中值為 'i',後面接著任意數量的字元,後面接著 't'。 |
attributes.attr1:abc AND attributes.attr2<5 NOT attributes.attr3>10
|
使用布林值運算式,查詢結合詞彙的物件。以此查詢而言,傳回的物件必須具有「attr1」屬性名稱且其值為「abc」具有「attr2」屬性名稱且其值小於 5 以及具有「attr3」屬性名稱且其值不超過 10。 |
shadow.hasDelta:true
|
查詢具有差量元素的未命名影子物件。 |
NOT attributes.model:legacy
|
可查詢屬性名稱為 "model" 而不是 "legacy" 的物件。 |
shadow.reported.stats.battery:{70 TO 100} (v2 OR v3) NOT
attributes.model:legacy
|
可查詢符合下列標準的物件:
|
shadow.reported.myvalues:2
|
查詢影子回報區段中之 |
shadow.reported.location:* NOT shadow.desired.stats.battery:*
|
可查詢符合下列標準的物件:
|
shadow.name.<shadowName>.hasDelta:true
|
查詢具有給定名稱的影子和差量元素的物件。 |
shadow.name.<shadowName>.desired.filament:*
|
查詢具有給定名稱的影子和所需絲狀結構屬性的物件。 |
shadow.name.<shadowName>.reported.location:*
|
查詢具有給定名稱影子的事物以及已命名影子報告區段中有 |
connectivity.connected:true
|
查詢所有已連線的裝置。 |
connectivity.connected:false
|
查詢所有中斷連線的裝置。 |
connectivity.connected:true AND connectivity.timestamp : [1557651600000 TO
1557867600000]
|
查詢連線時間戳記 >= 1557651600000 且 <= 1557867600000 的所有連網裝置。時間戳記是以從 Epoch 算起的毫秒提供。 |
connectivity.connected:false AND connectivity.timestamp : [1557651600000 TO
1557867600000]
|
查詢中斷連線時間戳記 >= 1557651600000 且 <= 1557867600000 的所有中斷連網裝置。時間戳記是以從 Epoch 算起的毫秒提供。 |
connectivity.connected:true AND connectivity.timestamp > 1557651600000
|
查詢連線時間戳記 > 1557651600000 的所有連網裝置。時間戳記是以從 Epoch 算起的毫秒提供。 |
connectivity.connected:*
|
查詢具連線資訊的所有裝置。 |
connectivity.disconnectReason:*
|
disconnectReason 存在連線的所有裝置的查詢。 |
connectivity.disconnectReason:CLIENT_INITIATED_DISCONNECT
|
所有裝置的查詢因 CLIENT_INITIATED_ 而中斷連線DISCONNECT。 |
deviceDefender.violationCount:[0 TO 100]
|
查詢 Device Defender 違規計數值落在數字範圍 (0-100,含) 內的物件。 |
deviceDefender.<device-SecurityProfile>.disconnectBehavior.inViolation:true
|
查詢違反如安全性設定檔 device-SecurityProfile 所定義行為 disconnectBehavior 的物件。請注意,inViolation:false 不是有效的查詢。 |
deviceDefender.<device-SecurityProfile>.disconnectBehavior.lastViolationValue.number>2
|
查詢在安全描述檔裝置中disconnectBehavior 定義之行為違規的物件 - SecurityProfile 最後違規事件值大於 2。 |
deviceDefender.<device-SecurityProfile>.disconnectBehavior.lastViolationTime>1634227200000
|
查詢在安全描述檔裝置中 |
shadow.name.gps-tracker.reported.coordinates:geo_distance,47.6204,-122.3491,15.5km |
查詢距座標 47.6204,-122.3491 徑向距離 15.5 km 內的物件。當您的位置資料存放在具名影子中時,此查詢字串會套用至 。 |
shadow.reported.coordinates:geo_distance,47.6204,-122.3491,15.5km |
查詢距座標 47.6204,-122.3491 徑向距離 15.5 km 內的物件。當您的位置資料存放在傳統影子中時,此查詢字串會套用至 。 |