create

Code

BIGIP.create(path: str, data: dict) RESTObject

Creates the object on the device.

Sends an HTTP POST 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["name"] = "bigrest"
data["partition"] = "/"
device.create("/mgmt/tm/sys/folder", data)

Explanation

This will create a partition called bigrest.
You create a dictionary with the properties of the new object and pass that to the create method.
The system will use the default settings for any properties not specified.