Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Defender for iot/8670818 sites and sensors #11703

Merged
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,18 @@
"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": {
"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"
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,35 @@
"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": {
"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"
}
},
{
"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": {
"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"
}
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,35 @@
"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": {
"tiAutomaticUpdates": true,
"zone": "Zone Name"
}
}
},
"responses": {
"200": {
"body": {
"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": {
"tiAutomaticUpdates": true,
"zone": "Zone Name"
}
}
},
"201": {
"body": {
"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": {
"tiAutomaticUpdates": true,
"zone": "Zone Name"
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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": {}
}
}
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/IotSensor"
"$ref": "#/definitions/IotSensorsModel"
}
},
"default": {
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -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,
Expand All @@ -267,7 +270,110 @@
"IotSensorProperties": {
"type": "object",
"description": "IoT sensor properties",
"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": "Zone of the IoT sensor",
"example": "A12"
}
}
}
},
"parameters": {
Expand All @@ -287,6 +393,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"
}
}
}
Loading