คิวรีตัวอย่างสินค้าคงคลังของ Power Platform

คิวรีตัวอย่างต่อไปนี้จะเรียกใช้กับตาราง PowerPlatformResources ในตาราง Azure Resource Graph ครอบคลุมการนับจํานวนทรัพยากรและการแจกจ่าย การค้นหาเขตข้อมูล การค้นหาทรัพยากร และการวิเคราะห์การใช้งานตัวเชื่อมต่อ สําหรับภาพรวมของสินค้าคงคลังของ Power Platform โปรดดูที่ คลัง Power Platform สําหรับการอ้างอิงสคีมาและเขตข้อมูล โปรดดูการอ้างอิง Schema สินค้าคงคลังของ Power Platform

วิธีการเรียกใช้คิวรีเหล่านี้

คุณสามารถเรียกใช้คิวรีเหล่านี้จากอินเทอร์เฟซ Azure Resource Graph สําหรับคําแนะนําทีละขั้นตอน ดูคู่มือเริ่มต้นใช้งานด่วนต่อไปนี้:

จํานวนและการแจกจ่าย

จํานวนรวมของทรัพยากรทั้งหมด

PowerPlatformResources
| count

จํานวนรวมตามชนิดทรัพยากร

PowerPlatformResources
| summarize resourceCount = count() by type
| order by resourceCount

จํานวนตามสภาพแวดล้อม

PowerPlatformResources
| extend properties = parse_json(properties)
| extend environmentId = tostring(properties.environmentId)
| summarize resourceCount = count() by environmentId
| order by resourceCount desc

จํานวนตามภูมิภาค

PowerPlatformResources
| summarize resourceCount = count() by location
| order by resourceCount desc

เจ้าของยอดนิยมตามจํานวนสินค้า

PowerPlatformResources
| extend properties = parse_json(properties)
| extend ownerId = tostring(properties.ownerId)
| summarize resourceCount = count() by ownerId
| order by resourceCount desc

การค้นหาทรัพยากร

ค้นหาเอเจนต์รายการเดียวในผู้เช่า

PowerPlatformResources
| where type == "microsoft.copilotstudio/agents"
| where name == "[Enter the agent's ID]"

Tip

คุณสามารถค้นหา ID ของตัวแทนใน URL Copilot Studio เมื่อดูตัวแทน หรือในคอลัมน์ ชื่อของ ตารางสินค้าคงคลัง

รายการที่สร้างขึ้นใน 24 ชั่วโมงที่ผ่านมา

PowerPlatformResources
| extend properties = parse_json(properties)
| extend createdAt = todatetime(properties.createdAt)
| where createdAt >= ago(24h)

คิวรีตัวเชื่อมต่อ (ตัวอย่าง)

คิวรี่ต่อไปนี้วิเคราะห์การใช้ตัวเชื่อมต่อในชนิดทรัพยากรที่ครอบคลุมโดยสินค้าคงคลังของตัวเชื่อมต่อ (ตัวอย่าง) แต่ละคิวรีทำงานกับอาร์เรย์ properties.powerPlatformConnectors ที่ส่งออกจากแอปพื้นที่ทำงาน แอปแบบจำลอง โฟลว์ระบบคลาวด์ โฟลว์เอเจนต์ โฟลว์เอเจนต์เวิร์กโฟลว์ และเอเจนต์ Copilot Studio

ตัวเชื่อมต่อยอดนิยมที่ใช้ทั่วทั้งแหล่งข้อมูล Power Platform

แสดงรายการตัวเชื่อมต่อที่ใช้โดยทรัพยากรที่แตกต่างกันมากที่สุด มีประโยชน์สำหรับการทำความเข้าใจว่าตัวเชื่อมต่อใดถูกนำมาใช้มากที่สุดทั่วทั้งผู้เช่าใช้งาน

PowerPlatformResources
| where type in (
    "microsoft.powerapps/canvasapps",
    "microsoft.powerapps/modeldrivenapps",
    "microsoft.powerautomate/cloudflows",
    "microsoft.powerautomate/agentflows",
    "microsoft.powerautomate/m365agentflows",
    "microsoft.copilotstudio/agents")
| extend properties = parse_json(properties)
| mv-expand connector = properties.powerPlatformConnectors
| extend connectorId = tostring(connector.connectorId)
| where isnotempty(connectorId)
| summarize ResourceCount = dcount(name) by connectorId
| order by ResourceCount desc
| take 10

การกระจายของจํานวนตัวเชื่อมต่อต่อทรัพยากร

แสดงจํานวนทรัพยากรที่ใช้ตัวเชื่อมต่อ 0, 1, 2 หรือมากกว่า มีประโยชน์สําหรับการตรวจหาค่าผิดปกติของความซับซ้อน

PowerPlatformResources
| where type in (
    "microsoft.powerapps/canvasapps",
    "microsoft.powerapps/modeldrivenapps",
    "microsoft.powerautomate/cloudflows",
    "microsoft.powerautomate/agentflows",
    "microsoft.powerautomate/m365agentflows",
    "microsoft.copilotstudio/agents")
| extend properties = parse_json(properties)
| extend connectorCount = array_length(properties.powerPlatformConnectors)
| summarize ResourceCount = count() by toint(connectorCount)
| order by connectorCount asc

ค้นหาทรัพยากรทั้งหมดที่ใช้ตัวเชื่อมต่อเฉพาะ

แทนที่ shared_sharepointonline ด้วยตัวเชื่อมต่อที่คุณต้องการค้นหา คิวรีนี้จะเป็นประโยชน์สําหรับการวิเคราะห์ผลกระทบเมื่อตัวเชื่อมต่อมีปัญหาที่ทราบแล้ว ถูกเลิกใช้งาน หรือจําเป็นต้องมีสิทธิ์การใช้งานใหม่

PowerPlatformResources
| where type in (
    "microsoft.powerapps/canvasapps",
    "microsoft.powerapps/modeldrivenapps",
    "microsoft.powerautomate/cloudflows",
    "microsoft.powerautomate/agentflows",
    "microsoft.powerautomate/m365agentflows",
    "microsoft.copilotstudio/agents")
| extend properties = parse_json(properties)
| mv-expand connector = properties.powerPlatformConnectors
| where tostring(connector.connectorId) == "shared_sharepointonline"
| project resourceName = tostring(properties.displayName),
          resourceId = name,
          resourceType = type,
          environmentId = tostring(properties.environmentId),
          operationsUsed = connector.operations

การใช้งานตัวเชื่อมต่อตามสภาพแวดล้อม

แสดงรายการตัวเชื่อมต่อทั้งหมดที่ใช้ในทุกสภาพแวดล้อม ด้วยจํานวนทรัพยากรที่แตกต่างกันที่ใช้ รายการนี้มีประโยชน์สําหรับการทําความเข้าใจรูปแบบการปรับใช้และแจ้งการตัดสินใจนโยบาย DLP

PowerPlatformResources
| where type in (
    "microsoft.powerapps/canvasapps",
    "microsoft.powerapps/modeldrivenapps",
    "microsoft.powerautomate/cloudflows",
    "microsoft.powerautomate/agentflows",
    "microsoft.powerautomate/m365agentflows",
    "microsoft.copilotstudio/agents")
| extend properties = parse_json(properties)
| mv-expand connector = properties.powerPlatformConnectors
| extend connectorId = tostring(connector.connectorId)
| where isnotempty(connectorId)
| extend environmentId = tostring(properties.environmentId)
| summarize ResourceCount = dcount(name) by environmentId, connectorId
| order by environmentId asc, ResourceCount desc