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

The following fields are returned by SELECT queries:

Request completed successfully

NameDatatypeDescription
idstringFully qualified ID of the resource. (example: /subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule)
namestringThe name of the resource. (example: myCollectionRule)
etagstringResource entity tag (ETag).
identityobjectManaged service identity (system assigned and/or user assigned identities)
kindstringThe kind of the resource. (example: Linux)
locationstringThe geo-location where the resource lives.
propertiesobjectDefinition of what monitoring data to collect and where that data should be sent.
systemDataobjectMetadata pertaining to creation and last modification of the resource.
tagsobjectResource tags.
typestringThe type of the resource. (example: Microsoft.Insights/dataCollectionRules)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsubscriptionId, resourceGroupName, dataCollectionRuleName
list_by_resource_groupselectsubscriptionId, resourceGroupName
list_by_subscriptionselectsubscriptionId
createinsertsubscriptionId, resourceGroupName, dataCollectionRuleName, data__location
updateupdatesubscriptionId, resourceGroupName, dataCollectionRuleName
deletedeletesubscriptionId, resourceGroupName, dataCollectionRuleNamedeleteAssociations

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
dataCollectionRuleNamestringThe name of the data collection rule. The name is case insensitive.
resourceGroupNamestringThe name of the resource group. The name is case insensitive.
subscriptionIdstringThe ID of the target subscription.
deleteAssociationsbooleanIf set to 'true' then all associations of this data collection rule will also be deleted

SELECT examples

Request completed successfully

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

INSERT examples

No description available.

INSERT INTO azure.monitor.data_collection_rules (
data__properties,
data__location,
data__tags,
data__kind,
data__identity,
subscriptionId,
resourceGroupName,
dataCollectionRuleName
)
SELECT
'{{ properties }}',
'{{ location }}' /* required */,
'{{ tags }}',
'{{ kind }}',
'{{ identity }}',
'{{ subscriptionId }}',
'{{ resourceGroupName }}',
'{{ dataCollectionRuleName }}'
RETURNING
id,
name,
etag,
identity,
kind,
location,
properties,
systemData,
tags,
type
;

UPDATE examples

No description available.

UPDATE azure.monitor.data_collection_rules
SET
data__tags = '{{ tags }}',
data__identity = '{{ identity }}'
WHERE
subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND dataCollectionRuleName = '{{ dataCollectionRuleName }}' --required
RETURNING
id,
name,
etag,
identity,
kind,
location,
properties,
systemData,
tags,
type;

DELETE examples

No description available.

DELETE FROM azure.monitor.data_collection_rules
WHERE subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND dataCollectionRuleName = '{{ dataCollectionRuleName }}' --required
AND deleteAssociations = '{{ deleteAssociations }}'
;