Skip to main content

diagnostics

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

Overview

Namediagnostics
TypeResource
Idazure_extras.self_help.diagnostics

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
namestringThe name of the resource.
acceptedAtstringDiagnostic Request Accepted time.
diagnosticsarrayArray of Diagnostics.
globalParametersobjectGlobal parameters is an optional map which can be used to add key and value to request body to improve the diagnostics results.
insightsarraySolutionIds that are needed to be invoked.
provisioningStatestringStatus of diagnostic provisioning. Known values are: "Succeeded", "PartialComplete", "Failed", "Running", and "Canceled".
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
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
getselectscope, diagnostics_resource_nameGet the diagnostics using the 'diagnosticsResourceName' you chose while creating the diagnostic.
createinsertscope, diagnostics_resource_nameCreates 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.

NameDatatypeDescription
diagnostics_resource_namestringUnique resource name for insight resources. Required.
scopestringscope = 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 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

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
;