Microsoft Sentinel 用のコードレス コネクタを作成する (パブリック プレビュー)

Codeless Connector Platform (CCP) では、パートナー、上級ユーザー、開発者に、Microsoft Sentinel にデータを取り込むためのカスタム コネクタを作成する機能が提供されます。

CCP を使用して作成されたコネクタは完全な SaaS であり、サービス インストールの要件はありません。 また、稼働状況の監視と、Microsoft Sentinel からの完全なサポートも含まれます。

重要

Codeless Connector Platform (CCP) は現在プレビュー中です。 Azure プレビューの追加使用条件には、ベータ版、プレビュー版、またはまだ一般提供されていない Azure 機能に適用される追加の法律条項が含まれています。

次の手順を使用して CCP コネクタを作成し、Microsoft Sentinel にデータ ソースを接続する

  • データ コネクタを構築する
  • ARM テンプレートを作成する
  • コネクタをデプロイする
  • Microsoft Sentinel をデータ ソースに接続し、データの取り込みを開始する

この記事では、各手順を完了し、途中で構築するコードレス コネクタの例を示します。

この CCP は以前のバージョンとどのように異なるか

CCP の初期バージョンは、2022 年 1 月に発表されました。 それ以来、プラットフォームが改善され、レガシ リリースは推奨されなくなりました。 この新しいバージョンの CCP は主に次のように改善されています。

  1. さまざまな認証と改ページ位置の自動修正の種類のサポートが向上しました。

  2. 標準のデータ収集ルール (DCR) をサポートします。

  3. コードレス コネクタのユーザー インターフェイスと接続構成の部分が分離されました。 これにより、以前は不可能だった複数の接続でのコネクタの作成が可能になります。

前提条件

コネクタを構築する前に、データ ソースと Microsoft Sentinel の接続方法を理解してください。

  1. データ収集エンドポイント (DCE)

    DCE は DCR の要件です。 ログ分析ワークスペース DCR デプロイごとに作成される DCE は 1 つだけです。 Microsoft Sentinel ワークスペースにデプロイされたすべての DCR で、同じ DCE が使用されます。 作成方法または新しいものが必要かどうかについて詳しくは、「Azure Monitor のデータ収集エンドポイント」を参照してください。

  2. 出力テーブルのスキーマ。

    データ ストリームの形状と、出力テーブルに含めるフィールドを理解することが重要です。 データ ソースのドキュメントを参照するか、十分な出力例を分析します。

次のコンポーネントを調査し、「データ コネクタ API リファレンス」でそれらのサポートを確認します。

  1. データ ソースへの HTTP 要求と応答の構造

  2. データ ソースに必要な認証。
    たとえば、データ ソースで証明書で署名されたトークンが必要な場合、データ コネクタ API リファレンスでは証明書認証がサポートされないことが示されています。

  3. データ ソースへの改ページ位置の自動修正オプション

また、データ コネクタ コンポーネントを検証する場合は、Postman などのツールをお勧めします。 詳しくは、「Microsoft Graph API で Postman を使用する」をご覧ください。

データ コネクタを構築する

CCP データ コネクタを構築するには、4 つのコンポーネントが必要です。

  1. 出力テーブルの定義
  2. データ収集ルール (DCR)
  3. データ コネクタのユーザー インターフェイス
  4. データ コネクタの接続ルール

各コンポーネントには、作成および検証するプロセスの詳細を示すセクションがあります。 ARM テンプレートの最終的なパッケージ化のために、各コンポーネントから JSON を取得します。

出力テーブルの定義

ヒント

データが標準の Log Analytics テーブルにのみ取り込まれる場合は、この手順をスキップします。 標準テーブルの例としては、CommonSecurityLogASimDnsActivityLogs などがあります。 サポートされている標準データ型の完全な一覧の詳細については、「カスタム データ コネクタのデータ変換サポート」を参照してください。

データ ソースが標準テーブルのスキーマに準拠していない場合は、次の 2 つのオプションがあります。

  • すべてのデータのカスタム テーブルを作成する
  • 一部のデータのカスタム テーブルを作成し、準拠データを標準テーブルに分割する

DCR と共にカスタム テーブルを作成する簡単な方法では、Log Analytics UI を使用します。 Tables API または別のプログラムによる方法を使用してカスタム テーブルを作成する場合は、テーブル名に _CL サフィックスを手動で追加します。 詳しくは、「カスタム テーブルを作成する」をご覧ください。

データを複数のテーブルに分割する方法の詳細については、サンプル データと、そのデータ用に作成されたカスタム テーブルの例を参照してください。

データ収集ルール

