IsIntegrationAvailable

Returns 'yes' if integration brand is available. Otherwise returns 'no'.

javascript · Common Scripts

Details

IDIsIntegrationAvailable
Languagejavascript
From Version5.0.0
Tagsinfra Condition

README

Returns ‘yes’ if integration brand is available. Otherwise returns ‘no’.

Script Data


Name Description
Script Type python3
Tags infra, Condition
Cortex XSOAR Version 5.0.0

Used In


Sample usage of this script can be found in the following playbooks and scripts.

  • Calculate Severity Highest DBotScore For Egress Network Traffic - GreyNoise
  • Crowdstrike Falcon - Isolate Endpoint
  • Crowdstrike Falcon - Unisolate Endpoint
  • FireMon Pre Change Assessment
  • Get Original Email - Microsoft Graph Mail
  • MITRE ATT&CK CoA - T1204 - User Execution
  • Microsoft 365 Defender - Emails Indicators Hunt
  • Palo Alto Networks BPA - Submit Scan
  • Phishing - Machine Learning Analysis
  • Prisma Cloud Remediation - AWS EC2 Security Group Misconfiguration

Inputs


Argument Name Description
brandname Integration’s brand name to query.

Outputs


Path Description Type
brandInstances List of the instances for the given brands. Unknown
import pytest


@pytest.mark.parametrize("expected, brand_name", [("yes", "Integration1"), ("no", "Integration2")])
def test_is_integration_available(expected, brand_name):
    """
    Given:
        - The script args.
    When:
        - Running the is_integration_available function.
    Then:
        - Validating the outputs as expected.
    """
    from IsIntegrationAvailable import is_integration_available

    all_instances = {
        "Integration1_instanse": {"brand": "Integration1", "state": "active"},
        "Integration2_instanse": {"brand": "Integration2", "state": "not active"},
    }

    result = is_integration_available(brand_name, all_instances)
    assert expected == result.readable_output