diagnostics
Creates, updates, deletes, gets or lists a diagnostics resource.
Overview
| Name | diagnostics |
| Type | Resource |
| Id | azure_extras.self_help.diagnostics |
Fields
The following fields are returned by SELECT queries:
- get
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long |
name | string | The name of the resource. |
acceptedAt | string | Diagnostic Request Accepted time. |
diagnostics | array | Array of Diagnostics. |
globalParameters | object | Global parameters is an optional map which can be used to add key and value to request body to improve the diagnostics results. |
insights | array | SolutionIds that are needed to be invoked. |
provisioningState | string | Status of diagnostic provisioning. Known values are: "Succeeded", "PartialComplete", "Failed", "Running", and "Canceled". |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
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 | scope, diagnostics_resource_name | Get the diagnostics using the 'diagnosticsResourceName' you chose while creating the diagnostic. | |
create | insert | scope, diagnostics_resource_name | Creates a diagnostic for the specific resource using solutionId from discovery solutions. Diagnostics are powerful solutions that access product resources or other relevant data and provide the root cause of the issue and the steps to address the issue.. |
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 |
|---|---|---|
diagnostics_resource_name | string | Unique resource name for insight resources. Required. |
scope | string | scope = resourceUri of affected resource. For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. Required. |
SELECT examples
- get
Get the diagnostics using the 'diagnosticsResourceName' you chose while creating the diagnostic.
SELECT
id,
name,
acceptedAt,
diagnostics,
globalParameters,
insights,
provisioningState,
systemData,
type
FROM azure_extras.self_help.diagnostics
WHERE scope = '{{ scope }}' -- required
AND diagnostics_resource_name = '{{ diagnostics_resource_name }}' -- required
;
INSERT examples
- create
- Manifest
Creates a diagnostic for the specific resource using solutionId from discovery solutions. Diagnostics are powerful solutions that access product resources or other relevant data and provide the root cause of the issue and the steps to address the issue..
INSERT INTO azure_extras.self_help.diagnostics (
properties,
scope,
diagnostics_resource_name
)
SELECT
'{{ properties }}',
'{{ scope }}',
'{{ diagnostics_resource_name }}'
RETURNING
id,
name,
properties,
systemData,
type
;
# Description fields are for documentation purposes
- name: diagnostics
props:
- name: scope
value: "{{ scope }}"
description: Required parameter for the diagnostics resource.
- name: diagnostics_resource_name
value: "{{ diagnostics_resource_name }}"
description: Required parameter for the diagnostics resource.
- name: properties
value:
globalParameters: "{{ globalParameters }}"
insights:
- solutionId: "{{ solutionId }}"
additionalParameters: "{{ additionalParameters }}"