Deleting a Device-Status subscription
You can delete any subscription to device-status notifications with the subscription.delete()
method.
Unsubscribe from receiving status updates
Use the following snippet to delete a Device Status subscription if you wish to stop receiving the previously configured status notifications.
You will simply need to pass the callback id
parameter
to the client.connectivity.get_subscription()
method for the subscription
object.
Then, use subscription.delete()
to delete your subscription to status updates.
subscription = client.connectivity.get_subscription(id)
subscription.delete()
Note that the snippet above assumes you have already created Device Status subscription before, which you can learn how to do here. And that you have also created a Network-as-Code client and identified your mobile network device previously.