mcpField
A
azure-iot-hub

azure-iot-hub

github.com/microsoftdocs云与 DevOps796170 次安装3 天前更新
代码仓库

关于 azure-iot-hub

azure-iot-hub 为使用 Azure IoT Hub、DPS 和 Device Update 的开发者与运维人员提供指导,涵盖本地速查资料及远程文档获取,涉及排障、设计、安全与部署。

主要功能

  1. 01故障排查指导
  2. 02最佳实践与设计模式
  3. 03限制、配额与扩缩
  4. 04安全与配置建议
  5. 05集成与部署指导

适用场景

  1. 01诊断设备连接或预配错误
  2. 02规划安全的 IoT 设备部署
  3. 03选择 IoT Hub 层级与消息模式

MCP 相关

该技能可通过 mcp_microsoftdocs 的 microsoft_docs_fetch 工具获取 Microsoft 文档,也可使用网页获取作为备用方式。

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/microsoftdocs/agent-skills --skill azure-iot-hub

安装后在 Claude Code 中输入/azure-iot-hub确认已加载。

详细介绍

Azure IoT Hub 技能

此技能提供有关 Azure IoT Hub 的专业指导,涵盖故障排除、最佳实践、决策制定、架构与设计模式、限制与配额、安全、配置、集成与编码模式,以及部署。它结合了本地快速参考内容与远程文档获取功能。

如何使用此技能

IMPORTANT for Agent:使用下方的类别索引查找相关章节。对于包含行范围的类别(例如,L35-L120),使用 read_file 读取指定行。对于包含文件链接的类别(例如,[security.md](security.md)),使用 read_file 读取链接的参考文件。

IMPORTANT for Agent:如果 metadata.generated_at 早于 3 个月以上,建议用户从存储库拉取最新版本。如果无法使用 mcp_microsoftdocs 工具,建议用户安装该工具:安装指南

此技能需要网络访问权限才能获取文档内容:

  • 首选:使用 mcp_microsoftdocs:microsoft_docs_fetch,并在查询字符串中加入 from=learn-agent-skill。返回 Markdown。
  • 备用:使用 fetch_webpage,并在查询字符串中加入 from=learn-agent-skill&accept=text/markdown。返回 Markdown。

类别索引

