Workbooks - Update

Updates a workbook that has already been added.

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

URI Parameters

Name In Required Type Description
resourceGroupName
path True

string

The name of the resource group. The name is case insensitive.

resourceName
path True

string

The name of the Application Insights component resource.

subscriptionId
path True

string

The ID of the target subscription.

api-version
query True

string

The API version to use for this operation.

sourceId
query

string

Azure Resource Id that will fetch all linked workbooks.

Request Body

Name Type Description
kind

SharedTypeKind

The kind of workbook. Only valid value is shared.

properties.category

string

Workbook category, as defined by the user at creation time.

properties.description

string

The description of the workbook.

properties.displayName

string

The user-defined name (display name) of the workbook.

properties.revision

string

The unique revision id for this workbook definition

properties.serializedData

string

Configuration of this particular workbook. Configuration data is a string containing valid JSON

properties.tags

string[]

A list of 0 or more tags that are associated with this workbook definition

tags

object

Resource tags.

Responses

Name Type Description
200 OK

Workbook

The workbook definition updated.

201 Created

Workbook

The workbook definition updated.

Other Status Codes

WorkbookError

Error response describing why the operation failed.

Security

azure_auth

Azure Active Directory OAuth2 Flow.

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

Scopes

Name Description
user_impersonation impersonate your user account

Examples

WorkbookManagedUpdate
WorkbookUpdate

WorkbookManagedUpdate

Sample Request

PATCH 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

Sample Response

{
  "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",
  "tags": {
    "TagSample01": "sample01",
    "TagSample02": "sample02",
    "hidden-title": "Sample workbook"
  },
  "kind": "shared",
  "properties": {
    "displayName": "Sample workbook",
    "serializedData": "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":{\"json\":\"test\"},\"name\":\"text - 0\"}],\"isLocked\":false,\"fallbackResourceIds\":[\"/subscriptions/8980832b-9589-4ac2-b322-a6ae6a97f02b/resourceGroups/my-resource-group\"]}",
    "version": "Notebook/1.0",
    "category": "workbook",
    "userId": "70d90f65-8a70-4e42-b8d5-863725e0a90f",
    "sourceId": "/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group",
    "timeModified": "2020-10-20T22:15:08.1875458Z",
    "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",
  "tags": {
    "TagSample01": "sample01",
    "TagSample02": "sample02",
    "hidden-title": "Sample workbook"
  },
  "kind": "shared",
  "properties": {
    "displayName": "Sample workbook",
    "serializedData": "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":{\"json\":\"test\"},\"name\":\"text - 0\"}],\"isLocked\":false,\"fallbackResourceIds\":[\"/subscriptions/8980832b-9589-4ac2-b322-a6ae6a97f02b/resourceGroups/my-resource-group\"]}",
    "version": "Notebook/1.0",
    "category": "workbook",
    "userId": "70d90f65-8a70-4e42-b8d5-863725e0a90f",
    "sourceId": "/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group",
    "timeModified": "2020-10-20T22:15:08.1875458Z",
    "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"
  }
}

WorkbookUpdate

Sample Request

PATCH 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/providers/Microsoft.Web/sites/MyApp&api-version=2021-08-01

Sample Response

{
  "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",
  "tags": {
    "TagSample01": "sample01",
    "TagSample02": "sample02"
  },
  "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}",
    "userId": "userId",
    "sourceId": "/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/my-resource-group/providers/Microsoft.Web/sites/MyApp",
    "version": "Notebook/1.0",
    "category": "workbook",
    "timeModified": "2020-10-20T22:00:26.4229554Z",
    "storageUri": null,
    "description": "Sample workbook",
    "revision": "1e2f8435b98248febee70c64ac22e1bb"
  }
}
{
  "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",
  "tags": {
    "TagSample01": "sample01",
    "TagSample02": "sample02"
  },
  "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}",
    "userId": "userId",
    "sourceId": "/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/my-resource-group/providers/Microsoft.Web/sites/MyApp",
    "version": "Notebook/1.0",
    "category": "workbook",
    "timeModified": "2020-10-20T22:00:26.4229554Z",
    "storageUri": null,
    "description": "Sample workbook",
    "revision": "1e2f8435b98248febee70c64ac22e1bb"
  }
}

Definitions

Name Description
createdByType

The type of identity that created the resource.

Identity

Identity used for BYOS

kind

The kind of workbook. Only valid value is shared.

ManagedServiceIdentityType

Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).

