Skip to content

ProductTopicProps

Properties for defining a ProductTopic.

See https://www.alibabacloud.com/help/ros/developer-reference/aliyun-iot-producttopic

Initializer

import { ProductTopicProps } from '@alicloud/ros-cdk-iot'
const productTopicProps: ProductTopicProps = { ... }

Properties

Name Type Description
operation string | @alicloud/ros-cdk-core.IResolvable Property operation: Operation permissions of devices on the topic category.
productKey string | @alicloud/ros-cdk-core.IResolvable Property productKey: The unique identifier of the product for which you want to create a topic category.
topicShortName string | @alicloud/ros-cdk-core.IResolvable Property topicShortName: The custom category hierarchy in the topic category.
desc string | @alicloud/ros-cdk-core.IResolvable Property desc: The description of the topic category.
iotInstanceId string | @alicloud/ros-cdk-core.IResolvable Property iotInstanceId: Instance ID you purchased.

operationRequired

public readonly operation: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Property operation: Operation permissions of devices on the topic category.

Value options: SUB: Subscribe. Devices can subscribe to the topics of this category. PUB: Publish. Devices can publish messages using the topics of this category. ALL: Subscribe and publish. Devices can subscribe to and publish messages to the topics of this category.


productKeyRequired

public readonly productKey: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Property productKey: The unique identifier of the product for which you want to create a topic category.


topicShortNameRequired

public readonly topicShortName: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Property topicShortName: The custom category hierarchy in the topic category.

By default, a topic category contains two system defined category hierarchies: productKey and ${deviceName}. Forward slashes (\/) are used to delimit the topic hierarchies. The format of a topic category is productKey\/${deviceName}\/topicShortName. Note The name of each category hierarchy can contain English letters, digits, and underscores (_), and cannot be empty.


descOptional

public readonly desc: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Property desc: The description of the topic category.

You can enter a description with up to 100 characters.


iotInstanceIdOptional

public readonly iotInstanceId: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Property iotInstanceId: Instance ID you purchased.

Public instances do not need pass this property.