Creating an IoT Domain

Create an Internet of Things (IoT) domain that's associated to an IoT domain group. When you create digital twin resources for a device, you associate all the related digital twin resources to a specific IoT domain.

For each IoT domain, a unique device endpoint and a dedicated database schema are created with a domain short id.

  • device-host:<domain-short-id-from-device-host>.device.iot.<region>.oci.oraclecloud.com
  • Read only database schema with the digital twin definitions and telemetry data sent to and from the device: <domain-short-id-from-device-host>__IOT
Note

You can create up to 2 IoT domains in each IoT domain group. The maximum number of IoT domain groups is 5 and maximum number IoT domains is 10 for each region in your tenancy. To create an IoT domain your user must have read access for the associated IoT domain group.

All the IoT resources must be in the same region.

    1. On the Domain list page, select Create domain. If you need help finding the IoT domains list page, see Listing IoT Domains.
    2. Enter a user-friendly name for the IoT domain. Avoid entering confidential information.
    3. (Optional) Enter a description.
    4. Select a compartment where you want to store your IoT domains. Your IoT domain group and IoT domain can be in different compartments. Your IoT resources can be in different compartments, but must be in the same region.
    5. Select the associated domain group compartment, and select the domain group you want to associate to this domain. If there are no domain groups, then create a domain group.
    6. Select Create.
      Now, you can view the work request for creating the domain including the work request operation, the lifecycle status, % complete, and the date and time for the accepted, started, and finished status for the work request.

      For example, if the domain is successfully created the state displays as accepted and then a few seconds later as succeeded and the % complete at 100.

      Select the domain name to view the domain's details.

      Actions

      The domain details displays the following details about the domain, select the links or tabs to access these options.

      • View the details for the domain including the name, description, OCID, associated domain group, Compartment, including the date and time the domain was created and updated.
      • Select the domain group name to view the associated domain group details.
      • View and copy Endpoints the device host for the domain, the device host displays the domain short id. Select Copy to copy this endpoint.

        device-host:<domain-short-id>.device.iot.<region>.oci.oraclecloud.com

      • Data retention time: For any data types select Increase to update the number of days. You can only increase the number of days. The default value is 16 days for raw data, rejected data, and raw command data, the default value for historized data is 30 days.
        • Raw data: A collection of records containing raw data received from an IoT device. This includes an endpoint, received time, content type, and actual content.
        • Historized data: If the digital twin model's content is marked for historized, then the time-series data for the digital twin instances is collected for each IoT domain.
        • Rejected data: A collection of rejected records containing raw data received from an IoT device. This includes code and a detailed message containing the rejection reason.
        • Raw command data: Raw data commands are sent to digital twin instances in the IoT domain along with any response details including a delivery status.
      • Monitoring tab: View metrics for an IoT domain. For each metric chart you can view the query in Metrics Explorer, Copy the chart URL, Copy the MQL, or Create an alarm on a query.

        For a list of charts and metric details, see Internet of Things Metrics Reference, Viewing Metrics from the Monitoring Service, and Editing the MQL Expression for a Query.

      Select the Actions menu to:
      • Change data access: Select the Access type for this domain,
        • direct data access: Enter an the IAM Identity Group allowed to connect to the associated domain group data host. To add multiple Identity groups to access data for this IoT domain, select Add another Identity Group.

          Enter any of the following IAM Identity group options, a <identity-group-name> is either the Identity group of users or an Identity dynamic group. The maximum allowed Identity group names is 5.

          • If the <identity-group-name> is in the default Identity domain use this format:

            <tenancy-OCID>:<identity-group-name>

          • If the <identity-group-name> is not in the default Identity domain, use this format to specify to Identity domain name for the Identity domain group of users or the identity dynamic group:

            <tenancy-OCID>:<identity-domain-name>/<identity-group-name>

        • Oracle REST Data Services (ORDS) access: Enter the database Identity domain host name for the ORDS data host connection:

          idcs-<unique-id>.identity.oraclecloud.com

        • Oracle Application Express (APEX) access: Enter the initial APEX password for the APEX workspace for your IoT domain: <your-apex-initial-password>

          For more information, see Configuring an IoT Domain's Data Access.

      • Select Update.
      • Move the resource: Select the destination compartment to move the domain to another compartment. Select Move Resource.
      • Delete: Select Delete to delete the domain.
      • Select Edit to edit the details for this domain.
  • Use the oci iot domain create command and required parameters to create an Internet of Things (IoT) domain.

    Replace the <iot-domain-group-OCID> with the IoT domain group you want to associate to the IoT domain. Replace the <compartment-OCID> with the compartment OCID for the IoT domain:

    oci iot domain create --compartment-id <compartment-OCID> --iot-domain-group-id <iot-domain-group-OCID>

    For a complete list of parameters and values for CLI commands, see CLI Command Reference.

  • Run CreateIotDomain operation to create a domain.