show

Code

BIGIP.show(path: str) → Union[list[RESTObject], RESTObject]

Gets statistical information about the objects from the device. If you call with a specific object name, it returns a single object. If you call without an object name, it returns a list of objects.

Similar to tmsh show command.

Sends an HTTP GET request to the iControl REST API.

Parameters:path – HTTP path used in the HTTP request sent to the device.
Exceptions:
RESTAPIError: Raised when iControl REST API returns an error.

Example

virtual = device.show(
    f"/mgmt/tm/ltm/virtual/{rest_format(virtual_name)}")
print(f'Maximum number of connections client side: {virtual.properties["clientside.maxConns"]["value"]}')

Explanation

This is similar to tmsh show command.
If the object property includes another dictionary, keep adding keys until you find the value you need.
In this example “clientside.maxConns” property has a dictionary, and we want the value of the key “value”.
Similar to the method load, If called with an object name, it will just return a single object.
If called without an object name, it will return a list with all object of that type.