azure-native.logz.MetricsSourceTagRule
Explore with Pulumi AI
Capture metrics of Azure resources based on ARM tags. Azure REST API version: 2022-01-01-preview. Prior API version in Azure Native 1.x: 2022-01-01-preview.
Example Usage
MetricsSourceTagRules_CreateOrUpdate
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var metricsSourceTagRule = new AzureNative.Logz.MetricsSourceTagRule("metricsSourceTagRule", new()
{
MetricsSourceName = "MetricsSource1",
MonitorName = "myMonitor",
ResourceGroupName = "myResourceGroup",
RuleSetName = "default",
});
});
package main
import (
logz "github.com/pulumi/pulumi-azure-native-sdk/logz/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := logz.NewMetricsSourceTagRule(ctx, "metricsSourceTagRule", &logz.MetricsSourceTagRuleArgs{
MetricsSourceName: pulumi.String("MetricsSource1"),
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.logz.MetricsSourceTagRule;
import com.pulumi.azurenative.logz.MetricsSourceTagRuleArgs;
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 metricsSourceTagRule = new MetricsSourceTagRule("metricsSourceTagRule", MetricsSourceTagRuleArgs.builder()
.metricsSourceName("MetricsSource1")
.monitorName("myMonitor")
.resourceGroupName("myResourceGroup")
.ruleSetName("default")
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
metrics_source_tag_rule = azure_native.logz.MetricsSourceTagRule("metricsSourceTagRule",
metrics_source_name="MetricsSource1",
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 metricsSourceTagRule = new azure_native.logz.MetricsSourceTagRule("metricsSourceTagRule", {
metricsSourceName: "MetricsSource1",
monitorName: "myMonitor",
resourceGroupName: "myResourceGroup",
ruleSetName: "default",
});
resources:
metricsSourceTagRule:
type: azure-native:logz:MetricsSourceTagRule
properties:
metricsSourceName: MetricsSource1
monitorName: myMonitor
resourceGroupName: myResourceGroup
ruleSetName: default
Create MetricsSourceTagRule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new MetricsSourceTagRule(name: string, args: MetricsSourceTagRuleArgs, opts?: CustomResourceOptions);
@overload
def MetricsSourceTagRule(resource_name: str,
args: MetricsSourceTagRuleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def MetricsSourceTagRule(resource_name: str,
opts: Optional[ResourceOptions] = None,
metrics_source_name: Optional[str] = None,
monitor_name: Optional[str] = None,
resource_group_name: Optional[str] = None,
properties: Optional[MetricsTagRulesPropertiesArgs] = None,
rule_set_name: Optional[str] = None)
func NewMetricsSourceTagRule(ctx *Context, name string, args MetricsSourceTagRuleArgs, opts ...ResourceOption) (*MetricsSourceTagRule, error)
public MetricsSourceTagRule(string name, MetricsSourceTagRuleArgs args, CustomResourceOptions? opts = null)
public MetricsSourceTagRule(String name, MetricsSourceTagRuleArgs args)
public MetricsSourceTagRule(String name, MetricsSourceTagRuleArgs args, CustomResourceOptions options)
type: azure-native:logz:MetricsSourceTagRule
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 MetricsSourceTagRuleArgs
- 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 MetricsSourceTagRuleArgs
- 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 MetricsSourceTagRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args MetricsSourceTagRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args MetricsSourceTagRuleArgs
- 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 metricsSourceTagRuleResource = new AzureNative.Logz.MetricsSourceTagRule("metricsSourceTagRuleResource", new()
{
MetricsSourceName = "string",
MonitorName = "string",
ResourceGroupName = "string",
Properties = new AzureNative.Logz.Inputs.MetricsTagRulesPropertiesArgs
{
MetricRules = new[]
{
new AzureNative.Logz.Inputs.MetricRulesArgs
{
FilteringTags = new[]
{
new AzureNative.Logz.Inputs.FilteringTagArgs
{
Action = "string",
Name = "string",
Value = "string",
},
},
SubscriptionId = "string",
},
},
SendMetrics = false,
},
RuleSetName = "string",
});
example, err := logz.NewMetricsSourceTagRule(ctx, "metricsSourceTagRuleResource", &logz.MetricsSourceTagRuleArgs{
MetricsSourceName: pulumi.String("string"),
MonitorName: pulumi.String("string"),
ResourceGroupName: pulumi.String("string"),
Properties: &logz.MetricsTagRulesPropertiesArgs{
MetricRules: logz.MetricRulesArray{
&logz.MetricRulesArgs{
FilteringTags: logz.FilteringTagArray{
&logz.FilteringTagArgs{
Action: pulumi.String("string"),
Name: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
SubscriptionId: pulumi.String("string"),
},
},
SendMetrics: pulumi.Bool(false),
},
RuleSetName: pulumi.String("string"),
})
var metricsSourceTagRuleResource = new MetricsSourceTagRule("metricsSourceTagRuleResource", MetricsSourceTagRuleArgs.builder()
.metricsSourceName("string")
.monitorName("string")
.resourceGroupName("string")
.properties(MetricsTagRulesPropertiesArgs.builder()
.metricRules(MetricRulesArgs.builder()
.filteringTags(FilteringTagArgs.builder()
.action("string")
.name("string")
.value("string")
.build())
.subscriptionId("string")
.build())
.sendMetrics(false)
.build())
.ruleSetName("string")
.build());
metrics_source_tag_rule_resource = azure_native.logz.MetricsSourceTagRule("metricsSourceTagRuleResource",
metrics_source_name="string",
monitor_name="string",
resource_group_name="string",
properties={
"metricRules": [{
"filteringTags": [{
"action": "string",
"name": "string",
"value": "string",
}],
"subscriptionId": "string",
}],
"sendMetrics": False,
},
rule_set_name="string")
const metricsSourceTagRuleResource = new azure_native.logz.MetricsSourceTagRule("metricsSourceTagRuleResource", {
metricsSourceName: "string",
monitorName: "string",
resourceGroupName: "string",
properties: {
metricRules: [{
filteringTags: [{
action: "string",
name: "string",
value: "string",
}],
subscriptionId: "string",
}],
sendMetrics: false,
},
ruleSetName: "string",
});
type: azure-native:logz:MetricsSourceTagRule
properties:
metricsSourceName: string
monitorName: string
properties:
metricRules:
- filteringTags:
- action: string
name: string
value: string
subscriptionId: string
sendMetrics: false
resourceGroupName: string
ruleSetName: string
MetricsSourceTagRule 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 MetricsSourceTagRule resource accepts the following input properties:
- Metrics
Source stringName - Metrics Account resource name
- Monitor
Name string - Monitor resource name
- Resource
Group stringName - The name of the resource group. The name is case insensitive.
- Properties
Pulumi.
Azure Native. Logz. Inputs. Metrics Tag Rules Properties - Definition of the properties for a TagRules resource.
- Rule
Set stringName
- Metrics
Source stringName - Metrics Account resource name
- Monitor
Name string - Monitor resource name
- Resource
Group stringName - The name of the resource group. The name is case insensitive.
- Properties
Metrics
Tag Rules Properties Args - Definition of the properties for a TagRules resource.
- Rule
Set stringName
- metrics
Source StringName - Metrics Account resource name
- monitor
Name String - Monitor resource name
- resource
Group StringName - The name of the resource group. The name is case insensitive.
- properties
Metrics
Tag Rules Properties - Definition of the properties for a TagRules resource.
- rule
Set StringName
- metrics
Source stringName - Metrics Account resource name
- monitor
Name string - Monitor resource name
- resource
Group stringName - The name of the resource group. The name is case insensitive.
- properties
Metrics
Tag Rules Properties - Definition of the properties for a TagRules resource.
- rule
Set stringName
- metrics_
source_ strname - Metrics Account resource name
- monitor_
name str - Monitor resource name
- resource_
group_ strname - The name of the resource group. The name is case insensitive.
- properties
Metrics
Tag Rules Properties Args - Definition of the properties for a TagRules resource.
- rule_
set_ strname
- metrics
Source StringName - Metrics Account resource name
- monitor
Name String - Monitor resource name
- resource
Group StringName - The name of the resource group. The name is case insensitive.
- properties Property Map
- Definition of the properties for a TagRules resource.
- rule
Set StringName
Outputs
All input properties are implicitly available as output properties. Additionally, the MetricsSourceTagRule resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Name of the rule set.
- System
Data Pulumi.Azure Native. Logz. Outputs. System Data Response - 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.
- System
Data SystemData Response - 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.
- system
Data SystemData Response - 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.
- system
Data SystemData Response - 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 SystemData Response - 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.
- system
Data Property Map - The system metadata relating to this resource
- type String
- The type of the rule set.
Supporting Types
FilteringTag, FilteringTagArgs
- Action
string | Pulumi.
Azure Native. Logz. Tag Action - Valid actions for a filtering tag. Exclusion takes priority over inclusion.
- Name string
- The name (also known as the key) of the tag.
- Value string
- The value of the tag.
- action String | "Include" | "Exclude"
- Valid actions for a filtering tag. Exclusion takes priority over inclusion.
- name String
- The name (also known as the key) of the tag.
- value String
- The value of the tag.
FilteringTagResponse, FilteringTagResponseArgs
MetricRules, MetricRulesArgs
- List<Pulumi.
Azure Native. Logz. Inputs. Filtering Tag> - List of filtering tags to be used for capturing metrics. 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.
- Subscription
Id string - Subscription Id for which filtering tags are applicable
- []Filtering
Tag - List of filtering tags to be used for capturing metrics. 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.
- Subscription
Id string - Subscription Id for which filtering tags are applicable
- List<Filtering
Tag> - List of filtering tags to be used for capturing metrics. 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.
- subscription
Id String - Subscription Id for which filtering tags are applicable
- Filtering
Tag[] - List of filtering tags to be used for capturing metrics. 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.
- subscription
Id string - Subscription Id for which filtering tags are applicable
- Sequence[Filtering
Tag] - List of filtering tags to be used for capturing metrics. 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.
- subscription_
id str - Subscription Id for which filtering tags are applicable
- List<Property Map>
- List of filtering tags to be used for capturing metrics. 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.
- subscription
Id String - Subscription Id for which filtering tags are applicable
MetricRulesResponse, MetricRulesResponseArgs
- List<Pulumi.
Azure Native. Logz. Inputs. Filtering Tag Response> - List of filtering tags to be used for capturing metrics. 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.
- Subscription
Id string - Subscription Id for which filtering tags are applicable
- []Filtering
Tag Response - List of filtering tags to be used for capturing metrics. 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.
- Subscription
Id string - Subscription Id for which filtering tags are applicable
- List<Filtering
Tag Response> - List of filtering tags to be used for capturing metrics. 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.
- subscription
Id String - Subscription Id for which filtering tags are applicable
- Filtering
Tag Response[] - List of filtering tags to be used for capturing metrics. 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.
- subscription
Id string - Subscription Id for which filtering tags are applicable
- Sequence[Filtering
Tag Response] - List of filtering tags to be used for capturing metrics. 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.
- subscription_
id str - Subscription Id for which filtering tags are applicable
- List<Property Map>
- List of filtering tags to be used for capturing metrics. 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.
- subscription
Id String - Subscription Id for which filtering tags are applicable
MetricsTagRulesProperties, MetricsTagRulesPropertiesArgs
- Metric
Rules List<Pulumi.Azure Native. Logz. Inputs. Metric Rules> - Send
Metrics bool - Flag specifying if metrics from Azure resources should be sent for the Monitor resource.
- Metric
Rules []MetricRules - Send
Metrics bool - Flag specifying if metrics from Azure resources should be sent for the Monitor resource.
- metric
Rules List<MetricRules> - send
Metrics Boolean - Flag specifying if metrics from Azure resources should be sent for the Monitor resource.
- metric
Rules MetricRules[] - send
Metrics boolean - Flag specifying if metrics from Azure resources should be sent for the Monitor resource.
- metric_
rules Sequence[MetricRules] - send_
metrics bool - Flag specifying if metrics from Azure resources should be sent for the Monitor resource.
- metric
Rules List<Property Map> - send
Metrics Boolean - Flag specifying if metrics from Azure resources should be sent for the Monitor resource.
MetricsTagRulesPropertiesResponse, MetricsTagRulesPropertiesResponseArgs
- Provisioning
State string - Flag specifying if the resource provisioning state as tracked by ARM.
- System
Data Pulumi.Azure Native. Logz. Inputs. System Data Response - Metadata pertaining to creation and last modification of the resource.
- Metric
Rules List<Pulumi.Azure Native. Logz. Inputs. Metric Rules Response> - Send
Metrics bool - Flag specifying if metrics from Azure resources should be sent for the Monitor resource.
- Provisioning
State string - Flag specifying if the resource provisioning state as tracked by ARM.
- System
Data SystemData Response - Metadata pertaining to creation and last modification of the resource.
- Metric
Rules []MetricRules Response - Send
Metrics bool - Flag specifying if metrics from Azure resources should be sent for the Monitor resource.
- provisioning
State String - Flag specifying if the resource provisioning state as tracked by ARM.
- system
Data SystemData Response - Metadata pertaining to creation and last modification of the resource.
- metric
Rules List<MetricRules Response> - send
Metrics Boolean - Flag specifying if metrics from Azure resources should be sent for the Monitor resource.
- provisioning
State string - Flag specifying if the resource provisioning state as tracked by ARM.
- system
Data SystemData Response - Metadata pertaining to creation and last modification of the resource.
- metric
Rules MetricRules Response[] - send
Metrics boolean - Flag specifying if metrics from Azure resources should be sent for the Monitor resource.
- provisioning_
state str - Flag specifying if the resource provisioning state as tracked by ARM.
- system_
data SystemData Response - Metadata pertaining to creation and last modification of the resource.
- metric_
rules Sequence[MetricRules Response] - send_
metrics bool - Flag specifying if metrics from Azure resources should be sent for the Monitor resource.
- provisioning
State String - Flag specifying if the resource provisioning state as tracked by ARM.
- system
Data Property Map - Metadata pertaining to creation and last modification of the resource.
- metric
Rules List<Property Map> - send
Metrics Boolean - Flag specifying if metrics from Azure resources should be sent for the Monitor resource.
SystemDataResponse, SystemDataResponseArgs
- Created
At string - The timestamp of resource creation (UTC).
- Created
By string - The identity that created the resource.
- Created
By stringType - The type of identity that created the resource.
- Last
Modified stringAt - The timestamp of resource last modification (UTC)
- Last
Modified stringBy - The identity that last modified the resource.
- Last
Modified stringBy Type - The type of identity that last modified the resource.
- Created
At string - The timestamp of resource creation (UTC).
- Created
By string - The identity that created the resource.
- Created
By stringType - The type of identity that created the resource.
- Last
Modified stringAt - The timestamp of resource last modification (UTC)
- Last
Modified stringBy - The identity that last modified the resource.
- Last
Modified stringBy Type - The type of identity that last modified the resource.
- created
At String - The timestamp of resource creation (UTC).
- created
By String - The identity that created the resource.
- created
By StringType - The type of identity that created the resource.
- last
Modified StringAt - The timestamp of resource last modification (UTC)
- last
Modified StringBy - The identity that last modified the resource.
- last
Modified StringBy Type - The type of identity that last modified the resource.
- created
At string - The timestamp of resource creation (UTC).
- created
By string - The identity that created the resource.
- created
By stringType - The type of identity that created the resource.
- last
Modified stringAt - The timestamp of resource last modification (UTC)
- last
Modified stringBy - The identity that last modified the resource.
- last
Modified stringBy Type - 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_ strtype - The type of identity that created the resource.
- last_
modified_ strat - The timestamp of resource last modification (UTC)
- last_
modified_ strby - The identity that last modified the resource.
- last_
modified_ strby_ type - The type of identity that last modified the resource.
- created
At String - The timestamp of resource creation (UTC).
- created
By String - The identity that created the resource.
- created
By StringType - The type of identity that created the resource.
- last
Modified StringAt - The timestamp of resource last modification (UTC)
- last
Modified StringBy - The identity that last modified the resource.
- last
Modified StringBy Type - The type of identity that last modified the resource.
TagAction, TagActionArgs
- Include
- Include
- Exclude
- Exclude
- Tag
Action Include - Include
- Tag
Action Exclude - 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:logz:MetricsSourceTagRule default /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}/metricsSource/{metricsSourceName}/tagRules/{ruleSetName}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0