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..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 @@ -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": "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..75d959c8d13c --- /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" + } + } + } + } + } +} 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..9918a1f91395 --- /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..3062bf75c5fe --- /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" + } + } + } + } + } +} 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 2ec20ccf9e0f..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 @@ -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": { @@ -296,14 +299,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, @@ -320,7 +323,12 @@ "IotSensorProperties": { "type": "object", "description": "IoT sensor properties", - "properties": {} + "properties": { + "zone": { + "type": "string", + "description": "Display name of the IoT zone" + } + } }, "ResetPasswordInput": { "type": "object", @@ -350,6 +358,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..085ac8e072fb --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2020-08-06-preview/iotSites.json @@ -0,0 +1,260 @@ +{ + "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": { + "displayName": { + "type": "string", + "description": "Display name of the IoT site" + }, + "tags": { + "type": "object", + "description": "Tags of the IoT site", + "additionalProperties": { + "type": "string" + } + } + }, + "required": [ + "displayName" + ] + } + }, + "parameters": { + "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 9e8651424d97..41bc1c0da32d 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/iotSites.json - Microsoft.Security/preview/2020-08-06-preview/iotAlerts.json - Microsoft.Security/preview/2020-08-06-preview/iotAlertTypes.json - Microsoft.Security/preview/2020-08-06-preview/iotRecommendations.json @@ -420,6 +421,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/iotSites.json - Microsoft.Security/preview/2020-08-06-preview/iotAlerts.json - Microsoft.Security/preview/2020-08-06-preview/iotAlertTypes.json - Microsoft.Security/preview/2020-08-06-preview/iotRecommendations.json