tag_rules
Creates, updates, deletes, gets or lists a tag_rules
resource.
Overview
Name | tag_rules |
Type | Resource |
Id | azure_isv.newrelic.tag_rules |
Fields
- vw_tag_rules
- tag_rules
Name | Datatype | Description |
---|---|---|
log_rules | text | field from the properties object |
metric_rules | text | field from the properties object |
monitorName | text | field from the properties object |
provisioning_state | text | field from the properties object |
resourceGroupName | text | field from the properties object |
ruleSetName | text | field from the properties object |
subscriptionId | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
properties | object | The resource-specific properties for this resource. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | monitorName, resourceGroupName, ruleSetName, subscriptionId | Get a TagRule |
list_by_new_relic_monitor_resource | SELECT | monitorName, resourceGroupName, subscriptionId | List TagRule resources by NewRelicMonitorResource |
create_or_update | INSERT | monitorName, resourceGroupName, ruleSetName, subscriptionId, data__properties | Create a TagRule |
delete | DELETE | monitorName, resourceGroupName, ruleSetName, subscriptionId | Delete a TagRule |
update | UPDATE | monitorName, resourceGroupName, ruleSetName, subscriptionId | Update a TagRule |
SELECT
examples
List TagRule resources by NewRelicMonitorResource
- vw_tag_rules
- tag_rules
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 }}';
SELECT
properties
FROM azure_isv.newrelic.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.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure_isv.newrelic.tag_rules (
monitorName,
resourceGroupName,
ruleSetName,
subscriptionId,
data__properties,
properties
)
SELECT
'{{ monitorName }}',
'{{ resourceGroupName }}',
'{{ ruleSetName }}',
'{{ subscriptionId }}',
'{{ data__properties }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: provisioningState
value: []
- name: logRules
value:
- name: sendAadLogs
value: []
- name: sendSubscriptionLogs
value: []
- name: sendActivityLogs
value: []
- name: filteringTags
value:
- - name: name
value: string
- name: value
value: string
- name: action
value: []
- name: metricRules
value:
- name: sendMetrics
value: []
- name: filteringTags
value:
- - name: name
value: string
- name: value
value: string
- name: userEmail
value: []
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 }}';