Skip to main content

diagnostic_settings

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

Overview

Namediagnostic_settings
TypeResource
Idazure.monitor.diagnostic_settings

Fields

The following fields are returned by SELECT queries:

Successful request to get more information about diagnostic setting

NameDatatypeDescription
idstringAzure resource Id
namestringAzure resource name
locationstringResource location
propertiesobjectProperties of a Diagnostic Settings Resource.
systemDataobjectThe system metadata related to this resource.
tagsResource tags
typestringAzure resource type

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresourceUri, nameGets the active diagnostic settings for the specified resource.
listselectresourceUriGets the active diagnostic settings list for the specified resource.
create_or_updateinsertresourceUri, nameCreates or updates diagnostic settings for the specified resource.
deletedeleteresourceUri, nameDeletes existing diagnostic settings for the specified 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.

NameDatatypeDescription
namestringThe name of the diagnostic setting.
resourceUristringThe identifier of the resource.

SELECT examples

Gets the active diagnostic settings for the specified resource.

SELECT
id,
name,
location,
properties,
systemData,
tags,
type
FROM azure.monitor.diagnostic_settings
WHERE resourceUri = '{{ resourceUri }}' -- required
AND name = '{{ name }}' -- required
;

INSERT examples

Creates or updates diagnostic settings for the specified resource.

INSERT INTO azure.monitor.diagnostic_settings (
data__location,
data__tags,
data__properties,
resourceUri,
name
)
SELECT
'{{ location }}',
'{{ tags }}',
'{{ properties }}',
'{{ resourceUri }}',
'{{ name }}'
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type
;

DELETE examples

Deletes existing diagnostic settings for the specified resource.

DELETE FROM azure.monitor.diagnostic_settings
WHERE resourceUri = '{{ resourceUri }}' --required
AND name = '{{ name }}' --required
;