SharedTypeKind

The kind of workbook. Only valid value is shared.

systemData

Metadata pertaining to creation and last modification of the resource.

UserAssignedIdentity

User assigned identity properties

Workbook

An Application Insights workbook definition.

WorkbookError

Error response.

WorkbookErrorDefinition

Error definition.

WorkbookInnerErrorTrace

Error details

WorkbookUpdateParameters

The parameters that can be provided when updating workbook properties properties.

createdByType

The type of identity that created the resource.

Name Type Description
Application

string

Key

string

ManagedIdentity

string

User

string

Identity

Identity used for BYOS

Name Type Description
principalId

string

The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity.

tenantId

string

The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.

type

ManagedServiceIdentityType

Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).

userAssignedIdentities

<string,  UserAssignedIdentity>

User-Assigned Identities
The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests.

kind

The kind of workbook. Only valid value is shared.

Name Type Description
shared

string

user

string

ManagedServiceIdentityType

Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).

Name Type Description
None

string

SystemAssigned

string

SystemAssigned,UserAssigned

string

UserAssigned

string

SharedTypeKind

The kind of workbook. Only valid value is shared.

Name Type Description
shared

string

user

string

systemData

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string

The timestamp of resource creation (UTC).

createdBy

string

The identity that created the resource.

createdByType

createdByType

The type of identity that created the resource.

lastModifiedAt

string

The timestamp of resource last modification (UTC)

lastModifiedBy

string

The identity that last modified the resource.

lastModifiedByType

createdByType

The type of identity that last modified the resource.

UserAssignedIdentity

User assigned identity properties

Name Type Description
clientId

string

The client ID of the assigned identity.

principalId

string

The principal ID of the assigned identity.

Workbook

An Application Insights workbook definition.

Name Type Description
etag

object

Resource etag

id

string

Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

identity

Identity

Identity used for BYOS

kind

kind

The kind of workbook. Only valid value is shared.

location

string

The geo-location where the resource lives

name

string

The name of the resource

properties.category

string

Workbook category, as defined by the user at creation time.

properties.description

string

The description of the workbook.

properties.displayName

string

The user-defined name (display name) of the workbook.

properties.revision

string

The unique revision id for this workbook definition

properties.serializedData

string

Configuration of this particular workbook. Configuration data is a string containing valid JSON

properties.sourceId

string

ResourceId for a source resource.

properties.storageUri

string

The resourceId to the storage account when bring your own storage is used

properties.tags

string[]

Being deprecated, please use the other tags field

properties.timeModified

string

Date and time in UTC of the last modification that was made to this workbook definition.

properties.userId

string

Unique user id of the specific user that owns this workbook.

properties.version

string

Workbook schema version format, like 'Notebook/1.0', which should match the workbook in serializedData

systemData

systemData

Metadata pertaining to creation and last modification of the resource.

tags

object

Resource tags.

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

WorkbookError

Error response.

Name Type Description
error

WorkbookErrorDefinition

The error details.

WorkbookErrorDefinition

Error definition.

Name Type Description
code

string

Service specific error code which serves as the substatus for the HTTP error code.

innererror

WorkbookInnerErrorTrace

Internal error details.

message

string

Description of the error.

WorkbookInnerErrorTrace

Error details

Name Type Description
trace

string[]

detailed error trace

WorkbookUpdateParameters

The parameters that can be provided when updating workbook properties properties.

Name Type Description
kind

SharedTypeKind

The kind of workbook. Only valid value is shared.

properties.category

string

Workbook category, as defined by the user at creation time.

properties.description

string

The description of the workbook.

properties.displayName

string

The user-defined name (display name) of the workbook.

properties.revision

string

The unique revision id for this workbook definition

properties.serializedData

string

Configuration of this particular workbook. Configuration data is a string containing valid JSON

properties.tags

string[]

A list of 0 or more tags that are associated with this workbook definition

tags

object

Resource tags.