Workbooks - Create Or Update

新しいブックを作成します。

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

URI パラメーター

名前 / 必須 説明
resourceGroupName
path True

string

リソース グループの名前。 名前の大文字と小文字は区別されます。

resourceName
path True

string

Application Insights コンポーネント リソースの名前。

subscriptionId
path True

string

ターゲット サブスクリプションの ID。

api-version
query True

string

この操作に使用する API バージョン。

sourceId
query

string

リンクされたすべてのブックをフェッチする Azure リソース ID。

要求本文

名前 必須 説明
location True

string

リソースが保存されている地理的な場所

properties.category True

string

作成時にユーザーによって定義されたブック カテゴリ。

properties.displayName True

string

ブックのユーザー定義名 (表示名)。

properties.serializedData True

string

この特定のブックの構成。 構成データは、有効な JSON を含む文字列です

etag

object

リソース etag

identity

Identity

BYOS に使用される ID

kind

kind

ブックの種類。 有効な値のみが共有されます。

properties.description

string

ブックの説明。

properties.sourceId

string

ソース リソースの ResourceId。

properties.storageUri

string

独自のストレージを持ち込むときにストレージ アカウントに対する resourceId が使用される

properties.tags

string[]

非推奨の場合は、他のタグ フィールドを使用してください

properties.version

string

'Notebook/1.0' のようなブック スキーマのバージョン形式。serializedData 内のブックと一致する必要があります

tags

object

リソース タグ。

応答

名前 説明
200 OK

Workbook

新しく作成されたブック。

201 Created

Workbook

新しく作成されたブック。

Other Status Codes

WorkbookError

操作に失敗した理由を説明するエラー応答。

セキュリティ

azure_auth

Azure Active Directory OAuth2 フロー。

型: oauth2
フロー: implicit
Authorization URL (承認 URL): https://login.microsoftonline.com/common/oauth2/authorize

スコープ

名前 説明
user_impersonation ユーザー アカウントの借用

WorkbookAdd
WorkbookManagedAdd

WorkbookAdd

要求のサンプル

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

{
  "location": "westus",
  "kind": "shared",
  "properties": {
    "displayName": "Sample workbook",
    "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}",
    "category": "workbook",
    "description": "Sample workbook"
  },
  "tags": {
    "TagSample01": "sample01",
    "TagSample02": "sample02"
  }
}

応答のサンプル

{
  "id": "/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group/providers/microsoft.insights/workbooks/deadb33f-5e0d-4064-8ebb-1a4ed0313eb2",
  "type": "Microsoft.Insights/workbooks",
  "location": "westus",
  "name": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2",
  "kind": "shared",
  "properties": {
    "displayName": "Sample 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",
    "sourceId": "/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group",
    "timeModified": "2021-08-24T06:56:31.6301521Z",
    "storageUri": null,
    "description": "Sample workbook",
    "revision": "1e2f8435b98248febee70c64ac22e1bb"
  },
  "tags": {
    "TagSample01": "sample01",
    "TagSample02": "sample02"
  }
}
{
  "id": "/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group/providers/microsoft.insights/workbooks/deadb33f-5e0d-4064-8ebb-1a4ed0313eb2",
  "type": "Microsoft.Insights/workbooks",
  "location": "westus",
  "name": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2",
  "kind": "shared",
  "properties": {
    "displayName": "Sample 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",
    "sourceId": "/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group",
    "timeModified": "2021-08-24T06:56:31.6301521Z",
    "storageUri": null,
    "description": "Sample workbook",
    "revision": "1e2f8435b98248febee70c64ac22e1bb"
  },
  "tags": {
    "TagSample01": "sample01",
    "TagSample02": "sample02"
  }
}

WorkbookManagedAdd

要求のサンプル

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

