TagRuleArgs

data class TagRuleArgs(val activityLogEnabled: Output<Boolean>? = null, val azureActiveDirectoryLogEnabled: Output<Boolean>? = null, val logTagFilters: Output<List<TagRuleLogTagFilterArgs>>? = null, val metricEnabled: Output<Boolean>? = null, val metricTagFilters: Output<List<TagRuleMetricTagFilterArgs>>? = null, val monitorId: Output<String>? = null, val subscriptionLogEnabled: Output<Boolean>? = null) : ConvertibleToJava<TagRuleArgs>

Manages an Azure Native New Relic Tag Rule.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.newrelic.Monitor;
import com.pulumi.azure.newrelic.MonitorArgs;
import com.pulumi.azure.newrelic.inputs.MonitorPlanArgs;
import com.pulumi.azure.newrelic.inputs.MonitorUserArgs;
import com.pulumi.azure.newrelic.TagRule;
import com.pulumi.azure.newrelic.TagRuleArgs;
import com.pulumi.azure.newrelic.inputs.TagRuleLogTagFilterArgs;
import com.pulumi.azure.newrelic.inputs.TagRuleMetricTagFilterArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("East US")
.build());
var exampleMonitor = new Monitor("exampleMonitor", MonitorArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.plan(MonitorPlanArgs.builder()
.effectiveDate("2023-06-06T00:00:00Z")
.build())
.user(MonitorUserArgs.builder()
.email("user@example.com")
.firstName("Example")
.lastName("User")
.phoneNumber("+12313803556")
.build())
.build());
var exampleTagRule = new TagRule("exampleTagRule", TagRuleArgs.builder()
.monitorId(exampleMonitor.id())
.azureActiveDirectoryLogEnabled(true)
.activityLogEnabled(true)
.metricEnabled(true)
.subscriptionLogEnabled(true)
.logTagFilters(TagRuleLogTagFilterArgs.builder()
.name("key")
.action("Include")
.value("value")
.build())
.metricTagFilters(TagRuleMetricTagFilterArgs.builder()
.name("key")
.action("Exclude")
.value("value")
.build())
.build());
}
}

Import

Azure Native New Relic Tag Rule can be imported using the resource id, e.g.

$ pulumi import azure:newrelic/tagRule:TagRule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/NewRelic.Observability/monitors/monitor1/tagRules/ruleSet1

Constructors

Link copied to clipboard
fun TagRuleArgs(activityLogEnabled: Output<Boolean>? = null, azureActiveDirectoryLogEnabled: Output<Boolean>? = null, logTagFilters: Output<List<TagRuleLogTagFilterArgs>>? = null, metricEnabled: Output<Boolean>? = null, metricTagFilters: Output<List<TagRuleMetricTagFilterArgs>>? = null, monitorId: Output<String>? = null, subscriptionLogEnabled: Output<Boolean>? = null)

Functions

Link copied to clipboard
open override fun toJava(): TagRuleArgs

Properties

Link copied to clipboard
val activityLogEnabled: Output<Boolean>? = null

Whether activity logs from Azure resources should be sent for the Monitor resource. Defaults to false.

Link copied to clipboard

Whether Azure Active Directory logs should be sent for the Monitor resource. Defaults to false.

Link copied to clipboard

A log_tag_filter block as defined below.

Link copied to clipboard
val metricEnabled: Output<Boolean>? = null

Whether metrics should be sent for the Monitor resource. Defaults to false.

Link copied to clipboard

A metric_tag_filter block as defined below.

Link copied to clipboard
val monitorId: Output<String>? = null

Specifies the ID of the New Relic Monitor this Tag Rule should be created within. Changing this forces a new Azure Native New Relic Tag Rule to be created.

Link copied to clipboard
val subscriptionLogEnabled: Output<Boolean>? = null

Whether subscription logs should be sent for the Monitor resource. Defaults to false.