Get-AzDeviceSecurityGroup
Obtenir un groupe de sécurité d’appareil (sécurité IoT Hub)
Syntaxe
Get-AzDeviceSecurityGroup
-HubResourceId <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzDeviceSecurityGroup
-HubResourceId <String>
-Name <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
L’applet de commande Get-AzDeviceSecurityGroup retourne un groupe de sécurité d’appareil défini dans la solution de sécurité iot
Exemples
Exemple 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: []
Obtenir le groupe de sécurité d’appareil « MySecurityGroup » dans IoT Hub avec l’ID de ressource « /subscriptions/XXXXXXXX-XXXX-XXXXX-XXXXXXXXXXXX/resourceGroups/MyResourceGroup/providers/Microsoft.Devices/IotHubs/MyHubs »
Exemple 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
Obtenir la liste du groupe de sécurité d’appareil dans IoT Hub avec l’ID de ressource « /subscriptions/XXXXXXXX-XXXX-XXXXX-XXXXXXXXXXXX/resourceGroups/MyResourceGroup/providers/Microsoft.Devices/IotHubs/MyHub »
Paramètres
-DefaultProfile
Informations d’identification, compte, locataire et abonnement utilisés pour la communication avec Azure.
Type: | IAzureContextContainer |
Alias: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Valeur par défaut: | None |
Obligatoire: | False |
Accepter l'entrée de pipeline: | False |
Accepter les caractères génériques: | False |
-HubResourceId
ID de la ressource de sécurité sur laquelle vous souhaitez appeler la commande.
Type: | String |
Position: | Named |
Valeur par défaut: | None |
Obligatoire: | True |
Accepter l'entrée de pipeline: | False |
Accepter les caractères génériques: | False |
-Name
Nom de la ressource.
Type: | String |
Position: | Named |
Valeur par défaut: | None |
Obligatoire: | True |
Accepter l'entrée de pipeline: | False |
Accepter les caractères génériques: | False |
Entrées
None