Skip to main content

workspaces

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

Overview

Nameworkspaces
TypeResource
Idazure.chaos.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.
communicationEndpointstringThe communication endpoint used to connect and communicate with the workspace for fault-injection orchestration.
identityobjectThe managed service identities assigned to this resource.
locationstringThe geo-location where the resource lives. Required.
provisioningStatestringMost recent provisioning state for the given Workspace resource. Known values are: "Succeeded", "Failed", "Canceled", "Creating", "Updating", "Deleting", and "Running". (Succeeded, Failed, Canceled, Creating, Updating, Deleting, Running)
scopesarrayThe intended workspace-level resource scope to be used by child scenarios. Required.
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_idGet a Workspace resource.
listselectresource_group_name, subscription_idcontinuationTokenGet a list of Workspace resources in a resource group.
list_allselectsubscription_idcontinuationTokenGet a list of all Workspace resources in a subscription.
create_or_updateinsertresource_group_name, workspace_name, subscription_id, location, propertiesCreate or update a Workspace resource.
updateupdateresource_group_name, workspace_name, subscription_idThe operation to update a Workspace.
create_or_updatereplaceresource_group_name, workspace_name, subscription_id, location, propertiesCreate or update a Workspace resource.
deletedeleteresource_group_name, workspace_name, subscription_idDelete a Workspace resource.
refresh_recommendationsexecresource_group_name, workspace_name, subscription_idRefreshes recommendation status for all scenarios in a given 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_namestringString that represents a Workspace resource name. Required.
continuationTokenstringString that sets the continuation token. Default value is None.

SELECT examples

Get a Workspace resource.

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

INSERT examples

Create or update a Workspace resource.

INSERT INTO azure.chaos.workspaces (
tags,
location,
identity,
properties,
resource_group_name,
workspace_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ identity }}',
'{{ properties }}' /* required */,
'{{ resource_group_name }}',
'{{ workspace_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
identity,
location,
properties,
systemData,
tags,
type
;

UPDATE examples

The operation to update a Workspace.

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

REPLACE examples

Create or update a Workspace resource.

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

DELETE examples

Delete a Workspace resource.

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

Lifecycle Methods

Refreshes recommendation status for all scenarios in a given workspace.

EXEC azure.chaos.workspaces.refresh_recommendations 
@resource_group_name='{{ resource_group_name }}' --required,
@workspace_name='{{ workspace_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;