modify

Code

BIGIQ.modify(path: str, data: dict) 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

path = (
    "/mgmt/cm/adc-core/working-config/ltm/pool"
    "?$filter=name eq 'bigrest_pool'"
)
pool_id = device.id(path)
data = {}
description = "bigrest"
data["description"] = description
pool_updated = device.modify(
    f"/mgmt/cm/adc-core/working-config/ltm/pool/{pool_id}", 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.