workspaces
Creates, updates, deletes, gets or lists a workspaces resource.
Overview
| Name | workspaces |
| Type | Resource |
| Id | azure.chaos.workspaces |
Fields
The following fields are returned by SELECT queries:
- get
- list
- list_all
| 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. |
communicationEndpoint | string | The communication endpoint used to connect and communicate with the workspace for fault-injection orchestration. |
identity | object | The managed service identities assigned to this resource. |
location | string | The geo-location where the resource lives. Required. |
provisioningState | string | Most 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) |
scopes | array | The intended workspace-level resource scope to be used by child scenarios. Required. |
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. |
communicationEndpoint | string | The communication endpoint used to connect and communicate with the workspace for fault-injection orchestration. |
identity | object | The managed service identities assigned to this resource. |
location | string | The geo-location where the resource lives. Required. |
provisioningState | string | Most 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) |
scopes | array | The intended workspace-level resource scope to be used by child scenarios. Required. |
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. |
communicationEndpoint | string | The communication endpoint used to connect and communicate with the workspace for fault-injection orchestration. |
identity | object | The managed service identities assigned to this resource. |
location | string | The geo-location where the resource lives. Required. |
provisioningState | string | Most 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) |
scopes | array | The intended workspace-level resource scope to be used by child scenarios. Required. |
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 | Get a Workspace resource. | |
list | select | resource_group_name, subscription_id | continuationToken | Get a list of Workspace resources in a resource group. |
list_all | select | subscription_id | continuationToken | Get a list of all Workspace resources in a subscription. |
create_or_update | insert | resource_group_name, workspace_name, subscription_id, location, properties | Create or update a Workspace resource. | |
update | update | resource_group_name, workspace_name, subscription_id | The operation to update a Workspace. | |
create_or_update | replace | resource_group_name, workspace_name, subscription_id, location, properties | Create or update a Workspace resource. | |
delete | delete | resource_group_name, workspace_name, subscription_id | Delete a Workspace resource. | |
refresh_recommendations | exec | resource_group_name, workspace_name, subscription_id | Refreshes 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.
| 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 | String that represents a Workspace resource name. Required. |
continuationToken | string | String that sets the continuation token. Default value is None. |
SELECT examples
- get
- list
- list_all
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
;
Get a list of Workspace resources in a resource group.
SELECT
id,
name,
communicationEndpoint,
identity,
location,
provisioningState,
scopes,
systemData,
tags,
type
FROM azure.chaos.workspaces
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND continuationToken = '{{ continuationToken }}'
;
Get a list of all Workspace resources in a subscription.
SELECT
id,
name,
communicationEndpoint,
identity,
location,
provisioningState,
scopes,
systemData,
tags,
type
FROM azure.chaos.workspaces
WHERE subscription_id = '{{ subscription_id }}' -- required
AND continuationToken = '{{ continuationToken }}'
;
INSERT examples
- create_or_update
- Manifest
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
;
# Description fields are for documentation purposes
- name: workspaces
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the workspaces resource.
- name: workspace_name
value: "{{ workspace_name }}"
description: Required parameter for the workspaces resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the workspaces resource.
- name: tags
value: "{{ tags }}"
description: |
Resource tags.
- name: location
value: "{{ location }}"
description: |
The geo-location where the resource lives. Required.
- name: identity
description: |
The managed service identities assigned to this resource.
value:
principalId: "{{ principalId }}"
tenantId: "{{ tenantId }}"
type: "{{ type }}"
userAssignedIdentities: "{{ userAssignedIdentities }}"
- name: properties
description: |
The properties of the Workspace resource. Required.
value:
provisioningState: "{{ provisioningState }}"
communicationEndpoint: "{{ communicationEndpoint }}"
scopes:
- "{{ scopes }}"
UPDATE examples
- update
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
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
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
- refresh_recommendations
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
;