类别行说明
故障排除L37-L53诊断并解决 IoT Hub、DPS 和 Device Update 问题:连接、路由、预配错误、错误代码,以及收集和使用设备与服务诊断日志。
最佳实践L54-L61大规模 DPS 预配、OEM 设备安全、可靠的设备重新连接模式,以及 Azure IoT Hub 中自动设备配置的最佳实践。
决策制定L62-L74选择 IoT Hub 或替代方案、灾难恢复用法、路由选项、C2D/D2C 模式、定价和层级,以及监视设备连接的方法。
架构与设计模式L75-L81DPS 生命周期/HA/DR、VNet 连接、安全设备流,以及使用 Cosmos DB 可靠持久化有序 IoT Hub 事件的设计模式。
限制与配额L82-L88IoT Hub、Device Provisioning Service 和 Device Update 的限制、配额与节流,包括每项服务的上限、扩展行为,以及超出限制时的处理方式。
安全L89-L127保护 IoT Hub、DPS 和 Device Update:身份验证(Entra、RBAC、SAS、X.509)、证书/密钥、TLS/密码套件、IP/VNet/专用终结点、出站/DLP,以及安全最佳实践/策略。
配置L128-L159配置 IoT Hub 和 DPS 行为:设备/模块孪生、作业、消息传递、路由、扩充、协议、IP/终结点、Device Update 清单、文件上传和监视设置。
集成与编码模式L160-L184设备到云的集成模式:DPS 预配(HTTPS/MQTT、对称密钥/X.509/TPM)、IoT Hub 消息传递、孪生、直接方法、文件上传、模块、批量操作和协议用法。
部署L185-L198部署和更新 IoT 设备与 IoT Hub:Device Update 设置/代理、差分/映像/包更新、故障转移、平台支持、迁移和作业计划。
故障排除
主题URL
诊断并修复常见的 Azure DPS 预配错误https://learn.microsoft.com/en-us/azure/iot-dps/how-to-troubleshoot-dps
Azure IoT DPS 监视数据参考https://learn.microsoft.com/en-us/azure/iot-dps/monitor-iot-dps-reference
使用 Device Update Agent 检查诊断缺失的设备https://learn.microsoft.com/en-us/azure/iot-hub-device-update/device-update-agent-check
使用 Device Update 诊断、错误代码和日志https://learn.microsoft.com/en-us/azure/iot-hub-device-update/device-update-diagnostics
解释适用于 IoT Hub 的 Device Update 错误代码https://learn.microsoft.com/en-us/azure/iot-hub-device-update/device-update-error-codes
远程收集和查看 Device Update 诊断日志https://learn.microsoft.com/en-us/azure/iot-hub-device-update/device-update-log-collection
解决 Device Update 中的代理更新导入错误https://learn.microsoft.com/en-us/azure/iot-hub-device-update/device-update-proxy-update-troubleshooting
诊断并修复常见的 Device Update 问题https://learn.microsoft.com/en-us/azure/iot-hub-device-update/troubleshoot-device-update
修复导入 Device Updates 时的存储权限错误https://learn.microsoft.com/en-us/azure/iot-hub-device-update/troubleshoot-storage
使用 IoT SDK 收集设备调试日志https://learn.microsoft.com/en-us/azure/iot-hub/how-to-collect-device-logs
诊断并修复 Azure IoT Hub 设备连接问题https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-troubleshoot-connectivity
解决 Azure IoT Hub 错误代码https://learn.microsoft.com/en-us/azure/iot-hub/troubleshoot-error-codes
排查 Azure IoT Hub 消息路由问题https://learn.microsoft.com/en-us/azure/iot-hub/troubleshoot-message-routing
最佳实践
主题URL
在大规模 IoT 部署中应用 DPS 最佳实践https://learn.microsoft.com/en-us/azure/iot-dps/concepts-deploy-at-scale
为启用 DPS 的设备实施 OEM 安全实践https://learn.microsoft.com/en-us/azure/iot-dps/concepts-device-oem-security-practices
为 Azure IoT Hub 实施弹性设备重新连接https://learn.microsoft.com/en-us/azure/iot-hub/concepts-manage-device-reconnections
应用 IoT Hub 自动设备配置最佳实践https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-configuration-best-practices
决策
主题URL
确定何时禁用 IoT Hub 灾难恢复https://learn.microsoft.com/en-us/azure/iot-hub/how-to-disable-dr
在 Azure IoT Hub 和 Event Hubs 之间进行选择https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-compare-event-hubs
选择 IoT Hub 云到设备通信选项https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-c2d-guidance
选择 IoT Hub 设备到云通信选项https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-d2c-guidance
了解 Azure IoT Hub 定价和计量https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-pricing
在 IoT Hub 路由和 Event Grid 之间进行选择https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-event-grid-routing-comparison
选择合适的 Azure IoT Hub 层级和规模https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-scaling
选择并升级 Azure IoT Hub 层级和大小https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-upgrade
选择 IoT Hub 设备连接监视方法https://learn.microsoft.com/en-us/azure/iot-hub/monitor-device-connection-state
架构与设计模式
主题URL
规划 DPS 设备生命周期和重新预配策略https://learn.microsoft.com/en-us/azure/iot-dps/concepts-device-reprovision
设计 DPS 高可用性和灾难恢复https://learn.microsoft.com/en-us/azure/iot-dps/iot-dps-ha-dr
使用 DPS 的虚拟网络连接模式https://learn.microsoft.com/en-us/azure/iot-dps/virtual-network-support
限制与配额
主题URL
Azure IoT DPS 关于限制和行为的常见问题https://learn.microsoft.com/en-us/azure/iot-dps/dps-faq
查看 Azure Device Update 服务限制https://learn.microsoft.com/en-us/azure/iot-hub-device-update/device-update-limits
Azure IoT Hub 配额、限制和节流行为https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-quotas-throttling
安全
主题URL
配置 Entra ID 和 RBAC 以访问 IoT DPShttps://learn.microsoft.com/en-us/azure/iot-dps/concepts-control-access-dps-azure-ad
使用 SAS 令牌配置 DPS 访问控制https://learn.microsoft.com/en-us/azure/iot-dps/how-to-control-access
安全地撤销或取消设备在 DPS 中的注册https://learn.microsoft.com/en-us/azure/iot-dps/how-to-revoke-device-access-portal
在 DPS 中轮换和更新 X.509 证书https://learn.microsoft.com/en-us/azure/iot-dps/how-to-roll-certificates
取消预配 DPS 设备并撤销 IoT Hub 访问权限https://learn.microsoft.com/en-us/azure/iot-dps/how-to-unprovision-devices
使用 DPS 所有权证明验证 X.509 CA 证书https://learn.microsoft.com/en-us/azure/iot-dps/how-to-verify-certificates
为 Azure IoT DPS 配置 IP 筛选规则https://learn.microsoft.com/en-us/azure/iot-dps/iot-dps-ip-filtering
管理 DPS 的公共网络访问和专用终结点https://learn.microsoft.com/en-us/azure/iot-dps/public-network-access
配置 DPS 连接的 TLS 版本和密码套件https://learn.microsoft.com/en-us/azure/iot-dps/tls-support
为 Device Update 和 IoT Hub 分配 RBAC 角色https://learn.microsoft.com/en-us/azure/iot-hub-device-update/configure-access-control-device-update
为 Device Update 帐户设置专用终结点https://learn.microsoft.com/en-us/azure/iot-hub-device-update/configure-private-endpoints
为 Device Update 配置 RBAC 和 Entra 身份验证https://learn.microsoft.com/en-us/azure/iot-hub-device-update/device-update-control-access
为 Device Update 配置数据加密和 CMKhttps://learn.microsoft.com/en-us/azure/iot-hub-device-update/device-update-data-encryption
配置 Device Update 流量的网络端口https://learn.microsoft.com/en-us/azure/iot-hub-device-update/device-update-networking
管理 Device Update 的根密钥轮换https://learn.microsoft.com/en-us/azure/iot-hub-device-update/device-update-rootkey
了解 Device Update 的端到端安全性https://learn.microsoft.com/en-us/azure/iot-hub-device-update/device-update-security
配置 Device Update 的 TLS 下载安全性https://learn.microsoft.com/en-us/azure/iot-hub-device-update/device-update-tls-download
配置 Device Update 的网络安全和专用访问https://learn.microsoft.com/en-us/azure/iot-hub-device-update/network-security
为 Azure IoT Hub 配置 Microsoft Entra ID 和 RBAChttps://learn.microsoft.com/en-us/azure/iot-hub/authenticate-authorize-azure-ad
使用 SAS 令牌控制 IoT Hub 访问https://learn.microsoft.com/en-us/azure/iot-hub/authenticate-authorize-sas
使用 X.509 证书对 IoT Hub 设备进行身份验证https://learn.microsoft.com/en-us/azure/iot-hub/authenticate-authorize-x509
使用 Azure IoT Hub 身份注册表管理设备https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-identity-registry
为 Azure IoT Hub 配置 IP 筛选规则https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-ip-filtering
在 Azure IoT Hub 出站流量中使用托管标识https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-managed-identity
管理 Azure IoT Hub 的公共网络访问https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-public-network-access
限制 IoT Hub 出站网络访问以满足 DLP 要求https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-restrict-outbound-network-access
配置 Azure IoT Hub 的 TLS 版本和密码套件https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-tls-support
将 IoT Hub TLS 根证书迁移到 DigiCert G2https://learn.microsoft.com/en-us/azure/iot-hub/migrate-tls-certificate
IoT Hub 的内置 Azure Policy 定义https://learn.microsoft.com/en-us/azure/iot-hub/policy-reference
使用示例脚本自签名 IoT Hub 测试证书https://learn.microsoft.com/en-us/azure/iot-hub/reference-self-sign-script
安全地重新生成 IoT Hub 共享访问密钥https://learn.microsoft.com/en-us/azure/iot-hub/regenerate-keys
在 Azure IoT Hub 中应用安全最佳实践https://learn.microsoft.com/en-us/azure/iot-hub/secure-azure-iot-hub
IoT Hub 的 Azure Policy 合规性控制https://learn.microsoft.com/en-us/azure/iot-hub/security-controls-policy
创建并上传 IoT Hub 的 X.509 测试证书https://learn.microsoft.com/en-us/azure/iot-hub/tutorial-x509-test-certs
使用虚拟网络和 Private Link 连接 Azure IoT Hubhttps://learn.microsoft.com/en-us/azure/iot-hub/virtual-network-support
配置
主题URL
在 Azure 门户中管理 DPS 设备注册https://learn.microsoft.com/en-us/azure/iot-dps/how-to-manage-enrollments
配置跨 IoT 中心的 DPS 分配策略https://learn.microsoft.com/en-us/azure/iot-dps/how-to-use-allocation-policies
查询和管理 DPS 实例 IP 地址属性https://learn.microsoft.com/en-us/azure/iot-dps/iot-dps-understand-ip-address
为基于包的设备更新创建 apt 清单https://learn.microsoft.com/en-us/azure/iot-hub-device-update/device-update-apt-manifest
为设备更新代理配置 adu-config.jsonhttps://learn.microsoft.com/en-us/azure/iot-hub-device-update/device-update-configuration-file
在设备更新清单中配置多步执行https://learn.microsoft.com/en-us/azure/iot-hub-device-update/device-update-multi-step-updates
为设备更新编写 JSON 导入清单https://learn.microsoft.com/en-us/azure/iot-hub-device-update/import-schema
在设备更新导入清单中配置相关文件https://learn.microsoft.com/en-us/azure/iot-hub-device-update/related-files
定义设备更新的更新清单有效负载https://learn.microsoft.com/en-us/azure/iot-hub-device-update/update-manifest
配置 IoT 中心文件上传到 Azure 存储https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-configure-file-upload
处理 IoT 中心设备的客户数据请求https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-customer-data-requests
了解和配置 Azure IoT 中心设备孪生https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-device-twins
配置和使用 IoT 中心直接方法https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-direct-methods
使用 IoT 中心文件上传功能处理大型设备数据https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-file-upload
为设备群配置和管理 Azure IoT 中心作业https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-jobs
在 IoT 中心配置云到设备消息传送https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-messages-c2d
定义和使用 Azure IoT 中心消息格式https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-messages-construct
配置 IoT 中心设备到云消息路由https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-messages-d2c
了解和配置 Azure IoT 中心模块孪生https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-module-twins
配置 IoT 中心通信协议和端口https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-protocols
使用 IoT 中心消息路由查询语言https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-routing-query-syntax
在 Azure IoT 中心配置消息扩充https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-message-enrichments-overview
Azure IoT 中心的非遥测事件架构https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-non-telemetry-event-schema
为 TLS 1.3 主机名配置 IoT 中心专用终结点https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-tls-1-3-update-private-endpoint
了解和管理 Azure IoT 中心 IP 地址https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-understand-ip-address
Azure IoT 中心监视指标和日志参考https://learn.microsoft.com/en-us/azure/iot-hub/monitor-iot-hub-reference
使用 Azure IoT 中心 VS Code 扩展https://learn.microsoft.com/en-us/azure/iot-hub/reference-iot-hub-extension
设置和使用 IoT 中心消息扩充https://learn.microsoft.com/en-us/azure/iot-hub/tutorial-message-enrichments
集成与编码模式
主题URL
在设备与 DPS 之间发送其他有效负载数据https://learn.microsoft.com/en-us/azure/iot-dps/how-to-send-additional-data
使用原始 HTTPS 和 DPS 对称密钥预配https://learn.microsoft.com/en-us/azure/iot-dps/iot-dps-https-sym-key-support
使用原始 HTTPS 和 DPS X.509 证书预配https://learn.microsoft.com/en-us/azure/iot-dps/iot-dps-https-x509-support
通过 MQTT 将设备连接到 Azure IoT DPShttps://learn.microsoft.com/en-us/azure/iot-dps/iot-mqtt-connect-to-iot-dps
使用 Azure DPS SDK 预配设备https://learn.microsoft.com/en-us/azure/iot-dps/libraries-sdks
以编程方式创建 DPS TPM 单独注册项https://learn.microsoft.com/en-us/azure/iot-dps/quick-enroll-device-tpm
以编程方式创建 DPS X.509 注册组https://learn.microsoft.com/en-us/azure/iot-dps/quick-enroll-device-x509
通过代理实现 Device Update 组件枚举器https://learn.microsoft.com/en-us/azure/iot-hub-device-update/components-enumerator
在设备上使用 Device Update Agent 状态 APIhttps://learn.microsoft.com/en-us/azure/iot-hub-device-update/device-update-agent-status
使用 SDK 发送和接收 IoT Hub 云到设备消息https://learn.microsoft.com/en-us/azure/iot-hub/how-to-cloud-to-device-messaging
使用 IoT Hub 直接方法实现设备管理操作https://learn.microsoft.com/en-us/azure/iot-hub/how-to-device-management
将 IoT Hub 设备和服务 SDK 与设备孪生配合使用https://learn.microsoft.com/en-us/azure/iot-hub/how-to-device-twins
使用 IoT Hub SDK 将设备文件上传到云端https://learn.microsoft.com/en-us/azure/iot-hub/how-to-file-upload
在 IoT Hub 中使用模块标识和孪生https://learn.microsoft.com/en-us/azure/iot-hub/how-to-module-twins
使用 IoT Hub 服务 SDK 安排广播作业https://learn.microsoft.com/en-us/azure/iot-hub/how-to-schedule-broadcast-jobs
将 AMQP 协议与 Azure IoT Hub 终结点配合使用https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-amqp-support
批量导入和导出 IoT Hub 设备标识https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-bulk-identity-mgmt
从内置终结点读取 IoT Hub 消息https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-messages-read-builtin
使用 MQTT 将设备连接到 Azure IoT Hubhttps://learn.microsoft.com/en-us/azure/iot-hub/iot-mqtt-connect-to-iot-hub
使用 .NET 示例通过直接方法控制 IoT 设备https://learn.microsoft.com/en-us/azure/iot-hub/quickstart-control-device
通过 MQTT 将 IoT 设备连接到 Azure IoT Hubhttps://learn.microsoft.com/en-us/azure/iot-hub/tutorial-use-mqtt
部署
主题URL
使用 Device Update 生成和部署增量更新https://learn.microsoft.com/en-us/azure/iot-hub-device-update/deploy-delta-updates
使用 Azure IoT Hub Device Update 部署设备更新https://learn.microsoft.com/en-us/azure/iot-hub-device-update/deploy-update
将 Device Update 代理预配为 IoT Edge 模块https://learn.microsoft.com/en-us/azure/iot-hub-device-update/device-update-agent-provisioning
使用 Device Update for IoT Hub 执行代理更新https://learn.microsoft.com/en-us/azure/iot-hub-device-update/device-update-howto-proxy-updates
在 Raspberry Pi 上部署基于映像的 Device Updatehttps://learn.microsoft.com/en-us/azure/iot-hub-device-update/device-update-raspberry-pi
使用 Device Update 的区域故障转移映射https://learn.microsoft.com/en-us/azure/iot-hub-device-update/device-update-region-mapping
使用 Ubuntu 代理部署基于包的 Device Updatehttps://learn.microsoft.com/en-us/azure/iot-hub-device-update/device-update-ubuntu-agent
查看 Device Update 支持的平台https://learn.microsoft.com/en-us/azure/iot-hub-device-update/support
手动跨区域或 SKU 迁移 Azure IoT Hubhttps://learn.microsoft.com/en-us/azure/iot-hub/migrate-hub-arm
使用 Azure CLI 状态命令迁移 Azure IoT Hubhttps://learn.microsoft.com/en-us/azure/iot-hub/migrate-hub-state-cli
使用 Azure CLI 为设备组安排 IoT Hub 作业https://learn.microsoft.com/en-us/azure/iot-hub/schedule-jobs-cli

评论

支持 Markdown