Modify and delete TSL model

更新时间:
复制 MD 格式

You can modify or delete modules and features of a TSL model to keep the model aligned with your device capabilities.

Prerequisites

A TSL model is added. For more information, see Add a TSL model manually or Batch add TSL models.

Warning

If you delete or modify a TSL model definition, TSL-based communication services may become unavailable and interrupt your business. Proceed with caution.

Change the name of a custom TSL module

Important

You cannot modify the identifier of a custom 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 ID or instance name.

  3. In the navigation pane on the left, choose Device Management > Products. In the product list, find the desired product 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 side of the edit draft page, hover over a custom module and click the Edit icon that appears.

  6. In the Modify Module dialog box, change the name of the module and click OK.

    A module name can contain Chinese characters, letters, Japanese characters, digits, and underscores (_). The name must be 4 to 30 characters in length. A Chinese or Japanese character is counted as a single character.

  7. Publish the TSL model.

    Important

    Updates take effect only after you publish the TSL model.

    1. Click Publish in the lower-left corner of the Edit Draft page of Feature Definition. The Publish TSL model? dialog box appears.

    2. Click Add Publication Note, and enter a version number and version description.

      Parameter

      Description

      Version Number

      Set the version number for the current TSL model. You can manage TSL models based on version numbers later.

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

      Version Description

      Describe the current version of the TSL model. Supports Chinese characters, letters, Japanese characters, digits, and special symbols. The description can be up to 100 characters in length. A Chinese or Japanese character is counted as one character.

    3. If a published version exists, compare it with the new version to confirm the changes.

      Click Comparison Result to view the changes in the Comparison Result dialog box. After you confirm the changes, click Confirm and View. You are returned to the Publish TSL Model dialog box, and the "I have reviewed the comparison between the current version and the online version" check box is automatically selected.

      If you do not need to compare the versions, you can manually select the I have reviewed the comparison between the current version and the online version check box.

    4. Click OK to publish the TSL model.

Modify a TSL feature

Important

For an added standard feature, you cannot modify its identifier, feature type, data type, or event type.

  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

    Updates take 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 side of the edit draft page, hover over the custom module and click the Delete icon that appears.

  3. In the dialog box that appears, click OK.

  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

    Updates take effect only after you publish the TSL model.

Delete a TSL feature

Important

You cannot delete 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

    Updates take effect only after you publish the TSL model.

Related operations

API

Description

UpdateThingModel

Updates a single feature in a product's TSL model. You can also update the extended description of the TSL model.

CopyThingModel

Copies the TSL model of a specified product to a target product.

PublishThingModel

Publishes the TSL model of a specified product.

DeleteThingModel

Deletes a specified feature from a product's TSL model.