We recommend using Azure Native.
azure.dynatrace.TagRules
Explore with Pulumi AI
Manages Dynatrace tag rules.
Example Usage
Coming soon!
Coming soon!
Coming soon!
Coming soon!
Coming soon!
resources:
  example:
    type: azure:core:ResourceGroup
    properties:
      name: example-resources
      location: West Europe
  exampleMonitor:
    type: azure:dynatrace:Monitor
    name: example
    properties:
      name: exmpledynatracemonitor
      resourceGroupName: ${example.name}
      location: ${test.location}
      monitoringEnabled: true
      marketplaceSubscriptionStatus: Active
      identity:
        type: SystemAssigned
      user:
        firstName: Alice
        lastName: Bobab
        email: alice@microsoft.com
        phoneNumber: '123456'
        country: westus
      plan:
        usageType: COMMITTED
        billingCycle: MONTHLY
        plan: azureportalintegration_privatepreview@TIDhjdtn7tfnxcy
        effectiveDate: 2019-08-30T15:14:33Z
  exampleTagRules:
    type: azure:dynatrace:TagRules
    name: example
    properties:
      name: examplestreamanalyticscluster
      monitorId: ${testAzurermDynatraceMonitors.id}
      logRule:
        filteringTags:
          - name: Environment
            value: Prod
            action: Include
        sendAzureActiveDirectoryLogsEnabled: true
        sendActivityLogsEnabled: true
        sendSubscriptionLogsEnabled: true
      metricRule:
        filteringTags:
          - name: Environment
            value: Prod
            action: Include
Create TagRules Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TagRules(name: string, args: TagRulesArgs, opts?: CustomResourceOptions);@overload
def TagRules(resource_name: str,
             args: TagRulesArgs,
             opts: Optional[ResourceOptions] = None)
@overload
def TagRules(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             monitor_id: Optional[str] = None,
             log_rule: Optional[TagRulesLogRuleArgs] = None,
             metric_rule: Optional[TagRulesMetricRuleArgs] = None,
             name: Optional[str] = None)func NewTagRules(ctx *Context, name string, args TagRulesArgs, opts ...ResourceOption) (*TagRules, error)public TagRules(string name, TagRulesArgs args, CustomResourceOptions? opts = null)
public TagRules(String name, TagRulesArgs args)
public TagRules(String name, TagRulesArgs args, CustomResourceOptions options)
type: azure:dynatrace:TagRules
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args TagRulesArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args TagRulesArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args TagRulesArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TagRulesArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TagRulesArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var tagRulesResource = new Azure.Dynatrace.TagRules("tagRulesResource", new()
{
    MonitorId = "string",
    LogRule = new Azure.Dynatrace.Inputs.TagRulesLogRuleArgs
    {
        FilteringTags = new[]
        {
            new Azure.Dynatrace.Inputs.TagRulesLogRuleFilteringTagArgs
            {
                Action = "string",
                Name = "string",
                Value = "string",
            },
        },
        SendActivityLogsEnabled = false,
        SendAzureActiveDirectoryLogsEnabled = false,
        SendSubscriptionLogsEnabled = false,
    },
    MetricRule = new Azure.Dynatrace.Inputs.TagRulesMetricRuleArgs
    {
        FilteringTags = new[]
        {
            new Azure.Dynatrace.Inputs.TagRulesMetricRuleFilteringTagArgs
            {
                Action = "string",
                Name = "string",
                Value = "string",
            },
        },
    },
    Name = "string",
});
example, err := dynatrace.NewTagRules(ctx, "tagRulesResource", &dynatrace.TagRulesArgs{
	MonitorId: pulumi.String("string"),
	LogRule: &dynatrace.TagRulesLogRuleArgs{
		FilteringTags: dynatrace.TagRulesLogRuleFilteringTagArray{
			&dynatrace.TagRulesLogRuleFilteringTagArgs{
				Action: pulumi.String("string"),
				Name:   pulumi.String("string"),
				Value:  pulumi.String("string"),
			},
		},
		SendActivityLogsEnabled:             pulumi.Bool(false),
		SendAzureActiveDirectoryLogsEnabled: pulumi.Bool(false),
		SendSubscriptionLogsEnabled:         pulumi.Bool(false),
	},
	MetricRule: &dynatrace.TagRulesMetricRuleArgs{
		FilteringTags: dynatrace.TagRulesMetricRuleFilteringTagArray{
			&dynatrace.TagRulesMetricRuleFilteringTagArgs{
				Action: pulumi.String("string"),
				Name:   pulumi.String("string"),
				Value:  pulumi.String("string"),
			},
		},
	},
	Name: pulumi.String("string"),
})
var tagRulesResource = new TagRules("tagRulesResource", TagRulesArgs.builder()
    .monitorId("string")
    .logRule(TagRulesLogRuleArgs.builder()
        .filteringTags(TagRulesLogRuleFilteringTagArgs.builder()
            .action("string")
            .name("string")
            .value("string")
            .build())
        .sendActivityLogsEnabled(false)
        .sendAzureActiveDirectoryLogsEnabled(false)
        .sendSubscriptionLogsEnabled(false)
        .build())
    .metricRule(TagRulesMetricRuleArgs.builder()
        .filteringTags(TagRulesMetricRuleFilteringTagArgs.builder()
            .action("string")
            .name("string")
            .value("string")
            .build())
        .build())
    .name("string")
    .build());
