modify

Code

BIGIP.modify(path: str, data: dict) → bigrest.common.restobject.RESTObject

Modifies the object on the device.

Sends an HTTP PATCH request to the iControl REST API.

Parameters:
  • path – HTTP path used in the HTTP request sent to the device.
  • data – Payload that will be sent to the device.
Exceptions:
RESTAPIError: Raised when iControl REST API returns an error.

Example

data = {}
data["description"] = "bigrest"
pool_updated = device.modify(
    f"/mgmt/tm/ltm/pool/{rest_format("bigrest/bigrest_pool")}", data)

Explanation

If you just want to modify the properties of the object, instead of load and save, you can modify the object.
You create a dictionary with the properties to be modified and pass that to the modify method.