workspaces
Creates, updates, deletes, gets or lists a workspaces
resource.
Overview
Name | workspaces |
Type | Resource |
Id | azure.log_analytics.workspaces |
Fields
The following fields are returned by SELECT
queries:
- get
- list_by_resource_group
- list
OK response definition.
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. |
OK response definition.
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. |
OK response definition.
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
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | resourceGroupName , workspaceName , subscriptionId | Gets a workspace instance. | |
list_by_resource_group | select | resourceGroupName , subscriptionId | Gets workspaces in a resource group. | |
list | select | subscriptionId | Gets the workspaces in a subscription. | |
create_or_update | insert | resourceGroupName , workspaceName , subscriptionId | Create or update a workspace. | |
update | update | resourceGroupName , workspaceName , subscriptionId | Updates a workspace. | |
delete | delete | resourceGroupName , workspaceName , subscriptionId | force | 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. |
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.
Name | Datatype | Description |
---|---|---|
resourceGroupName | string | The name of the resource group. The name is case insensitive. |
subscriptionId | string | The ID of the target subscription. |
workspaceName | string | The name of the workspace. |
force | boolean | Deletes the workspace without the recovery option. A workspace that was deleted with this flag cannot be recovered. |
SELECT
examples
- get
- list_by_resource_group
- list
Gets a workspace instance.
SELECT
etag,
identity,
location,
properties,
systemData,
tags
FROM azure.log_analytics.workspaces
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND workspaceName = '{{ workspaceName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;
Gets workspaces in a resource group.
SELECT
etag,
identity,
location,
properties,
systemData,
tags
FROM azure.log_analytics.workspaces
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;
Gets the workspaces in a subscription.
SELECT
etag,
identity,
location,
properties,
systemData,
tags
FROM azure.log_analytics.workspaces
WHERE subscriptionId = '{{ subscriptionId }}' -- required
;
INSERT
examples
- create_or_update
- Manifest
Create or update a workspace.
INSERT INTO azure.log_analytics.workspaces (
data__properties,
data__identity,
data__etag,
data__tags,
data__location,
resourceGroupName,
workspaceName,
subscriptionId
)
SELECT
'{{ properties }}',
'{{ identity }}',
'{{ etag }}',
'{{ tags }}',
'{{ location }}',
'{{ resourceGroupName }}',
'{{ workspaceName }}',
'{{ subscriptionId }}'
RETURNING
etag,
identity,
location,
properties,
systemData,
tags
;
# Description fields are for documentation purposes
- name: workspaces
props:
- name: resourceGroupName
value: string
description: Required parameter for the workspaces resource.
- name: workspaceName
value: string
description: Required parameter for the workspaces resource.
- name: subscriptionId
value: string
description: Required parameter for the workspaces resource.
- name: properties
value: object
description: |
Workspace properties.
- name: identity
value: object
description: |
Identity for the resource.
- name: etag
value: string
description: |
The etag of the workspace.
- name: tags
value: object
description: |
Resource tags.
- name: location
value: string
description: |
The geo-location where the resource lives
UPDATE
examples
- update
Updates a workspace.
UPDATE azure.log_analytics.workspaces
SET
data__properties = '{{ properties }}',
data__identity = '{{ identity }}',
data__tags = '{{ tags }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}' --required
AND workspaceName = '{{ workspaceName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
RETURNING
etag,
identity,
location,
properties,
systemData,
tags;
DELETE
examples
- delete
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.
DELETE FROM azure.log_analytics.workspaces
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND workspaceName = '{{ workspaceName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
AND force = '{{ force }}'
;