

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

# 設定許可和設定
<a name="manage-data-streams-configuration"></a>

 收到第一次序列資料 AWS IoT SiteWise 時，資料串流會自動在 中建立。如果擷取的資料未與資產屬性相關聯， AWS IoT SiteWise 會建立新的取消關聯資料串流，可設定為與資產屬性相關聯。使用 IAM 政策指定要擷取的資料類型 AWS IoT SiteWise，設定閘道傳送資料的存取控制。

 下列 IAM 政策會停用與閘道取消關聯的資料擷取，同時仍然允許資料擷取至與資產屬性相關聯的資料串流：

**Example IAM 使用者政策，可停用與閘道的取消關聯資料擷取**    
****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
    {
      "Sid": "AllowPutAssetPropertyValuesUsingAssetIdAndPropertyId",
      "Effect": "Allow",
      "Action": "iotsitewise:BatchPutAssetPropertyValue",
      "Resource": "arn:aws:iotsitewise:*:*:asset/*"
    },
    {
      "Sid": "AllowPutAssetPropertyValuesUsingAliasWithAssociatedAssetProperty",
      "Effect": "Allow",
      "Action": "iotsitewise:BatchPutAssetPropertyValue",
      "Resource": "arn:aws:iotsitewise:*:*:time-series/*",
      "Condition": {
        "StringLikeIfExists": {
          "iotsitewise:isAssociatedWithAssetProperty": "true"
        }
      }
    },
    {
      "Sid": "DenyPutAssetPropertyValuesUsingAliasWithNoAssociatedAssetProperty",
      "Effect": "Deny",
      "Action": "iotsitewise:BatchPutAssetPropertyValue",
      "Resource": "arn:aws:iotsitewise:*:*:time-series/*",
      "Condition": {
        "StringLikeIfExists": {
          "iotsitewise:isAssociatedWithAssetProperty": "false"
        }
      }
    }
  ]
}
```

**Example 從閘道停用所有資料擷取的 IAM 使用者政策**    
****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "DenyPutAssetPropertyValues",
            "Effect": "Deny",
            "Action": "iotsitewise:BatchPutAssetPropertyValue",
            "Resource": [
                "arn:aws:iotsitewise:*:*:asset/*",
                "arn:aws:iotsitewise:*:*:time-series/*"
            ]
        }
    ]
}
```