issue
Creates, updates, deletes, gets or lists an issue resource.
Overview
| Name | issue |
| Type | Resource |
| Id | azure.monitor_workspaces.issue |
Fields
The following fields are returned by SELECT queries:
- fetch_investigation_result
- get
- list
| Name | Datatype | Description |
|---|---|---|
id | string | The identifier of the investigation. Required. |
createdAt | string (date-time) | The creation time of the investigation (in UTC). |
lastModifiedAt | string (date-time) | The last update time of the investigation (in UTC). |
origin | object | The origin of the investigation. |
result | string | The result of this investigation. Required. |
| 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. |
background | object | The issue background information. |
impactTime | string (date-time) | The issue impact time (in UTC). Required. |
investigations | array | The list of investigations in the issue. Required. |
investigationsCount | integer | The number of investigations in the issue. Required. |
notifications | object | The issue notification settings. |
provisioningState | string | The provisioning state of the resource. Known values are: "Succeeded", "Failed", and "Canceled". (Succeeded, Failed, Canceled) |
severity | string | The issue severity. Required. |
status | string | The issue status. Required. Known values are: "New", "InProgress", "Mitigated", "Closed", and "Canceled". (New, InProgress, Mitigated, Closed, Canceled) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
title | string | The issue title. Required. |
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. |
background | object | The issue background information. |
impactTime | string (date-time) | The issue impact time (in UTC). Required. |
investigations | array | The list of investigations in the issue. Required. |
investigationsCount | integer | The number of investigations in the issue. Required. |
notifications | object | The issue notification settings. |
provisioningState | string | The provisioning state of the resource. Known values are: "Succeeded", "Failed", and "Canceled". (Succeeded, Failed, Canceled) |
severity | string | The issue severity. Required. |
status | string | The issue status. Required. Known values are: "New", "InProgress", "Mitigated", "Closed", and "Canceled". (New, InProgress, Mitigated, Closed, Canceled) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
title | string | The issue title. Required. |
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:
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 |
|---|---|---|
azure_monitor_workspace_name | string | The name of the Azure Monitor Workspace. The name is case insensitive. Required. |
issue_name | string | The name of the IssueResource. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string | |
related | string | Related resource or alert that is to be added to the issue (default: empty - the issue will be created without any related resources or alerts). Default value is None. |
SELECT examples
- fetch_investigation_result
- get
- list
Fetch investigation result.
SELECT
id,
createdAt,
lastModifiedAt,
origin,
result
FROM azure.monitor_workspaces.issue
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND azure_monitor_workspace_name = '{{ azure_monitor_workspace_name }}' -- required
AND issue_name = '{{ issue_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Get issue properties.
SELECT
id,
name,
background,
impactTime,
investigations,
investigationsCount,
notifications,
provisioningState,
severity,
status,
systemData,
title,
type
FROM azure.monitor_workspaces.issue
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND azure_monitor_workspace_name = '{{ azure_monitor_workspace_name }}' -- required
AND issue_name = '{{ issue_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
List all issues under the parent.
SELECT
id,
name,
background,
impactTime,
investigations,
investigationsCount,
notifications,
provisioningState,
severity,
status,
systemData,
title,
type
FROM azure.monitor_workspaces.issue
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND azure_monitor_workspace_name = '{{ azure_monitor_workspace_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create
- Manifest
Create a new issue or updates an existing one.
INSERT INTO azure.monitor_workspaces.issue (
properties,
resource_group_name,
azure_monitor_workspace_name,
issue_name,
subscription_id,
related
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ azure_monitor_workspace_name }}',
'{{ issue_name }}',
'{{ subscription_id }}',
'{{ related }}'
RETURNING
id,
name,
properties,
systemData,
type
;
# Description fields are for documentation purposes
- name: issue
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the issue resource.
- name: azure_monitor_workspace_name
value: "{{ azure_monitor_workspace_name }}"
description: Required parameter for the issue resource.
- name: issue_name
value: "{{ issue_name }}"
description: Required parameter for the issue resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the issue resource.
- name: properties
description: |
The resource-specific properties for this resource.
value:
title: "{{ title }}"
status: "{{ status }}"
severity: "{{ severity }}"
investigations:
- id: "{{ id }}"
createdAt: "{{ createdAt }}"
impactTime: "{{ impactTime }}"
investigationsCount: {{ investigationsCount }}
background:
type: "{{ type }}"
text: "{{ text }}"
details:
- name: "{{ name }}"
value: "{{ value }}"
notifications:
updateTypes:
- updateType: "{{ updateType }}"
actionGroupIds:
- "{{ actionGroupIds }}"
excludeDefaultActionGroups: {{ excludeDefaultActionGroups }}
provisioningState: "{{ provisioningState }}"
- name: related
value: "{{ related }}"
description: Related resource or alert that is to be added to the issue (default: empty - the issue will be created without any related resources or alerts). Default value is None.
description: Related resource or alert that is to be added to the issue (default: empty - the issue will be created without any related resources or alerts). Default value is None.
UPDATE examples
- update
Update an issue.
UPDATE azure.monitor_workspaces.issue
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND azure_monitor_workspace_name = '{{ azure_monitor_workspace_name }}' --required
AND issue_name = '{{ issue_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;
DELETE examples
- delete
Delete an issue.
DELETE FROM azure.monitor_workspaces.issue
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND azure_monitor_workspace_name = '{{ azure_monitor_workspace_name }}' --required
AND issue_name = '{{ issue_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;
Lifecycle Methods
- list_alerts
- list_resources
- add_investigation_result
- add_or_update_alerts
- add_or_update_resources
- fetch_background_visualization
- set_background_visualization
List all alerts in the issue - this method uses pagination to return all alerts.
EXEC azure.monitor_workspaces.issue.list_alerts
@resource_group_name='{{ resource_group_name }}' --required,
@azure_monitor_workspace_name='{{ azure_monitor_workspace_name }}' --required,
@issue_name='{{ issue_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"filter": "{{ filter }}"
}'
;
List all resources in the issue - this method uses pagination to return all resources.
EXEC azure.monitor_workspaces.issue.list_resources
@resource_group_name='{{ resource_group_name }}' --required,
@azure_monitor_workspace_name='{{ azure_monitor_workspace_name }}' --required,
@issue_name='{{ issue_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"filter": "{{ filter }}"
}'
;
Adds investigation result.
EXEC azure.monitor_workspaces.issue.add_investigation_result
@resource_group_name='{{ resource_group_name }}' --required,
@azure_monitor_workspace_name='{{ azure_monitor_workspace_name }}' --required,
@issue_name='{{ issue_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"id": "{{ id }}",
"origin": "{{ origin }}",
"createdAt": "{{ createdAt }}",
"lastModifiedAt": "{{ lastModifiedAt }}",
"result": "{{ result }}"
}'
;
Add or update alerts associated with an issue.
EXEC azure.monitor_workspaces.issue.add_or_update_alerts
@resource_group_name='{{ resource_group_name }}' --required,
@azure_monitor_workspace_name='{{ azure_monitor_workspace_name }}' --required,
@issue_name='{{ issue_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"value": "{{ value }}"
}'
;
Add or update resources associated with an issue.
EXEC azure.monitor_workspaces.issue.add_or_update_resources
@resource_group_name='{{ resource_group_name }}' --required,
@azure_monitor_workspace_name='{{ azure_monitor_workspace_name }}' --required,
@issue_name='{{ issue_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"value": "{{ value }}"
}'
;
Fetch the background visualization of the issue.
EXEC azure.monitor_workspaces.issue.fetch_background_visualization
@resource_group_name='{{ resource_group_name }}' --required,
@azure_monitor_workspace_name='{{ azure_monitor_workspace_name }}' --required,
@issue_name='{{ issue_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Set the background visualization for the issue.
EXEC azure.monitor_workspaces.issue.set_background_visualization
@resource_group_name='{{ resource_group_name }}' --required,
@azure_monitor_workspace_name='{{ azure_monitor_workspace_name }}' --required,
@issue_name='{{ issue_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"visualization": "{{ visualization }}"
}'
;