Skip to main content

tables

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

Overview

Nametables
TypeResource
Idazure.log_analytics.tables

Fields

NameDatatypeDescription
archive_retention_in_daystextfield from the properties object
last_plan_modified_datetextfield from the properties object
plantextfield from the properties object
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
restored_logstextfield from the properties object
result_statisticstextfield from the properties object
retention_in_daystextfield from the properties object
retention_in_days_as_defaulttextfield from the properties object
schematextfield from the properties object
search_resultstextfield from the properties object
subscriptionIdtextfield from the properties object
system_datatextfield from the properties object
tableNametextfield from the properties object
total_retention_in_daystextfield from the properties object
total_retention_in_days_as_defaulttextfield from the properties object
workspaceNametextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTresourceGroupName, subscriptionId, tableName, workspaceNameGets a Log Analytics workspace table.
list_by_workspaceSELECTresourceGroupName, subscriptionId, workspaceNameGets all the tables for the specified Log Analytics workspace.
create_or_updateINSERTresourceGroupName, subscriptionId, tableName, workspaceNameUpdate or Create a Log Analytics workspace table.
deleteDELETEresourceGroupName, subscriptionId, tableName, workspaceNameDelete a Log Analytics workspace table.
updateUPDATEresourceGroupName, subscriptionId, tableName, workspaceNameUpdate a Log Analytics workspace table.
cancel_searchEXECresourceGroupName, subscriptionId, tableName, workspaceNameCancel a log analytics workspace search results table query run.
migrateEXECresourceGroupName, subscriptionId, tableName, workspaceNameMigrate a Log Analytics table from support of the Data Collector API and Custom Fields features to support of Data Collection Rule-based Custom Logs.

SELECT examples

Gets all the tables for the specified Log Analytics workspace.

SELECT
archive_retention_in_days,
last_plan_modified_date,
plan,
provisioning_state,
resourceGroupName,
restored_logs,
result_statistics,
retention_in_days,
retention_in_days_as_default,
schema,
search_results,
subscriptionId,
system_data,
tableName,
total_retention_in_days,
total_retention_in_days_as_default,
workspaceName
FROM azure.log_analytics.vw_tables
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND workspaceName = '{{ workspaceName }}';

INSERT example

Use the following StackQL query and manifest file to create a new tables resource.

/*+ create */
INSERT INTO azure.log_analytics.tables (
resourceGroupName,
subscriptionId,
tableName,
workspaceName,
properties
)
SELECT
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ tableName }}',
'{{ workspaceName }}',
'{{ properties }}'
;

UPDATE example

Updates a tables resource.

/*+ update */
UPDATE azure.log_analytics.tables
SET
properties = '{{ properties }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND tableName = '{{ tableName }}'
AND workspaceName = '{{ workspaceName }}';

DELETE example

Deletes the specified tables resource.

/*+ delete */
DELETE FROM azure.log_analytics.tables
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND tableName = '{{ tableName }}'
AND workspaceName = '{{ workspaceName }}';