From 6ad2b808f7d9d1878a7e5401efa79c8d7621d8b9 Mon Sep 17 00:00:00 2001 From: Gal Moshe Date: Mon, 19 Oct 2020 10:54:15 +0300 Subject: [PATCH 01/15] iot-sites-and-zones --- .../examples/IotSensors/Get.json | 4 +- .../examples/IotSensors/List.json | 8 +- .../examples/IotSensors/Put.json | 15 +- .../examples/iotSites/Delete.json | 10 + .../examples/iotSites/Get.json | 21 ++ .../examples/iotSites/List.json | 26 ++ .../examples/iotSites/Put.json | 45 +++ .../2020-08-06-preview/iotSensors.json | 32 ++- .../preview/2020-08-06-preview/iotSites.json | 261 ++++++++++++++++++ .../security/resource-manager/readme.md | 2 + 10 files changed, 411 insertions(+), 13 deletions(-) create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/Delete.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/Get.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/List.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/Put.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/iotSites.json diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSensors/Get.json b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSensors/Get.json index 3c79cade9456..ae21e9fcba85 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSensors/Get.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSensors/Get.json @@ -10,7 +10,9 @@ "name": "mySensor", "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub/providers/Microsoft.Security/iotSensors/mySensor", "type": "Microsoft.Security/iotSensors", - "properties": {} + "properties": { + "zone": "Zone Name" + } } } } diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSensors/List.json b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSensors/List.json index 576d3874d317..5af32f7d06f4 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSensors/List.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSensors/List.json @@ -11,13 +11,17 @@ "name": "mySensor", "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub/providers/Microsoft.Security/iotSensors/mySensor", "type": "Microsoft.Security/iotSensors", - "properties": {} + "properties": { + "zone": "Zone Name" + } }, { "name": "otherSensor", "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub/providers/Microsoft.Security/iotSensors/otherSensor", "type": "Microsoft.Security/iotSensors", - "properties": {} + "properties": { + "zone": "Zone Name" + } } ] } diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSensors/Put.json b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSensors/Put.json index 9bcb0dc2df12..8f1dd229c019 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSensors/Put.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSensors/Put.json @@ -2,7 +2,12 @@ "parameters": { "api-version": "2020-08-06-preview", "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub", - "iotSensorName": "mySensor" + "iotSensorName": "mySensor", + "iotSensorsModel": { + "properties": { + "zone": "IoT zone name" + } + } }, "responses": { "200": { @@ -10,7 +15,9 @@ "name": "mySensor", "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub/providers/Microsoft.Security/iotSensors/mySensor", "type": "Microsoft.Security/iotSensors", - "properties": {} + "properties": { + "zone": "Zone Name" + } } }, "201": { @@ -18,7 +25,9 @@ "name": "mySensor", "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub/providers/Microsoft.Security/iotSensors/mySensor", "type": "Microsoft.Security/iotSensors", - "properties": {} + "properties": { + "zone": "Zone Name" + } } } } diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/Delete.json b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/Delete.json new file mode 100644 index 000000000000..dd79858b1cc7 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/Delete.json @@ -0,0 +1,10 @@ +{ + "parameters": { + "api-version": "2020-08-06-preview", + "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/Get.json b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/Get.json new file mode 100644 index 000000000000..ba1ec4831a75 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/Get.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2020-08-06-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.Security/iotSites/default", + "type": "Microsoft.Security/iotSites", + "properties": { + "siteDisplayName": "IoT site name", + "tags": { + "key1" : "value1", + "key2" : "value2" + } + } + } + } + } +} \ No newline at end of file diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/List.json b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/List.json new file mode 100644 index 000000000000..f37edc4a165e --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/List.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "api-version": "2020-08-06-preview", + "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub/iotSites" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "default", + "id": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub/providers/Microsoft.Security/iotSites/default", + "type": "Microsoft.Security/iotSites", + "properties": { + "siteDisplayName": "IoT site name", + "tags": { + "key1" : "value1", + "key2" : "value2" + } + } + } + ] + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/Put.json b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/Put.json new file mode 100644 index 000000000000..9afaaa3a42dd --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/Put.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "api-version": "2020-08-06-preview", + "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub", + "iotSitesModel": { + "properties": { + "siteDisplayName": "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.Security/iotSites/default", + "type": "Microsoft.Security/iotSites", + "properties": { + "siteDisplayName": "IoT site name", + "tags": { + "key1" : "value1", + "key2" : "value2" + } + } + } + }, + "201": { + "body": { + "name": "default", + "id": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub/providers/Microsoft.Security/iotSites/default", + "type": "Microsoft.Security/iotSites", + "properties": { + "siteDisplayName": "IoT site name", + "tags": { + "key1" : "value1", + "key2" : "value2" + } + } + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/iotSensors.json b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/iotSensors.json index 1f2aa771251f..12d4be9998c6 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/iotSensors.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/iotSensors.json @@ -97,7 +97,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/IotSensor" + "$ref": "#/definitions/IotSensorsModel" } }, "default": { @@ -128,19 +128,22 @@ }, { "$ref": "#/parameters/IotSensorName" + }, + { + "$ref": "#/parameters/IotSensorsModel" } ], "responses": { "200": { "description": "Updated IoT sensor", "schema": { - "$ref": "#/definitions/IotSensor" + "$ref": "#/definitions/IotSensorsModel" } }, "201": { "description": "Created IoT sensor", "schema": { - "$ref": "#/definitions/IotSensor" + "$ref": "#/definitions/IotSensorsModel" } }, "default": { @@ -243,14 +246,14 @@ "readOnly": true, "type": "array", "items": { - "$ref": "#/definitions/IotSensor" + "$ref": "#/definitions/IotSensorsModel" } } } }, - "IotSensor": { + "IotSensorsModel": { "type": "object", - "description": "IoT sensor", + "description": "IoT sensor model", "properties": { "properties": { "x-ms-client-flatten": true, @@ -267,7 +270,12 @@ "IotSensorProperties": { "type": "object", "description": "IoT sensor properties", - "properties": {} + "properties": { + "zone": { + "type": "string", + "description": "Display name of the IoT zone" + } + } } }, "parameters": { @@ -287,6 +295,16 @@ "type": "string", "description": "Name of the IoT sensor", "x-ms-parameter-location": "method" + }, + "IotSensorsModel": { + "name": "iotSensorsModel", + "in": "body", + "required": true, + "description": "The IoT sensor model", + "schema": { + "$ref": "#/definitions/IotSensorsModel" + }, + "x-ms-parameter-location": "method" } } } diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/iotSites.json b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/iotSites.json new file mode 100644 index 000000000000..64f99e31cfee --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/iotSites.json @@ -0,0 +1,261 @@ +{ + "swagger": "2.0", + "info": { + "title": "Security Center", + "description": "API spec for Microsoft.Security (Azure Security Center) resource provider", + "version": "2020-08-06-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.Security/iotSites": { + "get": { + "x-ms-examples": { + "List IoT sites": { + "$ref": "./examples/IotSites/List.json" + } + }, + "tags": [ + "IoT Sites" + ], + "description": "List IoT sites", + "operationId": "IotSites_List", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + }, + { + "$ref": "#/parameters/IotSiteScope" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/IotSitesList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../common/v1/types.json#/definitions/CloudError" + } + } + } + } + }, + "/{scope}/providers/Microsoft.Security/iotSites/default": { + "get": { + "x-ms-examples": { + "Get IoT site": { + "$ref": "./examples/IotSites/Get.json" + } + }, + "tags": [ + "IoT Sites" + ], + "operationId": "IotSites_Get", + "description": "Get IoT site", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + }, + { + "$ref": "#/parameters/IotSiteScope" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/IotSitesModel" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../common/v1/types.json#/definitions/CloudError" + } + } + } + }, + "put": { + "x-ms-examples": { + "Create or update IoT site": { + "$ref": "./examples/IotSites/Put.json" + } + }, + "tags": [ + "IoT Sites" + ], + "operationId": "IotSites_CreateOrUpdate", + "description": "Create or update IoT site", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + }, + { + "$ref": "#/parameters/IotSiteScope" + }, + { + "$ref": "#/parameters/IotSitesModel" + } + ], + "responses": { + "200": { + "description": "Updated IoT site", + "schema": { + "$ref": "#/definitions/IotSitesModel" + } + }, + "201": { + "description": "Created IoT site", + "schema": { + "$ref": "#/definitions/IotSitesModel" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../common/v1/types.json#/definitions/CloudError" + } + } + } + }, + "delete": { + "x-ms-examples": { + "Delete IoT site": { + "$ref": "./examples/IotSites/Delete.json" + } + }, + "tags": [ + "IoT Sites" + ], + "operationId": "IotSites_Delete", + "description": "Delete IoT site", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + }, + { + "$ref": "#/parameters/IotSiteScope" + } + ], + "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/v1/types.json#/definitions/CloudError" + } + } + } + } + } + }, + "definitions": { + "IotSitesList": { + "description": "List of IoT sites", + "type": "object", + "properties": { + "value": { + "description": "List data", + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/IotSitesModel" + } + } + } + }, + "IotSitesModel": { + "type": "object", + "description": "IoT site model", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "description": "IoT site properties", + "$ref": "#/definitions/IotSiteProperties" + } + }, + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/Resource" + } + ] + }, + "IotSiteProperties": { + "type": "object", + "description": "IoT site properties", + "properties": { + "siteDisplayName": { + "type": "string", + "description": "Display name of the IoT site" + }, + "tags": { + "type": "object", + "description": "Tags of the IoT site", + "additionalProperties": { + "type": "string" + } + } + }, + "required": [ + "siteDisplayName", + "tags" + ] + } + }, + "parameters": { + "IotSiteScope": { + "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 + }, + "IotSitesModel": { + "name": "iotSitesModel", + "in": "body", + "required": true, + "description": "The IoT sites model", + "schema": { + "$ref": "#/definitions/IotSitesModel" + }, + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/security/resource-manager/readme.md b/specification/security/resource-manager/readme.md index 87e3b6b42e5f..831d042028a5 100644 --- a/specification/security/resource-manager/readme.md +++ b/specification/security/resource-manager/readme.md @@ -204,6 +204,7 @@ input-file: - Microsoft.Security/preview/2020-08-06-preview/iotDefenderSettings.json - Microsoft.Security/preview/2020-08-06-preview/iotSensors.json - Microsoft.Security/preview/2020-08-06-preview/onPremiseIotSensors.json +- Microsoft.Security/preview/2020-08-06-preview/iotSites.json # Needed when there is more than one input file override-info: @@ -390,6 +391,7 @@ input-file: - Microsoft.Security/preview/2020-08-06-preview/iotDefenderSettings.json - Microsoft.Security/preview/2020-08-06-preview/iotSensors.json - Microsoft.Security/preview/2020-08-06-preview/onPremiseIotSensors.json +- Microsoft.Security/preview/2020-08-06-preview/iotSites.json # Needed when there is more than one input file override-info: From ea169ec0e9495b999de77cca76db6990c4d28447 Mon Sep 17 00:00:00 2001 From: Gal Moshe Date: Tue, 20 Oct 2020 11:53:20 +0300 Subject: [PATCH 02/15] rename displayName and fix missing params --- .../preview/2020-08-06-preview/examples/IotSensors/Put.json | 2 +- .../preview/2020-08-06-preview/examples/iotSites/Get.json | 3 ++- .../preview/2020-08-06-preview/examples/iotSites/List.json | 2 +- .../preview/2020-08-06-preview/examples/iotSites/Put.json | 6 +++--- .../preview/2020-08-06-preview/iotSites.json | 4 ++-- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSensors/Put.json b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSensors/Put.json index 8f1dd229c019..2e7cebc68a1d 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSensors/Put.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSensors/Put.json @@ -5,7 +5,7 @@ "iotSensorName": "mySensor", "iotSensorsModel": { "properties": { - "zone": "IoT zone name" + "zone": "Zone Name" } } }, diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/Get.json b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/Get.json index ba1ec4831a75..d152210b95f8 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/Get.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/Get.json @@ -8,8 +8,9 @@ "body": { "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub/providers/Microsoft.Security/iotSites/default", "type": "Microsoft.Security/iotSites", + "name": "default", "properties": { - "siteDisplayName": "IoT site name", + "displayName": "IoT site name", "tags": { "key1" : "value1", "key2" : "value2" diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/List.json b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/List.json index f37edc4a165e..36f02fe8e1b2 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/List.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/List.json @@ -12,7 +12,7 @@ "id": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub/providers/Microsoft.Security/iotSites/default", "type": "Microsoft.Security/iotSites", "properties": { - "siteDisplayName": "IoT site name", + "displayName": "IoT site name", "tags": { "key1" : "value1", "key2" : "value2" diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/Put.json b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/Put.json index 9afaaa3a42dd..b9449f107fa7 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/Put.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/Put.json @@ -4,7 +4,7 @@ "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub", "iotSitesModel": { "properties": { - "siteDisplayName": "IoT site name", + "displayName": "IoT site name", "tags": { "key1" : "value1", "key2" : "value2" @@ -19,7 +19,7 @@ "id": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub/providers/Microsoft.Security/iotSites/default", "type": "Microsoft.Security/iotSites", "properties": { - "siteDisplayName": "IoT site name", + "displayName": "IoT site name", "tags": { "key1" : "value1", "key2" : "value2" @@ -33,7 +33,7 @@ "id": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub/providers/Microsoft.Security/iotSites/default", "type": "Microsoft.Security/iotSites", "properties": { - "siteDisplayName": "IoT site name", + "displayName": "IoT site name", "tags": { "key1" : "value1", "key2" : "value2" diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/iotSites.json b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/iotSites.json index 64f99e31cfee..300f17c60bc9 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/iotSites.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/iotSites.json @@ -219,7 +219,7 @@ "type": "object", "description": "IoT site properties", "properties": { - "siteDisplayName": { + "displayName": { "type": "string", "description": "Display name of the IoT site" }, @@ -232,7 +232,7 @@ } }, "required": [ - "siteDisplayName", + "displayName", "tags" ] } From 13d3f1de2319f40c7a85126bb534c6e03698fffe Mon Sep 17 00:00:00 2001 From: Gal Moshe Date: Sun, 25 Oct 2020 08:48:22 +0200 Subject: [PATCH 03/15] change caps mistake --- .../examples/IotSites/Delete.json | 10 +++++ .../examples/IotSites/Get.json | 22 +++++++++ .../examples/IotSites/List.json | 26 +++++++++++ .../examples/IotSites/Put.json | 45 +++++++++++++++++++ 4 files changed, 103 insertions(+) create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSites/Delete.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSites/Get.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSites/List.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSites/Put.json diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSites/Delete.json b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSites/Delete.json new file mode 100644 index 000000000000..dd79858b1cc7 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSites/Delete.json @@ -0,0 +1,10 @@ +{ + "parameters": { + "api-version": "2020-08-06-preview", + "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSites/Get.json b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSites/Get.json new file mode 100644 index 000000000000..d152210b95f8 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSites/Get.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "api-version": "2020-08-06-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.Security/iotSites/default", + "type": "Microsoft.Security/iotSites", + "name": "default", + "properties": { + "displayName": "IoT site name", + "tags": { + "key1" : "value1", + "key2" : "value2" + } + } + } + } + } +} \ No newline at end of file diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSites/List.json b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSites/List.json new file mode 100644 index 000000000000..36f02fe8e1b2 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSites/List.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "api-version": "2020-08-06-preview", + "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub/iotSites" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "default", + "id": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub/providers/Microsoft.Security/iotSites/default", + "type": "Microsoft.Security/iotSites", + "properties": { + "displayName": "IoT site name", + "tags": { + "key1" : "value1", + "key2" : "value2" + } + } + } + ] + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSites/Put.json b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSites/Put.json new file mode 100644 index 000000000000..b9449f107fa7 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSites/Put.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "api-version": "2020-08-06-preview", + "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub", + "iotSitesModel": { + "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.Security/iotSites/default", + "type": "Microsoft.Security/iotSites", + "properties": { + "displayName": "IoT site name", + "tags": { + "key1" : "value1", + "key2" : "value2" + } + } + } + }, + "201": { + "body": { + "name": "default", + "id": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub/providers/Microsoft.Security/iotSites/default", + "type": "Microsoft.Security/iotSites", + "properties": { + "displayName": "IoT site name", + "tags": { + "key1" : "value1", + "key2" : "value2" + } + } + } + } + } +} From f395fc2c3836185d6b2693080d2823898d314911 Mon Sep 17 00:00:00 2001 From: Gal Moshe Date: Sun, 25 Oct 2020 09:00:45 +0200 Subject: [PATCH 04/15] prettier run changes --- .../2020-08-06-preview/examples/IotSites/Get.json | 6 +++--- .../2020-08-06-preview/examples/IotSites/List.json | 4 ++-- .../2020-08-06-preview/examples/IotSites/Put.json | 12 ++++++------ .../2020-08-06-preview/examples/iotSites/Get.json | 6 +++--- .../2020-08-06-preview/examples/iotSites/List.json | 4 ++-- .../2020-08-06-preview/examples/iotSites/Put.json | 12 ++++++------ 6 files changed, 22 insertions(+), 22 deletions(-) diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSites/Get.json b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSites/Get.json index d152210b95f8..75d959c8d13c 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSites/Get.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSites/Get.json @@ -12,11 +12,11 @@ "properties": { "displayName": "IoT site name", "tags": { - "key1" : "value1", - "key2" : "value2" + "key1": "value1", + "key2": "value2" } } } } } -} \ No newline at end of file +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSites/List.json b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSites/List.json index 36f02fe8e1b2..9918a1f91395 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSites/List.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSites/List.json @@ -14,8 +14,8 @@ "properties": { "displayName": "IoT site name", "tags": { - "key1" : "value1", - "key2" : "value2" + "key1": "value1", + "key2": "value2" } } } diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSites/Put.json b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSites/Put.json index b9449f107fa7..3062bf75c5fe 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSites/Put.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSites/Put.json @@ -6,8 +6,8 @@ "properties": { "displayName": "IoT site name", "tags": { - "key1" : "value1", - "key2" : "value2" + "key1": "value1", + "key2": "value2" } } } @@ -21,8 +21,8 @@ "properties": { "displayName": "IoT site name", "tags": { - "key1" : "value1", - "key2" : "value2" + "key1": "value1", + "key2": "value2" } } } @@ -35,8 +35,8 @@ "properties": { "displayName": "IoT site name", "tags": { - "key1" : "value1", - "key2" : "value2" + "key1": "value1", + "key2": "value2" } } } diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/Get.json b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/Get.json index d152210b95f8..75d959c8d13c 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/Get.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/Get.json @@ -12,11 +12,11 @@ "properties": { "displayName": "IoT site name", "tags": { - "key1" : "value1", - "key2" : "value2" + "key1": "value1", + "key2": "value2" } } } } } -} \ No newline at end of file +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/List.json b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/List.json index 36f02fe8e1b2..9918a1f91395 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/List.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/List.json @@ -14,8 +14,8 @@ "properties": { "displayName": "IoT site name", "tags": { - "key1" : "value1", - "key2" : "value2" + "key1": "value1", + "key2": "value2" } } } diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/Put.json b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/Put.json index b9449f107fa7..3062bf75c5fe 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/Put.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/Put.json @@ -6,8 +6,8 @@ "properties": { "displayName": "IoT site name", "tags": { - "key1" : "value1", - "key2" : "value2" + "key1": "value1", + "key2": "value2" } } } @@ -21,8 +21,8 @@ "properties": { "displayName": "IoT site name", "tags": { - "key1" : "value1", - "key2" : "value2" + "key1": "value1", + "key2": "value2" } } } @@ -35,8 +35,8 @@ "properties": { "displayName": "IoT site name", "tags": { - "key1" : "value1", - "key2" : "value2" + "key1": "value1", + "key2": "value2" } } } From e4c9602a891b5028df5ec2028d79b0be6fb8a79c Mon Sep 17 00:00:00 2001 From: galmoshe <33285417+galmoshe@users.noreply.github.com> Date: Sun, 25 Oct 2020 09:21:04 +0200 Subject: [PATCH 05/15] Delete Get.json --- .../examples/iotSites/Get.json | 22 ------------------- 1 file changed, 22 deletions(-) delete mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/Get.json diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/Get.json b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/Get.json deleted file mode 100644 index 75d959c8d13c..000000000000 --- a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/Get.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "parameters": { - "api-version": "2020-08-06-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.Security/iotSites/default", - "type": "Microsoft.Security/iotSites", - "name": "default", - "properties": { - "displayName": "IoT site name", - "tags": { - "key1": "value1", - "key2": "value2" - } - } - } - } - } -} From 49a5323d898f94f7fb4411d0cb420b6d68228cf5 Mon Sep 17 00:00:00 2001 From: galmoshe <33285417+galmoshe@users.noreply.github.com> Date: Sun, 25 Oct 2020 09:21:34 +0200 Subject: [PATCH 06/15] Delete Delete.json --- .../2020-08-06-preview/examples/iotSites/Delete.json | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/Delete.json diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/Delete.json b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/Delete.json deleted file mode 100644 index dd79858b1cc7..000000000000 --- a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/Delete.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "parameters": { - "api-version": "2020-08-06-preview", - "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub" - }, - "responses": { - "200": {}, - "204": {} - } -} From d35e73e920027031e7db4e4de1f506a5353678b9 Mon Sep 17 00:00:00 2001 From: galmoshe <33285417+galmoshe@users.noreply.github.com> Date: Sun, 25 Oct 2020 09:21:56 +0200 Subject: [PATCH 07/15] Delete Put.json --- .../examples/iotSites/Put.json | 45 ------------------- 1 file changed, 45 deletions(-) delete mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/Put.json diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/Put.json b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/Put.json deleted file mode 100644 index 3062bf75c5fe..000000000000 --- a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/Put.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "parameters": { - "api-version": "2020-08-06-preview", - "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub", - "iotSitesModel": { - "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.Security/iotSites/default", - "type": "Microsoft.Security/iotSites", - "properties": { - "displayName": "IoT site name", - "tags": { - "key1": "value1", - "key2": "value2" - } - } - } - }, - "201": { - "body": { - "name": "default", - "id": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub/providers/Microsoft.Security/iotSites/default", - "type": "Microsoft.Security/iotSites", - "properties": { - "displayName": "IoT site name", - "tags": { - "key1": "value1", - "key2": "value2" - } - } - } - } - } -} From b9f5bfd53843bb516dda993b015c0dd27b399e8a Mon Sep 17 00:00:00 2001 From: galmoshe <33285417+galmoshe@users.noreply.github.com> Date: Sun, 25 Oct 2020 09:22:14 +0200 Subject: [PATCH 08/15] Delete List.json --- .../examples/iotSites/List.json | 26 ------------------- 1 file changed, 26 deletions(-) delete mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/List.json diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/List.json b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/List.json deleted file mode 100644 index 9918a1f91395..000000000000 --- a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/iotSites/List.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "parameters": { - "api-version": "2020-08-06-preview", - "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub/iotSites" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "name": "default", - "id": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub/providers/Microsoft.Security/iotSites/default", - "type": "Microsoft.Security/iotSites", - "properties": { - "displayName": "IoT site name", - "tags": { - "key1": "value1", - "key2": "value2" - } - } - } - ] - } - } - } -} From 1a72a9153b962395aa1f37bdbd5218882ae9ee64 Mon Sep 17 00:00:00 2001 From: Ami Hollander Date: Tue, 17 Nov 2020 14:04:40 +0200 Subject: [PATCH 09/15] added sensor's properties --- .../examples/IotSensors/Get.json | 9 ++ .../examples/IotSensors/List.json | 18 ++++ .../examples/IotSensors/Put.json | 3 + .../2020-08-06-preview/iotSensors.json | 100 +++++++++++++++++- 4 files changed, 129 insertions(+), 1 deletion(-) diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSensors/Get.json b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSensors/Get.json index ae21e9fcba85..31302b50d1f5 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSensors/Get.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSensors/Get.json @@ -11,6 +11,15 @@ "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub/providers/Microsoft.Security/iotSensors/mySensor", "type": "Microsoft.Security/iotSensors", "properties": { + "connectivityTime": "2020-11-17T12:31:25Z", + "creationTime": "2020-11-17T12:31:25Z", + "dynamicLearning": true, + "learningMode": true, + "sensorStatus": "Connected", + "sensorVersion": "2020.11.01.1643", + "tiAutomaticUpdates": true, + "tiStatus": "Ok", + "tiVersion": "2020-11-17T12:31:25Z", "zone": "Zone Name" } } diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSensors/List.json b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSensors/List.json index 5af32f7d06f4..6bade193d202 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSensors/List.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSensors/List.json @@ -12,6 +12,15 @@ "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub/providers/Microsoft.Security/iotSensors/mySensor", "type": "Microsoft.Security/iotSensors", "properties": { + "connectivityTime": "2020-11-17T12:31:25Z", + "creationTime": "2020-11-17T12:31:25Z", + "dynamicLearning": true, + "learningMode": true, + "sensorStatus": "Connected", + "sensorVersion": "2020.11.01.1643", + "tiAutomaticUpdates": true, + "tiStatus": "Ok", + "tiVersion": "2020-11-17T12:31:25Z", "zone": "Zone Name" } }, @@ -20,6 +29,15 @@ "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub/providers/Microsoft.Security/iotSensors/otherSensor", "type": "Microsoft.Security/iotSensors", "properties": { + "connectivityTime": "2020-11-17T12:31:25Z", + "creationTime": "2020-11-17T12:31:25Z", + "dynamicLearning": false, + "learningMode": false, + "sensorStatus": "NotActivated", + "sensorVersion": "2020.11.01.1643", + "tiAutomaticUpdates": true, + "tiStatus": "Ok", + "tiVersion": "2020-11-17T12:31:25Z", "zone": "Zone Name" } } diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSensors/Put.json b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSensors/Put.json index 2e7cebc68a1d..0763277e5ca9 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSensors/Put.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSensors/Put.json @@ -5,6 +5,7 @@ "iotSensorName": "mySensor", "iotSensorsModel": { "properties": { + "tiAutomaticUpdates": true, "zone": "Zone Name" } } @@ -16,6 +17,7 @@ "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub/providers/Microsoft.Security/iotSensors/mySensor", "type": "Microsoft.Security/iotSensors", "properties": { + "tiAutomaticUpdates": true, "zone": "Zone Name" } } @@ -26,6 +28,7 @@ "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub/providers/Microsoft.Security/iotSensors/mySensor", "type": "Microsoft.Security/iotSensors", "properties": { + "tiAutomaticUpdates": true, "zone": "Zone Name" } } diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/iotSensors.json b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/iotSensors.json index 12d4be9998c6..debb71d49b0c 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/iotSensors.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/iotSensors.json @@ -271,9 +271,107 @@ "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" + }, + "creationTime": { + "description": "Creation 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": "Connected", + "description": "Status of the IoT sensor", + "enum": [ + "Connected", + "Disconnected", + "NotActivated" + ], + "x-ms-enum": { + "name": "sensorStatus", + "modelAsString": true, + "values": [ + { + "value": "Connected" + }, + { + "value": "Disconnected" + }, + { + "value": "NotActivated" + } + ] + } + }, + "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": "Connected", + "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": "Display name of the IoT zone" + "description": "Zone of the IoT sensor", + "example": "A12" } } } From 22a93e1606a9bc01e7cae1b4da9df12622e024b5 Mon Sep 17 00:00:00 2001 From: Ami Hollander Date: Tue, 17 Nov 2020 14:23:55 +0200 Subject: [PATCH 10/15] fix specification/security/resource-manager/readme.md --- specification/security/resource-manager/readme.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/specification/security/resource-manager/readme.md b/specification/security/resource-manager/readme.md index 41bc1c0da32d..f7fa210c5ad1 100644 --- a/specification/security/resource-manager/readme.md +++ b/specification/security/resource-manager/readme.md @@ -213,6 +213,7 @@ input-file: - Microsoft.Security/preview/2020-08-06-preview/iotSensors.json - Microsoft.Security/preview/2020-08-06-preview/devices.json - Microsoft.Security/preview/2020-08-06-preview/onPremiseIotSensors.json +- Microsoft.Security/preview/2020-08-06-preview/iotSensors.json - Microsoft.Security/preview/2020-08-06-preview/iotSites.json - Microsoft.Security/preview/2020-08-06-preview/iotAlerts.json - Microsoft.Security/preview/2020-08-06-preview/iotAlertTypes.json @@ -387,7 +388,7 @@ input-file: - Microsoft.Security/stable/2020-01-01/securitySolutionsReferenceData.json - Microsoft.Security/stable/2020-01-01/externalSecuritySolutions.json - Microsoft.Security/stable/2020-01-01/jitNetworkAccessPolicies.json -- Microsoft.Security/stable/2020-01-01/serverVulnerabilityAssessments.json +- Microsoft.Security/stable/2020-01-01/serverVulnerabilityAssessments.json - Microsoft.Security/stable/2020-01-01/topologies.json - Microsoft.Security/stable/2020-01-01/secureScore.json @@ -421,6 +422,7 @@ input-file: - Microsoft.Security/preview/2020-08-06-preview/iotSensors.json - Microsoft.Security/preview/2020-08-06-preview/devices.json - Microsoft.Security/preview/2020-08-06-preview/onPremiseIotSensors.json +- Microsoft.Security/preview/2020-08-06-preview/iotSensors.json - Microsoft.Security/preview/2020-08-06-preview/iotSites.json - Microsoft.Security/preview/2020-08-06-preview/iotAlerts.json - Microsoft.Security/preview/2020-08-06-preview/iotAlertTypes.json From 07a676b81cdd5b4a9b32848e40cfe38a53a45ae3 Mon Sep 17 00:00:00 2001 From: Ami Hollander Date: Tue, 17 Nov 2020 14:31:15 +0200 Subject: [PATCH 11/15] clean redundant lines in readme --- specification/security/resource-manager/readme.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/specification/security/resource-manager/readme.md b/specification/security/resource-manager/readme.md index f7fa210c5ad1..09c6332c1981 100644 --- a/specification/security/resource-manager/readme.md +++ b/specification/security/resource-manager/readme.md @@ -213,7 +213,6 @@ input-file: - Microsoft.Security/preview/2020-08-06-preview/iotSensors.json - Microsoft.Security/preview/2020-08-06-preview/devices.json - Microsoft.Security/preview/2020-08-06-preview/onPremiseIotSensors.json -- Microsoft.Security/preview/2020-08-06-preview/iotSensors.json - Microsoft.Security/preview/2020-08-06-preview/iotSites.json - Microsoft.Security/preview/2020-08-06-preview/iotAlerts.json - Microsoft.Security/preview/2020-08-06-preview/iotAlertTypes.json @@ -422,7 +421,6 @@ input-file: - Microsoft.Security/preview/2020-08-06-preview/iotSensors.json - Microsoft.Security/preview/2020-08-06-preview/devices.json - Microsoft.Security/preview/2020-08-06-preview/onPremiseIotSensors.json -- Microsoft.Security/preview/2020-08-06-preview/iotSensors.json - Microsoft.Security/preview/2020-08-06-preview/iotSites.json - Microsoft.Security/preview/2020-08-06-preview/iotAlerts.json - Microsoft.Security/preview/2020-08-06-preview/iotAlertTypes.json From c480d0512d916e1d4a5d5b0758a190797816d961 Mon Sep 17 00:00:00 2001 From: Ami Hollander Date: Tue, 17 Nov 2020 15:51:08 +0200 Subject: [PATCH 12/15] prettier-fix --- .../preview/2020-08-06-preview/iotSensors.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/iotSensors.json b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/iotSensors.json index debb71d49b0c..567afa2ec95e 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/iotSensors.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/iotSensors.json @@ -324,7 +324,7 @@ "sensorVersion": { "description": "Version of the IoT sensor", "readOnly": true, - "type":"string", + "type": "string", "example": "2020.11.01.1643" }, "tiAutomaticUpdates": { From fd46fb6d6b7d87095d7d6ee9d1e0d7b7e51ba0b0 Mon Sep 17 00:00:00 2001 From: Ami Hollander Date: Wed, 25 Nov 2020 13:51:27 +0200 Subject: [PATCH 13/15] put should return whole object --- .../examples/IotSensors/Put.json | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSensors/Put.json b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSensors/Put.json index 0763277e5ca9..b57cdb5dadf9 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSensors/Put.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSensors/Put.json @@ -17,7 +17,15 @@ "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub/providers/Microsoft.Security/iotSensors/mySensor", "type": "Microsoft.Security/iotSensors", "properties": { + "connectivityTime": "2020-11-17T12:31:25Z", + "creationTime": "2020-11-17T12:31:25Z", + "dynamicLearning": true, + "learningMode": true, + "sensorStatus": "Connected", + "sensorVersion": "2020.11.01.1643", "tiAutomaticUpdates": true, + "tiStatus": "Ok", + "tiVersion": "2020-11-17T12:31:25Z", "zone": "Zone Name" } } @@ -28,8 +36,16 @@ "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub/providers/Microsoft.Security/iotSensors/mySensor", "type": "Microsoft.Security/iotSensors", "properties": { - "tiAutomaticUpdates": true, - "zone": "Zone Name" + "connectivityTime": "2020-11-17T12:31:25Z", + "creationTime": "2020-11-17T12:31:25Z", + "dynamicLearning": true, + "learningMode": true, + "sensorStatus": "Connected", + "sensorVersion": "2020.11.01.1643", + "tiAutomaticUpdates": true, + "tiStatus": "Ok", + "tiVersion": "2020-11-17T12:31:25Z", + "zone": "Zone Name" } } } From 16e891569204fd48981df0eb3ff7e98fcb058188 Mon Sep 17 00:00:00 2001 From: Ami Hollander Date: Wed, 25 Nov 2020 14:32:29 +0200 Subject: [PATCH 14/15] indentation fix --- .../examples/IotSensors/Put.json | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSensors/Put.json b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSensors/Put.json index b57cdb5dadf9..4ff6a8f694f5 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSensors/Put.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSensors/Put.json @@ -36,16 +36,16 @@ "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub/providers/Microsoft.Security/iotSensors/mySensor", "type": "Microsoft.Security/iotSensors", "properties": { - "connectivityTime": "2020-11-17T12:31:25Z", - "creationTime": "2020-11-17T12:31:25Z", - "dynamicLearning": true, - "learningMode": true, - "sensorStatus": "Connected", - "sensorVersion": "2020.11.01.1643", - "tiAutomaticUpdates": true, - "tiStatus": "Ok", - "tiVersion": "2020-11-17T12:31:25Z", - "zone": "Zone Name" + "connectivityTime": "2020-11-17T12:31:25Z", + "creationTime": "2020-11-17T12:31:25Z", + "dynamicLearning": true, + "learningMode": true, + "sensorStatus": "Connected", + "sensorVersion": "2020.11.01.1643", + "tiAutomaticUpdates": true, + "tiStatus": "Ok", + "tiVersion": "2020-11-17T12:31:25Z", + "zone": "Zone Name" } } } From 887c13990356049f6b4d1cca7abcc538c9ac6bbe Mon Sep 17 00:00:00 2001 From: Ami Hollander Date: Tue, 1 Dec 2020 14:59:33 +0200 Subject: [PATCH 15/15] fix enum values --- .../2020-08-06-preview/examples/IotSensors/Get.json | 2 +- .../2020-08-06-preview/examples/IotSensors/List.json | 4 ++-- .../2020-08-06-preview/examples/IotSensors/Put.json | 4 ++-- .../preview/2020-08-06-preview/iotSensors.json | 12 ++++++------ 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSensors/Get.json b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSensors/Get.json index 31302b50d1f5..88cf6c2b21e4 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSensors/Get.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSensors/Get.json @@ -15,7 +15,7 @@ "creationTime": "2020-11-17T12:31:25Z", "dynamicLearning": true, "learningMode": true, - "sensorStatus": "Connected", + "sensorStatus": "Ok", "sensorVersion": "2020.11.01.1643", "tiAutomaticUpdates": true, "tiStatus": "Ok", diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSensors/List.json b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSensors/List.json index 6bade193d202..42674fc40b43 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSensors/List.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSensors/List.json @@ -16,7 +16,7 @@ "creationTime": "2020-11-17T12:31:25Z", "dynamicLearning": true, "learningMode": true, - "sensorStatus": "Connected", + "sensorStatus": "Ok", "sensorVersion": "2020.11.01.1643", "tiAutomaticUpdates": true, "tiStatus": "Ok", @@ -33,7 +33,7 @@ "creationTime": "2020-11-17T12:31:25Z", "dynamicLearning": false, "learningMode": false, - "sensorStatus": "NotActivated", + "sensorStatus": "Disconnected", "sensorVersion": "2020.11.01.1643", "tiAutomaticUpdates": true, "tiStatus": "Ok", diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSensors/Put.json b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSensors/Put.json index 4ff6a8f694f5..5ff0cdab892e 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSensors/Put.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/examples/IotSensors/Put.json @@ -21,7 +21,7 @@ "creationTime": "2020-11-17T12:31:25Z", "dynamicLearning": true, "learningMode": true, - "sensorStatus": "Connected", + "sensorStatus": "Ok", "sensorVersion": "2020.11.01.1643", "tiAutomaticUpdates": true, "tiStatus": "Ok", @@ -40,7 +40,7 @@ "creationTime": "2020-11-17T12:31:25Z", "dynamicLearning": true, "learningMode": true, - "sensorStatus": "Connected", + "sensorStatus": "Ok", "sensorVersion": "2020.11.01.1643", "tiAutomaticUpdates": true, "tiStatus": "Ok", diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/iotSensors.json b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/iotSensors.json index f70f38fbb2f2..c129ae9a8e67 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/iotSensors.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/iotSensors.json @@ -351,25 +351,25 @@ "sensorStatus": { "readOnly": true, "type": "string", - "example": "Connected", + "example": "Ok", "description": "Status of the IoT sensor", "enum": [ - "Connected", + "Ok", "Disconnected", - "NotActivated" + "Unavailable" ], "x-ms-enum": { "name": "sensorStatus", "modelAsString": true, "values": [ { - "value": "Connected" + "value": "Ok" }, { "value": "Disconnected" }, { - "value": "NotActivated" + "value": "Unavailable" } ] } @@ -388,7 +388,7 @@ "tiStatus": { "readOnly": true, "type": "string", - "example": "Connected", + "example": "Ok", "description": "TI Status of the IoT sensor", "enum": [ "Ok",