Skip to content

Commit

Permalink
Iot sites and sensor zones (Azure#11296)
Browse files Browse the repository at this point in the history
* iot-sites-and-zones

* rename displayName and fix missing params

* change caps mistake

* prettier run changes

* Delete Get.json

* Delete Delete.json

* Delete Put.json

* Delete List.json

* remove required tags

* fix merge

Co-authored-by: Gal Moshe <gamoshe@microsoft.com>
Co-authored-by: Gal Moshe <gamoshe@gamoshe.local>
  • Loading branch information
3 people authored and giromm2ms committed Dec 20, 2020
1 parent 2a43d32 commit cf995c7
Show file tree
Hide file tree
Showing 10 changed files with 411 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,32 @@
"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": {
"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": {
"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": {
"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 @@ -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,
Expand All @@ -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",
Expand Down Expand Up @@ -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"
}
}
}
Loading

0 comments on commit cf995c7

Please sign in to comment.