tables
Creates, updates, deletes, gets or lists a tables
resource.
Overview
Name | tables |
Type | Resource |
Id | azure.log_analytics.tables |
Fields
- vw_tables
- tables
Name | Datatype | Description |
---|---|---|
archive_retention_in_days | text | field from the properties object |
last_plan_modified_date | text | field from the properties object |
plan | text | field from the properties object |
provisioning_state | text | field from the properties object |
resourceGroupName | text | field from the properties object |
restored_logs | text | field from the properties object |
result_statistics | text | field from the properties object |
retention_in_days | text | field from the properties object |
retention_in_days_as_default | text | field from the properties object |
schema | text | field from the properties object |
search_results | text | field from the properties object |
subscriptionId | text | field from the properties object |
system_data | text | field from the properties object |
tableName | text | field from the properties object |
total_retention_in_days | text | field from the properties object |
total_retention_in_days_as_default | text | field from the properties object |
workspaceName | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
properties | object | Table properties. |
systemData | object | Metadata pertaining to creation and last modification of the resource. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | resourceGroupName, subscriptionId, tableName, workspaceName | Gets a Log Analytics workspace table. |
list_by_workspace | SELECT | resourceGroupName, subscriptionId, workspaceName | Gets all the tables for the specified Log Analytics workspace. |
create_or_update | INSERT | resourceGroupName, subscriptionId, tableName, workspaceName | Update or Create a Log Analytics workspace table. |
delete | DELETE | resourceGroupName, subscriptionId, tableName, workspaceName | Delete a Log Analytics workspace table. |
update | UPDATE | resourceGroupName, subscriptionId, tableName, workspaceName | Update a Log Analytics workspace table. |
cancel_search | EXEC | resourceGroupName, subscriptionId, tableName, workspaceName | Cancel a log analytics workspace search results table query run. |
migrate | EXEC | resourceGroupName, subscriptionId, tableName, workspaceName | Migrate 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.
- vw_tables
- tables
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 }}';
SELECT
properties,
systemData
FROM azure.log_analytics.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.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.log_analytics.tables (
resourceGroupName,
subscriptionId,
tableName,
workspaceName,
properties
)
SELECT
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ tableName }}',
'{{ workspaceName }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: retentionInDays
value: integer
- name: totalRetentionInDays
value: integer
- name: archiveRetentionInDays
value: integer
- name: searchResults
value:
- name: query
value: string
- name: description
value: string
- name: limit
value: integer
- name: startSearchTime
value: string
- name: endSearchTime
value: string
- name: sourceTable
value: string
- name: azureAsyncOperationId
value: string
- name: restoredLogs
value:
- name: startRestoreTime
value: string
- name: endRestoreTime
value: string
- name: sourceTable
value: string
- name: azureAsyncOperationId
value: string
- name: resultStatistics
value:
- name: progress
value: number
- name: ingestedRecords
value: integer
- name: scannedGb
value: number
- name: plan
value: string
- name: lastPlanModifiedDate
value: string
- name: schema
value:
- name: name
value: string
- name: displayName
value: string
- name: description
value: string
- name: columns
value:
- - name: name
value: string
- name: type
value: string
- name: dataTypeHint
value: string
- name: displayName
value: string
- name: description
value: string
- name: isDefaultDisplay
value: boolean
- name: isHidden
value: boolean
- name: standardColumns
value:
- - name: name
value: string
- name: type
value: string
- name: dataTypeHint
value: string
- name: displayName
value: string
- name: description
value: string
- name: isDefaultDisplay
value: boolean
- name: isHidden
value: boolean
- name: categories
value:
- string
- name: labels
value:
- string
- name: source
value: string
- name: tableType
value: string
- name: tableSubType
value: string
- name: solutions
value:
- string
- name: provisioningState
value: string
- name: retentionInDaysAsDefault
value: boolean
- name: totalRetentionInDaysAsDefault
value: boolean
- name: systemData
value:
- name: createdBy
value: string
- name: createdByType
value: string
- name: createdAt
value: string
- name: lastModifiedBy
value: string
- name: lastModifiedByType
value: string
- name: lastModifiedAt
value: string
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 }}';