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

Tables - Get

获取 Log Analytics 工作区表。

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/tables/{tableName}?api-version=2025-02-01

URI 参数

名称 必需 类型 说明
resourceGroupName
path True

string

minLength: 1
maxLength: 90

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

subscriptionId
path True

string

minLength: 1

目标订阅的 ID。

tableName
path True

string

minLength: 4
maxLength: 63
pattern: ^[A-Za-z0-9-_]+$

表的名称。

workspaceName
path True

string

minLength: 4
maxLength: 63
pattern: ^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$

工作区的名称。

api-version
query True

string

minLength: 1

用于此作的 API 版本。

响应

名称 类型 说明
200 OK

Table

确定响应定义。

Other Status Codes

ErrorResponse

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

安全性

azure_auth

Azure Active Directory OAuth2 Flow

类型: oauth2
流向: implicit
授权 URL: https://login.microsoftonline.com/common/oauth2/authorize

作用域

名称 说明
user_impersonation 模拟用户帐户

示例

TablesGet

示例请求

GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/oiautorest6685/providers/Microsoft.OperationalInsights/workspaces/oiautorest6685/tables/table1_SRCH?api-version=2025-02-01

示例响应

{
  "systemData": {
    "createdBy": "00000000-0000-0000-0000-00000000000",
    "createdAt": "2020-02-03T04:05:06Z"
  },
  "properties": {
    "resultStatistics": {
      "progress": 75,
      "ingestedRecords": 5,
      "scannedGb": 23.5
    },
    "searchResults": {
      "query": "Heartbeat | where SourceSystem != '' | project SourceSystem",
      "description": "This table was created using a Search Job with the following query: 'Heartbeat | where SourceSystem != '' | project SourceSystem'.",
      "limit": 1000,
      "startSearchTime": "2020-02-03T04:05:06Z",
      "endSearchTime": "2020-02-02T04:05:06Z",
      "sourceTable": "Heartbeat"
    },
    "schema": {
      "name": "table1_SRCH",
      "tableSubType": "DataCollectionRuleBased",
      "tableType": "SearchResults",
      "displayName": null,
      "description": null,
      "columns": [],
      "standardColumns": [
        {
          "isHidden": false,
          "name": "TenantId",
          "type": "guid",
          "dataTypeHint": null,
          "displayName": null,
          "description": null,
          "isDefaultDisplay": false
        },
        {
          "isHidden": false,
          "name": "SourceSystem",
          "type": "string",
          "dataTypeHint": null,
          "displayName": null,
          "description": null,
          "isDefaultDisplay": false
        },
        {
          "isHidden": false,
          "name": "MG",
          "type": "guid",
          "dataTypeHint": null,
          "displayName": null,
          "description": null,
          "isDefaultDisplay": false
        },
        {
          "isHidden": false,
          "name": "ManagementGroupName",
          "type": "string",
          "dataTypeHint": null,
          "displayName": null,
          "description": null,
          "isDefaultDisplay": false
        },
        {
          "isHidden": false,
          "name": "TimeGenerated",
          "type": "dateTime",
          "dataTypeHint": null,
          "displayName": null,
          "description": null,
          "isDefaultDisplay": false
        },
        {
          "isHidden": false,
          "name": "Computer",
          "type": "string",
          "dataTypeHint": null,
          "displayName": null,
          "description": null,
          "isDefaultDisplay": false
        },
        {
          "isHidden": false,
          "name": "RawData",
          "type": "string",
          "dataTypeHint": null,
          "displayName": null,
          "description": null,
          "isDefaultDisplay": false
        }
      ],
      "categories": null,
      "labels": null,
      "source": null,
      "solutions": [
        "LogManagement"
      ]
    },
    "provisioningState": "InProgress",
    "retentionInDays": 50,
    "totalRetentionInDays": 50,
    "archiveRetentionInDays": 0,
    "retentionInDaysAsDefault": false,
    "totalRetentionInDaysAsDefault": true,
    "plan": "Analytics"
  },
  "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/oiautorest6685/providers/Microsoft.OperationalInsights/workspaces/oiautorest6685/tables/table1_SRCH",
  "name": "table1_SRCH"
}