データ収集ルール (DCR) では、Azure Monitor でのデータ収集プロセスを定義します。 DCR では、収集する必要があるデータ、そのデータを変換する方法、およびそのデータを送信する場所を指定します。

  • データ コネクタごとにデプロイされる DCR は 1 つだけです。
  • DCR では、同じリージョンに対応する DCE が必要です。
  • CCP データ コネクタがデプロイされると、DCR がまだ存在しない場合は作成されます。

これらの記事の DCR に関する最新情報を参照してください。

サンプル データを使用してカスタム テーブルと DCR を作成するなど、DCE の作成を示すチュートリアルについては、「チュートリアル: ログ インジェスト API を使用して Azure Monitor ログにデータを送信する (Azure portal)」を参照してください。 このチュートリアルのプロセスを使用して、DCR でデータがテーブルに正しく取り込まれていることを確認します。

複数のデータ フローを含む複雑な DCR を作成する方法については、DCR の例のセクションを参照してください。

データ コネクタのユーザー インターフェイス

このコンポーネントでは、Microsoft Sentinel データ コネクタ ギャラリー内のデータ コネクタの UI をレンダリングします。 各データ コネクタには、UI 定義を 1 つだけ指定できます。

Data Connector Definition API を使用して、データ コネクタのユーザー インターフェイスを構築します。 データ コネクタ定義のリファレンスを補足として使用して、API 要素について詳しく説明します。

注:

  1. API ポーリング コネクタの kind プロパティは常に Customizable である必要があります。
  2. これは API ポーリング コネクタの一種であるため、connectivityCriteria の種類を hasDataConnectors に設定します
  3. instructionsSteps の例には、ConnectionToggleButton という種類のボタンが含まれています。 このボタンは、指定された接続パラメーターに基づいてデータ コネクタ ルールのデプロイをトリガーするのに役立ちます。

Postman を使用してデータ コネクタ定義 API を呼び出し、データ コネクタ ギャラリーで検証するためにデータ コネクタ UI を作成します。

例から学習するには、データ コネクタ定義のリファレンスの例のセクションを参照してください。

データ接続ルール

この部分では、次のような接続ルールを定義します。

  • ポーリング (polling)
  • 認証
  • paging

このセクションの構築の詳細については、データ コネクタ接続ルールのリファレンスを参照してください。

例から学習するには、データ コネクタ接続ルールのリファレンスの例を参照してください。

Postman を使用してデータ コネクタ API を呼び出し、接続ルールと前のコンポーネントを組み合わせたデータ コネクタを作成します。 コネクタが現在 UI に接続されていることを確認します。

機密入力をセキュリティで保護する

CCP データ コネクタで使用されている認証にかかわらず、機密情報のセキュリティが確保されるように次の手順を実行してください。 ここでの目標は、デプロイ履歴に読み取り可能な機密オブジェクトを残さずに、ARM テンプレートから CCP に資格情報を渡すことです。

ラベルの作成

データ コネクタ定義により、セキュリティ資格情報の入力を求める UI 要素が作成されます。 たとえば、データ コネクタが OAuth を使用してログ ソースに対して認証を行う場合、データ コネクタ定義セクションの指示に OAuthForm の種類が含められます。 これにより、ARM テンプレートが資格情報の入力を求めるように設定されます。

"instructions": [
    {
        "type": "OAuthForm",
        "parameters": {
        "UsernameLabel": "Username",
        "PasswordLabel": "Password",
        "connectButtonLabel": "Connect",
        "disconnectButtonLabel": "Disconnect"
        }
    }
],

機密入力を保存する

ARM デプロイ テンプレートのセクションには、データ コネクタをデプロイする管理者がパスワードを入力する場所が用意されています。 securestring を使用して、デプロイ後に読み取ることができないオブジェクトで機密情報をセキュリティ保護します。 詳細については、「パラメーターに関するセキュリティの推奨事項」を参照してください。

