Skip to content

Commit 67da0f6

Browse files
Merge pull request #286701 from baanders/9-13-archive-prep
ADT: Prep DPS article
2 parents 19eaec5 + a722434 commit 67da0f6

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

articles/digital-twins/how-to-provision-using-device-provisioning-service.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,17 @@ This sample uses a device simulator that includes provisioning using the Device
131131

132132
The device simulator is a thermostat-type device that uses the model with this ID: `dtmi:contosocom:DigitalTwins:Thermostat;1`. You'll need to upload this model to Azure Digital Twins before you can create a twin of this type for the device.
133133

134-
[!INCLUDE [digital-twins-thermostat-model-upload.md](../../includes/digital-twins-thermostat-model-upload.md)]
134+
The model looks like this:
135+
:::code language="json" source="~/digital-twins-docs-samples/models/Thermostat.json":::
136+
137+
To upload this model to your twins instance, run the following Azure CLI command, which uploads the above model as inline JSON. You can run the command in [Azure Cloud Shell](../cloud-shell/overview.md) in your browser (use the Bash environment), or on your machine if you have the [CLI installed locally](/cli/azure/install-azure-cli). There's one placeholder for the instance's host name (you can also use the instance's friendly name with a slight decrease in performance).
138+
139+
```azurecli-interactive
140+
az dt model create --dt-name <instance-hostname-or-name> --models '{ "@id": "dtmi:contosocom:DigitalTwins:Thermostat;1", "@type": "Interface", "@context": "dtmi:dtdl:context;2", "contents": [ { "@type": "Property", "name": "Temperature", "schema": "double" } ]}'
141+
```
142+
143+
>[!NOTE]
144+
>If you're using anything other than Cloud Shell in the Bash environment, you may need to escape certain characters in the inline JSON so that it's parsed correctly. For more information, see [Use special characters in different shells](concepts-cli.md#use-special-characters-in-different-shells).
135145
136146
For more information about models, see [Manage models](how-to-manage-model.md#upload-models).
137147

0 commit comments

Comments
 (0)