tag_rules_resource = azure.dynatrace.TagRules("tagRulesResource",
    monitor_id="string",
    log_rule={
        "filtering_tags": [{
            "action": "string",
            "name": "string",
            "value": "string",
        }],
        "send_activity_logs_enabled": False,
        "send_azure_active_directory_logs_enabled": False,
        "send_subscription_logs_enabled": False,
    },
    metric_rule={
        "filtering_tags": [{
            "action": "string",
            "name": "string",
            "value": "string",
        }],
    },
    name="string")
const tagRulesResource = new azure.dynatrace.TagRules("tagRulesResource", {
    monitorId: "string",
    logRule: {
        filteringTags: [{
            action: "string",
            name: "string",
            value: "string",
        }],
        sendActivityLogsEnabled: false,
        sendAzureActiveDirectoryLogsEnabled: false,
        sendSubscriptionLogsEnabled: false,
    },
    metricRule: {
        filteringTags: [{
            action: "string",
            name: "string",
            value: "string",
        }],
    },
    name: "string",
});
type: azure:dynatrace:TagRules
properties:
    logRule:
        filteringTags:
            - action: string
              name: string
              value: string
        sendActivityLogsEnabled: false
        sendAzureActiveDirectoryLogsEnabled: false
        sendSubscriptionLogsEnabled: false
    metricRule:
        filteringTags:
            - action: string
              name: string
              value: string
    monitorId: string
    name: string
