Skip to main content

workspaces

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

Overview

Nameworkspaces
TypeResource
Idazure.defender_easm.workspaces

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
locationstringThe geo-location where the resource lives. Required.
provisioningStatestringResource provisioning state. Known values are: "NotSpecified", "Accepted", "Creating", "Succeeded", "Failed", "Canceled", "ProvisioningResources", "InstallingApplication", "ConfiguringApplication", "MigratingApplicationData", "RunningValidations", "CreatingArtifacts", and "DeletingArtifacts".
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobjectResource tags.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, workspace_name, subscription_idReturns a workspace with the given name.
list_by_resource_groupselectresource_group_name, subscription_idReturns a list of workspaces in the given resource group.
list_by_subscriptionselectsubscription_idReturns a list of workspaces under the given subscription.
updateupdateresource_group_name, workspace_name, subscription_idUpdate a Workspace.
deletedeleteresource_group_name, workspace_name, subscription_idDelete a Workspace.
create_and_updateexecresource_group_name, workspace_name, subscription_id, locationCreate or update a Workspace.

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.

NameDatatypeDescription
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring
workspace_namestringThe name of the Workspace. Required.

SELECT examples

Returns a workspace with the given name.

SELECT
id,
name,
location,
provisioningState,
systemData,
tags,
type
FROM azure.defender_easm.workspaces
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND workspace_name = '{{ workspace_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

UPDATE examples

Update a Workspace.

UPDATE azure.defender_easm.workspaces
SET
tags = '{{ tags }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND workspace_name = '{{ workspace_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type;

DELETE examples

Delete a Workspace.

DELETE FROM azure.defender_easm.workspaces
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND workspace_name = '{{ workspace_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

Create or update a Workspace.

EXEC azure.defender_easm.workspaces.create_and_update 
@resource_group_name='{{ resource_group_name }}' --required,
@workspace_name='{{ workspace_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"tags": "{{ tags }}",
"location": "{{ location }}"
}'
;