{
    "type": "Microsoft.SecurityInsights/dataConnectorDefinitions",
    "apiVersion": "2022-09-01-preview",
    "name": "IslandV2",
    "location": "{{location}}",
    "kind": "Customizable",
    "properties": {
        "connectorUiConfig": {
            "id": "IslandV2",
            "title": "Island Enterprise Browser V2",
            "publisher": "Island",
            "descriptionMarkdown": "The Island Enterprise Browser V2 Data Connector allows you to ingest user events, admin events, and system events, all within a single connector.",
            "graphQueriesTableName": "Island_UserEvents_V2_CL",
            "graphQueries": [
                {
                    "metricName": "Total Browser Audit events",
                    "legend": "Browser Audit Events",
                    "baseQuery": "Island_UserEvents_V2_CL"
                },
                {
                    "metricName": "Total Admin Action events",
                    "legend": "Admin Action Events",
                    "baseQuery": "Island_AdminEvents_V2_CL"
                },
                {
                    "metricName": "Total System events",
                    "legend": "System Events",
                    "baseQuery": "Island_SystemEvents_V2_CL"
                }
            ],
            "sampleQueries": [
                {
                    "description": "Get 10 Browser Audit log entries",
                    "query": "Island_UserEvents_V2_CL\n | sort by TimeGenerated desc\n | take 10"
                },
                {
                    "description": "Get 10 Admin Action log entries",
                    "query": "Island_AdminEvents_V2_CL\n | sort by TimeGenerated desc\n | take 10"
                },
                {
                    "description": "Get 10 System Event log entries",
                    "query": "Island_SystemEvents_V2_CL\n | sort by TimeGenerated desc\n | take 10"
                },
                {
                    "description": "Total events across all tables",
                    "query": "union Island_UserEvents_V2_CL, Island_AdminEvents_V2_CL, Island_SystemEvents_V2_CL\n | summarize count()"
                }
            ],
            "dataTypes": [
                {
                    "name": "Island_UserEvents_V2_CL",
                    "lastDataReceivedQuery": "Island_UserEvents_V2_CL\n | summarize Time = max(TimeGenerated)\n | where isnotempty(Time)"
                },
                {
                    "name": "Island_AdminEvents_V2_CL",
                    "lastDataReceivedQuery": "Island_AdminEvents_V2_CL\n | summarize Time = max(TimeGenerated)\n | where isnotempty(Time)"
                },
                {
                    "name": "Island_SystemEvents_V2_CL",
                    "lastDataReceivedQuery": "Island_SystemEvents_V2_CL\n | summarize Time = max(TimeGenerated)\n | where isnotempty(Time)"
                }
            ],
            "connectivityCriteria": [
                {
                    "type": "HasDataConnectors"
                }
            ],
            "availability": {
                "isPreview": false
            },
            "permissions": {
                "resourceProvider": [
                    {
                        "provider": "Microsoft.OperationalInsights/workspaces",
                        "permissionsDisplayText": "Read and Write permissions are required.",
                        "providerDisplayName": "Workspace",
                        "scope": "Workspace",
                        "requiredPermissions": {
                            "write": true,
                            "read": true,
                            "delete": true
                        }
                    }
                ],
                "customs": [
                    {
                        "name": "Island API Key",
                        "description": "An Island API key is required. Generate the API Key via Island Management Console. For further instructions, refer to the [official Island documentation](https://documentation.island.io/docs/configure-the-microsoft-sentinel-integration)."
                    }
                ]
            },
            "instructionSteps": [
                {
                    "description": "API URL and API Key are available via Island Management Console. For further instructions, refer to the [official Island documentation](https://documentation.island.io/docs/configure-the-microsoft-sentinel-integration).\n>",
                    "instructions": [
                        {
                            "type": "Textbox",
                            "parameters": {
                                "label": "API URL",
                                "placeholder": "API URL",
                                "type": "text",
                                "name": "apiEndpoint"
                            }
                        },
                        {
                            "type": "Textbox",
                            "parameters": {
                                "label": "API Key",
                                "placeholder": "Key",
                                "type": "password",
                                "name": "apiKey"
                            }
                        },
                        {
                            "parameters": {
                                "label": "toggle",
                                "name": "toggle"
                            },
                            "type": "ConnectionToggleButton"
                        }
                    ],
                    "title": "Connect Island to Microsoft Sentinel"
                }
            ]
        }
    }
}