TagRules Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The TagRules resource accepts the following input properties:
- MonitorId string
- Name of the Dynatrace monitor. Changing this forces a new resource to be created.
- LogRule TagRules Log Rule 
- Set of rules for sending logs for the Monitor resource. Changing this forces a new resource to be created. A log_ruleblock as defined below.
- MetricRule TagRules Metric Rule 
- Set of rules for sending metrics for the Monitor resource. Changing this forces a new resource to be created. A metric_ruleblock as defined below.
- Name string
- Name of the Dynatrace tag rules. Currently, the only supported value is default. Changing this forces a new resource to be created.
- MonitorId string
- Name of the Dynatrace monitor. Changing this forces a new resource to be created.
- LogRule TagRules Log Rule Args 
- Set of rules for sending logs for the Monitor resource. Changing this forces a new resource to be created. A log_ruleblock as defined below.
- MetricRule TagRules Metric Rule Args 
- Set of rules for sending metrics for the Monitor resource. Changing this forces a new resource to be created. A metric_ruleblock as defined below.
- Name string
- Name of the Dynatrace tag rules. Currently, the only supported value is default. Changing this forces a new resource to be created.
- monitorId String
- Name of the Dynatrace monitor. Changing this forces a new resource to be created.
- logRule TagRules Log Rule 
- Set of rules for sending logs for the Monitor resource. Changing this forces a new resource to be created. A log_ruleblock as defined below.
- metricRule TagRules Metric Rule 
- Set of rules for sending metrics for the Monitor resource. Changing this forces a new resource to be created. A metric_ruleblock as defined below.
- name String
- Name of the Dynatrace tag rules. Currently, the only supported value is default. Changing this forces a new resource to be created.
- monitorId string
- Name of the Dynatrace monitor. Changing this forces a new resource to be created.
- logRule TagRules Log Rule 
- Set of rules for sending logs for the Monitor resource. Changing this forces a new resource to be created. A log_ruleblock as defined below.
- metricRule TagRules Metric Rule 
- Set of rules for sending metrics for the Monitor resource. Changing this forces a new resource to be created. A metric_ruleblock as defined below.
- name string
- Name of the Dynatrace tag rules. Currently, the only supported value is default. Changing this forces a new resource to be created.
- monitor_id str
- Name of the Dynatrace monitor. Changing this forces a new resource to be created.
- log_rule TagRules Log Rule Args 
- Set of rules for sending logs for the Monitor resource. Changing this forces a new resource to be created. A log_ruleblock as defined below.
- metric_rule TagRules Metric Rule Args 
- Set of rules for sending metrics for the Monitor resource. Changing this forces a new resource to be created. A metric_ruleblock as defined below.
- name str
- Name of the Dynatrace tag rules. Currently, the only supported value is default. Changing this forces a new resource to be created.
- monitorId String
- Name of the Dynatrace monitor. Changing this forces a new resource to be created.
- logRule Property Map
- Set of rules for sending logs for the Monitor resource. Changing this forces a new resource to be created. A log_ruleblock as defined below.
- metricRule Property Map
- Set of rules for sending metrics for the Monitor resource. Changing this forces a new resource to be created. A metric_ruleblock as defined below.
- name String
- Name of the Dynatrace tag rules. Currently, the only supported value is default. Changing this forces a new resource to be created.
Outputs
All input properties are implicitly available as output properties. Additionally, the TagRules resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing TagRules Resource
Get an existing TagRules resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: TagRulesState, opts?: CustomResourceOptions): TagRules@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        log_rule: Optional[TagRulesLogRuleArgs] = None,
        metric_rule: Optional[TagRulesMetricRuleArgs] = None,
        monitor_id: Optional[str] = None,
        name: Optional[str] = None) -> TagRulesfunc GetTagRules(ctx *Context, name string, id IDInput, state *TagRulesState, opts ...ResourceOption) (*TagRules, error)public static TagRules Get(string name, Input<string> id, TagRulesState? state, CustomResourceOptions? opts = null)public static TagRules get(String name, Output<String> id, TagRulesState state, CustomResourceOptions options)resources:  _:    type: azure:dynatrace:TagRules    get:      id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- LogRule TagRules Log Rule 
