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

Workbooks - Get

按其 resourceName 获取单个工作簿。

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooks/{resourceName}?api-version=2021-08-01
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooks/{resourceName}?api-version=2021-08-01&canFetchContent={canFetchContent}

URI 参数

名称 必需 类型 说明
resourceGroupName
path True

string

minLength: 1
maxLength: 90

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

resourceName
path True

string

Application Insights 组件资源的名称。

subscriptionId
path True

string

minLength: 1

目标订阅的 ID。

api-version
query True

string

minLength: 1

用于此作的 API 版本。

canFetchContent
query

boolean

指示是否返回每个适用工作簿的完整内容的标志。 如果为 false,则仅返回工作簿的摘要内容。

响应

名称 类型 说明
200 OK

Workbook

工作簿定义。

Other Status Codes

WorkbookError

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

安全性

azure_auth

Azure Active Directory OAuth2 Flow。

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

作用域

名称 说明
user_impersonation 模拟用户帐户

示例

WorkbookGet
WorkbookGet1
WorkbookManagedGet

WorkbookGet

示例请求

GET https://management.azure.com/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/my-resource-group/providers/Microsoft.Insights/workbooks/deadb33f-5e0d-4064-8ebb-1a4ed0313eb2?api-version=2021-08-01

示例响应

{
  "id": "/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group/providers/microsoft.insights/workbooks/deadb33f-5e0d-4064-8ebb-1a4ed0313eb2",
  "name": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2",
  "type": "Microsoft.Insights/workbooks",
  "location": "westus",
  "kind": "shared",
  "properties": {
    "displayName": "My New Workbook",
    "userId": "userId",
    "serializedData": "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook.  This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}",
    "version": "Notebook/1.0",
    "category": "workbook",
    "timeModified": "2021-08-24T06:56:31.6301521Z",
    "storageUri": null,
    "description": "Sample workbook",
    "revision": "1e2f8435b98248febee70c64ac22e1bb"
  },
  "tags": {
    "TagSample01": "sample01",
    "TagSample02": "sample02"
  }
}

WorkbookGet1

示例请求

GET https://management.azure.com/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/my-resource-group/providers/Microsoft.Insights/workbooks/deadb33f-5e0d-4064-8ebb-1a4ed0313eb2?api-version=2021-08-01

示例响应

{
  "id": "/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group/providers/microsoft.insights/workbooks/deadb33f-5e0d-4064-8ebb-1a4ed0313eb2",
  "name": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2",
  "type": "Microsoft.Insights/workbooks",
  "location": "westus",
  "kind": "shared",
  "properties": {
    "displayName": "My New Workbook",
    "userId": "userId",
    "serializedData": "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook.  This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}",
    "version": "Notebook/1.0",
    "category": "workbook",
    "timeModified": "2021-08-24T06:56:31.6301521Z",
    "storageUri": null
  },
  "tags": {
    "TagSample01": "sample01",
    "TagSample02": "sample02"
  }
}

WorkbookManagedGet

示例请求

GET https://management.azure.com/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/my-resource-group/providers/Microsoft.Insights/workbooks/deadb33f-5e0d-4064-8ebb-1a4ed0313eb2?api-version=2021-08-01

示例响应

