Device Security Groups - Get
Use this method to get the device security group for the specified IoT Hub resource.
GET https://management.azure.com/{resourceId}/providers/Microsoft.Security/deviceSecurityGroups/{deviceSecurityGroupName}?api-version=2019-08-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
device
|
path | True |
string |
The name of the device security group. Note that the name of the device security group is case insensitive. |
resource
|
path | True |
string |
The identifier of the resource. |
api-version
|
query | True |
string |
API version for the operation |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Successful request to get device security group. |
|
Other Status Codes |
Error response describing why the operation failed. |
Security
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
Get a device security group for the specified IoT Hub resource
Sample request
GET https://management.azure.com/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.Devices/iotHubs/sampleiothub/providers/Microsoft.Security/deviceSecurityGroups/samplesecuritygroup?api-version=2019-08-01
Sample response
{
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.Devices/iotHubs/sampleiothub/providers/Microsoft.Security/deviceSecurityGroups/samplesecuritygroup",
"name": "samplesecuritygroup",
"type": "Microsoft.Security/deviceSecurityGroups",
"properties": {
"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"
},
{
"ruleType": "MqttC2DMessagesNotInAllowedRange",
"displayName": "Number of cloud to device messages (MQTT protocol) is not in allowed range",
"description": "Get an alert when the number of cloud to device messages (MQTT protocol) in the time window is not in the allowed range",
"isEnabled": false,
"minThreshold": 0,
"maxThreshold": 0,
"timeWindowSize": "PT15M"
},
{
"ruleType": "HttpC2DMessagesNotInAllowedRange",
"displayName": "Number of cloud to device messages (HTTP protocol) is not in allowed range",
"description": "Get an alert when the number of cloud to device messages (HTTP protocol) in the time window is not in the allowed range",
"isEnabled": false,
"minThreshold": 0,
"maxThreshold": 0,
"timeWindowSize": "PT15M"
},
{
"ruleType": "AmqpC2DRejectedMessagesNotInAllowedRange",
"displayName": "Number of rejected 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) that were rejected by the device in the time window is not in the allowed range",
"isEnabled": false,
"minThreshold": 0,
"maxThreshold": 0,
"timeWindowSize": "PT15M"
},
{
"ruleType": "MqttC2DRejectedMessagesNotInAllowedRange",
"displayName": "Number of rejected cloud to device messages (MQTT protocol) is not in allowed range",
"description": "Get an alert when the number of cloud to device messages (MQTT protocol) that were rejected by the device in the time window is not in the allowed range",
"isEnabled": false,
"minThreshold": 0,
"maxThreshold": 0,
"timeWindowSize": "PT15M"
},
{
"ruleType": "HttpC2DRejectedMessagesNotInAllowedRange",
"displayName": "Number of rejected cloud to device messages (HTTP protocol) is not in allowed range",
"description": "Get an alert when the number of cloud to device messages (HTTP protocol) that were rejected by the device in the time window is not in the allowed range",
"isEnabled": false,
"minThreshold": 0,
"maxThreshold": 0,
"timeWindowSize": "PT15M"
},
{
"ruleType": "AmqpD2CMessagesNotInAllowedRange",
"displayName": "Number of device to cloud messages (AMQP protocol) is not in allowed range",
"description": "Get an alert when the number of device to cloud messages (AMQP protocol) in the time window is not in the allowed range",
"isEnabled": false,
"minThreshold": 0,
"maxThreshold": 0,
"timeWindowSize": "PT15M"
},
{
"ruleType": "MqttD2CMessagesNotInAllowedRange",
"displayName": "Number of device to cloud messages (MQTT protocol) is not in allowed range",
"description": "Get an alert when the number of device to cloud messages (MQTT protocol) in the time window is not in the allowed range",
"isEnabled": false,
"minThreshold": 0,
"maxThreshold": 0,
"timeWindowSize": "PT15M"
},
{
"ruleType": "HttpD2CMessagesNotInAllowedRange",
"displayName": "Number of device to cloud messages (HTTP protocol) is not in allowed range",
"description": "Get an alert when the number of device to cloud messages (HTTP protocol) in the time window is not in the allowed range",
"isEnabled": false,
"minThreshold": 0,
"maxThreshold": 0,
"timeWindowSize": "PT15M"
},
{
"ruleType": "DirectMethodInvokesNotInAllowedRange",
"displayName": "Number of direct method invokes is not in allowed range",
"description": "Get an alert when the number of direct method invokes in the time window is not in the allowed range",
"isEnabled": false,
"minThreshold": 0,
"maxThreshold": 0,
"timeWindowSize": "PT15M"
},
{
"ruleType": "FailedLocalLoginsNotInAllowedRange",
"displayName": "Number of failed local logins is not in allowed range",
"description": "Get an alert when the number of failed local logins on the device in the time window is not in the allowed range",
"isEnabled": false,
"minThreshold": 0,
"maxThreshold": 0,
"timeWindowSize": "PT15M"
},
{
"ruleType": "FileUploadsNotInAllowedRange",
"displayName": "Number of file uploads is not in allowed range",
"description": "Get an alert when the number of file uploads from the device to the cloud in the time window is not in the allowed range",
"isEnabled": false,
"minThreshold": 0,
"maxThreshold": 0,
"timeWindowSize": "PT15M"
},
{
"ruleType": "QueuePurgesNotInAllowedRange",
"displayName": "Number of device queue purges is not in allowed range",
"description": "Get an alert when the number of device queue purges in the time window is not in the allowed range",
"isEnabled": false,
"minThreshold": 0,
"maxThreshold": 0,
"timeWindowSize": "PT15M"
},
{
"ruleType": "TwinUpdatesNotInAllowedRange",
"displayName": "Number of twin updates is not in allowed range",
"description": "Get an alert when the number of twin updates (by the device or the service) in the time window is not in the allowed range",
"isEnabled": false,
"minThreshold": 0,
"maxThreshold": 0,
"timeWindowSize": "PT15M"
},
{
"ruleType": "UnauthorizedOperationsNotInAllowedRange",
"displayName": "Number of unauthorized operations is not in allowed range",
"description": "Get an alert when the number unauthorized operations in the time window is not in the allowed range. Unauthorized operations are operations that affect the device (or done by it) that fail because of an unauthorized error",
"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": []
},
{
"ruleType": "ProcessNotAllowed",
"displayName": "Execution of a process that isn't allowed",
"description": "Get an alert when a process that isn't allowed is executed",
"isEnabled": false,
"valueType": "String",
"allowlistValues": []
}
],
"denylistRules": []
}
}
Definitions
Name | Description |
---|---|
Allowlist |
A custom alert rule that checks if a value (depends on the custom alert type) is allowed. |
Cloud |
Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). |
Cloud |
The error detail. |
Denylist |
A custom alert rule that checks if a value (depends on the custom alert type) is denied. |
Device |
The device security group resource |
Error |
The resource management error additional info. |
Threshold |
A custom alert rule that checks if a value (depends on the custom alert type) is within the given range. |
Time |
A custom alert rule that checks if the number of activities (depends on the custom alert type) in a time window is within the given range. |
value |
The value type of the items in the list. |
AllowlistCustomAlertRule
A custom alert rule that checks if a value (depends on the custom alert type) is allowed.
Name | Type | Description |
---|---|---|
allowlistValues |
string[] |
The values to allow. The format of the values depends on the rule type. |
description |
string |
The description of the custom alert. |
displayName |
string |
The display name of the custom alert. |
isEnabled |
boolean |
Status of the custom alert. |
ruleType |
string |
The type of the custom alert rule. |
valueType |
The value type of the items in the list. |
CloudError
Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).
Name | Type | Description |
---|---|---|
error.additionalInfo |
The error additional info. |
|
error.code |
string |
The error code. |
error.details |
The error details. |
|
error.message |
string |
The error message. |
error.target |
string |
The error target. |
CloudErrorBody
The error detail.
Name | Type | Description |
---|---|---|
additionalInfo |
The error additional info. |
|
code |
string |
The error code. |
details |
The error details. |
|
message |
string |
The error message. |
target |
string |
The error target. |
DenylistCustomAlertRule
A custom alert rule that checks if a value (depends on the custom alert type) is denied.
Name | Type | Description |
---|---|---|
denylistValues |
string[] |
The values to deny. The format of the values depends on the rule type. |
description |
string |
The description of the custom alert. |
displayName |
string |
The display name of the custom alert. |
isEnabled |
boolean |
Status of the custom alert. |
ruleType |
string |
The type of the custom alert rule. |
valueType |
The value type of the items in the list. |
DeviceSecurityGroup
The device security group resource
Name | Type | Description |
---|---|---|
id |
string |
Resource Id |
name |
string |
Resource name |
properties.allowlistRules |
The allow-list custom alert rules. |
|
properties.denylistRules |
The deny-list custom alert rules. |
|
properties.thresholdRules |
The list of custom alert threshold rules. |
|
properties.timeWindowRules |
The list of custom alert time-window rules. |
|
type |
string |
Resource type |
ErrorAdditionalInfo
The resource management error additional info.
Name | Type | Description |
---|---|---|
info |
object |
The additional info. |
type |
string |
The additional info type. |
ThresholdCustomAlertRule
A custom alert rule that checks if a value (depends on the custom alert type) is within the given range.
Name | Type | Description |
---|---|---|
description |
string |
The description of the custom alert. |
displayName |
string |
The display name of the custom alert. |
isEnabled |
boolean |
Status of the custom alert. |
maxThreshold |
integer |
The maximum threshold. |
minThreshold |
integer |
The minimum threshold. |
ruleType |
string |
The type of the custom alert rule. |
TimeWindowCustomAlertRule
A custom alert rule that checks if the number of activities (depends on the custom alert type) in a time window is within the given range.
Name | Type | Description |
---|---|---|
description |
string |
The description of the custom alert. |
displayName |
string |
The display name of the custom alert. |
isEnabled |
boolean |
Status of the custom alert. |
maxThreshold |
integer |
The maximum threshold. |
minThreshold |
integer |
The minimum threshold. |
ruleType |
string |
The type of the custom alert rule. |
timeWindowSize |
string |
The time window size in iso8601 format. |
valueType
The value type of the items in the list.
Name | Type | Description |
---|---|---|
IpCidr |
string |
An IP range in CIDR format (e.g. '192.168.0.1/8'). |
String |
string |
Any string value. |