From 17442699abeefb53113971e33e613e77981e2b41 Mon Sep 17 00:00:00 2001 From: Orel Kayam Date: Sun, 30 May 2021 10:40:54 +0300 Subject: [PATCH 01/19] add new resources --- .../2021-02-01-preview/alertTypes.json | 307 ++++++++++++++++++ .../preview/2021-02-01-preview/alerts.json | 289 +++++++++++++++++ .../examples/AlertTypes/GetAlertType.json | 29 ++ .../examples/AlertTypes/GetAlertTypeList.json | 32 ++ .../examples/Alerts/GetAlert.json | 37 +++ .../examples/Alerts/GetAlertList.json | 46 +++ .../GetRecommendationType.json | 28 ++ .../GetRecommendationTypeList.json | 31 ++ .../Recommendations/GetRecommendation.json | 27 ++ .../GetRecommendationList.json | 34 ++ .../recommendationTypes.json | 247 ++++++++++++++ .../2021-02-01-preview/recommendations.json | 233 +++++++++++++ 12 files changed, 1340 insertions(+) create mode 100644 specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/alertTypes.json create mode 100644 specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/alerts.json create mode 100644 specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/AlertTypes/GetAlertType.json create mode 100644 specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/AlertTypes/GetAlertTypeList.json create mode 100644 specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Alerts/GetAlert.json create mode 100644 specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Alerts/GetAlertList.json create mode 100644 specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/RecommendationTypes/GetRecommendationType.json create mode 100644 specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/RecommendationTypes/GetRecommendationTypeList.json create mode 100644 specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Recommendations/GetRecommendation.json create mode 100644 specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Recommendations/GetRecommendationList.json create mode 100644 specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/recommendationTypes.json create mode 100644 specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/recommendations.json diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/alertTypes.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/alertTypes.json new file mode 100644 index 000000000000..a65ff7da1fb8 --- /dev/null +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/alertTypes.json @@ -0,0 +1,307 @@ +{ + "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/alertTypes": { + "get": { + "x-ms-examples": { + "Get IoT Alert Types": { + "$ref": "./examples/AlertTypes/GetAlertTypeList.json" + } + }, + "tags": [ + "IoT Security Alert Types" + ], + "description": "List IoT alert types", + "operationId": "AlertTypes_List", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/AlertTypeList" + } + }, + "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/alertTypes/{alertTypeName}": { + "get": { + "x-ms-examples": { + "Get IoT Alert Type": { + "$ref": "./examples/AlertTypes/GetAlertType.json" + } + }, + "tags": [ + "IoT Security Alert Types" + ], + "operationId": "AlertTypes_Get", + "description": "Get IoT alert type", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "in": "path", + "name": "alertTypeName", + "required": true, + "type": "string", + "description": "Name of the alert type" + } + ], + "responses": { + "200": { + "description": "IoT alert type", + "schema": { + "$ref": "#/definitions/AlertType" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + } + } + }, + "definitions": { + "AlertTypeList": { + "type": "object", + "description": "List of alert types", + "properties": { + "value": { + "type": "array", + "description": "List data", + "items": { + "$ref": "#/definitions/AlertType" + } + } + } + }, + "AlertType": { + "type": "object", + "description": "IoT alert type.", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "description": "Alert type properties", + "$ref": "#/definitions/AlertTypeProperties" + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ProxyResource" + } + ] + }, + "AlertTypeProperties": { + "type": "object", + "description": "IoT alert type information.", + "properties": { + "alertDisplayName": { + "readOnly": true, + "type": "string", + "example": "Privileged container detected", + "description": "The display name of the alert" + }, + "severity": { + "readOnly": true, + "type": "string", + "example": "Medium", + "description": "The severity of the alert", + "enum": [ + "Informational", + "Low", + "Medium", + "High" + ], + "x-ms-enum": { + "name": "alertSeverity", + "modelAsString": true, + "values": [ + { + "value": "Informational" + }, + { + "value": "Low" + }, + { + "value": "Medium" + }, + { + "value": "High" + } + ] + } + }, + "description": { + "readOnly": true, + "type": "string", + "description": "Description of the suspected vulnerability and meaning.", + "example": "Machine logs indicate that a privileged Docker container is running. A privileged container has full access to host resources. If compromised, a malicious actor can use the privileged container to gain access to the host machine." + }, + "providerName": { + "readOnly": true, + "type": "string", + "example": "IoTSecurity", + "description": "The name of the alert provider or internal partner" + }, + "productName": { + "readOnly": true, + "type": "string", + "example": "Azure Security Center for IoT", + "description": "The name of the product which published this alert" + }, + "productComponentName": { + "readOnly": true, + "type": "string", + "example": "IoT Hub", + "description": "The name of a component inside the product which generated the alert" + }, + "vendorName": { + "readOnly": true, + "type": "string", + "example": "Microsoft", + "description": "The name of the vendor that raise the alert" + }, + "intent": { + "readOnly": true, + "type": "string", + "example": "Exploitation,Execution", + "description": "Kill chain related intent behind the alert. Could contain multiple enum values (separated by commas)", + "enum": [ + "Unknown", + "PreAttack", + "InitialAccess", + "Persistence", + "PrivilegeEscalation", + "DefenseEvasion", + "CredentialAccess", + "Discovery", + "LateralMovement", + "Execution", + "Collection", + "Exfiltration", + "CommandAndControl", + "Impact", + "Probing", + "Exploitation" + ], + "x-ms-enum": { + "name": "alertIntent", + "modelAsString": true, + "values": [ + { + "value": "Unknown" + }, + { + "value": "PreAttack" + }, + { + "value": "InitialAccess" + }, + { + "value": "Persistence" + }, + { + "value": "PrivilegeEscalation" + }, + { + "value": "DefenseEvasion" + }, + { + "value": "CredentialAccess" + }, + { + "value": "Discovery" + }, + { + "value": "LateralMovement" + }, + { + "value": "Execution" + }, + { + "value": "Collection" + }, + { + "value": "Exfiltration" + }, + { + "value": "CommandAndControl" + }, + { + "value": "Impact" + }, + { + "value": "Probing" + }, + { + "value": "Exploitation" + } + ] + } + }, + "remediationSteps": { + "readOnly": true, + "description": "Manual action items to take to remediate the alert", + "type": "array", + "items": { + "type": "string", + "example": "If the container doesn't need to run in privileged mode, remove the privileges from the container." + } + } + } + } + } +} diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/alerts.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/alerts.json new file mode 100644 index 000000000000..a10c0ba398bb --- /dev/null +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/alerts.json @@ -0,0 +1,289 @@ +{ + "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": { + "/{scope}/providers/Microsoft.IoTSecurity/alerts": { + "get": { + "x-ms-examples": { + "List IoT Alerts": { + "$ref": "./examples/Alerts/GetAlertList.json" + } + }, + "tags": [ + "IoT Security Alerts" + ], + "description": "List IoT alerts", + "operationId": "IotAlerts_List", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/AlertScope" + }, + { + "in": "query", + "name": "startTimeUtc>", + "x-ms-client-name": "minStartTimeUtc", + "required": false, + "type": "string", + "description": "Filter by minimum startTimeUtc (ISO 8601 format)" + }, + { + "in": "query", + "name": "startTimeUtc<", + "x-ms-client-name": "maxStartTimeUtc", + "required": false, + "type": "string", + "description": "Filter by maximum startTimeUtc (ISO 8601 format)" + }, + { + "in": "query", + "name": "alertType", + "required": false, + "type": "string", + "description": "Filter by alert type" + }, + { + "in": "query", + "name": "deviceManagementType", + "required": false, + "type": "string", + "enum": [ + "Managed", + "Unmanaged" + ], + "description": "Get devices only from specific type, Managed or Unmanaged.", + "x-ms-enum": { + "name": "ManagementState", + "modelAsString": true + } + }, + { + "in": "query", + "name": "compromisedEntity", + "required": false, + "type": "string", + "description": "Filter by compromised device" + }, + { + "in": "query", + "name": "$limit", + "required": false, + "type": "integer", + "format": "int32", + "description": "Limit the number of items returned in a single page" + }, + { + "in": "query", + "name": "$skipToken", + "required": false, + "type": "string", + "description": "Skip token used for pagination" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/AlertListModel" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/{scope}/providers/Microsoft.IoTSecurity/alerts/{alertId}": { + "get": { + "x-ms-examples": { + "Get IoT Alert": { + "$ref": "./examples/Alerts/GetAlert.json" + } + }, + "tags": [ + "IoT Security Alerts" + ], + "operationId": "IotAlerts_Get", + "description": "Get IoT alert", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/AlertScope" + }, + { + "in": "path", + "name": "alertId", + "required": true, + "type": "string", + "description": "Id of the alert" + } + ], + "responses": { + "200": { + "description": "IoT alert", + "schema": { + "$ref": "#/definitions/AlertModel" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + } + } + }, + "definitions": { + "AlertListModel": { + "description": "List of IoT alerts", + "type": "object", + "properties": { + "value": { + "description": "List data", + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/AlertModel" + } + }, + "nextLink": { + "readOnly": true, + "type": "string", + "description": "When available, follow the URI to get the next page of data" + } + } + }, + "AlertModel": { + "type": "object", + "description": "IoT alert", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "description": "Alert properties", + "$ref": "#/definitions/AlertPropertiesModel" + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ProxyResource" + } + ] + }, + "AlertPropertiesModel": { + "type": "object", + "description": "IoT alert properties", + "properties": { + "systemAlertId": { + "description": "Holds the product canonical identifier of the alert within the scope of a product", + "readOnly": true, + "type": "string", + "example": "903e76ff-17eb-4bac-ac8a-2bc31ab68fd8" + }, + "compromisedEntity": { + "description": "Display name of the main entity being reported on", + "readOnly": true, + "type": "string", + "example": "device-1" + }, + "alertType": { + "description": "The type name of the alert", + "readOnly": true, + "type": "string", + "example": "IoT_PrivilegedContainer" + }, + "startTimeUtc": { + "description": "The impact start time of the alert (the time of the first event or activity included in the alert)", + "readOnly": true, + "type": "string", + "example": "2020-05-13T06:32:25Z" + }, + "endTimeUtc": { + "description": "The impact end time of the alert (the time of the last event or activity included in the alert)", + "readOnly": true, + "type": "string", + "example": "2020-05-13T06:32:25Z" + }, + "entities": { + "description": "A list of entities related to the alert", + "type": "array", + "items": { + "type": "object" + }, + "example": [ + { + "$id": "1", + "CommandLine": "docker run --privileged", + "Type": "process" + } + ] + }, + "extendedProperties": { + "type": "object", + "description": "A bag of fields which extends the alert information", + "example": { + "CommandLine": "docker run --privileged", + "User Name": "aUser", + "UserId": "", + "ParentProcessId": 1593, + "DeviceId": "device-1" + } + } + } + } + }, + "parameters": { + "AlertScope": { + "name": "scope", + "in": "path", + "required": true, + "type": "string", + "description": "Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub (i.e. /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName})", + "x-ms-parameter-location": "method", + "x-ms-skip-url-encoding": true + } + } +} diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/AlertTypes/GetAlertType.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/AlertTypes/GetAlertType.json new file mode 100644 index 000000000000..d88d4fd6d8f9 --- /dev/null +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/AlertTypes/GetAlertType.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "api-version": "2020-08-06-preview", + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "alertTypeName": "IoT_PrivilegedContainer" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.IoTSecurity/alertTypes/IoT_PrivilegedContainer", + "name": "IoT_PrivilegedContainer", + "type": "Microsoft.IoTSecurity/alertTypes", + "properties": { + "alertDisplayName": "Privileged container detected", + "severity": "Medium", + "description": "Machine logs indicate that a privileged Docker container is running. A privileged container has full access to host resources. If compromised, a malicious actor can use the privileged container to gain access to the host machine.", + "providerName": "IoTSecurity", + "remediationSteps": [ + "If the container doesn't need to run in privileged mode, remove the privileges from the container." + ], + "intent": "Exploitation,Execution", + "vendorName": "Microsoft", + "productName": "Azure Defender for IoT", + "productComponentName": "IoT Hub" + } + } + } + } +} diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/AlertTypes/GetAlertTypeList.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/AlertTypes/GetAlertTypeList.json new file mode 100644 index 000000000000..d9695aafdde9 --- /dev/null +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/AlertTypes/GetAlertTypeList.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2020-08-06-preview", + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.IoTSecurity/alertTypes", + "name": "IoT_PrivilegedContainer", + "type": "Microsoft.IoTSecurity/alertTypes", + "properties": { + "alertDisplayName": "Privileged container detected", + "severity": "Medium", + "description": "Machine logs indicate that a privileged Docker container is running. A privileged container has full access to host resources. If compromised, a malicious actor can use the privileged container to gain access to the host machine.", + "providerName": "IoTSecurity", + "remediationSteps": [ + "If the container doesn't need to run in privileged mode, remove the privileges from the container." + ], + "intent": "Exploitation,Execution", + "vendorName": "Microsoft", + "productName": "Azure Defender for IoT", + "productComponentName": "IoT Hub" + } + } + ] + } + } + } +} diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Alerts/GetAlert.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Alerts/GetAlert.json new file mode 100644 index 000000000000..ab339643eb7d --- /dev/null +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Alerts/GetAlert.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "api-version": "2020-08-06-preview", + "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myGroup/providers/Microsoft.Devices/IotHubs/myIotHub", + "alertId": "903e76ff-17eb-4bac-ac8a-2bc31ab68fd8" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/MyGroup/providers/Microsoft.Devices/iotHubs/myIotHub/providers/Microsoft.IoTSecurity/alerts/903e76ff-17eb-4bac-ac8a-2bc31ab68fd8", + "name": "903e76ff-17eb-4bac-ac8a-2bc31ab68fd8", + "type": "Microsoft.IoTSecurity/alerts", + "properties": { + "systemAlertId": "903e76ff-17eb-4bac-ac8a-2bc31ab68fd8", + "compromisedEntity": "device-1", + "alertType": "IoT_PrivilegedContainer", + "startTimeUtc": "2020-05-13T06:32:25Z", + "endTimeUtc": "2020-05-13T06:32:25Z", + "entities": [ + { + "$id": "1", + "CommandLine": "docker run --privileged", + "Type": "process" + } + ], + "extendedProperties": { + "CommandLine": "docker run --privileged", + "User Name": "aUser", + "UserId": "", + "ParentProcessId": 1593, + "DeviceId": "device-1" + } + } + } + } + } +} diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Alerts/GetAlertList.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Alerts/GetAlertList.json new file mode 100644 index 000000000000..0c8e11b67419 --- /dev/null +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Alerts/GetAlertList.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "api-version": "2020-08-06-preview", + "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myGroup/providers/Microsoft.Devices/IotHubs/myIotHub", + "alertType": "IoT_PrivilegedContainer", + "startTimeUtc>": "2020-05-12T06:32:25Z", + "startTimeUtc<": "2020-05-14T06:32:25Z", + "compromisedEntity": "device-1", + "$limit": 1 + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/MyGroup/providers/Microsoft.Devices/iotHubs/myIotHub/providers/Microsoft.IoTSecurity/alerts/903e76ff-17eb-4bac-ac8a-2bc31ab68fd8", + "name": "903e76ff-17eb-4bac-ac8a-2bc31ab68fd8", + "type": "Microsoft.IoTSecurity/alerts", + "properties": { + "systemAlertId": "903e76ff-17eb-4bac-ac8a-2bc31ab68fd8", + "compromisedEntity": "device-1", + "alertType": "IoT_PrivilegedContainer", + "startTimeUtc": "2020-05-13T06:32:25Z", + "endTimeUtc": "2020-05-13T06:32:25Z", + "entities": [ + { + "$id": "1", + "CommandLine": "docker run --privileged", + "Type": "process" + } + ], + "extendedProperties": { + "CommandLine": "docker run --privileged", + "User Name": "aUser", + "UserId": "", + "ParentProcessId": 1593, + "DeviceId": "device-1" + } + } + } + ], + "nextLink": "https://management.azure.com/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myGroup/providers/Microsoft.Devices/iotHubs/myIotHub/providers/Microsoft.IoTSecurity/alerts?api-version=2020-08-06-preview&alertType=IoT_PrivilegedContainer&startTimeUtc>=2020-05-12T06:32:25Z&startTimeUtc<=2020-05-14T06:32:25Z&compromisedEntity=device-1&$limit=1&$skipToken=903e76ff-17eb-4bac-ac8a-2bc31ab68fd8" + } + } + } +} diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/RecommendationTypes/GetRecommendationType.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/RecommendationTypes/GetRecommendationType.json new file mode 100644 index 000000000000..9e8fc7c1ffa3 --- /dev/null +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/RecommendationTypes/GetRecommendationType.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "api-version": "2020-08-06-preview", + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "recommendationTypeName": "IoT_VulnerableTLSCipherSuite" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.IoTSecurity/recommendationTypes/IoT_VulnerableTLSCipherSuite", + "name": "IoT_VulnerableTLSCipherSuite", + "type": "Microsoft.IoTSecurity/recommendationTypes", + "properties": { + "recommendationDisplayName": "TLS cipher suite upgrade needed", + "severity": "Medium", + "description": "Insecure TLS configurations detected. Immediate TLS cipher suite upgrade recommended.", + "remediationSteps": [ + "Upgrade your TLS cipher suite to a secure configuration. See the Guide to TLS Standards Compliance for more information." + ], + "vendorName": "Microsoft", + "control": "Communication between device and IoT Hub is not optimized", + "productName": "Azure Defender for IoT", + "productComponentName": "IoT Hub" + } + } + } + } +} diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/RecommendationTypes/GetRecommendationTypeList.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/RecommendationTypes/GetRecommendationTypeList.json new file mode 100644 index 000000000000..1350157dc000 --- /dev/null +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/RecommendationTypes/GetRecommendationTypeList.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "api-version": "2020-08-06-preview", + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.IoTSecurity/recommendationTypes/IoT_VulnerableTLSCipherSuite", + "name": "IoT_VulnerableTLSCipherSuite", + "type": "Microsoft.IoTSecurity/recommendationTypes", + "properties": { + "recommendationDisplayName": "TLS cipher suite upgrade needed", + "severity": "Medium", + "description": "Insecure TLS configurations detected. Immediate TLS cipher suite upgrade recommended.", + "remediationSteps": [ + "Upgrade your TLS cipher suite to a secure configuration. See the Guide to TLS Standards Compliance for more information." + ], + "vendorName": "Microsoft", + "control": "Communication between device and IoT Hub is not optimized", + "productName": "Azure Defender for IoT", + "productComponentName": "IoT Hub" + } + } + ] + } + } + } +} diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Recommendations/GetRecommendation.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Recommendations/GetRecommendation.json new file mode 100644 index 000000000000..4c12cfdae65b --- /dev/null +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Recommendations/GetRecommendation.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "api-version": "2020-08-06-preview", + "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myGroup/providers/Microsoft.Devices/IotHubs/myIotHub", + "iotRecommendationId": "903e76ff-17eb-4bac-ac8a-2bc31ab68fd8" + }, + "responses": { + "200": { + "body": { + "name": "IoT_Baseline|device-1", + "properties": { + "recommendationType": "IoT_Baseline", + "deviceId": "device-1", + "discoveredTimeUtc": "2020-05-13T06:32:25Z", + "recommendationAdditionalData": { + "SnapshotId": "48519d58-4e35-46cd-aed5-6251af95ed50", + "TotalFailedRules": "7", + "TotalRulesFailedDuoToError": "1", + "TotalInformationalFailedRules": "2", + "TotalCriticalFailedRules": "3", + "TotalWarningFailedRules": "1" + } + } + } + } + } +} diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Recommendations/GetRecommendationList.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Recommendations/GetRecommendationList.json new file mode 100644 index 000000000000..c23c01d95d52 --- /dev/null +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Recommendations/GetRecommendationList.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2020-08-06-preview", + "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myGroup/providers/Microsoft.Devices/IotHubs/myIotHub", + "recommendationType": "IoT_Baseline", + "deviceId": "device-1", + "$limit": 1 + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "IoT_Baseline|device-1", + "properties": { + "recommendationType": "IoT_Baseline", + "deviceId": "device-1", + "discoveredTimeUtc": "2020-05-13T06:32:25Z", + "recommendationAdditionalData": { + "SnapshotId": "48519d58-4e35-46cd-aed5-6251af95ed50", + "TotalFailedRules": "7", + "TotalRulesFailedDuoToError": "1", + "TotalInformationalFailedRules": "2", + "TotalCriticalFailedRules": "3", + "TotalWarningFailedRules": "1" + } + } + } + ], + "nextLink": "https://management.azure.com/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myGroup/providers/Microsoft.Devices/iotHubs/myIotHub/providers/Microsoft.IoTSecurity/recommendations?api-version=2020-08-06-preview&recommendationType=IoT_Baseline&deviceId=device-1&$limit=1&$skipToken=903e76ff-17eb-4bac-ac8a-2bc31ab68fd8" + } + } + } +} diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/recommendationTypes.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/recommendationTypes.json new file mode 100644 index 000000000000..905afbd526c9 --- /dev/null +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/recommendationTypes.json @@ -0,0 +1,247 @@ +{ + "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/recommendationTypes": { + "get": { + "x-ms-examples": { + "Get IoT Recommendation Types": { + "$ref": "./examples/RecommendationTypes/GetRecommendationTypeList.json" + } + }, + "tags": [ + "IoT Security Recommendation Types" + ], + "description": "List IoT recommendation types", + "operationId": "RecommendationTypes_List", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/RecommendationTypeList" + } + }, + "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/recommendationTypes/{recommendationTypeName}": { + "get": { + "x-ms-examples": { + "Get IoT Recommendation Type": { + "$ref": "./examples/RecommendationTypes/GetRecommendationType.json" + } + }, + "tags": [ + "IoT Security Recommendation Types" + ], + "operationId": "RecommendationTypes_Get", + "description": "Get IoT recommendation type", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "in": "path", + "name": "recommendationTypeName", + "required": true, + "type": "string", + "description": "Name of the recommendation type" + } + ], + "responses": { + "200": { + "description": "IoT recommendation type", + "schema": { + "$ref": "#/definitions/RecommendationType" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + } + } + }, + "definitions": { + "RecommendationTypeList": { + "type": "object", + "description": "List of recommendation types", + "properties": { + "value": { + "type": "array", + "description": "List data", + "items": { + "$ref": "#/definitions/RecommendationType" + } + } + } + }, + "RecommendationType": { + "type": "object", + "description": "IoT recommendation type.", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "description": "Recommendation type properties", + "$ref": "#/definitions/RecommendationTypeProperties" + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ProxyResource" + } + ] + }, + "RecommendationTypeProperties": { + "type": "object", + "description": "IoT recommendation type information.", + "properties": { + "recommendationDisplayName": { + "readOnly": true, + "type": "string", + "example": "TLS cipher suite upgrade needed", + "description": "The display name of the recommendation" + }, + "severity": { + "readOnly": true, + "type": "string", + "example": "Medium", + "description": "The severity of the recommendation", + "enum": [ + "Unknown", + "NotApplicable", + "Healthy", + "OffByPolicy", + "Low", + "Medium", + "High" + ], + "x-ms-enum": { + "name": "recommendationSeverity", + "modelAsString": true, + "values": [ + { + "value": "Unknown" + }, + { + "value": "NotApplicable" + }, + { + "value": "Healthy" + }, + { + "value": "OffByPolicy" + }, + { + "value": "Low" + }, + { + "value": "Medium" + }, + { + "value": "High" + } + ] + } + }, + "description": { + "readOnly": true, + "type": "string", + "description": "Description of the suspected vulnerability and meaning.", + "example": "Insecure TLS configurations detected. Immediate TLS cipher suite upgrade recommended." + }, + "productName": { + "readOnly": true, + "type": "string", + "example": "Azure Security Center for IoT", + "description": "The name of the product which published this recommendation" + }, + "productComponentName": { + "readOnly": true, + "type": "string", + "example": "IoT Hub", + "description": "The name of a component inside the product which generated the recommendation" + }, + "vendorName": { + "readOnly": true, + "type": "string", + "example": "Microsoft", + "description": "The name of the vendor that raised the recommendation" + }, + "control": { + "readOnly": true, + "type": "string", + "example": "Communication between device and IoT Hub is not optimized", + "description": "The name of the recommendation's control category " + }, + "remediationSteps": { + "readOnly": true, + "description": "Manual action items to take to resolve the recommendation", + "type": "array", + "items": { + "type": "string", + "example": "Upgrade your TLS cipher suite to a secure configuration. See the Guide to TLS Standards Compliance for more information." + } + }, + "dataSource": { + "readOnly": true, + "description": "The alert's data source", + "type": "string", + "example": "IoT Hub" + } + } + } + } +} diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/recommendations.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/recommendations.json new file mode 100644 index 000000000000..b6f2c57e8e6b --- /dev/null +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/recommendations.json @@ -0,0 +1,233 @@ +{ + "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": { + "/{scope}/providers/Microsoft.IoTSecurity/recommendations": { + "get": { + "x-ms-examples": { + "Get IoT Recommendations": { + "$ref": "./examples/Recommendations/GetRecommendationList.json" + } + }, + "tags": [ + "IoT Security Recommendations" + ], + "description": "List IoT recommendations", + "operationId": "IotRecommendations_List", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/RecommendationScope" + }, + { + "in": "query", + "name": "recommendationType", + "required": false, + "type": "string", + "description": "Filter by recommendation type" + }, + { + "in": "query", + "name": "deviceId", + "required": false, + "type": "string", + "description": "Filter by device id" + }, + { + "in": "query", + "name": "$limit", + "required": false, + "type": "integer", + "format": "int32", + "description": "Limit the number of items returned in a single page" + }, + { + "in": "query", + "name": "$skipToken", + "required": false, + "type": "string", + "description": "Skip token used for pagination" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/RecommendationListModel" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/{scope}/providers/Microsoft.IoTSecurity/recommendations/{recommendationId}": { + "get": { + "x-ms-examples": { + "Get IoT Recommendation": { + "$ref": "./examples/Recommendations/GetRecommendation.json" + } + }, + "tags": [ + "IoT Security Recommendations" + ], + "operationId": "IotRecommendations_Get", + "description": "Get IoT recommendation", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/RecommendationScope" + }, + { + "in": "path", + "name": "recommendationId", + "required": true, + "type": "string", + "description": "Id of the recommendation" + } + ], + "responses": { + "200": { + "description": "IoT recommendation", + "schema": { + "$ref": "#/definitions/RecommendationModel" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + } + } + }, + "definitions": { + "RecommendationListModel": { + "description": "List of IoT recommendations", + "type": "object", + "properties": { + "value": { + "description": "List data", + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/RecommendationModel" + } + }, + "nextLink": { + "readOnly": true, + "type": "string", + "description": "When available, follow the URI to get the next page of data" + } + } + }, + "RecommendationModel": { + "type": "object", + "description": "IoT recommendation", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "description": "Recommendation properties", + "$ref": "#/definitions/RecommendationPropertiesModel" + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ProxyResource" + } + ] + }, + "RecommendationPropertiesModel": { + "type": "object", + "description": "IoT recommendation properties", + "properties": { + "deviceId": { + "description": "Identifier of the device being reported on", + "readOnly": true, + "type": "string", + "example": "device-1" + }, + "recommendationType": { + "description": "The type name of the recommendation", + "readOnly": true, + "type": "string", + "example": "IoT_PrivilegedContainer" + }, + "discoveredTimeUtc": { + "description": "The discovery time of the recommendation", + "readOnly": true, + "type": "string", + "example": "2020-05-13T06:32:25Z" + }, + "recommendationAdditionalData": { + "type": "object", + "description": "A bag of fields which extends the recommendation information", + "example": { + "SnapshotId": "48519d58-4e35-46cd-aed5-6251af95ed50", + "TotalFailedRules": "7", + "TotalRulesFailedDuoToError": "1", + "TotalInformationalFailedRules": "2", + "TotalCriticalFailedRules": "3", + "TotalWarningFailedRules": "1" + } + } + } + } + }, + "parameters": { + "RecommendationScope": { + "name": "scope", + "in": "path", + "required": true, + "type": "string", + "description": "Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub (i.e. /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName})", + "x-ms-parameter-location": "method", + "x-ms-skip-url-encoding": true + } + } +} From 3c66b9fe986069e87af33590bc21f86b1ec21dce Mon Sep 17 00:00:00 2001 From: Orel Kayam Date: Sun, 30 May 2021 10:42:25 +0300 Subject: [PATCH 02/19] Add resources to markdown --- specification/iotsecurity/resource-manager/readme.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/specification/iotsecurity/resource-manager/readme.md b/specification/iotsecurity/resource-manager/readme.md index 2c31d6faad9b..f8e05beedfe7 100644 --- a/specification/iotsecurity/resource-manager/readme.md +++ b/specification/iotsecurity/resource-manager/readme.md @@ -67,6 +67,10 @@ input-file: - Microsoft.IoTSecurity/preview/2021-02-01-preview/locations.json - Microsoft.IoTSecurity/preview/2021-02-01-preview/deviceGroups.json - Microsoft.IoTSecurity/preview/2021-02-01-preview/devices.json +- Microsoft.IoTSecurity/preview/2021-02-01-preview/alerts.json +- Microsoft.IoTSecurity/preview/2021-02-01-preview/alertTypes.json +- Microsoft.IoTSecurity/preview/2021-02-01-preview/recommendations.json +- Microsoft.IoTSecurity/preview/2021-02-01-preview/recommendationTypes.json ``` --- From a9c2dcf3699626fad35d1abaaa399151ffba1c47 Mon Sep 17 00:00:00 2001 From: Orel Kayam Date: Sun, 30 May 2021 10:56:26 +0300 Subject: [PATCH 03/19] Modify routes --- .../preview/2021-02-01-preview/alerts.json | 40 ++++++++++++++----- .../examples/Alerts/GetAlert.json | 6 ++- .../examples/Alerts/GetAlertList.json | 8 ++-- .../Recommendations/GetRecommendation.json | 4 +- .../GetRecommendationList.json | 6 ++- .../2021-02-01-preview/recommendations.json | 40 ++++++++++++++----- 6 files changed, 78 insertions(+), 26 deletions(-) diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/alerts.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/alerts.json index a10c0ba398bb..ad4602b67284 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/alerts.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/alerts.json @@ -34,7 +34,7 @@ } }, "paths": { - "/{scope}/providers/Microsoft.IoTSecurity/alerts": { + "/subscriptions/{subscriptionId}/providers/Microsoft.IoTSecurity/locations/{iotDefenderLocation}/deviceGroups/{deviceGroupName}/alerts": { "get": { "x-ms-examples": { "List IoT Alerts": { @@ -51,7 +51,13 @@ "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "#/parameters/AlertScope" + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/1.0/types.json#/parameters/IotDefenderLocation" + }, + { + "$ref": "#/parameters/DeviceGroupName" }, { "in": "query", @@ -133,7 +139,7 @@ } } }, - "/{scope}/providers/Microsoft.IoTSecurity/alerts/{alertId}": { + "/subscriptions/{subscriptionId}/providers/Microsoft.IoTSecurity/locations/{iotDefenderLocation}/deviceGroups/{deviceGroupName}/alerts/{alertId}": { "get": { "x-ms-examples": { "Get IoT Alert": { @@ -150,7 +156,16 @@ "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "#/parameters/AlertScope" + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/1.0/types.json#/parameters/IotDefenderLocation" + }, + { + "$ref": "#/parameters/DeviceGroupName" + }, + { + "$ref": "#/parameters/AlertId" }, { "in": "path", @@ -276,14 +291,21 @@ } }, "parameters": { - "AlertScope": { - "name": "scope", + "DeviceGroupName": { + "name": "deviceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "Device group name", + "x-ms-parameter-location": "method" + }, + "AlertId": { + "name": "alertId", "in": "path", "required": true, + "description": "Alert Id", "type": "string", - "description": "Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub (i.e. /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName})", - "x-ms-parameter-location": "method", - "x-ms-skip-url-encoding": true + "x-ms-parameter-location": "method" } } } diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Alerts/GetAlert.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Alerts/GetAlert.json index ab339643eb7d..e1471eb8fa4e 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Alerts/GetAlert.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Alerts/GetAlert.json @@ -1,13 +1,15 @@ { "parameters": { "api-version": "2020-08-06-preview", - "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myGroup/providers/Microsoft.Devices/IotHubs/myIotHub", + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "iotDefenderLocation": "eastus", + "deviceGroupName": "default", "alertId": "903e76ff-17eb-4bac-ac8a-2bc31ab68fd8" }, "responses": { "200": { "body": { - "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/MyGroup/providers/Microsoft.Devices/iotHubs/myIotHub/providers/Microsoft.IoTSecurity/alerts/903e76ff-17eb-4bac-ac8a-2bc31ab68fd8", + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.IoTSecurity/locations/eastus/deviceGroups/default/alerts/903e76ff-17eb-4bac-ac8a-2bc31ab68fd8", "name": "903e76ff-17eb-4bac-ac8a-2bc31ab68fd8", "type": "Microsoft.IoTSecurity/alerts", "properties": { diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Alerts/GetAlertList.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Alerts/GetAlertList.json index 0c8e11b67419..4e34a8f44969 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Alerts/GetAlertList.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Alerts/GetAlertList.json @@ -1,7 +1,9 @@ { "parameters": { "api-version": "2020-08-06-preview", - "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myGroup/providers/Microsoft.Devices/IotHubs/myIotHub", + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "iotDefenderLocation": "eastus", + "deviceGroupName": "default", "alertType": "IoT_PrivilegedContainer", "startTimeUtc>": "2020-05-12T06:32:25Z", "startTimeUtc<": "2020-05-14T06:32:25Z", @@ -13,7 +15,7 @@ "body": { "value": [ { - "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/MyGroup/providers/Microsoft.Devices/iotHubs/myIotHub/providers/Microsoft.IoTSecurity/alerts/903e76ff-17eb-4bac-ac8a-2bc31ab68fd8", + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.IoTSecurity/locations/eastus/deviceGroups/default/alerts/903e76ff-17eb-4bac-ac8a-2bc31ab68fd8", "name": "903e76ff-17eb-4bac-ac8a-2bc31ab68fd8", "type": "Microsoft.IoTSecurity/alerts", "properties": { @@ -39,7 +41,7 @@ } } ], - "nextLink": "https://management.azure.com/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myGroup/providers/Microsoft.Devices/iotHubs/myIotHub/providers/Microsoft.IoTSecurity/alerts?api-version=2020-08-06-preview&alertType=IoT_PrivilegedContainer&startTimeUtc>=2020-05-12T06:32:25Z&startTimeUtc<=2020-05-14T06:32:25Z&compromisedEntity=device-1&$limit=1&$skipToken=903e76ff-17eb-4bac-ac8a-2bc31ab68fd8" + "nextLink": "https://management.azure.com/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.IoTSecurity/locations/eastus/deviceGroups/default/alerts?api-version=2020-08-06-preview&alertType=IoT_PrivilegedContainer&startTimeUtc>=2020-05-12T06:32:25Z&startTimeUtc<=2020-05-14T06:32:25Z&compromisedEntity=device-1&$limit=1&$skipToken=903e76ff-17eb-4bac-ac8a-2bc31ab68fd8" } } } diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Recommendations/GetRecommendation.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Recommendations/GetRecommendation.json index 4c12cfdae65b..21e35d250668 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Recommendations/GetRecommendation.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Recommendations/GetRecommendation.json @@ -1,7 +1,9 @@ { "parameters": { "api-version": "2020-08-06-preview", - "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myGroup/providers/Microsoft.Devices/IotHubs/myIotHub", + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "iotDefenderLocation": "eastus", + "deviceGroupName": "default", "iotRecommendationId": "903e76ff-17eb-4bac-ac8a-2bc31ab68fd8" }, "responses": { diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Recommendations/GetRecommendationList.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Recommendations/GetRecommendationList.json index c23c01d95d52..acc4b4e56700 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Recommendations/GetRecommendationList.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Recommendations/GetRecommendationList.json @@ -1,7 +1,9 @@ { "parameters": { "api-version": "2020-08-06-preview", - "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myGroup/providers/Microsoft.Devices/IotHubs/myIotHub", + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "iotDefenderLocation": "eastus", + "deviceGroupName": "default", "recommendationType": "IoT_Baseline", "deviceId": "device-1", "$limit": 1 @@ -27,7 +29,7 @@ } } ], - "nextLink": "https://management.azure.com/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myGroup/providers/Microsoft.Devices/iotHubs/myIotHub/providers/Microsoft.IoTSecurity/recommendations?api-version=2020-08-06-preview&recommendationType=IoT_Baseline&deviceId=device-1&$limit=1&$skipToken=903e76ff-17eb-4bac-ac8a-2bc31ab68fd8" + "nextLink": "https://management.azure.com/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.IoTSecurity/locations/eastus/deviceGroups/default/recommendations?api-version=2020-08-06-preview&recommendationType=IoT_Baseline&deviceId=device-1&$limit=1&$skipToken=903e76ff-17eb-4bac-ac8a-2bc31ab68fd8" } } } diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/recommendations.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/recommendations.json index b6f2c57e8e6b..b24093281d2b 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/recommendations.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/recommendations.json @@ -34,7 +34,7 @@ } }, "paths": { - "/{scope}/providers/Microsoft.IoTSecurity/recommendations": { + "/subscriptions/{subscriptionId}/providers/Microsoft.IoTSecurity/locations/{iotDefenderLocation}/deviceGroups/{deviceGroupName}/recommendations": { "get": { "x-ms-examples": { "Get IoT Recommendations": { @@ -51,7 +51,13 @@ "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "#/parameters/RecommendationScope" + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/1.0/types.json#/parameters/IotDefenderLocation" + }, + { + "$ref": "#/parameters/DeviceGroupName" }, { "in": "query", @@ -102,7 +108,7 @@ } } }, - "/{scope}/providers/Microsoft.IoTSecurity/recommendations/{recommendationId}": { + "/subscriptions/{subscriptionId}/providers/Microsoft.IoTSecurity/locations/{iotDefenderLocation}/deviceGroups/{deviceGroupName}/recommendations/{recommendationId}": { "get": { "x-ms-examples": { "Get IoT Recommendation": { @@ -119,7 +125,16 @@ "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "#/parameters/RecommendationScope" + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/1.0/types.json#/parameters/IotDefenderLocation" + }, + { + "$ref": "#/parameters/DeviceGroupName" + }, + { + "$ref": "#/parameters/RecommendationId" }, { "in": "path", @@ -220,14 +235,21 @@ } }, "parameters": { - "RecommendationScope": { - "name": "scope", + "DeviceGroupName": { + "name": "deviceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "Device group name", + "x-ms-parameter-location": "method" + }, + "RecommendationId": { + "name": "recommendationId", "in": "path", "required": true, + "description": "Recommendation Id", "type": "string", - "description": "Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub (i.e. /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName})", - "x-ms-parameter-location": "method", - "x-ms-skip-url-encoding": true + "x-ms-parameter-location": "method" } } } From 4952a976d4d4771c37a0a6f4b2c11c1644e65229 Mon Sep 17 00:00:00 2001 From: Orel Kayam Date: Sun, 30 May 2021 11:23:44 +0300 Subject: [PATCH 04/19] Add systemData --- .../preview/2021-02-01-preview/alerts.json | 13 ++++++------- .../examples/Alerts/GetAlert.json | 8 ++++++++ .../examples/Recommendations/GetRecommendation.json | 8 ++++++++ .../preview/2021-02-01-preview/recommendations.json | 13 ++++++------- 4 files changed, 28 insertions(+), 14 deletions(-) diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/alerts.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/alerts.json index ad4602b67284..e9c660aa6235 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/alerts.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/alerts.json @@ -166,13 +166,6 @@ }, { "$ref": "#/parameters/AlertId" - }, - { - "in": "path", - "name": "alertId", - "required": true, - "type": "string", - "description": "Id of the alert" } ], "responses": { @@ -220,6 +213,12 @@ "x-ms-client-flatten": true, "description": "Alert properties", "$ref": "#/definitions/AlertPropertiesModel" + }, + "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": [ diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Alerts/GetAlert.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Alerts/GetAlert.json index e1471eb8fa4e..ec3995c42502 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Alerts/GetAlert.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Alerts/GetAlert.json @@ -32,6 +32,14 @@ "ParentProcessId": 1593, "DeviceId": "device-1" } + }, + "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/Recommendations/GetRecommendation.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Recommendations/GetRecommendation.json index 21e35d250668..df2982faa168 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Recommendations/GetRecommendation.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Recommendations/GetRecommendation.json @@ -22,6 +22,14 @@ "TotalCriticalFailedRules": "3", "TotalWarningFailedRules": "1" } + }, + "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/recommendations.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/recommendations.json index b24093281d2b..81706762c73f 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/recommendations.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/recommendations.json @@ -135,13 +135,6 @@ }, { "$ref": "#/parameters/RecommendationId" - }, - { - "in": "path", - "name": "recommendationId", - "required": true, - "type": "string", - "description": "Id of the recommendation" } ], "responses": { @@ -189,6 +182,12 @@ "x-ms-client-flatten": true, "description": "Recommendation properties", "$ref": "#/definitions/RecommendationPropertiesModel" + }, + "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": [ From 0ba5be24109e4e775c328bd90d287abc8483e241 Mon Sep 17 00:00:00 2001 From: Orel Kayam Date: Sun, 30 May 2021 11:26:55 +0300 Subject: [PATCH 05/19] Add systemData to defenderSettings --- .../preview/2021-02-01-preview/defenderSettings.json | 6 ++++++ .../2021-02-01-preview/examples/DefenderSettings/Get.json | 8 ++++++++ .../examples/DefenderSettings/List.json | 8 ++++++++ 3 files changed, 22 insertions(+) diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/defenderSettings.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/defenderSettings.json index 44c03aeed500..18525998d02e 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/defenderSettings.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/defenderSettings.json @@ -283,6 +283,12 @@ "x-ms-client-flatten": true, "description": "IoT Defender settings properties", "$ref": "#/definitions/DefenderSettingsProperties" + }, + "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": [ diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/DefenderSettings/Get.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/DefenderSettings/Get.json index 1ba4a1396f7c..ff2e4b0e9a41 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/DefenderSettings/Get.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/DefenderSettings/Get.json @@ -15,6 +15,14 @@ "/subscriptions/c4930e90-cd72-4aa5-93e9-2d081d129569/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace1" ], "onboardingKind": "Default" + }, + "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/DefenderSettings/List.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/DefenderSettings/List.json index 99e14fb07340..a418ae4a5763 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/DefenderSettings/List.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/DefenderSettings/List.json @@ -17,6 +17,14 @@ "/subscriptions/c4930e90-cd72-4aa5-93e9-2d081d129569/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace1" ], "onboardingKind": "Default" + }, + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2020-04-27T21:53:29.0928001Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-04-27T21:53:29.0928001Z" } } ] From 2ee8ce0b3b2c03f430df8ea3343b25942b3b3b5b Mon Sep 17 00:00:00 2001 From: Orel Kayam Date: Sun, 30 May 2021 11:32:51 +0300 Subject: [PATCH 06/19] Add missing parameter --- .../examples/Recommendations/GetRecommendation.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Recommendations/GetRecommendation.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Recommendations/GetRecommendation.json index df2982faa168..680b0aa05424 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Recommendations/GetRecommendation.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Recommendations/GetRecommendation.json @@ -4,7 +4,7 @@ "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", "iotDefenderLocation": "eastus", "deviceGroupName": "default", - "iotRecommendationId": "903e76ff-17eb-4bac-ac8a-2bc31ab68fd8" + "recommendationId": "903e76ff-17eb-4bac-ac8a-2bc31ab68fd8" }, "responses": { "200": { From 6307a61ea4e5c9cf0d88d2a254263312ba8f988c Mon Sep 17 00:00:00 2001 From: Orel Kayam Date: Sun, 30 May 2021 11:38:16 +0300 Subject: [PATCH 07/19] Add more systemData --- .../preview/2021-02-01-preview/alertTypes.json | 6 ++++++ .../examples/AlertTypes/GetAlertType.json | 8 ++++++++ .../examples/AlertTypes/GetAlertTypeList.json | 8 ++++++++ .../RecommendationTypes/GetRecommendationType.json | 8 ++++++++ .../RecommendationTypes/GetRecommendationTypeList.json | 8 ++++++++ .../preview/2021-02-01-preview/recommendationTypes.json | 6 ++++++ 6 files changed, 44 insertions(+) diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/alertTypes.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/alertTypes.json index a65ff7da1fb8..8e8548286944 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/alertTypes.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/alertTypes.json @@ -136,6 +136,12 @@ "x-ms-client-flatten": true, "description": "Alert type properties", "$ref": "#/definitions/AlertTypeProperties" + }, + "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": [ diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/AlertTypes/GetAlertType.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/AlertTypes/GetAlertType.json index d88d4fd6d8f9..98d04c3e383c 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/AlertTypes/GetAlertType.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/AlertTypes/GetAlertType.json @@ -22,6 +22,14 @@ "vendorName": "Microsoft", "productName": "Azure Defender for IoT", "productComponentName": "IoT Hub" + }, + "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/AlertTypes/GetAlertTypeList.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/AlertTypes/GetAlertTypeList.json index d9695aafdde9..e29bd585b3a0 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/AlertTypes/GetAlertTypeList.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/AlertTypes/GetAlertTypeList.json @@ -23,6 +23,14 @@ "vendorName": "Microsoft", "productName": "Azure Defender for IoT", "productComponentName": "IoT Hub" + }, + "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/RecommendationTypes/GetRecommendationType.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/RecommendationTypes/GetRecommendationType.json index 9e8fc7c1ffa3..87e310f70619 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/RecommendationTypes/GetRecommendationType.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/RecommendationTypes/GetRecommendationType.json @@ -21,6 +21,14 @@ "control": "Communication between device and IoT Hub is not optimized", "productName": "Azure Defender for IoT", "productComponentName": "IoT Hub" + }, + "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/RecommendationTypes/GetRecommendationTypeList.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/RecommendationTypes/GetRecommendationTypeList.json index 1350157dc000..05d2d20994d9 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/RecommendationTypes/GetRecommendationTypeList.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/RecommendationTypes/GetRecommendationTypeList.json @@ -22,6 +22,14 @@ "control": "Communication between device and IoT Hub is not optimized", "productName": "Azure Defender for IoT", "productComponentName": "IoT Hub" + }, + "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/recommendationTypes.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/recommendationTypes.json index 905afbd526c9..85676460bbde 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/recommendationTypes.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/recommendationTypes.json @@ -136,6 +136,12 @@ "x-ms-client-flatten": true, "description": "Recommendation type properties", "$ref": "#/definitions/RecommendationTypeProperties" + }, + "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": [ From 3b5d8f729c8aa718f72e40ba5afa9f1ac133f53f Mon Sep 17 00:00:00 2001 From: Orel Kayam Date: Sun, 30 May 2021 11:45:29 +0300 Subject: [PATCH 08/19] Fix example --- .../2021-02-01-preview/examples/Alerts/GetAlertList.json | 8 ++++++++ .../examples/Recommendations/GetRecommendationList.json | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Alerts/GetAlertList.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Alerts/GetAlertList.json index 4e34a8f44969..78240dc190ea 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Alerts/GetAlertList.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Alerts/GetAlertList.json @@ -38,6 +38,14 @@ "ParentProcessId": 1593, "DeviceId": "device-1" } + }, + "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/Recommendations/GetRecommendationList.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Recommendations/GetRecommendationList.json index acc4b4e56700..655cb7b48037 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Recommendations/GetRecommendationList.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Recommendations/GetRecommendationList.json @@ -26,6 +26,14 @@ "TotalCriticalFailedRules": "3", "TotalWarningFailedRules": "1" } + }, + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2020-04-27T21:53:29.0928001Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-04-27T21:53:29.0928001Z" } } ], From 5ba9009e03e58f10fdf6535b7320feedf9fab8e3 Mon Sep 17 00:00:00 2001 From: Orel Kayam Date: Sun, 30 May 2021 12:03:33 +0300 Subject: [PATCH 09/19] Add new API version --- .../alertTypes.json | 2 +- .../alerts.json | 2 +- .../examples/AlertTypes/GetAlertType.json | 0 .../examples/AlertTypes/GetAlertTypeList.json | 0 .../examples/Alerts/GetAlert.json | 0 .../examples/Alerts/GetAlertList.json | 0 .../GetRecommendationType.json | 0 .../GetRecommendationTypeList.json | 0 .../Recommendations/GetRecommendation.json | 0 .../GetRecommendationList.json | 0 .../recommendationTypes.json | 2 +- .../recommendations.json | 2 +- .../iotsecurity/resource-manager/readme.md | 19 +++++++++++++++++++ 13 files changed, 23 insertions(+), 4 deletions(-) rename specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/{2021-02-01-preview => 2021-07-01-preview}/alertTypes.json (99%) rename specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/{2021-02-01-preview => 2021-07-01-preview}/alerts.json (99%) rename specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/{2021-02-01-preview => 2021-07-01-preview}/examples/AlertTypes/GetAlertType.json (100%) rename specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/{2021-02-01-preview => 2021-07-01-preview}/examples/AlertTypes/GetAlertTypeList.json (100%) rename specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/{2021-02-01-preview => 2021-07-01-preview}/examples/Alerts/GetAlert.json (100%) rename specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/{2021-02-01-preview => 2021-07-01-preview}/examples/Alerts/GetAlertList.json (100%) rename specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/{2021-02-01-preview => 2021-07-01-preview}/examples/RecommendationTypes/GetRecommendationType.json (100%) rename specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/{2021-02-01-preview => 2021-07-01-preview}/examples/RecommendationTypes/GetRecommendationTypeList.json (100%) rename specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/{2021-02-01-preview => 2021-07-01-preview}/examples/Recommendations/GetRecommendation.json (100%) rename specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/{2021-02-01-preview => 2021-07-01-preview}/examples/Recommendations/GetRecommendationList.json (100%) rename specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/{2021-02-01-preview => 2021-07-01-preview}/recommendationTypes.json (99%) rename specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/{2021-02-01-preview => 2021-07-01-preview}/recommendations.json (99%) diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/alertTypes.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/alertTypes.json similarity index 99% rename from specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/alertTypes.json rename to specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/alertTypes.json index 8e8548286944..1b767d3ecda1 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/alertTypes.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/alertTypes.json @@ -3,7 +3,7 @@ "info": { "title": "Azure Defender for IoT", "description": "API spec for Microsoft.IoTSecurity (Azure Defender for IoT) resource provider", - "version": "2021-02-01-preview" + "version": "2021-07-01-preview" }, "host": "management.azure.com", "schemes": [ diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/alerts.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/alerts.json similarity index 99% rename from specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/alerts.json rename to specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/alerts.json index e9c660aa6235..afe27ee77f83 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/alerts.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/alerts.json @@ -3,7 +3,7 @@ "info": { "title": "Azure Defender for IoT", "description": "API spec for Microsoft.IoTSecurity (Azure Defender for IoT) resource provider", - "version": "2021-02-01-preview" + "version": "2021-07-01-preview" }, "host": "management.azure.com", "schemes": [ diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/AlertTypes/GetAlertType.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/AlertTypes/GetAlertType.json similarity index 100% rename from specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/AlertTypes/GetAlertType.json rename to specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/AlertTypes/GetAlertType.json diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/AlertTypes/GetAlertTypeList.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/AlertTypes/GetAlertTypeList.json similarity index 100% rename from specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/AlertTypes/GetAlertTypeList.json rename to specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/AlertTypes/GetAlertTypeList.json diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Alerts/GetAlert.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/GetAlert.json similarity index 100% rename from specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Alerts/GetAlert.json rename to specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/GetAlert.json diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Alerts/GetAlertList.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/GetAlertList.json similarity index 100% rename from specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Alerts/GetAlertList.json rename to specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/GetAlertList.json diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/RecommendationTypes/GetRecommendationType.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/RecommendationTypes/GetRecommendationType.json similarity index 100% rename from specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/RecommendationTypes/GetRecommendationType.json rename to specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/RecommendationTypes/GetRecommendationType.json diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/RecommendationTypes/GetRecommendationTypeList.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/RecommendationTypes/GetRecommendationTypeList.json similarity index 100% rename from specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/RecommendationTypes/GetRecommendationTypeList.json rename to specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/RecommendationTypes/GetRecommendationTypeList.json diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Recommendations/GetRecommendation.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Recommendations/GetRecommendation.json similarity index 100% rename from specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Recommendations/GetRecommendation.json rename to specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Recommendations/GetRecommendation.json diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Recommendations/GetRecommendationList.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Recommendations/GetRecommendationList.json similarity index 100% rename from specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/Recommendations/GetRecommendationList.json rename to specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Recommendations/GetRecommendationList.json diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/recommendationTypes.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/recommendationTypes.json similarity index 99% rename from specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/recommendationTypes.json rename to specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/recommendationTypes.json index 85676460bbde..b5bf14327085 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/recommendationTypes.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/recommendationTypes.json @@ -3,7 +3,7 @@ "info": { "title": "Azure Defender for IoT", "description": "API spec for Microsoft.IoTSecurity (Azure Defender for IoT) resource provider", - "version": "2021-02-01-preview" + "version": "2021-07-01-preview" }, "host": "management.azure.com", "schemes": [ diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/recommendations.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/recommendations.json similarity index 99% rename from specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/recommendations.json rename to specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/recommendations.json index 81706762c73f..75d7eac7e8ca 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/recommendations.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/recommendations.json @@ -3,7 +3,7 @@ "info": { "title": "Azure Defender for IoT", "description": "API spec for Microsoft.IoTSecurity (Azure Defender for IoT) resource provider", - "version": "2021-02-01-preview" + "version": "2021-07-01-preview" }, "host": "management.azure.com", "schemes": [ diff --git a/specification/iotsecurity/resource-manager/readme.md b/specification/iotsecurity/resource-manager/readme.md index f8e05beedfe7..a24b11b498d7 100644 --- a/specification/iotsecurity/resource-manager/readme.md +++ b/specification/iotsecurity/resource-manager/readme.md @@ -73,6 +73,25 @@ input-file: - Microsoft.IoTSecurity/preview/2021-02-01-preview/recommendationTypes.json ``` +``` yaml +title: IoTSecurity +description: API spec for Microsoft.IoTSecurity (Azure Defender for IoT) resource provider +openapi-type: arm +tag: 2021-07-01-preview +``` + +### Tag: 2021-07-01-preview + +These settings apply only when `--tag=2021-07-01-preview` is specified on the command line. + +``` yaml $(tag) == '2021-07-01-preview' +input-file: +- Microsoft.IoTSecurity/preview/2021-07-01-preview/alerts.json +- Microsoft.IoTSecurity/preview/2021-07-01-preview/alertTypes.json +- Microsoft.IoTSecurity/preview/2021-07-01-preview/recommendations.json +- Microsoft.IoTSecurity/preview/2021-07-01-preview/recommendationTypes.json +``` + --- # Code Generation From 1c4b533120a10dac013a57469b37d481e7d90848 Mon Sep 17 00:00:00 2001 From: Orel Kayam Date: Sun, 30 May 2021 12:04:21 +0300 Subject: [PATCH 10/19] Remove redundant change --- .../preview/2021-02-01-preview/defenderSettings.json | 6 ------ .../2021-02-01-preview/examples/DefenderSettings/Get.json | 8 -------- .../examples/DefenderSettings/List.json | 8 -------- 3 files changed, 22 deletions(-) diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/defenderSettings.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/defenderSettings.json index 18525998d02e..44c03aeed500 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/defenderSettings.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/defenderSettings.json @@ -283,12 +283,6 @@ "x-ms-client-flatten": true, "description": "IoT Defender settings properties", "$ref": "#/definitions/DefenderSettingsProperties" - }, - "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": [ diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/DefenderSettings/Get.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/DefenderSettings/Get.json index ff2e4b0e9a41..1ba4a1396f7c 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/DefenderSettings/Get.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/DefenderSettings/Get.json @@ -15,14 +15,6 @@ "/subscriptions/c4930e90-cd72-4aa5-93e9-2d081d129569/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace1" ], "onboardingKind": "Default" - }, - "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/DefenderSettings/List.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/DefenderSettings/List.json index a418ae4a5763..99e14fb07340 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/DefenderSettings/List.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/DefenderSettings/List.json @@ -17,14 +17,6 @@ "/subscriptions/c4930e90-cd72-4aa5-93e9-2d081d129569/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace1" ], "onboardingKind": "Default" - }, - "systemData": { - "createdBy": "string", - "createdByType": "User", - "createdAt": "2020-04-27T21:53:29.0928001Z", - "lastModifiedBy": "string", - "lastModifiedByType": "User", - "lastModifiedAt": "2020-04-27T21:53:29.0928001Z" } } ] From 08e8bd4c4ea30d4acfdb1bac591d23b597c2c1d0 Mon Sep 17 00:00:00 2001 From: Orel Kayam Date: Sun, 30 May 2021 12:06:42 +0300 Subject: [PATCH 11/19] update markdown --- specification/iotsecurity/resource-manager/readme.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/specification/iotsecurity/resource-manager/readme.md b/specification/iotsecurity/resource-manager/readme.md index a24b11b498d7..52e96327ede4 100644 --- a/specification/iotsecurity/resource-manager/readme.md +++ b/specification/iotsecurity/resource-manager/readme.md @@ -67,10 +67,6 @@ input-file: - Microsoft.IoTSecurity/preview/2021-02-01-preview/locations.json - Microsoft.IoTSecurity/preview/2021-02-01-preview/deviceGroups.json - Microsoft.IoTSecurity/preview/2021-02-01-preview/devices.json -- Microsoft.IoTSecurity/preview/2021-02-01-preview/alerts.json -- Microsoft.IoTSecurity/preview/2021-02-01-preview/alertTypes.json -- Microsoft.IoTSecurity/preview/2021-02-01-preview/recommendations.json -- Microsoft.IoTSecurity/preview/2021-02-01-preview/recommendationTypes.json ``` ``` yaml From 7d7b8c1e22a70b6c9b109eeb8ef18bb5eecd4b30 Mon Sep 17 00:00:00 2001 From: Orel Kayam Date: Sun, 30 May 2021 12:20:18 +0300 Subject: [PATCH 12/19] Add operations to new API version --- specification/iotsecurity/resource-manager/readme.md | 1 + 1 file changed, 1 insertion(+) diff --git a/specification/iotsecurity/resource-manager/readme.md b/specification/iotsecurity/resource-manager/readme.md index 52e96327ede4..a90a0ee7699f 100644 --- a/specification/iotsecurity/resource-manager/readme.md +++ b/specification/iotsecurity/resource-manager/readme.md @@ -82,6 +82,7 @@ These settings apply only when `--tag=2021-07-01-preview` is specified on the co ``` yaml $(tag) == '2021-07-01-preview' input-file: +- Microsoft.IoTSecurity/preview/2021-02-01-preview/operations.json - Microsoft.IoTSecurity/preview/2021-07-01-preview/alerts.json - Microsoft.IoTSecurity/preview/2021-07-01-preview/alertTypes.json - Microsoft.IoTSecurity/preview/2021-07-01-preview/recommendations.json From 943ef5383819cacfd4179e1e432ec446b3f9c2f1 Mon Sep 17 00:00:00 2001 From: Orel Kayam Date: Mon, 31 May 2021 15:19:28 +0300 Subject: [PATCH 13/19] Update list filters --- .../preview/2021-07-01-preview/alerts.json | 55 +------------------ .../examples/Alerts/GetAlertList.json | 4 -- .../GetRecommendationList.json | 2 - .../2021-07-01-preview/recommendations.json | 26 +-------- 4 files changed, 3 insertions(+), 84 deletions(-) diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/alerts.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/alerts.json index afe27ee77f83..8a774ece94c8 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/alerts.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/alerts.json @@ -59,59 +59,6 @@ { "$ref": "#/parameters/DeviceGroupName" }, - { - "in": "query", - "name": "startTimeUtc>", - "x-ms-client-name": "minStartTimeUtc", - "required": false, - "type": "string", - "description": "Filter by minimum startTimeUtc (ISO 8601 format)" - }, - { - "in": "query", - "name": "startTimeUtc<", - "x-ms-client-name": "maxStartTimeUtc", - "required": false, - "type": "string", - "description": "Filter by maximum startTimeUtc (ISO 8601 format)" - }, - { - "in": "query", - "name": "alertType", - "required": false, - "type": "string", - "description": "Filter by alert type" - }, - { - "in": "query", - "name": "deviceManagementType", - "required": false, - "type": "string", - "enum": [ - "Managed", - "Unmanaged" - ], - "description": "Get devices only from specific type, Managed or Unmanaged.", - "x-ms-enum": { - "name": "ManagementState", - "modelAsString": true - } - }, - { - "in": "query", - "name": "compromisedEntity", - "required": false, - "type": "string", - "description": "Filter by compromised device" - }, - { - "in": "query", - "name": "$limit", - "required": false, - "type": "integer", - "format": "int32", - "description": "Limit the number of items returned in a single page" - }, { "in": "query", "name": "$skipToken", @@ -237,7 +184,7 @@ "type": "string", "example": "903e76ff-17eb-4bac-ac8a-2bc31ab68fd8" }, - "compromisedEntity": { + "deviceResourceId": { "description": "Display name of the main entity being reported on", "readOnly": true, "type": "string", diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/GetAlertList.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/GetAlertList.json index 78240dc190ea..8a2914035fe0 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/GetAlertList.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/GetAlertList.json @@ -4,10 +4,6 @@ "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", "iotDefenderLocation": "eastus", "deviceGroupName": "default", - "alertType": "IoT_PrivilegedContainer", - "startTimeUtc>": "2020-05-12T06:32:25Z", - "startTimeUtc<": "2020-05-14T06:32:25Z", - "compromisedEntity": "device-1", "$limit": 1 }, "responses": { diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Recommendations/GetRecommendationList.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Recommendations/GetRecommendationList.json index 655cb7b48037..194e7ff485ed 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Recommendations/GetRecommendationList.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Recommendations/GetRecommendationList.json @@ -4,8 +4,6 @@ "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", "iotDefenderLocation": "eastus", "deviceGroupName": "default", - "recommendationType": "IoT_Baseline", - "deviceId": "device-1", "$limit": 1 }, "responses": { diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/recommendations.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/recommendations.json index 75d7eac7e8ca..654455ab02e8 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/recommendations.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/recommendations.json @@ -59,28 +59,6 @@ { "$ref": "#/parameters/DeviceGroupName" }, - { - "in": "query", - "name": "recommendationType", - "required": false, - "type": "string", - "description": "Filter by recommendation type" - }, - { - "in": "query", - "name": "deviceId", - "required": false, - "type": "string", - "description": "Filter by device id" - }, - { - "in": "query", - "name": "$limit", - "required": false, - "type": "integer", - "format": "int32", - "description": "Limit the number of items returned in a single page" - }, { "in": "query", "name": "$skipToken", @@ -200,8 +178,8 @@ "type": "object", "description": "IoT recommendation properties", "properties": { - "deviceId": { - "description": "Identifier of the device being reported on", + "deviceResourceId": { + "description": "Azure Resource Identifier of the device being reported on", "readOnly": true, "type": "string", "example": "device-1" From c99f5a6067e30c2b2f16af1406428bc7ae567b4a Mon Sep 17 00:00:00 2001 From: Orel Kayam Date: Mon, 31 May 2021 15:20:29 +0300 Subject: [PATCH 14/19] update description --- .../preview/2021-07-01-preview/alerts.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/alerts.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/alerts.json index 8a774ece94c8..ce5fc1accf33 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/alerts.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/alerts.json @@ -185,7 +185,7 @@ "example": "903e76ff-17eb-4bac-ac8a-2bc31ab68fd8" }, "deviceResourceId": { - "description": "Display name of the main entity being reported on", + "description": "Display name of the device entity being reported on", "readOnly": true, "type": "string", "example": "device-1" From 44be757089413b9095090ead15c2445fb6f9077a Mon Sep 17 00:00:00 2001 From: Orel Kayam Date: Mon, 31 May 2021 17:26:21 +0300 Subject: [PATCH 15/19] update examples --- .../examples/AlertTypes/GetAlertType.json | 2 +- .../examples/AlertTypes/GetAlertTypeList.json | 2 +- .../2021-07-01-preview/examples/Alerts/GetAlert.json | 2 +- .../2021-07-01-preview/examples/Alerts/GetAlertList.json | 7 +++---- .../RecommendationTypes/GetRecommendationType.json | 2 +- .../RecommendationTypes/GetRecommendationTypeList.json | 2 +- .../examples/Recommendations/GetRecommendation.json | 2 +- .../examples/Recommendations/GetRecommendationList.json | 7 +++---- 8 files changed, 12 insertions(+), 14 deletions(-) diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/AlertTypes/GetAlertType.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/AlertTypes/GetAlertType.json index 98d04c3e383c..847067ecf311 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/AlertTypes/GetAlertType.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/AlertTypes/GetAlertType.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2020-08-06-preview", + "api-version": "2021-07-01-preview", "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", "alertTypeName": "IoT_PrivilegedContainer" }, diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/AlertTypes/GetAlertTypeList.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/AlertTypes/GetAlertTypeList.json index e29bd585b3a0..fc74b6951499 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/AlertTypes/GetAlertTypeList.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/AlertTypes/GetAlertTypeList.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2020-08-06-preview", + "api-version": "2021-07-01-preview", "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23" }, "responses": { diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/GetAlert.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/GetAlert.json index ec3995c42502..ae0cafa20795 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/GetAlert.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/GetAlert.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2020-08-06-preview", + "api-version": "2021-07-01-preview", "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", "iotDefenderLocation": "eastus", "deviceGroupName": "default", diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/GetAlertList.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/GetAlertList.json index 8a2914035fe0..c88f7341bec2 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/GetAlertList.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/GetAlertList.json @@ -1,10 +1,9 @@ { "parameters": { - "api-version": "2020-08-06-preview", + "api-version": "2021-07-01-preview", "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", "iotDefenderLocation": "eastus", - "deviceGroupName": "default", - "$limit": 1 + "deviceGroupName": "default" }, "responses": { "200": { @@ -45,7 +44,7 @@ } } ], - "nextLink": "https://management.azure.com/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.IoTSecurity/locations/eastus/deviceGroups/default/alerts?api-version=2020-08-06-preview&alertType=IoT_PrivilegedContainer&startTimeUtc>=2020-05-12T06:32:25Z&startTimeUtc<=2020-05-14T06:32:25Z&compromisedEntity=device-1&$limit=1&$skipToken=903e76ff-17eb-4bac-ac8a-2bc31ab68fd8" + "nextLink": "https://management.azure.com/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.IoTSecurity/locations/eastus/deviceGroups/default/alerts?api-version=2021-07-01-preview&$skipToken=903e76ff-17eb-4bac-ac8a-2bc31ab68fd8" } } } diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/RecommendationTypes/GetRecommendationType.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/RecommendationTypes/GetRecommendationType.json index 87e310f70619..36f268aefd8f 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/RecommendationTypes/GetRecommendationType.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/RecommendationTypes/GetRecommendationType.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2020-08-06-preview", + "api-version": "2021-07-01-preview", "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", "recommendationTypeName": "IoT_VulnerableTLSCipherSuite" }, diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/RecommendationTypes/GetRecommendationTypeList.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/RecommendationTypes/GetRecommendationTypeList.json index 05d2d20994d9..271adf3f4c37 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/RecommendationTypes/GetRecommendationTypeList.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/RecommendationTypes/GetRecommendationTypeList.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2020-08-06-preview", + "api-version": "2021-07-01-preview", "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23" }, "responses": { diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Recommendations/GetRecommendation.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Recommendations/GetRecommendation.json index 680b0aa05424..5a43724e36e5 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Recommendations/GetRecommendation.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Recommendations/GetRecommendation.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2020-08-06-preview", + "api-version": "2021-07-01-preview", "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", "iotDefenderLocation": "eastus", "deviceGroupName": "default", diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Recommendations/GetRecommendationList.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Recommendations/GetRecommendationList.json index 194e7ff485ed..65ebb4a1b968 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Recommendations/GetRecommendationList.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Recommendations/GetRecommendationList.json @@ -1,10 +1,9 @@ { "parameters": { - "api-version": "2020-08-06-preview", + "api-version": "2021-07-01-preview", "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", "iotDefenderLocation": "eastus", - "deviceGroupName": "default", - "$limit": 1 + "deviceGroupName": "default" }, "responses": { "200": { @@ -35,7 +34,7 @@ } } ], - "nextLink": "https://management.azure.com/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.IoTSecurity/locations/eastus/deviceGroups/default/recommendations?api-version=2020-08-06-preview&recommendationType=IoT_Baseline&deviceId=device-1&$limit=1&$skipToken=903e76ff-17eb-4bac-ac8a-2bc31ab68fd8" + "nextLink": "https://management.azure.com/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.IoTSecurity/locations/eastus/deviceGroups/default/recommendations?api-version=2021-07-01-preview&$skipToken=903e76ff-17eb-4bac-ac8a-2bc31ab68fd8" } } } From 6fbbe622865e5ff3ce65bb57952a522c6f6b7ea2 Mon Sep 17 00:00:00 2001 From: Orel Kayam Date: Tue, 1 Jun 2021 08:29:56 +0300 Subject: [PATCH 16/19] Update examples --- .../preview/2021-07-01-preview/examples/Alerts/GetAlert.json | 2 +- .../2021-07-01-preview/examples/Alerts/GetAlertList.json | 2 +- .../examples/Recommendations/GetRecommendation.json | 2 +- .../examples/Recommendations/GetRecommendationList.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/GetAlert.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/GetAlert.json index ae0cafa20795..d6a53b603976 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/GetAlert.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/GetAlert.json @@ -14,7 +14,7 @@ "type": "Microsoft.IoTSecurity/alerts", "properties": { "systemAlertId": "903e76ff-17eb-4bac-ac8a-2bc31ab68fd8", - "compromisedEntity": "device-1", + "deviceResourceId": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.IoTSecurity/locations/eastus/deviceGroups/default/devices/device-1", "alertType": "IoT_PrivilegedContainer", "startTimeUtc": "2020-05-13T06:32:25Z", "endTimeUtc": "2020-05-13T06:32:25Z", diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/GetAlertList.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/GetAlertList.json index c88f7341bec2..f0d3615d8dc5 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/GetAlertList.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/GetAlertList.json @@ -15,7 +15,7 @@ "type": "Microsoft.IoTSecurity/alerts", "properties": { "systemAlertId": "903e76ff-17eb-4bac-ac8a-2bc31ab68fd8", - "compromisedEntity": "device-1", + "deviceResourceId": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.IoTSecurity/locations/eastus/deviceGroups/default/devices/device-1", "alertType": "IoT_PrivilegedContainer", "startTimeUtc": "2020-05-13T06:32:25Z", "endTimeUtc": "2020-05-13T06:32:25Z", diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Recommendations/GetRecommendation.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Recommendations/GetRecommendation.json index 5a43724e36e5..dabd140079a1 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Recommendations/GetRecommendation.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Recommendations/GetRecommendation.json @@ -12,7 +12,7 @@ "name": "IoT_Baseline|device-1", "properties": { "recommendationType": "IoT_Baseline", - "deviceId": "device-1", + "deviceResourceId": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.IoTSecurity/locations/eastus/deviceGroups/default/devices/device-1", "discoveredTimeUtc": "2020-05-13T06:32:25Z", "recommendationAdditionalData": { "SnapshotId": "48519d58-4e35-46cd-aed5-6251af95ed50", diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Recommendations/GetRecommendationList.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Recommendations/GetRecommendationList.json index 65ebb4a1b968..1c70b55ab358 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Recommendations/GetRecommendationList.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Recommendations/GetRecommendationList.json @@ -13,7 +13,7 @@ "name": "IoT_Baseline|device-1", "properties": { "recommendationType": "IoT_Baseline", - "deviceId": "device-1", + "deviceResourceId": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.IoTSecurity/locations/eastus/deviceGroups/default/devices/device-1", "discoveredTimeUtc": "2020-05-13T06:32:25Z", "recommendationAdditionalData": { "SnapshotId": "48519d58-4e35-46cd-aed5-6251af95ed50", From 0a48817042417b518464225a8c2b5e85311bc1b9 Mon Sep 17 00:00:00 2001 From: Orel Kayam Date: Tue, 1 Jun 2021 10:54:02 +0300 Subject: [PATCH 17/19] Add missing properties --- .../preview/2021-07-01-preview/alerts.json | 114 ++++++++++++++++++ .../examples/Alerts/GetAlert.json | 5 +- .../examples/Alerts/GetAlertList.json | 5 +- .../Recommendations/GetRecommendation.json | 3 +- .../GetRecommendationList.json | 3 +- .../2021-07-01-preview/recommendations.json | 42 +++++++ 6 files changed, 168 insertions(+), 4 deletions(-) diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/alerts.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/alerts.json index ce5fc1accf33..30833a9108f7 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/alerts.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/alerts.json @@ -232,6 +232,120 @@ "ParentProcessId": 1593, "DeviceId": "device-1" } + }, + "severity": { + "readOnly": true, + "type": "string", + "example": "Medium", + "description": "The severity of the alert", + "enum": [ + "Informational", + "Low", + "Medium", + "High" + ], + "x-ms-enum": { + "name": "alertSeverity", + "modelAsString": true, + "values": [ + { + "value": "Informational" + }, + { + "value": "Low" + }, + { + "value": "Medium" + }, + { + "value": "High" + } + ] + } + }, + "intent": { + "readOnly": true, + "type": "string", + "example": "Exploitation,Execution", + "description": "Kill chain related intent behind the alert. Could contain multiple enum values (separated by commas)", + "enum": [ + "Unknown", + "PreAttack", + "InitialAccess", + "Persistence", + "PrivilegeEscalation", + "DefenseEvasion", + "CredentialAccess", + "Discovery", + "LateralMovement", + "Execution", + "Collection", + "Exfiltration", + "CommandAndControl", + "Impact", + "Probing", + "Exploitation" + ], + "x-ms-enum": { + "name": "alertIntent", + "modelAsString": true, + "values": [ + { + "value": "Unknown" + }, + { + "value": "PreAttack" + }, + { + "value": "InitialAccess" + }, + { + "value": "Persistence" + }, + { + "value": "PrivilegeEscalation" + }, + { + "value": "DefenseEvasion" + }, + { + "value": "CredentialAccess" + }, + { + "value": "Discovery" + }, + { + "value": "LateralMovement" + }, + { + "value": "Execution" + }, + { + "value": "Collection" + }, + { + "value": "Exfiltration" + }, + { + "value": "CommandAndControl" + }, + { + "value": "Impact" + }, + { + "value": "Probing" + }, + { + "value": "Exploitation" + } + ] + } + }, + "productComponentName": { + "readOnly": true, + "type": "string", + "example": "IoT Hub", + "description": "The name of a component inside the product which generated the alert" } } } diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/GetAlert.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/GetAlert.json index d6a53b603976..2283ec086cd1 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/GetAlert.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/GetAlert.json @@ -31,7 +31,10 @@ "UserId": "", "ParentProcessId": 1593, "DeviceId": "device-1" - } + }, + "severity": "Medium", + "intent": "PreAttack", + "productComponentName": "IoT Hub" }, "systemData": { "createdBy": "string", diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/GetAlertList.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/GetAlertList.json index f0d3615d8dc5..c6e4bbd8bea8 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/GetAlertList.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/GetAlertList.json @@ -32,7 +32,10 @@ "UserId": "", "ParentProcessId": 1593, "DeviceId": "device-1" - } + }, + "severity": "Medium", + "intent": "PreAttack", + "productComponentName": "IoT Hub" }, "systemData": { "createdBy": "string", diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Recommendations/GetRecommendation.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Recommendations/GetRecommendation.json index dabd140079a1..dd9e86fe00c3 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Recommendations/GetRecommendation.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Recommendations/GetRecommendation.json @@ -21,7 +21,8 @@ "TotalInformationalFailedRules": "2", "TotalCriticalFailedRules": "3", "TotalWarningFailedRules": "1" - } + }, + "severity": "Low" }, "systemData": { "createdBy": "string", diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Recommendations/GetRecommendationList.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Recommendations/GetRecommendationList.json index 1c70b55ab358..052c24942e27 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Recommendations/GetRecommendationList.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Recommendations/GetRecommendationList.json @@ -22,7 +22,8 @@ "TotalInformationalFailedRules": "2", "TotalCriticalFailedRules": "3", "TotalWarningFailedRules": "1" - } + }, + "severity": "Low" }, "systemData": { "createdBy": "string", diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/recommendations.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/recommendations.json index 654455ab02e8..4f0ea20932c8 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/recommendations.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/recommendations.json @@ -207,6 +207,48 @@ "TotalCriticalFailedRules": "3", "TotalWarningFailedRules": "1" } + }, + "severity": { + "readOnly": true, + "type": "string", + "example": "Medium", + "description": "The severity of the recommendation", + "enum": [ + "Unknown", + "NotApplicable", + "Healthy", + "OffByPolicy", + "Low", + "Medium", + "High" + ], + "x-ms-enum": { + "name": "recommendationSeverity", + "modelAsString": true, + "values": [ + { + "value": "Unknown" + }, + { + "value": "NotApplicable" + }, + { + "value": "Healthy" + }, + { + "value": "OffByPolicy" + }, + { + "value": "Low" + }, + { + "value": "Medium" + }, + { + "value": "High" + } + ] + } } } } From 14b32310307a9dfc0fa163b65421a3f2da3afeaa Mon Sep 17 00:00:00 2001 From: Orel Kayam Date: Tue, 1 Jun 2021 12:51:56 +0300 Subject: [PATCH 18/19] Add missing properties --- .../examples/Recommendations/GetRecommendation.json | 4 +++- .../Recommendations/GetRecommendationList.json | 4 +++- .../preview/2021-07-01-preview/recommendations.json | 12 ++++++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Recommendations/GetRecommendation.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Recommendations/GetRecommendation.json index dd9e86fe00c3..2ea082bde369 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Recommendations/GetRecommendation.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Recommendations/GetRecommendation.json @@ -22,7 +22,9 @@ "TotalCriticalFailedRules": "3", "TotalWarningFailedRules": "1" }, - "severity": "Low" + "severity": "Low", + "productComponentName": "IoT Hub", + "control": "Communication between device and IoT Hub is not optimized" }, "systemData": { "createdBy": "string", diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Recommendations/GetRecommendationList.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Recommendations/GetRecommendationList.json index 052c24942e27..c1998291543f 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Recommendations/GetRecommendationList.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Recommendations/GetRecommendationList.json @@ -23,7 +23,9 @@ "TotalCriticalFailedRules": "3", "TotalWarningFailedRules": "1" }, - "severity": "Low" + "severity": "Low", + "productComponentName": "IoT Hub", + "control": "Communication between device and IoT Hub is not optimized" }, "systemData": { "createdBy": "string", diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/recommendations.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/recommendations.json index 4f0ea20932c8..8948ae6ce581 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/recommendations.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/recommendations.json @@ -249,6 +249,18 @@ } ] } + }, + "productComponentName": { + "readOnly": true, + "type": "string", + "example": "IoT Hub", + "description": "The name of a component inside the product which generated the recommendation" + }, + "control": { + "readOnly": true, + "type": "string", + "example": "Communication between device and IoT Hub is not optimized", + "description": "The name of the recommendation's control category " } } } From 87128e09b3d3bf173a86b003ac8b046b1807913e Mon Sep 17 00:00:00 2001 From: Orel Kayam Date: Tue, 1 Jun 2021 13:08:43 +0300 Subject: [PATCH 19/19] Rename property --- .../preview/2021-07-01-preview/alerts.json | 2 +- .../preview/2021-07-01-preview/examples/Alerts/GetAlert.json | 2 +- .../2021-07-01-preview/examples/Alerts/GetAlertList.json | 2 +- .../examples/Recommendations/GetRecommendation.json | 2 +- .../examples/Recommendations/GetRecommendationList.json | 2 +- .../preview/2021-07-01-preview/recommendations.json | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/alerts.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/alerts.json index 30833a9108f7..af231b53ccbd 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/alerts.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/alerts.json @@ -184,7 +184,7 @@ "type": "string", "example": "903e76ff-17eb-4bac-ac8a-2bc31ab68fd8" }, - "deviceResourceId": { + "azureResourceId": { "description": "Display name of the device entity being reported on", "readOnly": true, "type": "string", diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/GetAlert.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/GetAlert.json index 2283ec086cd1..b5ef69c69c14 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/GetAlert.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/GetAlert.json @@ -14,7 +14,7 @@ "type": "Microsoft.IoTSecurity/alerts", "properties": { "systemAlertId": "903e76ff-17eb-4bac-ac8a-2bc31ab68fd8", - "deviceResourceId": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.IoTSecurity/locations/eastus/deviceGroups/default/devices/device-1", + "azureResourceId": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.IoTSecurity/locations/eastus/deviceGroups/default/devices/device-1", "alertType": "IoT_PrivilegedContainer", "startTimeUtc": "2020-05-13T06:32:25Z", "endTimeUtc": "2020-05-13T06:32:25Z", diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/GetAlertList.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/GetAlertList.json index c6e4bbd8bea8..2428839f23b9 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/GetAlertList.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/GetAlertList.json @@ -15,7 +15,7 @@ "type": "Microsoft.IoTSecurity/alerts", "properties": { "systemAlertId": "903e76ff-17eb-4bac-ac8a-2bc31ab68fd8", - "deviceResourceId": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.IoTSecurity/locations/eastus/deviceGroups/default/devices/device-1", + "azureResourceId": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.IoTSecurity/locations/eastus/deviceGroups/default/devices/device-1", "alertType": "IoT_PrivilegedContainer", "startTimeUtc": "2020-05-13T06:32:25Z", "endTimeUtc": "2020-05-13T06:32:25Z", diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Recommendations/GetRecommendation.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Recommendations/GetRecommendation.json index 2ea082bde369..2713d9b0ce4a 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Recommendations/GetRecommendation.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Recommendations/GetRecommendation.json @@ -12,7 +12,7 @@ "name": "IoT_Baseline|device-1", "properties": { "recommendationType": "IoT_Baseline", - "deviceResourceId": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.IoTSecurity/locations/eastus/deviceGroups/default/devices/device-1", + "azureResourceId": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.IoTSecurity/locations/eastus/deviceGroups/default/devices/device-1", "discoveredTimeUtc": "2020-05-13T06:32:25Z", "recommendationAdditionalData": { "SnapshotId": "48519d58-4e35-46cd-aed5-6251af95ed50", diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Recommendations/GetRecommendationList.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Recommendations/GetRecommendationList.json index c1998291543f..0afa7dd4ed21 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Recommendations/GetRecommendationList.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Recommendations/GetRecommendationList.json @@ -13,7 +13,7 @@ "name": "IoT_Baseline|device-1", "properties": { "recommendationType": "IoT_Baseline", - "deviceResourceId": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.IoTSecurity/locations/eastus/deviceGroups/default/devices/device-1", + "azureResourceId": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.IoTSecurity/locations/eastus/deviceGroups/default/devices/device-1", "discoveredTimeUtc": "2020-05-13T06:32:25Z", "recommendationAdditionalData": { "SnapshotId": "48519d58-4e35-46cd-aed5-6251af95ed50", diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/recommendations.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/recommendations.json index 8948ae6ce581..71133ad0f520 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/recommendations.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/recommendations.json @@ -178,7 +178,7 @@ "type": "object", "description": "IoT recommendation properties", "properties": { - "deviceResourceId": { + "azureResourceId": { "description": "Azure Resource Identifier of the device being reported on", "readOnly": true, "type": "string",