Skip to content

Commit

Permalink
Add sites, sensors and onPremiseSensors resources (Azure#12991)
Browse files Browse the repository at this point in the history
* Add Microsoft.IoTSecurity provider

* Run prettier

* Add MD

* rename files

* update MD

* resolve the Avocado

* Remove unused files

* Add operations API

* update operations.json

* update markdown

* remove dot

* re-use types

* remove comma

* Remove duplicated common types

* Use ProxyResource

* Remove IoT prefix

* Add example

* undo changes

* Run prettier

* Use capital letter

* run prettier

* Add sites, sensors and onPremiseSensors resources

* update markdowns

* run prettier

* Fix broken parameter

* Re-trigger Validations

* Add systemData

* Run prettier

* add systemData

* Run prettier

* Align changes

* Undo Microsoft.Security changes

* Add systemData to example

* Fix PR comments

* Update example

Co-authored-by: Orel Kayam <orkayam@microsoft.com>
  • Loading branch information
orkayam and Orel Kayam committed Mar 1, 2021
1 parent f0d04a6 commit 855349e
Show file tree
Hide file tree
Showing 22 changed files with 1,640 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"parameters": {
"api-version": "2021-02-01-preview",
"subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc24",
"onPremiseSensorName": "mySensor"
},
"responses": {
"200": {},
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"parameters": {
"api-version": "2021-02-01-preview",
"subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23",
"onPremiseSensorName": "mySensor"
},
"responses": {
"200": {
"headers": {
"content-type": "application/zip"
},
"body": "{Binary}"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"parameters": {
"api-version": "2021-02-01-preview",
"subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23",
"onPremiseSensorName": "mySensor",
"body": {
"applianceId": "3214-528AV23-D121-D3-E1"
}
},
"responses": {
"200": {
"headers": {
"content-type": "application/zip"
},
"body": "{Binary}"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"parameters": {
"api-version": "2021-02-01-preview",
"subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23",
"onPremiseSensorName": "mySensor"
},
"responses": {
"200": {
"body": {
"name": "mySensor",
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.IoTSecurity/onPremiseSensors/mySensor",
"type": "Microsoft.IoTSecurity/onPremiseSensors",
"properties": {},
"systemData": {
"createdBy": "string",
"createdByType": "User",
"createdAt": "2020-04-27T21:53:29.0928001Z",
"lastModifiedBy": "string",
"lastModifiedByType": "User",
"lastModifiedAt": "2020-04-27T21:53:29.0928001Z"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"parameters": {
"api-version": "2021-02-01-preview",
"subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23"
},
"responses": {
"200": {
"body": {
"value": [
{
"name": "mySensor",
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.IoTSecurity/sensors/mySensor",
"type": "Microsoft.IoTSecurity/onPremiseSensors",
"properties": {},
"systemData": {
"createdBy": "string",
"createdByType": "User",
"createdAt": "2020-04-27T21:53:29.0928001Z",
"lastModifiedBy": "string",
"lastModifiedByType": "User",
"lastModifiedAt": "2020-04-27T21:53:29.0928001Z"
}
},
{
"name": "otherSensor",
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.IoTSecurity/sensors/otherSensor",
"type": "Microsoft.IoTSecurity/onPremiseSensors",
"properties": {},
"systemData": {
"createdBy": "string",
"createdByType": "User",
"createdAt": "2020-04-27T21:53:29.0928001Z",
"lastModifiedBy": "string",
"lastModifiedByType": "User",
"lastModifiedAt": "2020-04-27T21:53:29.0928001Z"
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"parameters": {
"api-version": "2021-02-01-preview",
"subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23",
"onPremiseSensorName": "mySensor"
},
"responses": {
"200": {
"body": {
"name": "mySensor",
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.IoTSecurity/sensors/mySensor",
"type": "Microsoft.IoTSecurity/onPremiseSensors",
"properties": {},
"systemData": {
"createdBy": "string",
"createdByType": "User",
"createdAt": "2020-04-27T21:53:29.0928001Z",
"lastModifiedBy": "string",
"lastModifiedByType": "User",
"lastModifiedAt": "2020-04-27T21:53:29.0928001Z"
}
}
},
"201": {
"body": {
"name": "mySensor",
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.IoTSecurity/sensors/mySensor",
"type": "Microsoft.IoTSecurity/onPremiseSensors",
"properties": {},
"systemData": {
"createdBy": "string",
"createdByType": "User",
"createdAt": "2020-04-27T21:53:29.0928001Z",
"lastModifiedBy": "string",
"lastModifiedByType": "User",
"lastModifiedAt": "2020-04-27T21:53:29.0928001Z"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"parameters": {
"api-version": "2021-02-01-preview",
"scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub",
"sensorName": "mySensor"
},
"responses": {
"200": {},
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"parameters": {
"api-version": "2021-02-01-preview",
"scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub",
"sensorName": "mySensor"
},
"responses": {
"200": {
"headers": {
"content-type": "application/zip"
},
"body": "{Binary}"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"parameters": {
"api-version": "2021-02-01-preview",
"scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub",
"sensorName": "mySensor",
"body": {
"applianceId": "3214-528AV23-D121-D3-E1"
}
},
"responses": {
"200": {
"headers": {
"content-type": "application/zip"
},
"body": "{Binary}"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"parameters": {
"api-version": "2021-02-01-preview",
"scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub",
"sensorName": "mySensor"
},
"responses": {
"200": {
"body": {
"name": "mySensor",
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub/providers/Microsoft.IoTSecurity/sensors/mySensor",
"type": "Microsoft.IoTSecurity/sensors",
"properties": {
"connectivityTime": "2020-11-17T12:31:25Z",
"dynamicLearning": true,
"learningMode": true,
"sensorStatus": "Ok",
"sensorVersion": "2020.11.01.1643",
"tiAutomaticUpdates": true,
"tiStatus": "Ok",
"tiVersion": "2020-11-17T12:31:25Z",
"zone": "Zone Name"
},
"systemData": {
"createdBy": "string",
"createdByType": "User",
"createdAt": "2020-04-27T21:53:29.0928001Z",
"lastModifiedBy": "string",
"lastModifiedByType": "User",
"lastModifiedAt": "2020-04-27T21:53:29.0928001Z"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"parameters": {
"api-version": "2021-02-01-preview",
"scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub"
},
"responses": {
"200": {
"body": {
"value": [
{
"name": "mySensor",
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub/providers/Microsoft.IoTSecurity/sensors/mySensor",
"type": "Microsoft.IoTSecurity/sensors",
"properties": {
"connectivityTime": "2020-11-17T12:31:25Z",
"dynamicLearning": true,
"learningMode": true,
"sensorStatus": "Ok",
"sensorVersion": "2020.11.01.1643",
"tiAutomaticUpdates": true,
"tiStatus": "Ok",
"tiVersion": "2020-11-17T12:31:25Z",
"zone": "Zone Name"
},
"systemData": {
"createdBy": "string",
"createdByType": "User",
"createdAt": "2020-04-27T21:53:29.0928001Z",
"lastModifiedBy": "string",
"lastModifiedByType": "User",
"lastModifiedAt": "2020-04-27T21:53:29.0928001Z"
}
},
{
"name": "otherSensor",
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub/providers/Microsoft.IoTSecurity/sensors/otherSensor",
"type": "Microsoft.IoTSecurity/sensors",
"properties": {
"connectivityTime": "2020-11-17T12:31:25Z",
"dynamicLearning": false,
"learningMode": false,
"sensorStatus": "Disconnected",
"sensorVersion": "2020.11.01.1643",
"tiAutomaticUpdates": true,
"tiStatus": "Ok",
"tiVersion": "2020-11-17T12:31:25Z",
"zone": "Zone Name"
},
"systemData": {
"createdBy": "string",
"createdByType": "User",
"createdAt": "2020-04-27T21:53:29.0928001Z",
"lastModifiedBy": "string",
"lastModifiedByType": "User",
"lastModifiedAt": "2020-04-27T21:53:29.0928001Z"
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"parameters": {
"api-version": "2021-02-01-preview",
"scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub",
"sensorName": "mySensor",
"sensorModel": {
"properties": {
"tiAutomaticUpdates": true,
"zone": "Zone Name"
}
}
},
"responses": {
"200": {
"body": {
"name": "mySensor",
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub/providers/Microsoft.IoTSecurity/sensors/mySensor",
"type": "Microsoft.IoTSecurity/sensors",
"properties": {
"connectivityTime": "2020-11-17T12:31:25Z",
"dynamicLearning": true,
"learningMode": true,
"sensorStatus": "Ok",
"sensorVersion": "2020.11.01.1643",
"tiAutomaticUpdates": true,
"tiStatus": "Ok",
"tiVersion": "2020-11-17T12:31:25Z",
"zone": "Zone Name"
}
}
},
"201": {
"body": {
"name": "mySensor",
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub/providers/Microsoft.IoTSecurity/sensors/mySensor",
"type": "Microsoft.IoTSecurity/sensors",
"properties": {
"connectivityTime": "2020-11-17T12:31:25Z",
"dynamicLearning": true,
"learningMode": true,
"sensorStatus": "Ok",
"sensorVersion": "2020.11.01.1643",
"tiAutomaticUpdates": true,
"tiStatus": "Ok",
"tiVersion": "2020-11-17T12:31:25Z",
"zone": "Zone Name"
},
"systemData": {
"createdBy": "string",
"createdByType": "User",
"createdAt": "2020-04-27T21:53:29.0928001Z",
"lastModifiedBy": "string",
"lastModifiedByType": "User",
"lastModifiedAt": "2020-04-27T21:53:29.0928001Z"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"parameters": {
"api-version": "2021-02-01-preview",
"scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub",
"sensorName": "mySensor"
},
"responses": {
"200": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"parameters": {
"api-version": "2021-02-01-preview",
"scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/myHub"
},
"responses": {
"200": {},
"204": {}
}
}
Loading

0 comments on commit 855349e

Please sign in to comment.