From ed41e1c052d7e149af616cd32004eb453dcaab2c Mon Sep 17 00:00:00 2001 From: michal Date: Thu, 18 Mar 2021 14:46:58 +0200 Subject: [PATCH 1/7] new device model for iot swcurity --- .../preview/2021-02-01-preview/devices.json | 743 ++++++++++++++++++ .../examples/Devices/Get.json | 69 ++ .../examples/Devices/List.json | 72 ++ .../iotsecurity/resource-manager/readme.md | 5 + 4 files changed, 889 insertions(+) create mode 100644 specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/devices.json create mode 100644 specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Devices/Get.json create mode 100644 specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Devices/List.json diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/devices.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/devices.json new file mode 100644 index 000000000000..c87fb0d02a02 --- /dev/null +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/devices.json @@ -0,0 +1,743 @@ +{ + "swagger": "2.0", + "info": { + "title": "Azure Defender for IoT", + "description": "API spec for Microsoft.IoTSecurity (Azure Defender for IoT) resource provider", + "version": "2021-02-01-preview" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/providers/Microsoft.IoTSecurity/locations/{iotDefenderLocation}/deviceGroups/{deviceGroupName}/devices": { + "get": { + "x-ms-examples": { + "List devices": { + "$ref": "./examples/Devices/List.json" + } + }, + "tags": [ + "Devices" + ], + "description": "List devices", + "operationId": "Devices_List", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/1.0/types.json#/parameters/IotDefenderLocation" + }, + { + "$ref": "#/parameters/DeviceGroupName" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/DeviceList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.IoTSecurity/locations/{iotDefenderLocation}/deviceGroups/{deviceGroupName}/devices/{deviceId}": { + "get": { + "x-ms-examples": { + "Get device": { + "$ref": "./examples/Devices/Get.json" + } + }, + "tags": [ + "Devices" + ], + "operationId": "Devices_Get", + "description": "Get device", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/1.0/types.json#/parameters/IotDefenderLocation" + }, + { + "$ref": "#/parameters/DeviceGroupName" + }, + { + "$ref": "#/parameters/DeviceId" + }, + { + "in": "query", + "name": "$skipToken", + "required": false, + "type": "string", + "description": "Skip token used for pagination" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/DeviceModel" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + } + } + }, + "definitions": { + "DeviceList": { + "description": "List of devices", + "type": "object", + "properties": { + "value": { + "description": "List data", + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/DeviceModel" + } + }, + "nextLink": { + "readOnly": true, + "type": "string", + "description": "When there are too many devices for one page, use this URI to fetch the next page." + } + } + }, + "DeviceModel": { + "type": "object", + "description": "Device", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "description": "Device properties", + "$ref": "#/definitions/DeviceProperties" + }, + "systemData": { + "readOnly": true, + "type": "object", + "description": "Azure Resource Manager metadata containing createdBy and modifiedBy information.", + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ProxyResource" + } + ] + }, + "DeviceProperties": { + "type": "object", + "description": "Device properties", + "properties": { + "schemaVersion": { + "readOnly": true, + "type": "string", + "description": "Version of the device model schema" + }, + "deviceDataSource": { + "readOnly": true, + "type": "string", + "$ref": "#/definitions/DeviceDataSource", + "description": "Device data source." + }, + "sensor": { + "readOnly": true, + "type": "object", + "description": "Sensor that scanned this device.", + "$ref": "#/definitions/Sensor" + }, + "mergedDevices": { + "readOnly": true, + "type": "array", + "description": "List of merged devices data", + "items": { + "$ref": "#/definitions/MergedDevice" + } + }, + "mergedToDeviceId": { + "readOnly": true, + "type": "string", + "description": "The device Id that this device was merged into" + }, + "onboardingStatus": { + "readOnly": true, + "type": "string", + "enum": [ + "Onboarded", + "NotOnboarded", + "NotSupported", + "InsufficientInfo" + ], + "x-ms-enum": { + "name": "OnboardingStatus", + "modelAsString": true + }, + "description": "Device onboarding status." + }, + "name": { + "type": "string", + "description": "Device name" + }, + "deviceCategoryId": { + "type": "integer", + "format": "int32", + "minimum": 0, + "description": "Device category id" + }, + "deviceTypeId": { + "type": "integer", + "format": "int32", + "minimum": 0, + "description": "Device type id" + }, + "deviceSubTypeId": { + "type": "integer", + "format": "int32", + "minimum": 0, + "description": "Device sub type id" + }, + "deviceCategoryDisplayName": { + "readOnly": true, + "type": "string", + "description": "Device category display name" + }, + "deviceTypeDisplayName": { + "readOnly": true, + "type": "string", + "description": "Device type display name" + }, + "deviceSubTypeDisplayName": { + "readOnly": true, + "type": "string", + "description": "Device sub type display name" + }, + "profilingConfidence": { + "readOnly": true, + "type": "integer", + "format": "int32", + "description": "Confidence of the device profile" + }, + "riskScore": { + "readOnly": true, + "type": "integer", + "format": "int32", + "description": "risk score of the device." + }, + "criticality": { + "type": "string", + "enum": [ + "Low", + "Normal", + "High" + ], + "x-ms-enum": { + "name": "Criticality", + "modelAsString": true + }, + "description": "Device criticality." + }, + "tags": { + "type": "array", + "description": "Tags", + "items": { + "type": "string" + } + }, + "firstSeen": { + "readOnly": true, + "type": "string", + "format": "date-time", + "description": "First time the device was seen." + }, + "lastSeen": { + "readOnly": true, + "type": "string", + "format": "date-time", + "description": "Last time the device was seen." + }, + "lastUpdated": { + "readOnly": true, + "type": "string", + "format": "date-time", + "description": "Last time the device was updated." + }, + "hardware": { + "type": "object", + "description": "Device hardware data", + "$ref": "#/definitions/Hardware" + }, + "firmwares": { + "type": "array", + "description": "List of device firmwares.", + "items": { + "$ref": "#/definitions/Firmware" + } + }, + "operatingSystem": { + "type": "object", + "description": "Device operating system data", + "$ref": "#/definitions/OperatingSystem" + }, + "businessFunction": { + "type": "string", + "description": "Device business function" + }, + "purdueLevel": { + "type": "string", + "enum": [ + "ProcessControl", + "Supervisory", + "Enterprise" + ], + "x-ms-enum": { + "name": "PurdueLevel", + "modelAsString": true + }, + "description": "Purdue level of the device." + }, + "authorizedState": { + "type": "string", + "enum": [ + "Authorized", + "Unauthorized" + ], + "description": "Authorized state of the device.", + "x-ms-enum": { + "name": "AuthorizedState", + "modelAsString": true + } + }, + "programmingState": { + "readOnly": true, + "type": "string", + "enum": [ + "ProgrammingDevice", + "NotProgrammingDevice" + ], + "x-ms-enum": { + "name": "ProgrammingState", + "modelAsString": true + }, + "description": "Indicates whether this device is programming" + }, + "lastProgrammingTime": { + "readOnly": true, + "type": "string", + "format": "date-time", + "description": "last time the device was programming or programed." + }, + "cpes": { + "readOnly": true, + "type": "array", + "description": "List of Common Platform Enumeration (CPE)", + "items": { + "type": "string" + } + }, + "nics": { + "readOnly": true, + "type": "array", + "description": "List of the device network interface cards.", + "items": { + "$ref": "#/definitions/Nic" + } + }, + "deviceStatus": { + "readOnly": true, + "type": "string", + "enum": [ + "Active", + "Inactive", + "Removed", + "Deleted" + ], + "x-ms-enum": { + "name": "DeviceStatus", + "modelAsString": true + }, + "description": "Device status." + }, + "slots": { + "readOnly": true, + "type": "array", + "description": "List of the device slot in the PLC backplane", + "items": { + "$ref": "#/definitions/Slot" + } + }, + "parentDeviceId": { + "readOnly": true, + "type": "string", + "description": "For nested device, this is the parent device id." + }, + "parentRackNumber": { + "readOnly": true, + "type": "integer", + "format": "int32", + "description": "For nested device, this is the rack number in the parent device that holds the nested device." + }, + "parentSlotNumber": { + "readOnly": true, + "type": "integer", + "format": "int32", + "description": "For nested device, this is the slot number in the parent device that holds the nested device." + }, + "packages": { + "type": "array", + "description": "List of device packages", + "items": { + "$ref": "#/definitions/Package" + } + }, + "additionalFields": { + "type": "object", + "description": " A bag of fields which extends the device information." + } + } + }, + "Slot": { + "type": "object", + "description": "Slot data in PLC backplane", + "properties": { + "slotNumber": { + "readOnly": true, + "type": "integer", + "format": "int32", + "description": "Slot number inside the rack" + }, + "rackNumber": { + "readOnly": true, + "type": "integer", + "format": "int32", + "description": "Rack number in the backplane" + }, + "slotType": { + "type": "string", + "enum": [ + "Supply", + "AnalogIO", + "CommAdapter", + "DigitalIO", + "Cpu", + "Hmi", + "Generic" + ], + "x-ms-enum": { + "name": "SlotType", + "modelAsString": true + }, + "description": "Slot type." + }, + "hardwareVendor": { + "type": "string", + "description": "Hardware vendor of the slot." + }, + "hardwareRevision": { + "type": "string", + "description": "Hardware revision of the slot." + }, + "firmwareVersion": { + "type": "string", + "description": "Firmware revision of the slot." + }, + "model": { + "type": "string", + "description": "Model of the slot." + }, + "moduleVersion": { + "type": "string", + "description": "Module version of the slot." + }, + "serialNumber": { + "type": "string", + "description": "Serial number of the slot." + }, + "productCode": { + "type": "string", + "description": "Product code of the slot." + }, + "cpes": { + "readOnly": true, + "type": "array", + "description": "List of Common Platform Enumeration (CPE) of the slot", + "items": { + "type": "string" + } + }, + "additionalData": { + "type": "object", + "description": " A bag of fields which extends the slot information." + } + } + }, + "Nic": { + "type": "object", + "description": "Network interface card properties", + "properties": { + "lastSeen": { + "readOnly": true, + "type": "string", + "format": "date-time", + "description": "Last seen time" + }, + "ipv4Address": { + "readOnly": true, + "type": "string", + "description": "Ipv4 address" + }, + "ipv6Address": { + "readOnly": true, + "type": "string", + "description": "Ipv6 address" + }, + "macAddress": { + "readOnly": true, + "type": "string", + "description": "Mac address" + }, + "networkAdapterVendor": { + "readOnly": true, + "type": "string", + "description": "Network adapter vendor." + }, + "macCertainty": { + "readOnly": true, + "type": "string", + "enum": [ + "Guess", + "Certain" + ], + "x-ms-enum": { + "name": "MacCertainty", + "modelAsString": true + }, + "description": "Indicates whether the association of the mac to the ip address is certain or a guess." + }, + "vlans": { + "readOnly": true, + "type": "array", + "description": "List of virtual LAN (vlan)", + "items": { + "type": "string" + } + } + } + }, + "Sensor": { + "type": "object", + "description": "Sensor that scanned the device", + "properties": { + "name": { + "readOnly": true, + "type": "string", + "description": "Sensor name." + }, + "type": { + "readOnly": true, + "type": "string", + "enum": [ + "Ot", + "Enterprise" + ], + "x-ms-enum": { + "name": "SensorType", + "modelAsString": true + }, + "description": "Sensor type." + }, + "zone": { + "readOnly": true, + "type": "string", + "description": "Sensor zone." + }, + "site": { + "readOnly": true, + "type": "string", + "description": "Sensor site." + } + } + }, + "Hardware": { + "type": "object", + "description": "Device hardware data", + "properties": { + "model": { + "type": "string", + "description": "Hardware model." + }, + "vendor": { + "type": "string", + "description": "Hardware vendor." + }, + "serialNumber": { + "type": "string", + "description": "Hardware serial number." + } + } + }, + "Firmware": { + "type": "object", + "description": "Device firmware data", + "properties": { + "name": { + "type": "string", + "description": "Firmware name." + }, + "vendor": { + "type": "string", + "description": "Firmware vendor." + }, + "version": { + "type": "string", + "description": "Firmware version." + }, + "moduleAddress": { + "type": "string", + "description": "Firmware module address." + } + } + }, + "Package": { + "type": "object", + "description": "Device package data", + "properties": { + "name": { + "type": "string", + "description": "Package name." + }, + "version": { + "type": "string", + "description": "Package version." + } + } + }, + "OperatingSystem": { + "type": "object", + "description": "Device operating system data", + "properties": { + "build": { + "type": "string", + "description": "OS build" + }, + "distribution": { + "type": "string", + "description": "OS distribution" + }, + "version": { + "type": "string", + "description": "OS version" + }, + "platform": { + "type": "string", + "description": "OS platform" + }, + "architecture": { + "type": "string", + "description": "OS architecture" + } + } + }, + "MergedDevice": { + "readOnly": true, + "type": "object", + "description": "Merged device data", + "properties": { + "id": { + "readOnly": true, + "type": "string", + "description": "device id" + }, + "deviceDataSource": { + "readOnly": true, + "type": "string", + "$ref": "#/definitions/DeviceDataSource", + "description": "Device data source" + }, + "sensor": { + "readOnly": true, + "type": "object", + "$ref": "#/definitions/Sensor", + "description": "Device sensor data" + } + } + }, + "DeviceDataSource": { + "type": "string", + "enum": [ + "OtSensor", + "CorpSensor", + "Mde", + "Other" + ], + "x-ms-enum": { + "name": "DeviceDataSource", + "modelAsString": true + }, + "description": "Device data source" + } + }, + "parameters": { + "DeviceGroupName": { + "name": "deviceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "Device group name", + "x-ms-parameter-location": "method" + }, + "DeviceId": { + "name": "deviceId", + "in": "path", + "required": true, + "description": "Device Id", + "type": "string", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Devices/Get.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Devices/Get.json new file mode 100644 index 000000000000..bd53791e88f9 --- /dev/null +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Devices/Get.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "api-version": "2021-02-01-preview", + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "iotDefenderLocation": "eastus", + "deviceGroupName": "myGroup", + "deviceId": "fa30e727-16e1-4e81-84f1-d26b9153d1b2" + }, + "responses": { + "200": { + "body": { + "name": "fa30e727-16e1-4e81-84f1-d26b9153d1b2", + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.IoTSecurity/locations/eastus/deviceGroups/myGroup/devices/fa30e727-16e1-4e81-84f1-d26b9153d1b2", + "type": "Microsoft.IoTSecurity/locations/deviceGroups/devices", + "properties": { + "schemaVersion": "1", + "deviceDataSource": "OtSensor", + "sensor": { + "name": "mySensor", + "zone": "myZone", + "site": "mySite" + }, + "onboardingStatus": "InsufficientInfo", + "name": "10.168.140.1", + "deviceCategoryId": 6, + "deviceTypeId": 17, + "deviceSubTypeId": 2, + "deviceCategoryDisplayName": "OT", + "deviceTypeDisplayName": "Industrial", + "deviceSubTypeDisplayName": "Historian", + "riskScore": 90, + "criticality": "Normal", + "firstSeen": "2020-05-13T06:32:25Z", + "lastSeen": "2020-05-13T06:32:25Z", + "lastUpdated": "2020-05-13T06:32:25Z", + "operatingSystem": { + "version": "10\\1604", + "platform": "Windows" + }, + "purdueLevel": "ProcessControl", + "authorizedState": "Authorized", + "programmingState": "NotProgrammingDevice", + "nics": [ + { + "lastSeen": "2020-05-13T06:32:25Z", + "ipv4Address": "10.168.140.1", + "macAddress": "34-E1-2D-77-80-D0", + "macCertainty": "Certain", + "vlans": [ + "name(1)->2", + "3", + "another_name(4)" + ] + } + ], + "deviceStatus": "Active" + }, + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2020-04-27T21:53:29.0928001Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-04-27T21:53:29.0928001Z" + } + } + } + } +} diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Devices/List.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Devices/List.json new file mode 100644 index 000000000000..5b5442363870 --- /dev/null +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Devices/List.json @@ -0,0 +1,72 @@ +{ + "parameters": { + "api-version": "2021-02-01-preview", + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "iotDefenderLocation": "eastus", + "deviceGroupName": "myGroup" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "fa30e727-16e1-4e81-84f1-d26b9153d1b2", + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.IoTSecurity/locations/eastus/deviceGroups/myGroup/devices/fa30e727-16e1-4e81-84f1-d26b9153d1b2", + "type": "Microsoft.IoTSecurity/locations/deviceGroups/devices", + "properties": { + "schemaVersion": "1", + "deviceDataSource": "OtSensor", + "sensor": { + "name": "mySensor", + "zone": "myZone", + "site": "mySite" + }, + "onboardingStatus": "InsufficientInfo", + "name": "10.168.140.1", + "deviceCategoryId": 6, + "deviceTypeId": 17, + "deviceSubTypeId": 2, + "deviceCategoryDisplayName": "OT", + "deviceTypeDisplayName": "Industrial", + "deviceSubTypeDisplayName": "Historian", + "riskScore": 90, + "criticality": "Normal", + "firstSeen": "2020-05-13T06:32:25Z", + "lastSeen": "2020-05-13T06:32:25Z", + "lastUpdated": "2020-05-13T06:32:25Z", + "operatingSystem": { + "version": "10\\1604", + "platform": "Windows" + }, + "purdueLevel": "ProcessControl", + "authorizedState": "Authorized", + "programmingState": "NotProgrammingDevice", + "nics": [ + { + "lastSeen": "2020-05-13T06:32:25Z", + "ipv4Address": "10.168.140.1", + "macAddress": "34-E1-2D-77-80-D0", + "macCertainty": "Certain", + "vlans": [ + "name(1)->2", + "3", + "another_name(4)" + ] + } + ], + "deviceStatus": "Active" + }, + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2020-04-27T21:53:29.0928001Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-04-27T21:53:29.0928001Z" + } + } + ] + } + } + } +} diff --git a/specification/iotsecurity/resource-manager/readme.md b/specification/iotsecurity/resource-manager/readme.md index 1e9c2493da86..1e14e1eee8b2 100644 --- a/specification/iotsecurity/resource-manager/readme.md +++ b/specification/iotsecurity/resource-manager/readme.md @@ -40,6 +40,10 @@ directive: from: onPremiseSensors.json where: $.definitions.OnPremiseSensor reason: The resource is managed in a subscription level (instead of inside a resource group) + - suppress: PageableOperation + from: devices.json + where: '$.paths["/subscriptions/{subscriptionId}/providers/Microsoft.IoTSecurity/locations/{iotDefenderLocation}/deviceGroups/{deviceGroupName}/devices"].get' + reason: The list returns limited number of items ``` ### Basic Information @@ -64,6 +68,7 @@ input-file: - Microsoft.IoTSecurity/preview/2021-02-01-preview/sites.json - Microsoft.IoTSecurity/preview/2021-02-01-preview/sensors.json - Microsoft.IoTSecurity/preview/2021-02-01-preview/onPremiseSensors.json +- Microsoft.IoTSecurity/preview/2021-02-01-preview/devices.json ``` --- From 3930450e4ab01c30986484c38d00ef522bd73cdd Mon Sep 17 00:00:00 2001 From: michal Date: Thu, 18 Mar 2021 15:32:51 +0200 Subject: [PATCH 2/7] spelling --- custom-words.txt | 2 ++ .../preview/2021-02-01-preview/devices.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/custom-words.txt b/custom-words.txt index d05d7f26920e..8699a5b264b6 100644 --- a/custom-words.txt +++ b/custom-words.txt @@ -209,6 +209,7 @@ backendid backends backfilling Backoff +backplane backupconfig backupengine backupstorageconfig @@ -399,6 +400,7 @@ costcenter costinsights costmanagement Couchbase +cpes cpim CPIM Cran diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/devices.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/devices.json index c87fb0d02a02..c7d4cf8973c1 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/devices.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/devices.json @@ -406,7 +406,7 @@ "slots": { "readOnly": true, "type": "array", - "description": "List of the device slot in the PLC backplane", + "description": "List of the device slot in the backplane", "items": { "$ref": "#/definitions/Slot" } From 0f8ea2c02a04b4861728a8f1cb5db56fde70b0e8 Mon Sep 17 00:00:00 2001 From: michal Date: Thu, 18 Mar 2021 15:39:12 +0200 Subject: [PATCH 3/7] fixed lint error --- .../preview/2021-02-01-preview/devices.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/devices.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/devices.json index c7d4cf8973c1..ab8058377c50 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/devices.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/devices.json @@ -284,7 +284,7 @@ }, "tags": { "type": "array", - "description": "Tags", + "description": "Device tags", "items": { "type": "string" } From 63e9dd54b788b559af20d612950d425c6e408135 Mon Sep 17 00:00:00 2001 From: michal Date: Thu, 18 Mar 2021 16:52:18 +0200 Subject: [PATCH 4/7] changed readme and added "x-ms-pageable" to device list --- .../preview/2021-02-01-preview/devices.json | 3 +++ specification/iotsecurity/resource-manager/readme.md | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/devices.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/devices.json index ab8058377c50..3b3c3c2d0257 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/devices.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/devices.json @@ -125,6 +125,9 @@ "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" } } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" } } } diff --git a/specification/iotsecurity/resource-manager/readme.md b/specification/iotsecurity/resource-manager/readme.md index ebd7216c58c6..2c31d6faad9b 100644 --- a/specification/iotsecurity/resource-manager/readme.md +++ b/specification/iotsecurity/resource-manager/readme.md @@ -40,10 +40,6 @@ directive: from: onPremiseSensors.json where: $.definitions.OnPremiseSensor reason: The resource is managed in a subscription level (instead of inside a resource group) - - suppress: PageableOperation - from: devices.json - where: '$.paths["/subscriptions/{subscriptionId}/providers/Microsoft.IoTSecurity/locations/{iotDefenderLocation}/deviceGroups/{deviceGroupName}/devices"].get' - reason: The list returns limited number of items ``` ### Basic Information From 06a7320b32fbd88849c75ad3ae185ab49ae88221 Mon Sep 17 00:00:00 2001 From: michal Date: Thu, 18 Mar 2021 16:55:49 +0200 Subject: [PATCH 5/7] moved the "x-ms-pageable" from get to list --- .../preview/2021-02-01-preview/devices.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/devices.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/devices.json index 3b3c3c2d0257..5de7d59392f9 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/devices.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/devices.json @@ -73,6 +73,9 @@ "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" } } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" } } }, @@ -125,9 +128,6 @@ "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" } } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" } } } From 3ea1a70faeb937093c098a046ba01985e0eec4d1 Mon Sep 17 00:00:00 2001 From: michal Date: Thu, 18 Mar 2021 16:58:14 +0200 Subject: [PATCH 6/7] prettier --- .../preview/2021-02-01-preview/devices.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/devices.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/devices.json index 5de7d59392f9..cdb351d974e7 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/devices.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/devices.json @@ -74,7 +74,7 @@ } } }, - "x-ms-pageable": { + "x-ms-pageable": { "nextLinkName": "nextLink" } } From 5effaa716f8c6f791d95727677cde6874ecc95f7 Mon Sep 17 00:00:00 2001 From: michal Date: Sun, 4 Apr 2021 14:16:58 +0300 Subject: [PATCH 7/7] PR comments --- .../preview/2021-02-01-preview/devices.json | 20 +++++++++---------- .../examples/Devices/Get.json | 2 +- .../examples/Devices/List.json | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/devices.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/devices.json index cdb351d974e7..42c426802e0a 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/devices.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/devices.json @@ -58,6 +58,13 @@ }, { "$ref": "#/parameters/DeviceGroupName" + }, + { + "in": "query", + "name": "$skipToken", + "required": false, + "type": "string", + "description": "Skip token used for pagination" } ], "responses": { @@ -106,13 +113,6 @@ }, { "$ref": "#/parameters/DeviceId" - }, - { - "in": "query", - "name": "$skipToken", - "required": false, - "type": "string", - "description": "Skip token used for pagination" } ], "responses": { @@ -223,7 +223,7 @@ }, "description": "Device onboarding status." }, - "name": { + "deviceName": { "type": "string", "description": "Device name" }, @@ -285,7 +285,7 @@ }, "description": "Device criticality." }, - "tags": { + "deviceTags": { "type": "array", "description": "Device tags", "items": { @@ -308,7 +308,7 @@ "readOnly": true, "type": "string", "format": "date-time", - "description": "Last time the device was updated." + "description": "Last time the device was updated by the profiler." }, "hardware": { "type": "object", diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Devices/Get.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Devices/Get.json index bd53791e88f9..c540ab4b7946 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Devices/Get.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Devices/Get.json @@ -21,7 +21,7 @@ "site": "mySite" }, "onboardingStatus": "InsufficientInfo", - "name": "10.168.140.1", + "deviceName": "10.168.140.1", "deviceCategoryId": 6, "deviceTypeId": 17, "deviceSubTypeId": 2, diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Devices/List.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Devices/List.json index 5b5442363870..f3a48afcba78 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Devices/List.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Devices/List.json @@ -22,7 +22,7 @@ "site": "mySite" }, "onboardingStatus": "InsufficientInfo", - "name": "10.168.140.1", + "deviceName": "10.168.140.1", "deviceCategoryId": 6, "deviceTypeId": 17, "deviceSubTypeId": 2,