Skip to content

Device

This class encapsulates and extends the ROS resource type ALIYUN::IOT::Device, which is used to register a Device.

Initializers

import com.aliyun.ros.cdk.iot.Device;
Device.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
    .productKey(java.lang.String)
    .productKey(IResolvable)
//  .devEui(java.lang.String)
//  .devEui(IResolvable)
//  .deviceName(java.lang.String)
//  .deviceName(IResolvable)
//  .iotInstanceId(java.lang.String)
//  .iotInstanceId(IResolvable)
//  .nickname(java.lang.String)
//  .nickname(IResolvable)
//  .pinCode(java.lang.String)
//  .pinCode(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.
productKey java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property productKey: The identifier of the product to which the device to be registered belongs.
devEui java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property devEui: DevEUI LoRaWAN equipment.
deviceName java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property deviceName: The name of the device that you want to register.
iotInstanceId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property iotInstanceId: Public instance does not pass this parameter;
nickname java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property nickname: Add a nickname for the device.
pinCode java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property pinCode: PIN Code LoRaWAN device for checking the legitimacy of DevEUI.

scopeRequired

  • Type: com.aliyun.ros.cdk.core.Construct

idRequired

  • Type: java.lang.String

enableResourcePropertyConstraintOptional

  • Type: java.lang.Boolean

productKeyRequired

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property productKey: The identifier of the product to which the device to be registered belongs.


devEuiOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property devEui: DevEUI LoRaWAN equipment.

When you create a LoRaWAN devices, this will pass.


deviceNameOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property deviceName: The name of the device that you want to register.

The device name must consist of 4 to 32 characters, including English letters, digits, and special characters, for example, hyphens (-), underscores (_), at signs (@), periods (.) , and colons (:). DeviceName is used with ProductKey to identify a specified device. Note If you do not specify this parameter, the system will generate a name for the device.


iotInstanceIdOptional

  • 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.


nicknameOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property nickname: Add a nickname for the device.

A nickname can be 4-64 characters in length, and can contain Chinese characters, English letters, numbers and underscores (_). A Chinese character counts as two characters.


pinCodeOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property pinCode: PIN Code LoRaWAN device for checking the legitimacy of DevEUI.

When you create a LoRaWAN devices, this will pass.


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.

sessionRequired

  • Type: com.aliyun.ros.cdk.core.ISynthesisSession

The synthesis session.


addCondition

public void addCondition(RosCondition condition)

conditionRequired

  • Type: com.aliyun.ros.cdk.core.RosCondition

addCount

public void addCount(java.lang.Number OR IResolvable count)

countRequired

  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

addDependency

public void addDependency(Resource resource)

resourceRequired

  • Type: com.aliyun.ros.cdk.core.Resource

addResourceDesc

public void addResourceDesc(java.lang.String desc)

descRequired

  • Type: java.lang.String

applyRemovalPolicy

public void applyRemovalPolicy(RemovalPolicy policy)

policyRequired

  • Type: com.aliyun.ros.cdk.core.RemovalPolicy

getAtt

public IResolvable getAtt(java.lang.String name)

nameRequired

  • Type: java.lang.String

setMetadata

public void setMetadata(java.lang.String key, java.lang.Object value)

keyRequired

  • Type: java.lang.String

valueRequired

  • Type: java.lang.Object

Static Functions

Name Description
isConstruct Return whether the given object is a Construct.

isConstruct

import com.aliyun.ros.cdk.iot.Device;
Device.isConstruct(java.lang.Object x)

Return whether the given object is a Construct.

xRequired

  • 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.
attrDeviceName com.aliyun.ros.cdk.core.IResolvable Attribute DeviceName: Device name.
attrDeviceSecret com.aliyun.ros.cdk.core.IResolvable Attribute DeviceSecret: Device key.
attrIotId com.aliyun.ros.cdk.core.IResolvable Attribute IotId: Things internet device ID issued for the device, as the unique identifier of the device.
attrIotInstanceId com.aliyun.ros.cdk.core.IResolvable Attribute IotInstanceId: IOT instance ID.
attrIpAddress com.aliyun.ros.cdk.core.IResolvable Attribute IpAddress: IP address.
attrNickName com.aliyun.ros.cdk.core.IResolvable Attribute NickName: Nick name.
attrNodeType com.aliyun.ros.cdk.core.IResolvable Attribute NodeType: Node type.
attrProductKey com.aliyun.ros.cdk.core.IResolvable Attribute ProductKey: Product key.
attrProductName com.aliyun.ros.cdk.core.IResolvable Attribute ProductName: Product name.

nodeRequired

public ConstructNode getNode();
  • Type: com.aliyun.ros.cdk.core.ConstructNode

The construct tree node associated with this construct.


refRequired

public java.lang.String getRef();
  • Type: java.lang.String

stackRequired

public Stack getStack();
  • Type: com.aliyun.ros.cdk.core.Stack

The stack in which this resource is defined.


resourceOptional

public RosResource getResource();
  • Type: com.aliyun.ros.cdk.core.RosResource

attrDeviceNameRequired

public IResolvable getAttrDeviceName();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute DeviceName: Device name.


attrDeviceSecretRequired

public IResolvable getAttrDeviceSecret();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute DeviceSecret: Device key.


attrIotIdRequired

public IResolvable getAttrIotId();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute IotId: Things internet device ID issued for the device, as the unique identifier of the device.

Description Keep, do not leak.


attrIotInstanceIdRequired

public IResolvable getAttrIotInstanceId();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute IotInstanceId: IOT instance ID.


attrIpAddressRequired

public IResolvable getAttrIpAddress();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute IpAddress: IP address.


attrNickNameRequired

public IResolvable getAttrNickName();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute NickName: Nick name.


attrNodeTypeRequired

public IResolvable getAttrNodeType();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute NodeType: Node type.


attrProductKeyRequired

public IResolvable getAttrProductKey();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute ProductKey: Product key.


attrProductNameRequired

public IResolvable getAttrProductName();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute ProductName: Product name.