Amazon IoT Core for Amazon Sidewalk API operations for Sidewalk end devices - Amazon IoT Core
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Amazon IoT Core for Amazon Sidewalk API operations for Sidewalk end devices

You can perform the following API operations for your Sidewalk devices:

The following sections show you how to list and delete devices. For information about creating Sidewalk end devices and retrieving device information, see Step 2: Add your Sidewalk device

Associate Sidewalk end devices in your Amazon Web Services account to an IoT thing

To associate your Sidewalk device with an Amazon IoT thing, use the AssociateWirelessDeviceWithThing API operation.

Things in Amazon IoT make it easier to search and manage your devices. Associating a thing with your device lets the device access other Amazon IoT Core features. For more information about using this API, see the API reference documentation.

The following shows an example of running this command. Running this command doesn't produce any output.

aws iotwireless associate-wireless-device-with-thing \ --id "12345678-a1b2-3c45-67d8-e90fa1b2c34d" \ --thing-arn "arn:aws:iot:us-east-1:123456789012:thing/MySidewalkThing"

To disassociate your Sidewalk device from an Amazon IoT thing, use the DisassociateWirelessDeviceFromThing API operation, as shown in the following example.

aws iotwireless disassociate-wireless-device-from-thing \ --id "12345678-a1b2-3c45-67d8-e90fa1b2c34d"

List Sidewalk end devices in your Amazon Web Services account

To list Sidewalk devices in your Amazon Web Services account that you added to Amazon IoT Core for Amazon Sidewalk, use the ListWirelessDevices API operation. To filter the list to return only Sidewalk devices, set the WirelessDeviceType to Sidewalk.

The following shows an example of running this command:

aws iotwireless list-wireless-devices --wireless-device-type Sidewalk

Running this command returns a list of devices that you added, including their profile identifier and the Amazon Resource Name (ARN). To retrieve additional details about a specific device, use the GetWirelessDevice API operation.

{ "WirelessDeviceList": [ { "Name": "mySidewalkDevice", "DestinationName": "SidewalkDestination", "Id": "1ffd32c8-8130-4194-96df-622f072a315f", "Type": "Sidewalk", "Sidewalk": { "SidewalkId": "1234567890123456" }, "Arn": "arn:aws:iotwireless:us-east-1:123456789012:WirelessDevice/1ffd32c8-8130-4194-96df-622f072a315f" } ] }

Delete Sidewalk devices from your Amazon Web Services account

To delete your Sidewalk devices, pass the WirelessDeviceID of the devices you want to delete to the DeleteWirelessDevice API operation.

The following shows an example command:

aws iotwireless delete-wireless-device --id "23456789-abcd-0123-bcde-fabc012345678"

This command doesn't produce any output. You can use the GetWirelessDevice API or the ListWirelessDevices API operation to verify that the device has been removed from your account.