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

Iot sites and sensor zones #11296

Merged
merged 12 commits into from
Dec 2, 2020
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