Familiarizing yourself with the following underlying basic concepts will help you get up and running with the SDK.
When using the SDK, you’ll notice that collection objects are referenced using the plural version of the
Resource objects they contain. When the
Resource object’s type is plural (ends in an
s), you need to add
_s to the name when referring to the collection.
_s rule applies to all object collections where the object in the collection already ends in
- LTM Pool objects are collected in
f5.bigip.tm.ltmpool.Poolsand are accessible via the path
- Network Tunnels objects are stored in
f5.bip.net.tunnels.Tunnels_sand are accessible via
You can directly infer REST URIs from the python expressions, and vice versa.
Expression: mgmt = ManagementRoot('<ip_address>', '<username>', '<password>') URI Returned: https://<ip_address>/mgmt/
Expression: cm = mgmt.cm('<ip_address>', '<username>', '<password>') URI Returned: https://<ip_address>/mgmt/cm
Expression: tm = mgmt.tm('<ip_address>', '<username>', '<password>') URI Returned: https://<ip_address>/mgmt/tm
Expression: ltm = mgmt.tm.ltm('<ip_address>', '<username>', '<password>') URI Returned: https://<ip_address>/mgmt/tm/ltm/
Expression: pools1 = mgmt.tm.ltm.pools URI Returned: https://<ip_address>/mgmt/tm/ltm/pool
Expression: pool_a = pools1.create(partition="Common", name="foo") URI Returned: https://<ip_address>/mgmt/tm/ltm/pool/~Common~foo
A set of basic REST endpoints can be derived from the object’s URI and
kind (listed below).
The python object’s attribute can be created dynamically based on the JSON returned when querying the REST API.
Almost all iControl® REST API entries contain a parameter named
kind. This parameter provides information about the object that lets you know what you should expect to follow it. The iControl® REST API uses three types of
creates a new resource on the device with its own URI
submits a new configuration to the device resource; sets the
Resource attributes to the state reported by the device
obtains the state of a device resource; sets the representing
Python Resource Object; tracks device state via its attributes
removes the resource from the device, sets
obtains the state of an existing resource on the device; sets
the Resource attributes to match that state
checks for the existence of an object on the BIG-IP®
Available methods are restricted according to the object’s