Set-AzDeviceSecurityGroup
Eszközbiztonsági csoport létrehozása vagy frissítése
Syntax
Set-AzDeviceSecurityGroup
-Name <String>
-HubResourceId <String>
[-ThresholdRule <PSThresholdCustomAlertRule[]>]
[-TimeWindowRule <PSTimeWindowCustomAlertRule[]>]
[-AllowlistRule <PSAllowlistCustomAlertRule[]>]
[-DenylistRule <PSDenylistCustomAlertRule[]>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzDeviceSecurityGroup
[-ThresholdRule <PSThresholdCustomAlertRule[]>]
[-TimeWindowRule <PSTimeWindowCustomAlertRule[]>]
[-AllowlistRule <PSAllowlistCustomAlertRule[]>]
[-DenylistRule <PSDenylistCustomAlertRule[]>]
-InputObject <PSDeviceSecurityGroup>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzDeviceSecurityGroup
[-ThresholdRule <PSThresholdCustomAlertRule[]>]
[-TimeWindowRule <PSTimeWindowCustomAlertRule[]>]
[-AllowlistRule <PSAllowlistCustomAlertRule[]>]
[-DenylistRule <PSDenylistCustomAlertRule[]>]
-ResourceId <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
A Set-AzDeviceSecurityGroup parancsmag létrehoz vagy frissít egy iot biztonsági megoldásban definiált eszközbiztonsági csoportot.
Példák
1. példa
$TimeWindowSize = New-TimeSpan -Minutes 5
$TimeWindowRule = New-AzDeviceSecurityGroupTimeWindowRuleObject -Type "ActiveConnectionsNotInAllowedRange" -Enabled $true `
-MaxThreshold 30 -MinThreshold 0 -TimeWindowSize $TimeWindowSize
Set-AzDeviceSecurityGroup -Name "MySecurityGroup" `
-HubResourceId "/subscriptions/XXXXXXXX-XXXX-XXXXX-XXXX-XXXXXXXXXXXX/resourceGroups/MyResourceGroup/providers/Microsoft.Devices/IotHubs/MyHub" `
-TimeWindowRule $TimeWindowRules
Id: "/subscriptions/XXXXXXXX-XXXX-XXXXX-XXXX-XXXXXXXXXXXX/resourceGroups/MyResourceGroup/providers/Microsoft.Devices/IotHubs/MyHub/providers/Microsoft.Security/deviceSecurityGroups/MySecurityGroup"
Name: "MySecurityGroup"
Type: "Microsoft.Security/deviceSecurityGroups"
ThresholdRules: []
TimeWindowRules: [
{
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: true
MinThreshold: 0
MaxThreshold: 0
TimeWindowSize: "PT5M"
}]
AllowlistRules: [
{
RuleType": "ConnectionToIpNotAllowed",
DisplayName: "Outbound connection to an ip that isn't allowed"
Description: "Get an alert when an outbound connection is created between your device and an ip that isn't allowed"
IsEnabled: false
ValueType: "IpCidr"
AllowlistValues: []
},
{
RuleType: "LocalUserNotAllowed"
DisplayName: "Login by a local user that isn't allowed"
Description: "Get an alert when a local user that isn't allowed logins to the device"
IsEnabled: false
ValueType: "String"
AllowlistValues: []
}]
DenylistRules: []
Frissítse a meglévő eszközbiztonsági csoportot az IoT Hub "/subscriptions/XXXXXXXX-XXXX-XXXXX-XXXX-XXXXXXXXXX/resourceGroups/MyResourceGroup/providers/Microsoft.Devices/IotHubs/MyHub" rendszeréről az "Active Csatlakozás ionsNotInAllowedRange" szabálytípussal
Paraméterek
-AllowlistRule
Listaszabályok engedélyezése.
Type: | PSAllowlistCustomAlertRule[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Confirm
Jóváhagyást kér a parancsmag futtatása előtt.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
Az Azure-ral való kommunikációhoz használt hitelesítő adatok, fiók, bérlő és előfizetés.
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DenylistRule
Listaszabályok elutasítása.
Type: | PSDenylistCustomAlertRule[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-HubResourceId
IoT Hub-erőforrás-azonosító.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InputObject
Bemeneti objektum.
Type: | PSDeviceSecurityGroup |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Name
Erőforrás neve.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceId
Annak a biztonsági erőforrásnak az azonosítója, amelyen meg szeretné hívni a parancsot.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ThresholdRule
Küszöbértékszabályok.
Type: | PSThresholdCustomAlertRule[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-TimeWindowRule
Időablak-szabályok.
Type: | PSTimeWindowCustomAlertRule[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
Bemutatja, mi történne a parancsmag futtatásakor. A parancsmag nem fut.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Bevitelek
Kimenetek
Visszajelzés
https://aka.ms/ContentUserFeedback.
Hamarosan elérhető: 2024-ben fokozatosan kivezetjük a GitHub-problémákat a tartalom visszajelzési mechanizmusaként, és lecseréljük egy új visszajelzési rendszerre. További információ:Visszajelzés küldése és megtekintése a következőhöz: