Azure Native

Pulumi Official
Package maintained by Pulumi
v1.67.0 published on Tuesday, Jul 12, 2022 by Pulumi

TagRule

Capture logs and metrics of Azure resources based on ARM tags. API Version: 2020-07-01.

Example Usage

TagRules_CreateOrUpdate

using Pulumi;
using AzureNative = Pulumi.AzureNative;

class MyStack : Stack
{
    public MyStack()
    {
        var tagRule = new AzureNative.Elastic.TagRule("tagRule", new AzureNative.Elastic.TagRuleArgs
        {
            MonitorName = "myMonitor",
            ResourceGroupName = "myResourceGroup",
            RuleSetName = "default",
        });
    }

}
package main

import (
	elastic "github.com/pulumi/pulumi-azure-native/sdk/go/azure/elastic"
	"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 java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

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 pulumi
import pulumi_azure_native as azure_native

tag_rule = azure_native.elastic.TagRule("tagRule",
    monitor_name="myMonitor",
    resource_group_name="myResourceGroup",
    rule_set_name="default")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const tagRule = new azure_native.elastic.TagRule("tagRule", {
    monitorName: "myMonitor",
    resourceGroupName: "myResourceGroup",
    ruleSetName: "default",
});
resources:
  tagRule:
    type: azure-native:elastic:TagRule
    properties:
      monitorName: myMonitor
      resourceGroupName: myResourceGroup
      ruleSetName: default

Create a TagRule Resource

new TagRule(name: string, args: TagRuleArgs, opts?: CustomResourceOptions);
@overload
def TagRule(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            monitor_name: Optional[str] = None,
            properties: Optional[MonitoringTagRulesPropertiesArgs] = None,
            resource_group_name: Optional[str] = None,
            rule_set_name: Optional[str] = None)
@overload
def TagRule(resource_name: str,
            args: TagRuleArgs,
            opts: Optional[ResourceOptions] = None)
func NewTagRule(ctx *Context, name string, args TagRuleArgs, opts ...ResourceOption) (*TagRule, error)
public TagRule(string name, TagRuleArgs args, CustomResourceOptions? opts = null)
public TagRule(String name, TagRuleArgs args)
public TagRule(String name, TagRuleArgs args, CustomResourceOptions options)
type: azure-native:elastic:TagRule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args TagRuleArgs
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 TagRuleArgs
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 TagRuleArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args TagRuleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args TagRuleArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

TagRule Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The TagRule resource accepts the following input properties:

MonitorName string

Monitor resource name

ResourceGroupName string

The name of the resource group to which the Elastic resource belongs.

Properties Pulumi.AzureNative.Elastic.Inputs.MonitoringTagRulesPropertiesArgs

Properties of the monitoring tag rules.

RuleSetName string

Tag Rule Set resource name

MonitorName string

Monitor resource name

ResourceGroupName string

The name of the resource group to which the Elastic resource belongs.

Properties MonitoringTagRulesPropertiesArgs

Properties of the monitoring tag rules.

RuleSetName string

Tag Rule Set resource name

monitorName String

Monitor resource name

resourceGroupName String

The name of the resource group to which the Elastic resource belongs.

properties MonitoringTagRulesPropertiesArgs

Properties of the monitoring tag rules.

ruleSetName String

Tag Rule Set resource name

monitorName string

Monitor resource name

resourceGroupName string

The name of the resource group to which the Elastic resource belongs.

properties MonitoringTagRulesPropertiesArgs

Properties of the monitoring tag rules.

ruleSetName string

Tag Rule Set resource name

monitor_name str

Monitor resource name

resource_group_name str

The name of the resource group to which the Elastic resource belongs.

properties MonitoringTagRulesPropertiesArgs

Properties of the monitoring tag rules.

rule_set_name str

Tag Rule Set resource name

monitorName String

Monitor resource name

resourceGroupName String

The name of the resource group to which the Elastic resource belongs.

properties Property Map

Properties of the monitoring tag rules.

ruleSetName String

Tag Rule Set resource name

Outputs

All input properties are implicitly available as output properties. Additionally, the TagRule resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

Name string

Name of the rule set.

SystemData Pulumi.AzureNative.Elastic.Outputs.SystemDataResponse

The system metadata relating to this resource

Type string

The type of the rule set.

Id string

The provider-assigned unique ID for this managed resource.

Name string

Name of the rule set.

SystemData SystemDataResponse

The system metadata relating to this resource

Type string

The type of the rule set.

id String

The provider-assigned unique ID for this managed resource.

name String

Name of the rule set.

systemData SystemDataResponse

The system metadata relating to this resource

type String

The type of the rule set.

id string

The provider-assigned unique ID for this managed resource.

name string

Name of the rule set.

systemData SystemDataResponse

The system metadata relating to this resource

type string

The type of the rule set.

id str

The provider-assigned unique ID for this managed resource.

name str

Name of the rule set.

system_data SystemDataResponse

The system metadata relating to this resource

type str

The type of the rule set.

id String

The provider-assigned unique ID for this managed resource.

name String

Name of the rule set.

systemData Property Map

The system metadata relating to this resource

type String

The type of the rule set.

Supporting Types

FilteringTag

Action string | Pulumi.AzureNative.Elastic.TagAction

Valid actions for a filtering tag.

Name string

The name (also known as the key) of the tag.

Value string

The value of the tag.

Action string | TagAction

Valid actions for a filtering tag.

Name string

The name (also known as the key) of the tag.

Value string

The value of the tag.

action String | TagAction

Valid actions for a filtering tag.

name String

The name (also known as the key) of the tag.

value String

The value of the tag.

action string | TagAction

Valid actions for a filtering tag.

name string

The name (also known as the key) of the tag.

value string

The value of the tag.

action str | TagAction

Valid actions for a filtering tag.

name str

The name (also known as the key) of the tag.

value str

The value of the tag.

action String | "Include" | "Exclude"

Valid actions for a filtering tag.

name String

The name (also known as the key) of the tag.

value String

The value of the tag.

FilteringTagResponse

Action string

Valid actions for a filtering tag.

Name string

The name (also known as the key) of the tag.

Value string

The value of the tag.

Action string

Valid actions for a filtering tag.

Name string

The name (also known as the key) of the tag.

Value string

The value of the tag.

action String

Valid actions for a filtering tag.

name String

The name (also known as the key) of the tag.

value String

The value of the tag.

action string

Valid actions for a filtering tag.

name string

The name (also known as the key) of the tag.

value string

The value of the tag.

action str

Valid actions for a filtering tag.

name str

The name (also known as the key) of the tag.

value str

The value of the tag.

action String

Valid actions for a filtering tag.

name String

The name (also known as the key) of the tag.

value String

The value of the tag.

LogRules

FilteringTags List<Pulumi.AzureNative.Elastic.Inputs.FilteringTag>

List of filtering tags to be used for capturing logs. This only takes effect if SendActivityLogs flag is enabled. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags.

SendAadLogs bool

Flag specifying if AAD logs should be sent for the Monitor resource.

SendActivityLogs bool

Flag specifying if activity logs from Azure resources should be sent for the Monitor resource.

SendSubscriptionLogs bool

Flag specifying if subscription logs should be sent for the Monitor resource.

FilteringTags []FilteringTag

List of filtering tags to be used for capturing logs. This only takes effect if SendActivityLogs flag is enabled. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags.

SendAadLogs bool

Flag specifying if AAD logs should be sent for the Monitor resource.

SendActivityLogs bool

Flag specifying if activity logs from Azure resources should be sent for the Monitor resource.

SendSubscriptionLogs bool

Flag specifying if subscription logs should be sent for the Monitor resource.

filteringTags List<FilteringTag>

List of filtering tags to be used for capturing logs. This only takes effect if SendActivityLogs flag is enabled. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags.

sendAadLogs Boolean

Flag specifying if AAD logs should be sent for the Monitor resource.

sendActivityLogs Boolean

Flag specifying if activity logs from Azure resources should be sent for the Monitor resource.

sendSubscriptionLogs Boolean

Flag specifying if subscription logs should be sent for the Monitor resource.

filteringTags FilteringTag[]

List of filtering tags to be used for capturing logs. This only takes effect if SendActivityLogs flag is enabled. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags.

sendAadLogs boolean

Flag specifying if AAD logs should be sent for the Monitor resource.

sendActivityLogs boolean

Flag specifying if activity logs from Azure resources should be sent for the Monitor resource.

sendSubscriptionLogs boolean

Flag specifying if subscription logs should be sent for the Monitor resource.

filtering_tags Sequence[FilteringTag]

List of filtering tags to be used for capturing logs. This only takes effect if SendActivityLogs flag is enabled. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags.

send_aad_logs bool

Flag specifying if AAD logs should be sent for the Monitor resource.

send_activity_logs bool

Flag specifying if activity logs from Azure resources should be sent for the Monitor resource.

send_subscription_logs bool

Flag specifying if subscription logs should be sent for the Monitor resource.

filteringTags List<Property Map>

List of filtering tags to be used for capturing logs. This only takes effect if SendActivityLogs flag is enabled. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags.

sendAadLogs Boolean

Flag specifying if AAD logs should be sent for the Monitor resource.

sendActivityLogs Boolean

Flag specifying if activity logs from Azure resources should be sent for the Monitor resource.

sendSubscriptionLogs Boolean

Flag specifying if subscription logs should be sent for the Monitor resource.

LogRulesResponse

FilteringTags List<Pulumi.AzureNative.Elastic.Inputs.FilteringTagResponse>

List of filtering tags to be used for capturing logs. This only takes effect if SendActivityLogs flag is enabled. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags.

SendAadLogs bool

Flag specifying if AAD logs should be sent for the Monitor resource.

SendActivityLogs bool

Flag specifying if activity logs from Azure resources should be sent for the Monitor resource.

SendSubscriptionLogs bool

Flag specifying if subscription logs should be sent for the Monitor resource.

FilteringTags []FilteringTagResponse

List of filtering tags to be used for capturing logs. This only takes effect if SendActivityLogs flag is enabled. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags.

SendAadLogs bool

Flag specifying if AAD logs should be sent for the Monitor resource.

SendActivityLogs bool

Flag specifying if activity logs from Azure resources should be sent for the Monitor resource.

SendSubscriptionLogs bool

Flag specifying if subscription logs should be sent for the Monitor resource.

filteringTags List<FilteringTagResponse>

List of filtering tags to be used for capturing logs. This only takes effect if SendActivityLogs flag is enabled. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags.

sendAadLogs Boolean

Flag specifying if AAD logs should be sent for the Monitor resource.

sendActivityLogs Boolean

Flag specifying if activity logs from Azure resources should be sent for the Monitor resource.

sendSubscriptionLogs Boolean

Flag specifying if subscription logs should be sent for the Monitor resource.

filteringTags FilteringTagResponse[]

List of filtering tags to be used for capturing logs. This only takes effect if SendActivityLogs flag is enabled. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags.

sendAadLogs boolean

Flag specifying if AAD logs should be sent for the Monitor resource.

sendActivityLogs boolean

Flag specifying if activity logs from Azure resources should be sent for the Monitor resource.

sendSubscriptionLogs boolean

Flag specifying if subscription logs should be sent for the Monitor resource.

filtering_tags Sequence[FilteringTagResponse]

List of filtering tags to be used for capturing logs. This only takes effect if SendActivityLogs flag is enabled. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags.

send_aad_logs bool

Flag specifying if AAD logs should be sent for the Monitor resource.

send_activity_logs bool

Flag specifying if activity logs from Azure resources should be sent for the Monitor resource.

send_subscription_logs bool

Flag specifying if subscription logs should be sent for the Monitor resource.

filteringTags List<Property Map>

List of filtering tags to be used for capturing logs. This only takes effect if SendActivityLogs flag is enabled. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags.

sendAadLogs Boolean

Flag specifying if AAD logs should be sent for the Monitor resource.

sendActivityLogs Boolean

Flag specifying if activity logs from Azure resources should be sent for the Monitor resource.

sendSubscriptionLogs Boolean

Flag specifying if subscription logs should be sent for the Monitor resource.

MonitoringTagRulesProperties

LogRules Pulumi.AzureNative.Elastic.Inputs.LogRules

Rules for sending logs.

ProvisioningState string | Pulumi.AzureNative.Elastic.ProvisioningState

Provisioning state of the monitoring tag rules.

LogRules LogRules

Rules for sending logs.

ProvisioningState string | ProvisioningState

Provisioning state of the monitoring tag rules.

logRules LogRules

Rules for sending logs.

provisioningState String | ProvisioningState

Provisioning state of the monitoring tag rules.

logRules LogRules

Rules for sending logs.

provisioningState string | ProvisioningState

Provisioning state of the monitoring tag rules.

log_rules LogRules

Rules for sending logs.

provisioning_state str | ProvisioningState

Provisioning state of the monitoring tag rules.

MonitoringTagRulesPropertiesResponse

LogRules Pulumi.AzureNative.Elastic.Inputs.LogRulesResponse

Rules for sending logs.

ProvisioningState string

Provisioning state of the monitoring tag rules.

LogRules LogRulesResponse

Rules for sending logs.

ProvisioningState string

Provisioning state of the monitoring tag rules.

logRules LogRulesResponse

Rules for sending logs.

provisioningState String

Provisioning state of the monitoring tag rules.

logRules LogRulesResponse

Rules for sending logs.

provisioningState string

Provisioning state of the monitoring tag rules.

log_rules LogRulesResponse

Rules for sending logs.

provisioning_state str

Provisioning state of the monitoring tag rules.

logRules Property Map

Rules for sending logs.

provisioningState String

Provisioning state of the monitoring tag rules.

ProvisioningState

Accepted
Accepted
Creating
Creating
Updating
Updating
Deleting
Deleting
Succeeded
Succeeded
Failed
Failed
Canceled
Canceled
Deleted
Deleted
NotSpecified
NotSpecified
ProvisioningStateAccepted
Accepted
ProvisioningStateCreating
Creating
ProvisioningStateUpdating
Updating
ProvisioningStateDeleting
Deleting
ProvisioningStateSucceeded
Succeeded
ProvisioningStateFailed
Failed
ProvisioningStateCanceled
Canceled
ProvisioningStateDeleted
Deleted
ProvisioningStateNotSpecified
NotSpecified
Accepted
Accepted
Creating
Creating
Updating
Updating
Deleting
Deleting
Succeeded
Succeeded
Failed
Failed
Canceled
Canceled
Deleted
Deleted
NotSpecified
NotSpecified
Accepted
Accepted
Creating
Creating
Updating
Updating
Deleting
Deleting
Succeeded
Succeeded
Failed
Failed
Canceled
Canceled
Deleted
Deleted
NotSpecified
NotSpecified
ACCEPTED
Accepted
CREATING
Creating
UPDATING
Updating
DELETING
Deleting
SUCCEEDED
Succeeded
FAILED
Failed
CANCELED
Canceled
DELETED
Deleted
NOT_SPECIFIED
NotSpecified
"Accepted"
Accepted
"Creating"
Creating
"Updating"
Updating
"Deleting"
Deleting
"Succeeded"
Succeeded
"Failed"
Failed
"Canceled"
Canceled
"Deleted"
Deleted
"NotSpecified"
NotSpecified

SystemDataResponse

CreatedAt string

The timestamp of resource creation (UTC).

CreatedBy string

The identity that created the resource.

CreatedByType string

The type of identity that created the resource.

LastModifiedAt string

The timestamp of resource last modification (UTC)

LastModifiedBy string

The identity that last modified the resource.

LastModifiedByType string

The type of identity that last modified the resource.

CreatedAt string

The timestamp of resource creation (UTC).

CreatedBy string

The identity that created the resource.

CreatedByType string

The type of identity that created the resource.

LastModifiedAt string

The timestamp of resource last modification (UTC)

LastModifiedBy string

The identity that last modified the resource.

LastModifiedByType string

The type of identity that last modified the resource.

createdAt String

The timestamp of resource creation (UTC).

createdBy String

The identity that created the resource.

createdByType String

The type of identity that created the resource.

lastModifiedAt String

The timestamp of resource last modification (UTC)

lastModifiedBy String

The identity that last modified the resource.

lastModifiedByType String

The type of identity that last modified the resource.

createdAt string

The timestamp of resource creation (UTC).

createdBy string

The identity that created the resource.

createdByType string

The type of identity that created the resource.

lastModifiedAt string

The timestamp of resource last modification (UTC)

lastModifiedBy string

The identity that last modified the resource.

lastModifiedByType string

The type of identity that last modified the resource.

created_at str

The timestamp of resource creation (UTC).

created_by str

The identity that created the resource.

created_by_type str

The type of identity that created the resource.

last_modified_at str

The timestamp of resource last modification (UTC)

last_modified_by str

The identity that last modified the resource.

last_modified_by_type str

The type of identity that last modified the resource.

createdAt String

The timestamp of resource creation (UTC).

createdBy String

The identity that created the resource.

createdByType String

The type of identity that created the resource.

lastModifiedAt String

The timestamp of resource last modification (UTC)

lastModifiedBy String

The identity that last modified the resource.

lastModifiedByType String

The type of identity that last modified the resource.

TagAction

Include
Include
Exclude
Exclude
TagActionInclude
Include
TagActionExclude
Exclude
Include
Include
Exclude
Exclude
Include
Include
Exclude
Exclude
INCLUDE
Include
EXCLUDE
Exclude
"Include"
Include
"Exclude"
Exclude

Import

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

$ pulumi import azure-native:elastic:TagRule default /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Datadog/monitors/myMonitor/tagRules/default 

Package Details

Repository
https://github.com/pulumi/pulumi-azure-native
License
Apache-2.0