Skip to main content

tag_rules

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

Overview

Nametag_rules
TypeResource
Idazure_isv.newrelic.tag_rules

Fields

NameDatatypeDescription
log_rulestextfield from the properties object
metric_rulestextfield from the properties object
monitorNametextfield from the properties object
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
ruleSetNametextfield from the properties object
subscriptionIdtextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTmonitorName, resourceGroupName, ruleSetName, subscriptionIdGet a TagRule
list_by_new_relic_monitor_resourceSELECTmonitorName, resourceGroupName, subscriptionIdList TagRule resources by NewRelicMonitorResource
create_or_updateINSERTmonitorName, resourceGroupName, ruleSetName, subscriptionId, data__propertiesCreate a TagRule
deleteDELETEmonitorName, resourceGroupName, ruleSetName, subscriptionIdDelete a TagRule
updateUPDATEmonitorName, resourceGroupName, ruleSetName, subscriptionIdUpdate a TagRule

SELECT examples

List TagRule resources by NewRelicMonitorResource

SELECT
log_rules,
metric_rules,
monitorName,
provisioning_state,
resourceGroupName,
ruleSetName,
subscriptionId
FROM azure_isv.newrelic.vw_tag_rules
WHERE monitorName = '{{ monitorName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure_isv.newrelic.tag_rules (
monitorName,
resourceGroupName,
ruleSetName,
subscriptionId,
data__properties,
properties
)
SELECT
'{{ monitorName }}',
'{{ resourceGroupName }}',
'{{ ruleSetName }}',
'{{ subscriptionId }}',
'{{ data__properties }}',
'{{ properties }}'
;

UPDATE example

Updates a tag_rules resource.

/*+ update */
UPDATE azure_isv.newrelic.tag_rules
SET
properties = '{{ properties }}'
WHERE
monitorName = '{{ monitorName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND ruleSetName = '{{ ruleSetName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified tag_rules resource.

/*+ delete */
DELETE FROM azure_isv.newrelic.tag_rules
WHERE monitorName = '{{ monitorName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND ruleSetName = '{{ ruleSetName }}'
AND subscriptionId = '{{ subscriptionId }}';