From 6ad2b808f7d9d1878a7e5401efa79c8d7621d8b9 Mon Sep 17 00:00:00 2001 From: Gal Moshe Date: Mon, 19 Oct 2020 10:54:15 +0300 Subject: [PATCH 01/10] 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/10] 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/10] 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/10] 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/10] 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/10] 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/10] 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/10] 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 14bec96a7f24d4d1acdac7f7c23add28272e03ee Mon Sep 17 00:00:00 2001 From: Gal Moshe Date: Mon, 23 Nov 2020 12:59:18 +0200 Subject: [PATCH 09/10] remove required tags --- .../preview/2020-08-06-preview/iotSites.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 300f17c60bc9..085ac8e072fb 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 @@ -232,8 +232,7 @@ } }, "required": [ - "displayName", - "tags" + "displayName" ] } }, From fcdac1cbc0441a5635cc7ac85f807d13a0e2e08f Mon Sep 17 00:00:00 2001 From: Gal Moshe Date: Tue, 1 Dec 2020 01:10:38 +0200 Subject: [PATCH 10/10] fix merge --- .../preview/2020-08-06-preview/iotSensors.json | 1 + 1 file changed, 1 insertion(+) 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 35591c167bf3..a8d77f3fd022 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 @@ -328,6 +328,7 @@ "type": "string", "description": "Display name of the IoT zone" } + } }, "ResetPasswordInput": { "type": "object",