Data Connector Definitions - Create Or Update
创建或更新数据连接器定义。
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectorDefinitions/{dataConnectorDefinitionName}?api-version=2025-09-01
URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
data
|
path | True |
string pattern: ^[a-z0-9A-Z-_]*$ |
数据连接器定义名称。 |
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
资源组的名称。 此名称不区分大小写。 |
|
subscription
|
path | True |
string (uuid) |
目标订阅的 ID。 该值必须是 UUID。 |
|
workspace
|
path | True |
string minLength: 1maxLength: 90 pattern: ^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$ |
工作区的名称。 |
|
api-version
|
query | True |
string minLength: 1 |
要用于此操作的 API 版本。 |
请求正文
CustomizableConnectorDefinition
“可定制”类型的连接器定义。
| 名称 | 必需 | 类型 | 说明 |
|---|---|---|---|
| kind | True |
string:
Customizable |
数据连接器类型 |
| properties.connectorUiConfig | True |
“可自定义”连接器定义类型的 UiConfig。 |
|
| etag |
string |
Azure 资源的 Etag |
|
| properties.connectionsConfig |
“可自定义”连接器定义类型的 UiConfig。 |
||
| properties.createdTimeUtc |
string (date-time) |
以 UTC 格式获取或设置连接器定义创建日期。 |
|
| properties.lastModifiedUtc |
string (date-time) |
以 UTC 格式获取或设置连接器定义的上次修改日期。 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 200 OK | DataConnectorDefinition: |
Updated |
| 201 Created | DataConnectorDefinition: |
已创建 |
| Other Status Codes |
描述操作失败的原因的错误响应。 |
安全性
azure_auth
Azure Active Directory OAuth2 流
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
| 名称 | 说明 |
|---|---|
| user_impersonation | 模拟用户帐户 |
示例
Create data connector definition
示例请求
PUT https://management.azure.com/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/dataConnectorDefinitions/73e01a99-5cd7-4139-a149-9f2736ff2ab5?api-version=2025-09-01
{
"kind": "Customizable",
"etag": "\"0300bf09-0000-0000-0000-5c37296e0000\"",
"properties": {
"connectorUiConfig": {
"title": "GitHub Enterprise Audit Log",
"publisher": "GitHub",
"descriptionMarkdown": "The GitHub audit log connector provides the capability to ingest GitHub logs into Azure Sentinel. By connecting GitHub audit logs into Azure Sentinel, you can view this data in workbooks, use it to create custom alerts, and improve your investigation process.",
"graphQueries": [
{
"metricName": "Total events received",
"legend": "GitHub audit log events",
"baseQuery": "GitHubAuditLogPolling_CL"
}
],
"dataTypes": [
{
"name": "GitHubAuditLogPolling_CL",
"lastDataReceivedQuery": "GitHubAuditLogPolling_CL \n | summarize Time = max(TimeGenerated)\n | where isnotempty(Time)"
}
],
"connectivityCriteria": [
{
"type": "IsConnectedQuery",
"value": [
"GitHubAuditLogPolling_CL \n | summarize LastLogReceived = max(TimeGenerated)\n | project IsConnected = LastLogReceived > ago(30d)"
]
}
],
"availability": {
"status": 1,
"isPreview": false
},
"permissions": {
"resourceProvider": [
{
"provider": "Microsoft.OperationalInsights/workspaces",
"permissionsDisplayText": "read and write permissions are required.",
"providerDisplayName": "Workspace",
"scope": "Workspace",
"requiredPermissions": {
"write": true,
"read": false,
"delete": false,
"action": false
}
}
],
"customs": [
{
"name": "GitHub API personal token Key",
"description": "You need access to GitHub personal token, the key should have 'admin:org' scope"
}
]
},
"instructionSteps": [
{
"title": "Connect GitHub Enterprise Audit Log to Azure Sentinel",
"description": "Enable GitHub audit Logs. \n Follow [this](https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token) to create or find your personal key",
"instructions": [
{
"type": "OAuthForm",
"parameters": {
"clientIdLabel": "Client ID",
"clientSecretLabel": "Client Secret",
"connectButtonLabel": "Connect",
"disconnectButtonLabel": "Disconnect"
}
}
]
}
]
}
}
}
示例响应
{
"id": "/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/dataConnectorDefinitions/73e01a99-5cd7-4139-a149-9f2736ff2ab5",
"name": "73e01a99-5cd7-4139-a149-9f2736ff2ab5",
"type": "Microsoft.SecurityInsights/dataConnectorDefinitions",
"kind": "Customizable",
"etag": "\"0300bf09-0000-0000-0000-5c37296e0000\"",
"properties": {
"connectorUiConfig": {
"title": "GitHub Enterprise Audit Log",
"publisher": "GitHub",
"descriptionMarkdown": "The GitHub audit log connector provides the capability to ingest GitHub logs into Azure Sentinel. By connecting GitHub audit logs into Azure Sentinel, you can view this data in workbooks, use it to create custom alerts, and improve your investigation process.",
"graphQueries": [
{
"metricName": "Total events received",
"legend": "GitHub audit log events",
"baseQuery": "GitHubAuditLogPolling_CL"
}
],
"sampleQueries": [
{
"description": "All logs",
"query": "GitHubAuditLogPolling_CL \n | take 10"
}
],
"dataTypes": [
{
"name": "GitHubAuditLogPolling_CL",
"lastDataReceivedQuery": "GitHubAuditLogPolling_CL \n | summarize Time = max(TimeGenerated)\n | where isnotempty(Time)"
}
],
"connectivityCriteria": [
{
"type": "IsConnectedQuery",
"value": [
"GitHubAuditLogPolling_CL \n | summarize LastLogReceived = max(TimeGenerated)\n | project IsConnected = LastLogReceived > ago(30d)"
]
}
],
"availability": {
"status": 1,
"isPreview": false
},
"permissions": {
"resourceProvider": [
{
"provider": "Microsoft.OperationalInsights/workspaces",
"permissionsDisplayText": "read and write permissions are required.",
"providerDisplayName": "Workspace",
"scope": "Workspace",
"requiredPermissions": {
"write": true,
"read": false,
"delete": false,
"action": false
}
}
],
"customs": [
{
"name": "GitHub API personal token Key",
"description": "You need access to GitHub personal token, the key should have 'admin:org' scope"
}
]
},
"instructionSteps": [
{
"title": "Connect GitHub Enterprise Audit Log to Azure Sentinel",
"description": "Enable GitHub audit Logs. \n Follow [this](https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token) to create or find your personal key",
"instructions": [
{
"type": "OAuthForm",
"parameters": {
"clientIdLabel": "Client ID",
"clientSecretLabel": "Client Secret",
"connectButtonLabel": "Connect",
"disconnectButtonLabel": "Disconnect"
}
}
]
}
]
}
}
}
{
"id": "/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/dataConnectorDefinitions/73e01a99-5cd7-4139-a149-9f2736ff2ab5",
"name": "73e01a99-5cd7-4139-a149-9f2736ff2ab5",
"type": "Microsoft.SecurityInsights/dataConnectorDefinitions",
"kind": "Customizable",
"etag": "\"0300bf09-0000-0000-0000-5c37296e0000\"",
"properties": {
"connectorUiConfig": {
"title": "GitHub Enterprise Audit Log",
"publisher": "GitHub",
"descriptionMarkdown": "The GitHub audit log connector provides the capability to ingest GitHub logs into Azure Sentinel. By connecting GitHub audit logs into Azure Sentinel, you can view this data in workbooks, use it to create custom alerts, and improve your investigation process.",
"graphQueries": [
{
"metricName": "Total events received",
"legend": "GitHub audit log events",
"baseQuery": "GitHubAuditLogPolling_CL"
}
],
"sampleQueries": [
{
"description": "All logs",
"query": "GitHubAuditLogPolling_CL \n | take 10"
}
],
"dataTypes": [
{
"name": "GitHubAuditLogPolling_CL",
"lastDataReceivedQuery": "GitHubAuditLogPolling_CL \n | summarize Time = max(TimeGenerated)\n | where isnotempty(Time)"
}
],
"connectivityCriteria": [
{
"type": "IsConnectedQuery",
"value": [
"GitHubAuditLogPolling_CL \n | summarize LastLogReceived = max(TimeGenerated)\n | project IsConnected = LastLogReceived > ago(30d)"
]
}
],
"availability": {
"status": 1,
"isPreview": false
},
"permissions": {
"resourceProvider": [
{
"provider": "Microsoft.OperationalInsights/workspaces",
"permissionsDisplayText": "read and write permissions are required.",
"providerDisplayName": "Workspace",
"scope": "Workspace",
"requiredPermissions": {
"write": true,
"read": false,
"delete": false,
"action": false
}
}
],
"customs": [
{
"name": "GitHub API personal token Key",
"description": "You need access to GitHub personal token, the key should have 'admin:org' scope"
}
]
},
"instructionSteps": [
{
"title": "Connect GitHub Enterprise Audit Log to Azure Sentinel",
"description": "Enable GitHub audit Logs. \n Follow [this](https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token) to create or find your personal key",
"instructions": [
{
"type": "OAuthForm",
"parameters": {
"clientIdLabel": "Client ID",
"clientSecretLabel": "Client Secret",
"connectButtonLabel": "Connect",
"disconnectButtonLabel": "Disconnect"
}
}
]
}
]
}
}
}
定义
| 名称 | 说明 |
|---|---|
|
Cloud |
错误响应结构。 |
|
Cloud |
错误详细信息。 |
|
Connectivity |
我们确定连接器是否连接的标准。 例如,使用 KQL 查询检查预期的数据类型是否正在流动)。 |
|
Connector |
连接器创建的数据类型,包括指示上次在工作区中接收该数据类型的查询。 |
|
Connector |
连接器向客户的暴露状态。 |
|
Connector |
连接器所需的权限。 |
|
Connector |
资源提供程序详细信息包括用户创建连接所需的权限。 用户应在指定范围 ProviderPermissionsScope 中针对指定的资源提供程序具有所需的权限 (Read\Write, ..) 。 |
|
created |
创建资源的标识的类型。 |
|
Customizable |
“可自定义”连接器定义类型的 UiConfig。 |
|
Customizable |
“可定制”类型的连接器定义。 |
|
Customizable |
“可自定义”连接器定义类型的 UiConfig。 |
|
Custom |
连接器所需的自定义权限。 |
|
Data |
数据连接器定义的类型 |
|
Graph |
图形查询,用于显示一段时间内到达工作区的数据量。 |
|
Instruction |
启用连接器的说明步骤。 |
|
Instruction |
说明步骤详细信息,将显示在 Sentinel 门户中连接器页面的说明步骤部分中。 |
|
Provider |
用户应具有权限的范围,以便能够创建连接。 |
|
Resource |
在 ResourceProviders 中定义的连接器资源提供程序所需的权限。 有关权限的更多信息,请参阅 <href=“https://docs.microsoft.com/en-us/azure/role-based-access-control/role-definitions#actions-format">这里</见。> |
|
system |
与创建和上次修改资源相关的元数据。 |
CloudError
错误响应结构。
| 名称 | 类型 | 说明 |
|---|---|---|
| error |
错误数据 |
CloudErrorBody
错误详细信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| code |
string |
错误的标识符。 代码是固定的,旨在以编程方式使用。 |
| message |
string |
描述错误的消息,旨在适合在用户界面中显示。 |
ConnectivityCriterion
我们确定连接器是否连接的标准。 例如,使用 KQL 查询检查预期的数据类型是否正在流动)。
| 名称 | 类型 | 说明 |
|---|---|---|
| type |
string |
获取或设置连接类型。 |
| value |
string[] |
获取或设置用于检查连接的查询。 |
ConnectorDataType
连接器创建的数据类型,包括指示上次在工作区中接收该数据类型的查询。
| 名称 | 类型 | 说明 |
|---|---|---|
| lastDataReceivedQuery |
string |
获取或设置查询以指示上次在工作区中接收相关数据的时间。 |
| name |
string |
获取或设置要在图形中显示的数据类型的名称。 |
ConnectorDefinitionsAvailability
连接器向客户的暴露状态。
| 名称 | 类型 | 说明 |
|---|---|---|
| isPreview |
boolean |
获取或设置一个值,指示连接器是否为预览版。 |
| status |
integer (int32) |
连接器向客户的暴露状态。 可用值为 0-4(0=无,1=可用,2=FeatureFlag,3=内部)。 |
ConnectorDefinitionsPermissions
连接器所需的权限。
| 名称 | 类型 | 说明 |
|---|---|---|
| customs |
获取或设置用户创建连接所需的自定义权限。 |
|
| licenses |
string[] |
获取或设置用户创建连接所需的许可证。 |
| resourceProvider |
获取或设置用户创建连接所需的资源提供程序权限。 |
|
| tenant |
string[] |
获取或设置连接器所需的租户权限。 |
ConnectorDefinitionsResourceProvider
资源提供程序详细信息包括用户创建连接所需的权限。 用户应在指定范围 ProviderPermissionsScope 中针对指定的资源提供程序具有所需的权限 (Read\Write, ..) 。
| 名称 | 类型 | 说明 |
|---|---|---|
| permissionsDisplayText |
string |
获取或设置权限说明文本。 |
| provider |
string |
获取或设置提供程序名称。 |
| providerDisplayName |
string |
获取或设置权限提供程序显示名称。 |
| requiredPermissions |
在 ResourceProviders 中定义的连接器资源提供程序所需的权限。 有关权限的更多信息,请参阅 <href=“https://docs.microsoft.com/en-us/azure/role-based-access-control/role-definitions#actions-format">这里</见。> |
|
| scope |
用户应具有权限的范围,以便能够创建连接。 |
createdByType
创建资源的标识的类型。
| 值 | 说明 |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
CustomizableConnectionsConfig
“可自定义”连接器定义类型的 UiConfig。
| 名称 | 类型 | 说明 |
|---|---|---|
| templateSpecName |
string |
获取或设置模板名称。 模板包括可由连接器创建的 ARM 模板,通常是 dataConnectors ARM 模板。 |
| templateSpecVersion |
string |
获取或设置模板版本。 |
CustomizableConnectorDefinition
“可定制”类型的连接器定义。
| 名称 | 类型 | 说明 |
|---|---|---|
| etag |
string |
Azure 资源的 Etag |
| id |
string (arm-id) |
资源的完全限定资源 ID。 例如“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}” |
| kind |
string:
Customizable |
数据连接器类型 |
| name |
string |
资源的名称 |
| properties.connectionsConfig |
“可自定义”连接器定义类型的 UiConfig。 |
|
| properties.connectorUiConfig |
“可自定义”连接器定义类型的 UiConfig。 |
|
| properties.createdTimeUtc |
string (date-time) |
以 UTC 格式获取或设置连接器定义创建日期。 |
| properties.lastModifiedUtc |
string (date-time) |
以 UTC 格式获取或设置连接器定义的上次修改日期。 |
| systemData |
包含 createdBy 和 modifiedBy 信息的 Azure 资源管理器元数据。 |
|
| type |
string |
资源类型。 例如,“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts” |
CustomizableConnectorUiConfig
“可自定义”连接器定义类型的 UiConfig。
| 名称 | 类型 | 说明 |
|---|---|---|
| availability |
连接器向客户的暴露状态。 |
|
| connectivityCriteria |
获取或设置连接器检查连接器是否已连接的方式。 |
|
| dataTypes |
获取或设置数据类型以检查上次接收的数据。 |
|
| descriptionMarkdown |
string |
以 markdown 格式获取或设置连接器说明。 |
| graphQueries |
获取或设置图形查询以显示一段时间内的当前数据量。 |
|
| id |
string |
获取或设置自定义连接器 ID。可选字段。 |
| instructionSteps |
获取或设置启用连接器的指令步骤。 |
|
| isConnectivityCriteriasMatchSome |
boolean |
获取或设置一个值,指示是在 ConnectivityCriteria 项之间使用“OR”(SOME) 还是“AND”。 |
| logo |
string |
获取或设置在 Azure Sentinel 的连接器库中显示连接器时要使用的连接器徽标。 徽标值应为 SVG 格式。 |
| permissions |
连接器所需的权限。 |
|
| publisher |
string |
获取或设置连接器发布者名称。 |
| title |
string |
获取或设置连接器边栏选项卡标题。 |
CustomPermissionDetails
连接器所需的自定义权限。
| 名称 | 类型 | 说明 |
|---|---|---|
| description |
string |
获取或设置自定义权限说明。 |
| name |
string |
获取或设置自定义权限名称。 |
DataConnectorDefinitionKind
数据连接器定义的类型
| 值 | 说明 |
|---|---|
| Customizable |
GraphQuery
图形查询,用于显示一段时间内到达工作区的数据量。
| 名称 | 类型 | 说明 |
|---|---|---|
| baseQuery |
string |
获取或设置图形的基本查询。 基本查询由 Sentinel UI 基础设施包装,并带有 KQL 查询,用于测量一段时间内的体积。 |
| legend |
string |
获取或设置图形的图例。 |
| metricName |
string |
获取或设置查询正在检查的指标名称。 例如:“接收的数据总数”。 |
InstructionStep
启用连接器的说明步骤。
| 名称 | 类型 | 说明 |
|---|---|---|
| description |
string |
获取或设置指令步骤说明。 |
| innerSteps |
获取或设置内部指令步骤详细信息。 例如:指令步骤 1 可能包含内部指令步骤:[指令步骤 1.1,指令步骤 1.2]。 |
|
| instructions |
获取或设置指令步骤详细信息。 |
|
| title |
string |
获取或设置指令步骤标题。 |
InstructionStepDetails
说明步骤详细信息,将显示在 Sentinel 门户中连接器页面的说明步骤部分中。
| 名称 | 类型 | 说明 |
|---|---|---|
| parameters |
object |
获取或设置指令类型参数设置。 |
| type |
string |
获取或设置指令类型名称。 |
ProviderPermissionsScope
用户应具有权限的范围,以便能够创建连接。
| 值 | 说明 |
|---|---|
| Subscription | |
| ResourceGroup | |
| Workspace |
ResourceProviderRequiredPermissions
在 ResourceProviders 中定义的连接器资源提供程序所需的权限。 有关权限的更多信息,请参阅 <href=“https://docs.microsoft.com/en-us/azure/role-based-access-control/role-definitions#actions-format">这里</见。>
| 名称 | 类型 | 说明 |
|---|---|---|
| action |
boolean |
获取或设置一个值,指示权限是否为自定义作 (POST) 。 |
| delete |
boolean |
获取或设置一个值,指示权限是否为删除作 (DELETE)。 |
| read |
boolean |
获取或设置一个值,指示权限是否为读取作 (GET)。 |
| write |
boolean |
获取或设置一个值,指示权限是写入作(PUT 还是 PATCH)。 |
systemData
与创建和上次修改资源相关的元数据。
| 名称 | 类型 | 说明 |
|---|---|---|
| createdAt |
string (date-time) |
资源创建时间戳(UTC)。 |
| createdBy |
string |
创建资源的标识。 |
| createdByType |
创建资源的标识的类型。 |
|
| lastModifiedAt |
string (date-time) |
上次修改的资源时间戳(UTC) |
| lastModifiedBy |
string |
上次修改资源的标识。 |
| lastModifiedByType |
上次修改资源的标识的类型。 |