solace_get_mqtt_session_subscriptions – get list of mqtt session subscriptions
Get a list of Subscription objects attached to a MQTT Session.
Implements the config and monitor API.
Retrieves all objects that match the criteria defined in the ‘where’ clause and returns the fields defined in the ‘select’ parameter.
Examples
hosts: all
gather_facts: no
any_errors_fatal: true
collections:
- solace.pubsub_plus
module_defaults:
  solace_get_mqtt_session_subscriptions:
    host: "{{ sempv2_host }}"
    port: "{{ sempv2_port }}"
    secure_connection: "{{ sempv2_is_secure_connection }}"
    username: "{{ sempv2_username }}"
    password: "{{ sempv2_password }}"
    timeout: "{{ sempv2_timeout }}"
    msg_vpn: "{{ vpn }}"
tasks:
- name: get list config
  solace_get_mqtt_session_subscriptions:
    mqtt_session_client_id: foo
    query_params:
      where:
        - "subscriptionTopic==foo/bar/*"
      select:
        - "mqttSessionClientId"
        - "mqttSessionVirtualRouter"
        - "subscriptionTopic"
        - "subscriptionQos"
  register: result
- name: print result
  debug:
    msg:
    - "{{ result.result_list }}"
    - "{{ result.result_list_count }}"
- name: get list monitor
  solace_get_mqtt_session_subscriptions:
    api: monitor
    mqtt_session_client_id: foo
  register: result
- name: print result
  debug:
    msg:
    - "{{ result.result_list }}"
    - "{{ result.result_list_count }}"
Notes
Note
- Module Sempv2 Config: https://docs.solace.com/API-Developer-Online-Ref-Documentation/swagger-ui/config/index.html#/mqttSession/getMsgVpnMqttSessionSubscriptions 
- Module Sempv2 Monitor: https://docs.solace.com/API-Developer-Online-Ref-Documentation/swagger-ui/monitor/index.html#/mqttSession/getMsgVpnMqttSessionSubscriptions 
- Sempv2 Config Reference: https://docs.solace.com/API-Developer-Online-Ref-Documentation/swagger-ui/config/index.html#/ 
- Sempv2 Monitor Reference: https://docs.solace.com/API-Developer-Online-Ref-Documentation/swagger-ui/monitor/index.html#/ 
- Sempv2 Action Reference: https://docs.solace.com/API-Developer-Online-Ref-Documentation/swagger-ui/action/index.html#/ 
See Also
Parameters
- api (optional)
- The API the query should run against. type: strdefault: configchoices: config, monitor
- host (optional)
- Hostname of Solace Broker. type: strdefault: localhost
- mqtt_session_client_id (required)
- The MQTT session client id. Maps to ‘mqttSessionClientId’ in the API. type: straliases: client_id, client
- msg_vpn (required)
- The message vpn. type: str
- page_count (optional)
- The number of results to be fetched from broker in single call. Note: always returns the entire result set by following the cursor. type: intdefault: 100
- password (optional)
- Administrator password for Solace Broker. type: strdefault: admin
- port (optional)
- Management port of Solace Broker. type: intdefault: 8080
- query_params (optional)
- The query parameters. type: dictdefault: {}- select (optional)
- Include in the response only selected attributes of the object, or exclude from the response selected attributes of the object. See the documentation for the select parameter. type: listdefault: []
- where (optional)
- Include in the response only objects where certain conditions are true. See the the documentation for the where parameter. - Note: URL encoded automatically, you can safely use ‘/, <, <=, >, >=, != .. ‘ type: listdefault: []
 
- reverse_proxy (optional)
- Use a reverse proxy / api gateway. Note: Experimental. Not permitted for Solace Cloud API. type: dict- headers (optional)
- Additional headers to add to the http call. Example: ‘apiKey: {my-api-key}’. type: dict- x-asc-module (optional)
- Flag for the module to add the header ‘x-asc-module:{module-name}’ to the http call with it’s module name. type: booldefault: False
- x-asc-module-op (optional)
- Flag for the module to add the header ‘x-asc-module-op:{module operation}’ to the http call with the module’s operation. type: booldefault: False
 
- query_params (optional)
- Additional query paramters to add to the URL. Example: ‘apiCode: {my-api-code}’. type: dict
- semp_base_path (optional)
- Base path prepended to all SEMP calls. Example: ‘my/base/path’. Resulting URL will be: http(s)://{host}:{port}/{semp_base_path}/{module-semp-call-path} type: str
- use_basic_auth (optional)
- Flag to use basic authentication in the http(s) call or not. Uses ‘username’/’password’. type: booldefault: False
 
- secure_connection (optional)
- If true, use https rather than http. type: booldefault: False
- timeout (optional)
- Connection timeout in seconds for the http request. type: intdefault: 10
- username (optional)
- Administrator username for Solace Broker. type: strdefault: admin
- validate_certs (optional)
- Flag to switch validation of client certificates on/off when using a secure connection. type: booldefault: True
- virtual_router (optional)
- The virtual router. type: strdefault: primarychoices: primary, backup
- x_broker (optional)
- Custom HTTP header with the broker virtual router id, if using a SEMPv2 Proxy/agent infrastructure. type: str
Return Values
- result_list
- The list of objects found containing requested fields. Payload depends on API called. returned: successtype: list
- result_list_count
- Number of items in result_list. returned: successtype: int
- rc
- Return code. rc=0 on success, rc=1 on error. returned: alwaystype: intsample:- { "error": { "rc": 1 }, "success": { "rc": 0 } } 
- msg
- The response from the HTTP call in case of error. returned: errortype: dict