TagRuleArgs

data class TagRuleArgs(val monitorName: Output<String>? = null, val properties: Output<MonitoringTagRulesPropertiesArgs>? = null, val resourceGroupName: Output<String>? = null, val ruleSetName: Output<String>? = null) : ConvertibleToJava<TagRuleArgs>

Capture logs and metrics of Azure resources based on ARM tags. Uses Azure REST API version 2024-03-01. In version 2.x of the Azure Native provider, it used API version 2023-06-01. Other available API versions: 2023-06-01, 2023-06-15-preview, 2023-07-01-preview, 2023-10-01-preview, 2023-11-01-preview, 2024-01-01-preview, 2024-05-01-preview, 2024-06-15-preview, 2024-10-01-preview, 2025-01-15-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native elastic [ApiVersion]. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.

Example Usage

TagRules_CreateOrUpdate

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var tagRule = new AzureNative.Elastic.TagRule("tagRule", new()
{
MonitorName = "myMonitor",
ResourceGroupName = "myResourceGroup",
RuleSetName = "default",
});
});
package main
import (
elastic "github.com/pulumi/pulumi-azure-native-sdk/elastic/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := elastic.NewTagRule(ctx, "tagRule", &elastic.TagRuleArgs{
MonitorName: pulumi.String("myMonitor"),
ResourceGroupName: pulumi.String("myResourceGroup"),
RuleSetName: pulumi.String("default"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.elastic.TagRule;
import com.pulumi.azurenative.elastic.TagRuleArgs;
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 tagRule = new TagRule("tagRule", TagRuleArgs.builder()
.monitorName("myMonitor")
.resourceGroupName("myResourceGroup")
.ruleSetName("default")
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:elastic:TagRule default /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Elastic/monitors/{monitorName}/tagRules/{ruleSetName}

Constructors

Link copied to clipboard
constructor(monitorName: Output<String>? = null, properties: Output<MonitoringTagRulesPropertiesArgs>? = null, resourceGroupName: Output<String>? = null, ruleSetName: Output<String>? = null)

Properties

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

Monitor resource name

Link copied to clipboard

Properties of the monitoring tag rules.

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

The name of the resource group. The name is case insensitive.

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

Tag Rule Set resource name

Functions

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