你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Data Exports - Create Or Update

创建或更新数据导出。

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataExports/{dataExportName}?api-version=2020-08-01

URI 参数

名称 必需 类型 说明
dataExportName
path True

string

数据导出规则名称。

Regex pattern: ^[A-Za-z][A-Za-z0-9-]+[A-Za-z0-9]$

resourceGroupName
path True

string

资源组的名称。 此名称不区分大小写。

subscriptionId
path True

string

目标订阅的 ID。

workspaceName
path True

string

工作区的名称。

Regex pattern: ^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$

api-version
query True

string

要用于此操作的 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

DataExport

正常响应定义。

201 Created

DataExport

已创建响应定义。

Other Status Codes

ErrorResponse

描述操作失败原因的错误响应。

安全性

azure_auth

Azure Active Directory OAuth2 流

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

名称 说明
user_impersonation 模拟用户帐户

示例

DataExportCreate

Sample Request

PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-00000000000/resourcegroups/RgTest1/providers/Microsoft.OperationalInsights/workspaces/DeWnTest1234/dataExports/export1?api-version=2020-08-01

{
  "properties": {
    "destination": {
      "resourceId": "/subscriptions/192b9f85-a39a-4276-b96d-d5cd351703f9/resourceGroups/OIAutoRest1234/providers/Microsoft.EventHub/namespaces/test"
    },
    "tableNames": [
      "Heartbeat"
    ]
  }
}

Sample Response

{
  "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"
}

定义

名称 说明
DataExport

顶级数据导出资源容器。

ErrorAdditionalInfo

资源管理错误附加信息。

ErrorDetail

错误详细信息。

ErrorResponse

错误响应

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

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

ErrorAdditionalInfo[]

错误附加信息。

code

string

错误代码。

details

ErrorDetail[]

错误详细信息。

message

string

错误消息。

target

string

错误目标。

ErrorResponse

错误响应

名称 类型 说明
error

ErrorDetail

错误对象。

type

目标资源的类型

名称 类型 说明
EventHub

string

StorageAccount

string