From 17442699abeefb53113971e33e613e77981e2b41 Mon Sep 17 00:00:00 2001 From: Orel Kayam Date: Sun, 30 May 2021 10:40:54 +0300 Subject: [PATCH 01/38] 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/38] 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/38] 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/38] 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/38] 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/38] 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/38] 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/38] 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/38] 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/38] 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/38] 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/38] 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/38] 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/38] 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/38] 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/38] 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/38] 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/38] 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/38] 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", From bbe95101eb836799639487a7384b3c2a0b24372e Mon Sep 17 00:00:00 2001 From: Orel Kayam Date: Tue, 15 Jun 2021 11:29:34 +0300 Subject: [PATCH 20/38] Add alert editing --- .../preview/2021-07-01-preview/alerts.json | 81 +++++++++++++++++++ .../examples/Alerts/GetAlert.json | 3 +- .../examples/Alerts/GetAlertList.json | 3 +- .../examples/Alerts/PutAlert.json | 52 ++++++++++++ 4 files changed, 137 insertions(+), 2 deletions(-) create mode 100644 specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/PutAlert.json 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 af231b53ccbd..3cf1e2b3ab77 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 @@ -129,6 +129,52 @@ } } } + }, + "put": { + "x-ms-examples": { + "Get IoT Alert": { + "$ref": "./examples/Alerts/PutAlert.json" + } + }, + "tags": [ + "IoT Security Alerts" + ], + "operationId": "IotAlerts_Put", + "description": "Update alert", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/1.0/types.json#/parameters/IotDefenderLocation" + }, + { + "$ref": "#/parameters/DeviceGroupName" + }, + { + "$ref": "#/parameters/AlertId" + }, + { + "$ref": "#/parameters/AlertModel" + } + ], + "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" + } + } + } } } }, @@ -346,6 +392,31 @@ "type": "string", "example": "IoT Hub", "description": "The name of a component inside the product which generated the alert" + }, + "status": { + "type": "string", + "example": "New", + "description": "The status of the alert", + "enum": [ + "New", + "InProgress", + "Closed" + ], + "x-ms-enum": { + "name": "alertStatus", + "modelAsString": true, + "values": [ + { + "value": "New" + }, + { + "value": "InProgress" + }, + { + "value": "Closed" + } + ] + } } } } @@ -366,6 +437,16 @@ "description": "Alert Id", "type": "string", "x-ms-parameter-location": "method" + }, + "AlertModel": { + "name": "alertModel", + "in": "body", + "required": true, + "description": "IoT alert", + "schema": { + "$ref": "#/definitions/AlertModel" + }, + "x-ms-parameter-location": "method" } } } 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 b5ef69c69c14..cff658f59a40 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 @@ -34,7 +34,8 @@ }, "severity": "Medium", "intent": "PreAttack", - "productComponentName": "IoT Hub" + "productComponentName": "IoT Hub", + "status": "New" }, "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 2428839f23b9..a9661c519cf2 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 @@ -35,7 +35,8 @@ }, "severity": "Medium", "intent": "PreAttack", - "productComponentName": "IoT Hub" + "productComponentName": "IoT Hub", + "status": "New" }, "systemData": { "createdBy": "string", diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/PutAlert.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/PutAlert.json new file mode 100644 index 000000000000..909b91a26adb --- /dev/null +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/PutAlert.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "api-version": "2021-07-01-preview", + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "iotDefenderLocation": "eastus", + "deviceGroupName": "default", + "alertId": "903e76ff-17eb-4bac-ac8a-2bc31ab68fd8", + "alertModel": { + "properties": { + "entities": [ + { + "$id": "1", + "CommandLine": "docker run --privileged", + "Type": "process" + } + ], + "extendedProperties": { + "CommandLine": "docker run --privileged", + "User Name": "aUser", + "UserId": "", + "ParentProcessId": 1593, + "DeviceId": "device-1" + }, + "status": "New" + } + } + }, + "responses": { + "200": { + "body": { + "name": "default", + "id": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub/providers/Microsoft.IoTSecurity/sites/default", + "type": "Microsoft.IoTSecurity/sites", + "properties": { + "displayName": "IoT site name", + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2020-04-27T21:53:29.0928001Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-04-27T21:53:29.0928001Z" + } + } + } + } +} From b6b367f667292b1e6b33e57d18f6613b008623f4 Mon Sep 17 00:00:00 2001 From: Orel Kayam Date: Wed, 16 Jun 2021 11:47:48 +0300 Subject: [PATCH 21/38] Update editable properties --- .../preview/2021-07-01-preview/alerts.json | 3 ++- 1 file changed, 2 insertions(+), 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 3cf1e2b3ab77..6259d5cfac13 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 @@ -256,6 +256,7 @@ }, "entities": { "description": "A list of entities related to the alert", + "readOnly": true, "type": "array", "items": { "type": "object" @@ -270,6 +271,7 @@ }, "extendedProperties": { "type": "object", + "readOnly": true, "description": "A bag of fields which extends the alert information", "example": { "CommandLine": "docker run --privileged", @@ -280,7 +282,6 @@ } }, "severity": { - "readOnly": true, "type": "string", "example": "Medium", "description": "The severity of the alert", From 9ecacc5f89274e1727b11edf4fc7c85923dccd8f Mon Sep 17 00:00:00 2001 From: Orel Kayam Date: Wed, 16 Jun 2021 11:50:22 +0300 Subject: [PATCH 22/38] Update example --- .../preview/2021-07-01-preview/alerts.json | 2 +- .../examples/Alerts/PutAlert.json | 51 ++++++++++--------- 2 files changed, 29 insertions(+), 24 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 6259d5cfac13..e46b0259424b 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 @@ -132,7 +132,7 @@ }, "put": { "x-ms-examples": { - "Get IoT Alert": { + "Update IoT Alert": { "$ref": "./examples/Alerts/PutAlert.json" } }, diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/PutAlert.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/PutAlert.json index 909b91a26adb..434ebaed5819 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/PutAlert.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/PutAlert.json @@ -7,36 +7,41 @@ "alertId": "903e76ff-17eb-4bac-ac8a-2bc31ab68fd8", "alertModel": { "properties": { - "entities": [ - { - "$id": "1", - "CommandLine": "docker run --privileged", - "Type": "process" - } - ], - "extendedProperties": { - "CommandLine": "docker run --privileged", - "User Name": "aUser", - "UserId": "", - "ParentProcessId": 1593, - "DeviceId": "device-1" - }, - "status": "New" + "severity": "Medium", + "status": "InProgress" } } }, "responses": { "200": { "body": { - "name": "default", - "id": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub/providers/Microsoft.IoTSecurity/sites/default", - "type": "Microsoft.IoTSecurity/sites", + "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": { - "displayName": "IoT site name", - "tags": { - "key1": "value1", - "key2": "value2" - } + "systemAlertId": "903e76ff-17eb-4bac-ac8a-2bc31ab68fd8", + "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", + "entities": [ + { + "$id": "1", + "CommandLine": "docker run --privileged", + "Type": "process" + } + ], + "extendedProperties": { + "CommandLine": "docker run --privileged", + "User Name": "aUser", + "UserId": "", + "ParentProcessId": 1593, + "DeviceId": "device-1" + }, + "severity": "Medium", + "intent": "PreAttack", + "productComponentName": "IoT Hub", + "status": "InProgress" }, "systemData": { "createdBy": "string", From 8ddb2e4fd010c6890475eed364fd42e2b19a9af1 Mon Sep 17 00:00:00 2001 From: Orel Kayam Date: Wed, 16 Jun 2021 12:19:59 +0300 Subject: [PATCH 23/38] update put to patch --- .../preview/2021-07-01-preview/alerts.json | 4 ++-- .../examples/Alerts/{PutAlert.json => PatchAlert.json} | 0 2 files changed, 2 insertions(+), 2 deletions(-) rename specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/{PutAlert.json => PatchAlert.json} (100%) 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 e46b0259424b..4a75cc421802 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 @@ -130,10 +130,10 @@ } } }, - "put": { + "patch": { "x-ms-examples": { "Update IoT Alert": { - "$ref": "./examples/Alerts/PutAlert.json" + "$ref": "./examples/Alerts/PatchAlert.json" } }, "tags": [ diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/PutAlert.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/PatchAlert.json similarity index 100% rename from specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/PutAlert.json rename to specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/PatchAlert.json From bf53660968aa42e282c378a6091daee0e40930c7 Mon Sep 17 00:00:00 2001 From: Orel Kayam Date: Wed, 16 Jun 2021 13:19:27 +0300 Subject: [PATCH 24/38] Separate patch request to a different model --- .../preview/2021-07-01-preview/alerts.json | 68 +++++++++++++++++-- 1 file changed, 64 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 4a75cc421802..b85a4ed76c56 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 @@ -158,7 +158,7 @@ "$ref": "#/parameters/AlertId" }, { - "$ref": "#/parameters/AlertModel" + "$ref": "#/parameters/AlertPatchModel" } ], "responses": { @@ -420,6 +420,66 @@ } } } + }, + "AlertPatchPropertiesModel": { + "type": "object", + "description": "IoT alert properties", + "properties": { + "severity": { + "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" + } + ] + } + }, + "status": { + "type": "string", + "example": "New", + "description": "The status of the alert", + "enum": [ + "New", + "InProgress", + "Closed" + ], + "x-ms-enum": { + "name": "alertStatus", + "modelAsString": true, + "values": [ + { + "value": "New" + }, + { + "value": "InProgress" + }, + { + "value": "Closed" + } + ] + } + } + } } }, "parameters": { @@ -439,13 +499,13 @@ "type": "string", "x-ms-parameter-location": "method" }, - "AlertModel": { - "name": "alertModel", + "AlertPatchModel": { + "name": "alertPatchModel", "in": "body", "required": true, "description": "IoT alert", "schema": { - "$ref": "#/definitions/AlertModel" + "$ref": "#/definitions/AlertPatchPropertiesModel" }, "x-ms-parameter-location": "method" } From bc2a6be5b304816fe8a04fd41e011d758a2d6bc3 Mon Sep 17 00:00:00 2001 From: Orel Kayam Date: Wed, 16 Jun 2021 14:09:09 +0300 Subject: [PATCH 25/38] Share enum --- .../preview/2021-07-01-preview/alerts.json | 139 ++++++------------ 1 file changed, 46 insertions(+), 93 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 b85a4ed76c56..43f2de08c0f5 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 @@ -139,8 +139,8 @@ "tags": [ "IoT Security Alerts" ], - "operationId": "IotAlerts_Put", - "description": "Update alert", + "operationId": "IotAlerts_Patch", + "description": "Update an existing alert", "parameters": [ { "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" @@ -220,6 +220,44 @@ } ] }, + "AlertSeverity": { + "type": "string", + "description": "Alert Severity", + "enum": [ + "Informational", + "Low", + "Medium", + "High" + ], + "x-ms-enum": { + "name": "alertSeverity", + "modelAsString": true + } + }, + "AlertStatus": { + "type": "string", + "description": "Alert Status", + "enum": [ + "New", + "InProgress", + "Closed" + ], + "x-ms-enum": { + "name": "alertStatus", + "modelAsString": true, + "values": [ + { + "value": "New" + }, + { + "value": "InProgress" + }, + { + "value": "Closed" + } + ] + } + }, "AlertPropertiesModel": { "type": "object", "description": "IoT alert properties", @@ -256,7 +294,6 @@ }, "entities": { "description": "A list of entities related to the alert", - "readOnly": true, "type": "array", "items": { "type": "object" @@ -271,7 +308,6 @@ }, "extendedProperties": { "type": "object", - "readOnly": true, "description": "A bag of fields which extends the alert information", "example": { "CommandLine": "docker run --privileged", @@ -282,33 +318,11 @@ } }, "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" - } - ] - } + "$ref": "#/definitions/AlertSeverity", + "description": "The severity of the alert" }, "intent": { "readOnly": true, @@ -398,26 +412,7 @@ "type": "string", "example": "New", "description": "The status of the alert", - "enum": [ - "New", - "InProgress", - "Closed" - ], - "x-ms-enum": { - "name": "alertStatus", - "modelAsString": true, - "values": [ - { - "value": "New" - }, - { - "value": "InProgress" - }, - { - "value": "Closed" - } - ] - } + "$ref": "#/definitions/AlertStatus" } } }, @@ -429,55 +424,13 @@ "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" - } - ] - } + "$ref": "#/definitions/AlertSeverity" }, "status": { "type": "string", "example": "New", "description": "The status of the alert", - "enum": [ - "New", - "InProgress", - "Closed" - ], - "x-ms-enum": { - "name": "alertStatus", - "modelAsString": true, - "values": [ - { - "value": "New" - }, - { - "value": "InProgress" - }, - { - "value": "Closed" - } - ] - } + "$ref": "#/definitions/AlertStatus" } } } From 028214d1e62bd56a2089a6ad0111b6a17a1d34f3 Mon Sep 17 00:00:00 2001 From: Orel Kayam Date: Wed, 16 Jun 2021 14:16:13 +0300 Subject: [PATCH 26/38] update example --- .../preview/2021-07-01-preview/examples/Alerts/PatchAlert.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/PatchAlert.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/PatchAlert.json index 434ebaed5819..2d4a8c648457 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/PatchAlert.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Alerts/PatchAlert.json @@ -5,7 +5,7 @@ "iotDefenderLocation": "eastus", "deviceGroupName": "default", "alertId": "903e76ff-17eb-4bac-ac8a-2bc31ab68fd8", - "alertModel": { + "alertPatchModel": { "properties": { "severity": "Medium", "status": "InProgress" From 50b537889942db26a7bba722db5127de5d0c4d4e Mon Sep 17 00:00:00 2001 From: Orel Kayam Date: Wed, 16 Jun 2021 14:54:27 +0300 Subject: [PATCH 27/38] update patch model --- .../preview/2021-07-01-preview/alerts.json | 28 +++++++++++-------- 1 file changed, 17 insertions(+), 11 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 43f2de08c0f5..23576abd108d 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 @@ -420,17 +420,23 @@ "type": "object", "description": "IoT alert properties", "properties": { - "severity": { - "type": "string", - "example": "Medium", - "description": "The severity of the alert", - "$ref": "#/definitions/AlertSeverity" - }, - "status": { - "type": "string", - "example": "New", - "description": "The status of the alert", - "$ref": "#/definitions/AlertStatus" + "properties": { + "type": "object", + "description": "IoT alert properties", + "properties": { + "severity": { + "type": "string", + "example": "Medium", + "description": "The severity of the alert", + "$ref": "#/definitions/AlertSeverity" + }, + "status": { + "type": "string", + "example": "New", + "description": "The status of the alert", + "$ref": "#/definitions/AlertStatus" + } + } } } } From d64c570a95f83d6787c7dc1613d71a8be948a048 Mon Sep 17 00:00:00 2001 From: Orel Kayam Date: Wed, 16 Jun 2021 15:09:34 +0300 Subject: [PATCH 28/38] Undo break change --- .../preview/2021-07-01-preview/alerts.json | 3 ++- 1 file changed, 2 insertions(+), 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 23576abd108d..4bd164b52528 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 @@ -222,6 +222,7 @@ }, "AlertSeverity": { "type": "string", + "readOnly": true, "description": "Alert Severity", "enum": [ "Informational", @@ -236,6 +237,7 @@ }, "AlertStatus": { "type": "string", + "readOnly": false, "description": "Alert Status", "enum": [ "New", @@ -318,7 +320,6 @@ } }, "severity": { - "readOnly": true, "type": "string", "example": "Medium", "$ref": "#/definitions/AlertSeverity", From 9e09440101b64b68154bcf594cf4bb0ab633cb0a Mon Sep 17 00:00:00 2001 From: Orel Kayam Date: Wed, 16 Jun 2021 17:01:30 +0300 Subject: [PATCH 29/38] small update --- .../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 4bd164b52528..ee6ef179e0a8 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 @@ -222,7 +222,7 @@ }, "AlertSeverity": { "type": "string", - "readOnly": true, + "readOnly": false, "description": "Alert Severity", "enum": [ "Informational", From d963f3af4781e43353a7994f52abb6dd1c2fde39 Mon Sep 17 00:00:00 2001 From: Orel Kayam Date: Mon, 28 Jun 2021 14:48:18 +0300 Subject: [PATCH 30/38] Old version as PR baseline --- .vscode/settings.json | 2 +- .../2021-07-01-preview/Sensors/Delete.json | 11 + .../Sensors/DownloadActivation.json | 15 + .../Sensors/DownloadResetPassword.json | 18 + .../2021-07-01-preview/Sensors/Get.json | 36 ++ .../2021-07-01-preview/Sensors/List.json | 64 +++ .../2021-07-01-preview/Sensors/Put.json | 62 ++ .../Sensors/TriggerTiPackageUpdate.json | 10 + .../2021-07-01-preview/Sites/Delete.json | 10 + .../preview/2021-07-01-preview/Sites/Get.json | 30 + .../2021-07-01-preview/Sites/List.json | 34 ++ .../preview/2021-07-01-preview/Sites/Put.json | 61 ++ .../preview/2021-07-01-preview/sensors.json | 528 ++++++++++++++++++ .../preview/2021-07-01-preview/sites.json | 266 +++++++++ 14 files changed, 1146 insertions(+), 1 deletion(-) create mode 100644 specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sensors/Delete.json create mode 100644 specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sensors/DownloadActivation.json create mode 100644 specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sensors/DownloadResetPassword.json create mode 100644 specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sensors/Get.json create mode 100644 specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sensors/List.json create mode 100644 specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sensors/Put.json create mode 100644 specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sensors/TriggerTiPackageUpdate.json create mode 100644 specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sites/Delete.json create mode 100644 specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sites/Get.json create mode 100644 specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sites/List.json create mode 100644 specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sites/Put.json create mode 100644 specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/sensors.json create mode 100644 specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/sites.json diff --git a/.vscode/settings.json b/.vscode/settings.json index 76eab4509993..60d1dce046d5 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -22,6 +22,6 @@ ], "typescript.tsdk": "node_modules\\typescript\\lib", "[json]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" + "editor.defaultFormatter": "vscode.json-language-features" } } diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sensors/Delete.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sensors/Delete.json new file mode 100644 index 000000000000..965babba055f --- /dev/null +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sensors/Delete.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "api-version": "2021-02-01-preview", + "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub", + "sensorName": "mySensor" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sensors/DownloadActivation.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sensors/DownloadActivation.json new file mode 100644 index 000000000000..0f18c17ca23f --- /dev/null +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sensors/DownloadActivation.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "api-version": "2021-02-01-preview", + "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub", + "sensorName": "mySensor" + }, + "responses": { + "200": { + "headers": { + "content-type": "application/zip" + }, + "body": "{Binary}" + } + } +} diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sensors/DownloadResetPassword.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sensors/DownloadResetPassword.json new file mode 100644 index 000000000000..bf5e66d7f84c --- /dev/null +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sensors/DownloadResetPassword.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2021-02-01-preview", + "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub", + "sensorName": "mySensor", + "body": { + "applianceId": "3214-528AV23-D121-D3-E1" + } + }, + "responses": { + "200": { + "headers": { + "content-type": "application/zip" + }, + "body": "{Binary}" + } + } +} diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sensors/Get.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sensors/Get.json new file mode 100644 index 000000000000..7448efebc105 --- /dev/null +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sensors/Get.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "api-version": "2021-02-01-preview", + "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub", + "sensorName": "mySensor" + }, + "responses": { + "200": { + "body": { + "name": "mySensor", + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub/providers/Microsoft.IoTSecurity/sensors/mySensor", + "type": "Microsoft.IoTSecurity/sensors", + "properties": { + "connectivityTime": "2020-11-17T12:31:25Z", + "dynamicLearning": true, + "learningMode": true, + "sensorStatus": "Ok", + "sensorVersion": "2020.11.01.1643", + "tiAutomaticUpdates": true, + "tiStatus": "Ok", + "tiVersion": "2020-11-17T12:31:25Z", + "zone": "Zone Name", + "sensorType": "Ot" + }, + "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-07-01-preview/Sensors/List.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sensors/List.json new file mode 100644 index 000000000000..df5b64d56593 --- /dev/null +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sensors/List.json @@ -0,0 +1,64 @@ +{ + "parameters": { + "api-version": "2021-02-01-preview", + "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "mySensor", + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub/providers/Microsoft.IoTSecurity/sensors/mySensor", + "type": "Microsoft.IoTSecurity/sensors", + "properties": { + "connectivityTime": "2020-11-17T12:31:25Z", + "dynamicLearning": true, + "learningMode": true, + "sensorStatus": "Ok", + "sensorVersion": "2020.11.01.1643", + "tiAutomaticUpdates": true, + "tiStatus": "Ok", + "tiVersion": "2020-11-17T12:31:25Z", + "zone": "Zone Name", + "sensorType": "Ot" + }, + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2020-04-27T21:53:29.0928001Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-04-27T21:53:29.0928001Z" + } + }, + { + "name": "otherSensor", + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub/providers/Microsoft.IoTSecurity/sensors/otherSensor", + "type": "Microsoft.IoTSecurity/sensors", + "properties": { + "connectivityTime": "2020-11-17T12:31:25Z", + "dynamicLearning": false, + "learningMode": false, + "sensorStatus": "Disconnected", + "sensorVersion": "2020.11.01.1643", + "tiAutomaticUpdates": true, + "tiStatus": "Ok", + "tiVersion": "2020-11-17T12:31:25Z", + "zone": "Zone Name", + "sensorType": "Ot" + }, + "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-07-01-preview/Sensors/Put.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sensors/Put.json new file mode 100644 index 000000000000..93034b813e1b --- /dev/null +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sensors/Put.json @@ -0,0 +1,62 @@ +{ + "parameters": { + "api-version": "2021-02-01-preview", + "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub", + "sensorName": "mySensor", + "sensorModel": { + "properties": { + "tiAutomaticUpdates": true, + "zone": "Zone Name", + "sensorType": "Ot" + } + } + }, + "responses": { + "200": { + "body": { + "name": "mySensor", + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub/providers/Microsoft.IoTSecurity/sensors/mySensor", + "type": "Microsoft.IoTSecurity/sensors", + "properties": { + "connectivityTime": "2020-11-17T12:31:25Z", + "dynamicLearning": true, + "learningMode": true, + "sensorStatus": "Ok", + "sensorVersion": "2020.11.01.1643", + "tiAutomaticUpdates": true, + "tiStatus": "Ok", + "tiVersion": "2020-11-17T12:31:25Z", + "zone": "Zone Name", + "sensorType": "Ot" + } + } + }, + "201": { + "body": { + "name": "mySensor", + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub/providers/Microsoft.IoTSecurity/sensors/mySensor", + "type": "Microsoft.IoTSecurity/sensors", + "properties": { + "connectivityTime": "2020-11-17T12:31:25Z", + "dynamicLearning": true, + "learningMode": true, + "sensorStatus": "Ok", + "sensorVersion": "2020.11.01.1643", + "tiAutomaticUpdates": true, + "tiStatus": "Ok", + "tiVersion": "2020-11-17T12:31:25Z", + "zone": "Zone Name", + "sensorType": "Ot" + }, + "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-07-01-preview/Sensors/TriggerTiPackageUpdate.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sensors/TriggerTiPackageUpdate.json new file mode 100644 index 000000000000..c79a50ab4852 --- /dev/null +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sensors/TriggerTiPackageUpdate.json @@ -0,0 +1,10 @@ +{ + "parameters": { + "api-version": "2021-02-01-preview", + "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub", + "sensorName": "mySensor" + }, + "responses": { + "200": {} + } +} diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sites/Delete.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sites/Delete.json new file mode 100644 index 000000000000..19db474a1fd3 --- /dev/null +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sites/Delete.json @@ -0,0 +1,10 @@ +{ + "parameters": { + "api-version": "2021-02-01-preview", + "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sites/Get.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sites/Get.json new file mode 100644 index 000000000000..895bb29b0d70 --- /dev/null +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sites/Get.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "api-version": "2021-02-01-preview", + "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub/providers/Microsoft.IoTSecurity/sites/default", + "type": "Microsoft.IoTSecurity/sites", + "name": "default", + "properties": { + "displayName": "IoT site name", + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "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-07-01-preview/Sites/List.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sites/List.json new file mode 100644 index 000000000000..b9ca5bf9e754 --- /dev/null +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sites/List.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2021-02-01-preview", + "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub/sites" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "default", + "id": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub/providers/Microsoft.IoTSecurity/sites/default", + "type": "Microsoft.IoTSecurity/sites", + "properties": { + "displayName": "IoT site name", + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "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-07-01-preview/Sites/Put.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sites/Put.json new file mode 100644 index 000000000000..843fdaa09745 --- /dev/null +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sites/Put.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "api-version": "2021-02-01-preview", + "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub", + "siteModel": { + "properties": { + "displayName": "IoT site name", + "tags": { + "key1": "value1", + "key2": "value2" + } + } + } + }, + "responses": { + "200": { + "body": { + "name": "default", + "id": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub/providers/Microsoft.IoTSecurity/sites/default", + "type": "Microsoft.IoTSecurity/sites", + "properties": { + "displayName": "IoT site name", + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2020-04-27T21:53:29.0928001Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-04-27T21:53:29.0928001Z" + } + } + }, + "201": { + "body": { + "name": "default", + "id": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub/providers/Microsoft.IoTSecurity/sites/default", + "type": "Microsoft.IoTSecurity/sites", + "properties": { + "displayName": "IoT site name", + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "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-07-01-preview/sensors.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/sensors.json new file mode 100644 index 000000000000..19a11fa8f7c8 --- /dev/null +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/sensors.json @@ -0,0 +1,528 @@ +{ + "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/sensors": { + "get": { + "x-ms-examples": { + "List IoT sensors": { + "$ref": "./examples/Sensors/List.json" + } + }, + "tags": [ + "Sensors" + ], + "description": "List IoT sensors", + "operationId": "Sensors_List", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SensorScope" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/SensorsList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/{scope}/providers/Microsoft.IoTSecurity/sensors/{sensorName}": { + "get": { + "x-ms-examples": { + "Get IoT sensor": { + "$ref": "./examples/Sensors/Get.json" + } + }, + "tags": [ + "Sensors" + ], + "operationId": "Sensors_Get", + "description": "Get IoT sensor", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SensorScope" + }, + { + "$ref": "#/parameters/SensorName" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/SensorModel" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "x-ms-examples": { + "Create or update IoT sensor": { + "$ref": "./examples/Sensors/Put.json" + } + }, + "tags": [ + "Sensors" + ], + "operationId": "Sensors_CreateOrUpdate", + "description": "Create or update IoT sensor", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SensorScope" + }, + { + "$ref": "#/parameters/SensorName" + }, + { + "$ref": "#/parameters/SensorModel" + } + ], + "responses": { + "200": { + "description": "Updated IoT sensor", + "schema": { + "$ref": "#/definitions/SensorModel" + } + }, + "201": { + "description": "Created IoT sensor", + "schema": { + "$ref": "#/definitions/SensorModel" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "x-ms-examples": { + "Delete IoT sensor": { + "$ref": "./examples/Sensors/Delete.json" + } + }, + "tags": [ + "Sensors" + ], + "operationId": "Sensors_Delete", + "description": "Delete IoT sensor", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SensorScope" + }, + { + "$ref": "#/parameters/SensorName" + } + ], + "responses": { + "200": { + "description": "Deleted IoT sensor" + }, + "204": { + "description": "IoT sensor does not exist" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/{scope}/providers/Microsoft.IoTSecurity/sensors/{sensorName}/downloadActivation": { + "post": { + "x-ms-examples": { + "Download activation file": { + "$ref": "./examples/Sensors/DownloadActivation.json" + } + }, + "tags": [ + "Sensors" + ], + "operationId": "Sensors_DownloadActivation", + "description": "Download sensor activation file", + "produces": [ + "application/zip" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SensorScope" + }, + { + "$ref": "#/parameters/SensorName" + } + ], + "responses": { + "200": { + "description": "Downloaded activation file", + "schema": { + "type": "object", + "format": "file" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/{scope}/providers/Microsoft.IoTSecurity/sensors/{sensorName}/downloadResetPassword": { + "post": { + "x-ms-examples": { + "Download file for reset password of the sensor": { + "$ref": "./examples/Sensors/DownloadResetPassword.json" + } + }, + "tags": [ + "Sensors" + ], + "operationId": "Sensors_DownloadResetPassword", + "description": "Download file for reset password of the sensor", + "produces": [ + "application/zip" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SensorScope" + }, + { + "$ref": "#/parameters/SensorName" + }, + { + "in": "body", + "name": "body", + "required": true, + "description": "The reset password input.", + "schema": { + "$ref": "#/definitions/ResetPasswordInput" + }, + "x-ms-parameter-location": "method" + } + ], + "responses": { + "200": { + "description": "Downloaded reset password file", + "schema": { + "type": "object", + "format": "file" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/{scope}/providers/Microsoft.IoTSecurity/sensors/{sensorName}/triggerTiPackageUpdate": { + "post": { + "x-ms-examples": { + "Trigger threat intelligence package update": { + "$ref": "./examples/Sensors/TriggerTiPackageUpdate.json" + } + }, + "tags": [ + "Sensors" + ], + "operationId": "Sensors_TriggerTiPackageUpdate", + "description": "Trigger threat intelligence package update", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SensorScope" + }, + { + "$ref": "#/parameters/SensorName" + } + ], + "responses": { + "200": { + "description": "Triggered threat intelligence package update" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + } + } + }, + "definitions": { + "SensorsList": { + "description": "List of IoT sensors", + "type": "object", + "properties": { + "value": { + "description": "List data", + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/SensorModel" + } + } + } + }, + "SensorModel": { + "type": "object", + "description": "IoT sensor model", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "description": "IoT sensor properties", + "$ref": "#/definitions/SensorProperties" + }, + "systemData": { + "readOnly": true, + "type": "object", + "description": "Azure Resource Manager metadata containing createdBy and modifiedBy information.", + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/Resource" + } + ] + }, + "SensorProperties": { + "type": "object", + "description": "IoT sensor properties", + "properties": { + "connectivityTime": { + "description": "Last connectivity time of the IoT sensor", + "readOnly": true, + "type": "string", + "example": "2020-11-17T12:31:25Z" + }, + "dynamicLearning": { + "description": "Dynamic mode status of the IoT sensor", + "example": true, + "readOnly": true, + "type": "boolean" + }, + "learningMode": { + "description": "Learning mode status of the IoT sensor", + "example": true, + "readOnly": true, + "type": "boolean" + }, + "sensorStatus": { + "readOnly": true, + "type": "string", + "example": "Ok", + "description": "Status of the IoT sensor", + "enum": [ + "Ok", + "Disconnected", + "Unavailable" + ], + "x-ms-enum": { + "name": "sensorStatus", + "modelAsString": true, + "values": [ + { + "value": "Ok" + }, + { + "value": "Disconnected" + }, + { + "value": "Unavailable" + } + ] + } + }, + "sensorVersion": { + "description": "Version of the IoT sensor", + "readOnly": true, + "type": "string", + "example": "2020.11.01.1643" + }, + "tiAutomaticUpdates": { + "description": "TI Automatic mode status of the IoT sensor", + "example": true, + "type": "boolean" + }, + "tiStatus": { + "readOnly": true, + "type": "string", + "example": "Ok", + "description": "TI Status of the IoT sensor", + "enum": [ + "Ok", + "Failed", + "InProgress", + "UpdateAvailable" + ], + "x-ms-enum": { + "name": "tiStatus", + "modelAsString": true, + "values": [ + { + "value": "Ok" + }, + { + "value": "Failed" + }, + { + "value": "InProgress" + }, + { + "value": "UpdateAvailable" + } + ] + } + }, + "tiVersion": { + "description": "TI Version of the IoT sensor", + "readOnly": true, + "type": "string", + "example": "2020-11-17T12:31:25Z" + }, + "zone": { + "type": "string", + "description": "Zone of the IoT sensor", + "example": "A12" + }, + "sensorType": { + "description": "Type of sensor", + "example": "Ot", + "type": "string", + "enum": [ + "Ot", + "Enterprise" + ], + "x-ms-enum": { + "name": "sensorType", + "modelAsString": true, + "values": [ + { + "value": "Ot" + }, + { + "value": "Enterprise" + } + ] + } + } + } + }, + "ResetPasswordInput": { + "type": "object", + "description": "Reset password input.", + "properties": { + "applianceId": { + "description": "The appliance id of the sensor.", + "type": "string" + } + } + } + }, + "parameters": { + "SensorScope": { + "name": "scope", + "in": "path", + "required": true, + "type": "string", + "description": "Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub)", + "x-ms-parameter-location": "method", + "x-ms-skip-url-encoding": true + }, + "SensorName": { + "name": "sensorName", + "in": "path", + "required": true, + "type": "string", + "description": "Name of the IoT sensor", + "x-ms-parameter-location": "method" + }, + "SensorModel": { + "name": "sensorModel", + "in": "body", + "required": true, + "description": "The IoT sensor model", + "schema": { + "$ref": "#/definitions/SensorModel" + }, + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/sites.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/sites.json new file mode 100644 index 000000000000..722abaf53153 --- /dev/null +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/sites.json @@ -0,0 +1,266 @@ +{ + "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/sites": { + "get": { + "x-ms-examples": { + "List IoT sites": { + "$ref": "./examples/Sites/List.json" + } + }, + "tags": [ + "Sites" + ], + "description": "List IoT sites", + "operationId": "Sites_List", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SiteScope" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/SitesList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/{scope}/providers/Microsoft.IoTSecurity/sites/default": { + "get": { + "x-ms-examples": { + "Get IoT site": { + "$ref": "./examples/Sites/Get.json" + } + }, + "tags": [ + "Sites" + ], + "operationId": "Sites_Get", + "description": "Get IoT site", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SiteScope" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/SiteModel" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "x-ms-examples": { + "Create or update IoT site": { + "$ref": "./examples/Sites/Put.json" + } + }, + "tags": [ + "Sites" + ], + "operationId": "Sites_CreateOrUpdate", + "description": "Create or update IoT site", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SiteScope" + }, + { + "$ref": "#/parameters/SiteModel" + } + ], + "responses": { + "200": { + "description": "Updated IoT site", + "schema": { + "$ref": "#/definitions/SiteModel" + } + }, + "201": { + "description": "Created IoT site", + "schema": { + "$ref": "#/definitions/SiteModel" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "x-ms-examples": { + "Delete IoT site": { + "$ref": "./examples/Sites/Delete.json" + } + }, + "tags": [ + "Sites" + ], + "operationId": "Sites_Delete", + "description": "Delete IoT site", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SiteScope" + } + ], + "responses": { + "200": { + "description": "Deleted IoT site" + }, + "204": { + "description": "IoT site does not exist" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + } + } + }, + "definitions": { + "SitesList": { + "description": "List of IoT sites", + "type": "object", + "properties": { + "value": { + "description": "List data", + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/SiteModel" + } + } + } + }, + "SiteModel": { + "type": "object", + "description": "IoT site model", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "description": "IoT site properties", + "$ref": "#/definitions/SiteProperties" + }, + "systemData": { + "readOnly": true, + "type": "object", + "description": "Azure Resource Manager metadata containing createdBy and modifiedBy information.", + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ProxyResource" + } + ] + }, + "SiteProperties": { + "type": "object", + "description": "IoT site properties", + "properties": { + "displayName": { + "type": "string", + "description": "Display name of the IoT site" + }, + "tags": { + "type": "object", + "description": "Tags of the IoT site", + "additionalProperties": { + "type": "string" + } + } + }, + "required": [ + "displayName" + ] + } + }, + "parameters": { + "SiteScope": { + "name": "scope", + "in": "path", + "required": true, + "type": "string", + "description": "Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub)", + "x-ms-parameter-location": "method", + "x-ms-skip-url-encoding": true + }, + "SiteModel": { + "name": "siteModel", + "in": "body", + "required": true, + "description": "The IoT sites model", + "schema": { + "$ref": "#/definitions/SiteModel" + }, + "x-ms-parameter-location": "method" + } + } +} From 07600c53fcafc0dba8c40587983f819fc22c409e Mon Sep 17 00:00:00 2001 From: Orel Kayam Date: Mon, 28 Jun 2021 14:51:01 +0300 Subject: [PATCH 31/38] Move examples --- .../2021-07-01-preview/{ => examples}/Sensors/Delete.json | 0 .../{ => examples}/Sensors/DownloadActivation.json | 0 .../{ => examples}/Sensors/DownloadResetPassword.json | 0 .../preview/2021-07-01-preview/{ => examples}/Sensors/Get.json | 0 .../preview/2021-07-01-preview/{ => examples}/Sensors/List.json | 0 .../preview/2021-07-01-preview/{ => examples}/Sensors/Put.json | 0 .../{ => examples}/Sensors/TriggerTiPackageUpdate.json | 0 .../preview/2021-07-01-preview/{ => examples}/Sites/Delete.json | 0 .../preview/2021-07-01-preview/{ => examples}/Sites/Get.json | 0 .../preview/2021-07-01-preview/{ => examples}/Sites/List.json | 0 .../preview/2021-07-01-preview/{ => examples}/Sites/Put.json | 0 .../preview/2021-07-01-preview/sensors.json | 2 +- .../Microsoft.IoTSecurity/preview/2021-07-01-preview/sites.json | 2 +- 13 files changed, 2 insertions(+), 2 deletions(-) rename specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/{ => examples}/Sensors/Delete.json (100%) rename specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/{ => examples}/Sensors/DownloadActivation.json (100%) rename specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/{ => examples}/Sensors/DownloadResetPassword.json (100%) rename specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/{ => examples}/Sensors/Get.json (100%) rename specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/{ => examples}/Sensors/List.json (100%) rename specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/{ => examples}/Sensors/Put.json (100%) rename specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/{ => examples}/Sensors/TriggerTiPackageUpdate.json (100%) rename specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/{ => examples}/Sites/Delete.json (100%) rename specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/{ => examples}/Sites/Get.json (100%) rename specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/{ => examples}/Sites/List.json (100%) rename specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/{ => examples}/Sites/Put.json (100%) diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sensors/Delete.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/Delete.json similarity index 100% rename from specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sensors/Delete.json rename to specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/Delete.json diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sensors/DownloadActivation.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/DownloadActivation.json similarity index 100% rename from specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sensors/DownloadActivation.json rename to specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/DownloadActivation.json diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sensors/DownloadResetPassword.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/DownloadResetPassword.json similarity index 100% rename from specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sensors/DownloadResetPassword.json rename to specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/DownloadResetPassword.json diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sensors/Get.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/Get.json similarity index 100% rename from specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sensors/Get.json rename to specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/Get.json diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sensors/List.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/List.json similarity index 100% rename from specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sensors/List.json rename to specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/List.json diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sensors/Put.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/Put.json similarity index 100% rename from specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sensors/Put.json rename to specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/Put.json diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sensors/TriggerTiPackageUpdate.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/TriggerTiPackageUpdate.json similarity index 100% rename from specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sensors/TriggerTiPackageUpdate.json rename to specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/TriggerTiPackageUpdate.json diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sites/Delete.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sites/Delete.json similarity index 100% rename from specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sites/Delete.json rename to specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sites/Delete.json diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sites/Get.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sites/Get.json similarity index 100% rename from specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sites/Get.json rename to specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sites/Get.json diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sites/List.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sites/List.json similarity index 100% rename from specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sites/List.json rename to specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sites/List.json diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sites/Put.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sites/Put.json similarity index 100% rename from specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/Sites/Put.json rename to specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sites/Put.json diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/sensors.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/sensors.json index 19a11fa8f7c8..a605b12e6127 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/sensors.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/sensors.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-07-01-preview/sites.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/sites.json index 722abaf53153..84112daa936a 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/sites.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/sites.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": [ From 61dd6d33b2c6ba68089167c6aab1ee5ba2bbf914 Mon Sep 17 00:00:00 2001 From: Orel Kayam Date: Mon, 28 Jun 2021 17:04:21 +0300 Subject: [PATCH 32/38] Update scopes and examples --- .../examples/Sensors/Delete.json | 6 +- .../examples/Sensors/DownloadActivation.json | 7 +- .../Sensors/DownloadResetPassword.json | 6 +- .../examples/Sensors/Get.json | 8 +- .../examples/Sensors/List.json | 10 ++- .../examples/Sensors/Put.json | 10 ++- .../Sensors/TriggerTiPackageUpdate.json | 6 +- .../examples/Sites/Delete.json | 6 +- .../examples/Sites/Get.json | 8 +- .../examples/Sites/List.json | 7 +- .../examples/Sites/Put.json | 10 ++- .../preview/2021-07-01-preview/sensors.json | 83 ++++++++++++++----- .../preview/2021-07-01-preview/sites.json | 50 +++++++---- 13 files changed, 149 insertions(+), 68 deletions(-) diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/Delete.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/Delete.json index 965babba055f..5df34bdae83b 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/Delete.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/Delete.json @@ -1,7 +1,9 @@ { "parameters": { - "api-version": "2021-02-01-preview", - "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub", + "api-version": "2021-07-01-preview", + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "iotDefenderLocation": "eastus", + "siteName": "mySite", "sensorName": "mySensor" }, "responses": { diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/DownloadActivation.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/DownloadActivation.json index 0f18c17ca23f..349502cb222b 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/DownloadActivation.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/DownloadActivation.json @@ -1,8 +1,9 @@ { "parameters": { - "api-version": "2021-02-01-preview", - "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub", - "sensorName": "mySensor" + "api-version": "2021-07-01-preview", + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "iotDefenderLocation": "eastus", + "siteName": "mySite", "sensorName": "mySensor" }, "responses": { "200": { diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/DownloadResetPassword.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/DownloadResetPassword.json index bf5e66d7f84c..ae013f59635c 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/DownloadResetPassword.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/DownloadResetPassword.json @@ -1,7 +1,9 @@ { "parameters": { - "api-version": "2021-02-01-preview", - "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub", + "api-version": "2021-07-01-preview", + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "iotDefenderLocation": "eastus", + "siteName": "mySite", "sensorName": "mySensor", "body": { "applianceId": "3214-528AV23-D121-D3-E1" diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/Get.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/Get.json index 7448efebc105..552b5424e5db 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/Get.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/Get.json @@ -1,14 +1,16 @@ { "parameters": { - "api-version": "2021-02-01-preview", - "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub", + "api-version": "2021-07-01-preview", + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "iotDefenderLocation": "eastus", + "siteName": "mySite", "sensorName": "mySensor" }, "responses": { "200": { "body": { "name": "mySensor", - "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub/providers/Microsoft.IoTSecurity/sensors/mySensor", + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/locations/eastus/sites/mySite/sensors/mySensor", "type": "Microsoft.IoTSecurity/sensors", "properties": { "connectivityTime": "2020-11-17T12:31:25Z", diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/List.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/List.json index df5b64d56593..f226af784724 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/List.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/List.json @@ -1,7 +1,9 @@ { "parameters": { - "api-version": "2021-02-01-preview", - "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub" + "api-version": "2021-07-01-preview", + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "iotDefenderLocation": "eastus", + "siteName": "mySite" }, "responses": { "200": { @@ -9,7 +11,7 @@ "value": [ { "name": "mySensor", - "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub/providers/Microsoft.IoTSecurity/sensors/mySensor", + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/locations/eastus/sites/mySite/sensors/mySensor", "type": "Microsoft.IoTSecurity/sensors", "properties": { "connectivityTime": "2020-11-17T12:31:25Z", @@ -34,7 +36,7 @@ }, { "name": "otherSensor", - "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub/providers/Microsoft.IoTSecurity/sensors/otherSensor", + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/locations/eastus/sites/mySite/sensors/otherSensor", "type": "Microsoft.IoTSecurity/sensors", "properties": { "connectivityTime": "2020-11-17T12:31:25Z", diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/Put.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/Put.json index 93034b813e1b..0f79b6ce2b27 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/Put.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/Put.json @@ -1,7 +1,9 @@ { "parameters": { - "api-version": "2021-02-01-preview", - "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub", + "api-version": "2021-07-01-preview", + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "iotDefenderLocation": "eastus", + "siteName": "mySite", "sensorName": "mySensor", "sensorModel": { "properties": { @@ -15,7 +17,7 @@ "200": { "body": { "name": "mySensor", - "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub/providers/Microsoft.IoTSecurity/sensors/mySensor", + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/locations/eastus/sites/mySite/sensors/mySensor", "type": "Microsoft.IoTSecurity/sensors", "properties": { "connectivityTime": "2020-11-17T12:31:25Z", @@ -34,7 +36,7 @@ "201": { "body": { "name": "mySensor", - "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub/providers/Microsoft.IoTSecurity/sensors/mySensor", + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/locations/eastus/sites/mySite/sensors/mySensor", "type": "Microsoft.IoTSecurity/sensors", "properties": { "connectivityTime": "2020-11-17T12:31:25Z", diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/TriggerTiPackageUpdate.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/TriggerTiPackageUpdate.json index c79a50ab4852..3be37ce01dfc 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/TriggerTiPackageUpdate.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/TriggerTiPackageUpdate.json @@ -1,7 +1,9 @@ { "parameters": { - "api-version": "2021-02-01-preview", - "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub", + "api-version": "2021-07-01-preview", + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "iotDefenderLocation": "eastus", + "siteName": "mySite", "sensorName": "mySensor" }, "responses": { diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sites/Delete.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sites/Delete.json index 19db474a1fd3..1fe277fdd2ba 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sites/Delete.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sites/Delete.json @@ -1,7 +1,9 @@ { "parameters": { - "api-version": "2021-02-01-preview", - "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub" + "api-version": "2021-07-01-preview", + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "iotDefenderLocation": "eastus", + "siteName": "mySite" }, "responses": { "200": {}, diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sites/Get.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sites/Get.json index 895bb29b0d70..bb1d14287f59 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sites/Get.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sites/Get.json @@ -1,12 +1,14 @@ { "parameters": { - "api-version": "2021-02-01-preview", - "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub" + "api-version": "2021-07-01-preview", + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "iotDefenderLocation": "eastus", + "siteName": "mySite" }, "responses": { "200": { "body": { - "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub/providers/Microsoft.IoTSecurity/sites/default", + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/locations/eastus/sites/mySite", "type": "Microsoft.IoTSecurity/sites", "name": "default", "properties": { diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sites/List.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sites/List.json index b9ca5bf9e754..f3a9ce68f8c2 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sites/List.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sites/List.json @@ -1,7 +1,8 @@ { "parameters": { - "api-version": "2021-02-01-preview", - "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub/sites" + "api-version": "2021-07-01-preview", + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "iotDefenderLocation": "eastus" }, "responses": { "200": { @@ -9,7 +10,7 @@ "value": [ { "name": "default", - "id": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub/providers/Microsoft.IoTSecurity/sites/default", + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/locations/eastus/sites/mySite", "type": "Microsoft.IoTSecurity/sites", "properties": { "displayName": "IoT site name", diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sites/Put.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sites/Put.json index 843fdaa09745..b1795035869a 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sites/Put.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sites/Put.json @@ -1,7 +1,9 @@ { "parameters": { - "api-version": "2021-02-01-preview", - "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub", + "api-version": "2021-07-01-preview", + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "iotDefenderLocation": "eastus", + "siteName": "mySite", "siteModel": { "properties": { "displayName": "IoT site name", @@ -16,7 +18,7 @@ "200": { "body": { "name": "default", - "id": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub/providers/Microsoft.IoTSecurity/sites/default", + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/locations/eastus/sites/mySite", "type": "Microsoft.IoTSecurity/sites", "properties": { "displayName": "IoT site name", @@ -38,7 +40,7 @@ "201": { "body": { "name": "default", - "id": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub/providers/Microsoft.IoTSecurity/sites/default", + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/locations/eastus/sites/mySite", "type": "Microsoft.IoTSecurity/sites", "properties": { "displayName": "IoT site name", diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/sensors.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/sensors.json index a605b12e6127..ab094a6bed73 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/sensors.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/sensors.json @@ -34,7 +34,7 @@ } }, "paths": { - "/{scope}/providers/Microsoft.IoTSecurity/sensors": { + "/subscriptions/{subscriptionId}/providers/Microsoft.IoTSecurity/locations/{iotDefenderLocation}/sites/{siteName}/sensors": { "get": { "x-ms-examples": { "List IoT sensors": { @@ -51,7 +51,13 @@ "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "#/parameters/SensorScope" + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/1.0/types.json#/parameters/IotDefenderLocation" + }, + { + "$ref": "#/parameters/SiteName" } ], "responses": { @@ -70,7 +76,7 @@ } } }, - "/{scope}/providers/Microsoft.IoTSecurity/sensors/{sensorName}": { + "/subscriptions/{subscriptionId}/providers/Microsoft.IoTSecurity/locations/{iotDefenderLocation}/sites/{siteName}/sensors/{sensorName}": { "get": { "x-ms-examples": { "Get IoT sensor": { @@ -87,10 +93,16 @@ "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "#/parameters/SensorScope" + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/1.0/types.json#/parameters/IotDefenderLocation" }, { "$ref": "#/parameters/SensorName" + }, + { + "$ref": "#/parameters/SiteName" } ], "responses": { @@ -124,13 +136,19 @@ "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "#/parameters/SensorScope" + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/1.0/types.json#/parameters/IotDefenderLocation" }, { "$ref": "#/parameters/SensorName" }, { "$ref": "#/parameters/SensorModel" + }, + { + "$ref": "#/parameters/SiteName" } ], "responses": { @@ -170,7 +188,13 @@ "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "#/parameters/SensorScope" + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/1.0/types.json#/parameters/IotDefenderLocation" + }, + { + "$ref": "#/parameters/SiteName" }, { "$ref": "#/parameters/SensorName" @@ -192,7 +216,7 @@ } } }, - "/{scope}/providers/Microsoft.IoTSecurity/sensors/{sensorName}/downloadActivation": { + "/subscriptions/{subscriptionId}/providers/Microsoft.IoTSecurity/locations/{iotDefenderLocation}/sites/{siteName}/sensors/{sensorName}/downloadActivation": { "post": { "x-ms-examples": { "Download activation file": { @@ -212,7 +236,13 @@ "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "#/parameters/SensorScope" + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/1.0/types.json#/parameters/IotDefenderLocation" + }, + { + "$ref": "#/parameters/SiteName" }, { "$ref": "#/parameters/SensorName" @@ -235,7 +265,7 @@ } } }, - "/{scope}/providers/Microsoft.IoTSecurity/sensors/{sensorName}/downloadResetPassword": { + "/subscriptions/{subscriptionId}/providers/Microsoft.IoTSecurity/locations/{iotDefenderLocation}/sites/{siteName}/sensors/{sensorName}/downloadResetPassword": { "post": { "x-ms-examples": { "Download file for reset password of the sensor": { @@ -255,7 +285,13 @@ "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "#/parameters/SensorScope" + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/1.0/types.json#/parameters/IotDefenderLocation" + }, + { + "$ref": "#/parameters/SiteName" }, { "$ref": "#/parameters/SensorName" @@ -288,7 +324,7 @@ } } }, - "/{scope}/providers/Microsoft.IoTSecurity/sensors/{sensorName}/triggerTiPackageUpdate": { + "/subscriptions/{subscriptionId}/providers/Microsoft.IoTSecurity/locations/{iotDefenderLocation}/sites/{siteName}/sensors/{sensorName}/triggerTiPackageUpdate": { "post": { "x-ms-examples": { "Trigger threat intelligence package update": { @@ -305,7 +341,13 @@ "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "#/parameters/SensorScope" + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/1.0/types.json#/parameters/IotDefenderLocation" + }, + { + "$ref": "#/parameters/SiteName" }, { "$ref": "#/parameters/SensorName" @@ -497,15 +539,6 @@ } }, "parameters": { - "SensorScope": { - "name": "scope", - "in": "path", - "required": true, - "type": "string", - "description": "Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub)", - "x-ms-parameter-location": "method", - "x-ms-skip-url-encoding": true - }, "SensorName": { "name": "sensorName", "in": "path", @@ -523,6 +556,14 @@ "$ref": "#/definitions/SensorModel" }, "x-ms-parameter-location": "method" + }, + "SiteName": { + "name": "siteName", + "in": "path", + "required": true, + "type": "string", + "description": "IoT Site Name", + "x-ms-parameter-location": "method" } } } diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/sites.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/sites.json index 84112daa936a..30ccc6888089 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/sites.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/sites.json @@ -34,7 +34,7 @@ } }, "paths": { - "/{scope}/providers/Microsoft.IoTSecurity/sites": { + "/subscriptions/{subscriptionId}/providers/Microsoft.IoTSecurity/locations/{iotDefenderLocation}/sites": { "get": { "x-ms-examples": { "List IoT sites": { @@ -51,7 +51,10 @@ "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "#/parameters/SiteScope" + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/1.0/types.json#/parameters/IotDefenderLocation" } ], "responses": { @@ -70,7 +73,7 @@ } } }, - "/{scope}/providers/Microsoft.IoTSecurity/sites/default": { + "/subscriptions/{subscriptionId}/providers/Microsoft.IoTSecurity/locations/{iotDefenderLocation}/sites/{siteName}": { "get": { "x-ms-examples": { "Get IoT site": { @@ -87,7 +90,13 @@ "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "#/parameters/SiteScope" + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/1.0/types.json#/parameters/IotDefenderLocation" + }, + { + "$ref": "#/parameters/SiteName" } ], "responses": { @@ -121,10 +130,16 @@ "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "#/parameters/SiteScope" + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/1.0/types.json#/parameters/IotDefenderLocation" }, { "$ref": "#/parameters/SiteModel" + }, + { + "$ref": "#/parameters/SiteName" } ], "responses": { @@ -164,7 +179,13 @@ "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "#/parameters/SiteScope" + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/1.0/types.json#/parameters/IotDefenderLocation" + }, + { + "$ref": "#/parameters/SiteName" } ], "responses": { @@ -243,15 +264,6 @@ } }, "parameters": { - "SiteScope": { - "name": "scope", - "in": "path", - "required": true, - "type": "string", - "description": "Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub)", - "x-ms-parameter-location": "method", - "x-ms-skip-url-encoding": true - }, "SiteModel": { "name": "siteModel", "in": "body", @@ -261,6 +273,14 @@ "$ref": "#/definitions/SiteModel" }, "x-ms-parameter-location": "method" + }, + "SiteName": { + "name": "siteName", + "in": "path", + "required": true, + "description": "IoT Site Name", + "type": "string", + "x-ms-parameter-location": "method" } } } From 379a08ab36cfa0fdc8264cfd9480fdaf4db2f570 Mon Sep 17 00:00:00 2001 From: Orel Kayam Date: Mon, 28 Jun 2021 17:11:43 +0300 Subject: [PATCH 33/38] Add example values --- .../preview/2021-07-01-preview/sites.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/sites.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/sites.json index 30ccc6888089..cee3bcd6985c 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/sites.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/sites.json @@ -248,10 +248,14 @@ "properties": { "displayName": { "type": "string", + "example": "default", "description": "Display name of the IoT site" }, "tags": { "type": "object", + "example": { + "zone": "myZone" + }, "description": "Tags of the IoT site", "additionalProperties": { "type": "string" From be963476ec6d2c641c841f6538be978e69eb90f7 Mon Sep 17 00:00:00 2001 From: Liran Chen Date: Wed, 21 Jul 2021 10:40:51 +0300 Subject: [PATCH 34/38] alignWithMaster --- .../examples/Sensors/Delete.json | 13 - .../examples/Sensors/DownloadActivation.json | 16 - .../Sensors/DownloadResetPassword.json | 20 - .../examples/Sensors/Get.json | 38 -- .../examples/Sensors/List.json | 66 -- .../examples/Sensors/Put.json | 64 -- .../Sensors/TriggerTiPackageUpdate.json | 12 - .../examples/Sites/Delete.json | 12 - .../examples/Sites/Get.json | 32 - .../examples/Sites/List.json | 35 -- .../examples/Sites/Put.json | 63 -- .../preview/2021-07-01-preview/sensors.json | 569 ------------------ .../preview/2021-07-01-preview/sites.json | 290 --------- 13 files changed, 1230 deletions(-) delete mode 100644 specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/Delete.json delete mode 100644 specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/DownloadActivation.json delete mode 100644 specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/DownloadResetPassword.json delete mode 100644 specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/Get.json delete mode 100644 specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/List.json delete mode 100644 specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/Put.json delete mode 100644 specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/TriggerTiPackageUpdate.json delete mode 100644 specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sites/Delete.json delete mode 100644 specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sites/Get.json delete mode 100644 specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sites/List.json delete mode 100644 specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sites/Put.json delete mode 100644 specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/sensors.json delete mode 100644 specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/sites.json diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/Delete.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/Delete.json deleted file mode 100644 index 5df34bdae83b..000000000000 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/Delete.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "parameters": { - "api-version": "2021-07-01-preview", - "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", - "iotDefenderLocation": "eastus", - "siteName": "mySite", - "sensorName": "mySensor" - }, - "responses": { - "200": {}, - "204": {} - } -} diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/DownloadActivation.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/DownloadActivation.json deleted file mode 100644 index 349502cb222b..000000000000 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/DownloadActivation.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "parameters": { - "api-version": "2021-07-01-preview", - "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", - "iotDefenderLocation": "eastus", - "siteName": "mySite", "sensorName": "mySensor" - }, - "responses": { - "200": { - "headers": { - "content-type": "application/zip" - }, - "body": "{Binary}" - } - } -} diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/DownloadResetPassword.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/DownloadResetPassword.json deleted file mode 100644 index ae013f59635c..000000000000 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/DownloadResetPassword.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "parameters": { - "api-version": "2021-07-01-preview", - "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", - "iotDefenderLocation": "eastus", - "siteName": "mySite", - "sensorName": "mySensor", - "body": { - "applianceId": "3214-528AV23-D121-D3-E1" - } - }, - "responses": { - "200": { - "headers": { - "content-type": "application/zip" - }, - "body": "{Binary}" - } - } -} diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/Get.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/Get.json deleted file mode 100644 index 552b5424e5db..000000000000 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/Get.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "parameters": { - "api-version": "2021-07-01-preview", - "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", - "iotDefenderLocation": "eastus", - "siteName": "mySite", - "sensorName": "mySensor" - }, - "responses": { - "200": { - "body": { - "name": "mySensor", - "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/locations/eastus/sites/mySite/sensors/mySensor", - "type": "Microsoft.IoTSecurity/sensors", - "properties": { - "connectivityTime": "2020-11-17T12:31:25Z", - "dynamicLearning": true, - "learningMode": true, - "sensorStatus": "Ok", - "sensorVersion": "2020.11.01.1643", - "tiAutomaticUpdates": true, - "tiStatus": "Ok", - "tiVersion": "2020-11-17T12:31:25Z", - "zone": "Zone Name", - "sensorType": "Ot" - }, - "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-07-01-preview/examples/Sensors/List.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/List.json deleted file mode 100644 index f226af784724..000000000000 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/List.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "parameters": { - "api-version": "2021-07-01-preview", - "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", - "iotDefenderLocation": "eastus", - "siteName": "mySite" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "name": "mySensor", - "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/locations/eastus/sites/mySite/sensors/mySensor", - "type": "Microsoft.IoTSecurity/sensors", - "properties": { - "connectivityTime": "2020-11-17T12:31:25Z", - "dynamicLearning": true, - "learningMode": true, - "sensorStatus": "Ok", - "sensorVersion": "2020.11.01.1643", - "tiAutomaticUpdates": true, - "tiStatus": "Ok", - "tiVersion": "2020-11-17T12:31:25Z", - "zone": "Zone Name", - "sensorType": "Ot" - }, - "systemData": { - "createdBy": "string", - "createdByType": "User", - "createdAt": "2020-04-27T21:53:29.0928001Z", - "lastModifiedBy": "string", - "lastModifiedByType": "User", - "lastModifiedAt": "2020-04-27T21:53:29.0928001Z" - } - }, - { - "name": "otherSensor", - "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/locations/eastus/sites/mySite/sensors/otherSensor", - "type": "Microsoft.IoTSecurity/sensors", - "properties": { - "connectivityTime": "2020-11-17T12:31:25Z", - "dynamicLearning": false, - "learningMode": false, - "sensorStatus": "Disconnected", - "sensorVersion": "2020.11.01.1643", - "tiAutomaticUpdates": true, - "tiStatus": "Ok", - "tiVersion": "2020-11-17T12:31:25Z", - "zone": "Zone Name", - "sensorType": "Ot" - }, - "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-07-01-preview/examples/Sensors/Put.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/Put.json deleted file mode 100644 index 0f79b6ce2b27..000000000000 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/Put.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "parameters": { - "api-version": "2021-07-01-preview", - "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", - "iotDefenderLocation": "eastus", - "siteName": "mySite", - "sensorName": "mySensor", - "sensorModel": { - "properties": { - "tiAutomaticUpdates": true, - "zone": "Zone Name", - "sensorType": "Ot" - } - } - }, - "responses": { - "200": { - "body": { - "name": "mySensor", - "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/locations/eastus/sites/mySite/sensors/mySensor", - "type": "Microsoft.IoTSecurity/sensors", - "properties": { - "connectivityTime": "2020-11-17T12:31:25Z", - "dynamicLearning": true, - "learningMode": true, - "sensorStatus": "Ok", - "sensorVersion": "2020.11.01.1643", - "tiAutomaticUpdates": true, - "tiStatus": "Ok", - "tiVersion": "2020-11-17T12:31:25Z", - "zone": "Zone Name", - "sensorType": "Ot" - } - } - }, - "201": { - "body": { - "name": "mySensor", - "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/locations/eastus/sites/mySite/sensors/mySensor", - "type": "Microsoft.IoTSecurity/sensors", - "properties": { - "connectivityTime": "2020-11-17T12:31:25Z", - "dynamicLearning": true, - "learningMode": true, - "sensorStatus": "Ok", - "sensorVersion": "2020.11.01.1643", - "tiAutomaticUpdates": true, - "tiStatus": "Ok", - "tiVersion": "2020-11-17T12:31:25Z", - "zone": "Zone Name", - "sensorType": "Ot" - }, - "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-07-01-preview/examples/Sensors/TriggerTiPackageUpdate.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/TriggerTiPackageUpdate.json deleted file mode 100644 index 3be37ce01dfc..000000000000 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sensors/TriggerTiPackageUpdate.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "parameters": { - "api-version": "2021-07-01-preview", - "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", - "iotDefenderLocation": "eastus", - "siteName": "mySite", - "sensorName": "mySensor" - }, - "responses": { - "200": {} - } -} diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sites/Delete.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sites/Delete.json deleted file mode 100644 index 1fe277fdd2ba..000000000000 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sites/Delete.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "parameters": { - "api-version": "2021-07-01-preview", - "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", - "iotDefenderLocation": "eastus", - "siteName": "mySite" - }, - "responses": { - "200": {}, - "204": {} - } -} diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sites/Get.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sites/Get.json deleted file mode 100644 index bb1d14287f59..000000000000 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sites/Get.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "parameters": { - "api-version": "2021-07-01-preview", - "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", - "iotDefenderLocation": "eastus", - "siteName": "mySite" - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/locations/eastus/sites/mySite", - "type": "Microsoft.IoTSecurity/sites", - "name": "default", - "properties": { - "displayName": "IoT site name", - "tags": { - "key1": "value1", - "key2": "value2" - } - }, - "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-07-01-preview/examples/Sites/List.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sites/List.json deleted file mode 100644 index f3a9ce68f8c2..000000000000 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sites/List.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "parameters": { - "api-version": "2021-07-01-preview", - "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", - "iotDefenderLocation": "eastus" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "name": "default", - "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/locations/eastus/sites/mySite", - "type": "Microsoft.IoTSecurity/sites", - "properties": { - "displayName": "IoT site name", - "tags": { - "key1": "value1", - "key2": "value2" - } - }, - "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-07-01-preview/examples/Sites/Put.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sites/Put.json deleted file mode 100644 index b1795035869a..000000000000 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/examples/Sites/Put.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "parameters": { - "api-version": "2021-07-01-preview", - "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", - "iotDefenderLocation": "eastus", - "siteName": "mySite", - "siteModel": { - "properties": { - "displayName": "IoT site name", - "tags": { - "key1": "value1", - "key2": "value2" - } - } - } - }, - "responses": { - "200": { - "body": { - "name": "default", - "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/locations/eastus/sites/mySite", - "type": "Microsoft.IoTSecurity/sites", - "properties": { - "displayName": "IoT site name", - "tags": { - "key1": "value1", - "key2": "value2" - } - }, - "systemData": { - "createdBy": "string", - "createdByType": "User", - "createdAt": "2020-04-27T21:53:29.0928001Z", - "lastModifiedBy": "string", - "lastModifiedByType": "User", - "lastModifiedAt": "2020-04-27T21:53:29.0928001Z" - } - } - }, - "201": { - "body": { - "name": "default", - "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/locations/eastus/sites/mySite", - "type": "Microsoft.IoTSecurity/sites", - "properties": { - "displayName": "IoT site name", - "tags": { - "key1": "value1", - "key2": "value2" - } - }, - "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-07-01-preview/sensors.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/sensors.json deleted file mode 100644 index ab094a6bed73..000000000000 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/sensors.json +++ /dev/null @@ -1,569 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "Azure Defender for IoT", - "description": "API spec for Microsoft.IoTSecurity (Azure Defender for IoT) resource provider", - "version": "2021-07-01-preview" - }, - "host": "management.azure.com", - "schemes": [ - "https" - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "security": [ - { - "azure_auth": [ - "user_impersonation" - ] - } - ], - "securityDefinitions": { - "azure_auth": { - "type": "oauth2", - "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", - "flow": "implicit", - "description": "Azure Active Directory OAuth2 Flow", - "scopes": { - "user_impersonation": "impersonate your user account" - } - } - }, - "paths": { - "/subscriptions/{subscriptionId}/providers/Microsoft.IoTSecurity/locations/{iotDefenderLocation}/sites/{siteName}/sensors": { - "get": { - "x-ms-examples": { - "List IoT sensors": { - "$ref": "./examples/Sensors/List.json" - } - }, - "tags": [ - "Sensors" - ], - "description": "List IoT sensors", - "operationId": "Sensors_List", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../common/1.0/types.json#/parameters/IotDefenderLocation" - }, - { - "$ref": "#/parameters/SiteName" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/SensorsList" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" - } - } - } - } - }, - "/subscriptions/{subscriptionId}/providers/Microsoft.IoTSecurity/locations/{iotDefenderLocation}/sites/{siteName}/sensors/{sensorName}": { - "get": { - "x-ms-examples": { - "Get IoT sensor": { - "$ref": "./examples/Sensors/Get.json" - } - }, - "tags": [ - "Sensors" - ], - "operationId": "Sensors_Get", - "description": "Get IoT sensor", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../common/1.0/types.json#/parameters/IotDefenderLocation" - }, - { - "$ref": "#/parameters/SensorName" - }, - { - "$ref": "#/parameters/SiteName" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/SensorModel" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" - } - } - } - }, - "put": { - "x-ms-examples": { - "Create or update IoT sensor": { - "$ref": "./examples/Sensors/Put.json" - } - }, - "tags": [ - "Sensors" - ], - "operationId": "Sensors_CreateOrUpdate", - "description": "Create or update IoT sensor", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../common/1.0/types.json#/parameters/IotDefenderLocation" - }, - { - "$ref": "#/parameters/SensorName" - }, - { - "$ref": "#/parameters/SensorModel" - }, - { - "$ref": "#/parameters/SiteName" - } - ], - "responses": { - "200": { - "description": "Updated IoT sensor", - "schema": { - "$ref": "#/definitions/SensorModel" - } - }, - "201": { - "description": "Created IoT sensor", - "schema": { - "$ref": "#/definitions/SensorModel" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" - } - } - } - }, - "delete": { - "x-ms-examples": { - "Delete IoT sensor": { - "$ref": "./examples/Sensors/Delete.json" - } - }, - "tags": [ - "Sensors" - ], - "operationId": "Sensors_Delete", - "description": "Delete IoT sensor", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../common/1.0/types.json#/parameters/IotDefenderLocation" - }, - { - "$ref": "#/parameters/SiteName" - }, - { - "$ref": "#/parameters/SensorName" - } - ], - "responses": { - "200": { - "description": "Deleted IoT sensor" - }, - "204": { - "description": "IoT sensor does not exist" - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" - } - } - } - } - }, - "/subscriptions/{subscriptionId}/providers/Microsoft.IoTSecurity/locations/{iotDefenderLocation}/sites/{siteName}/sensors/{sensorName}/downloadActivation": { - "post": { - "x-ms-examples": { - "Download activation file": { - "$ref": "./examples/Sensors/DownloadActivation.json" - } - }, - "tags": [ - "Sensors" - ], - "operationId": "Sensors_DownloadActivation", - "description": "Download sensor activation file", - "produces": [ - "application/zip" - ], - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../common/1.0/types.json#/parameters/IotDefenderLocation" - }, - { - "$ref": "#/parameters/SiteName" - }, - { - "$ref": "#/parameters/SensorName" - } - ], - "responses": { - "200": { - "description": "Downloaded activation file", - "schema": { - "type": "object", - "format": "file" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" - } - } - } - } - }, - "/subscriptions/{subscriptionId}/providers/Microsoft.IoTSecurity/locations/{iotDefenderLocation}/sites/{siteName}/sensors/{sensorName}/downloadResetPassword": { - "post": { - "x-ms-examples": { - "Download file for reset password of the sensor": { - "$ref": "./examples/Sensors/DownloadResetPassword.json" - } - }, - "tags": [ - "Sensors" - ], - "operationId": "Sensors_DownloadResetPassword", - "description": "Download file for reset password of the sensor", - "produces": [ - "application/zip" - ], - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../common/1.0/types.json#/parameters/IotDefenderLocation" - }, - { - "$ref": "#/parameters/SiteName" - }, - { - "$ref": "#/parameters/SensorName" - }, - { - "in": "body", - "name": "body", - "required": true, - "description": "The reset password input.", - "schema": { - "$ref": "#/definitions/ResetPasswordInput" - }, - "x-ms-parameter-location": "method" - } - ], - "responses": { - "200": { - "description": "Downloaded reset password file", - "schema": { - "type": "object", - "format": "file" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" - } - } - } - } - }, - "/subscriptions/{subscriptionId}/providers/Microsoft.IoTSecurity/locations/{iotDefenderLocation}/sites/{siteName}/sensors/{sensorName}/triggerTiPackageUpdate": { - "post": { - "x-ms-examples": { - "Trigger threat intelligence package update": { - "$ref": "./examples/Sensors/TriggerTiPackageUpdate.json" - } - }, - "tags": [ - "Sensors" - ], - "operationId": "Sensors_TriggerTiPackageUpdate", - "description": "Trigger threat intelligence package update", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../common/1.0/types.json#/parameters/IotDefenderLocation" - }, - { - "$ref": "#/parameters/SiteName" - }, - { - "$ref": "#/parameters/SensorName" - } - ], - "responses": { - "200": { - "description": "Triggered threat intelligence package update" - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" - } - } - } - } - } - }, - "definitions": { - "SensorsList": { - "description": "List of IoT sensors", - "type": "object", - "properties": { - "value": { - "description": "List data", - "readOnly": true, - "type": "array", - "items": { - "$ref": "#/definitions/SensorModel" - } - } - } - }, - "SensorModel": { - "type": "object", - "description": "IoT sensor model", - "properties": { - "properties": { - "x-ms-client-flatten": true, - "description": "IoT sensor properties", - "$ref": "#/definitions/SensorProperties" - }, - "systemData": { - "readOnly": true, - "type": "object", - "description": "Azure Resource Manager metadata containing createdBy and modifiedBy information.", - "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" - } - }, - "allOf": [ - { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/Resource" - } - ] - }, - "SensorProperties": { - "type": "object", - "description": "IoT sensor properties", - "properties": { - "connectivityTime": { - "description": "Last connectivity time of the IoT sensor", - "readOnly": true, - "type": "string", - "example": "2020-11-17T12:31:25Z" - }, - "dynamicLearning": { - "description": "Dynamic mode status of the IoT sensor", - "example": true, - "readOnly": true, - "type": "boolean" - }, - "learningMode": { - "description": "Learning mode status of the IoT sensor", - "example": true, - "readOnly": true, - "type": "boolean" - }, - "sensorStatus": { - "readOnly": true, - "type": "string", - "example": "Ok", - "description": "Status of the IoT sensor", - "enum": [ - "Ok", - "Disconnected", - "Unavailable" - ], - "x-ms-enum": { - "name": "sensorStatus", - "modelAsString": true, - "values": [ - { - "value": "Ok" - }, - { - "value": "Disconnected" - }, - { - "value": "Unavailable" - } - ] - } - }, - "sensorVersion": { - "description": "Version of the IoT sensor", - "readOnly": true, - "type": "string", - "example": "2020.11.01.1643" - }, - "tiAutomaticUpdates": { - "description": "TI Automatic mode status of the IoT sensor", - "example": true, - "type": "boolean" - }, - "tiStatus": { - "readOnly": true, - "type": "string", - "example": "Ok", - "description": "TI Status of the IoT sensor", - "enum": [ - "Ok", - "Failed", - "InProgress", - "UpdateAvailable" - ], - "x-ms-enum": { - "name": "tiStatus", - "modelAsString": true, - "values": [ - { - "value": "Ok" - }, - { - "value": "Failed" - }, - { - "value": "InProgress" - }, - { - "value": "UpdateAvailable" - } - ] - } - }, - "tiVersion": { - "description": "TI Version of the IoT sensor", - "readOnly": true, - "type": "string", - "example": "2020-11-17T12:31:25Z" - }, - "zone": { - "type": "string", - "description": "Zone of the IoT sensor", - "example": "A12" - }, - "sensorType": { - "description": "Type of sensor", - "example": "Ot", - "type": "string", - "enum": [ - "Ot", - "Enterprise" - ], - "x-ms-enum": { - "name": "sensorType", - "modelAsString": true, - "values": [ - { - "value": "Ot" - }, - { - "value": "Enterprise" - } - ] - } - } - } - }, - "ResetPasswordInput": { - "type": "object", - "description": "Reset password input.", - "properties": { - "applianceId": { - "description": "The appliance id of the sensor.", - "type": "string" - } - } - } - }, - "parameters": { - "SensorName": { - "name": "sensorName", - "in": "path", - "required": true, - "type": "string", - "description": "Name of the IoT sensor", - "x-ms-parameter-location": "method" - }, - "SensorModel": { - "name": "sensorModel", - "in": "body", - "required": true, - "description": "The IoT sensor model", - "schema": { - "$ref": "#/definitions/SensorModel" - }, - "x-ms-parameter-location": "method" - }, - "SiteName": { - "name": "siteName", - "in": "path", - "required": true, - "type": "string", - "description": "IoT Site Name", - "x-ms-parameter-location": "method" - } - } -} diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/sites.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/sites.json deleted file mode 100644 index cee3bcd6985c..000000000000 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-07-01-preview/sites.json +++ /dev/null @@ -1,290 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "Azure Defender for IoT", - "description": "API spec for Microsoft.IoTSecurity (Azure Defender for IoT) resource provider", - "version": "2021-07-01-preview" - }, - "host": "management.azure.com", - "schemes": [ - "https" - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "security": [ - { - "azure_auth": [ - "user_impersonation" - ] - } - ], - "securityDefinitions": { - "azure_auth": { - "type": "oauth2", - "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", - "flow": "implicit", - "description": "Azure Active Directory OAuth2 Flow", - "scopes": { - "user_impersonation": "impersonate your user account" - } - } - }, - "paths": { - "/subscriptions/{subscriptionId}/providers/Microsoft.IoTSecurity/locations/{iotDefenderLocation}/sites": { - "get": { - "x-ms-examples": { - "List IoT sites": { - "$ref": "./examples/Sites/List.json" - } - }, - "tags": [ - "Sites" - ], - "description": "List IoT sites", - "operationId": "Sites_List", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../common/1.0/types.json#/parameters/IotDefenderLocation" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/SitesList" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" - } - } - } - } - }, - "/subscriptions/{subscriptionId}/providers/Microsoft.IoTSecurity/locations/{iotDefenderLocation}/sites/{siteName}": { - "get": { - "x-ms-examples": { - "Get IoT site": { - "$ref": "./examples/Sites/Get.json" - } - }, - "tags": [ - "Sites" - ], - "operationId": "Sites_Get", - "description": "Get IoT site", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../common/1.0/types.json#/parameters/IotDefenderLocation" - }, - { - "$ref": "#/parameters/SiteName" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/SiteModel" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" - } - } - } - }, - "put": { - "x-ms-examples": { - "Create or update IoT site": { - "$ref": "./examples/Sites/Put.json" - } - }, - "tags": [ - "Sites" - ], - "operationId": "Sites_CreateOrUpdate", - "description": "Create or update IoT site", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../common/1.0/types.json#/parameters/IotDefenderLocation" - }, - { - "$ref": "#/parameters/SiteModel" - }, - { - "$ref": "#/parameters/SiteName" - } - ], - "responses": { - "200": { - "description": "Updated IoT site", - "schema": { - "$ref": "#/definitions/SiteModel" - } - }, - "201": { - "description": "Created IoT site", - "schema": { - "$ref": "#/definitions/SiteModel" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" - } - } - } - }, - "delete": { - "x-ms-examples": { - "Delete IoT site": { - "$ref": "./examples/Sites/Delete.json" - } - }, - "tags": [ - "Sites" - ], - "operationId": "Sites_Delete", - "description": "Delete IoT site", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../common/1.0/types.json#/parameters/IotDefenderLocation" - }, - { - "$ref": "#/parameters/SiteName" - } - ], - "responses": { - "200": { - "description": "Deleted IoT site" - }, - "204": { - "description": "IoT site does not exist" - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" - } - } - } - } - } - }, - "definitions": { - "SitesList": { - "description": "List of IoT sites", - "type": "object", - "properties": { - "value": { - "description": "List data", - "readOnly": true, - "type": "array", - "items": { - "$ref": "#/definitions/SiteModel" - } - } - } - }, - "SiteModel": { - "type": "object", - "description": "IoT site model", - "properties": { - "properties": { - "x-ms-client-flatten": true, - "description": "IoT site properties", - "$ref": "#/definitions/SiteProperties" - }, - "systemData": { - "readOnly": true, - "type": "object", - "description": "Azure Resource Manager metadata containing createdBy and modifiedBy information.", - "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" - } - }, - "allOf": [ - { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ProxyResource" - } - ] - }, - "SiteProperties": { - "type": "object", - "description": "IoT site properties", - "properties": { - "displayName": { - "type": "string", - "example": "default", - "description": "Display name of the IoT site" - }, - "tags": { - "type": "object", - "example": { - "zone": "myZone" - }, - "description": "Tags of the IoT site", - "additionalProperties": { - "type": "string" - } - } - }, - "required": [ - "displayName" - ] - } - }, - "parameters": { - "SiteModel": { - "name": "siteModel", - "in": "body", - "required": true, - "description": "The IoT sites model", - "schema": { - "$ref": "#/definitions/SiteModel" - }, - "x-ms-parameter-location": "method" - }, - "SiteName": { - "name": "siteName", - "in": "path", - "required": true, - "description": "IoT Site Name", - "type": "string", - "x-ms-parameter-location": "method" - } - } -} From fb096f8a6eb0613126d250cb1be583bba71cafcf Mon Sep 17 00:00:00 2001 From: Liran Chen Date: Wed, 21 Jul 2021 10:54:07 +0300 Subject: [PATCH 35/38] Revert "Old version as PR baseline" This reverts commit d963f3af4781e43353a7994f52abb6dd1c2fde39. --- .vscode/settings.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 60d1dce046d5..76eab4509993 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -22,6 +22,6 @@ ], "typescript.tsdk": "node_modules\\typescript\\lib", "[json]": { - "editor.defaultFormatter": "vscode.json-language-features" + "editor.defaultFormatter": "esbenp.prettier-vscode" } } From 4bd81a1e1e86ef5ca75139f1e1adf49d9c5ae4a3 Mon Sep 17 00:00:00 2001 From: Liran Chen Date: Wed, 21 Jul 2021 11:04:38 +0300 Subject: [PATCH 36/38] mdeIntegration --- .../2021-02-01-preview/defenderSettings.json | 15 ++++++++++++++- .../examples/DefenderSettings/Get.json | 3 ++- .../examples/DefenderSettings/List.json | 3 ++- .../examples/DefenderSettings/Put.json | 9 ++++++--- 4 files changed, 24 insertions(+), 6 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 e74810e5f41c..10fbf386eac2 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 @@ -327,12 +327,25 @@ "format": "date-time", "description": "End time of the evaluation period, if such exist", "readOnly": true + }, + "mdeIntegration": { + "type": "string", + "enum": [ + "Disabled", + "Enabled" + ], + "description": "Integration status with MDE", + "x-ms-enum": { + "name": "MdeIntegration", + "modelAsString": true + } } }, "required": [ "deviceQuota", "sentinelWorkspaceResourceIds", - "onboardingKind" + "onboardingKind", + "mdeIntegration" ] }, "DownloadLink": { 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 82bd85a5d93d..54c386672b45 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,7 +15,8 @@ "/subscriptions/c4930e90-cd72-4aa5-93e9-2d081d129569/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace1" ], "onboardingKind": "Evaluation", - "evaluationEndTime": "2021-06-29T00:00:00.0000000Z" + "evaluationEndTime": "2021-06-29T00:00:00.0000000Z", + "mdeIntegration": "Enabled" } } } 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..d08a0980450c 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 @@ -16,7 +16,8 @@ "sentinelWorkspaceResourceIds": [ "/subscriptions/c4930e90-cd72-4aa5-93e9-2d081d129569/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace1" ], - "onboardingKind": "Default" + "onboardingKind": "Default", + "mdeIntegration": "Enabled" } } ] diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/DefenderSettings/Put.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/DefenderSettings/Put.json index 2401622c2a8b..3d95e9fec5f0 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/DefenderSettings/Put.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/DefenderSettings/Put.json @@ -8,7 +8,8 @@ "sentinelWorkspaceResourceIds": [ "/subscriptions/c4930e90-cd72-4aa5-93e9-2d081d129569/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace1" ], - "onboardingKind": "Default" + "onboardingKind": "Default", + "mdeIntegration": "Disabled" } } }, @@ -23,7 +24,8 @@ "sentinelWorkspaceResourceIds": [ "/subscriptions/c4930e90-cd72-4aa5-93e9-2d081d129569/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace1" ], - "onboardingKind": "Default" + "onboardingKind": "Default", + "mdeIntegration": "Disabled" } } }, @@ -37,7 +39,8 @@ "sentinelWorkspaceResourceIds": [ "/subscriptions/c4930e90-cd72-4aa5-93e9-2d081d129569/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace1" ], - "onboardingKind": "Default" + "onboardingKind": "Default", + "mdeIntegration": "Disabled" } } } From 7595c1abc370bc5eb864225be01c88d7861f0250 Mon Sep 17 00:00:00 2001 From: Liran Chen Date: Wed, 21 Jul 2021 12:32:10 +0300 Subject: [PATCH 37/38] switchToObject --- .../2021-02-01-preview/defenderSettings.json | 29 ++++++++++++------- .../examples/DefenderSettings/Get.json | 4 ++- .../examples/DefenderSettings/List.json | 4 ++- .../examples/DefenderSettings/Put.json | 12 ++++++-- 4 files changed, 34 insertions(+), 15 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 10fbf386eac2..3d0a550c1fc9 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 @@ -329,16 +329,25 @@ "readOnly": true }, "mdeIntegration": { - "type": "string", - "enum": [ - "Disabled", - "Enabled" - ], - "description": "Integration status with MDE", - "x-ms-enum": { - "name": "MdeIntegration", - "modelAsString": true - } + "type": "object", + "description": "MDE integration configuration", + "properties": { + "status": { + "type": "string", + "enum": [ + "Disabled", + "Enabled" + ], + "description": "Integration status", + "x-ms-enum": { + "name": "MdeIntegration", + "modelAsString": true + } + } + }, + "required": [ + "status" + ] } }, "required": [ 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 54c386672b45..b09af2e3f88d 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 @@ -16,7 +16,9 @@ ], "onboardingKind": "Evaluation", "evaluationEndTime": "2021-06-29T00:00:00.0000000Z", - "mdeIntegration": "Enabled" + "mdeIntegration": { + "status": "Enabled" + } } } } 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 d08a0980450c..65f340eab84f 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,7 +17,9 @@ "/subscriptions/c4930e90-cd72-4aa5-93e9-2d081d129569/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace1" ], "onboardingKind": "Default", - "mdeIntegration": "Enabled" + "mdeIntegration": { + "status": "Enabled" + } } } ] diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/DefenderSettings/Put.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/DefenderSettings/Put.json index 3d95e9fec5f0..2ec80853aea0 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/DefenderSettings/Put.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/DefenderSettings/Put.json @@ -9,7 +9,9 @@ "/subscriptions/c4930e90-cd72-4aa5-93e9-2d081d129569/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace1" ], "onboardingKind": "Default", - "mdeIntegration": "Disabled" + "mdeIntegration": { + "status": "Enabled" + } } } }, @@ -25,7 +27,9 @@ "/subscriptions/c4930e90-cd72-4aa5-93e9-2d081d129569/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace1" ], "onboardingKind": "Default", - "mdeIntegration": "Disabled" + "mdeIntegration": { + "status": "Enabled" + } } } }, @@ -40,7 +44,9 @@ "/subscriptions/c4930e90-cd72-4aa5-93e9-2d081d129569/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace1" ], "onboardingKind": "Default", - "mdeIntegration": "Disabled" + "mdeIntegration": { + "status": "Enabled" + } } } } From cbccca2f7613b9e7ae4e8f35d38aa6aa738032ee Mon Sep 17 00:00:00 2001 From: Liran Chen Date: Wed, 21 Jul 2021 14:12:48 +0300 Subject: [PATCH 38/38] prettier --- .../2021-02-01-preview/examples/DefenderSettings/Put.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/DefenderSettings/Put.json b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/DefenderSettings/Put.json index 2ec80853aea0..34f7013a1c67 100644 --- a/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/DefenderSettings/Put.json +++ b/specification/iotsecurity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/DefenderSettings/Put.json @@ -10,7 +10,7 @@ ], "onboardingKind": "Default", "mdeIntegration": { - "status": "Enabled" + "status": "Enabled" } } }