solace_get_queue_templates – get list of queue-templates
Get a list of Queue-template objects.
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
name: queue template example
hosts: all
gather_facts: no
any_errors_fatal: true
collections:
- solace.pubsub_plus
module_defaults:
solace.pubsub_plus.solace_queue_template:
host: "{{ sempv2_host }}"
port: "{{ sempv2_port }}"
secure_connection: "{{ sempv2_is_secure_connection }}"
username: "{{ sempv2_username }}"
password: "{{ sempv2_password }}"
timeout: "{{ sempv2_timeout }}"
msg_vpn: "{{ vpn }}"
solace.pubsub_plus.solace_get_queue_templates:
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: create a queue template
solace_queue_template:
name: foo
settings:
accessType: non-exclusive
maxMsgSpoolUsage: 1
maxRedeliveryCount: 10
maxTtl: 10
respectTtlEnabled: true
queueNameFilter: "foo/bar/>"
state: present
- name: update the queue template
solace_queue_template:
name: foo
settings:
accessType: exclusive
state: present
- name: get queue templates (config)
solace_get_queue_templates:
api: config
query_params:
where:
- "queueTemplateName==foo"
register: result
- name: get queue templates (monitor)
solace_get_queue_templates:
api: monitor
query_params:
where:
- "queueTemplateName==foo"
register: result
- name: delete queue template
solace_queue_template:
name: foo
state: absent
Notes
Note
Module Sempv2 Config: https://docs.solace.com/API-Developer-Online-Ref-Documentation/swagger-ui/software-broker/config/index.html#/queueTemplate/getMsgVpnQueueTemplates
Module Sempv2 Monitor: https://docs.solace.com/API-Developer-Online-Ref-Documentation/swagger-ui/monitor/index.html#/queueTemmplate/getMsgVpnQueueTemplates
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- 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- 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