cloneTopology
A Workflow Engine function that copies an existing topology to a new inactive named topology if the name is not already in use. Both topologyName and cloneName can be static or a substitution value. To substitute a value, use $(<attribute_name>). For example $(custom_info.myTopology).
Follow this action with the 'activateTopology' action if you want to activate the new topology.
This function is available for alert workflows.
Back to Workflow Engine Functions Reference.
Arguments
Workflow Engine function cloneTopology
takes the following arguments:
Name | Required | Type | Description |
---|---|---|---|
topologyName | yes | string | The 'donor' named topology or substituted value for the topology. May be active or inactive. To substitute a value, use $(<attribute_name>). For example $(custom_info.myTopology). |
cloneName | yes | string | The 'clone' named topology or substituted value for the topology. To substitute a value, use $(<attribute_name>). For example $(custom_info.myTopology). |
Example
The following example demonstrates typical use of Workflow Engine function cloneTopology
.
If you want to create a new topology based upon a topology in the alert workflow context, set the following:
topologyName
: $(workflowContext.myTopology)cloneName
: $(workflowContext.myTopology) copy
The UI translates your settings to the following JSON:
{"topologyName":"$(workflowContext.myTopology)","cloneName":"$(workflowContext.myTopology) copy"}
For an alert that has a workflowContext.myTopolgy
= "my network", the action clones the topology to "my network copy". If you run the topologies
API, you can see your new inactive topology:
curl -X GET 'https://example.com/api/v1/topologies/inactive'
Returns the following:
[{ "name": "my network copy", "active": false, "description": "Automatically created topology: triggering alert # 35 @ 2020-05-08T02:14:05.680Z" }]