Data Exports - Create Or Update
创建或更新数据导出。
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataExports/{dataExportName}?api-version=2025-07-01
URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
data
|
path | True |
string minLength: 4maxLength: 63 pattern: ^[A-Za-z][A-Za-z0-9-]+[A-Za-z0-9]$ |
数据导出规则名称。 |
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
资源组的名称。 此名称不区分大小写。 |
|
subscription
|
path | True |
string minLength: 1 |
目标订阅的 ID。 |
|
workspace
|
path | True |
string minLength: 4maxLength: 63 pattern: ^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$ |
工作区的名称。 |
|
api-version
|
query | True |
string minLength: 1 |
要用于此操作的 API 版本。 |
请求正文
| 名称 | 必需 | 类型 | 说明 |
|---|---|---|---|
| properties.destination.resourceId | True |
string |
目标资源 ID。 这可以从 Azure 中目标资源的“属性”条目复制。 |
| properties.tableNames | True |
string[] |
要导出的表数组,例如:[“Heartbeat, SecurityEvent”。 |
| properties.createdDate |
string |
最新的数据导出规则修改时间。 |
|
| properties.dataExportId |
string |
数据导出规则 ID。 |
|
| properties.destination.metaData.eventHubName |
string |
可选。 允许定义事件中心名称。 当目标为存储帐户时不适用。 |
|
| properties.enable |
boolean |
启用时处于活动状态。 |
|
| properties.lastModifiedDate |
string |
上次修改导出的日期和时间。 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 200 OK |
确定响应定义。 |
|
| 201 Created |
创建了响应定义。 |
|
| Other Status Codes |
描述操作失败的原因的错误响应。 |
安全性
azure_auth
Azure Active Directory OAuth2 流
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
| 名称 | 说明 |
|---|---|
| user_impersonation | 模拟用户帐户 |
示例
DataExportCreate
示例请求
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-00000000000/resourcegroups/RgTest1/providers/Microsoft.OperationalInsights/workspaces/DeWnTest1234/dataExports/export1?api-version=2025-07-01
{
"properties": {
"destination": {
"resourceId": "/subscriptions/192b9f85-a39a-4276-b96d-d5cd351703f9/resourceGroups/OIAutoRest1234/providers/Microsoft.EventHub/namespaces/test"
},
"tableNames": [
"Heartbeat"
]
}
}
示例响应
{
"properties": {
"dataExportId": "d5233afc-7829-4b89-c594-08d7975e19a5",
"destination": {
"resourceId": "/subscriptions/192b9f85-a39a-4276-b96d-d5cd351703f9/resourceGroups/OIAutoRest1234/providers/Microsoft.EventHub/namespaces/test",
"type": "EventHub"
},
"tableNames": [
"Heartbeat"
],
"enable": true,
"createdDate": "Sun, 12 Jan 2020 12:51:10 GMT",
"lastModifiedDate": "Sun, 12 Jan 2020 12:51:10 GMT"
},
"id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourcegroups/RgTest1/providers/microsoft.operationalinsights/workspaces/DeWnTest1234/export/export1",
"name": "export1",
"type": "Microsoft.OperationalInsights/workspaces/export"
}
{
"properties": {
"dataExportId": "d5233afc-7829-4b89-c594-08d7975e19a5",
"destination": {
"resourceId": "/subscriptions/192b9f85-a39a-4276-b96d-d5cd351703f9/resourceGroups/OIAutoRest1234/providers/Microsoft.EventHub/namespaces/test",
"type": "EventHub"
},
"tableNames": [
"Heartbeat"
],
"enable": true,
"createdDate": "Sun, 12 Jan 2020 12:51:10 GMT",
"lastModifiedDate": "Sun, 12 Jan 2020 12:51:10 GMT"
},
"id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourcegroups/RgTest1/providers/microsoft.operationalinsights/workspaces/DeWnTest1234/export/export1",
"name": "export1",
"type": "Microsoft.OperationalInsights/workspaces/export"
}
定义
| 名称 | 说明 |
|---|---|
|
Data |
顶级数据导出资源容器。 |
|
Error |
资源管理错误附加信息。 |
|
Error |
错误详细信息。 |
|
Error |
错误响应 |
| type |
目标资源的类型 |
DataExport
顶级数据导出资源容器。
| 名称 | 类型 | 说明 |
|---|---|---|
| id |
string |
资源的完全限定资源 ID。 示例 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
| name |
string |
资源的名称 |
| properties.createdDate |
string |
最新的数据导出规则修改时间。 |
| properties.dataExportId |
string |
数据导出规则 ID。 |
| properties.destination.metaData.eventHubName |
string |
可选。 允许定义事件中心名称。 当目标为存储帐户时不适用。 |
| properties.destination.resourceId |
string |
目标资源 ID。 这可以从 Azure 中目标资源的“属性”条目复制。 |
| properties.destination.type |
目标资源的类型 |
|
| properties.enable |
boolean |
启用时处于活动状态。 |
| properties.lastModifiedDate |
string |
上次修改导出的日期和时间。 |
| properties.tableNames |
string[] |
要导出的表数组,例如:[“Heartbeat, SecurityEvent”。 |
| type |
string |
资源类型。 例如“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts” |
ErrorAdditionalInfo
资源管理错误附加信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| info |
object |
其他信息。 |
| type |
string |
其他信息类型。 |
ErrorDetail
错误详细信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| additionalInfo |
错误附加信息。 |
|
| code |
string |
错误代码。 |
| details |
错误详细信息。 |
|
| message |
string |
错误消息。 |
| target |
string |
错误目标。 |
ErrorResponse
错误响应
| 名称 | 类型 | 说明 |
|---|---|---|
| error |
错误对象。 |
type
目标资源的类型
| 值 | 说明 |
|---|---|
| StorageAccount | |
| EventHub |