Skip to main content

data_collection_rules

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

Overview

Namedata_collection_rules
TypeResource
Idazure.monitor.data_collection_rules

Fields

NameDatatypeDescription
idstringFully qualified ID of the resource.
namestringThe name of the resource.
etagstringResource entity tag (ETag).
identityobjectManaged service identity of the resource.
kindstringThe kind of the resource.
locationstringThe geo-location where the resource lives.
propertiesobjectResource properties.
systemDataobjectMetadata pertaining to creation and last modification of the resource.
tagsobjectResource tags.
typestringThe type of the resource.

Methods

NameAccessible byRequired ParamsDescription
getSELECTdataCollectionRuleName, resourceGroupName, subscriptionId
list_by_resource_groupSELECTresourceGroupName, subscriptionId
list_by_subscriptionSELECTsubscriptionId
createINSERTdataCollectionRuleName, resourceGroupName, subscriptionId, data__location
deleteDELETEdataCollectionRuleName, resourceGroupName, subscriptionId
updateUPDATEdataCollectionRuleName, resourceGroupName, subscriptionId

SELECT examples

SELECT
id,
name,
etag,
identity,
kind,
location,
properties,
systemData,
tags,
type
FROM azure.monitor.data_collection_rules
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new data_collection_rules resource.

/*+ create */
INSERT INTO azure.monitor.data_collection_rules (
dataCollectionRuleName,
resourceGroupName,
subscriptionId,
data__location,
properties,
location,
tags,
kind,
identity
)
SELECT
'{{ dataCollectionRuleName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ data__location }}',
'{{ properties }}',
'{{ location }}',
'{{ tags }}',
'{{ kind }}',
'{{ identity }}'
;

UPDATE example

Updates a data_collection_rules resource.

/*+ update */
UPDATE azure.monitor.data_collection_rules
SET
tags = '{{ tags }}',
identity = '{{ identity }}'
WHERE
dataCollectionRuleName = '{{ dataCollectionRuleName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified data_collection_rules resource.

/*+ delete */
DELETE FROM azure.monitor.data_collection_rules
WHERE dataCollectionRuleName = '{{ dataCollectionRuleName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';