定义

名称 说明
Column

表列。

ColumnDataTypeHintEnum

列数据类型逻辑提示。

ColumnTypeEnum

列数据类型。

createdByType

创建资源的标识的类型。

ErrorAdditionalInfo

资源管理错误附加信息。

ErrorDetail

错误详细信息。

ErrorResponse

错误响应

ProvisioningStateEnum

表的当前预配状态。 如果设置为“updateing”,则表示由于正在进行的作而导致的资源锁,禁止对表进行任何更新,直到正在进行的作结束。

RestoredLogs

还原参数。

ResultStatistics

搜索作业执行统计信息。

Schema

表的架构。

SearchResults

启动此表的搜索作业的参数。

SourceEnum

表的创建者。

systemData

与创建和上次修改资源相关的元数据。

Table

工作区数据表定义。

TablePlanEnum

指示系统如何处理和收费引入到此表的日志。

TableSubTypeEnum

子类型描述了哪些 API 可用于与表交互,以及哪些功能可用于表。

TableTypeEnum

表的创建者。

Column

表列。

名称 类型 说明
dataTypeHint

ColumnDataTypeHintEnum

列数据类型逻辑提示。

description

string

列说明。

displayName

string

列显示名称。

isDefaultDisplay

boolean

默认显示。

isHidden

boolean

是否隐藏列。

name

string

列名。

type

ColumnTypeEnum

列数据类型。

ColumnDataTypeHintEnum

列数据类型逻辑提示。

说明
armPath

Azure 资源模型 (ARM) 路径:/subscriptions/{...}/resourceGroups/{...}/providers/Microsoft。{...}/{...}/{...}/{...}...

guid

标准形状 xxxxxxxx-xxxx-xxxx-xxxxxx 后的标准 128 位 GUID

ip

标准形状 x.x.x.x.x/y:y:y:y:

uri

与 URI 模式匹配的字符串,例如,scheme://username:password@host:1234/this/is/a/path?k1=v1&k2=v2#fragment

ColumnTypeEnum

列数据类型。

说明
boolean
dateTime
dynamic
guid
int
long
real
string

createdByType

创建资源的标识的类型。

说明
Application
Key
ManagedIdentity
User

ErrorAdditionalInfo

资源管理错误附加信息。

名称 类型 说明
info

object

其他信息。

type

string

其他信息类型。

ErrorDetail

错误详细信息。

名称 类型 说明
additionalInfo

ErrorAdditionalInfo[]

错误附加信息。

code

string

错误代码。

details

ErrorDetail[]

错误详细信息。

message

string

错误消息。

target

string

错误目标。

ErrorResponse

错误响应

名称 类型 说明
error

ErrorDetail

错误对象。

ProvisioningStateEnum

表的当前预配状态。 如果设置为“updateing”,则表示由于正在进行的作而导致的资源锁,禁止对表进行任何更新,直到正在进行的作结束。

说明
Deleting

表状态正在删除。

InProgress

表架构稳定且不发生更改,表数据将更新。

Succeeded

表状态稳定且没有更改,表已解锁并打开以供新更新使用。

Updating

表架构仍在生成和更新中,表当前已锁定进行任何更改,直到完成该过程。

RestoredLogs

还原参数。

名称 类型 说明
azureAsyncOperationId

string

搜索结果表异步作 ID。

endRestoreTime

string (date-time)

结束还原的时间戳(UTC)。

sourceTable

string

要从中还原数据的表。

startRestoreTime

string (date-time)

从 (UTC) 开始还原的时间戳。

ResultStatistics

搜索作业执行统计信息。

名称 类型 说明
ingestedRecords

integer (int32)

搜索作业返回的行数。

progress

number

multipleOf: 0.01

搜索作业完成百分比。

scannedGb

number

multipleOf: 0.01

搜索作业:扫描的数据量。

Schema

表的架构。

名称 类型 说明
categories

string[]

表类别。

columns

Column[]

表自定义列的列表。

description

string

表说明。

displayName

string

表显示名称。

labels

string[]

