Skip to main content

workbooks

Creates, updates, deletes, gets or lists a workbooks resource.

Overview

Nameworkbooks
TypeResource
Idazure.application_insights.workbooks

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
categorystringWorkbook category, as defined by the user at creation time. Required.
descriptionstringThe description of the workbook.
displayNamestringThe user-defined name (display name) of the workbook. Required.
etagstringResource etag.
identityobjectIdentity used for BYOS.
kindstringThe kind of workbook. Only valid value is shared. "shared" (shared)
locationstringThe geo-location where the resource lives. Required.
revisionstringThe unique revision id for this workbook definition.
serializedDatastringConfiguration of this particular workbook. Configuration data is a string containing valid JSON. Required.
sourceIdstringResourceId for a source resource.
storageUristringThe resourceId to the storage account when bring your own storage is used.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobjectResource tags.
timeModifiedstring (date-time)Date and time in UTC of the last modification that was made to this workbook definition.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
userIdstringUnique user id of the specific user that owns this workbook.
versionstringWorkbook schema version format, like 'Notebook/1.0', which should match the workbook in serializedData.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, resource_name, subscription_idcanFetchContentGet a single workbook by its resourceName.
list_by_resource_groupselectresource_group_name, subscription_id, categorytags, sourceId, canFetchContentGet all Workbooks defined within a specified resource group and category.
list_by_subscriptionselectsubscription_id, categorytags, canFetchContentGet all Workbooks defined within a specified subscription and category.
create_or_updateinsertresource_group_name, resource_name, subscription_id, locationsourceIdCreate a new workbook.
updateupdateresource_group_name, resource_name, subscription_idsourceIdUpdates a workbook that has already been added.
create_or_updatereplaceresource_group_name, resource_name, subscription_id, locationsourceIdCreate a new workbook.
deletedeleteresource_group_name, resource_name, subscription_idDelete a workbook.
revisions_listexecresource_group_name, resource_name, subscription_idGet the revisions for the workbook defined by its resourceName.
revision_getexecresource_group_name, resource_name, revision_id, subscription_idGet a single workbook revision defined by its revisionId.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
categorystringCategory of workbook to return. Known values are: "workbook", "TSG", "performance", and "retention". Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
resource_namestringThe name of the workbook resource. The value must be an UUID. Required.
revision_idstringThe id of the workbook's revision. Required.
subscription_idstring
canFetchContentbooleanFlag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content for workbooks. Default value is None.
sourceIdstringAzure Resource Id that will fetch all linked workbooks. Default value is None.
tagsarrayTags presents on each workbook returned. Default value is None.

SELECT examples

Get a single workbook by its resourceName.

SELECT
id,
name,
category,
description,
displayName,
etag,
identity,
kind,
location,
revision,
serializedData,
sourceId,
storageUri,
systemData,
tags,
timeModified,
type,
userId,
version
FROM azure.application_insights.workbooks
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND resource_name = '{{ resource_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND canFetchContent = '{{ canFetchContent }}'
;

INSERT examples

Create a new workbook.

INSERT INTO azure.application_insights.workbooks (
tags,
location,
properties,
identity,
kind,
etag,
resource_group_name,
resource_name,
subscription_id,
sourceId
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ properties }}',
'{{ identity }}',
'{{ kind }}',
'{{ etag }}',
'{{ resource_group_name }}',
'{{ resource_name }}',
'{{ subscription_id }}',
'{{ sourceId }}'
RETURNING
id,
name,
etag,
identity,
kind,
location,
properties,
systemData,
tags,
type
;

UPDATE examples

Updates a workbook that has already been added.

UPDATE azure.application_insights.workbooks
SET
kind = '{{ kind }}',
tags = '{{ tags }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND resource_name = '{{ resource_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND sourceId = '{{ sourceId}}'
RETURNING
id,
name,
etag,
identity,
kind,
location,
properties,
systemData,
tags,
type;

REPLACE examples

Create a new workbook.

REPLACE azure.application_insights.workbooks
SET
tags = '{{ tags }}',
location = '{{ location }}',
properties = '{{ properties }}',
identity = '{{ identity }}',
kind = '{{ kind }}',
etag = '{{ etag }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND resource_name = '{{ resource_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND location = '{{ location }}' --required
AND sourceId = '{{ sourceId}}'
RETURNING
id,
name,
etag,
identity,
kind,
location,
properties,
systemData,
tags,
type;

DELETE examples

Delete a workbook.

DELETE FROM azure.application_insights.workbooks
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND resource_name = '{{ resource_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

Get the revisions for the workbook defined by its resourceName.

EXEC azure.application_insights.workbooks.revisions_list 
@resource_group_name='{{ resource_group_name }}' --required,
@resource_name='{{ resource_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;