Documentation

Mistake on this page? Email us

Device Device

Hierarchy

Index

Constructors

constructor

Properties

accountId

accountId: string

The ID of the associated account. The owning Identity and Access Management (IAM) account ID

example

00000000000000000000000000000000

alias

alias: string

The alias of the device

autoUpdate

autoUpdate: boolean

DEPRECATED: Mark this device for automatic firmware update.

bootstrapCertificateExpiration

bootstrapCertificateExpiration: Date

Expiration date of the certificate used to connect to bootstrap server

bootstrapExpirationDate

bootstrapExpirationDate: Date

The expiration date of the certificate used to connect to bootstrap server.

bootstrappedTimestamp

bootstrappedTimestamp: Date

The timestamp of the device's most recent bootstrap process.

example

2017-05-22T12:37:55.576563Z

caId

caId: string

The certificate issuer's ID.

example

00000000000000000000000000000000

certificateFingerprint

certificateFingerprint: string

This is not part of the certificate but rather the SH-256 hash of the certificate.

certificateIssuerId

certificateIssuerId: string

This is the value of the CN field (in the Subject) of the Issuer of the certificate.

claimedAt

claimedAt: Date

The claim date/time

connectorCertificateExpiration

connectorCertificateExpiration: Date

Expiration date of the certificate used to connect to connector server

connectorExpirationDate

connectorExpirationDate: Date

The expiration date of the certificate used to connect to LwM2M server.

createdAt

createdAt: Date

The timestamp of when the device was created in the device directory. The timestamp of when the device was created

example

2017-05-22T12:37:55.576563Z

customAttributes

customAttributes: object

Up to five custom key-value attributes. Note that keys cannot begin with a number. Both keys and values are limited to 128 characters. Updating this field replaces existing contents.

example

[object Object]

Type declaration

  • [key: string]: string

deployedState

deployedState: DeviceDeployedState

DEPRECATED: The state of the device's deployment.

deployment

deployment: string

DEPRECATED: The last deployment used on the device.

description

description: string

The description of the device.

example

description

deviceClass

deviceClass: string

An ID representing the model and hardware revision of the device.

deviceExecutionMode

deviceExecutionMode: number

The execution mode from the certificate of the device. Defaults to inheriting from host_gateway device. Permitted values:

  • 0 - unspecified execution mode (default if host_gateway invalid or not set)
  • 1 - development devices
  • 5 - production devices

deviceKey

deviceKey: string

The fingerprint of the device certificate.

example

00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00

deviceType

deviceType: string

The type of the device - e.g. if the device is a gateway.

endpointName

endpointName: string

The endpoint name given to the device.

example

00000000-0000-0000-0000-000000000000

endpointType

endpointType: string

The endpoint type of the device. For example, the device is a gateway.

enrolmentListTimestamp

enrolmentListTimestamp: Date

The claim date/time.

example

2017-05-22T12:37:55.576563Z

firmwareChecksum

firmwareChecksum: string

The SHA256 checksum of the current firmware image.

example

0000000000000000000000000000000000000000000000000000000000000000

hostGateway

hostGateway: string

The ID of the host gateway, if appropriate.

id

id: string

The unique identifier of the entity The ID of the device

issuerFingerprint

issuerFingerprint: string

SHA256 fingerprint of the certificate used to validate the signature of the device certificate.

example

C42EDEFC75871E4CE2146FCDA67D03DDA05CC26FDF93B17B55F42C1EADFDC322

manifest

manifest: string

DEPRECATED: The URL for the current device manifest.

manifestTimestamp

manifestTimestamp: Date

The timestamp of the current manifest version. The date-time of the current manifest version

example

2017-05-22T12:37:55.576563Z

mechanism

mechanism: DeviceMechanism

The ID of the channel used to communicate with the device.

mechanismUrl

mechanismUrl: string

The address of the connector to use.

name

name: string

The name of the device.

example

00000000-0000-0000-0000-000000000000

serialNumber

serialNumber: string

The serial number of the device.

example

00000000-0000-0000-0000-000000000000

state

The current state of the device.

updatedAt

updatedAt: Date

The time the object was updated. The date-time of when the device was updated

example

2017-05-22T12:37:55.576563Z

vendorId

vendorId: string

The device vendor ID.

example

00000000-0000-0000-0000-000000000000

Methods

delete

  • delete(): Promise<void>
  • Deletes a device

    Returns Promise<void>

    Promise containing any error

  • Deletes a device

    Parameters

    • callback: CallbackFn<void>

      A function that is passed any error

    Returns void

update

  • update(): Promise<Device>
  • Update the device

    Returns Promise<Device>

    Promise of device

  • Update the device

    Parameters

    • callback: CallbackFn<Device>

      A function that is passed the arguments (error, device)

    Returns void