Amazon IoT Core for Amazon Sidewalk API operations for destinations for Sidewalk end devices
You can perform the following API operations for destinations for your Sidewalk end devices:
-
CreateDestination
API or thecreate-destination
CLI -
GetDestination
API or theget-destination
CLI -
UpdateDestination
API or theupdate-destination
CLI -
ListDestinations
API or thelist-destinations
CLI -
DeleteDestination
API or thedelete-destination
CLI
The following sections show you how to get, list, update, and delete destinations. For information about creating destinations, see Add a destination for your Sidewalk end device.
Get information about your destination
You can use the GetDestination
API operation to get information about
the destination that you added to your account for Amazon IoT Core for Amazon Sidewalk. Provide the
destination name as input to the API. The API will return information about the
destination matching the specified identifier.
The following shows an example CLI command:
aws iotwireless get-destination --name
SidewalkDestination
Running this command returns the parameters of your destination.
{ "Arn": "arn:aws:iotwireless:
us-east-1
:123456789012
:Destination/IoTWirelessDestination", "Name": "SidewalkDestination
", "Expression": "IoTWirelessRule
", "ExpressionType": "RuleName
", "RoleArn": "arn:aws:iam::123456789012
:role/IoTWirelessDestinationRole
" }
Update properties of your destination
Use the UpdateDestination
API operation to update properties
of your destination that you added to your account for Amazon IoT Core for Amazon Sidewalk. The following
shows an example CLI command that updates the description property:
aws iotwireless update-destination --name
SidewalkDestination
\ --description"Destination for messages processed using IoTWirelessRule"
List destinations in your Amazon Web Services account
Use the ListDestinations
API operation to list destinations in
your Amazon Web Services account that you added to Amazon IoT Core for Amazon Sidewalk. To filter the list to return
only destinations for Sidewalk end devices, use the
WirelessDeviceType
parameter.
The following shows an example CLI command:
aws iotwireless list-destinations --wireless-device-type "Sidewalk"
Running this command returns a list of destinations that you added, including
their Amazon Resource Name (ARN). To retrieve additional details about a specific
destination, use the GetDestination
API.
{ "DestinationList": [ { "Arn": "arn:aws:iotwireless:us-east-1:123456789012:Destination/
IoTWirelessDestination
", "Name": "IoTWirelessDestination
", "Expression": "IoTWirelessRule
", "Description": "Destination for messages processed using IoTWirelessRule
", "RoleArn": "arn:aws:iam::123456789012:role/IoTWirelessDestinationRole
" }, { "Arn": "arn:aws:iotwireless:us-east-1:123456789012:Destination/IoTWirelessDestination2
", "Name": "IoTWirelessDestination2
", "Expression": "IoTWirelessRule2
", "RoleArn": "arn:aws:iam::123456789012:role/IoTWirelessDestinationRole
" } ] }
Delete destinations from your Amazon Web Services account
To delete your destination, pass the name of the destination to be deleted as
input to the DeleteDestination
API operation. The following shows
an example CLI command:
Warning
Deletion actions can't be undone. The destination will be permanently removed from your Amazon Web Services account.
aws iotwireless delete-destination --name "
SidewalkDestination
"
This command doesn't produce any output. You can use the
GetDestination
API or the ListDestinations
API
operation to verify that the destination has been removed from your account.