Menu

Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

Using Fleets

Sync for IoT is currently in Developer Preview, which means access is by invite only. If you'd like to try what you see in these docs, sign up for the developer preview and the team at Twilio will get you onboarded as soon as possible.

Fleets are the top level scoping and isolation constructs of IoT Device Manager. Fleets are logically separate from other fleets, and devices within a fleet may have no logical interoperability or connection with Devices in another fleet. A fleet nests all other resources of IoT Device Manager: devices, their deployments and credentials.

Fleets enable developers to securely isolate access to resources, such as device configuration and credentials, in order to host multiple environments (development, staging, production) under the same Twilio account. Fleets are also used to discover and provision devices, that work together as a system, into separate bins.

Each account that uses Twilio Sync for IoT is automatically provisioned with a default Fleet. This fleet is identified by a special handle (unique name) in order to simplify the on-boarding process and get a basic application running quickly. The default fleet also contains default device deployment configuration and a default Sync service instance.

Creating a Fleet

  1. Log into Twilio developer Console and navigate to Device Manager > Fleets.
  2. Click the Create New Fleet button (+).
  3. Optionally, specify a Friendly Name for your fleet. If you leave it blank, a randomly generated SID will be displayed instead in the fleet listing table, and it will be tricker to find later.
  4. Your new fleet is now created and is currently empty: we'd need to add devices and credentials as the next steps. The fleet contains 4 additional auto-populated attributes.
    • Fleet SID: regardless of whether the friendly name was set or not, the resulting SID is going to be unique way to address your fleet of devices.
    • Default deployment SID: contains an identifier of the default device deployment that we have created together with the fleet, and to which all your devices enrolled further would get assigned by default.
    • Date created: contains current date/time, will never change after creation.
    • Date updated: contains date/time of the last fleet resource update, which is initially set to the creation time.

In a similar manner, you can later locate your fleet in the listing and update its attributes. You can also reassign the default deployment SID to another valid deployment of your own.

Removing a Fleet

  1. Retrieve a list of fleets that exist under your Twilio account by navigating to Device Manager > Fleets.
  2. Click on the fleet that you wish to remove and click on Delete this Fleet link.

Note: fleet removal is a destructive and irreversible operation. It will also delete all devices, their deployments and credentials that were previously scoped to that fleet. All devices belonging to the removed fleet will get eventually disconnected as well, as their credentials are revoked.

Also note that the default fleet cannot be deleted entirely, and it is instead rotated. The new default fleet gets re-provisioned immediately, and the old one will proceed with deletion in the background.

REST APIs

Like everything in Twilio, all above functions may be invoked from your service backend programmatically, via REST APIs.

Rate this page:

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.