Details
| ID | GenerateRandomUUID |
|---|---|
| Language | python |
| From Version | 5.0.0 |
| Docker Image | demisto/python3:3.12.13.10404775 |
README
Generates a random UUID (UUID 4).
Script Data
| Name | Description |
|---|---|
| Script Type | python3 |
| Tags | |
| Cortex XSOAR Version | 5.0.0 |
Inputs
There are no inputs for this script.
Outputs
| Path | Description | Type |
|---|---|---|
| GeneratedUUID | The generated UUID. | string |
Script Example
## Context Example
```json
{
"GeneratedUUID": "8aad5925-aae2-4141-b3fb-2d8e2c0da00b"
}
Human Readable Output
Random UUID Generated
GeneratedUUID 8aad5925-aae2-4141-b3fb-2d8e2c0da00b
import uuid from GenerateRandomUUID import generate_random_uuid_command MOCK_UUID = "dae756a4-304f-42ac-9287-a4546624b3ad" MOCK_OUTPUTS = {"GeneratedUUID": MOCK_UUID} def test_generate_random_uuid(mocker): """ Given: - nothing When - generating a random UUID (UUID4) Then - the uuid is generated and returned to Context """ mocker.patch("uuid.uuid4", return_value=uuid.UUID(MOCK_UUID)) result = generate_random_uuid_command() assert result.outputs == MOCK_OUTPUTS