Demisto Lock
Locking mechanism that prevents concurrent execution of different tasks.
Utilities · Cortex Lock
Details
| ID | Demisto Lock |
|---|---|
| Provider | Palo Alto Networks |
| Category | Utilities |
| From Version | 5.0.0 |
| Supported Modules | Agentix Cortex Cloud Cloud Runtime Security Cloud Posture Security XSIAM EDR |
README
Overview
Demisto Lock is a mechanism that enables users to prevent concurrent execution of tasks. This is a native integration, which does not require configuration.
Commands
You can execute these commands from the Cortex XSOAR CLI, as part of an automation, or in a playbook. After you successfully execute a command, a DBot message appears in the War Room with the command details.
- Get a lock: demisto-lock-get
- Show lock information: demisto-lock-info
- Release a lock: demisto-lock-release
- Release all locks: demisto-lock-release-all
Get a lock
Gets a specific lock. If the lock doesn't exist, it creates one. If the lock is already in use, the command waits until the lock is released or until timeout is reached. If timeout is reached and the lock hasn't been released, the command fails to get the lock.
Base Command
demisto-lock-get
Input
| Parameter | Description |
| name | Lock name. When omitted, the default is Default. |
| info | Additional information about the lock |
| timeout | Timeout to wait for the lock to be released |
Show lock information
Retreives information for a specified lock.
Base Command
demisto-lock-info
Input
| Parameter | Description |
| name | Name of lock to retrieve information for. When omitted, the default is Default. |
Release a lock
Release a specified lock.
Base Command
demisto-lock-release
Input
| Parameter | Description |
| name | Name of lock to release. When omitted, the default is Default. |
Release all locks
Release a specified lock.
Base Command
demisto-lock-release-all
Input
There is no input for this command.
Troubleshooting
If you use multiple locks which might be set in parallel, it is recommended to enable the Sync integration cache (Available from Cortex XSOAR 6.2.0).
Configuration parameters
timeout— Default timeout (seconds) for wait on locks to be released (required)polling_interval— Polling intervalsync— Sync integration cache
Commands (4)
-
demisto-lock-getGets a specific lock. If the lock doesn't exist, it creates one. If the lock is already in use, the command waits until the lock is released or until timeout is reached. If timeout is reached and the lock hasn't been released, the command fails to get the lock.
-
demisto-lock-infoShow information on locks.
-
demisto-lock-releaseRelease a lock.
-
demisto-lock-release-allRelease all locks.