Skip to main content

workspaces

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

Overview

Nameworkspaces
TypeResource
Idazure.defender.workspaces

Fields

NameDatatypeDescription
data_plane_endpointtextfield from the properties object
locationtextThe geo-location where the resource lives
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
subscriptionIdtextfield from the properties object
tagstextResource tags.
workspaceNametextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTresourceGroupName, subscriptionId, workspaceNameReturns a workspace with the given name.
list_by_resource_groupSELECTresourceGroupName, subscriptionIdReturns a list of workspaces in the given resource group.
list_by_subscriptionSELECTsubscriptionIdReturns a list of workspaces under the given subscription.
create_and_updateINSERTresourceGroupName, subscriptionId, workspaceNameCreate or update a Workspace.
deleteDELETEresourceGroupName, subscriptionId, workspaceNameDelete a Workspace.
updateUPDATEresourceGroupName, subscriptionId, workspaceNameUpdate a Workspace.

SELECT examples

Returns a list of workspaces under the given subscription.

SELECT
data_plane_endpoint,
location,
provisioning_state,
resourceGroupName,
subscriptionId,
tags,
workspaceName
FROM azure.defender.vw_workspaces
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.defender.workspaces (
resourceGroupName,
subscriptionId,
workspaceName,
properties,
tags,
location
)
SELECT
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ workspaceName }}',
'{{ properties }}',
'{{ tags }}',
'{{ location }}'
;

UPDATE example

Updates a workspaces resource.

/*+ update */
UPDATE azure.defender.workspaces
SET
tags = '{{ tags }}',
systemData = '{{ systemData }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND workspaceName = '{{ workspaceName }}';

DELETE example

Deletes the specified workspaces resource.

/*+ delete */
DELETE FROM azure.defender.workspaces
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND workspaceName = '{{ workspaceName }}';