表标签。

name

string

表名。

solutions

string[]

表所属的解决方案列表

source

SourceEnum

表的创建者。

standardColumns

Column[]

表标准列的列表。

tableSubType

TableSubTypeEnum

子类型描述了哪些 API 可用于与表交互,以及哪些功能可用于表。

tableType

TableTypeEnum

表的创建者。

SearchResults

启动此表的搜索作业的参数。

名称 类型 说明
azureAsyncOperationId

string

搜索结果表异步作 ID。

description

string

搜索作业说明。

endSearchTime

string (date-time)

按 UTC 结束搜索的时间戳

limit

integer (int32)

将搜索作业限制为最多返回指定行数。

query

string

搜索作业查询。

sourceTable

string

搜索作业中使用的表。

startSearchTime

string (date-time)

从 (UTC) 开始搜索的时间戳

SourceEnum

表的创建者。

说明
customer

由工作区所有者创建的表,并且仅在此工作区中找到。

microsoft

由系统预配的表,通过诊断设置、代理或任何其他标准数据收集方式收集。

systemData

与创建和上次修改资源相关的元数据。

名称 类型 说明
createdAt

string (date-time)

资源创建时间戳(UTC)。

createdBy

string

创建资源的标识。

createdByType

createdByType

创建资源的标识的类型。

lastModifiedAt

string (date-time)

上次修改的资源时间戳(UTC)

lastModifiedBy

string

上次修改资源的标识。

lastModifiedByType

createdByType

上次修改资源的标识的类型。

Table

工作区数据表定义。

名称 类型 说明
id

string

资源的完全限定资源 ID。 Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

name

string

资源的名称

properties.archiveRetentionInDays

integer (int32)

表数据存档保留期(以天为单位)。 计算结果为 (totalRetentionInDays-retentionInDays)

properties.lastPlanModifiedDate

string

上次修改表计划的时间戳(UTC)。

properties.plan

TablePlanEnum

指示系统如何处理和收费引入到此表的日志。

properties.provisioningState

ProvisioningStateEnum

表的当前预配状态。 如果设置为“updateing”,则表示由于正在进行的作而导致的资源锁,禁止对表进行任何更新,直到正在进行的作结束。

properties.restoredLogs

RestoredLogs

启动此表的还原作的参数。

properties.resultStatistics

ResultStatistics

搜索作业执行统计信息。

properties.retentionInDays

integer (int32)

minimum: 4
maximum: 730

表保留期(以天为单位,介于 4 到 730 之间)。 将此属性设置为 -1 默认为工作区保留期。

properties.retentionInDaysAsDefault

boolean

True - 值源自工作区保留天数,False - 特定于客户。

properties.schema

Schema

表架构。

properties.searchResults

SearchResults

启动此表的搜索作业的参数。

properties.totalRetentionInDays

integer (int32)

minimum: 4
maximum: 4383

表总保留期(以天为单位,介于 4 到 4383 之间)。 将此属性设置为 -1 默认为表保留。

properties.totalRetentionInDaysAsDefault

boolean

True - 值源自天数的保留期,False - 特定于客户。

systemData

systemData

与创建和上次修改资源相关的元数据。

type

string

资源的类型。 例如“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts”

TablePlanEnum

指示系统如何处理和收费引入到此表的日志。

说明
Analytics

允许监视和分析的日志。

Basic

调整为支持高容量低值详细日志的日志。

TableSubTypeEnum

子类型描述了哪些 API 可用于与表交互,以及哪些功能可用于表。

说明
Any

创建内置表的默认子类型。

Classic

指示通过数据收集器 API 或 MMA 代理的自定义日志功能或为其创建自定义字段的任何表创建的表。

DataCollectionRuleBased

符合通过数据收集规则支持的任何手段将数据发送到其中的条件的表:数据收集终结点 API、引入时间转换或数据收集规则提供的任何其他机制

TableTypeEnum

表的创建者。

说明
CustomLog

自定义日志表。

Microsoft

Azure Monitor 收集的标准数据。

RestoredLogs

还原的数据。

SearchResults

搜索作业收集的数据。