IoTDataPlane / Client / list_subscriptions
list_subscriptions¶
- IoTDataPlane.Client.list_subscriptions(**kwargs)¶
Returns a list of all subscriptions for MQTT clients with active sessions, including offline clients with persistent sessions.
Requires permission to access the ListSubscriptions action.
See also: AWS API Documentation
Request Syntax
response = client.list_subscriptions( clientId='string', nextToken='string', maxResults=123 )
- Parameters:
clientId (string) –
[REQUIRED]
The unique identifier of the MQTT client to list subscriptions for. The client ID can’t start with a dollar sign ($).
MQTT client IDs must be URL encoded (percent-encoded) when they contain characters that are not valid in HTTP requests, such as spaces, forward slashes (/), and UTF-8 characters.
nextToken (string) – To retrieve the next set of results, the
nextTokenvalue from a previous response; otherwise null to receive the first set of results.maxResults (integer) – The maximum number of subscriptions to return in a single request. By default, this is set to 20.
- Return type:
dict
- Returns:
Response Syntax
{ 'subscriptions': [ { 'topicFilter': 'string', 'qos': 123 }, ], 'nextToken': 'string' }
Response Structure
(dict) –
subscriptions (list) –
A list of topic filters and their associated Quality of Service (QoS) levels that the client is subscribed to.
(dict) –
Contains information about a subscription for an MQTT client, including the topic filter and Quality of Service (QoS) level.
topicFilter (string) –
The topic filter pattern that the client is subscribed to. May include MQTT wildcards such as + (single-level) and # (multi-level).
qos (integer) –
The Quality of Service (QoS) level for the subscription. Valid values are 0 (at most once) and 1 (at least once).
nextToken (string) –
The token to use to get the next set of results, or null if there are no additional results.
Exceptions
IoTDataPlane.Client.exceptions.InvalidRequestExceptionIoTDataPlane.Client.exceptions.ForbiddenExceptionIoTDataPlane.Client.exceptions.ResourceNotFoundExceptionIoTDataPlane.Client.exceptions.ThrottlingExceptionIoTDataPlane.Client.exceptions.InternalFailureException