workspaces
Creates, updates, deletes, gets or lists a workspaces resource.
Overview
| Name | workspaces |
| Type | Resource |
| Id | azure.defender_easm.workspaces |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_resource_group
- list_by_subscription
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
location | string | The geo-location where the resource lives. Required. |
provisioningState | string | Resource provisioning state. Known values are: "NotSpecified", "Accepted", "Creating", "Succeeded", "Failed", "Canceled", "ProvisioningResources", "InstallingApplication", "ConfiguringApplication", "MigratingApplicationData", "RunningValidations", "CreatingArtifacts", and "DeletingArtifacts". |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
location | string | The geo-location where the resource lives. Required. |
provisioningState | string | Resource provisioning state. Known values are: "NotSpecified", "Accepted", "Creating", "Succeeded", "Failed", "Canceled", "ProvisioningResources", "InstallingApplication", "ConfiguringApplication", "MigratingApplicationData", "RunningValidations", "CreatingArtifacts", and "DeletingArtifacts". |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
location | string | The geo-location where the resource lives. Required. |
provisioningState | string | Resource provisioning state. Known values are: "NotSpecified", "Accepted", "Creating", "Succeeded", "Failed", "Canceled", "ProvisioningResources", "InstallingApplication", "ConfiguringApplication", "MigratingApplicationData", "RunningValidations", "CreatingArtifacts", and "DeletingArtifacts". |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, workspace_name, subscription_id | Returns a workspace with the given name. | |
list_by_resource_group | select | resource_group_name, subscription_id | Returns a list of workspaces in the given resource group. | |
list_by_subscription | select | subscription_id | Returns a list of workspaces under the given subscription. | |
update | update | resource_group_name, workspace_name, subscription_id | Update a Workspace. | |
delete | delete | resource_group_name, workspace_name, subscription_id | Delete a Workspace. | |
create_and_update | exec | resource_group_name, workspace_name, subscription_id, location | Create 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.
| Name | Datatype | Description |
|---|---|---|
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string | |
workspace_name | string | The name of the Workspace. Required. |
SELECT examples
- get
- list_by_resource_group
- list_by_subscription
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
;
Returns a list of workspaces in the given resource group.
SELECT
id,
name,
location,
provisioningState,
systemData,
tags,
type
FROM azure.defender_easm.workspaces
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Returns a list of workspaces under the given subscription.
SELECT
id,
name,
location,
provisioningState,
systemData,
tags,
type
FROM azure.defender_easm.workspaces
WHERE subscription_id = '{{ subscription_id }}' -- required
;
UPDATE examples
- update
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
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_and_update
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 }}"
}'
;