你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
New-AzDeviceSecurityGroupTimeWindowRuleObject
为设备安全组创建新的时间范围规则(IoT 安全性)
语法
New-AzDeviceSecurityGroupTimeWindowRuleObject
-TimeWindowSize <TimeSpan>
-MinThreshold <Int32>
-MaxThreshold <Int32>
-Enabled <Boolean>
-Type <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
说明
New-AzDeviceSecurityGroupTimeWindowRuleObject cmdlet 为 IoT 安全解决方案中的设备安全组创建新的时间窗口警报规则列表。
示例
示例 1
$TimeWindowSize = New-TimeSpan -Minutes 5
New-AzDeviceSecurityGroupTimeWindowRuleObject -TimeWindowSize $TimeWindowSize -MinThreshold 0 -MaxThreshold 30 -Enabled $true -Type "ActiveConnectionsNotInAllowedRange"
RuleType: "ActiveConnectionsNotInAllowedRange"
DisplayName: "Number of active connections is not in allowed range"
Description: "Get an alert when the number of active connections of a device in the time window is not in the allowed range"
IsEnabled: false
MinThreshold: 0
MaxThreshold: 30
TimeWindowSize: "PT5M"
从“ActiveConnectionsNotInAllowedRange”类型创建新的时间窗口规则
参数
-DefaultProfile
用于与 Azure 通信的凭据、帐户、租户和订阅。
类型: | IAzureContextContainer |
别名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Enabled
是否启用规则。
类型: | Boolean |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-MaxThreshold
最大阈值。
类型: | Int32 |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-MinThreshold
最小阈值。
类型: | Int32 |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-TimeWindowSize
时间窗口大小。
类型: | TimeSpan |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-Type
规则类型。
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
输入
None