

支援終止通知：2026 年 5 月 20 日， AWS 將終止對 的支援 AWS IoT Events。2026 年 5 月 20 日之後，您將無法再存取 AWS IoT Events 主控台或 AWS IoT Events 資源。如需詳細資訊，請參閱[AWS IoT Events 終止支援](https://docs.aws.amazon.com/iotevents/latest/developerguide/iotevents-end-of-support.html)。

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 範例：安全存取 AWS IoT Events 偵測器模型
<a name="accessing-a-detector-model"></a>

此範例示範如何建立 IAM 政策，以安全地將存取權授予 中的特定偵測器模型 AWS IoT Events。此政策使用條件來確保只有指定的 AWS 帳戶 AWS IoT Events 和服務可以擔任該角色，並新增額外的安全層。在此範例中，角色只能存取名為 *WindTurbine01* 的偵測器模型。

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Principal": {
                "Service": [
                    "iotevents.amazonaws.com"
                ]
            },
            "Action": "sts:AssumeRole",
            "Condition": {
                "StringEquals": {
                "aws:SourceAccount": "123456789012"
                },
                "ArnEquals": {
                "aws:SourceArn": "arn:aws:iotevents:us-east-1:123456789012:detectorModel/WindTurbine01"
                }
            }
        }
    ]
}
```

------