- Set of rules for sending logs for the Monitor resource. Changing this forces a new resource to be created. A log_ruleblock as defined below.
- MetricRule TagRules Metric Rule 
- Set of rules for sending metrics for the Monitor resource. Changing this forces a new resource to be created. A metric_ruleblock as defined below.
- MonitorId string
- Name of the Dynatrace monitor. Changing this forces a new resource to be created.
- Name string
- Name of the Dynatrace tag rules. Currently, the only supported value is default. Changing this forces a new resource to be created.
- LogRule TagRules Log Rule Args 
- Set of rules for sending logs for the Monitor resource. Changing this forces a new resource to be created. A log_ruleblock as defined below.
- MetricRule TagRules Metric Rule Args 
- Set of rules for sending metrics for the Monitor resource. Changing this forces a new resource to be created. A metric_ruleblock as defined below.
- MonitorId string
- Name of the Dynatrace monitor. Changing this forces a new resource to be created.
- Name string
- Name of the Dynatrace tag rules. Currently, the only supported value is default. Changing this forces a new resource to be created.
- logRule TagRules Log Rule 
- Set of rules for sending logs for the Monitor resource. Changing this forces a new resource to be created. A log_ruleblock as defined below.
- metricRule TagRules Metric Rule 
- Set of rules for sending metrics for the Monitor resource. Changing this forces a new resource to be created. A metric_ruleblock as defined below.
- monitorId String
- Name of the Dynatrace monitor. Changing this forces a new resource to be created.
- name String
- Name of the Dynatrace tag rules. Currently, the only supported value is default. Changing this forces a new resource to be created.
- logRule TagRules Log Rule 
- Set of rules for sending logs for the Monitor resource. Changing this forces a new resource to be created. A log_ruleblock as defined below.
- metricRule TagRules Metric Rule 
- Set of rules for sending metrics for the Monitor resource. Changing this forces a new resource to be created. A metric_ruleblock as defined below.
- monitorId string
- Name of the Dynatrace monitor. Changing this forces a new resource to be created.
- name string
- Name of the Dynatrace tag rules. Currently, the only supported value is default. Changing this forces a new resource to be created.
- log_rule TagRules Log Rule Args 
- Set of rules for sending logs for the Monitor resource. Changing this forces a new resource to be created. A log_ruleblock as defined below.
- metric_rule TagRules Metric Rule Args 
- Set of rules for sending metrics for the Monitor resource. Changing this forces a new resource to be created. A metric_ruleblock as defined below.
- monitor_id str
- Name of the Dynatrace monitor. Changing this forces a new resource to be created.
- name str
- Name of the Dynatrace tag rules. Currently, the only supported value is default. Changing this forces a new resource to be created.
- logRule Property Map
- Set of rules for sending logs for the Monitor resource. Changing this forces a new resource to be created. A log_ruleblock as defined below.
- metricRule Property Map
- Set of rules for sending metrics for the Monitor resource. Changing this forces a new resource to be created. A metric_ruleblock as defined below.
- monitorId String
- Name of the Dynatrace monitor. Changing this forces a new resource to be created.
- name String
- Name of the Dynatrace tag rules. Currently, the only supported value is default. Changing this forces a new resource to be created.
Supporting Types
TagRulesLogRule, TagRulesLogRuleArgs        
- 
List<TagRules Log Rule Filtering Tag> 
- Filtering tag for the log rule. A filtering_tagblock as defined below. Changing this forces a new resource to be created.
- SendActivity boolLogs Enabled 
- Send Activity logs. The default value is false. Changing this forces a new resource to be created.
- SendAzure boolActive Directory Logs Enabled 
- Send Azure Active Directory logs. The default value is false. Changing this forces a new resource to be created.
- SendSubscription boolLogs Enabled 
- Send Subscription logs. The default value is false. Changing this forces a new resource to be created.
- 
[]TagRules Log Rule Filtering Tag 
- Filtering tag for the log rule. A filtering_tagblock as defined below. Changing this forces a new resource to be created.
- SendActivity boolLogs Enabled 
- Send Activity logs. The default value is false. Changing this forces a new resource to be created.
- SendAzure boolActive Directory Logs Enabled 
- Send Azure Active Directory logs. The default value is false. Changing this forces a new resource to be created.
- SendSubscription boolLogs Enabled 
- Send Subscription logs. The default value is false. Changing this forces a new resource to be created.
- 
List<TagRules Log Rule Filtering Tag> 
- Filtering tag for the log rule. A filtering_tagblock as defined below. Changing this forces a new resource to be created.
- sendActivity BooleanLogs Enabled 
- Send Activity logs. The default value is false. Changing this forces a new resource to be created.
- sendAzure BooleanActive Directory Logs Enabled 
- Send Azure Active Directory logs. The default value is false. Changing this forces a new resource to be created.
- sendSubscription BooleanLogs Enabled 
- Send Subscription logs. The default value is false. Changing this forces a new resource to be created.
- 
TagRules Log Rule Filtering Tag[] 
- Filtering tag for the log rule. A filtering_tagblock as defined below. Changing this forces a new resource to be created.
- sendActivity booleanLogs Enabled 
- Send Activity logs. The default value is false. Changing this forces a new resource to be created.
- sendAzure booleanActive Directory Logs Enabled 
- Send Azure Active Directory logs. The default value is false. Changing this forces a new resource to be created.
- sendSubscription booleanLogs Enabled 
- Send Subscription logs. The default value is false. Changing this forces a new resource to be created.
- 
Sequence[TagRules Log Rule Filtering Tag] 
- Filtering tag for the log rule. A filtering_tagblock as defined below. Changing this forces a new resource to be created.
- send_activity_ boollogs_ enabled 
- Send Activity logs. The default value is false. Changing this forces a new resource to be created.
- send_azure_ boolactive_ directory_ logs_ enabled 
- Send Azure Active Directory logs. The default value is false. Changing this forces a new resource to be created.
- send_subscription_ boollogs_ enabled 
- Send Subscription logs. The default value is false. Changing this forces a new resource to be created.
- List<Property Map>
- Filtering tag for the log rule. A filtering_tagblock as defined below. Changing this forces a new resource to be created.
- sendActivity BooleanLogs Enabled 
- Send Activity logs. The default value is false. Changing this forces a new resource to be created.
- sendAzure BooleanActive Directory Logs Enabled 
- Send Azure Active Directory logs. The default value is false. Changing this forces a new resource to be created.
- sendSubscription BooleanLogs Enabled 
- Send Subscription logs. The default value is false. Changing this forces a new resource to be created.
TagRulesLogRuleFilteringTag, TagRulesLogRuleFilteringTagArgs            
- Action string
- Action of the filtering tag. Possible values are IncludeandExclude. Changing this forces a new resource to be created.
- Name string
- Name of the filtering tag. Changing this forces a new resource to be created.
- Value string
- Value of the filtering tag. Changing this forces a new resource to be created.
- Action string
- Action of the filtering tag. Possible values are IncludeandExclude. Changing this forces a new resource to be created.
- Name string
- Name of the filtering tag. Changing this forces a new resource to be created.
- Value string
- Value of the filtering tag. Changing this forces a new resource to be created.
- action String
- Action of the filtering tag. Possible values are IncludeandExclude. Changing this forces a new resource to be created.
- name String
- Name of the filtering tag. Changing this forces a new resource to be created.
- value String
- Value of the filtering tag. Changing this forces a new resource to be created.
- action string
- Action of the filtering tag. Possible values are IncludeandExclude. Changing this forces a new resource to be created.
- name string
- Name of the filtering tag. Changing this forces a new resource to be created.
- value string
- Value of the filtering tag. Changing this forces a new resource to be created.
- action str
- Action of the filtering tag. Possible values are IncludeandExclude. Changing this forces a new resource to be created.
- name str
- Name of the filtering tag. Changing this forces a new resource to be created.
- value str
- Value of the filtering tag. Changing this forces a new resource to be created.
- action String
- Action of the filtering tag. Possible values are IncludeandExclude. Changing this forces a new resource to be created.
- name String
- Name of the filtering tag. Changing this forces a new resource to be created.
- value String
- Value of the filtering tag. Changing this forces a new resource to be created.
TagRulesMetricRule, TagRulesMetricRuleArgs        
- 
List<TagRules Metric Rule Filtering Tag> 
- Filtering tag for the metric rule. A filtering_tagblock as defined below.
- 
[]TagRules Metric Rule Filtering Tag 
- Filtering tag for the metric rule. A filtering_tagblock as defined below.
- 
List<TagRules Metric Rule Filtering Tag> 
- Filtering tag for the metric rule. A filtering_tagblock as defined below.
- 
TagRules Metric Rule Filtering Tag[] 
- Filtering tag for the metric rule. A filtering_tagblock as defined below.
- 
Sequence[TagRules Metric Rule Filtering Tag] 
- Filtering tag for the metric rule. A filtering_tagblock as defined below.
- List<Property Map>
- Filtering tag for the metric rule. A filtering_tagblock as defined below.
TagRulesMetricRuleFilteringTag, TagRulesMetricRuleFilteringTagArgs            
- Action string
- Action of the filtering tag. Possible values are IncludeandExclude. Changing this forces a new resource to be created.
- Name string
- Name of the filtering tag. Changing this forces a new resource to be created.
- Value string
- Value of the filtering tag. Changing this forces a new resource to be created.
- Action string
- Action of the filtering tag. Possible values are IncludeandExclude. Changing this forces a new resource to be created.
- Name string
- Name of the filtering tag. Changing this forces a new resource to be created.
- Value string
- Value of the filtering tag. Changing this forces a new resource to be created.
- action String
- Action of the filtering tag. Possible values are IncludeandExclude. Changing this forces a new resource to be created.
- name String
- Name of the filtering tag. Changing this forces a new resource to be created.
- value String
- Value of the filtering tag. Changing this forces a new resource to be created.
- action string
- Action of the filtering tag. Possible values are IncludeandExclude. Changing this forces a new resource to be created.
- name string
- Name of the filtering tag. Changing this forces a new resource to be created.
- value string
- Value of the filtering tag. Changing this forces a new resource to be created.
- action str
- Action of the filtering tag. Possible values are IncludeandExclude. Changing this forces a new resource to be created.
- name str
- Name of the filtering tag. Changing this forces a new resource to be created.
- value str
- Value of the filtering tag. Changing this forces a new resource to be created.
- action String
- Action of the filtering tag. Possible values are IncludeandExclude. Changing this forces a new resource to be created.
- name String
- Name of the filtering tag. Changing this forces a new resource to be created.
- value String
- Value of the filtering tag. Changing this forces a new resource to be created.
Import
Dynatrace tag rules can be imported using the resource id, e.g.
$ pulumi import azure:dynatrace/tagRules:TagRules example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Dynatrace.Observability/monitors/monitor1/tagRules/tagRules1
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the azurermTerraform Provider.