apamax.eplapplications.eplapps

EPLApps

class apamax.eplapplications.eplapps.EPLApps(connection)[source]

Bases: object

Class for interacting with Apama EPL Apps in Cumulocity IoT.

Parameters

connection – A C8yConnection object for the connection to the platform.

delete(name: str)[source]

Deletes an EPL app in Cumulocity IoT.

Parameters

name – The name of the EPL app to be deleted.

deploy(file, name='', description=None, inactive=False, redeploy=False)[source]

Deploys a local mon file to Apama EPL Apps in Cumulocity IoT.

Parameters
  • file – Path to local mon file to be deployed as an EPL app.

  • name – Name of the EPL app to be uploaded (optional). By default this will be the name of the mon file being uploaded.

  • description – Description of the EPL app (optional).

  • inactive – Boolean of whether the app should be ‘active’ (inactive=False) or ‘inactive’ (inactive=True) when it is deployed.

  • redeploy – Boolean of whether we are overwriting an existing EPL app.

getAppId(appName: str, jsonEPLAppsList=None)[source]

Gets the id of EPL app for a given EPL app name. If no EPL app with appname exists, an exception is raised.

Parameters
  • appName – The name of the EPL app we wish to get the id of

  • jsonEPLAppsList – A json collection of EPL apps

Returns

The id of the EPL app

getEPLApps(includeContents=False)[source]
Parameters

includeContents – Fetches the EPL files with their contents if True. This is an optional query parameter.

Returns

A json object of all the user’s EPL apps in Cumulocity IoT.

update(name, new_name=None, file=None, description=None, state=None)[source]

Updates an EPL app in Cumulocity IoT.

Parameters
  • name – name of the EPL App to be updated.

  • new_name – the updated name of the EPL app (optional)

  • file – path to the local mon file containing the updated contents of the EPL app (optional)

  • description – the updated description of the EPL app (optional)

  • state – the updated state of the EPL app (optional)