Sdílet prostřednictvím


Get-AzDeviceSecurityGroup

Získání skupiny zabezpečení zařízení (zabezpečení ioT Hubu)

Syntaxe

Get-AzDeviceSecurityGroup
   -HubResourceId <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzDeviceSecurityGroup
   -HubResourceId <String>
   -Name <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

Rutina Get-AzDeviceSecurityGroup vrátí skupinu zabezpečení zařízení definovanou v řešení zabezpečení iot.

Příklady

Příklad 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: []

Získání skupiny zabezpečení zařízení MySecurityGroup ve službě IoT Hub s ID zdroje /subscriptions/XXXXXXXX-XXXX-XXXXX-XXXX-XXXXXXXXXXXXXX/resourceGroups/MyResourceGroup/providers/Microsoft.Devices/IotHubs/MyHub

Příklad 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

Získání seznamu skupin zabezpečení zařízení ve službě IoT Hub s ID reasource "/subscriptions/XXXXXXXX-XXXX-XXXXX-XXXXXXXXXXXXXX/resourceGroups/MyResourceGroup/providers/Microsoft.Devices/IotHubs/MyHub"

Parametry

-DefaultProfile

Přihlašovací údaje, účet, tenant a předplatné používané ke komunikaci s Azure.

Typ:IAzureContextContainer
Aliasy:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Vyžadováno:False
Přijmout vstup kanálu:False
Přijmout zástupné znaky:False

-HubResourceId

ID prostředku zabezpečení, pro který chcete vyvolat příkaz.

Typ:String
Position:Named
Default value:None
Vyžadováno:True
Přijmout vstup kanálu:False
Přijmout zástupné znaky:False

-Name

Název prostředku

Typ:String
Position:Named
Default value:None
Vyžadováno:True
Přijmout vstup kanálu:False
Přijmout zástupné znaky:False

Vstupy

None

Výstupy

PSDeviceSecurityGroup