Updating a Digital Twin Instance
Update a digital twin instance's adapter ID, model ID, model spec URI, authentication ID, external key, description, tags, or a display name for your Internet of Things (IoT).
When you update an existing option applied to a digital twin instance, you change only the value you can not add a new value to the digital twin instance using this update option. If you did not include the parameter you want to update when you created the digital twin instance, you can not update the value. Instead create a new digital twin instance to add a new parameter.
For example, if you create a digital twin instance without an authentication parameter for testing, then you need to create a new digital twin instance with the authentication parameter when you want to send or receive data from the digital twin instance. If the digital twin instance was created with an authentication ID, you can update the authentication ID.
- Use the update option to update the value of an existing IoT digital twin instance option.
- On the Domains list page, select the domain that you want to work with. If you need help finding the IoT domains list page or an IoT domain, see Listing IoT Domains.
- Select the Digital twin instances tab.
- Select the digital twin instance name. Select the Edit to update:
- Update the name, the description, or External key avoid entering confidential information.
- Edit the type:
- Directly connected: Connect a device or entity directly to the IoT domain. If the device or entity sends structured data, then turn on the toggle to Select an adapter. Selecting an adapter associates this digital twin instance with a transformation layer using an inbound envelope and inbound routes to convert inbound device payloads into the associated digital twin model's DTDL specification structure that's expected by the instance. If you do not see an adapter to select from the list, create an adapter.
Optional. If the device or entity sends or receives data, then you must select an authentication ID. Use a secret with basic authentication only for testing, for secure or production environments use a mTLS certificate. You can select the authentication ID or paste the authentication OCID.
- Not connected: Use this option to create a simulation-only digital twin instance without data ingestion. A digital twin model is required and must not contain telemetry or properties. Select the model from the list or select the model by entering the DTMI. After creating this digital twin instance, you can add digital twin relationships to simulate your IoT environment without the complexity of data ingestion or authentication.
- Directly connected: Connect a device or entity directly to the IoT domain. If the device or entity sends structured data, then turn on the toggle to Select an adapter. Selecting an adapter associates this digital twin instance with a transformation layer using an inbound envelope and inbound routes to convert inbound device payloads into the associated digital twin model's DTDL specification structure that's expected by the instance. If you do not see an adapter to select from the list, create an adapter.
- Select Update.
- Data: Select to view the latest snapshot data for the digital twin instance.From the Digital twin instance list, select the Actions menu at the end of the row to delete, manage tags, or copy its OCID.
If you do not include the external key, then it's generated.
Use the oci iot digital-twin-instance update command and required parameter to update a digital twin instance's existing parameter.
For example, use this command to update a digital twin instance's external key. Avoid quoting issues by not using quotes with an external key value. You can replace
<your-device-id>with a serial number, MAC address, or a device name as the external key to associate the device to the digital twin instance:oci iot digital-twin-instance update --digital-twin-instance-id <digital-twin-instance-OCID> --external-key <your-device-id>Use this command and required
<digital-twin-instance-OCID>parameter to update the optional authentication parameter for a digital twin instance. Update the value with the secret or certificate OCID, this is the device password when you send data to the device:oci iot digital-twin-instance update --digital-twin-instance-id <digital-twin-instance-OCID> --auth "<updated-auth-ocid>"For a complete list of digital twin instance parameters, see oci iot digital-twin-instance update and for a complete list of all OCI CLI commands, see CLI Command Reference.
Run the UpdateDigitalTwinInstance operation to update a digital twin instance.