View a markdown version of this page

创建事件日志配置 - 的托管集成 AWS IoT Device Management

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

创建事件日志配置

使用 CreateEventLogConfigurationAPI 操作为资源类型启用事件记录。我们建议为每种资源类型创建单独的配置,*将其用作资源标识符,以捕获该类型的所有资源的日志。从ERROR日志级别开始接收所有故障日志,而不会产生过多的容量或成本。

aws iot-managed-integrations create-event-log-configuration \ --resource-type "managed-thing" \ --resource-id "*" \ --event-log-level "ERROR"

对每种资源类型重复此操作:

aws iot-managed-integrations create-event-log-configuration \ --resource-type "credential-locker" \ --resource-id "*" \ --event-log-level "ERROR" aws iot-managed-integrations create-event-log-configuration \ --resource-type "provisioning-profile" \ --resource-id "*" \ --event-log-level "ERROR" aws iot-managed-integrations create-event-log-configuration \ --resource-type "ota-task" \ --resource-id "*" \ --event-log-level "ERROR" aws iot-managed-integrations create-event-log-configuration \ --resource-type "account-association" \ --resource-id "*" \ --event-log-level "ERROR"

调用后CreateEventLogConfiguration,日志会被推送到/aws/iotmanagedintegrations/EventLog日志中的 CloudWatch 日志组。ListEventLogConfigurations用于查看所有配置或按 GetEventLogConfigurationID 检索特定配置。