workspaces
Creates, updates, deletes, gets or lists a workspaces
resource.
Overview
Name | workspaces |
Type | Resource |
Id | azure.defender.workspaces |
Fields
- vw_workspaces
- workspaces
Name | Datatype | Description |
---|---|---|
data_plane_endpoint | text | field from the properties object |
location | text | The geo-location where the resource lives |
provisioning_state | text | field from the properties object |
resourceGroupName | text | field from the properties object |
subscriptionId | text | field from the properties object |
tags | text | Resource tags. |
workspaceName | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
location | string | The geo-location where the resource lives |
properties | object | Workspace properties. |
tags | object | Resource tags. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | resourceGroupName, subscriptionId, workspaceName | Returns a workspace with the given name. |
list_by_resource_group | SELECT | resourceGroupName, subscriptionId | Returns a list of workspaces in the given resource group. |
list_by_subscription | SELECT | subscriptionId | Returns a list of workspaces under the given subscription. |
create_and_update | INSERT | resourceGroupName, subscriptionId, workspaceName | Create or update a Workspace. |
delete | DELETE | resourceGroupName, subscriptionId, workspaceName | Delete a Workspace. |
update | UPDATE | resourceGroupName, subscriptionId, workspaceName | Update a Workspace. |
SELECT
examples
Returns a list of workspaces under the given subscription.
- vw_workspaces
- workspaces
SELECT
data_plane_endpoint,
location,
provisioning_state,
resourceGroupName,
subscriptionId,
tags,
workspaceName
FROM azure.defender.vw_workspaces
WHERE subscriptionId = '{{ subscriptionId }}';
SELECT
location,
properties,
tags
FROM azure.defender.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.defender.workspaces (
resourceGroupName,
subscriptionId,
workspaceName,
properties,
tags,
location
)
SELECT
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ workspaceName }}',
'{{ properties }}',
'{{ tags }}',
'{{ location }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: dataPlaneEndpoint
value: string
- name: provisioningState
value: []
- name: tags
value: object
- name: location
value: string
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 }}';