You can modify or delete a Thing Specification Language (TSL) module or a TSL feature in the IoT Platform console. This topic describes how to modify or delete a TSL module.

Prerequisites

A TSL model is added. For more information, see Add a TSL feature or Batch add TSL features.
Warning After you delete or modify a feature in a TSL model, communication services that are related to the TSL model become unavailable and your business is interrupted. Proceed with caution.

Change the name of a custom TSL module

Important You cannot change the identifier of a custom TSL module.
  1. Log on to the IoT Platform console.
  2. On the Overview page, find the instance that you want to manage and click the instance name to go to the Instance Details page.
    Important Enterprise Edition instances are available in the China (Shanghai) and Japan (Tokyo) regions. If the Enterprise Edition instances are unavailable in the region that you select, skip this step.
    Overview
  3. In the left-side navigation pane, choose Devices > Products. In the product list, find the product that you want to manage and click View in the Actions column.
  4. On the Product Details page, click the Define Feature tab, and then click Edit Draft.
  5. On the left part of the Edit Draft page, move the pointer over a custom module and click the Edit icon to the right of the name of the custom module, as shown in the following figure.
    Modify the product
  6. In the Modify Module dialog box, change the name of the module and click OK.
    The name must be 4 to 30 characters in length, and can contain letters, digits, and underscores (_).
  7. Publish the TSL model.
    Important An updated TSL model takes effect only after you publish the TSL model.
    1. Choose Define Feature > Edit Draft. In the lower-left corner of the page that appears, click Release online. The Release model online? dialog box appears.
    2. Click +Add post notes, and configure the Version Number and note parameters. The following table describes the parameters.
      ParameterDescription
      Version NumberThe version number of the TSL model. You can manage the TSL model based on the version number.

      The version number must be 1 to 16 characters in length, and can contain letters, digits, and periods (.).

      noteThe description of the TSL model. The description can contain letters, digits, and special characters. The description must be 1 to 100 characters in length.
    3. If an online version is available, you must check the differences between the version that you want to release and the online version.
      Click View Differences. In the View Differences panel, you can view the differences between the versions. After you confirm the settings, click Confirm. In the Release model online? dialog box, the checkbox is automatically selected.

      If you do not want to view the differences between the versions, select "Make sure that you have verified the differences between the current version and the online version."

    4. Click OK to publish the TSL model.

Modify a TSL feature

Important After you add a TSL feature, you cannot change the identifier, type, data type, or event type of the TSL feature.
  1. On the Product Details page, click the Define Feature tab, and then click Edit Draft.
  2. On the left part of the Edit Draft page, click Default Module or the name of a custom module.
  3. On the Edit Draft page, find the TSL feature that you want to modify and click Edit in the Actions column.
  4. In the dialog box that appears, modify the parameters and click OK. For more information, see Add a TSL feature.
  5. Publish the TSL model. For more information, see Step 7 in the "Change the name of a custom TSL module" section of this topic.
    Important An updated TSL model takes effect only after you publish the TSL model.

Delete a custom TSL module

  1. On the Product Details page, click the Define Feature tab and click Edit Draft.
  2. On the left part of the Edit Draft page, move the pointer over a custom module, and click the Delete icon to the right of the name of the custom module, as shown in the following figure.
    Delete icon
  3. In the dialog box that appears, click OK.
    Confirm deletion
  4. Publish the TSL model. For more information, see Step 7 in the "Change the name of a custom TSL module" section of this topic.
    Important An updated TSL model takes effect only after you publish the TSL model.

Delete a TSL feature

Important You cannot delete a TSL feature that is specified as a required standard feature.
  1. On the Product Details page, click the Define Feature tab, and then click Edit Draft.
  2. On the left part of the Edit Draft page, click Default Module or the name of a custom module.
  3. On the Edit Draft page, find the feature that you want to delete and click Delete in the Actions column.
  4. In the dialog box that appears, click OK.
  5. Publish the TSL model. For more information, see Step 7 in the "Change the name of a custom TSL module" section of this topic.
    Important An updated TSL model takes effect only after you publish the TSL model.

Related operations

APIDescription
UpdateThingModelModifies a specified feature or extended information of the TSL model for a product.
CopyThingModelCopies the TSL model of a product to another product.
PublishThingModelPublishes the TSL model of a product.
DeleteThingModelRemoves a feature from the TSL model of a product.