Product
This class encapsulates and extends the ROS resource type ALIYUN::IOT::Product
, which is used to create a product.
Initializers
import com.aliyun.ros.cdk.iot.Product;
Product.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
.nodeType(java.lang.Number)
.nodeType(IResolvable)
.productName(java.lang.String)
.productName(IResolvable)
// .aliyunCommodityCode(java.lang.String)
// .aliyunCommodityCode(IResolvable)
// .authType(java.lang.String)
// .authType(IResolvable)
// .categoryKey(java.lang.String)
// .categoryKey(IResolvable)
// .dataFormat(java.lang.Number)
// .dataFormat(IResolvable)
// .description(java.lang.String)
// .description(IResolvable)
// .id2(java.lang.Boolean)
// .id2(IResolvable)
// .iotInstanceId(java.lang.String)
// .iotInstanceId(IResolvable)
// .joinPermissionId(java.lang.String)
// .joinPermissionId(IResolvable)
// .netType(java.lang.String)
// .netType(IResolvable)
// .protocolType(java.lang.String)
// .protocolType(IResolvable)
// .publishAuto(java.lang.Boolean)
// .publishAuto(IResolvable)
// .resourceGroupId(java.lang.String)
// .resourceGroupId(IResolvable)
.build();
Name | Type | Description |
---|---|---|
scope |
com.aliyun.ros.cdk.core.Construct |
No description. |
id |
java.lang.String |
No description. |
enableResourcePropertyConstraint |
java.lang.Boolean |
No description. |
nodeType |
java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable |
Property nodeType: The node type of the product. |
productName |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property productName: The name of the product. |
aliyunCommodityCode |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property aliyunCommodityCode: The edition of the product that you want to create. |
authType |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property authType: Authentication device to access the Internet of Things platform under the product. |
categoryKey |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property categoryKey: Identifier Product category. |
dataFormat |
java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable |
Property dataFormat: You must specify this parameter if the value of AliyunCommodityCode is iothub_senior. |
description |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property description: A description of the product. |
id2 |
java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable |
Property id2: Whether ID2 certification. |
iotInstanceId |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property iotInstanceId: Public instance does not pass this parameter; |
joinPermissionId |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property joinPermissionId: LoRaWAN network credential ID. |
netType |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property netType: Networking mode. |
protocolType |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property protocolType: The protocol that devices of this product use to connect to gateways. |
publishAuto |
java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable |
Property publishAuto: Whether to automatically model publication after the product is created. |
resourceGroupId |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property resourceGroupId: Resource group ID (group ID to view the resource in the resource management console), specify the product is classified as a resource group. |
scope
Required
- Type: com.aliyun.ros.cdk.core.Construct
id
Required
- Type: java.lang.String
enableResourcePropertyConstraint
Optional
- Type: java.lang.Boolean
nodeType
Required
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property nodeType: The node type of the product.
Values: 0: Device. A device cannot be mounted with sub-devices. It can connect to IoT Platform either directly or as a sub-device of a gateway. 1: Gateway. A gateway can be mounted with sub-devices. It can manage sub-devices, maintain the topological relationships with sub-devices, and synchronize the topological relationships to IoT Platform.
productName
Required
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property productName: The name of the product.
A product name can be 4 to 30 characters in length and can contain Chinese characters, English letters, digits, and underscores (_). Note A product name must be unique in an account.
aliyunCommodityCode
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property aliyunCommodityCode: The edition of the product that you want to create.
There are two options: iothub_senior: Pro Edition. iothub: Basic Edition. If you do not input this parameter, the default value is used, which is iothub (Basic Edition).
authType
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property authType: Authentication device to access the Internet of Things platform under the product.
Optional: secret: using a device key for device authentication. Details can be found MQTT-TCP connection communication. id2: Use things device authentication ID. x509: X.509 certificates using the device for device authentication. The use of X.509 certificates device side configuration instructions, see Using X.509 certificate authentication. If this parameter is passed, the default value is secret.
categoryKey
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property categoryKey: Identifier Product category.
If you pass this parameter, the product will be created using the object model specified category; not passed, the standard model is not used in any category. Call ListThingTemplates, view of things platform predefined category information from the returned results, get the value of CategoryKey.
dataFormat
Optional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property dataFormat: You must specify this parameter if the value of AliyunCommodityCode is iothub_senior.
This parameter is only available and required when you create a Pro Edition product. Options: 0: Do not parse/Custom. 1: Alink JSON.
description
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property description: A description of the product.
The description can be a maximum of 100 characters in length.
id2
Optional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property id2: Whether ID2 certification.
Optional values: true: the opening of ID2 certification. false: do not open ID2 certification. Do not pass this parameter, the default is not opened. Explanation Only 2 East China (Shanghai) regional support ID2 authentication. If this parameter value is set to true, but passed AuthType parameter value is not id2, the system will AuthType parameter values prevail.
iotInstanceId
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property iotInstanceId: Public instance does not pass this parameter;
instance that you need to buy the incoming instance ID.
joinPermissionId
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property joinPermissionId: LoRaWAN network credential ID.
When networking mode NetType chosen LORA, the necessary parameters. Please call QueryLoRaJoinPermissions query JoinPermissionId network credentials LoRaWAN under your account. If you do not LoRaWAN network credentials, visit the network management platform to create things together.
netType
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property netType: Networking mode.
Set this parameter only if you are creating a product whose devices directly connect to IoT Platform. Options: WIFI CELLULAR ETHERNET OTHER The default value is WIFI.
protocolType
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property protocolType: The protocol that devices of this product use to connect to gateways.
Set this parameter only if you are creating a product whose devices will be connected to gateways. Options: modbus: Modbus. opc-ua: OPC UA. customize: Customized protocol. ble: BLE. zigbee: ZigBee.
publishAuto
Optional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property publishAuto: Whether to automatically model publication after the product is created.
true: publishing. false: not released. This parameter is not passed, the default value true.
resourceGroupId
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property resourceGroupId: Resource group ID (group ID to view the resource in the resource management console), specify the product is classified as a resource group.
If this parameter is passed, the product will be classified as a default resource group.
Methods
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
synthesize |
Allows this construct to emit artifacts into the cloud assembly during synthesis. |
addCondition |
No description. |
addCount |
No description. |
addDependency |
No description. |
addResourceDesc |
No description. |
applyRemovalPolicy |
No description. |
getAtt |
No description. |
setMetadata |
No description. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
synthesize
public void synthesize(ISynthesisSession session)
Allows this construct to emit artifacts into the cloud assembly during synthesis.
This method is usually implemented by framework-level constructs such as Stack
and Asset
as they participate in synthesizing the cloud assembly.
- Type: com.aliyun.ros.cdk.core.ISynthesisSession
The synthesis session.
addCondition
public void addCondition(RosCondition condition)
- Type: com.aliyun.ros.cdk.core.RosCondition
addCount
public void addCount(java.lang.Number OR IResolvable count)
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
addDependency
public void addDependency(Resource resource)
- Type: com.aliyun.ros.cdk.core.Resource
addResourceDesc
public void addResourceDesc(java.lang.String desc)
- Type: java.lang.String
applyRemovalPolicy
public void applyRemovalPolicy(RemovalPolicy policy)
- Type: com.aliyun.ros.cdk.core.RemovalPolicy
getAtt
public IResolvable getAtt(java.lang.String name)
- Type: java.lang.String
setMetadata
public void setMetadata(java.lang.String key, java.lang.Object value)
- Type: java.lang.String
- Type: java.lang.Object
Static Functions
Name | Description |
---|---|
isConstruct |
Return whether the given object is a Construct. |
isConstruct
import com.aliyun.ros.cdk.iot.Product;
Product.isConstruct(java.lang.Object x)
Return whether the given object is a Construct.
- Type: java.lang.Object
Properties
Name | Type | Description |
---|---|---|
node |
com.aliyun.ros.cdk.core.ConstructNode |
The construct tree node associated with this construct. |
ref |
java.lang.String |
No description. |
stack |
com.aliyun.ros.cdk.core.Stack |
The stack in which this resource is defined. |
resource |
com.aliyun.ros.cdk.core.RosResource |
No description. |
attrIotInstanceId |
com.aliyun.ros.cdk.core.IResolvable |
Attribute IotInstanceId: IOT instance ID. |
attrProductKey |
com.aliyun.ros.cdk.core.IResolvable |
Attribute ProductKey: The globally unique identifier of the product issued by IoT Platform. |
node
Required
public ConstructNode getNode();
- Type: com.aliyun.ros.cdk.core.ConstructNode
The construct tree node associated with this construct.
ref
Required
public java.lang.String getRef();
- Type: java.lang.String
stack
Required
public Stack getStack();
- Type: com.aliyun.ros.cdk.core.Stack
The stack in which this resource is defined.
resource
Optional
public RosResource getResource();
- Type: com.aliyun.ros.cdk.core.RosResource
attrIotInstanceId
Required
public IResolvable getAttrIotInstanceId();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute IotInstanceId: IOT instance ID.
attrProductKey
Required
public IResolvable getAttrProductKey();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute ProductKey: The globally unique identifier of the product issued by IoT Platform.