Get-AzDeviceSecurityGroup
Pobieranie grupy zabezpieczeń urządzeń (zabezpieczenia usługi IoT Hub)
Składnia
ResourceIdScope (domyślnie)
Get-AzDeviceSecurityGroup
-HubResourceId <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
ResourceIdLevelResource
Get-AzDeviceSecurityGroup
-HubResourceId <String>
-Name <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Opis
Polecenie cmdlet Get-AzDeviceSecurityGroup zwraca grupę zabezpieczeń urządzenia zdefiniowaną w rozwiązaniu zabezpieczeń iot
Przykłady
Przykład 1
Get-AzDeviceSecurityGroup -HubResourceId "/subscriptions/XXXXXXXX-XXXX-XXXXX-XXXX-XXXXXXXXXXXX/resourceGroups/MyResourceGroup/providers/Microsoft.Devices/IotHubs/MyHub" -Name "MySecurityGroup"
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: false
MinThreshold: 0
MaxThreshold: 0
TimeWindowSize: "PT15M"
}
{
RuleType: "AmqpC2DMessagesNotInAllowedRange"
DisplayName: "Number of cloud to device messages (AMQP protocol) is not in allowed range"
Description: "Get an alert when the number of cloud to device messages (AMQP protocol) in the time window is not in the allowed range"
IsEnabled: false
MinThreshold: 0
MaxThreshold: 0
TimeWindowSize: "PT15M"
}]
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: []
Pobierz grupę zabezpieczeń urządzenia "MySecurityGroup" w usłudze IoT Hub z identyfikatorem zasobu "/subscriptions/XXXXXXXX-XXXXX-XXXX-XXXXXXXXXXXX/resourceGroups/MyResourceGroup/providers/Microsoft.Devices/IotHubs/MyHubs"
Przykład 2
Get-AzDeviceSecurityGroup -HubResourceId "/subscriptions/XXXXXXXX-XXXX-XXXXX-XXXX-XXXXXXXXXXXX/resourceGroups/MyResourceGroup/providers/Microsoft.Devices/IotHubs/MyHub"
Array of security group items like the item returned in example 1
Pobierz listę grupy zabezpieczeń urządzeń w usłudze IoT Hub z identyfikatorem zasobu "/subscriptions/XXXXXXXX-XXXX-XXXXX-XXXX-XXXXXXXXXX/resourceGroups/MyResourceGroup/providers/Microsoft.Devices/IotHubs/MyHubs"
Parametry
-DefaultProfile
Poświadczenia, konto, dzierżawa i subskrypcja używane do komunikacji z platformą Azure.
Właściwości parametru
| Typ: | IAzureContextContainer |
| Domyślna wartość: | None |
| Obsługuje symbole wieloznaczne: | False |
| DontShow: | False |
| Aliasy: | AzContext, AzureRmContext, AzureCredential |
Zestawy parametrów
(All)
| Position: | Named |
| Obowiązkowe: | False |
| Wartość z potoku: | False |
| Wartość z potoku według nazwy właściwości: | False |
| Wartość z pozostałych argumentów: | False |
-HubResourceId
Identyfikator zasobu zabezpieczeń, dla którego chcesz wywołać polecenie .
Właściwości parametru
| Typ: | String |
| Domyślna wartość: | None |
| Obsługuje symbole wieloznaczne: | False |
| DontShow: | False |
Zestawy parametrów
(All)
| Position: | Named |
| Obowiązkowe: | True |
| Wartość z potoku: | False |
| Wartość z potoku według nazwy właściwości: | False |
| Wartość z pozostałych argumentów: | False |
-Name
Nazwa zasobu.
Właściwości parametru
| Typ: | String |
| Domyślna wartość: | None |
| Obsługuje symbole wieloznaczne: | False |
| DontShow: | False |
Zestawy parametrów
ResourceIdLevelResource
| Position: | Named |
| Obowiązkowe: | True |
| Wartość z potoku: | False |
| Wartość z potoku według nazwy właściwości: | False |
| Wartość z pozostałych argumentów: | False |
CommonParameters
To polecenie cmdlet obsługuje typowe parametry: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction i -WarningVariable. Aby uzyskać więcej informacji, zobacz about_CommonParameters.