workspaces
Creates, updates, deletes, gets or lists a workspaces
resource.
Overview
Name | workspaces |
Type | Resource |
Id | azure.log_analytics.workspaces |
Fields
- vw_workspaces
- workspaces
Name | Datatype | Description |
---|---|---|
created_date | text | field from the properties object |
customer_id | text | field from the properties object |
default_data_collection_rule_resource_id | text | field from the properties object |
etag | text | The etag of the workspace. |
features | text | field from the properties object |
force_cmk_for_query | text | field from the properties object |
identity | text | Identity for the resource. |
location | text | The geo-location where the resource lives |
modified_date | text | field from the properties object |
private_link_scoped_resources | text | field from the properties object |
provisioning_state | text | field from the properties object |
public_network_access_for_ingestion | text | field from the properties object |
public_network_access_for_query | text | field from the properties object |
resourceGroupName | text | field from the properties object |
retention_in_days | text | field from the properties object |
sku | text | field from the properties object |
subscriptionId | text | field from the properties object |
system_data | text | field from the properties object |
tags | text | Resource tags. |
workspaceName | text | field from the properties object |
workspace_capping | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
etag | string | The etag of the workspace. |
identity | object | Identity for the resource. |
location | string | The geo-location where the resource lives |
properties | object | Workspace properties. |
systemData | object | Metadata pertaining to creation and last modification of the resource. |
tags | object | Resource tags. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | resourceGroupName, subscriptionId, workspaceName | Gets a workspace instance. |
list | SELECT | subscriptionId | Gets the workspaces in a subscription. |
list_by_resource_group | SELECT | resourceGroupName, subscriptionId | Gets workspaces in a resource group. |
create_or_update | INSERT | resourceGroupName, subscriptionId, workspaceName | Create or update a workspace. |
delete | DELETE | resourceGroupName, subscriptionId, workspaceName | Deletes a workspace resource. To recover the workspace, create it again with the same name, in the same subscription, resource group and location. The name is kept for 14 days and cannot be used for another workspace. To remove the workspace completely and release the name, use the force flag. |
update | UPDATE | resourceGroupName, subscriptionId, workspaceName | Updates a workspace. |
SELECT
examples
Gets the workspaces in a subscription.
- vw_workspaces
- workspaces
SELECT
created_date,
customer_id,
default_data_collection_rule_resource_id,
etag,
features,
force_cmk_for_query,
identity,
location,
modified_date,
private_link_scoped_resources,
provisioning_state,
public_network_access_for_ingestion,
public_network_access_for_query,
resourceGroupName,
retention_in_days,
sku,
subscriptionId,
system_data,
tags,
workspaceName,
workspace_capping
FROM azure.log_analytics.vw_workspaces
WHERE subscriptionId = '{{ subscriptionId }}';
SELECT
etag,
identity,
location,
properties,
systemData,
tags
FROM azure.log_analytics.workspaces
WHERE subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new workspaces
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.log_analytics.workspaces (
resourceGroupName,
subscriptionId,
workspaceName,
properties,
identity,
etag,
tags,
location
)
SELECT
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ workspaceName }}',
'{{ properties }}',
'{{ identity }}',
'{{ etag }}',
'{{ tags }}',
'{{ location }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: provisioningState
value: string
- name: customerId
value: string
- name: sku
value:
- name: name
value: string
- name: capacityReservationLevel
value: integer
- name: lastSkuUpdate
value: string
- name: retentionInDays
value: integer
- name: workspaceCapping
value:
- name: dailyQuotaGb
value: number
- name: quotaNextResetTime
value: string
- name: dataIngestionStatus
value: string
- name: createdDate
value: string
- name: modifiedDate
value: string
- name: publicNetworkAccessForIngestion
value: []
- name: forceCmkForQuery
value: boolean
- name: privateLinkScopedResources
value:
- - name: resourceId
value: string
- name: scopeId
value: string
- name: features
value:
- name: enableDataExport
value: boolean
- name: immediatePurgeDataOn30Days
value: boolean
- name: enableLogAccessUsingOnlyResourcePermissions
value: boolean
- name: clusterResourceId
value: string
- name: disableLocalAuth
value: boolean
- name: unifiedSentinelBillingOnly
value: boolean
- name: defaultDataCollectionRuleResourceId
value: string
- name: identity
value:
- name: principalId
value: string
- name: tenantId
value: string
- name: type
value: string
- 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
- name: etag
value: string
- name: tags
value: object
- name: location
value: string
UPDATE
example
Updates a workspaces
resource.
/*+ update */
UPDATE azure.log_analytics.workspaces
SET
properties = '{{ properties }}',
identity = '{{ identity }}',
tags = '{{ tags }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND workspaceName = '{{ workspaceName }}';
DELETE
example
Deletes the specified workspaces
resource.
/*+ delete */
DELETE FROM azure.log_analytics.workspaces
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND workspaceName = '{{ workspaceName }}';