Partilhar via


Get-AzDeviceSecurityGroup

Obter grupo de segurança de dispositivo (segurança do Hub IoT)

Sintaxe

ResourceIdScope (Padrão)

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

ResourceIdLevelResource

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

Descrição

O cmdlet Get-AzDeviceSecurityGroup retorna um grupo de segurança de dispositivo definido na solução de segurança iot

Exemplos

Exemplo 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: []

Obtenha o grupo de segurança de dispositivo "MySecurityGroup" no Hub IoT com ID de recurso "/subscriptions/XXXXXXXX-XXXX-XXXXX-XXXX-XXXXXXXXXXXX/resourceGroups/MyResourceGroup/providers/Microsoft.Devices/IotHubs/MyHub"

Exemplo 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

Obter lista do grupo de segurança do dispositivo no Hub IoT com ID de recurso "/subscriptions/XXXXXXXX-XXXX-XXXXX-XXXX-XXXXXXXXXXXX/resourceGroups/MyResourceGroup/providers/Microsoft.Devices/IotHubs/MyHub"

Parâmetros

-DefaultProfile

As credenciais, a conta, o locatário e a assinatura usados para comunicação com o Azure.

Propriedades dos parâmetros

Tipo:IAzureContextContainer
Valor padrão:None
Suporta curingas:False
DontShow:False
Pseudónimos:AzContext, AzureRmContext, AzureCredential

Conjuntos de parâmetros

(All)
Posição:Named
Obrigatório:False
Valor do pipeline:False
Valor do pipeline por nome da propriedade:False
Valor dos argumentos restantes:False

-HubResourceId

ID do recurso de segurança no qual você deseja invocar o comando.

Propriedades dos parâmetros

Tipo:String
Valor padrão:None
Suporta curingas:False
DontShow:False

Conjuntos de parâmetros

(All)
Posição:Named
Obrigatório:True
Valor do pipeline:False
Valor do pipeline por nome da propriedade:False
Valor dos argumentos restantes:False

-Name

Nome do recurso.

Propriedades dos parâmetros

Tipo:String
Valor padrão:None
Suporta curingas:False
DontShow:False

Conjuntos de parâmetros

ResourceIdLevelResource
Posição:Named
Obrigatório:True
Valor do pipeline:False
Valor do pipeline por nome da propriedade:False
Valor dos argumentos restantes:False

CommonParameters

Este cmdlet suporta os parâmetros comuns: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction e -WarningVariable. Para obter mais informações, consulte about_CommonParameters.

Entradas

None

Saídas

PSDeviceSecurityGroup