"mainTemplate": {
    "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
    "contentVersion": "[variables('dataConnectorCCPVersion')]",
    "parameters": {
        "Username": {
            "type": "securestring",
            "minLength": 1,
            "metadata": {
                "description": "Enter the username to connect to your data source."
        },
        "Password": {
            "type": "securestring",
            "minLength": 1,
            "metadata": {
                "description": "Enter the API key, client secret or password required to connect."
            }
        },
    // more deployment template information
    }
}

securestring オブジェクトを使用する

最後に、CCP はデータ コネクタ セクションの資格情報オブジェクトを使用します。

"auth": {
    "type": "OAuth2",
    "ClientSecret": "[[parameters('Password')]",
    "ClientId": "[[parameters('Username')]",
    "GrantType": "client_credentials",
    "TokenEndpoint": "https://api.contoso.com/oauth/token",
    "TokenEndpointHeaders": {
        "Content-Type": "application/x-www-form-urlencoded"
    },
    "TokenEndpointQueryParameters": {
        "grant_type": "client_credentials"
    }
},

Note

資格情報オブジェクトの構文 "ClientSecret": "[[parameters('Password')]", は奇妙に見えますが、入力ミスではありません。 パラメータも使用するデプロイ テンプレートを作成するには、先頭に余分な [ を追加して、そのセクションのパラメータをエスケープする必要があります。 これによりパラメータは、コネクタとのユーザー操作に基づいて値を割り当てることができます。

詳細については、テンプレート式のエスケープ文字に関するページを参照してください。

デプロイ テンプレートを作成する

ガイドとしてテンプレートの例を使用して、Azure Resource Management (ARM) テンプレートを手動でパッケージ化します。

テンプレートの例に加えて、Microsoft Sentinel コンテンツ ハブで使用可能な公開済みソリューションでも、データ コネクタに CCP が使用されています。 各コンポーネントを ARM テンプレートにまとめる方法のその他の例として、次のソリューションを確認してください。

コネクタをデプロイする

コードレス コネクタをカスタム テンプレートとしてデプロイします。

ヒント

前の手順で作成したリソースを削除します。 DCR とカスタム テーブルは、デプロイで作成されます。 デプロイする前にこれらのリソースを削除しないと、テンプレートの確認がより難しくなります。

  1. ARM デプロイ テンプレートの内容をコピーします。
  2. 記事「クイック スタート: Azure portal を使用 ARM テンプレートを作成してデプロイする」の「テンプレートの編集とデプロイ」の手順に従います。

ログ記録のソースについてネットワークの分離を維持する

ログ記録のソースでネットワークの分離が必要な場合は、CCP によって使用されるパブリック IP アドレスの許可リストを構成します。

Azure 仮想ネットワークでは、サービス タグを使用して、ネットワーク アクセスの制御を定義します。 CCP の場合、そのサービス タグは Scuba です。

Scuba サービス タグに関連付けられている現在の IP 範囲を見つけるには、「Service Tag Discovery API を使用する」を参照してください。

コードレス コネクタを確認する

データ コネクタ ギャラリーでコードレス コネクタを表示します。 データ コネクタを開き、接続に必要なすべての認証パラメーターを完了します。 正常に接続されると、DCR およびカスタム テーブルが作成されます。 リソース グループ内の DCR リソースと、ログ分析ワークスペースのカスタム テーブルを表示します。

Note

データの取り込みが開始されたことを確認できるまで最大 30 分かかる場合があります。

コードレス コネクタを構築する各手順は、次の例のセクションに示されています。

複数のテーブルへのインジェストを含む複雑なデータ ソースを示すために、この例では、出力テーブル スキーマと、複数の出力ストリームを含む DCR を取り上げます。 DCR の例では、これらを KQL 変換と共に配置します。 データ コネクタ UI 定義と接続ルールの例は、この同じサンプル データ ソースからの続きです。 最後に、ソリューション テンプレートでは、これらすべてのサンプル コンポーネントを使用して、サンプル CCP データ コネクタを作成する方法をエンド ツー エンドで示します。

サンプル データ

データ ソースからは、エンドポイントに接続するときに次の JSON が返されます。

[
        {
        "ts": "3/6/2023 8:15:15 AM",
        "eventType": "Alert",
        "deviceMac": "bc:27:c6:21:1c:70",
        "clientMac": "",
        "srcIp": "10.12.11.106",
        "destIp": "121.93.178.13",
        "protocol": "tcp/ip",
        "priority": "0",
        "message": "This is an alert message"
        },
        {
        "ts": "3/6/2023 8:14:54 AM",
        "eventType": "File",
        "srcIp": "178.175.128.249",
        "destIp": "234.113.125.105",
        "fileType": "MS_EXE",
        "fileSizeBytes": 193688,
        "disposition": "Malicious"
        }
]

この応答には、AlertFileeventType が含まれています。 ファイル イベントは正規化された標準テーブル AsimFileEventLogs に取り込まれますが、アラート イベントはカスタム テーブルに取り込まれます。

カスタム テーブルの例

このテーブルの構造の詳細については、Tables API に関するページを参照してください。 カスタム ログ テーブル名には _CL サフィックスが必要です。

{
"properties": {
    "schema": {
        "name": "ExampleConnectorAlerts_CL",
        "columns": [
        {
          "name": "TimeGenerated",
          "type": "datetime"
        },
        {
          "name": "SourceIP",
          "type": "string"
        },
        {
          "name": "DestIP",
          "type": "string"
        },
        {
          "name": "Message",
          "type": "string"
        },
        {
          "name": "Priority",
          "type": "int"
        }
        ]
      }
    }
}

データ収集ルールの例

次の DCR では、サンプル データ ソースを使用して 1 つのストリーム Custom-ExampleConnectorInput を定義し、出力を 2 つのテーブルに変換します。

  1. 最初のデータフローでは、eventType = Alert がカスタム ExampleConnectorAlerts_CL テーブルに転送されます。
  2. 2 番目のデータフローでは、eventType = File が正規化された標準テーブル ASimFileEventLogs に転送されます。

この例の構造の詳細については、データ収集ルールの構造に関するページを参照してください。

テスト環境でこの DCR を作成するには、Data Collection Rules API に従います。 {{double curly braces}} の例の要素は、Postman で使いやすい値を必要とする変数を示しています。 ARM テンプレートでこのリソースを作成すると、ここに示されている変数がパラメーターと交換されます。

{
  "location": "{{location}}",
  "properties": {
    "dataCollectionEndpointId": "/subscriptions/{{subscriptionId}}/resourceGroups/{{resourceGroupName}}/providers/Microsoft.Insights/dataCollectionEndpoints/{{dataCollectionEndpointName}}",
    "streamDeclarations": {
      "Custom-ExampleConnectorInput": {
        "columns": [
          {
            "name": "ts",
            "type": "datetime"
          },
          {
            "name": "eventType",
            "type": "string"
          },
          {
            "name": "deviceMac",
            "type": "string"
          },
          {
            "name": "clientMac",
            "type": "string"
          },
          {
            "name": "srcIp",
            "type": "string"
          },
          {
            "name": "destIp",
            "type": "string"
          },
          {
            "name": "protocol",
            "type": "string"
          },
          {
            "name": "priority",
            "type": "string"
          },
          {
            "name": "message",
            "type": "string"
          },
          {
            "name": "fileType",
            "type": "string"
          },
          {
            "name": "fileSizeBytes",
            "type": "int"
          },
          {
            "name": "disposition",
            "type": "string"
          }
        ]
      }
    },
    "destinations": {
      "logAnalytics": [
        {
          "workspaceResourceId": "/subscriptions/{{subscriptionId}}/resourcegroups/{{resourceGroupName}}/providers/microsoft.operationalinsights/workspaces/{{workspaceName}}",
          "name": "{{uniqueFriendlyDestinationName}}"
        }
      ]
    },
    "dataFlows": [
      {
        "streams": [
          "Custom-ExampleConnectorInput"
        ],
        "destinations": [
          "{{uniqueFriendlyDestinationName}}"
        ],
        "transformKql": "source | where eventType == \"Alert\" | project TimeGenerated = ts, SourceIP = srcIp, DestIP = destIp, Message = message, Priority = priority \n",
        "outputStream": "Custom-ExampleConnectorAlerts_CL"
      },
      {
        "streams": [
          "Custom-ExampleConnectorInput"
        ],
        "destinations": [
          "{{uniqueFriendlyDestinationName}}"
        ],
        "transformKql": "source | where eventType == \"File\" | project-rename TimeGenerated = ts, EventOriginalType = eventType, SrcIpAddr = srcIp, DstIpAddr = destIp, FileContentType = fileType, FileSize = fileSizeBytes, EventOriginalSeverity = disposition \n",
        "outputStream": "Microsoft-ASimFileEventLogs"
      }
    ]
  }
}

データ コネクタ UI 定義の例

この例は、データ コネクタ定義のリファレンスにあります。

データ コネクタ接続ルールの例

この例は、データ コネクタのリファレンスにあります。

ARM テンプレートの例

次の構造で ARM デプロイ テンプレートを構築します。これには、CCP データ コネクタの構築に必要な JSON コンポーネントの 4 つのセクションが含まれています。

{
    "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
    "contentVersion": "1.0.0.0",
    "parameters": {},
    "variables": {},
    "resources": [],
}

セクションを Visual Code などの JSON 対応エディターと結合して、コンマや右角かっこおよび丸かっこなどの構文エラーを最小限に抑えます。

テンプレート構築プロセスをガイドするために、コメントは metadatadescription に表示されるか、// コメント表記でインライン表示されます。 詳細については、「ARM テンプレートのベスト プラクティス」の「説明」を参照してください。

ARM テンプレート テスト ツールキット (arm-ttk) を使用して、構築するテンプレートを検証することを検討してください。 詳細については、arm-ttk を参照してください。

ARM テンプレートの例 - パラメーター

詳細については、「ARM テンプレートのパラメーター」を参照してください。

警告

リソースのデプロイ後に読み取り可能なオブジェクト内のすべてのパスワードとシークレットに securestring を使用します。 詳細については、「機密入力をセキュリティで保護する」および「パラメーターに関するセキュリティの推奨事項」を参照してください。

{
    "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
    "contentVersion": "1.0.0.0",
    "parameters": {
        "location": {
            "type": "string",
            "minLength": 1,
            "defaultValue": "[resourceGroup().location]",
            "metadata": {
                "description": "Not used, but needed to pass the arm-ttk test, 'Location-Should-Not-Be-Hardcoded'. Instead the `workspace-location` derived from the log analytics workspace is used."
            }
        },
        "workspace-location": {
            "type": "string",
            "defaultValue": "",
            "metadata": {
                "description": "[concat('Region to deploy solution resources -- separate from location selection',parameters('location'))]"
            }
        },
        "subscription": {
            "defaultValue": "[last(split(subscription().id, '/'))]",
            "type": "string",
            "metadata": {
                "description": "subscription id where Microsoft Sentinel is configured"
            }
        },
        "resourceGroupName": {
            "defaultValue": "[resourceGroup().name]",
            "type": "string",
            "metadata": {
                "description": "resource group name where Microsoft Sentinel is configured"
            }
        },
        "workspace": {
            "defaultValue": "",
            "type": "string",
            "metadata": {
                "description": "the log analytics workspace enabled for Microsoft Sentinel"
            }
        }
    },
    // Next is the variables section here
}

ARM テンプレートの例 - 変数

これらの推奨される変数は、テンプレートを簡略化するのに役立ちます。 多かれ少なかれ、必要に応じて使用してください。 詳細については、「ARM テンプレートの変数」を参照してください。

    "variables": {
        "workspaceResourceId": "[resourceId('microsoft.OperationalInsights/Workspaces', parameters('workspace'))]",
        "_solutionName": "Solution name", // Enter your solution name 
        "_solutionVersion": "3.0.0", // must be 3.0.0 or above
        "_solutionAuthor": "Contoso", // Enter the name of the author
        "_packageIcon": "<img src=\"{LogoLink}\" width=\"75px\" height=\"75px\">", // Enter the http link for the logo. NOTE: This field is only recommended for Azure Global Cloud.
        "_solutionId": "azuresentinel.azure-sentinel-solution-azuresentinel.azure-sentinel-MySolution", // Enter a name for your solution with this format but exchange the 'MySolution' portion
        "dataConnectorVersionConnectorDefinition": "1.0.0",
        "dataConnectorVersionConnections": "1.0.0",
        "_solutionTier": "Community", // This designates the appropriate support - all custom data connectors are "Community"
        "_dataConnectorContentIdConnectorDefinition": "MySolutionTemplateConnectorDefinition", // Enter a name for the connector
        "dataConnectorTemplateNameConnectorDefinition": "[concat(parameters('workspace'),'-dc-',uniquestring(variables('_dataConnectorContentIdConnectorDefinition')))]",
        "_dataConnectorContentIdConnections": "MySolutionTemplateConnections", // Enter a name for the connections this connector makes
        "dataConnectorTemplateNameConnections": "[concat(parameters('workspace'),'-dc-',uniquestring(variables('_dataConnectorContentIdConnections')))]",
        "_logAnalyticsTableId1": "ExampleConnectorAlerts_CL" // Enter the custom table name - not needed if you are ingesting data into standard tables
		// Enter more variables as needed "":""
    },
    // Next is the resources sections here

ARM テンプレートの例 - リソース

このテンプレート ガイドには、4 つの CCP データ コネクタ構築コンポーネントを含む 5 つの ARM デプロイ リソースがあります。

  1. contentTemplates (親リソース)
  2. dataConnectorDefinitions - 詳細については、「データ コネクタのユーザー インターフェイス」を参照してください。
  3. metadata
  4. contentTemplates
  5. contentPackages
    "resources": [
        // resource section 1 - contentTemplates
        {
            "type": "Microsoft.OperationalInsights/workspaces/providers/contentTemplates",
            "apiVersion": "2023-04-01-preview",
            "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/', variables('dataConnectorTemplateNameConnectorDefinition'), variables('dataConnectorVersionConnectorDefinition'))]",
            "location": "[parameters('workspace-location')]",
            "dependsOn": [
                "[extensionResourceId(resourceId('Microsoft.OperationalInsights/workspaces', parameters('workspace')), 'Microsoft.SecurityInsights/contentPackages', variables('_solutionId'))]"
            ],
            "properties": {
                "contentId": "[variables('_dataConnectorContentIdConnectorDefinition')]",
                "displayName": "[concat(variables('_solutionName'), variables('dataConnectorTemplateNameConnectorDefinition'))]",
                "contentKind": "DataConnector",
                "mainTemplate": {
                    "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
                    "contentVersion": "[variables('dataConnectorVersionConnectorDefinition')]",
                    "parameters": {},
                    "variables": {},
                    "resources": [
                        {
                            "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/',concat('DataConnector-', variables('_dataConnectorContentIdConnectorDefinition')))]",
                            "apiVersion": "2022-01-01-preview",
                            "type": "Microsoft.OperationalInsights/workspaces/providers/metadata",
                            "properties": {
                                "parentId": "[extensionResourceId(resourceId('Microsoft.OperationalInsights/workspaces', parameters('workspace')), 'Microsoft.SecurityInsights/dataConnectorDefinitions', variables('_dataConnectorContentIdConnectorDefinition'))]",
                                "contentId": "[variables('_dataConnectorContentIdConnectorDefinition')]",
                                "kind": "DataConnector",
                                "version": "[variables('dataConnectorVersionConnectorDefinition')]",
                                "source": {
                                    "sourceId": "[variables('_solutionId')]",
                                    "name": "[variables('_solutionName')]",
                                    "kind": "Solution"
                                },
                                "author": {
                                    "name": "[variables('_solutionAuthor')]"
                                },
                                "support": {
                                    "name": "[variables('_solutionAuthor')]",
                                    "tier": "[variables('_solutionTier')]"
                                },
                                "dependencies": {
                                    "criteria": [
                                        {
                                            "version": "[variables('dataConnectorVersionConnections')]",
                                            "contentId": "[variables('_dataConnectorContentIdConnections')]",
                                            "kind": "ResourcesDataConnector"
                                        }
                                    ]
                                }
                            }
                        },
                        {
                            "name": "MyDCRV1", // Enter your DCR name
                            "apiVersion": "2021-09-01-preview",
                            "type": "Microsoft.Insights/dataCollectionRules",
                            "location": "[parameters('workspace-location')]",
                            "kind": null,
                            "properties": 
							{ 
                                // Enter your DCR properties here.
                                //  Consider using these variables:
                                //  "dataCollectionEndpointId": "[concat('/subscriptions/',parameters('subscription'),'/resourceGroups/',parameters('resourceGroupName'),'/providers/Microsoft.Insights/dataCollectionEndpoints/',parameters('workspace'))]",
                                //  "workspaceResourceId": "[variables('workspaceResourceId')]",
							}
                        },
                        {
                            "name": "[variables('_logAnalyticsTableId1')]",
                            "apiVersion": "2022-10-01",
                            "type": "Microsoft.OperationalInsights/workspaces/tables",
                            "location": "[parameters('workspace-location')]",
                            "kind": null,
                            "properties": 
							{
								// Enter your log analytics table schema here. 
                                //  Consider using this variable for the name property:
                                //  "name": "[variables('_logAnalyticsTableId1')]",
							}			
                        }
						// Enter more tables if needed.
                    ]
                },
                "packageKind": "Solution",
                "packageVersion": "[variables('_solutionVersion')]",
                "packageName": "[variables('_solutionName')]",
                "contentProductId": "[concat(substring(variables('_solutionId'), 0, 50),'-','dc','-', uniqueString(concat(variables('_solutionId'),'-','DataConnector','-',variables('_dataConnectorContentIdConnectorDefinition'),'-', variables('dataConnectorVersionConnectorDefinition'))))]",
                "packageId": "[variables('_solutionId')]",
                "contentSchemaVersion": "3.0.0",
                "version": "[variables('_solutionVersion')]"
            }
        },
        // resource 2 section here
        // resource section 2 - dataConnectorDefinitions
        {
            "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/',variables('_dataConnectorContentIdConnectorDefinition'))]",
            "apiVersion": "2022-09-01-preview",
            "type": "Microsoft.OperationalInsights/workspaces/providers/dataConnectorDefinitions",
            "location": "[parameters('workspace-location')]",
            "kind": "Customizable",
            "properties": 
			{
				//Enter your data connector definition properties here
				//"connectorUiConfig": {
				//	"graphQueriesTableName": "[variables('_logAnalyticsTableId1')]",
                //}, 
			}
        },
        // resource 3 section here
        // resource section 3 - metadata
        {
            "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/',concat('DataConnector-', variables('_dataConnectorContentIdConnectorDefinition')))]",
            "apiVersion": "2022-01-01-preview",
            "type": "Microsoft.OperationalInsights/workspaces/providers/metadata",
            "properties": {
                "parentId": "[extensionResourceId(resourceId('Microsoft.OperationalInsights/workspaces', parameters('workspace')), 'Microsoft.SecurityInsights/dataConnectorDefinitions', variables('_dataConnectorContentIdConnectorDefinition'))]",
                "contentId": "[variables('_dataConnectorContentIdConnectorDefinition')]",
                "kind": "DataConnector",
                "version": "[variables('dataConnectorVersionConnectorDefinition')]",
                "source": {
                    "sourceId": "[variables('_solutionId')]",
                    "name": "[variables('_solutionName')]",
                    "kind": "Solution"
                },
                "author": {
                    "name": "[variables('_solutionAuthor')]"
                },
                "support": {
                    "name": "[variables('_solutionAuthor')]",
                    "tier": "[variables('_solutionTier')]"
                },
                "dependencies": {
                    "criteria": [
                        {
                            "version": "[variables('dataConnectorVersionConnections')]",
                            "contentId": "[variables('_dataConnectorContentIdConnections')]",
                            "kind": "ResourcesDataConnector"
                        }
                    ]
                }
            }
        },
        // resource 4 section here
        // resource section 4 - contentTemplates
        {
            "type": "Microsoft.OperationalInsights/workspaces/providers/contentTemplates",
            "apiVersion": "2023-04-01-preview",
            "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/', variables('dataConnectorTemplateNameConnections'), variables('dataConnectorVersionConnections'))]",
            "location": "[parameters('workspace-location')]",
            "dependsOn": [
                "[extensionResourceId(resourceId('Microsoft.OperationalInsights/workspaces', parameters('workspace')), 'Microsoft.SecurityInsights/contentPackages', variables('_solutionId'))]"
            ],
            "properties": {
                "contentId": "[variables('_dataConnectorContentIdConnections')]",
                "displayName": "[concat(variables('_solutionName'), variables('dataConnectorTemplateNameConnections'))]",
                "contentKind": "ResourcesDataConnector",
                "mainTemplate": {
                    "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
                    "contentVersion": "[variables('dataConnectorVersionConnections')]",
                    "parameters":
                    // These parameters are used by the data connector primarily as properties for the administrator to enter in the UI when configuring the connector
					{
                        "connectorDefinitionName": {
                            "defaultValue": "connectorDefinitionName",
                            "type": "string",
                            "minLength": 1
                        },
                        "workspace": {
                            "defaultValue": "[parameters('workspace')]",
                            "type": "string"
                        },
                        "dcrConfig": {
                            "defaultValue": {
                                "dataCollectionEndpoint": "data collection Endpoint",
                                "dataCollectionRuleImmutableId": "data collection rule immutableId"
                            },
                            "type": "object"
                        }
						// Enter additional parameters, for example:
						//"domainname": {
                        //    "defaultValue": "domain name",
                        //    "type": "string",
                        //    "minLength": 1
                        //},
                        //"apikey": {
                        //    "defaultValue": "",
                        //    "type": "securestring",
                        //    "minLength": 1
                        //}
                    },
                    "variables": {
                        "_dataConnectorContentIdConnections": "[variables('_dataConnectorContentIdConnections')]"
                    },
                    "resources": [
                        {
                            "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/',concat('DataConnector-', variables('_dataConnectorContentIdConnections')))]",
                            "apiVersion": "2022-01-01-preview",
                            "type": "Microsoft.OperationalInsights/workspaces/providers/metadata",
                            "properties": {
                                "parentId": "[extensionResourceId(resourceId('Microsoft.OperationalInsights/workspaces', parameters('workspace')), 'Microsoft.SecurityInsights/dataConnectors', variables('_dataConnectorContentIdConnections'))]",
                                "contentId": "[variables('_dataConnectorContentIdConnections')]",
                                "kind": "ResourcesDataConnector",
                                "version": "[variables('dataConnectorVersionConnections')]",
                                "source": {
                                    "sourceId": "[variables('_solutionId')]",
                                    "name": "[variables('_solutionName')]",
                                    "kind": "Solution"
                                },
                                "author": {
                                    "name": "[variables('_solutionAuthor')]"
                                },
                                "support": {
                                    "name": "[variables('_solutionAuthor')]",
                                    "tier": "[variables('_solutionTier')]"
                                }
                            }
                        },
                        {
                            "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/', 'MyDataConnector')]", // Replace the last part of the name with your data connector name
                            //  To create several connections using this template, make the name dynamic. For example, use the 'concat' function to add the connector name with a GUID using the 'guid' function.
                            "apiVersion": "2022-12-01-preview",
                            "type": "Microsoft.OperationalInsights/workspaces/providers/dataConnectors",
                            "location": "[parameters('workspace-location')]",
                            "kind": "RestApiPoller",
                            "properties": 
							{
								// Enter your data connector properties here. If you want to use UI parameters remember to escape the parameter like this: "[[parameters('paramName')]"
								//  Use parameters as needed. For example:	
                                // "dataType": "My product security event API",
                                // "response": {
                                //   "eventsJsonPaths": [
                                //        "$"
                                //    ],
                                //    "format": "json"
                                // },
                                // "paging": {
                                //    "pagingType": "LinkHeader"
                                // },
                                // "connectorDefinitionName": "[[parameters('connectorDefinitionName')]",
                                // "auth": {
                                //   "apiKeyName": "Authorization",
                                //    "ApiKey": "[[parameters('apikey')]",
                                //    "apiKeyIdentifier": "SSWS",
                                //    "type": "APIKey"
                                //} ,
                                // "request": {
                                //   "apiEndpoint": "[[concat('https://',parameters('domainname'),'/api/v1/logs')]",
                                //    "rateLimitQPS": 10,
                                //   "queryWindowInMin": 5,
                                //   "httpMethod": "GET",
                                //    "retryCount": 3,
                                //    "timeoutInSeconds": 60,
                                //    "headers": {
                                //        "Accept": "application/json",
                                //        "User-Agent": "My-Data-Source"
                                //    },
                                //    "startTimeAttributeName": "since",
								//    "endTimeAttributeName": "until"		     
                                // },
                                // "dcrConfig": {
                                //    "dataCollectionEndpoint": "[[parameters('dcrConfig').dataCollectionEndpoint]",
                                //    "dataCollectionRuleImmutableId": "[[parameters('dcrConfig').dataCollectionRuleImmutableId]",
                                //    "streamName": "Custom-ExampleConnectorAlerts_CL" //This input stream should be the same as the inputStream property configured for the DataCollectionRule 
                                // },
                                // "isActive": true
                            }
                        }
                    ]
                },
                "packageKind": "Solution",
                "packageVersion": "[variables('_solutionVersion')]",
                "packageName": "[variables('_solutionName')]",
                "contentProductId": "[concat(substring(variables('_solutionId'), 0, 50),'-','rdc','-', uniqueString(concat(variables('_solutionId'),'-','ResourcesDataConnector','-',variables('_dataConnectorContentIdConnections'),'-', variables('dataConnectorVersionConnections'))))]",
                "packageId": "[variables('_solutionId')]",
                "contentSchemaVersion": "3.0.0",
                "version": "[variables('_solutionVersion')]"
            }
        },
        // resource 5 section here
        // resource section 5 - contentPackages
        {
            "type": "Microsoft.OperationalInsights/workspaces/providers/contentPackages",
            "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/', variables('_solutionId'))]",
            "location": "[parameters('workspace-location')]",
            "apiVersion": "2023-04-01-preview",
            "properties": {
                "version": "[variables('_solutionVersion')]",
                "kind": "Solution",
                "contentSchemaVersion": "3.0.0",
                "contentId": "[variables('_solutionId')]",
                "source": {
                    "kind": "Solution",
                    "name": "[variables('_solutionName')]",
                    "sourceId": "[variables('_solutionId')]"
                },
                "author": {
                    "name": "[variables('_solutionAuthor')]"
                },
                "support": {
                    "name": "[variables('_solutionAuthor')]"
                },
                "dependencies": {
                    "operator": "AND",
                    "criteria": [
                        {
                            "kind": "DataConnector",
                            "contentId": "[variables('dataConnectorVersionConnectorDefinition')]",
                            "version": "[variables('_dataConnectorContentIdConnectorDefinition')]"
                        }
                    ]
                },
                "firstPublishDate": "2023-12-05",
                "providers": [
                    "[variables('_solutionAuthor')]"
                ],
                "contentKind": "Solution",
                "packageId": "[variables('_solutionId')]",
                "contentProductId": "[concat(substring(variables('_solutionId'), 0, 50),'-','sl','-', uniqueString(concat(variables('_solutionId'),'-','Solution','-',variables('_solutionId'),'-', variables('_solutionVersion'))))]",
                "displayName": "[variables('_solutionName')]",
                "publisherDisplayName": "[variables('_solutionId')]",
                "descriptionHtml": "test",
                "icon": "[variables('_packageIcon')]"
            }
        }
        // that's the end!
    ]
}

次のステップ

詳細については、「