{
  "identity": {
    "type": "UserAssigned",
    "userAssignedIdentities": {
      "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myid": {
        "clientId": "00000000-0000-0000-0000-000000000000",
        "principalId": "00000000-0000-0000-0000-000000000000"
      }
    }
  },
  "id": "/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group/providers/Microsoft.Insights/workbooks/deadb33f-5e0d-4064-8ebb-1a4ed0313eb2",
  "name": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2",
  "type": "Microsoft.Insights/workbooks",
  "location": "westus",
  "kind": "shared",
  "properties": {
    "displayName": "azuremon",
    "serializedData": "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":{\"json\":\"testing1\"},\"showPin\":false,\"name\":\"text - 0\"}],\"isLocked\":true,\"fallbackResourceIds\":[\"Azure Monitor\"]}",
    "version": "Notebook/1.0",
    "category": "workbook",
    "userId": "51d1409c-d725-4550-ac03-98c0bef9ef07",
    "sourceId": "azure monitor",
    "timeModified": "2020-09-04T09:07:17.735638Z",
    "description": "Sample workbook",
    "revision": "1e2f8435b98248febee70c64ac22e1bb",
    "storageUri": "/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/my-resource-group/providers/Microsoft.Storage/storageAccounts/mystorage/blobServices/default/containers/mycontainer"
  }
}

定义

名称 说明
createdByType

创建资源的标识的类型。

Identity

用于 BYOS 的标识

kind

工作簿的类型。 仅共享有效值。

ManagedServiceIdentityType

托管服务标识的类型(其中允许 SystemAssigned 和 UserAssigned 类型)。

systemData

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

UserAssignedIdentity

用户分配的标识属性

Workbook

Application Insights 工作簿定义。

WorkbookError

错误响应。

WorkbookErrorDefinition

错误定义。

WorkbookInnerErrorTrace

错误详细信息

createdByType

创建资源的标识的类型。

说明
User
Application
ManagedIdentity
Key

Identity

用于 BYOS 的标识

名称 类型 说明
principalId

string (uuid)

系统分配标识的服务主体 ID。 此属性仅针对系统分配的标识提供。

tenantId

string (uuid)

系统分配标识的租户 ID。 此属性仅针对系统分配的标识提供。

type

ManagedServiceIdentityType

托管服务标识的类型(其中允许 SystemAssigned 和 UserAssigned 类型)。

userAssignedIdentities

<string,  UserAssignedIdentity>

User-Assigned 标识
与资源关联的用户分配标识集。 userAssignedIdentities 字典密钥将为 ARM 资源 ID,格式为“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}”。 字典值可以是请求中的空对象({})。

kind

工作簿的类型。 仅共享有效值。

说明
user
shared

ManagedServiceIdentityType

托管服务标识的类型(其中允许 SystemAssigned 和 UserAssigned 类型)。

说明
None
SystemAssigned
UserAssigned
SystemAssigned,UserAssigned

systemData

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

名称 类型 说明
createdAt

string (date-time)

资源创建时间戳(UTC)。

createdBy

string

创建资源的标识。

createdByType

createdByType

创建资源的标识的类型。

lastModifiedAt

string (date-time)

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

lastModifiedBy

string

上次修改资源的标识。

lastModifiedByType

createdByType

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

UserAssignedIdentity

用户分配的标识属性

名称 类型 说明
clientId

string (uuid)

分配的标识的客户端 ID。

principalId

string (uuid)

已分配标识的主体 ID。

Workbook

Application Insights 工作簿定义。

名称 类型 说明
etag

object

资源 etag

id

string

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

identity

Identity

用于 BYOS 的标识

kind

kind

工作簿的类型。 仅共享有效值。

location

string

资源所在的地理位置

name

string

资源的名称

properties.category

string

工作簿类别,在创建时由用户定义。

properties.description

string

工作簿的说明。

properties.displayName

string

工作簿的用户定义名称(显示名称)。

properties.revision

string

此工作簿定义的唯一修订 ID

properties.serializedData

string

此特定工作簿的配置。 配置数据是包含有效 JSON 的字符串

properties.sourceId

string

源资源的 ResourceId。

properties.storageUri

string

使用自带存储时的 resourceId 到存储帐户

properties.tags

string[]

已弃用,请使用其他标记字段

properties.timeModified

string (date-time)

上次修改此工作簿定义的日期和时间(UTC)。

properties.userId

string

拥有此工作簿的特定用户的唯一用户 ID。

properties.version

string

工作簿架构版本格式,如“Notebook/1.0”,它应与 serializedData 中的工作簿匹配

systemData

systemData

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

tags

object

资源标记。

type

string

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

WorkbookError

错误响应。

名称 类型 说明
error

WorkbookErrorDefinition

错误详细信息。

WorkbookErrorDefinition

错误定义。

名称 类型 说明
code

string

服务特定的错误代码,用作 HTTP 错误代码的子状态。

innererror

WorkbookInnerErrorTrace

内部错误详细信息。

message

string

错误说明。

WorkbookInnerErrorTrace

错误详细信息

名称 类型 说明
trace

string[]

详细的错误跟踪