{
  "location": "westus",
  "kind": "shared",
  "identity": {
    "type": "UserAssigned",
    "userAssignedIdentities": {
      "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myid": {}
    }
  },
  "properties": {
    "displayName": "Sample workbook",
    "serializedData": "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":{\"json\":\"test\"},\"name\":\"text - 0\"}],\"isLocked\":false,\"fallbackResourceIds\":[\"/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/my-resource-group\"]}",
    "version": "Notebook/1.0",
    "category": "workbook",
    "description": "Sample workbook",
    "storageUri": "/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/my-resource-group/providers/Microsoft.Storage/storageAccounts/mystorage/blobServices/default/containers/mycontainer"
  }
}

応答のサンプル

{
  "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": "Sample workbook",
    "serializedData": "{\"version\":\"Notebook/1.0\",\"items\":[],\"isLocked\":false,\"fallbackResourceIds\":[\"/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/my-resource-group/providers/Microsoft.OperationalInsights/workspaces/test-ws\"]}",
    "version": "Notebook/1.0",
    "category": "workbook",
    "userId": "70d90f65-8a70-4e42-b8d5-86gv25e0a90f",
    "sourceId": "/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group",
    "timeModified": "2020-10-20T22:00:26.4229554Z",
    "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"
  }
}
{
  "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": "Sample workbook",
    "serializedData": "{\"version\":\"Notebook/1.0\",\"items\":[],\"isLocked\":false,\"fallbackResourceIds\":[\"/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/my-resource-group/providers/Microsoft.OperationalInsights/workspaces/test-ws\"]}",
    "version": "Notebook/1.0",
    "category": "workbook",
    "userId": "70d90f65-8a70-4e42-b8d5-86gv25e0a90f",
    "sourceId": "/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group",
    "timeModified": "2020-10-20T22:00:26.4229554Z",
    "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

リソースを作成した ID の種類。

Identity

BYOS に使用される ID

kind

ブックの種類。 有効な値のみが共有されます。

ManagedServiceIdentityType

マネージド サービス ID の種類 (SystemAssigned 型と UserAssigned 型の両方が許可されます)。

systemData

リソースの作成と最後の変更に関連するメタデータ。

UserAssignedIdentity

ユーザー割り当て ID プロパティ

Workbook

Application Insights ブックの定義。

WorkbookError

エラー応答。

WorkbookErrorDefinition

エラー定義。

WorkbookInnerErrorTrace

エラーの詳細

createdByType

リソースを作成した ID の種類。

名前 説明
Application

string

Key

string

ManagedIdentity

string

User

string

Identity

BYOS に使用される ID

名前 説明
principalId

string

システム割り当て ID のサービス プリンシパル ID。 このプロパティは、システム割り当て ID に対してのみ提供されます。

tenantId

string

システム割り当て ID のテナント ID。 このプロパティは、システム割り当て ID に対してのみ提供されます。

type

ManagedServiceIdentityType

マネージド サービス ID の種類 (SystemAssigned 型と UserAssigned 型の両方が許可されます)。

userAssignedIdentities

<string,  UserAssignedIdentity>

User-Assigned ID
リソースに関連付けられているユーザー割り当て ID のセット。 userAssignedIdentities ディクショナリ キーは、'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName} という形式の ARM リソース ID になります。 ディクショナリ値は、要求で空のオブジェクト ({}) にすることができます。

kind

ブックの種類。 有効な値のみが共有されます。

名前 説明
shared

string

user

string

ManagedServiceIdentityType

マネージド サービス ID の種類 (SystemAssigned 型と UserAssigned 型の両方が許可されます)。

名前 説明
None

string

SystemAssigned

string

SystemAssigned,UserAssigned

string

UserAssigned

string

systemData

リソースの作成と最後の変更に関連するメタデータ。

名前 説明
createdAt

string

リソース作成のタイムスタンプ (UTC)。

createdBy

string

リソースを作成した ID。

createdByType

createdByType

リソースを作成した ID の種類。

lastModifiedAt

string

リソースの最終変更のタイムスタンプ (UTC)

lastModifiedBy

string

リソースを最後に変更した ID。

lastModifiedByType

createdByType

リソースを最後に変更した ID の種類。

UserAssignedIdentity

ユーザー割り当て ID プロパティ

名前 説明
clientId

string

割り当てられた ID のクライアント ID。

principalId

string

割り当てられた ID のプリンシパル ID。

Workbook

Application Insights ブックの定義。

名前 説明
etag

object

リソース etag

id

string

リソースの完全修飾リソース ID。 例 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

identity

Identity

BYOS に使用される ID

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

このブック定義に対して行われた最後の変更の 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[]

詳細なエラー トレース